From d8f2b391c57cd6a5f2917f7ea49e28700681d0e5 Mon Sep 17 00:00:00 2001 From: zty Date: Fri, 18 Apr 2025 15:06:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9=E5=AF=8C=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test_client/src/views/youpei/artist.vue | 17 ++++++++----- test_client/src/views/youpei/index.vue | 33 +++++++++++++------------ 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/test_client/src/views/youpei/artist.vue b/test_client/src/views/youpei/artist.vue index d3010f0..bc80ab9 100644 --- a/test_client/src/views/youpei/artist.vue +++ b/test_client/src/views/youpei/artist.vue @@ -70,7 +70,7 @@ - + @@ -132,6 +132,7 @@ export default { dialogVisible: false, dialogType: 'new', dialogType2: 'new', + showEditor: true, dialogVisible2: false, childCompy: {}, userinfo: {}, @@ -180,13 +181,17 @@ export default { }) }, handleEdit(scope) { - this.userinfo = Object.assign({}, scope.row) // copy obj - this.dialogType = 'edit' - this.dialogVisible = true + this.showEditor = false this.$nextTick(() => { - this.$refs['commonForm'].clearValidate() + this.userinfo = JSON.parse(JSON.stringify(scope.row)) + this.showEditor = true + this.dialogVisible = true + + this.$nextTick(() => { + this.$refs.commonForm && this.$refs.commonForm.clearValidate() }) - }, + }) + }, handleDelete(scope) { this.$confirm('确认删数据吗?将丢失数据!', '警告', { confirmButtonText: '确认', diff --git a/test_client/src/views/youpei/index.vue b/test_client/src/views/youpei/index.vue index ffcc7c6..d1337ee 100644 --- a/test_client/src/views/youpei/index.vue +++ b/test_client/src/views/youpei/index.vue @@ -84,9 +84,12 @@ 点击上传 - - - + +
@@ -215,13 +218,6 @@ export default { data() { return { upUrl: upUrl(), - banner: { - id: "", - name: "", - url:"", - sort:0, - path:"" - }, upHeaders: { Authorization: "JWT " + getToken() }, listQuery: Object.assign({}, listQuery), listQuery2: Object.assign({}, listQuery2), @@ -232,11 +228,11 @@ export default { dialogVisible: false, dialogType: 'new', dialogType2: 'new', + showEditor: true, dialogVisible2: false, childCompy: {}, companydata: {}, companyOption: [], - } }, computed: {}, @@ -288,13 +284,18 @@ export default { }) }, handleEdit(scope) { - this.companydata = Object.assign({}, scope.row) // copy obj - this.dialogType = 'edit' - this.dialogVisible = true + this.showEditor = false this.$nextTick(() => { - this.$refs['commonForm'].clearValidate() + this.companydata = JSON.parse(JSON.stringify(scope.row)) + this.showEditor = true + this.dialogVisible = true + + this.$nextTick(() => { + this.$refs.commonForm && this.$refs.commonForm.clearValidate() }) - }, + }) + }, + handleDelete(scope) { this.$confirm('确认删数据吗?将丢失数据!', '警告', { confirmButtonText: '确认',