From 536292d3c93a0d3b52ba84fbc52cff7e4c3e285e Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Fri, 7 Feb 2020 16:38:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B2=E9=83=A8=E8=AF=84=E4=BB=B7=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/custom/evaluateofficer.vue | 27 +++++++- .../custom/evaluaterole-add-or-update.vue | 18 ----- .../modules/custom/evaluaterole-switch.vue | 69 +++++++++++++++++++ src/views/modules/custom/evaluaterole.vue | 2 +- 4 files changed, 96 insertions(+), 20 deletions(-) create mode 100644 src/views/modules/custom/evaluaterole-switch.vue diff --git a/src/views/modules/custom/evaluateofficer.vue b/src/views/modules/custom/evaluateofficer.vue index 86e82b0c..4d789557 100644 --- a/src/views/modules/custom/evaluateofficer.vue +++ b/src/views/modules/custom/evaluateofficer.vue @@ -106,7 +106,8 @@ export default { id: '', deptId: '' }, - evaluateofficerAddVisible: false + evaluateofficerAddVisible: false, + upLoadUrl: '' } }, mounted () { @@ -117,6 +118,9 @@ export default { AddOrUpdate, evaluateofficerAdd }, + created: function () { + this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/custom/evaluateofficer/importExcel?token=${Cookies.get('token')}` + }, methods: { showFlagFormat (row, column) { if (row.sex === '0') { @@ -131,6 +135,27 @@ export default { this.$refs.evaluateofficerAdd.dataForm.deptId = deptId this.$refs.evaluateofficerAdd.init() }) + }, + errorExceed (file, fileList) { + this.$message.error('上传失败请重试') + }, + uploadSuccess (response, file, fileList) { + this.getDataList()// 刷新列表 + this.dataListLoading = false + this.$refs.upload.clearFiles() + if (response.data !== null && response.data.length > 0) { + this.faultDataVisible = true + this.errordataList = response.data + return + } + this.$message({ + message: this.$t('prompt.success'), + type: 'success', + duration: 500, + onClose: () => { + this.getDataList() + } + }) } } } diff --git a/src/views/modules/custom/evaluaterole-add-or-update.vue b/src/views/modules/custom/evaluaterole-add-or-update.vue index a9d11b54..7a1f43c2 100644 --- a/src/views/modules/custom/evaluaterole-add-or-update.vue +++ b/src/views/modules/custom/evaluaterole-add-or-update.vue @@ -9,24 +9,6 @@ - - - - - - - - - - - - - - - - - -