From 113301fbbc02f27347a49474d885469c458ac336 Mon Sep 17 00:00:00 2001 From: yaojn Date: Fri, 26 Sep 2025 11:49:14 +0800 Subject: [PATCH 01/13] =?UTF-8?q?-=20[=E4=BF=AE=E5=A4=8D]=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E7=AE=A1=E7=90=86-=E7=9B=AE=E5=BD=95=E4=B8=8B?= =?UTF-8?q?=E7=9A=84=E8=8F=9C=E5=8D=95=E6=97=A0=E6=B3=95=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E8=87=B3=E7=A9=BA=E7=9B=AE=E5=BD=95=20=20=20-=20[=E5=85=B3?= =?UTF-8?q?=E8=81=94]#[1516720919904256]=E8=8F=9C=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86-=E7=9B=AE=E5=BD=95=E4=B8=8B=E7=9A=84=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=97=A0=E6=B3=95=E7=A7=BB=E5=8A=A8=E8=87=B3=E7=A9=BA?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=20http://192.168.0.96:8090/demo/rdm.html#/bu?= =?UTF-8?q?g-detail/939050947543040/939050947543057/1516720919904256?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/pages/framework/extramenu/menu-treeview.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/pages/framework/extramenu/menu-treeview.vue b/src/views/pages/framework/extramenu/menu-treeview.vue index 8e486267..15dc4e0d 100644 --- a/src/views/pages/framework/extramenu/menu-treeview.vue +++ b/src/views/pages/framework/extramenu/menu-treeview.vue @@ -196,7 +196,7 @@ export default { return true; } else if (source.type === 1 && target && source.parentId != target.parentId) { // 链接拖到空白处,最顶层 - this.newParentId = target.parentId; + this.newParentId = 0; return true; } else if (!target) { const parentNode = this.childrenList.find(d => d.id == targetParentId); -- Gitee From ac5b22e0bf50b7845bad5d1dcbe5a77be723d031 Mon Sep 17 00:00:00 2001 From: yaojn Date: Mon, 29 Sep 2025 15:16:07 +0800 Subject: [PATCH 02/13] =?UTF-8?q?-=20[=E4=BF=AE=E5=A4=8D]=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E7=AE=A1=E7=90=86-=E7=9B=AE=E5=BD=95=E4=B8=8B?= =?UTF-8?q?=E7=9A=84=E8=8F=9C=E5=8D=95=E6=97=A0=E6=B3=95=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E8=87=B3=E7=A9=BA=E7=9B=AE=E5=BD=95=20=20=20-=20[=E5=85=B3?= =?UTF-8?q?=E8=81=94]#[1516720919904256]=E8=8F=9C=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86-=E7=9B=AE=E5=BD=95=E4=B8=8B=E7=9A=84=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=97=A0=E6=B3=95=E7=A7=BB=E5=8A=A8=E8=87=B3=E7=A9=BA?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=20http://192.168.0.96:8090/demo/rdm.html#/bu?= =?UTF-8?q?g-detail/939050947543040/939050947543057/1516720919904256?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/extramenu/menu-treeview.vue | 95 ++++--------------- 1 file changed, 19 insertions(+), 76 deletions(-) diff --git a/src/views/pages/framework/extramenu/menu-treeview.vue b/src/views/pages/framework/extramenu/menu-treeview.vue index 15dc4e0d..deec1068 100644 --- a/src/views/pages/framework/extramenu/menu-treeview.vue +++ b/src/views/pages/framework/extramenu/menu-treeview.vue @@ -7,11 +7,10 @@ :list="childrenList" :move="checkMove" handle=".tsfont-drag" - :forceFallback="false" - :data-parentid="parentId" + group="tree" + :empty-insert-threshold="56" @start="moveStart" - @sort="moveEnd" - @remove="moveRemove" + @end="moveEnd" >
    -
  • {{ $t('page.menu') }}
  • -
  • {{ $t('page.edit') }}
  • -
  • {{ $t('page.delete') }}
  • +
  • {{ $t('page.menu') }}
  • +
  • {{ $t('page.edit') }}
  • +
  • {{ $t('page.delete') }}
