From f621d751f9126fa4b2e2cdbaf6358e5d1e1ec2c0 Mon Sep 17 00:00:00 2001 From: lingxiao Date: Wed, 16 Oct 2024 17:07:45 +0800 Subject: [PATCH 1/4] adf --- src/views/sysuser/index.vue | 136 +++++++++++++----------------------- 1 file changed, 49 insertions(+), 87 deletions(-) diff --git a/src/views/sysuser/index.vue b/src/views/sysuser/index.vue index ae349c4..bb88010 100644 --- a/src/views/sysuser/index.vue +++ b/src/views/sysuser/index.vue @@ -5,24 +5,12 @@ - + - + 搜索 @@ -31,12 +19,7 @@ - + @@ -44,12 +27,8 @@ @@ -57,41 +36,22 @@ {{ parseTime(scope.row.createtime) }} - + - + - + @@ -107,13 +67,8 @@ - + @@ -127,17 +82,20 @@ + - {{ dict.dictLabel }} + {{ dict.dictLabel + }} + + + + + @@ -153,18 +111,9 @@ - +
将文件拖到此处,或 @@ -188,6 +137,7 @@ import { listUser, getUser, delUser, addUser, updateUser, exportUser, resetUserPwd, changeUserStatus, importTemplate, getUserInit } from '@/api/system/sysuser' import { getToken } from '@/utils/auth' import { getCourts } from '@/api/login' +import { addMedia } from '@/api/questionnaire/subject' import '@riophae/vue-treeselect/dist/vue-treeselect.css' export default { @@ -304,6 +254,17 @@ export default { this.getList() }, methods: { + previewUploadImg(el) { + this.upLoadImg(el.target.files[0]) + }, + upLoadImg(files) { + let uploadData = new FormData(); + uploadData.append('media', files); + addMedia(uploadData).then(res => { + this.msgSuccess('上传成功') + this.form.callingcard = res.data + }) + }, /** 查询用户列表 */ getList() { this.loading = true @@ -342,11 +303,11 @@ export default { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' - }).then(function() { + }).then(function () { return changeUserStatus(row.userid, row.status) }).then(() => { this.msgSuccess(text + '成功') - }).catch(function() { + }).catch(function () { row.status = row.status === '0' ? '1' : '0' }) }, @@ -370,7 +331,8 @@ export default { remark: undefined, postIds: undefined, roleIds: undefined, - role: undefined + role: undefined, + callingcard: undefined } this.resetForm('form') }, @@ -444,10 +406,10 @@ export default { this.msgError(response.msg) } }) - }).catch(() => {}) + }).catch(() => { }) }, /** 提交按钮 */ - submitForm: function() { + submitForm: function () { this.$refs['form'].validate(valid => { if (valid) { this.roleOptions.forEach(item => { @@ -489,12 +451,12 @@ export default { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' - }).then(function() { + }).then(function () { return delUser(userids) }).then(() => { this.getList() this.msgSuccess('删除成功') - }).catch(function() {}) + }).catch(function () { }) }, /** 导出按钮操作 */ handleExport() { @@ -503,11 +465,11 @@ export default { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' - }).then(function() { + }).then(function () { return exportUser(queryParams) }).then(response => { this.download(response.msg) - }).catch(function() {}) + }).catch(function () { }) }, /** 导入按钮操作 */ handleImport() { From b79e79864c8189359687b0c8edfa723240a36273 Mon Sep 17 00:00:00 2001 From: lingxiao Date: Wed, 16 Oct 2024 17:16:34 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=A4=B4=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/sysuser/index.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/sysuser/index.vue b/src/views/sysuser/index.vue index bb88010..5900e20 100644 --- a/src/views/sysuser/index.vue +++ b/src/views/sysuser/index.vue @@ -36,6 +36,7 @@ {{ parseTime(scope.row.createtime) }} + - + + +