From 04ed3f3c720515b03111960a2f35c7a04e3c5f54 Mon Sep 17 00:00:00 2001 From: liqianyouyou Date: Sun, 7 Jan 2024 23:44:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=B4=E9=97=A8=E5=8C=BB=E8=BF=B0=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/medical/inherit.vue | 4 +- src/views/modules/medical/light.vue | 79 +++++++++++++++------------ 2 files changed, 44 insertions(+), 39 deletions(-) diff --git a/src/views/modules/medical/inherit.vue b/src/views/modules/medical/inherit.vue index 7a6cae2..8011ddf 100644 --- a/src/views/modules/medical/inherit.vue +++ b/src/views/modules/medical/inherit.vue @@ -269,9 +269,7 @@ export default { this.addForm.productImages = row.img this.addForm.content = row.content this.addForm.typeId = row.type.toString() - this.$nextTick(()=>{ - this.fileList = [] - }) + this.fileList = [] var img = { name: '', url: row.img diff --git a/src/views/modules/medical/light.vue b/src/views/modules/medical/light.vue index 6eb6d64..723807d 100644 --- a/src/views/modules/medical/light.vue +++ b/src/views/modules/medical/light.vue @@ -2,18 +2,18 @@
- + - - + + + + + 查询 + 新增 - - 查询 - 新增 - - + - + + + + - - + + - - - - - + + - - + + @@ -95,13 +99,13 @@ export default { typeList: [ { dictValue:'吴门之歌', - dictType: 1, + dictType: '1', },{ dictValue:'巴山夜雨', - dictType: 2, + dictType: '2', },{ dictValue:'吴门之徽', - dictType: 3, + dictType: '3', } ], //类型列表 booknameList: [], @@ -140,6 +144,9 @@ export default { this.getDataList() }, methods: { + clearValue(val) { + this.dataForm.dictType = ''; + }, // 获取数据列表 getDataList () { this.dataListLoading = true @@ -211,16 +218,16 @@ export default { // 新增 / 修改 editOrUpdateHandle (row) { this.titlesub = '修改' - this.getbookname() + // this.getbookname() this.editId = row.id - this.addForm.bookId = row.bookId - this.addForm.typeId = row.typeId.toString() - this.addForm.sort = row.sort + this.addForm.name = row.name + this.addForm.type = row.type.toString() + this.addForm.url = row.url this.addOrUpdateVisible = true }, addOrUpdateHandle() { - this.getbookname() + // this.getbookname() this.editId = '' this.titlesub = '新增' this.addOrUpdateVisible = true @@ -230,9 +237,9 @@ export default { this.$refs["addFormRef"].resetFields(); this.addForm = { "id": '',//新增不传 - "bookId": '', - "typeId": '', - "sort": '' + "name": '', + "type": '', + "url": '' } }, // 删除 @@ -243,7 +250,7 @@ export default { type: 'warning' }).then(() => { this.$http({ - url: this.$http.adornUrl(`/book/medicaldes/delBookRelation?id=${id}`), + url: this.$http.adornUrl(`/book/medicaldes/delLight?id=${id}`), method: 'post', }).then(({data}) => { if (data && data.code === 0) { @@ -265,13 +272,13 @@ export default { this.$refs["addFormRef"].validate(valid => { if(valid) { this.$http({ - url: this.$http.adornUrl('/book/medicaldes/saveOrUpdateBookRelation'), + url: this.$http.adornUrl('/book/medicaldes/saveOrUpdateLight'), method: 'post', data: this.$http.adornData({ "id": this.editId, //新增不传 - "bookId": this.addForm.bookId, - "typeId": this.addForm.typeId, - "sort": this.addForm.sort + "name": this.addForm.name, + "type": this.addForm.type, + "url": this.addForm.url }) }).then(({data}) => { if (data && data.code === 0) {