From fb0538954ecdcdffa8e838b84d5a87bdfd533b7d Mon Sep 17 00:00:00 2001 From: dataeaseShu <106045316+dataeaseShu@users.noreply.github.com> Date: Mon, 22 Aug 2022 17:54:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=95=B0=E6=8D=AE=E5=90=8C=E6=AD=A5=20?= =?UTF-8?q?=E5=AE=9A=E6=97=B6=E6=8A=A5=E5=91=8A=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/business/DeLayoutContent.vue | 3 +- frontend/src/components/gridTable/index.vue | 4 + .../src/components/gridTable/tableBody.vue | 11 +- frontend/src/filter/filter.js | 4 +- frontend/src/icons/svg/ds-api.svg | 12 +- frontend/src/icons/svg/ds-db.svg | 5 +- frontend/src/icons/svg/ds-excel.svg | 5 +- frontend/src/icons/svg/ds-sql.svg | 12 +- frontend/src/icons/svg/ds-union.svg | 5 +- frontend/src/icons/svg/scene.svg | 4 +- frontend/src/lang/en.js | 1 + frontend/src/lang/tw.js | 1 + frontend/src/lang/zh.js | 2 +- frontend/src/styles/index.scss | 7 +- .../panel/template/component/TemplateList.vue | 26 +- frontend/src/views/panel/template/index.vue | 35 +- .../views/system/SysParam/BasicSetting.vue | 8 +- .../src/views/system/task/DatasetTaskList.vue | 1388 +++++++++-------- .../src/views/system/task/TableSelector.vue | 268 ++++ frontend/src/views/system/task/TaskRecord.vue | 469 ++++-- frontend/src/views/system/task/dataset.vue | 156 +- frontend/src/views/system/task/filterUser.vue | 466 ++++++ .../views/system/task/filterUserRecord.vue | 459 ++++++ frontend/src/views/system/task/form.vue | 607 ++++++- frontend/src/views/system/task/options.js | 80 + frontend/src/views/system/user/index.vue | 68 - 26 files changed, 3206 insertions(+), 900 deletions(-) create mode 100644 frontend/src/views/system/task/TableSelector.vue create mode 100644 frontend/src/views/system/task/filterUser.vue create mode 100644 frontend/src/views/system/task/filterUserRecord.vue create mode 100644 frontend/src/views/system/task/options.js diff --git a/frontend/src/components/business/DeLayoutContent.vue b/frontend/src/components/business/DeLayoutContent.vue index ddd0a8bfff..d83453a677 100644 --- a/frontend/src/components/business/DeLayoutContent.vue +++ b/frontend/src/components/business/DeLayoutContent.vue @@ -34,7 +34,7 @@ export default { return backPath || backName || backTo }, needInnerPadding() { - return ['system-dept', 'system-dept-form', 'system-auth', 'sys-appearance', 'system-param', 'system-template'].includes(this.$route.name) + return ['sys-task-email', 'system-dept', 'system-dept-form', 'system-auth', 'sys-appearance', 'system-param', 'system-template', "sys-task-dataset"].includes(this.$route.name) } } } @@ -55,6 +55,7 @@ export default { height: 100%; display: flex; flex-direction: column; + position: relative; .route-title { font-family: PingFang SC; font-size: 20px; diff --git a/frontend/src/components/gridTable/index.vue b/frontend/src/components/gridTable/index.vue index 9b6e5a66d8..d56f4a3716 100644 --- a/frontend/src/components/gridTable/index.vue +++ b/frontend/src/components/gridTable/index.vue @@ -159,6 +159,10 @@ export default { flex-direction: column; justify-content: space-between; + ::v-deep.el-table-column--selection .cell { + padding: 0 14px; + } + .el-table::before { content: ''; position: absolute; diff --git a/frontend/src/components/gridTable/tableBody.vue b/frontend/src/components/gridTable/tableBody.vue index cc07576985..7a987865d6 100644 --- a/frontend/src/components/gridTable/tableBody.vue +++ b/frontend/src/components/gridTable/tableBody.vue @@ -13,11 +13,12 @@ export default { const { columns } = context.props; const { children = [] } = context; if (!columns?.length) return children; - children.forEach(ele => { - if (columns.includes(ele.componentOptions?.propsData?.prop)) { - nodes.push(ele) - } - }) + children.forEach((ele) => { + const { prop, type } = ele.componentOptions?.propsData || {}; + if (columns.includes(prop) || type === "selection") { + nodes.push(ele); + } + }); return nodes; }, }; diff --git a/frontend/src/filter/filter.js b/frontend/src/filter/filter.js index 70d5137a1a..df0bf61ac6 100644 --- a/frontend/src/filter/filter.js +++ b/frontend/src/filter/filter.js @@ -11,8 +11,8 @@ const options = function(value, array) { } const timestampFormatDate = function(timestamp, showMs) { - if (!timestamp) { - return timestamp + if (!timestamp || timestamp === -1) { + return '-' } const date = new Date(timestamp) diff --git a/frontend/src/icons/svg/ds-api.svg b/frontend/src/icons/svg/ds-api.svg index 537b512888..479f848d1a 100644 --- a/frontend/src/icons/svg/ds-api.svg +++ b/frontend/src/icons/svg/ds-api.svg @@ -1 +1,11 @@ - \ No newline at end of file + + + + + + + + + + + \ No newline at end of file diff --git a/frontend/src/icons/svg/ds-db.svg b/frontend/src/icons/svg/ds-db.svg index fe8c0b60b7..8b96d0ddd3 100644 --- a/frontend/src/icons/svg/ds-db.svg +++ b/frontend/src/icons/svg/ds-db.svg @@ -1 +1,4 @@ - + + + + diff --git a/frontend/src/icons/svg/ds-excel.svg b/frontend/src/icons/svg/ds-excel.svg index f54564264a..5bf5ed7042 100644 --- a/frontend/src/icons/svg/ds-excel.svg +++ b/frontend/src/icons/svg/ds-excel.svg @@ -1 +1,4 @@ - + + + + diff --git a/frontend/src/icons/svg/ds-sql.svg b/frontend/src/icons/svg/ds-sql.svg index a8a02c2407..10c7673d61 100644 --- a/frontend/src/icons/svg/ds-sql.svg +++ b/frontend/src/icons/svg/ds-sql.svg @@ -1 +1,11 @@ - + + + + + + + + + + + diff --git a/frontend/src/icons/svg/ds-union.svg b/frontend/src/icons/svg/ds-union.svg index 9e6b6b4c01..5428e82c93 100644 --- a/frontend/src/icons/svg/ds-union.svg +++ b/frontend/src/icons/svg/ds-union.svg @@ -1 +1,4 @@ - + + + + diff --git a/frontend/src/icons/svg/scene.svg b/frontend/src/icons/svg/scene.svg index eb77499b1f..9efbd48adc 100644 --- a/frontend/src/icons/svg/scene.svg +++ b/frontend/src/icons/svg/scene.svg @@ -1 +1,3 @@ - + + + diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index ac3fbd641f..aaeab5a13d 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -1437,6 +1437,7 @@ export default { search_by_name: 'Search by name', underway: 'Waiting for execution', stopped: 'End', + exec: 'underway', pending: 'Pause', exec: 'Execute Once', confirm_exec: 'Manual trigger execution?', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index 2d24d31945..86fe0f2910 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -1436,6 +1436,7 @@ export default { search_by_name: '根據名稱搜索', underway: '等待執行', stopped: '執行結束', + exec: '執行中', pending: '暫停', exec: '執行一次', confirm_exec: '手動觸發執行?', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index da16bf3651..0e2e2f29f9 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -1437,8 +1437,8 @@ export default { search_by_name: '根据名称搜索', underway: '等待执行', stopped: '执行结束', + exec: '执行中', pending: '暂停', - exec: '执行一次', confirm_exec: '手动触发执行?', change_success: '状态切换成功', excel_replace_msg: '可能会影响自定义数据集、关联数据集、仪表板等,确认替换?', diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss index faf20ff670..1f128e63df 100644 --- a/frontend/src/styles/index.scss +++ b/frontend/src/styles/index.scss @@ -876,7 +876,6 @@ div:focus { height: 24px !important; line-height: 24px !important; margin-bottom: 9px !important; - padding: 0 12px !important; font-size: 16px !important; } } @@ -1129,16 +1128,16 @@ div:focus { } .de-confirm-primary-btn { - background: var(--deSuccess, #3370ff) !important; + background: var(--primary, #3370ff) !important; border: none !important; color: #ffffff !important; &:hover { - background: var(--deSuccessHover, #3370ff) !important; + background: var(--primaryHover, #3370ff) !important; } &:active { - background: var(--deSuccessActive, #3370ff) !important; + background: var(--primaryActive, #3370ff) !important; } } diff --git a/frontend/src/views/panel/template/component/TemplateList.vue b/frontend/src/views/panel/template/component/TemplateList.vue index 45142edf22..859856d330 100644 --- a/frontend/src/views/panel/template/component/TemplateList.vue +++ b/frontend/src/views/panel/template/component/TemplateList.vue @@ -61,8 +61,11 @@ + + \ No newline at end of file diff --git a/frontend/src/views/system/task/TableSelector.vue b/frontend/src/views/system/task/TableSelector.vue new file mode 100644 index 0000000000..d073dc7b03 --- /dev/null +++ b/frontend/src/views/system/task/TableSelector.vue @@ -0,0 +1,268 @@ + + + + + \ No newline at end of file diff --git a/frontend/src/views/system/task/TaskRecord.vue b/frontend/src/views/system/task/TaskRecord.vue index 067b5bb6aa..712d3e0343 100644 --- a/frontend/src/views/system/task/TaskRecord.vue +++ b/frontend/src/views/system/task/TaskRecord.vue @@ -1,8 +1,66 @@