diff --git a/src/views/pages/report/statement/widgetconfigs/others/autoexec-widget-config.vue b/src/views/pages/report/statement/widgetconfigs/others/autoexec-widget-config.vue index 929abe9d728314505cd3055fe84098c3ed15e0f8..e7a1961142b114a7861d20d1a28a9ab81e77d461 100644 --- a/src/views/pages/report/statement/widgetconfigs/others/autoexec-widget-config.vue +++ b/src/views/pages/report/statement/widgetconfigs/others/autoexec-widget-config.vue @@ -75,6 +75,7 @@ - + @@ -143,88 +144,17 @@ export default { progressValue: 'completed', progressColor: '#19be6b' }], - statusColorList: [ - // { - // name: 'saved', - // label: '待提交', - // color: '#f2f4f5' - // }, - // { - // name: 'pending', - // label: '待处理', - // color: '#8c8c8c' - // }, - // { - // name: 'waiting', - // label: '排队中', - // color: '#ffba5a' - // }, - // { - // name: 'running', - // label: '运行中', - // color: '#1690ff' - // }, - // { - // name: 'pausing', - // label: '暂停中', - // color: '#ffba5a' - // }, - // { - // name: 'paused', - // label: '已暂停', - // color: '#ffba5a' - // }, - // { - // name: 'aborting', - // label: '中止中', - // color: '#ffba5a' - // }, - // { - // name: 'aborted', - // label: '已中止', - // color: '#ffba5a' - // }, - // { - // name: 'completed', - // label: '已完成', - // color: '#25b864' - // }, - // { - // name: 'failed', - // label: '已失败', - // color: '#f33b3b' - // }, - // { - // name: 'ready', - // label: '已就绪', - // color: '#8c8c8c' - // }, - // { - // name: 'waitting', - // label: '待输入', - // color: '#8c8c8c' - // }, - // { - // name: 'checked', - // label: '已验证', - // color: '#25b864' - // }, - // { - // name: 'revoked', - // label: '已撤销', - // color: '#ffba5a' - // } - - ] + statusColorList: [] }; }, beforeCreate() {}, - created() {}, - beforeMount() {}, - mounted() { + created() { if (this.config.statusColorList && this.config.statusColorList.length) { this.statusColorList = this.config.statusColorList; - } + } + }, + beforeMount() {}, + mounted() { this.handleProgressStatusList(); }, beforeUpdate() {}, diff --git a/src/views/pages/report/statement/widgets/define/autoexec.js b/src/views/pages/report/statement/widgets/define/autoexec.js index a94997d29fc22acf9c22b033cc6c71b1e7633ff2..a53cb76fa4b05aa87f03c3ebd523c8b0d9baff4e 100644 --- a/src/views/pages/report/statement/widgets/define/autoexec.js +++ b/src/views/pages/report/statement/widgets/define/autoexec.js @@ -23,6 +23,22 @@ export default { backgroundImage: '', fontsize: 13, color: '', - arrowcolor: '' + arrowcolor: '', + statusColorList: [ + { + name: 'start', + label: '开始', + color: '#25b864', + bgColor: 'rgba(37, 184, 100, .1)', + disabled: true + }, + { + name: 'end', + label: '结束', + color: '#f33b3b', + bgColor: 'rgba(243, 59, 59, .1)', + disabled: true + } + ] } }; diff --git a/src/views/pages/report/statement/widgets/others/autoexec-widget.vue b/src/views/pages/report/statement/widgets/others/autoexec-widget.vue index 3ef4d1c6cb0a7fd9d0e757ed05f4ad2eef18f55e..ccac975b0662c0636f424b4a5ff8f7fc753ebf0d 100644 --- a/src/views/pages/report/statement/widgets/others/autoexec-widget.vue +++ b/src/views/pages/report/statement/widgets/others/autoexec-widget.vue @@ -15,7 +15,7 @@
-
+
开始
@@ -24,7 +24,7 @@
-
+
{{ litem.jobPhaseName }}
-
+
-
+
结束
@@ -49,8 +49,8 @@
- - {{ item.name }} + + {{ item.name }}
@@ -86,9 +86,11 @@ export default { created() {}, beforeMount() {}, mounted() { - if (this.widget?.config.statusColorList && this.widget?.config.statusColorList.length) { - this.statusColorList = this.widget?.config.statusColorList; - } + this.$nextTick(() => { + if (this.widget?.config.statusColorList && this.widget.config.statusColorList.length) { + this.statusColorList = this.widget?.config.statusColorList; + } + }); }, beforeUpdate() {}, updated() {}, @@ -181,7 +183,9 @@ export default { getStatusStyle() { return (jobPhaseStatus) => { let status = this.statusColorList.find(l => l.name === jobPhaseStatus); - let style = {}; + let style = { + 'background-color': 'rgba(0, 0, 0, 0.05)' + }; if (status) { style['color'] = status.color || ''; if (status.color) { @@ -224,9 +228,6 @@ export default { };