From bd402d51967811dd193e51d35318c32a70aec78f Mon Sep 17 00:00:00 2001 From: yaojn Date: Thu, 9 Nov 2023 11:25:02 +0800 Subject: [PATCH] =?UTF-8?q?-=20[=E4=BF=AE=E5=A4=8D]=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=A0=B9=E7=9B=AE=E5=BD=95=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E9=A1=B5=E9=9D=A2=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20-=20[=E4=BF=AE=E5=A4=8D]=E5=8E=BB=E6=8E=89?= =?UTF-8?q?uuid=E7=9A=84props=E5=80=BC=E4=B8=BABoolean=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5=20-=20[=E4=BF=AE=E5=A4=8D]=E8=B0=83?= =?UTF-8?q?=E6=95=B4=5Fthis=E6=8C=87=E5=90=91=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/process/catalog/catalog-manage.vue | 3 -- .../process/catalog/catalog/edit/catalog.vue | 15 ++++---- .../process/catalog/catalog/edit/channel.vue | 38 +++++++++---------- .../process/catalog/catalog/edit/editmixin.js | 12 ++---- 4 files changed, 28 insertions(+), 40 deletions(-) diff --git a/src/views/pages/process/catalog/catalog-manage.vue b/src/views/pages/process/catalog/catalog-manage.vue index ab269a8df..c5ed1f3e1 100644 --- a/src/views/pages/process/catalog/catalog-manage.vue +++ b/src/views/pages/process/catalog/catalog-manage.vue @@ -40,7 +40,6 @@
{ - _this.loading = false; + this.loading = false; if (res.Status == 'OK') { let itemValue = res.Return; itemValue.desc = this.escape2Html(itemValue.desc); @@ -111,13 +110,13 @@ export default { authorityList: itemValue.authorityList, desc: itemValue.desc || '' }; - _this.$emit('updateName', _this.catalogValue.name); + this.$emit('updateName', this.catalogValue.name); } else { - _this.catalogValue = _this.$utils.deepClone(_this.initValue); + this.catalogValue = this.$utils.deepClone(this.initValue); } }).catch(res => { - _this.catalogValue = _this.$utils.deepClone(_this.initValue); - _this.loading = false; + this.catalogValue = this.$utils.deepClone(this.initValue); + this.loading = false; }); }, save() { diff --git a/src/views/pages/process/catalog/catalog/edit/channel.vue b/src/views/pages/process/catalog/catalog/edit/channel.vue index e23a06c5f..f00cbd33c 100644 --- a/src/views/pages/process/catalog/catalog/edit/channel.vue +++ b/src/views/pages/process/catalog/catalog/edit/channel.vue @@ -169,7 +169,6 @@ export default { mixins: [editmixin], props: {}, data() { - let _this = this; return { selectedIcon: '', //选中哪一个图标 defaultPriorityUuid: '', //默认优先级uuid @@ -265,7 +264,7 @@ export default { label: this.$t('term.process.showpriority'), validateList: ['required'], onChange: (val) => { - _this.changePriorty(val); + this.changePriorty(val); } }, { @@ -412,28 +411,27 @@ export default { }); }, getData(hideLoading) { - let _this = this; this.channelForm.forEach(e => { e.width = '75%'; }); let relationObj = this.channelForm.find(d => d.name == 'channelRelationList'); - if (this.uuid == true) { - _this.channelValue = _this.$utils.deepClone(_this.initValue); + if (!this.uuid) { + this.channelValue = this.$utils.deepClone(this.initValue); relationObj.isHidden = true; - _this.changePriorty(_this.channelValue.isNeedPriority); + this.changePriorty(this.channelValue.isNeedPriority); return; } let data = { - uuid: _this.uuid + uuid: this.uuid }; !hideLoading && (this.loading = true); - _this.$api.process.service.getChannelInfo(data).then(res => { - _this.loading = false; + this.$api.process.service.getChannelInfo(data).then(res => { + this.loading = false; if (res.Status == 'OK') { let itemValue = res.Return; - itemValue.desc = _this.escape2Html(itemValue.desc); - _this.channelValue = { + itemValue.desc = this.escape2Html(itemValue.desc); + this.channelValue = { name: itemValue.name || '', processUuid: itemValue.processUuid || '', isActive: itemValue.isActive || 0, @@ -460,11 +458,11 @@ export default { } else { relationObj.isHidden = false; } - _this.changePriorty(_this.channelValue.isNeedPriority); - _this.$emit('updateName', _this.channelValue.name); + this.changePriorty(this.channelValue.isNeedPriority); + this.$emit('updateName', this.channelValue.name); } else { - _this.channelValue = _this.$utils.deepClone(_this.initValue); - _this.loading = false; + this.channelValue = this.$utils.deepClone(this.initValue); + this.loading = false; } }); }, @@ -492,10 +490,9 @@ export default { this.$Message.success(this.$t('message.executesuccess')); }, priority(list) { //优先级选中时改变默认优先级数据 - let _this = this; - _this.channelForm.forEach(c => { + this.channelForm.forEach(c => { if (c.name == 'defaultPriorityUuid') { - _this.$set(c, 'dataList', list && list.length ? list : []); + this.$set(c, 'dataList', list && list.length ? list : []); } }); }, @@ -555,7 +552,6 @@ export default { window.open(HOME + '/process.html#/relations-manage', '_blank'); }, changePriorty(val) { - let _this = this; this.channelForm.forEach(item => { if (item.name == 'priorityUuidList' || item.name == 'defaultPriorityUuid') { if (val) { @@ -567,8 +563,8 @@ export default { }); this.$nextTick(() => { if (!val) { - _this.channelValue.priorityUuidList = []; - _this.channelValue.defaultPriorityUuid = ''; + this.channelValue.priorityUuidList = []; + this.channelValue.defaultPriorityUuid = ''; } }); } diff --git a/src/views/pages/process/catalog/catalog/edit/editmixin.js b/src/views/pages/process/catalog/catalog/edit/editmixin.js index 940933bda..0b8f6b65e 100644 --- a/src/views/pages/process/catalog/catalog/edit/editmixin.js +++ b/src/views/pages/process/catalog/catalog/edit/editmixin.js @@ -1,6 +1,6 @@ export default { props: { - uuid: [Number, String, Boolean] + uuid: [Number, String] }, data() { return { @@ -10,11 +10,8 @@ export default { mounted() { this.getData(); }, - beforeDestroy() { - - }, - methods: { - }, + beforeDestroy() {}, + methods: {}, computed: { //去除转义字符 escape2Html() { @@ -28,6 +25,5 @@ export default { }; } }, - watch: { - } + watch: {} }; -- Gitee