diff --git a/base-manager-ui/admin/src/pages/basicset/appmarket/components/AppDetailsPage.vue b/base-manager-ui/admin/src/pages/basicset/appmarket/components/AppDetailsPage.vue index be109085f22f28b68bd4959f3913e39e6cb81bcf..74fda2da5d6f6a8391ae62b407c6de80fe93ce1b 100644 --- a/base-manager-ui/admin/src/pages/basicset/appmarket/components/AppDetailsPage.vue +++ b/base-manager-ui/admin/src/pages/basicset/appmarket/components/AppDetailsPage.vue @@ -192,7 +192,6 @@ export default { let res = await getAppInfo({ id: this.appId }); if (res.data.code === 1) { this.appInfo = res.data.data; - console.log(this.appInfo); } }, // 鑾峰彇鍘嗗彶鐗堟湰 diff --git a/base-manager-ui/admin/src/pages/basicset/appmarket/components/FieldConfig.vue b/base-manager-ui/admin/src/pages/basicset/appmarket/components/FieldConfig.vue index ac04c700fea53ac3eda2482a1ea3586593e0fd71..2c1e70d052aaf6da1d4cabf0dc2f57377d637ac3 100644 --- a/base-manager-ui/admin/src/pages/basicset/appmarket/components/FieldConfig.vue +++ b/base-manager-ui/admin/src/pages/basicset/appmarket/components/FieldConfig.vue @@ -152,7 +152,9 @@ export default { this.current -= 1; this.getTempleteList(); } - this.tableData = data; + this.tableData = data.sort((a, b) => { + return a.fieldOrderNo - b.fieldOrderNo; + }); this.SET_appTemplate(data); this.total = total; } diff --git a/base-manager-ui/admin/src/pages/basicset/appmarket/modal/AddField.vue b/base-manager-ui/admin/src/pages/basicset/appmarket/modal/AddField.vue index 22a8af9254b170078849c28e2e1908c562658b40..d8d2e053976652ef19786c44a0ce14060cfa1857 100644 --- a/base-manager-ui/admin/src/pages/basicset/appmarket/modal/AddField.vue +++ b/base-manager-ui/admin/src/pages/basicset/appmarket/modal/AddField.vue @@ -111,7 +111,7 @@ export default { fieldLen: 128, //鏁版嵁闀垮害锛岄粯璁�128 fieldNull: "", //鏄惁鍏佽涓虹┖锛�(0.鍚�,1.鏄�) isList: "", //瀛楁鏄惁鍒楄〃鏄剧ず(0.鍚�,1.鏄�) - fieldOrderNo: "", // 鎺掑簭鍙� + fieldOrderNo: 99, // 鎺掑簭鍙� remark: "", // }, rules: { @@ -166,7 +166,6 @@ export default { Object.assign(this.form, this.$options.data().form); this.form.appId = this.$route.query.id; this.form.id && this.$delete(this.form, "id"); - console.log(this.form); }, // 缂栬緫 onEdit(data) { diff --git a/portal-manager-ui/admin/src/components/viewport/viewport.vue b/portal-manager-ui/admin/src/components/viewport/viewport.vue index c4bfe50e383e6385aaadbc6665411e5ec179b1ed..812c693ff778a1ef679c7b81067ca3dc056a1fe4 100644 --- a/portal-manager-ui/admin/src/components/viewport/viewport.vue +++ b/portal-manager-ui/admin/src/components/viewport/viewport.vue @@ -11,11 +11,5 @@ // overflow-y: auto; // overflow-x: hidden; box-sizing: border-box !important; - background-image: linear-gradient( - to top, - #fad0c4 0%, - #fad0c4 1%, - #ffd1ff 100% - ) !important; } </style> diff --git a/portal-manager-ui/admin/src/views/dataAdmin/components/evaluationRecordReport/components/HandlingDetails.vue b/portal-manager-ui/admin/src/views/dataAdmin/components/evaluationRecordReport/components/HandlingDetails.vue index 25aefc86b6af342394bcae973f765222e136e386..799d8482378222f9a64d7d1411954bdcfceb16cb 100644 --- a/portal-manager-ui/admin/src/views/dataAdmin/components/evaluationRecordReport/components/HandlingDetails.vue +++ b/portal-manager-ui/admin/src/views/dataAdmin/components/evaluationRecordReport/components/HandlingDetails.vue @@ -48,7 +48,7 @@ <span><i class="lable">鐢虫姤浜猴細</i>{{queEvaData.people_name?queEvaData.people_name:'--'}}</span> <span><i class="lable">鍙栧彿鏃堕棿:</i>{{queEvaData.taketime?queEvaData.taketime:'--'}}</span> <span><i class="lable">鎺掗槦缂栫爜锛�</i>{{queEvaData.flownum?queEvaData.flownum:'--'}}</span> - <span><i class="lable">鍙栧彿鏂瑰紡锛�</i>{{queEvaData.wy_signin==''?'--':queEvaData.wy_signin>0?'鍦ㄧ嚎鍙栧彿':'鐜板満鍙栧彿'}}</span> + <span><i class="lable">鍙栧彿鏂瑰紡锛�</i>{{queEvaData.wy_signin>0?'鍦ㄧ嚎鍙栧彿':'鐜板満鍙栧彿'}}</span> <span><i class="lable">娉ㄥ唽鏂瑰紡锛�</i>--</span> <span><i class="lable">鍙栧彿璁惧锛�</i>{{queEvaData.take_name?queEvaData.take_name:'--'}}</span> </div> @@ -70,7 +70,7 @@ > <div class="details"> <span><i class="lable">鍔炵悊绐楀彛锛�</i>{{queEvaData.window_name?queEvaData.window_name:'--'}}</span> - <span><i class="lable">鍔炵悊寮€濮嬫椂闂达細</i>{{queEvaData.bltime?queEvaData.bltime:'--'}}</span> + <span><i class="lable">鍔炵悊寮€濮嬫椂闂达細</i>{{queEvaData.calltime?queEvaData.calltime:'--'}}</span> <span><i class="lable">宸ヤ綔浜哄憳锛�</i>{{queEvaData.workman_name?queEvaData.workman_name:'--'}}</span> <span><i class="lable">鍙彿璁惧锛�</i>{{queEvaData.call_name}}</span> </div> diff --git a/portal-manager-ui/admin/src/views/dataAdmin/components/evaluationRecordReport/departmentEvaluation.vue b/portal-manager-ui/admin/src/views/dataAdmin/components/evaluationRecordReport/departmentEvaluation.vue index 12e80e4bc25a591a13c78781205ad8d6197afe43..3e2597ce59fe38ba9a7bb8c9879aba9398e122c5 100644 --- a/portal-manager-ui/admin/src/views/dataAdmin/components/evaluationRecordReport/departmentEvaluation.vue +++ b/portal-manager-ui/admin/src/views/dataAdmin/components/evaluationRecordReport/departmentEvaluation.vue @@ -1,432 +1,553 @@ <template> - <div class="callRecord-Container"> - <div class="header_box"> - <div> - <a-button type="success" @click="toexportTable"> - <span>{{ tableSelectedRows.length ? "瀵煎嚭" : "瀵煎嚭鍏ㄩ儴" }}</span> - </a-button> - <a-button type="danger" @click="delTable"> - <span>鎵归噺鍒犻櫎</span> - </a-button> - <b>璇勪环娆℃暟锛�<i>{{evaCount}}娆�</i></b> - <sub>缁熻鏃堕棿娈碉細{{evaDates[0]}}~{{evaDates[1]}}</sub> - </div> - <span> - <a-space> - <a-select v-model="evaChoose" placeholder="鍏ㄩ儴璇勪环" @change="changeEvaChoose" mode="multiple" style="max-width:140px"> - <a-select-option v-for="item in optonList" :key="item.id" :value="item.id">{{item.name}}</a-select-option> - </a-select> - <a-select v-model="evaFrom" placeholder="鍏ㄩ儴鏉ユ簮" @change="changeEvaFrom" mode="multiple" style="max-width:160px"> - <a-select-option value="1"> 绐楀彛璇勪环 </a-select-option> - <a-select-option value="2"> 鑷姪鏈嶅姟缁堢 </a-select-option> - <a-select-option value="3"> 鑳岄潬鑳岃瘎浠� </a-select-option> - <a-select-option value="4"> 寰畼缃� </a-select-option> - <a-select-option value="5"> 濂藉樊璇� </a-select-option> - <a-select-option value="6"> 涓€浣撳寲璇勪环 </a-select-option> - </a-select> + <div class="callRecord-Container"> + <div class="header_box"> + <div> + <a-button type="success" @click="handleExportTable"> + <span>{{ tableSelectedRows.length ? "瀵煎嚭" : "瀵煎嚭鍏ㄩ儴" }}</span> + </a-button> + <a-button type="danger" @click="delTable"> + <span>鎵归噺鍒犻櫎</span> + </a-button> + <b + >璇勪环娆℃暟锛�<i>{{ evaCount }}娆�</i></b + > + <sub + >缁熻鏃堕棿娈碉細{{ BegindAndEndTime[0] }}~{{ BegindAndEndTime[1] }}</sub + > + </div> + <span> + <a-space> + <a-select + v-model="evaChoose" + placeholder="鍏ㄩ儴璇勪环" + @change="changeEvaChoose" + mode="multiple" + style="max-width: 140px" + > + <a-select-option + v-for="item in optonList" + :key="item.id" + :value="item.id" + >{{ item.name }}</a-select-option + > + </a-select> + <a-select + v-model="evaFrom" + placeholder="鍏ㄩ儴鏉ユ簮" + @change="changeEvaFrom" + mode="multiple" + style="max-width: 160px" + > + <a-select-option value="1"> 绐楀彛璇勪环 </a-select-option> + <a-select-option value="2"> 鑷姪鏈嶅姟缁堢 </a-select-option> + <a-select-option value="3"> 鑳岄潬鑳岃瘎浠� </a-select-option> + <a-select-option value="4"> 寰畼缃� </a-select-option> + <a-select-option value="5"> 濂藉樊璇� </a-select-option> + <a-select-option value="6"> 涓€浣撳寲璇勪环 </a-select-option> + </a-select> - <a-range-picker :allowClear="false" format="YYYY骞碝M鏈圖D鏃�" class="range_picker_style" @change="rangePickerChange" - v-model="BegindAndEndTime"> - </a-range-picker> + <a-range-picker + :allowClear="false" + valueFormat="YYYY-MM-DD" + style="width: 200px" + class="range_picker_style" + v-model="BegindAndEndTime" + > + </a-range-picker> - <a-input v-model="searchName" placeholder="璇疯緭鍏ヨ瘎浠蜂汉濮撳悕鎴栫獥鍙g紪鍙锋悳绱�"> - <a-icon slot="prefix" type="search" /> - </a-input> - <a-button type="primary" @click="togetevalist()">鎼滅储</a-button> - <a-button @click="clearnAllChoose()">閲嶇疆</a-button> - </a-space> - </span> - </div> - <div class="main"> - <a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ - selectedRowKeys: tableSelectedKeys, - onChange: onSelectChange, - }" :scroll="{ y: 590 }" :pagination="tablePagination" @change="pagTableChange" :loading="tableLoading" - :columns="tableHeaders" :dataSource="tableSourceData"> - <template slot="璇勪环浜虹収鐗�" slot-scope="text, record, index"> - <a-avatar v-if="!text || !baseurl" shape="square" :size="40" icon="user" /> - <img v-else :src="baseurl+'/'+text" alt="" srcset="" style="max-width: 100px; max-height: 100px;"> - </template> - <template slot="鎿嶄綔" slot-scope="text, record, index"> - <a-button type="link" style="color:#FF7370;">鍒犻櫎</a-button> - <a-button type="link" @click="openHandlingDetails(record)">璇︽儏</a-button> - </template> - </a-table> - <HandlingDetails ref="HandlingDetails"/> - <a-modal v-model="visible" title="绯荤粺鎻愮ず" @ok="togetEvaDetil()"> - {{content}} - </a-modal> - </div> + <a-input + style="width: 280px" + v-model="searchName" + placeholder="璇疯緭鍏ヨ瘎浠蜂汉濮撳悕鎴栭儴闂ㄥ悕绉版悳绱�" + > + <a-icon slot="prefix" type="search" /> + </a-input> + <a-button type="primary" @click="togetevalist()">鎼滅储</a-button> + <a-button @click="clearnAllChoose()">閲嶇疆</a-button> + </a-space> + </span> </div> + <div class="main"> + <a-table + size="small" + bordered + :row-key="(record) => record.id" + :row-selection="{ + selectedRowKeys: tableSelectedKeys, + onChange: onSelectChange, + }" + :scroll="{ y: 590 }" + :pagination="tablePagination" + @change="pagTableChange" + :loading="tableLoading" + :columns="tableHeaders" + :dataSource="tableSourceData" + > + <template slot="璇勪环浜虹収鐗�" slot-scope="text"> + <a-avatar + v-if="!text || !baseurl" + shape="square" + :size="40" + icon="user" + /> + <img + v-else + :src="baseurl + '/' + text" + alt="" + srcset="" + style="max-width: 100px; max-height: 100px" + /> + </template> + <template slot="鎿嶄綔" slot-scope="text, record"> + <a-button type="link" style="color: #ff7370">鍒犻櫎</a-button> + <a-button type="link" @click="openHandlingDetails(record)" + >璇︽儏</a-button + > + </template> + </a-table> + <HandlingDetails ref="HandlingDetails" /> + <a-modal v-model="visible" title="绯荤粺鎻愮ず" @ok="togetEvaDetil()"> + {{ content }} + </a-modal> + </div> + </div> </template> <script> import table from "@/mixins/table"; +import { export2Excel } from "@/utils/js/exportExcel"; import HandlingDetails from "./components/HandlingDetails.vue"; -import { getOptonList, getEvaList, getEvaData, getEvaDetil, getQueEvaData } from "@/api/dataAdmin"; +import { + getOptonList, + getEvaList, + getEvaData, + getEvaDetil, + getQueEvaData, +} from "@/api/dataAdmin"; export default { - mixins: [table], - name: "departmentEvaluation", - data() { - return { - tableHeaders: [ - { - title: "搴忓彿", - dataIndex: "index", - width: "60px", - key: "index", - align: "center", - customRender: (text, record, index) => `${index + 1}`, - }, - { - title: "閮ㄩ棬鍚嶇О", - align: "center", - dataIndex: "section", - customRender: (text)=>{return text?text:'--'} - }, - { - title: "璇勪环閫夐」", - align: "center", - dataIndex: "option_id", - customRender: (text)=>{return text?text:'--'} - }, - { - title: "璇勪环浜�", - align: "center", - dataIndex: "idcard_Name", - customRender: (text)=>{return text?text:'--'} - }, - { - title: "韬唤璇佸彿", - align: "center", - dataIndex: "idcard_IDCardNo", - customRender: (text)=>{return text?text:'--'} - }, - { - title: "鎵嬫満鍙�", - align: "center", - dataIndex: "phone", - customRender: (text)=>{return text?text:'--'} - }, - { - title: "璇勪环鏃堕棿", - align: "center", - dataIndex: "create_time", - customRender: (text)=>{return text?text:'--'} - }, - { - title: "璇勪环鏉ユ簮", - align: "center", - dataIndex: "pjxt", - customRender: (text, record, index) => { - if(text == 1){ - return '绐楀彛璇勪环' - }else if(text == 2){ - return '鑷姪鏈嶅姟缁堢' - }else if(text == 3){ - return '鑳岄潬鑳岃瘎浠�' - }else if(text == 4){ - return '寰畼缃�' - }else if(text == 5){ - return '濂藉樊璇�' - }else if(text == 6){ - return '涓€浣撳寲璇勪环' - }else{ - return '--' - } - }, - }, - { - title: "璇勪环璁惧", - align: "center", - dataIndex: "source", - customRender: (text, record, index) => { - if(text == 1){ - return '瀹夊崜' - }else if(text == 2){ - return '瀵艰鏈�' - }else if(text == 3){ - return '寰俊' - }else{ - return '--' - } - }, - }, - { - title: "璇勪环浜虹収鐗�", - align: "center", - dataIndex: "picture", - scopedSlots: { - customRender: "璇勪环浜虹収鐗�", - }, - }, - { - title: "鎿嶄綔", - align: "center", - dataIndex: "鎿嶄綔", - scopedSlots: { - customRender: "鎿嶄綔", - }, - }, - ], - BegindAndEndTime: [], - searchName: undefined, - //鍒犻櫎绐楀彛鍒ゆ柇 - visible: false, - tableSourceData:[], - evaCount:0,//璇勪环娆℃暟 - evaChoose:[],//璇勪环閫夐」 - evaFrom:[],// 璇勪环鏉ユ簮 - evaDates:[],// 璇勪环鏃ユ湡 - content:'姝ゆ搷浣滃皢鍒犻櫎璇ヨ瘎浠蜂俊鎭紝鏄惁缁х画锛�', - delId:null,//褰撳墠鍒犻櫎id - baseurl:'', - optonList:[] - }; - }, - components: { - HandlingDetails - }, - mounted() { - this.setMoment(); - // 璁剧疆榛樿鏃堕棿涓轰粖澶� - this.evaDates=[this.$moment(new Date()).format("YYYY-MM-DD"),this.$moment(new Date()).format("YYYY-MM-DD")] - - this.togetevalist() - - getOptonList().then(res=>{ - console.log(res); - if(res.code==1){ - this.optonList = res.data - } - }) - }, - methods: { - - clearnAllChoose(){ - this.evaChoose = [] - this.evaFrom = [] - this.searchName = '' + mixins: [table], + name: "departmentEvaluation", + data() { + return { + tableHeaders: [ + { + title: "搴忓彿", + dataIndex: "index", + width: "60px", + key: "index", + align: "center", + customRender: (text, record, index) => `${index + 1}`, }, - //瀵煎嚭 - toexportTable() { - let tableData = []; - // 鎷兼帴璇勪环閫夐」 - let chooseStr = this.evaChoose.join(',') - // 瑕佸厛鎷兼帴璇勪环鏉ユ簮 - let fromString = this.evaFrom.join(',') - if (this.tableSelectedRows.length == 0) { - getEvaList({ - page:1, - size:-1, - type:'bmpj', - option_id:chooseStr, - pjxt:fromString,//浼�0浠h〃鍏ㄩ儴 - time:this.evaDates, - info:this.searchName - }).then((res)=>{ - const{code,data} = res; - if(code == 1){ - tableData = JSON.parse(JSON.stringify(data.data.data)); - tableData.forEach((item)=>{ - item.pjxt = item.pjxt == 1?'绐楀彛璇勪环':item.pjxt == 2?'鑷姪鏈嶅姟缁堢':item.pjxt == 3?'鑳岄潬鑳岃瘎浠�':item.pjxt == 4?'寰畼缃�':item.pjxt == 5?'濂藉樊璇�':'涓€浣撳寲璇勪环' - item.source = item.source == 1?'瀹夊崜': item.source == 2?'瀵艰鏈�':'寰俊' - }) - let tableColumns = JSON.parse(JSON.stringify(this.tableHeaders)); - let newTableData = tableData.map(item => { - let obj = {}; - for (let key in item) { - obj[key] = item[key]; - } - return obj; - }) - let exprotExcelName = `${this.nowDay} / ${this.nowTime} / ${this.$route['meta']['title'] || '鎶ヨ〃淇℃伅缁熻'}`; - this.exportExcel(tableColumns, newTableData, exprotExcelName); - } - }) - - } else { - tableData = JSON.parse(JSON.stringify(this.tableSelectedRows)); - tableData.forEach((item)=>{ - item.pjxt = item.pjxt == 1?'绐楀彛璇勪环':item.pjxt == 2?'鑷姪鏈嶅姟缁堢':item.pjxt == 3?'鑳岄潬鑳岃瘎浠�':item.pjxt == 4?'寰畼缃�':item.pjxt == 5?'濂藉樊璇�':'涓€浣撳寲璇勪环' - item.source = item.source == 1?'瀹夊崜': item.source == 2?'瀵艰鏈�':'寰俊' - }) - let tableColumns = JSON.parse(JSON.stringify(this.tableHeaders)); - let newTableData = tableData.map(item => { - let obj = {}; - for (let key in item) { - obj[key] = item[key]; - } - return obj; - }) - let exprotExcelName = `${this.nowDay} / ${this.nowTime} / ${this.$route['meta']['title'] || '鎶ヨ〃淇℃伅缁熻'}`; - this.exportExcel(tableColumns, newTableData, exprotExcelName); - } - + { + title: "閮ㄩ棬鍚嶇О", + align: "center", + dataIndex: "section", + customRender: (text) => { + return text ? text : "--"; + }, }, - delTable(){ - // console.log(this.tableSelectedRows); - this.visible = true; - if(!this.tableSelectedRows.length){ - this.content = '涓€鏉¤瘎璁洪兘娌℃湁閫変腑' - }else{ - this.content = '姝ゆ搷浣滃皢鍒犻櫎杩欎簺璇勪环淇℃伅锛屾槸鍚︾户缁紵' - let arr = [] - this.tableSelectedRows.forEach(item => { - arr.push(item.id) - }); - this.delId = arr - } + { + title: "璇勪环閫夐」", + align: "center", + dataIndex: "option_id", + customRender: (text) => { + return text ? text : "--"; + }, }, - togetEvaDetil(){ - getEvaDetil({ - id:this.delId - }).then(res=>{ - { - this.delId=null - this.visible = false; - // 瑕佸埛鏂伴〉闈� - this.togetevalist() - } - }) + { + title: "璇勪环浜�", + align: "center", + dataIndex: "idcard_Name", + customRender: (text) => { + return text ? text : "--"; + }, }, - togetQueEvaData(record){ - getQueEvaData({ - id:record.id - }).then(res=>{ - console.log(res); - const {code,data} = res - if(code==1){ - this.$refs.HandlingDetails.queEvaData = data - } - }) + { + title: "韬唤璇佸彿", + align: "center", + dataIndex: "idcard_IDCardNo", + customRender: (text) => { + return text ? text : "--"; + }, }, - togetEvaData(id){ - getEvaData({ - id:id - }).then(res=>{ - console.log(res); - const {code,data} = res - if(code==1){ - this.$refs.HandlingDetails.queEvaData = data - } - }) + { + title: "鎵嬫満鍙�", + align: "center", + dataIndex: "phone", + customRender: (text) => { + return text ? text : "--"; + }, }, - togetevalist(){ - // 鎷兼帴璇勪环閫夐」 - let chooseStr = this.evaChoose.join(',') - // 瑕佸厛鎷兼帴璇勪环鏉ユ簮 - let fromString = this.evaFrom.join(',') - getEvaList({ - page:this.tablePagination.current, - size:this.tablePagination.pageSize, - type:'bmpj', - option_id:chooseStr, - pjxt:fromString,//浼�0浠h〃鍏ㄩ儴 - time:this.evaDates, - info:this.searchName - }).then((res)=>{ - console.log(11111,res); - const{code,data} = res; - if(code == 1){ - this.tableSourceData = data.data.data - this.evaCount = data.count - this.tablePagination.total = data.count - } - }) + { + title: "璇勪环鏃堕棿", + align: "center", + dataIndex: "create_time", + customRender: (text) => { + return text ? text : "--"; + }, }, - changeEvaFrom(val){ - if(val.length){ - this.evaFrom = val; - }else{ - this.evaFrom = [0] + { + title: "璇勪环鏉ユ簮", + align: "center", + dataIndex: "pjxt", + customRender: (text, record, index) => { + if (text == 1) { + return "绐楀彛璇勪环"; + } else if (text == 2) { + return "鑷姪鏈嶅姟缁堢"; + } else if (text == 3) { + return "鑳岄潬鑳岃瘎浠�"; + } else if (text == 4) { + return "寰畼缃�"; + } else if (text == 5) { + return "濂藉樊璇�"; + } else if (text == 6) { + return "涓€浣撳寲璇勪环"; + } else { + return "--"; } + }, }, - changeEvaChoose(val){ - this.evaChoose = val - }, - rangePickerChange(val) { - this.evaDates = [this.$moment(val[0]).format("YYYY-MM-DD"),this.$moment(val[1]).format("YYYY-MM-DD")] - }, - QueueState(type) { - switch (type) { - case 0: - return "type1"; - case 1: - return "type2"; - - default: - return "type0"; - } + { + title: "璇勪环璁惧", + align: "center", + dataIndex: "pj_name", + customRender: (text) => { + return text ? text : "--"; + }, }, - //璇︽儏妯″潡 - openHandlingDetails(record) { - // 鍒ゆ柇涓虹獥鍙e睆鎴栬€呭叾浠栫姸鍐碉紝璋冪敤涓嶅悓鎺ュ彛 - // if(record.pjxt==1){ - // this.$refs.HandlingDetails.modalInfo.title = "鍔炵悊鏄庣粏"; - // this.$refs.HandlingDetails.modalInfo.show = 1; - // this.togetQueEvaData(record) - // }else{ - this.$refs.HandlingDetails.modalInfo.title = "璇勪环璇︽儏"; - this.$refs.HandlingDetails.modalInfo.show = 2; - this.togetEvaData(record.id) - // } - - this.$refs.HandlingDetails.modalInfo.visible = true; + { + title: "璇勪环浜虹収鐗�", + align: "center", + dataIndex: "picture", + scopedSlots: { + customRender: "璇勪环浜虹収鐗�", + }, }, - //鍒犻櫎妯℃€佹 - showModal(record) { - this.visible = true; - this.delId = record.id + { + title: "鎿嶄綔", + align: "center", + dataIndex: "鎿嶄綔", + scopedSlots: { + customRender: "鎿嶄綔", + }, }, + ], + BegindAndEndTime: [ + this.$moment(new Date()).format("YYYY-MM-DD"), + this.$moment(new Date()).format("YYYY-MM-DD"), + ], + searchName: undefined, + //鍒犻櫎绐楀彛鍒ゆ柇 + visible: false, + tableSourceData: [], + evaCount: 0, //璇勪环娆℃暟 + evaChoose: [], //璇勪环閫夐」 + evaFrom: [], // 璇勪环鏉ユ簮 + evaDates: [], // 璇勪环鏃ユ湡 + content: "姝ゆ搷浣滃皢鍒犻櫎璇ヨ瘎浠蜂俊鎭紝鏄惁缁х画锛�", + delId: null, //褰撳墠鍒犻櫎id + baseurl: "", + optonList: [], + tableSelectedKeys: [], + tableSelectedRows: [], + tHeader: [ + // 瀵煎嚭鐨勮〃澶村悕淇℃伅 + "閮ㄩ棬鍚嶇О", + "璇勪环閫夐」", + "璇勪环浜�", + "韬唤璇佸彿", + "鎵嬫満鍙�", + "璇勪环鏃堕棿", + "璇勪环鏉ユ簮", + "璇勪环璁惧", + ], + filterVal: [ + // 瀵煎嚭鐨勮〃澶村瓧娈靛悕锛岄渶瑕佸鍑鸿〃鏍煎瓧娈靛悕 + "section", + "option_id", + "idcard_Name", + "idcard_IDCardNo", + "phone", + "create_time", + "pjxt", + "pj_name", + ], + }; + }, + components: { + HandlingDetails, + }, + mounted() { + this.setMoment(); + // // 璁剧疆榛樿鏃堕棿涓轰粖澶� + // this.evaDates = [ + // this.$moment(new Date()).format("YYYY-MM-DD"), + // this.$moment(new Date()).format("YYYY-MM-DD"), + // ]; + + this.togetevalist(); + + getOptonList().then((res) => { + console.log(res); + if (res.code == 1) { + this.optonList = res.data; + } + }); + }, + methods: { + clearnAllChoose() { + this.evaChoose = []; + this.evaFrom = []; + this.searchName = ""; + this.tablePagination.current = 1; + this.tableSelectedKeys = []; + this.tableSelectedRows = []; + this.BegindAndEndTime = [ + this.$moment(new Date()).format("YYYY-MM-DD"), + this.$moment(new Date()).format("YYYY-MM-DD"), + ]; + this.togetevalist(); + }, + // 鎼滅储 + handleSearch() { + this.tablePagination.current = 1; + this.tableSelectedKeys = []; + this.tableSelectedRows = []; + this.togetevalist(); }, - watch:{ - tablePagination(){ - this.togetevalist() + delTable() { + // console.log(this.tableSelectedRows); + this.visible = true; + if (!this.tableSelectedRows.length) { + this.content = "涓€鏉¤瘎璁洪兘娌℃湁閫変腑"; + } else { + this.content = "姝ゆ搷浣滃皢鍒犻櫎杩欎簺璇勪环淇℃伅锛屾槸鍚︾户缁紵"; + let arr = []; + this.tableSelectedRows.forEach((item) => { + arr.push(item.id); + }); + this.delId = arr; + } + }, + togetEvaDetil() { + getEvaDetil({ + id: this.delId, + }).then((res) => { + { + this.delId = null; + this.visible = false; + // 瑕佸埛鏂伴〉闈� + this.togetevalist(); } + }); }, - created(){ - this.baseurl = process.env.VUE_APP_API_PHP_URL - } + togetQueEvaData(record) { + getQueEvaData({ + id: record.id, + }).then((res) => { + const { code, data } = res; + if (code == 1) { + this.$refs.HandlingDetails.queEvaData = data; + } + }); + }, + togetEvaData(id) { + getEvaData({ + id: id, + }).then((res) => { + console.log(res); + const { code, data } = res; + if (code == 1) { + this.$refs.HandlingDetails.queEvaData = data; + } + }); + }, + togetevalist() { + // 鎷兼帴璇勪环閫夐」 + let chooseStr = this.evaChoose.join(","); + // 瑕佸厛鎷兼帴璇勪环鏉ユ簮 + let fromString = this.evaFrom.join(","); + getEvaList({ + page: this.tablePagination.current, + size: this.tablePagination.pageSize, + type: "bmpj", + option_id: chooseStr, + pjxt: fromString, //浼�0浠h〃鍏ㄩ儴 + time: this.BegindAndEndTime, + info: this.searchName, + }).then((res) => { + console.log(11111, res); + const { code, data } = res; + if (code == 1) { + this.tableSourceData = data.data.data; + this.evaCount = data.count; + this.tablePagination.total = data.count; + } + }); + }, + changeEvaFrom(val) { + if (val.length) { + this.evaFrom = val; + } else { + this.evaFrom = [0]; + } + }, + changeEvaChoose(val) { + this.evaChoose = val; + }, + + QueueState(type) { + switch (type) { + case 0: + return "type1"; + case 1: + return "type2"; + + default: + return "type0"; + } + }, + //璇︽儏妯″潡 + openHandlingDetails(record) { + // 鍒ゆ柇涓虹獥鍙e睆鎴栬€呭叾浠栫姸鍐碉紝璋冪敤涓嶅悓鎺ュ彛 + // if(record.pjxt==1){ + // this.$refs.HandlingDetails.modalInfo.title = "鍔炵悊鏄庣粏"; + // this.$refs.HandlingDetails.modalInfo.show = 1; + // this.togetQueEvaData(record) + // }else{ + this.$refs.HandlingDetails.modalInfo.title = "璇勪环璇︽儏"; + this.$refs.HandlingDetails.modalInfo.show = 2; + this.togetEvaData(record.id); + // } + + this.$refs.HandlingDetails.modalInfo.visible = true; + }, + //鍒犻櫎妯℃€佹 + showModal(record) { + this.visible = true; + this.delId = record.id; + }, + // 閫夋嫨鏁版嵁 + onSelectChange(keys, rows) { + this.tableSelectedKeys = keys; + const res = new Map(); + this.tableSelectedRows = [...this.tableSelectedRows, ...rows] + .filter((v) => { + return !res.has(v.id) && res.set(v.id, 1); + }) + .filter((v) => { + return this.tableSelectedKeys.some((val) => v.id == val); + }); + }, + // 瀵煎嚭 + async handleExportTable() { + this.btnLoading = true; + let obj = { + 1: "绐楀彛璇勪环", + 2: "鑷姪鏈嶅姟缁堢", + 3: "鑳岄潬鑳岃瘎浠�", + 4: "寰畼缃�", + 5: "濂藉樊璇�", + 6: "涓€浣撳寲璇勪环", + }; + if (this.tableSelectedKeys.length && this.tableSelectedRows.length) { + this.tableSelectedRows.forEach((item) => { + Object.keys(obj).forEach((keys) => { + if (item.pjxt == keys) { + item.pjxt = obj[keys]; + } + }); + }); + export2Excel( + this.tHeader, + this.filterVal, + this.tableSelectedRows, + "鍔炰簨閮ㄩ棬璇勪环璁板綍鎶ヨ〃" + this.$moment().format("YYYYMMDDHHmmss") + ); + } else { + // 鎷兼帴璇勪环閫夐」 + let chooseStr = this.evaChoose.join(","); + // 瑕佸厛鎷兼帴璇勪环鏉ユ簮 + let fromString = this.evaFrom.join(","); + getEvaList({ + page: this.tablePagination.current, + size: -1, + type: "bmpj", + option_id: chooseStr, + pjxt: fromString, //浼�0浠h〃鍏ㄩ儴 + time: this.BegindAndEndTime, + info: this.searchName, + }).then((res) => { + const { code, data } = res; + if (code == 1) { + if (!data.data.data.length) return; + for (let item of data.data.data) { + Object.keys(obj).forEach((key) => { + if (item.pjxt == key) { + item.pjxt = obj[key]; + } + }); + } + export2Excel( + this.tHeader, + this.filterVal, + data.data.data, + "鍔炰簨閮ㄩ棬璇勪环璁板綍鎶ヨ〃" + this.$moment().format("YYYYMMDDHHmmss") + ); + } + }); + } + this.btnLoading = false; + }, + }, + watch: { + tablePagination() { + this.togetevalist(); + }, + }, + created() { + this.baseurl = process.env.VUE_APP_API_PHP_URL; + }, }; </script> <style lang="less" scoped> /deep/.ant-spin-container { - display: block; + display: block; } .header_box { - padding-bottom: 1rem; + padding-bottom: 1rem; + display: flex; + justify-content: space-between; + align-items: center; + + & > div { display: flex; - justify-content: space-between; + justify-content: flex-start; align-items: center; - &>div { - display: flex; - justify-content: flex-start; - align-items: center; - - b { - font-style: normal; - font-weight: unset; - font-size: 16px; - margin-left: 20px; + b { + font-style: normal; + font-weight: unset; + font-size: 16px; + margin-left: 20px; - i { - color: #0595fd; - font-style: normal; - } - } + i { + color: #0595fd; + font-style: normal; + } + } - sub { - font-size: 14px; - font-style: normal; - bottom: unset; - margin-left: 20px; - } + sub { + font-size: 14px; + font-style: normal; + bottom: unset; + margin-left: 20px; } + } } </style> diff --git a/portal-manager-ui/admin/src/views/dataAdmin/components/evaluationRecordReport/matterEvaluation.vue b/portal-manager-ui/admin/src/views/dataAdmin/components/evaluationRecordReport/matterEvaluation.vue index 65fe0917a6bb0c1340a9900adfc95f16681bae5c..21776d93b8390dd1a1493d5890c90b6ff939fada 100644 --- a/portal-manager-ui/admin/src/views/dataAdmin/components/evaluationRecordReport/matterEvaluation.vue +++ b/portal-manager-ui/admin/src/views/dataAdmin/components/evaluationRecordReport/matterEvaluation.vue @@ -1,432 +1,557 @@ <template> - <div class="callRecord-Container"> - <div class="header_box"> - <div> - <a-button type="success" @click="toexportTable"> - <span>{{ tableSelectedRows.length ? "瀵煎嚭" : "瀵煎嚭鍏ㄩ儴" }}</span> - </a-button> - <a-button type="danger" @click="delTable"> - <span>鎵归噺鍒犻櫎</span> - </a-button> - <b>璇勪环娆℃暟锛�<i>{{evaCount}}娆�</i></b> - <sub>缁熻鏃堕棿娈碉細{{evaDates[0]}}~{{evaDates[1]}}</sub> - </div> - <span> - <a-space> - <a-select v-model="evaChoose" placeholder="鍏ㄩ儴璇勪环" @change="changeEvaChoose" mode="multiple" style="max-width:140px"> - <a-select-option v-for="item in optonList" :key="item.id" :value="item.id">{{item.name}}</a-select-option> - </a-select> - <a-select v-model="evaFrom" placeholder="鍏ㄩ儴鏉ユ簮" @change="changeEvaFrom" mode="multiple" style="max-width:160px"> - <a-select-option value="1"> 绐楀彛璇勪环 </a-select-option> - <a-select-option value="2"> 鑷姪鏈嶅姟缁堢 </a-select-option> - <a-select-option value="3"> 鑳岄潬鑳岃瘎浠� </a-select-option> - <a-select-option value="4"> 寰畼缃� </a-select-option> - <a-select-option value="5"> 濂藉樊璇� </a-select-option> - <a-select-option value="6"> 涓€浣撳寲璇勪环 </a-select-option> - </a-select> + <div class="callRecord-Container"> + <div class="header_box"> + <div> + <a-button type="success" @click="handleExportTable"> + <span>{{ tableSelectedRows.length ? "瀵煎嚭" : "瀵煎嚭鍏ㄩ儴" }}</span> + </a-button> + <a-button type="danger" @click="delTable"> + <span>鎵归噺鍒犻櫎</span> + </a-button> + <b + >璇勪环娆℃暟锛�<i>{{ evaCount }}娆�</i></b + > + <sub + >缁熻鏃堕棿娈碉細{{ BegindAndEndTime[0] }}~{{ BegindAndEndTime[1] }}</sub + > + </div> + <span> + <a-space> + <a-select + v-model="evaChoose" + placeholder="鍏ㄩ儴璇勪环" + @change="changeEvaChoose" + mode="multiple" + style="max-width: 140px" + > + <a-select-option + v-for="item in optonList" + :key="item.id" + :value="item.id" + >{{ item.name }}</a-select-option + > + </a-select> + <a-select + v-model="evaFrom" + placeholder="鍏ㄩ儴鏉ユ簮" + @change="changeEvaFrom" + mode="multiple" + style="max-width: 160px" + > + <a-select-option value="1"> 绐楀彛璇勪环 </a-select-option> + <a-select-option value="2"> 鑷姪鏈嶅姟缁堢 </a-select-option> + <a-select-option value="3"> 鑳岄潬鑳岃瘎浠� </a-select-option> + <a-select-option value="4"> 寰畼缃� </a-select-option> + <a-select-option value="5"> 濂藉樊璇� </a-select-option> + <a-select-option value="6"> 涓€浣撳寲璇勪环 </a-select-option> + </a-select> - <a-range-picker :allowClear="false" format="YYYY骞碝M鏈圖D鏃�" class="range_picker_style" @change="rangePickerChange" - v-model="BegindAndEndTime"> - </a-range-picker> + <a-range-picker + :allowClear="false" + valueFormat="YYYY-MM-DD" + style="width: 200px" + class="range_picker_style" + v-model="BegindAndEndTime" + > + </a-range-picker> - <a-input v-model="searchName" placeholder="璇疯緭鍏ヨ瘎浠蜂汉濮撳悕鎴栫獥鍙g紪鍙锋悳绱�"> - <a-icon slot="prefix" type="search" /> - </a-input> - <a-button type="primary" @click="togetevalist()">鎼滅储</a-button> - <a-button @click="clearnAllChoose()">閲嶇疆</a-button> - </a-space> - </span> - </div> - <div class="main"> - <a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ - selectedRowKeys: tableSelectedKeys, - onChange: onSelectChange, - }" :scroll="{ y: 590 }" :pagination="tablePagination" @change="pagTableChange" :loading="tableLoading" - :columns="tableHeaders" :dataSource="tableSourceData"> - <template slot="璇勪环浜虹収鐗�" slot-scope="text, record, index"> - <a-avatar v-if="!text || !baseurl" shape="square" :size="40" icon="user" /> - <img v-else :src="baseurl+'/'+text" alt="" srcset="" style="max-width: 100px; max-height: 100px;"> - </template> - <template slot="鎿嶄綔" slot-scope="text, record, index"> - <a-button type="link" style="color:#FF7370;" @click="showModal(record)">鍒犻櫎</a-button> - <a-button type="link" @click="openHandlingDetails(record)">璇︽儏</a-button> - </template> - </a-table> - <HandlingDetails ref="HandlingDetails" /> - <a-modal v-model="visible" title="绯荤粺鎻愮ず" @ok="togetEvaDetil()"> - {{content}} - </a-modal> - </div> + <a-input + style="width: 280px" + v-model="searchName" + placeholder="璇疯緭鍏ヨ瘎浠蜂汉濮撳悕鎴栨帓鍙风紪鍙锋悳绱�" + > + <a-icon slot="prefix" type="search" /> + </a-input> + <a-button type="primary" @click="togetevalist()">鎼滅储</a-button> + <a-button @click="clearnAllChoose()">閲嶇疆</a-button> + </a-space> + </span> </div> + <div class="main"> + <a-table + size="small" + bordered + :row-key="(record) => record.id" + :row-selection="{ + selectedRowKeys: tableSelectedKeys, + onChange: onSelectChange, + }" + :scroll="{ y: 590 }" + :pagination="tablePagination" + @change="pagTableChange" + :loading="tableLoading" + :columns="tableHeaders" + :dataSource="tableSourceData" + > + <template slot="璇勪环浜虹収鐗�" slot-scope="text"> + <a-avatar + v-if="!text || !baseurl" + shape="square" + :size="40" + icon="user" + /> + <img + v-else + :src="baseurl + '/' + text" + alt="" + srcset="" + style="max-width: 100px; max-height: 100px" + /> + </template> + <template slot="鎿嶄綔" slot-scope="text, record"> + <a-button + type="link" + style="color: #ff7370" + @click="showModal(record)" + >鍒犻櫎</a-button + > + <a-button type="link" @click="openHandlingDetails(record)" + >璇︽儏</a-button + > + </template> + </a-table> + <HandlingDetails ref="HandlingDetails" /> + <a-modal v-model="visible" title="绯荤粺鎻愮ず" @ok="togetEvaDetil()"> + {{ content }} + </a-modal> + </div> + </div> </template> <script> +import { export2Excel } from "@/utils/js/exportExcel"; import table from "@/mixins/table"; import HandlingDetails from "./components/HandlingDetails.vue"; -import { getOptonList, getEvaList, getEvaData, getEvaDetil, getQueEvaData } from "@/api/dataAdmin"; +import { + getOptonList, + getEvaList, + getEvaData, + getEvaDetil, + getQueEvaData, +} from "@/api/dataAdmin"; export default { - mixins: [table], - name: "matterEvaluation", - data() { - return { - tableHeaders: [ - { - title: "搴忓彿", - dataIndex: "index", - width: "60px", - key: "index", - align: "center", - customRender: (text, record, index) => `${index + 1}`, - }, - { - title: "鎺掗槦缂栧彿", - align: "center", - dataIndex: "flounum", - customRender: (text)=>{return text?text:'--'} - }, - { - title: "璇勪环閫夐」", - align: "center", - dataIndex: "option_id", - customRender: (text)=>{return text?text:'--'} - }, - { - title: "璇勪环浜�", - align: "center", - dataIndex: "idcard_Name", - customRender: (text)=>{return text?text:'--'} - }, - { - title: "韬唤璇佸彿", - align: "center", - dataIndex: "idcard_IDCardNo", - customRender: (text)=>{return text?text:'--'} - }, - { - title: "鎵嬫満鍙�", - align: "center", - dataIndex: "phone", - customRender: (text)=>{return text?text:'--'} - }, - { - title: "璇勪环鏃堕棿", - align: "center", - dataIndex: "create_time", - customRender: (text)=>{return text?text:'--'} - }, - { - title: "璇勪环鏉ユ簮", - align: "center", - dataIndex: "pjxt", - customRender: (text, record, index) => { - if(text == 1){ - return '绐楀彛璇勪环' - }else if(text == 2){ - return '鑷姪鏈嶅姟缁堢' - }else if(text == 3){ - return '鑳岄潬鑳岃瘎浠�' - }else if(text == 4){ - return '寰畼缃�' - }else if(text == 5){ - return '濂藉樊璇�' - }else if(text ==6 ){ - return '涓€浣撳寲璇勪环' - }else{ - return '--' - } - }, - }, - { - title: "璇勪环璁惧", - align: "center", - dataIndex: "source", - customRender: (text, record, index) => { - if(text == 1){ - return '瀹夊崜' - }else if(text == 2){ - return '瀵艰鏈�' - }else if(text == 3){ - return '寰俊' - }else{ - return '--' - } - }, - }, - { - title: "璇勪环浜虹収鐗�", - align: "center", - dataIndex: "picture", - scopedSlots: { - customRender: "璇勪环浜虹収鐗�", - }, - }, - { - title: "鎿嶄綔", - align: "center", - dataIndex: "鎿嶄綔", - scopedSlots: { - customRender: "鎿嶄綔", - }, - }, - ], - BegindAndEndTime: [], - searchName: undefined, - //鍒犻櫎绐楀彛鍒ゆ柇 - visible: false, - tableSourceData:[], - evaCount:0,//璇勪环娆℃暟 - evaChoose:[],//璇勪环閫夐」 - evaFrom:[],// 璇勪环鏉ユ簮 - evaDates:[],// 璇勪环鏃ユ湡 - content:'姝ゆ搷浣滃皢鍒犻櫎璇ヨ瘎浠蜂俊鎭紝鏄惁缁х画锛�', - delId:null,//褰撳墠鍒犻櫎id - baseurl:'', - optonList:[] - }; - }, - components: { - HandlingDetails - }, - mounted() { - this.setMoment(); - // 璁剧疆榛樿鏃堕棿涓轰粖澶� - this.evaDates=[this.$moment(new Date()).format("YYYY-MM-DD"),this.$moment(new Date()).format("YYYY-MM-DD")] - - this.togetevalist() - - getOptonList().then(res=>{ - console.log(res); - if(res.code==1){ - this.optonList = res.data - } - }) - }, - methods: { - - clearnAllChoose(){ - this.evaChoose = [] - this.evaFrom = [] - this.searchName = '' + mixins: [table], + name: "matterEvaluation", + data() { + return { + tableHeaders: [ + { + title: "搴忓彿", + dataIndex: "index", + width: "60px", + key: "index", + align: "center", + customRender: (text, record, index) => `${index + 1}`, }, - //瀵煎嚭 - toexportTable() { - let tableData = []; - // 鎷兼帴璇勪环閫夐」 - let chooseStr = this.evaChoose.join(',') - // 瑕佸厛鎷兼帴璇勪环鏉ユ簮 - let fromString = this.evaFrom.join(',') - if (this.tableSelectedRows.length == 0) { - getEvaList({ - page:1, - size:-1, - type:'phpj', - option_id:chooseStr, - pjxt:fromString,//浼�0浠h〃鍏ㄩ儴 - time:this.evaDates, - info:this.searchName - }).then((res)=>{ - const{code,data} = res; - if(code == 1){ - tableData = JSON.parse(JSON.stringify(data.data.data)); - tableData.forEach((item)=>{ - item.pjxt = item.pjxt == 1?'绐楀彛璇勪环':item.pjxt == 2?'鑷姪鏈嶅姟缁堢':item.pjxt == 3?'鑳岄潬鑳岃瘎浠�':item.pjxt == 4?'寰畼缃�':item.pjxt == 5?'濂藉樊璇�':'涓€浣撳寲璇勪环' - item.source = item.source == 1?'瀹夊崜': item.source == 2?'瀵艰鏈�':'寰俊' - }) - let tableColumns = JSON.parse(JSON.stringify(this.tableHeaders)); - let newTableData = tableData.map(item => { - let obj = {}; - for (let key in item) { - obj[key] = item[key]; - } - return obj; - }) - let exprotExcelName = `${this.nowDay} / ${this.nowTime} / ${this.$route['meta']['title'] || '鎶ヨ〃淇℃伅缁熻'}`; - this.exportExcel(tableColumns, newTableData, exprotExcelName); - } - }) - - } else { - tableData = JSON.parse(JSON.stringify(this.tableSelectedRows)); - tableData.forEach((item)=>{ - item.pjxt = item.pjxt == 1?'绐楀彛璇勪环':item.pjxt == 2?'鑷姪鏈嶅姟缁堢':item.pjxt == 3?'鑳岄潬鑳岃瘎浠�':item.pjxt == 4?'寰畼缃�':item.pjxt == 5?'濂藉樊璇�':'涓€浣撳寲璇勪环' - item.source = item.source == 1?'瀹夊崜': item.source == 2?'瀵艰鏈�':'寰俊' - }) - let tableColumns = JSON.parse(JSON.stringify(this.tableHeaders)); - let newTableData = tableData.map(item => { - let obj = {}; - for (let key in item) { - obj[key] = item[key]; - } - return obj; - }) - let exprotExcelName = `${this.nowDay} / ${this.nowTime} / ${this.$route['meta']['title'] || '鎶ヨ〃淇℃伅缁熻'}`; - this.exportExcel(tableColumns, newTableData, exprotExcelName); - } - + { + title: "鎺掗槦缂栧彿", + align: "center", + dataIndex: "flounum", + customRender: (text) => { + return text ? text : "--"; + }, }, - delTable(){ - this.visible = true; - if(!this.tableSelectedRows.length){ - this.content = '涓€鏉¤瘎璁洪兘娌℃湁閫変腑' - }else{ - this.content = '姝ゆ搷浣滃皢鍒犻櫎杩欎簺璇勪环淇℃伅锛屾槸鍚︾户缁紵' - let arr = [] - this.tableSelectedRows.forEach(item => { - arr.push(item.id) - }); - this.delId = arr - } + { + title: "璇勪环閫夐」", + align: "center", + dataIndex: "option_id", + customRender: (text) => { + return text ? text : "--"; + }, }, - togetEvaDetil(){ - getEvaDetil({ - id:this.delId - }).then(res=>{ - { - this.delId=null - this.visible = false; - // 瑕佸埛鏂伴〉闈� - this.togetevalist() - } - }) + { + title: "璇勪环浜�", + align: "center", + dataIndex: "idcard_Name", + customRender: (text) => { + return text ? text : "--"; + }, }, - togetQueEvaData(record){ - getQueEvaData({ - id:record.id - }).then(res=>{ - console.log(res); - const {code,data} = res - if(code==1){ - this.$refs.HandlingDetails.queEvaData = data - } - }) + { + title: "韬唤璇佸彿", + align: "center", + dataIndex: "idcard_IDCardNo", + customRender: (text) => { + return text ? text : "--"; + }, }, - togetEvaData(id){ - getEvaData({ - id:id - }).then(res=>{ - console.log(res); - const {code,data} = res - if(code==1){ - this.$refs.HandlingDetails.queEvaData = data - } - }) + { + title: "鎵嬫満鍙�", + align: "center", + dataIndex: "phone", + customRender: (text) => { + return text ? text : "--"; + }, }, - togetevalist(){ - // 鎷兼帴璇勪环閫夐」 - let chooseStr = this.evaChoose.join(',') - // 瑕佸厛鎷兼帴璇勪环鏉ユ簮 - let fromString = this.evaFrom.join(',') - getEvaList({ - page:this.tablePagination.current, - size:this.tablePagination.pageSize, - type:'phpj', - option_id:chooseStr, - pjxt:fromString,//浼�0浠h〃鍏ㄩ儴 - time:this.evaDates, - info:this.searchName - }).then((res)=>{ - console.log(11111,res); - const{code,data} = res; - if(code == 1){ - this.tableSourceData = data.data.data - this.evaCount = data.count - this.tablePagination.total = data.count - } - }) + { + title: "璇勪环鏃堕棿", + align: "center", + dataIndex: "create_time", + customRender: (text) => { + return text ? text : "--"; + }, }, - changeEvaFrom(val){ - if(val.length){ - this.evaFrom = val; - }else{ - this.evaFrom = [0] + { + title: "璇勪环鏉ユ簮", + align: "center", + dataIndex: "pjxt", + customRender: (text, record, index) => { + if (text == 1) { + return "绐楀彛璇勪环"; + } else if (text == 2) { + return "鑷姪鏈嶅姟缁堢"; + } else if (text == 3) { + return "鑳岄潬鑳岃瘎浠�"; + } else if (text == 4) { + return "寰畼缃�"; + } else if (text == 5) { + return "濂藉樊璇�"; + } else if (text == 6) { + return "涓€浣撳寲璇勪环"; + } else { + return "--"; } + }, }, - changeEvaChoose(val){ - this.evaChoose = val + { + title: "璇勪环璁惧", + align: "center", + dataIndex: "pj_name", + customRender: (text) => { + return text ? text : "--"; + }, }, - rangePickerChange(val) { - this.evaDates = [this.$moment(val[0]).format("YYYY-MM-DD"),this.$moment(val[1]).format("YYYY-MM-DD")] + { + title: "璇勪环浜虹収鐗�", + align: "center", + dataIndex: "picture", + scopedSlots: { + customRender: "璇勪环浜虹収鐗�", + }, }, + { + title: "鎿嶄綔", + align: "center", + dataIndex: "鎿嶄綔", + scopedSlots: { + customRender: "鎿嶄綔", + }, + }, + ], + BegindAndEndTime: [ + this.$moment(new Date()).format("YYYY-MM-DD"), + this.$moment(new Date()).format("YYYY-MM-DD"), + ], + searchName: undefined, + //鍒犻櫎绐楀彛鍒ゆ柇 + visible: false, + tableSourceData: [], + evaCount: 0, //璇勪环娆℃暟 + evaChoose: [], //璇勪环閫夐」 + evaFrom: [], // 璇勪环鏉ユ簮 + evaDates: [], // 璇勪环鏃ユ湡 + content: "姝ゆ搷浣滃皢鍒犻櫎璇ヨ瘎浠蜂俊鎭紝鏄惁缁х画锛�", + delId: null, //褰撳墠鍒犻櫎id + baseurl: "", + optonList: [], + tableSelectedKeys: [], + tableSelectedRows: [], + tHeader: [ + // 瀵煎嚭鐨勮〃澶村悕淇℃伅 + "鎺掗槦缂栧彿", + "璇勪环閫夐」", + "璇勪环浜�", + "韬唤璇佸彿", + "鎵嬫満鍙�", + "璇勪环鏃堕棿", + "璇勪环鏉ユ簮", + "璇勪环璁惧", + ], + filterVal: [ + // 瀵煎嚭鐨勮〃澶村瓧娈靛悕锛岄渶瑕佸鍑鸿〃鏍煎瓧娈靛悕 + "flounum", + "option_id", + "idcard_Name", + "idcard_IDCardNo", + "phone", + "create_time", + "pjxt", + "pj_name", + ], + }; + }, + components: { + HandlingDetails, + }, + mounted() { + this.setMoment(); + // 璁剧疆榛樿鏃堕棿涓轰粖澶� + // this.evaDates = [ + // this.$moment(new Date()).format("YYYY-MM-DD"), + // this.$moment(new Date()).format("YYYY-MM-DD"), + // ]; - QueueState(type) { - switch (type) { - case 0: - return "type1"; - case 1: - return "type2"; + this.togetevalist(); - default: - return "type0"; - } - }, - //璇︽儏妯″潡 - openHandlingDetails(record) { - // 鍒ゆ柇涓虹獥鍙e睆鎴栬€呭叾浠栫姸鍐碉紝璋冪敤涓嶅悓鎺ュ彛 - // if(record.pjxt==1){ - this.$refs.HandlingDetails.modalInfo.title = "鍔炵悊鏄庣粏"; - this.$refs.HandlingDetails.modalInfo.show = 1; - this.togetQueEvaData(record) - // }else{ - // this.$refs.HandlingDetails.modalInfo.title = "璇勪环璇︽儏"; - // this.$refs.HandlingDetails.modalInfo.show = 2; - // this.togetEvaData(record.id) - // } - - this.$refs.HandlingDetails.modalInfo.visible = true; - }, - //鍒犻櫎妯℃€佹 - showModal(record) { - this.visible = true; - this.delId = record.id - }, + getOptonList().then((res) => { + console.log(res); + if (res.code == 1) { + this.optonList = res.data; + } + }); + }, + methods: { + clearnAllChoose() { + this.evaChoose = []; + this.evaFrom = []; + this.searchName = ""; + this.tablePagination.current = 1; + this.tableSelectedKeys = []; + this.tableSelectedRows = []; + this.BegindAndEndTime = [ + this.$moment(new Date()).format("YYYY-MM-DD"), + this.$moment(new Date()).format("YYYY-MM-DD"), + ]; + this.togetevalist(); + }, + + delTable() { + this.visible = true; + if (!this.tableSelectedRows.length) { + this.content = "涓€鏉¤瘎璁洪兘娌℃湁閫変腑"; + } else { + this.content = "姝ゆ搷浣滃皢鍒犻櫎杩欎簺璇勪环淇℃伅锛屾槸鍚︾户缁紵"; + let arr = []; + this.tableSelectedRows.forEach((item) => { + arr.push(item.id); + }); + this.delId = arr; + } }, - watch:{ - tablePagination(){ - this.togetevalist() + togetEvaDetil() { + getEvaDetil({ + id: this.delId, + }).then((res) => { + { + this.delId = null; + this.visible = false; + // 瑕佸埛鏂伴〉闈� + this.togetevalist(); } + }); }, - created(){ - this.baseurl = process.env.VUE_APP_API_PHP_URL - } + togetQueEvaData(record) { + getQueEvaData({ + id: record.id, + }).then((res) => { + console.log(res); + const { code, data } = res; + if (code == 1) { + this.$refs.HandlingDetails.queEvaData = data; + } + }); + }, + togetEvaData(id) { + getEvaData({ + id: id, + }).then((res) => { + console.log(res); + const { code, data } = res; + if (code == 1) { + this.$refs.HandlingDetails.queEvaData = data; + } + }); + }, + togetevalist() { + // 鎷兼帴璇勪环閫夐」 + let chooseStr = this.evaChoose.join(","); + // 瑕佸厛鎷兼帴璇勪环鏉ユ簮 + let fromString = this.evaFrom.join(","); + getEvaList({ + page: this.tablePagination.current, + size: this.tablePagination.pageSize, + type: "phpj", + option_id: chooseStr, + pjxt: fromString, //浼�0浠h〃鍏ㄩ儴 + time: this.evaDates, + info: this.searchName, + }).then((res) => { + const { code, data } = res; + if (code == 1) { + this.tableSourceData = data.data.data; + this.evaCount = data.count; + this.tablePagination.total = data.count; + } + }); + }, + changeEvaFrom(val) { + if (val.length) { + this.evaFrom = val; + } else { + this.evaFrom = [0]; + } + }, + changeEvaChoose(val) { + this.evaChoose = val; + }, + // rangePickerChange(val) { + // this.evaDates = [ + // this.$moment(val[0]).format("YYYY-MM-DD"), + // this.$moment(val[1]).format("YYYY-MM-DD"), + // ]; + // }, + + QueueState(type) { + switch (type) { + case 0: + return "type1"; + case 1: + return "type2"; + + default: + return "type0"; + } + }, + //璇︽儏妯″潡 + openHandlingDetails(record) { + // 鍒ゆ柇涓虹獥鍙e睆鎴栬€呭叾浠栫姸鍐碉紝璋冪敤涓嶅悓鎺ュ彛 + // if(record.pjxt==1){ + this.$refs.HandlingDetails.modalInfo.title = "鍔炵悊鏄庣粏"; + this.$refs.HandlingDetails.modalInfo.show = 1; + this.togetQueEvaData(record); + // }else{ + // this.$refs.HandlingDetails.modalInfo.title = "璇勪环璇︽儏"; + // this.$refs.HandlingDetails.modalInfo.show = 2; + // this.togetEvaData(record.id) + // } + + this.$refs.HandlingDetails.modalInfo.visible = true; + }, + //鍒犻櫎妯℃€佹 + showModal(record) { + this.visible = true; + this.delId = record.id; + }, + // 閫夋嫨鏁版嵁 + onSelectChange(keys, rows) { + this.tableSelectedKeys = keys; + const res = new Map(); + this.tableSelectedRows = [...this.tableSelectedRows, ...rows] + .filter((v) => { + return !res.has(v.id) && res.set(v.id, 1); + }) + .filter((v) => { + return this.tableSelectedKeys.some((val) => v.id == val); + }); + }, + // 瀵煎嚭 + async handleExportTable() { + this.btnLoading = true; + let obj = { + 1: "绐楀彛璇勪环", + 2: "鑷姪鏈嶅姟缁堢", + 3: "鑳岄潬鑳岃瘎浠�", + 4: "寰畼缃�", + 5: "濂藉樊璇�", + 6: "涓€浣撳寲璇勪环", + }; + if (this.tableSelectedKeys.length && this.tableSelectedRows.length) { + this.tableSelectedRows.forEach((item) => { + Object.keys(obj).forEach((keys) => { + if (item.pjxt == keys) { + item.pjxt = obj[keys]; + } + }); + }); + export2Excel( + this.tHeader, + this.filterVal, + this.tableSelectedRows, + "鍔炵悊浜嬮」璇勪环璁板綍鎶ヨ〃" + this.$moment().format("YYYYMMDDHHmmss") + ); + } else { + // 鎷兼帴璇勪环閫夐」 + let chooseStr = this.evaChoose.join(","); + // 瑕佸厛鎷兼帴璇勪环鏉ユ簮 + let fromString = this.evaFrom.join(","); + getEvaList({ + page: this.tablePagination.current, + size: -1, + type: "phpj", + option_id: chooseStr, + pjxt: fromString, //浼�0浠h〃鍏ㄩ儴 + time: this.BegindAndEndTime, + info: this.searchName, + }).then((res) => { + const { code, data } = res; + if (code == 1) { + if (!data.data.data.length) return; + for (let item of data.data.data) { + Object.keys(obj).forEach((key) => { + if (item.pjxt == key) { + item.pjxt = obj[key]; + } + }); + } + export2Excel( + this.tHeader, + this.filterVal, + data.data.data, + "鍔炵悊浜嬮」璇勪环璁板綍鎶ヨ〃" + this.$moment().format("YYYYMMDDHHmmss") + ); + } + }); + } + this.btnLoading = false; + }, + }, + watch: { + tablePagination() { + this.togetevalist(); + }, + }, + created() { + this.baseurl = process.env.VUE_APP_API_PHP_URL; + }, }; </script> <style lang="less" scoped> /deep/.ant-spin-container { - display: block; + display: block; } .header_box { - padding-bottom: 1rem; + padding-bottom: 1rem; + display: flex; + justify-content: space-between; + align-items: center; + + & > div { display: flex; - justify-content: space-between; + justify-content: flex-start; align-items: center; - &>div { - display: flex; - justify-content: flex-start; - align-items: center; - - b { - font-style: normal; - font-weight: unset; - font-size: 16px; - margin-left: 20px; + b { + font-style: normal; + font-weight: unset; + font-size: 16px; + margin-left: 20px; - i { - color: #0595fd; - font-style: normal; - } - } + i { + color: #0595fd; + font-style: normal; + } + } - sub { - font-size: 14px; - font-style: normal; - bottom: unset; - margin-left: 20px; - } + sub { + font-size: 14px; + font-style: normal; + bottom: unset; + margin-left: 20px; } + } } </style> diff --git a/portal-manager-ui/admin/src/views/dataAdmin/components/evaluationRecordReport/windowEvaluation.vue b/portal-manager-ui/admin/src/views/dataAdmin/components/evaluationRecordReport/windowEvaluation.vue index 2dd6e08008ed22a27cf3a3e83230cc6947e86911..93a695576c8892d48a004a2378fa45ac0551a8a9 100644 --- a/portal-manager-ui/admin/src/views/dataAdmin/components/evaluationRecordReport/windowEvaluation.vue +++ b/portal-manager-ui/admin/src/views/dataAdmin/components/evaluationRecordReport/windowEvaluation.vue @@ -1,408 +1,535 @@ <template> - <div class="callRecord-Container"> - <div class="header_box"> - <div> - <a-button type="success" @click="toexportTable"> - <span>{{ tableSelectedRows.length ? "瀵煎嚭" : "瀵煎嚭鍏ㄩ儴" }}</span> - </a-button> - <a-button type="danger" @click="delTable"> - <span>鎵归噺鍒犻櫎</span> - </a-button> - <b>璇勪环娆℃暟锛�<i>{{evaCount}}娆�</i></b> - <sub>缁熻鏃堕棿娈碉細{{evaDates[0]}}~{{evaDates[1]}}</sub> - </div> - <span> - <a-space> - <a-select v-model="evaChoose" placeholder="鍏ㄩ儴璇勪环" @change="changeEvaChoose" mode="multiple" style="max-width:140px"> - <a-select-option v-for="item in optonList" :key="item.id" :value="item.id">{{item.name}}</a-select-option> - </a-select> - <a-select v-model="evaFrom" placeholder="鍏ㄩ儴鏉ユ簮" @change="changeEvaFrom" mode="multiple" style="max-width:160px"> - <a-select-option value="1"> 绐楀彛璇勪环 </a-select-option> - <a-select-option value="2"> 鑷姪鏈嶅姟缁堢 </a-select-option> - <a-select-option value="3"> 鑳岄潬鑳岃瘎浠� </a-select-option> - <a-select-option value="4"> 寰畼缃� </a-select-option> - <a-select-option value="5"> 濂藉樊璇� </a-select-option> - <a-select-option value="6"> 涓€浣撳寲璇勪环 </a-select-option> - </a-select> + <div class="callRecord-Container"> + <div class="header_box"> + <div> + <a-button type="success" @click="handleExportTable"> + <span>{{ tableSelectedRows.length ? "瀵煎嚭" : "瀵煎嚭鍏ㄩ儴" }}</span> + </a-button> + <a-button type="danger" @click="delTable"> + <span>鎵归噺鍒犻櫎</span> + </a-button> + <b + >璇勪环娆℃暟锛�<i>{{ evaCount }}娆�</i></b + > + <sub + >缁熻鏃堕棿娈碉細{{ BegindAndEndTime[0] }}~{{ BegindAndEndTime[1] }}</sub + > + </div> + <span> + <a-space> + <a-select + v-model="evaChoose" + placeholder="鍏ㄩ儴璇勪环" + @change="changeEvaChoose" + mode="multiple" + style="max-width: 140px" + > + <a-select-option + v-for="item in optonList" + :key="item.id" + :value="item.id" + >{{ item.name }}</a-select-option + > + </a-select> + <a-select + v-model="evaFrom" + placeholder="鍏ㄩ儴鏉ユ簮" + @change="changeEvaFrom" + mode="multiple" + style="max-width: 160px" + > + <a-select-option value="1"> 绐楀彛璇勪环 </a-select-option> + <a-select-option value="2"> 鑷姪鏈嶅姟缁堢 </a-select-option> + <a-select-option value="3"> 鑳岄潬鑳岃瘎浠� </a-select-option> + <a-select-option value="4"> 寰畼缃� </a-select-option> + <a-select-option value="5"> 濂藉樊璇� </a-select-option> + <a-select-option value="6"> 涓€浣撳寲璇勪环 </a-select-option> + </a-select> - <a-range-picker :allowClear="false" format="YYYY骞碝M鏈圖D鏃�" class="range_picker_style" @change="rangePickerChange" - v-model="BegindAndEndTime"> - </a-range-picker> + <a-range-picker + style="width: 200px" + :allowClear="false" + valueFormat="YYYY-MM-DD" + class="range_picker_style" + v-model="BegindAndEndTime" + > + </a-range-picker> - <a-input v-model="searchName" placeholder="璇疯緭鍏ヨ瘎浠蜂汉濮撳悕鎴栫獥鍙g紪鍙锋悳绱�"> - <a-icon slot="prefix" type="search" /> - </a-input> - <a-button type="primary" @click="togetevalist()">鎼滅储</a-button> - <a-button @click="clearnAllChoose()">閲嶇疆</a-button> - </a-space> - </span> - </div> - <div class="main"> - <a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ - selectedRowKeys: tableSelectedKeys, - onChange: onSelectChange, - }" :scroll="{ y: 590 }" :pagination="tablePagination" @change="pagTableChange" :loading="tableLoading" - :columns="tableHeaders" :dataSource="tableSourceData"> - <template slot="璇勪环浜虹収鐗�" slot-scope="text, record, index"> - <a-avatar v-if="!text || !baseurl" shape="square" :size="40" icon="user" /> - <img v-else :src="baseurl+'/'+text" alt="" srcset="" style="max-width: 100px; max-height: 100px;"> - </template> - <template slot="鎿嶄綔" slot-scope="text, record, index"> - <a-button type="link" style="color:#FF7370;" @click="showModal(record)">鍒犻櫎</a-button> - <a-button type="link" @click="openHandlingDetails(record)">璇︽儏</a-button> - </template> - </a-table> - <HandlingDetails ref="HandlingDetails" /> - <a-modal v-model="visible" title="绯荤粺鎻愮ず" @ok="togetEvaDetil()"> - {{content}} - </a-modal> - </div> + <a-input + style="width: 280px" + v-model="searchName" + placeholder="璇疯緭鍏ヨ瘎浠蜂汉濮撳悕鎴栫獥鍙g紪鍙锋悳绱�" + > + <a-icon slot="prefix" type="search" /> + </a-input> + <a-button type="primary" @click="handleSearch">鎼滅储</a-button> + <a-button @click="clearnAllChoose">閲嶇疆</a-button> + </a-space> + </span> </div> + <div class="main"> + <a-table + size="small" + bordered + :row-key="(record) => record.id" + :row-selection="{ + selectedRowKeys: tableSelectedKeys, + onChange: onSelectChange, + }" + :scroll="{ y: 590 }" + :pagination="tablePagination" + @change="pagTableChange" + :loading="tableLoading" + :columns="tableHeaders" + :dataSource="tableSourceData" + > + <template slot="璇勪环浜虹収鐗�" slot-scope="text"> + <a-avatar + v-if="!text || !baseurl" + shape="square" + :size="40" + icon="user" + /> + <img + v-else + :src="baseurl + '/' + text" + alt="" + srcset="" + style="max-width: 100px; max-height: 100px" + /> + </template> + <template slot="鎿嶄綔" slot-scope="text, record"> + <a-button + type="link" + style="color: #ff7370" + @click="showModal(record)" + >鍒犻櫎</a-button + > + <a-button type="link" @click="openHandlingDetails(record)" + >璇︽儏</a-button + > + </template> + </a-table> + <HandlingDetails ref="HandlingDetails" /> + <a-modal v-model="visible" title="绯荤粺鎻愮ず" @ok="togetEvaDetil()"> + {{ content }} + </a-modal> + </div> + </div> </template> <script> import table from "@/mixins/table"; +import { export2Excel } from "@/utils/js/exportExcel"; import HandlingDetails from "./components/HandlingDetails.vue"; -import { getOptonList, getEvaList, getEvaData, getEvaDetil, getQueEvaData } from "@/api/dataAdmin"; +import { + getOptonList, + getEvaList, + getEvaData, + getEvaDetil, + getQueEvaData, +} from "@/api/dataAdmin"; export default { - mixins: [table], - name: "windowsEvaluation", - data() { - return { - tableHeaders: [ - { - title: "搴忓彿", - dataIndex: "index", - width: "60px", - key: "index", - align: "center", - customRender: (text, record, index) => `${index + 1}`, - }, - { - title: "绐楀彛缂栧彿", - align: "center", - dataIndex: "window", - customRender: (text)=>{return text?text:'--'} - }, - { - title: "璇勪环閫夐」", - align: "center", - dataIndex: "option_id", - customRender: (text)=>{return text?text:'--'} - }, - { - title: "璇勪环浜�", - align: "center", - dataIndex: "idcard_Name", - customRender: (text)=>{return text?text:'--'} - }, - { - title: "韬唤璇佸彿", - align: "center", - dataIndex: "idcard_IDCardNo", - customRender: (text)=>{return text?text:'--'} - }, - { - title: "鎵嬫満鍙�", - align: "center", - dataIndex: "phone", - customRender: (text)=>{return text?text:'--'} - }, - { - title: "璇勪环鏃堕棿", - align: "center", - dataIndex: "create_time", - customRender: (text)=>{return text?text:'--'} - }, - { - title: "璇勪环鏉ユ簮", - align: "center", - dataIndex: "pjxt", - customRender: (text, record, index) => { - if(text == 1){ - return '绐楀彛璇勪环' - }else if(text == 2){ - return '鑷姪鏈嶅姟缁堢' - }else if(text == 3){ - return '鑳岄潬鑳岃瘎浠�' - }else if(text == 4){ - return '寰畼缃�' - }else if(text == 5){ - return '濂藉樊璇�' - }else if(text == 6){ - return '涓€浣撳寲璇勪环' - }else{ - return '--' - } - }, - }, - { - title: "璇勪环璁惧", - align: "center", - dataIndex: "source", - customRender: (text, record, index) => { - if(text == 1){ - return '瀹夊崜' - }else if(text == 2){ - return '瀵艰鏈�' - }else if(text == 3){ - return '寰俊' - }else{ - return '--' - } - }, - }, - { - title: "璇勪环浜虹収鐗�", - align: "center", - dataIndex: "picture", - scopedSlots: { - customRender: "璇勪环浜虹収鐗�", - }, - }, - { - title: "鎿嶄綔", - align: "center", - dataIndex: "鎿嶄綔", - scopedSlots: { - customRender: "鎿嶄綔", - }, - }, - ], - BegindAndEndTime: [], - searchName: undefined,// 鎼滅储鍐呭 - //鍒犻櫎绐楀彛鍒ゆ柇 - visible: false, - tableSourceData:[], - evaCount:0,//璇勪环娆℃暟 - evaChoose:[],//璇勪环閫夐」 - evaFrom:[],// 璇勪环鏉ユ簮 - evaDates:[],// 璇勪环鏃ユ湡 - content:'姝ゆ搷浣滃皢鍒犻櫎璇ヨ瘎浠蜂俊鎭紝鏄惁缁х画锛�', - delId:null,//褰撳墠鍒犻櫎id - baseurl:'', - optonList:[] - }; - }, - components: { - HandlingDetails - }, - mounted() { - this.setMoment(); - // 璁剧疆榛樿鏃堕棿涓轰粖澶� - this.evaDates=[this.$moment(new Date()).format("YYYY-MM-DD"),this.$moment(new Date()).format("YYYY-MM-DD")] - - this.togetevalist() - - getOptonList().then(res=>{ - if(res.code==1){ - this.optonList = res.data - } - }) - }, - methods: { - clearnAllChoose(){ - this.evaChoose = [] - this.evaFrom = [] - this.searchName = '' + mixins: [table], + name: "windowsEvaluation", + data() { + return { + tableHeaders: [ + { + title: "搴忓彿", + dataIndex: "index", + width: "60px", + key: "index", + align: "center", + customRender: (text, record, index) => `${index + 1}`, }, - //瀵煎嚭 - toexportTable() { - let tableData = []; - // 鎷兼帴璇勪环閫夐」 - let chooseStr = this.evaChoose.join(',') - // 瑕佸厛鎷兼帴璇勪环鏉ユ簮 - let fromString = this.evaFrom.join(',') - if (this.tableSelectedRows.length == 0) { - getEvaList({ - page:1, - size:-1, - type:'ckpj', - option_id:chooseStr, - pjxt:fromString,//浼�0浠h〃鍏ㄩ儴 - time:this.evaDates, - info:this.searchName - }).then((res)=>{ - const{code,data} = res; - if(code == 1){ - tableData = JSON.parse(JSON.stringify(data.data.data)); - tableData.forEach((item)=>{ - item.pjxt = item.pjxt == 1?'绐楀彛璇勪环':item.pjxt == 2?'鑷姪鏈嶅姟缁堢':item.pjxt == 3?'鑳岄潬鑳岃瘎浠�':item.pjxt == 4?'寰畼缃�':item.pjxt == 5?'濂藉樊璇�':'涓€浣撳寲璇勪环' - item.source = item.source == 1?'瀹夊崜': item.source == 2?'瀵艰鏈�':'寰俊' - }) - let tableColumns = JSON.parse(JSON.stringify(this.tableHeaders)); - let newTableData = tableData.map(item => { - let obj = {}; - for (let key in item) { - obj[key] = item[key]; - } - return obj; - }) - let exprotExcelName = `${this.nowDay} / ${this.nowTime} / ${this.$route['meta']['title'] || '鎶ヨ〃淇℃伅缁熻'}`; - this.exportExcel(tableColumns, newTableData, exprotExcelName); - } - }) - - } else { - tableData = JSON.parse(JSON.stringify(this.tableSelectedRows)); - tableData.forEach((item)=>{ - item.pjxt = item.pjxt == 1?'绐楀彛璇勪环':item.pjxt == 2?'鑷姪鏈嶅姟缁堢':item.pjxt == 3?'鑳岄潬鑳岃瘎浠�':item.pjxt == 4?'寰畼缃�':item.pjxt == 5?'濂藉樊璇�':'涓€浣撳寲璇勪环' - item.source = item.source == 1?'瀹夊崜': item.source == 2?'瀵艰鏈�':'寰俊' - }) - let tableColumns = JSON.parse(JSON.stringify(this.tableHeaders)); - let newTableData = tableData.map(item => { - let obj = {}; - for (let key in item) { - obj[key] = item[key]; - } - return obj; - }) - let exprotExcelName = `${this.nowDay} / ${this.nowTime} / ${this.$route['meta']['title'] || '鎶ヨ〃淇℃伅缁熻'}`; - this.exportExcel(tableColumns, newTableData, exprotExcelName); - } - + { + title: "绐楀彛缂栧彿", + align: "center", + dataIndex: "window", + customRender: (text) => { + return text ? text : "--"; + }, }, - delTable(){ - this.visible = true; - if(!this.tableSelectedRows.length){ - this.content = '涓€鏉¤瘎璁洪兘娌℃湁閫変腑' - }else{ - this.content = '姝ゆ搷浣滃皢鍒犻櫎杩欎簺璇勪环淇℃伅锛屾槸鍚︾户缁紵' - let arr = [] - this.tableSelectedRows.forEach(item => { - arr.push(item.id) - }); - this.delId = arr - } + { + title: "璇勪环閫夐」", + align: "center", + dataIndex: "option_id", + customRender: (text) => { + return text ? text : "--"; + }, }, - togetEvaDetil(){ - getEvaDetil({ - id:this.delId - }).then(res=>{ - { - this.delId=null - this.visible = false; - // 瑕佸埛鏂伴〉闈� - this.togetevalist() - } - }) + { + title: "璇勪环浜�", + align: "center", + dataIndex: "idcard_Name", + customRender: (text) => { + return text ? text : "--"; + }, }, - togetQueEvaData(record){ - getQueEvaData({ - id:record.id - }).then(res=>{ - const {code,data} = res - if(code==1){ - this.$refs.HandlingDetails.queEvaData = data - } - }) + { + title: "韬唤璇佸彿", + align: "center", + dataIndex: "idcard_IDCardNo", + customRender: (text) => { + return text ? text : "--"; + }, }, - togetEvaData(id){ - getEvaData({ - id:id - }).then(res=>{ - const {code,data} = res - if(code==1){ - this.$refs.HandlingDetails.queEvaData = data - } - }) + { + title: "鎵嬫満鍙�", + align: "center", + dataIndex: "phone", + customRender: (text) => { + return text ? text : "--"; + }, }, - togetevalist(){ - // 鎷兼帴璇勪环閫夐」 - let chooseStr = this.evaChoose.join(',') - // 瑕佸厛鎷兼帴璇勪环鏉ユ簮 - let fromString = this.evaFrom.join(',') - getEvaList({ - page:this.tablePagination.current, - size:this.tablePagination.pageSize, - type:'ckpj', - option_id:chooseStr, - pjxt:fromString,//浼�0浠h〃鍏ㄩ儴 - time:this.evaDates, - info:this.searchName - }).then((res)=>{ - const{code,data} = res; - if(code == 1){ - this.tableSourceData = data.data.data - this.evaCount = data.count - this.tablePagination.total = data.count - } - }) + { + title: "璇勪环鏃堕棿", + align: "center", + dataIndex: "create_time", + customRender: (text) => { + return text ? text : "--"; + }, }, - changeEvaFrom(val){ - if(val.length){ - this.evaFrom = val; - }else{ - this.evaFrom = [0] + { + title: "璇勪环鏉ユ簮", + align: "center", + dataIndex: "pjxt", + customRender: (text, record, index) => { + if (text == 1) { + return "绐楀彛璇勪环"; + } else if (text == 2) { + return "鑷姪鏈嶅姟缁堢"; + } else if (text == 3) { + return "鑳岄潬鑳岃瘎浠�"; + } else if (text == 4) { + return "寰畼缃�"; + } else if (text == 5) { + return "濂藉樊璇�"; + } else if (text == 6) { + return "涓€浣撳寲璇勪环"; + } else { + return "--"; } + }, + }, + { + title: "璇勪环璁惧", + align: "center", + dataIndex: "pj_name", + customRender: (text) => { + return text ? text : "--"; + }, }, - changeEvaChoose(val){ - this.evaChoose = val + { + title: "璇勪环浜虹収鐗�", + align: "center", + dataIndex: "picture", + scopedSlots: { + customRender: "璇勪环浜虹収鐗�", + }, }, - rangePickerChange(val) { - this.evaDates = [this.$moment(val[0]).format("YYYY-MM-DD"),this.$moment(val[1]).format("YYYY-MM-DD")] + { + title: "鎿嶄綔", + align: "center", + dataIndex: "鎿嶄綔", + scopedSlots: { + customRender: "鎿嶄綔", + }, }, + ], + BegindAndEndTime: [ + this.$moment(new Date()).format("YYYY-MM-DD"), + this.$moment(new Date()).format("YYYY-MM-DD"), + ], + searchName: undefined, // 鎼滅储鍐呭 + //鍒犻櫎绐楀彛鍒ゆ柇 + visible: false, + tableSourceData: [], + evaCount: 0, //璇勪环娆℃暟 + evaChoose: [], //璇勪环閫夐」 + evaFrom: [], // 璇勪环鏉ユ簮 + evaDates: [], // 璇勪环鏃ユ湡 + content: "姝ゆ搷浣滃皢鍒犻櫎璇ヨ瘎浠蜂俊鎭紝鏄惁缁х画锛�", + delId: null, //褰撳墠鍒犻櫎id + baseurl: "", + optonList: [], + tableSelectedKeys: [], + tableSelectedRows: [], + tHeader: [ + // 瀵煎嚭鐨勮〃澶村悕淇℃伅 + "绐楀彛缂栧彿", + "璇勪环閫夐」", + "璇勪环浜�", + "韬唤璇佸彿", + "鎵嬫満鍙�", + "璇勪环鏃堕棿", + "璇勪环鏉ユ簮", + "璇勪环璁惧", + ], + filterVal: [ + // 瀵煎嚭鐨勮〃澶村瓧娈靛悕锛岄渶瑕佸鍑鸿〃鏍煎瓧娈靛悕 + "window", + "option_id", + "idcard_Name", + "idcard_IDCardNo", + "phone", + "create_time", + "pjxt", + "pj_name", + ], + }; + }, + components: { + HandlingDetails, + }, + mounted() { + this.setMoment(); + // 璁剧疆榛樿鏃堕棿涓轰粖澶� + // this.evaDates = [ + // this.$moment(new Date()).format("YYYY-MM-DD"), + // this.$moment(new Date()).format("YYYY-MM-DD"), + // ]; + + this.togetevalist(); + + getOptonList().then((res) => { + if (res.code == 1) { + this.optonList = res.data; + } + }); + }, + methods: { + clearnAllChoose() { + this.evaChoose = []; + this.evaFrom = []; + this.searchName = ""; + this.tablePagination.current = 1; + this.tableSelectedKeys = []; + this.tableSelectedRows = []; + this.BegindAndEndTime = [ + this.$moment(new Date()).format("YYYY-MM-DD"), + this.$moment(new Date()).format("YYYY-MM-DD"), + ]; + this.togetevalist(); + }, + // 鎼滅储 + handleSearch() { + this.tablePagination.current = 1; + this.tableSelectedKeys = []; + this.tableSelectedRows = []; + this.togetevalist(); + }, + delTable() { + this.visible = true; + if (!this.tableSelectedRows.length) { + this.content = "涓€鏉¤瘎璁洪兘娌℃湁閫変腑"; + } else { + this.content = "姝ゆ搷浣滃皢鍒犻櫎杩欎簺璇勪环淇℃伅锛屾槸鍚︾户缁紵"; + let arr = []; + this.tableSelectedRows.forEach((item) => { + arr.push(item.id); + }); + this.delId = arr; + } + }, + togetEvaDetil() { + getEvaDetil({ + id: this.delId, + }).then((res) => { + { + this.delId = null; + this.visible = false; + // 瑕佸埛鏂伴〉闈� + this.togetevalist(); + } + }); + }, + togetQueEvaData(record) { + getQueEvaData({ + id: record.id, + }).then((res) => { + const { code, data } = res; + if (code == 1) { + this.$refs.HandlingDetails.queEvaData = data; + } + }); + }, + togetEvaData(id) { + getEvaData({ + id: id, + }).then((res) => { + const { code, data } = res; + if (code == 1) { + this.$refs.HandlingDetails.queEvaData = data; + } + }); + }, + togetevalist() { + // 鎷兼帴璇勪环閫夐」 + let chooseStr = this.evaChoose.join(","); + // 瑕佸厛鎷兼帴璇勪环鏉ユ簮 + let fromString = this.evaFrom.join(","); + getEvaList({ + page: this.tablePagination.current, + size: this.tablePagination.pageSize, + type: "ckpj", + option_id: chooseStr, + pjxt: fromString, //浼�0浠h〃鍏ㄩ儴 + time: this.BegindAndEndTime, + info: this.searchName, + }).then((res) => { + const { code, data } = res; + if (code == 1) { + this.tableSourceData = data.data.data; + this.evaCount = data.count; + this.tablePagination.total = data.count; + } + }); + }, + changeEvaFrom(val) { + if (val.length) { + this.evaFrom = val; + } else { + this.evaFrom = [0]; + } + }, + changeEvaChoose(val) { + this.evaChoose = val; + }, + + QueueState(type) { + switch (type) { + case 0: + return "type1"; + case 1: + return "type2"; - QueueState(type) { - switch (type) { - case 0: - return "type1"; - case 1: - return "type2"; + default: + return "type0"; + } + }, + //璇︽儏妯″潡 + openHandlingDetails(record) { + // 鍒ゆ柇涓虹獥鍙e睆鎴栬€呭叾浠栫姸鍐碉紝璋冪敤涓嶅悓鎺ュ彛 + if (record.pjxt == 1) { + this.$refs.HandlingDetails.modalInfo.title = "鍔炵悊鏄庣粏"; + this.$refs.HandlingDetails.modalInfo.show = 1; + this.togetQueEvaData(record); + } else { + this.$refs.HandlingDetails.modalInfo.title = "璇勪环璇︽儏"; + this.$refs.HandlingDetails.modalInfo.show = 2; + this.togetEvaData(record.id); + } - default: - return "type0"; + this.$refs.HandlingDetails.modalInfo.visible = true; + }, + //鍒犻櫎妯℃€佹 + showModal(record) { + this.visible = true; + this.delId = record.id; + }, + // 閫夋嫨鏁版嵁 + onSelectChange(keys, rows) { + this.tableSelectedKeys = keys; + const res = new Map(); + this.tableSelectedRows = [...this.tableSelectedRows, ...rows] + .filter((v) => { + return !res.has(v.id) && res.set(v.id, 1); + }) + .filter((v) => { + return this.tableSelectedKeys.some((val) => v.id == val); + }); + }, + // 瀵煎嚭 + async handleExportTable() { + this.btnLoading = true; + let obj = { + 1: "绐楀彛璇勪环", + 2: "鑷姪鏈嶅姟缁堢", + 3: "鑳岄潬鑳岃瘎浠�", + 4: "寰畼缃�", + 5: "濂藉樊璇�", + 6: "涓€浣撳寲璇勪环", + }; + if (this.tableSelectedKeys.length && this.tableSelectedRows.length) { + this.tableSelectedRows.forEach((item) => { + Object.keys(obj).forEach((keys) => { + if (item.pjxt == keys) { + item.pjxt = obj[keys]; } - }, - //璇︽儏妯″潡 - openHandlingDetails(record) { - // 鍒ゆ柇涓虹獥鍙e睆鎴栬€呭叾浠栫姸鍐碉紝璋冪敤涓嶅悓鎺ュ彛 - if(record.pjxt==1){ - this.$refs.HandlingDetails.modalInfo.title = "鍔炵悊鏄庣粏"; - this.$refs.HandlingDetails.modalInfo.show = 1; - this.togetQueEvaData(record) - }else{ - this.$refs.HandlingDetails.modalInfo.title = "璇勪环璇︽儏"; - this.$refs.HandlingDetails.modalInfo.show = 2; - this.togetEvaData(record.id) + }); + }); + export2Excel( + this.tHeader, + this.filterVal, + this.tableSelectedRows, + "绐楀彛鏈嶅姟璇勪环璁板綍鎶ヨ〃" + this.$moment().format("YYYYMMDDHHmmss") + ); + } else { + // 鎷兼帴璇勪环閫夐」 + let chooseStr = this.evaChoose.join(","); + // 瑕佸厛鎷兼帴璇勪环鏉ユ簮 + let fromString = this.evaFrom.join(","); + getEvaList({ + page: this.tablePagination.current, + size: -1, + type: "ckpj", + option_id: chooseStr, + pjxt: fromString, //浼�0浠h〃鍏ㄩ儴 + time: this.BegindAndEndTime, + info: this.searchName, + }).then((res) => { + const { code, data } = res; + if (code == 1) { + if (!data.data.data.length) return; + for (let item of data.data.data) { + Object.keys(obj).forEach((key) => { + if (item.pjxt == key) { + item.pjxt = obj[key]; + } + }); } - - this.$refs.HandlingDetails.modalInfo.visible = true; - }, - //鍒犻櫎妯℃€佹 - showModal(record) { - this.visible = true; - this.delId = record.id - }, + export2Excel( + this.tHeader, + this.filterVal, + data.data.data, + "绐楀彛鏈嶅姟璇勪环璁板綍鎶ヨ〃" + this.$moment().format("YYYYMMDDHHmmss") + ); + } + }); + } + this.btnLoading = false; }, - watch:{ - tablePagination(){ - this.togetevalist() - } + }, + watch: { + tablePagination() { + this.togetevalist(); }, - created(){ - this.baseurl = process.env.VUE_APP_API_PHP_URL - } + }, + created() { + this.baseurl = process.env.VUE_APP_API_PHP_URL; + }, }; </script> <style lang="less" scoped> /deep/.ant-spin-container { - display: block; + display: block; } .header_box { - padding-bottom: 1rem; + padding-bottom: 1rem; + display: flex; + justify-content: space-between; + align-items: center; + + & > div { display: flex; - justify-content: space-between; + justify-content: flex-start; align-items: center; - - &>div { - display: flex; - justify-content: flex-start; - align-items: center; - } + } } </style> diff --git a/portal-manager-ui/admin/src/views/dataAdmin/components/queueCall/queueRecord.vue b/portal-manager-ui/admin/src/views/dataAdmin/components/queueCall/queueRecord.vue index 6bcaabe3ffb40ed2da626b24a8d1e5df1068dc71..5454e2b36859ebf9dec03fc24d174d2e54832152 100644 --- a/portal-manager-ui/admin/src/views/dataAdmin/components/queueCall/queueRecord.vue +++ b/portal-manager-ui/admin/src/views/dataAdmin/components/queueCall/queueRecord.vue @@ -2,17 +2,27 @@ <div class="queueRecord-Container"> <div class="header_box"> <div> - <a-button :loading="btnLoading" type="success" @click="handleExportTable"> + <a-button + :loading="btnLoading" + type="success" + @click="handleExportTable" + > <span>{{ tableSelectedRows.length ? "瀵煎嚭" : "瀵煎嚭鍏ㄩ儴" }}</span> </a-button> - <b>鍙栧彿娆℃暟锛�<i>{{ tablePagination.total }}</i> 娆�</b> + <b + >鍙栧彿娆℃暟锛�<i>{{ tablePagination.total }}</i> 娆�</b + > <sub>缁熻鏃堕棿娈碉細{{ searchForm.time[0] }}~{{ searchForm.time[1] }}</sub> </div> <span> <a-space> <a-select v-model="searchForm.id" style="width: 120px"> <a-select-option value=""> 鍏ㄩ儴璁惧 </a-select-option> - <a-select-option v-for="item in deviceData" :key="item.id" :value="item.id"> + <a-select-option + v-for="item in deviceData" + :key="item.id" + :value="item.id" + > {{ item.name }} </a-select-option> </a-select> @@ -24,7 +34,10 @@ </a-select> <a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time"> </a-range-picker> - <a-input v-model="searchForm.flownum" placeholder="璇疯緭鍏ユ帓闃熺紪鍙锋悳绱�"> + <a-input + v-model="searchForm.flownum" + placeholder="璇疯緭鍏ユ帓闃熺紪鍙锋悳绱�" + > <a-icon slot="prefix" type="search" /> </a-input> <a-button type="primary" @click="handleSearch">鎼滅储</a-button> @@ -33,11 +46,21 @@ </span> </div> <div class="main"> - <a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ - selectedRowKeys: tableSelectedKeys, - onChange: onSelectChange, - }" :scroll="{ y: 590 }" :pagination="tablePagination" @change="changeTablePage" :loading="tableLoading" - :columns="tableHeaders" :dataSource="tableList"> + <a-table + size="small" + bordered + :row-key="(record) => record.id" + :row-selection="{ + selectedRowKeys: tableSelectedKeys, + onChange: onSelectChange, + }" + :scroll="{ y: 590 }" + :pagination="tablePagination" + @change="changeTablePage" + :loading="tableLoading" + :columns="tableHeaders" + :dataSource="tableList" + > <!-- 搴忓彿 --> <span slot="num" slot-scope="text, record, index">{{ (tablePagination.current - 1) * tablePagination.pageSize + index + 1 @@ -59,7 +82,11 @@ </template> <!-- 鍔炵悊涓氬姟 --> <template slot="business" slot-scope="text"> - <a v-if="text.business" @click="openBusiness(text.business, text.businessid)">{{ text.business }}</a> + <a + v-if="text.business" + @click="openBusiness(text.business, text.businessid)" + >{{ text.business }}</a + > <span v-else>--</span> </template> <!-- 鍔炵悊寮€濮嬫椂闂� --> @@ -70,8 +97,8 @@ <template slot="window_name" slot-scope="text"> {{ text.window_name - ? text.window_name + "-" + text.window_fromnum - : "--" + ? text.window_name + "-" + text.window_fromnum + : "--" }} </template> <!-- 宸ヤ綔浜哄憳 --> @@ -91,11 +118,13 @@ </template> <!-- 鐘舵€� --> <template slot="style" slot-scope="text"> - <span :class="{ - 'stand-line': text.style === 0, - 'on-transact': text.style === 1, - 'on-end': text.style === 4, - }"> + <span + :class="{ + 'stand-line': text.style === 0, + 'on-transact': text.style === 1, + 'on-end': text.style === 4, + }" + > {{ $codeMap.queueState[text.style] }} </span> </template>