From 6d47a2e616d9128577ef4aa526761bec2eb98702 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 19 Feb 2025 18:41:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0lodash=E5=BA=93=20=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E9=98=B2=E6=8A=96=E5=87=BD=E6=95=B0=20=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E5=AF=BC=E5=85=A5=E7=AD=89=E6=93=8D=E4=BD=9C=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/components/pro-tabs/bns-timeline-tabs.vue | 21 +- .../testQuestionsStore/questionDetails.vue | 40 +- src/views/login.vue | 127 +- src/views/pro/admissionRequest/index.vue | 594 ++++---- src/views/pro/apply/consEnterApply.vue | 1208 ++++++++++------- src/views/pro/apply/supervisorEnterApply.vue | 30 +- vue.config.js | 4 +- 8 files changed, 1151 insertions(+), 874 deletions(-) diff --git a/package.json b/package.json index 6136693..5e25681 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "js-beautify": "1.13.0", "js-cookie": "3.0.1", "jsencrypt": "3.0.0-rc.1", + "lodash": "^4.17.21", "nprogress": "0.2.0", "pinyin": "^4.0.0-alpha.2", "qrcode": "^1.5.3", diff --git a/src/components/pro-tabs/bns-timeline-tabs.vue b/src/components/pro-tabs/bns-timeline-tabs.vue index 0cc36a0..fcb486b 100644 --- a/src/components/pro-tabs/bns-timeline-tabs.vue +++ b/src/components/pro-tabs/bns-timeline-tabs.vue @@ -208,19 +208,24 @@ export default { // 根据审核状态以及审核结果添加样式 styleByType() { return (item, index) => { - if (this.items[index].status == '审核通过') return 'highlight' - if (this.items[index].status == '审核驳回') return 'rejectHighlight' - if (item.isActive != 1) return 'normal' - if (item.isActive == 1) return 'currentLight' + // if (this.items[index].status == '审核通过') return 'highlight' + // if (this.items[index].status == '审核驳回') return 'rejectHighlight' + // if (item.isActive != 1) return 'normal' + // if (item.isActive == 1) return 'currentLight' + if (item.auditStatus == 1 || item.auditStatus == 3) return 'highlight' + if (item.auditStatus == 2) return 'rejectHighlight' + if (item.auditStatus == null) return 'normal' + if (item.auditStatus == 4) return 'currentLight' } }, + // 根据审核状态以及审核结果添加符号 iconByType() { return (item, index) => { - if (this.items[index].status == '审核通过') return '√' - if (this.items[index].status == '审核驳回') return 'X' - if (this.items[index].status == '撤回' || (this.items[index].status == '' && item.isActive != 1)) return '' - if (this.items[index].status == '' && item.isActive == 1) return '?' + if (item.auditStatus == 1 || item.auditStatus == 3) return '√' + if (item.auditStatus == 2) return 'X' + if (item.auditStatus == null) return '' + if (item.auditStatus == 4) return '?' } }, }, diff --git a/src/views/educationalTraining/resourceAdministration/testQuestionsStore/questionDetails.vue b/src/views/educationalTraining/resourceAdministration/testQuestionsStore/questionDetails.vue index 5780a2e..39f80b6 100644 --- a/src/views/educationalTraining/resourceAdministration/testQuestionsStore/questionDetails.vue +++ b/src/views/educationalTraining/resourceAdministration/testQuestionsStore/questionDetails.vue @@ -5,7 +5,8 @@ @@ -18,7 +19,8 @@ @@ -207,9 +209,20 @@ -
-
+
-
-
@@ -322,6 +333,7 @@ import { downloadFile, getTemplateLink } from '@/api/tool/select' import { importPersonData, importQuestionData } from '@/api/importData/importData' import XLSX from '@/utils/xlsx.full.min' import { StrUtil } from '@/utils/StrUtil' +import debounce from 'lodash/debounce' export default { components: { NewTestItem }, @@ -357,7 +369,7 @@ export default { ], // 列表数据 tableData: [], - loading:false, + loading: false, // 弹框标题 dialogTitle: '新建题库', // 试题数量 @@ -476,7 +488,8 @@ export default { console.log('下载模板', this.templateLink) downloadFile(this.templateLink, '题目文件.xlsx') }, - importExcel() { + + importExcel: debounce(function () { this.loading = true let data = [] for (let i = 1; i < this.uploadData.length; i++) { @@ -504,7 +517,8 @@ export default { } } }) - }, + }, 500), + beforePersonUpload(file) { const isExcel = /\.(xlsx|xls)$/.test(file.name) if (!isExcel) { @@ -532,7 +546,7 @@ export default { } else { const reader = new FileReader() - reader.onload = (e) => { + reader.onload = e => { this.loading = true if (e.target && e.target.result) { try { @@ -625,7 +639,7 @@ export default { } this.loading = false } - reader.onerror = (error) => { + reader.onerror = error => { this.loading = false console.error('文件读取错误:', error) } @@ -649,7 +663,7 @@ export default { getTemplateLink() { const params = { dictType: 'sys_template_link', - dictValue: '3' + dictValue: '3', } getTemplateLink(params).then(response => { this.templateLink = response.msg diff --git a/src/views/login.vue b/src/views/login.vue index 222d30c..830faf5 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -41,22 +41,22 @@ - 记住密码 - + 记住密码 + 登 录 登 录 中... -
+
立即注册
@@ -69,42 +69,48 @@ + diff --git a/src/views/pro/apply/supervisorEnterApply.vue b/src/views/pro/apply/supervisorEnterApply.vue index c155708..1adcb43 100644 --- a/src/views/pro/apply/supervisorEnterApply.vue +++ b/src/views/pro/apply/supervisorEnterApply.vue @@ -659,7 +659,12 @@ import bnsFileListTabs from '@/components/pro-tabs/bns-file-list-tabs.vue' import { addSupervisoryApply, addSupervisoryPersonApply } from '@/api/pro/supervisory' import { dictTableOption, getTemplateLink, selectFile, downloadFile } from '@/api/tool/select' -import { listSupervisorPersonById, listSupervisor, listSupervisorPerson ,delPersonByIdCardAndPhone } from '@/api/pro/outsourcingPro' +import { + listSupervisorPersonById, + listSupervisor, + listSupervisorPerson, + delPersonByIdCardAndPhone, +} from '@/api/pro/outsourcingPro' import numberUtils from '@/utils/validate' import bnsKkFilePreview from '@/components/pro-tabs/bns-kkFile-preview.vue' @@ -669,6 +674,7 @@ import { importPersonZip, importPersonData } from '@/api/importData/importData' import XLSX from '@/utils/xlsx.full.min' import { StrUtil } from '@/utils/StrUtil' import { approvalHistory } from '@/api/terminalEquipment/deviceInformation' +import debounce from 'lodash/debounce' export default { components: { @@ -1019,11 +1025,11 @@ export default { this.getFileData(this.formData.implementationRulesFiles), ]).then( ([ - enterpriseQualificationFiles, - securityAgreementFiles, - supervisionPlanningFiles, - implementationRulesFiles, - ]) => { + enterpriseQualificationFiles, + securityAgreementFiles, + supervisionPlanningFiles, + implementationRulesFiles, + ]) => { if (!enterpriseQualificationFiles || enterpriseQualificationFiles.length === 0) { reqData.append('enterpriseQualificationFiles', new Blob()) } else { @@ -1233,10 +1239,10 @@ export default { }).then(() => { const params = { supUuid: row.supUuid, - proId: row.proId + proId: row.proId, } delPersonByIdCardAndPhone(params).then(response => { - if (response.code === 200){ + if (response.code === 200) { this.$modal.msgSuccess('删除成功') this.getSupervisorPersonList() } @@ -1300,7 +1306,7 @@ export default { downloadTemplate() { downloadFile(this.templateLink, '监理人员模板.zip') }, - importExcel() { + importExcel: debounce(function () { this.loading = true let data = [] for (let i = 1; i < this.excelData.length; i++) { @@ -1331,7 +1337,7 @@ export default { } } }) - }, + }, 500), beforePersonUpload(file) { const isExcel = /\.(xlsx|xls)$/.test(file.name) if (!isExcel) { @@ -1485,7 +1491,7 @@ export default { this.formFile.fileList.splice(this.formFile.fileList.indexOf(file), 1) this.$emit('input', this.listToString(this.formFile.fileList)) }, - submitFileForm() { + submitFileForm: debounce(function () { this.$refs['form'].validate(valid => { if (valid) { if (!this.formFile.fileList[0].name.toLowerCase().endsWith('.zip')) { @@ -1536,7 +1542,7 @@ export default { return false } }) - }, + }, 500), }, } diff --git a/vue.config.js b/vue.config.js index 3caa1b5..6d5e584 100644 --- a/vue.config.js +++ b/vue.config.js @@ -38,10 +38,10 @@ module.exports = { // target: `http://localhost:18080`, // target: 'http://192.168.0.176:18080', // target: 'http://192.168.0.58:19090', // 杰 - target: 'http://192.168.0.14:1999/nxdt-api', // 测试环境 + // target: 'http://192.168.0.14:1999/nxdt-api', // 测试环境 // target: 'http://218.21.27.6:1999/prod-api', // 生产环境 // target: 'http://192.168.0.38:18080', // 郝志权 - // target: 'http://192.168.2.125:18080', // 梁超 + target: 'http://192.168.2.125:18080', // 梁超 changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: '',