@@ -83,22 +80,12 @@ export default { required: true, type: Array, default: () => [] - }, - show: { - type: Boolean, - default: true } }, data() { return { - needUpdate: true, currentParentId: null, childrenList: [], - isShow: true, - childrenLoading: [], - parentUuid: '', - moveObject: null, - moveParentUuid: '', currentMenuId: null, isEdit: false, newParentId: null, @@ -107,16 +94,7 @@ export default { }; }, beforeCreate() {}, - created() { - if (!this.search) { - this.childrenList.forEach(item => { - if (item.childCount > 0) { - this.$set(item, 'isShow', false); - this.$set(item, 'isRequest', false); - } - }); - } - }, + created() {}, beforeMount() {}, mounted() {}, beforeUpdate() {}, @@ -126,10 +104,6 @@ export default { beforeDestroy() {}, destroyed() {}, methods: { - moveRemove() { - //如果是新菜单加入,不触发更新,避免重复保存 - this.needUpdate = false; - }, editMenu(id) { this.currentMenuId = id; this.isEdit = true; @@ -167,49 +141,23 @@ export default { checkMove(evt, originalEvent) { const source = evt.draggedContext.element; const target = evt.relatedContext.element; - const targetParentId = evt.to.dataset.parentid; - if (source.type === 1 && target && target.type === 1 && source.parentId === target.parentId) { - //链接选项调整顺序 - //console.log('链接选项调整顺序'); - return true; - } else if (source.type === 1 && target && source.parentId !== target.parentId && target.parentId !== 0) { + if (source.type === 1 && target && source.parentId !== target.parentId && target.parentId !== 0) { //链接调整归属 - //console.log('调整菜单归属'); this.newParentId = target.parentId; - return true; - } else if (source.type === 0 && target && source.parentId === target.parentId) { - //目录调整顺序 - //console.log('链目录调整顺序'); - return true; } else if (source.type === 0 && target && source.parentId !== target.parentId) { //目录调整归属 this.newParentId = target.parentId; - //console.log('目录调整归属'); - return true; } else if (source.type === 1 && target && source.parentId !== target.parentId && target.childCount == 0) { // 链接节点拖到目录下面(目录下为空的节点) this.newParentId = target.id; - return true; } else if (source.type === 1 && target && target.type === 0 && source.parentId == target.parentId) { // 链接节点拖到目录下面(目录下已存在节点) - this.newParentId = target.parentId; - return true; + this.newParentId = target.id; } else if (source.type === 1 && target && source.parentId != target.parentId) { // 链接拖到空白处,最顶层 this.newParentId = 0; - return true; - } else if (!target) { - const parentNode = this.childrenList.find(d => d.id == targetParentId); - if (parentNode && parentNode.type === 0) { - // 只能拖到目录下面 - this.newParentId = parentNode.id; - return true; - } else { - // 链接节点不允许有子节点 - return false; - } - } - return false; + } + return true; }, moveStart(e) { this.currentId = e.item.attributes.id.value; @@ -219,16 +167,12 @@ export default { this.$emit('update', this.childrenList, this.parentId); }, moveEnd(evt) { - if (this.needUpdate) { - if (this.currentNode && this.newParentId !== null) { - this.$set(this.currentNode, 'parentId', this.newParentId); - this.newParentId = null; - this.currentNode = null; - } - this.update(); - } else { - this.needUpdate = true; + if (this.currentNode && this.newParentId !== null) { + this.$set(this.currentNode, 'parentId', this.newParentId); + this.newParentId = null; } + this.update(); + this.currentNode = null; }, isOpen(cd) { this.$set(cd, '_isHidden', !cd._isHidden); @@ -241,8 +185,7 @@ export default { animation: 150, scroll: true, disabled: false, - ghostClass: 'ghost', - group: { name: 'tree', pull: true, put: true } + ghostClass: 'ghost' }; } }, -- Gitee From 0896b357f746e0cebe4f5a737fb932ffc8a341c5 Mon Sep 17 00:00:00 2001 From: chenqw Date: Mon, 29 Sep 2025 16:17:18 +0800 Subject: [PATCH 03/13] =?UTF-8?q?-[=E4=BF=AE=E6=94=B9]=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E8=AF=B7=E6=B1=82=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/api/http.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/resources/api/http.js b/src/resources/api/http.js index a4e7eb74..1705b81f 100644 --- a/src/resources/api/http.js +++ b/src/resources/api/http.js @@ -32,7 +32,7 @@ const tip = ({desc, onClose, name, title, type = 'error', duration = 4.5, errorD } } }, desc), - errorDetail + errorDetail ? h('span', { class: ['tsfont-copy', 'text-action'], on: { @@ -86,6 +86,8 @@ var instance = Vue.prototype.$axios.create({ //timeout: 1000 * 20, //headers: {'Authorization': utils.getCookie('neatlogic_authorization') ? utils.getCookie('neatlogic_authorization') : ''} }); +instance.defaults.headers.get['source'] = 'page'; //post请求头 +instance.defaults.headers.post['source'] = 'page'; //post请求头 instance.defaults.headers.post['Content-Type'] = 'application/json'; //post请求头 instance.defaults.baseURL = BASEURLPREFIX; //默认接口前缀 instance.CancelToken = axios.CancelToken; -- Gitee From 1a62dc1966583d0e4aa9475c08202d0ae2242269 Mon Sep 17 00:00:00 2001 From: chenqw Date: Mon, 29 Sep 2025 16:26:34 +0800 Subject: [PATCH 04/13] adjust --- src/resources/api/http.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/resources/api/http.js b/src/resources/api/http.js index 1705b81f..005e8227 100644 --- a/src/resources/api/http.js +++ b/src/resources/api/http.js @@ -86,8 +86,8 @@ var instance = Vue.prototype.$axios.create({ //timeout: 1000 * 20, //headers: {'Authorization': utils.getCookie('neatlogic_authorization') ? utils.getCookie('neatlogic_authorization') : ''} }); -instance.defaults.headers.get['source'] = 'page'; //post请求头 -instance.defaults.headers.post['source'] = 'page'; //post请求头 +instance.defaults.headers.get['source'] = 'pc'; //post请求头 +instance.defaults.headers.post['source'] = 'pc'; //post请求头 instance.defaults.headers.post['Content-Type'] = 'application/json'; //post请求头 instance.defaults.baseURL = BASEURLPREFIX; //默认接口前缀 instance.CancelToken = axios.CancelToken; -- Gitee From af0bfa5288173d15098c56188bb5a1f29db25107 Mon Sep 17 00:00:00 2001 From: dengbf Date: Thu, 9 Oct 2025 17:43:39 +0800 Subject: [PATCH 05/13] =?UTF-8?q?-=20[=E5=85=B3=E8=81=94]=20#[152835585209?= =?UTF-8?q?1392]=E5=B7=A5=E5=8D=95=E5=A4=84=E7=90=86=E9=A1=B5=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=BC=80=E5=A7=8B=E6=8C=89=E9=92=AE=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=9C=89=E5=BC=82=E5=B8=B8=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=97=B6=E4=B9=9F=E5=88=B7=E6=96=B0=E9=A1=B5=E9=9D=A2=20http:/?= =?UTF-8?q?/192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/?= =?UTF-8?q?939050947543042/1528355852091392?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/pages/process/task/processdetail/detailmixin.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/pages/process/task/processdetail/detailmixin.js b/src/views/pages/process/task/processdetail/detailmixin.js index 6908944a..b76170a2 100644 --- a/src/views/pages/process/task/processdetail/detailmixin.js +++ b/src/views/pages/process/task/processdetail/detailmixin.js @@ -796,6 +796,7 @@ export default { }) .catch(error => { this.disabledConfig[disableType] = false; + this.toTask(this.processTaskId); }); } }, -- Gitee From 3dd73fbd530fea4b0fbac357b84ecc1e1b71daca Mon Sep 17 00:00:00 2001 From: dengbf Date: Thu, 9 Oct 2025 17:53:59 +0800 Subject: [PATCH 06/13] =?UTF-8?q?-=20[=E5=85=B3=E8=81=94]=20#[152836538993?= =?UTF-8?q?8688]=E8=A1=A8=E5=8D=95=E7=BC=96=E8=BE=91=EF=BC=9A=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E9=87=8C=E7=9A=84=E6=95=B0=E6=8D=AE-=E7=9F=A9?= =?UTF-8?q?=E9=98=B5=E7=B1=BB=E5=9E=8B=E7=9A=84=E5=94=AF=E4=B8=80=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E6=A3=80=E9=AA=8C=E5=A4=B1=E8=B4=A5=20http://192.168.?= =?UTF-8?q?0.96:8090/demo/rdm.html#/bug-detail/939050947543040/93905094754?= =?UTF-8?q?3057/1528365389938688?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/component/formtableinputer/index.vue | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/resources/plugins/TsSheet/form/component/formtableinputer/index.vue b/src/resources/plugins/TsSheet/form/component/formtableinputer/index.vue index 2ee218b4..7d83cd77 100644 --- a/src/resources/plugins/TsSheet/form/component/formtableinputer/index.vue +++ b/src/resources/plugins/TsSheet/form/component/formtableinputer/index.vue @@ -358,18 +358,26 @@ export default { if (!this.$utils.isEmpty(row)) { Object.keys(row).forEach(key => { const findUnunique = uniqueRuleList.find(d => d.uuid === key); - if (findUnunique && row[key]) { - if (existMap[key] && existMap[key].includes(row[key])) { - let findItem = errorList.find(d => d.attrUuid === key); - if (findItem && !findItem.errorPageList.find(d => d === pageCount)) { - findItem.errorPageList.push(pageCount); - findItem.errorPageList = findItem.errorPageList.sort(this.$utils.sortNumber()); - findItem.error = `${this.formItem.label}:第${findItem.errorPageList.join(',')}页【${findUnunique.label}】属性必须唯一`; + let value = row[key]; + if (!this.$utils.isEmpty(value)) { + if (Array.isArray(value)) { + value = this.$utils.mapArray(value, 'text').join('_'); + } else if (typeof value === 'object') { + value = value['text']; + } + if (findUnunique) { + if (existMap[key] && existMap[key].includes(value)) { + let findItem = errorList.find(d => d.attrUuid === key); + if (findItem && !findItem.errorPageList.find(d => d === pageCount)) { + findItem.errorPageList.push(pageCount); + findItem.errorPageList = findItem.errorPageList.sort(this.$utils.sortNumber()); + findItem.error = `${this.formItem.label}:第${findItem.errorPageList.join(',')}页【${findUnunique.label}】属性必须唯一`; + } else { + errorList.push({ uuid: this.formItem.uuid, attrUuid: key, errorPageList: [pageCount], error: `${this.formItem.label}:第${pageCount}页【${findUnunique.label}】属性必须唯一` }); + } } else { - errorList.push({ uuid: this.formItem.uuid, attrUuid: key, errorPageList: [pageCount], error: `${this.formItem.label}:第${pageCount}页【${findUnunique.label}】属性必须唯一` }); + existMap[key] = existMap[key] ? [...existMap[key], value] : [value]; } - } else { - existMap[key] = existMap[key] ? [...existMap[key], row[key]] : [row[key]]; } } }); -- Gitee From 31e0b5581ef6634c4b1426528c69abd660d6ffe6 Mon Sep 17 00:00:00 2001 From: dengbf Date: Thu, 9 Oct 2025 18:24:13 +0800 Subject: [PATCH 07/13] =?UTF-8?q?-=20[=E5=85=B3=E8=81=94]=20#[152835076020?= =?UTF-8?q?6336]=E8=8F=9C=E5=8D=95=E6=98=BE=E7=A4=BA=E4=BC=98=E5=8C=96=20h?= =?UTF-8?q?ttp://192.168.0.96:8090/demo/rdm.html#/story-detail/93905094754?= =?UTF-8?q?3040/939050947543042/1528350760206336?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/assets/css/common.less | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/resources/assets/css/common.less b/src/resources/assets/css/common.less index 3201b594..b27066bb 100644 --- a/src/resources/assets/css/common.less +++ b/src/resources/assets/css/common.less @@ -22,7 +22,10 @@ html { vertical-align: middle; text-align: left; } - + .@{iv-prev}cascader-menu { + height: 100%; + max-height: 200px; + } //input .@{iv-prev}input { border: none; -- Gitee From 7ef3b3bd01368cea0e36d7336b8888e4ce78231f Mon Sep 17 00:00:00 2001 From: dengbf Date: Fri, 10 Oct 2025 11:31:34 +0800 Subject: [PATCH 08/13] =?UTF-8?q?-=20[=E5=85=B3=E8=81=94]=20#[152832755731?= =?UTF-8?q?6608]=E8=A1=A8=E6=A0=BC=E8=BE=93=E5=85=A5=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E4=B8=ADtable=E7=B1=BB=E5=9E=8B=E7=BB=84=E4=BB=B6=E4=B8=AD?= =?UTF-8?q?=E6=9F=90=E4=B8=AA=E5=B1=9E=E6=80=A7=E8=BF=87=E6=BB=A4bug?= =?UTF-8?q?=EF=BC=88=E8=BF=87=E6=BB=A4=E5=80=BC=E6=98=AF=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E4=B8=AD=E6=9F=90=E4=B8=AA=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86=E5=B1=9E=E6=80=A7=EF=BC=89=20http://192.168.0.96:8090?= =?UTF-8?q?/demo/rdm.html#/bug-detail/939050947543040/939050947543057/1528?= =?UTF-8?q?327557316608?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/plugins/TsSheet/form-item.vue | 1 + src/resources/plugins/TsSheet/form/component/formtable.vue | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/resources/plugins/TsSheet/form-item.vue b/src/resources/plugins/TsSheet/form-item.vue index 4915529e..74ae99f1 100644 --- a/src/resources/plugins/TsSheet/form-item.vue +++ b/src/resources/plugins/TsSheet/form-item.vue @@ -73,6 +73,7 @@ :externalData="externalData" :rowUuid="rowUuid" :extendConfigList="extendConfigList" + :extraFormItemList="extraFormItemList" @setValue="setValue" @resize="$emit('resize')" @select="selectFormItem" diff --git a/src/resources/plugins/TsSheet/form/component/formtable.vue b/src/resources/plugins/TsSheet/form/component/formtable.vue index c4a045c1..7c76ffe9 100644 --- a/src/resources/plugins/TsSheet/form/component/formtable.vue +++ b/src/resources/plugins/TsSheet/form/component/formtable.vue @@ -13,7 +13,7 @@ :ref="'formitem_' + extra.uuid + '_' + index" :formItem="extra" :formData="{...filterUuid(initFormData), ...row}" - :formItemList="$utils.deepClone(config.dataConfig.concat(formItemList))" + :formItemList="$utils.deepClone([...extraFormItemList, ...config.dataConfig, ...formItemList])" :showStatusIcon="false" :readonly="readonly" :isCustomValue="isCustomValue" @@ -48,7 +48,8 @@ export default { mixins: [validmixin], props: { readonly: { type: Boolean, default: false }, - disabled: { type: Boolean, default: false } + disabled: { type: Boolean, default: false }, + extraFormItemList: { type: Array, default: () => [] } }, data() { return { -- Gitee From 193e964fe55cbfd310c23300a586302fce075b61 Mon Sep 17 00:00:00 2001 From: yaojn Date: Fri, 10 Oct 2025 12:11:58 +0800 Subject: [PATCH 09/13] =?UTF-8?q?-=20[=E5=8A=9F=E8=83=BD]=E6=8C=89?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E6=8A=BD=E7=A6=BB=E5=8A=A8=E6=80=81=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=20=20=20=20-=20[=E5=85=B3=E8=81=94]#[1501469071605760?= =?UTF-8?q?]=E6=8C=89=E6=A8=A1=E5=9D=97=E6=8A=BD=E7=A6=BB=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E8=8F=9C=E5=8D=95=20http://192.168.0.96:8090/demo/rdm?= =?UTF-8?q?.html#/story-detail/939050947543040/939050947543042/15014690716?= =?UTF-8?q?05760?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/api/common/index.js | 4 --- src/resources/store/modules/topMenu.js | 40 +++++++++----------------- 2 files changed, 14 insertions(+), 30 deletions(-) diff --git a/src/resources/api/common/index.js b/src/resources/api/common/index.js index 2bb8016f..04c8344a 100644 --- a/src/resources/api/common/index.js +++ b/src/resources/api/common/index.js @@ -166,10 +166,6 @@ const common = { updateCmdbMenu(params) { return axios.post('/api/rest/cmdb/ci/citype/search', params); }, - //后去ALERT的视图列表 - updateAlertMenu() { - return axios.post('/api/rest/alert/view/list', {}); - }, // 获取工单中心分类 updateProcessMenu(params) { return axios.post('/api/rest/workcenter/list', params); diff --git a/src/resources/store/modules/topMenu.js b/src/resources/store/modules/topMenu.js index 0f0fb2bc..cf287197 100644 --- a/src/resources/store/modules/topMenu.js +++ b/src/resources/store/modules/topMenu.js @@ -86,39 +86,27 @@ const actions = { }, // 更新模块菜单 - updateMenu({ dispatch }, { forceUpdate = false } = {}) { + updateMenu({ dispatch, commit, state, rootState }, { forceUpdate = false } = {}) { dispatch('updateProcessMenu', { forceUpdate }); dispatch('updateKnowledgeMenu', { forceUpdate }); dispatch('updateDashboardMenu', { forceUpdate }); dispatch('updateReportMenu', { forceUpdate }); dispatch('updateCmdbMenu', { forceUpdate }); dispatch('updateInspectMenu', { forceUpdate }); - dispatch('updateAlertMenu', { forceUpdate }); - }, - - // alert - async updateAlertMenu({ commit, state, rootState }, { forceUpdate = true } = {}) { - await state.gettingModuleList; - const alertModule = state.moduleList.find(item => item.moduleId === 'alert'); - if (!alertModule || (!forceUpdate && state.dynamicMenu.hasOwnProperty('alert')) || !hasCustomMenuAuthority('alert', 'alert-manage')) { - return; - } - const res = await commonApi.updateAlertMenu(); - if (!res.Return || res.Return.length === 0) return; - const alertViewList = res.Return.map(view => ({ - name: view.label, - path: `/alert-manage/${view.name}`, - url: `/alert-manage/${view.name}`, - icon: 'tsfont-dot' - })); - const newMenuGroup = [ - { - menuTypeName: '告警视图', - menuList: alertViewList - } + + const moduleContexts = [ + require.context('@/community-module/', true, /store\/modules\/topMenu\.js$/), + require.context('@/commercial-module/', true, /store\/modules\/topMenu\.js$/) ]; - commit('updateMenu', { module: alertModule, startIndex: 0, newMenuGroup }); - return res; + const args = { commit, dispatch, state, rootState, forceUpdate, hasCustomMenuAuthority }; + moduleContexts.forEach((context) => { + context.keys().forEach((path) => { + const fn = context(path) && context(path).default; + if (fn && typeof fn === 'function') { + fn(args); + } + }); + }); }, // process -- Gitee From 3d7a674afbe9e486abd2b9a1693cd3321760aeaa Mon Sep 17 00:00:00 2001 From: chenqw Date: Fri, 10 Oct 2025 18:15:16 +0800 Subject: [PATCH 10/13] adjust --- src/resources/assets/languages/term/en.json | 4 +++- src/resources/assets/languages/term/zh.json | 4 +++- src/views/pages/framework/worktime/worktime-manage.vue | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/resources/assets/languages/term/en.json b/src/resources/assets/languages/term/en.json index e697635b..ea92567d 100644 --- a/src/resources/assets/languages/term/en.json +++ b/src/resources/assets/languages/term/en.json @@ -632,7 +632,9 @@ "editprocessconfig": "Edit the current work order process configuration", "stepishandledby": "Step Handling Human", "sercalendar": "Service Calendar", - "flowauthuserupdatetip": "The processor includes all step handlers" + "flowauthuserupdatetip": "The processor includes all step handlers", + "settime": "Set time", + "setdate": "Set Calendar" }, "autoexec": { "addrootdirectory": "Add root directory", diff --git a/src/resources/assets/languages/term/zh.json b/src/resources/assets/languages/term/zh.json index 45641bcd..fb2669c3 100644 --- a/src/resources/assets/languages/term/zh.json +++ b/src/resources/assets/languages/term/zh.json @@ -632,7 +632,9 @@ "editprocessconfig": "编辑当前工单流程配置", "stepishandledby": "步骤处理人为", "sercalendar": "服务日历", - "flowauthuserupdatetip": "处理人包含所有步骤处理人" + "flowauthuserupdatetip": "处理人包含所有步骤处理人", + "settime": "设置时间", + "setdate": "设置日历" }, "autoexec": { "addrootdirectory": "添加根目录", diff --git a/src/views/pages/framework/worktime/worktime-manage.vue b/src/views/pages/framework/worktime/worktime-manage.vue index 47d02a66..e71c108d 100644 --- a/src/views/pages/framework/worktime/worktime-manage.vue +++ b/src/views/pages/framework/worktime/worktime-manage.vue @@ -41,8 +41,8 @@