From fa1bdd7e3b5c15ed53fef66c89532b494072c820 Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Fri, 26 May 2023 20:06:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E5=90=84=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CustomDatePicker/index.vue | 31 +++++--- src/components/CustomMonthPicker/index.vue | 25 ++++++ src/components/CustomPopoverSearch/index.vue | 2 +- src/components/TreeWithLine/index.vue | 48 +++++++++-- src/main.js | 2 + src/style.less | 36 ++++++--- src/utils/request.js | 14 ++-- src/views/logManage/index.vue | 40 +++++----- src/views/system/Scheduling.vue | 83 +++++++++++++++----- src/views/system/UserList.vue | 5 +- 10 files changed, 207 insertions(+), 79 deletions(-) create mode 100644 src/components/CustomMonthPicker/index.vue diff --git a/src/components/CustomDatePicker/index.vue b/src/components/CustomDatePicker/index.vue index 36cc78f..89e25a8 100644 --- a/src/components/CustomDatePicker/index.vue +++ b/src/components/CustomDatePicker/index.vue @@ -1,20 +1,25 @@ - \ No newline at end of file + diff --git a/src/components/CustomMonthPicker/index.vue b/src/components/CustomMonthPicker/index.vue new file mode 100644 index 0000000..b1f43c7 --- /dev/null +++ b/src/components/CustomMonthPicker/index.vue @@ -0,0 +1,25 @@ + + + diff --git a/src/components/CustomPopoverSearch/index.vue b/src/components/CustomPopoverSearch/index.vue index 12e983e..078c160 100644 --- a/src/components/CustomPopoverSearch/index.vue +++ b/src/components/CustomPopoverSearch/index.vue @@ -7,7 +7,7 @@ placement="bottom" :overlayStyle="{ width: width + 'px' }" > - + diff --git a/src/components/TreeWithLine/index.vue b/src/components/TreeWithLine/index.vue index 24412db..29b843e 100644 --- a/src/components/TreeWithLine/index.vue +++ b/src/components/TreeWithLine/index.vue @@ -1,6 +1,12 @@ - - - - + + + @@ -55,13 +55,8 @@ - - + +
{{ logItem }}
@@ -204,7 +199,6 @@ export default { try { this.isGettingDetail = true const res = await postAction('/logManage/downloadFile', formData) - console.log('%c [ res ]-206', 'font-size:13px; background:pink; color:#bf2c9f;', res.split('\r\n')) this.logInfo = res.split('\r\n') } catch (error) { console.error(error) @@ -253,7 +247,7 @@ export default { } } &-body { - padding: 0 20px; + padding-left: 20px; height: calc(100% - 50px); overflow: auto; } @@ -305,8 +299,16 @@ export default { } } } +} - &-list { +.log-detail { + ::v-deep { + .ant-spin-container { + min-height: 100px; + max-height: 520px; + overflow: auto; + padding: 10px; + } } } diff --git a/src/views/system/Scheduling.vue b/src/views/system/Scheduling.vue index 11c0961..3a2cfa0 100644 --- a/src/views/system/Scheduling.vue +++ b/src/views/system/Scheduling.vue @@ -4,7 +4,9 @@ @@ -36,9 +38,8 @@ draggable @dragstart="onDragStart(station, item.userId)" > - {{ station.stationName }} + {{ station.stationName + (index == item.stationList.length - 1 ? '' : '、') }} - {{ index == item.stationList.length - 1 ? '' : '、' }} @@ -63,7 +64,7 @@ - + @@ -76,11 +77,17 @@ Edit - - - Import + + + Download Template - + + + + Import + + + Export @@ -145,9 +152,9 @@ v-if="direction === 'right'" blockNode checkStrictly - defaultExpandAll :treeData="accountTreeData" :selectedKeys.sync="rightAccountChildSelectedKeys" + :expandedKeys.sync="rightAccountChildExpandedKeys" @select=" (_, props) => { onSelectAccount(_, props, itemSelect) @@ -181,7 +188,7 @@ import moment from 'moment' import { cloneDeep } from 'lodash' import { getAction } from '@/api/manage' import CustomPopoverSearch from '@/components/CustomPopoverSearch' -import { deleteAction, postAction, putAction } from '../../api/manage' +import { deleteAction, downloadFile, postAction, putAction } from '../../api/manage' const dateFormat = 'YYYY-MM-DD' const monthFormat = 'YYYY-MM' @@ -222,6 +229,7 @@ export default { accountTreeData: [], // 用户列表树状结构 checkedAccount: '', // 右侧穿梭框选中的账号 rightAccountChildSelectedKeys: [], // 右侧穿梭框选中的值 + rightAccountChildExpandedKeys: [], // 右侧穿梭框中展开的父元素 isChanging: false, dragItem: null, @@ -378,6 +386,8 @@ export default { this.targetKeys = [] this.accountTreeData = [] this.rightAccountChildSelectedKeys = [] + this.rightAccountChildExpandedKeys = [] + this.checkedAccount = '' }, @@ -390,16 +400,34 @@ export default { this.visible = true this.rightAccountChildSelectedKeys = [] + this.rightAccountChildExpandedKeys = [] + this.checkedAccount = '' + this.keyword = '' this.getScheduleDetail() }, - onImport() { - console.log('%c [ 新增 ]-88', 'font-size:13px; background:pink; color:#bf2c9f;') + async onImport({ file }) { + try { + const formData = new FormData() + formData.append('file', file) + const { success, failure } = await postAction('/sysTask/importExcel', formData) + this.$message.success(`${success} Success, ${failure} Fail`) + this.getList() + } catch (error) { + console.error(error) + } + }, + + onDownloadTpl() { + downloadFile('/sysTask/exportImportTemplate', 'Schedule Template.xlsx') }, onExport() { - console.log('%c [ 新增 ]-88', 'font-size:13px; background:pink; color:#bf2c9f;') + const currentMonth = this.currentMonth.format('YYYY-MM') + const formData = new FormData() + formData.append('yearMonth', currentMonth) + downloadFile('/sysTask/exportExcel', 'Schedule-' + currentMonth + '.xlsx', formData, 'post') }, // 开始拖拽 @@ -578,10 +606,10 @@ export default { } }) findAccount.children.push(...children) + this.rightAccountChildExpandedKeys = [findAccount.key] } } else { const moveKey = moveKeys[0] - console.log('%c [ moveKey ]-577', 'font-size:13px; background:pink; color:#bf2c9f;', moveKey) let parentIndex = -1, childIndex = -1 for (const pIndex in this.accountTreeData) { @@ -621,7 +649,7 @@ export default { &-list { flex-shrink: 0; width: 350px; - height: 100%; + height: calc(100% - 2px); background-color: #022024; border-color: rgb(12, 106, 102, 0.9); border-radius: 0; @@ -634,15 +662,23 @@ export default { padding-left: 15px; background-color: #022024; border-bottom-color: rgba(12, 235, 201, 0.3); + position: relative; &-title { padding-top: 22px; padding-bottom: 0; } + .card-title { + height: 18px; + line-height: 18px; + margin-bottom: 11px; + } .line { width: 70px; height: 3px; background-color: #0cebc9; margin-top: 10px; + position: absolute; + bottom: -1px; } } &-body { @@ -703,7 +739,7 @@ export default { border: 1px solid @borderColor; background-color: @bgColor; position: absolute; - top: 25px; + top: 28px; left: 2px; width: 9px; height: 9px; @@ -713,7 +749,7 @@ export default { } } .left-bottom-border { - height: calc(100% - 30px); + height: calc(100% - 33px); position: absolute; left: 0; bottom: 0; @@ -751,14 +787,17 @@ export default { } } &-content { - min-height: 62px; + min-height: 63px; border-top: 1px solid @borderColor; border-left: 1px solid @borderColor; - padding: 6px; + padding: 5px 6px 5px 18px; background-color: @bgColor; line-height: 26px; flex: 1; color: #6ebad0; + > span { + margin-left: -6px; + } } } } @@ -778,6 +817,12 @@ export default { overflow: auto; padding-right: 5px; } + .ant-fullcalendar-date { + height: 127px !important; + } + .ant-fullcalendar-content { + height: 60px !important; + } } } .search-form { diff --git a/src/views/system/UserList.vue b/src/views/system/UserList.vue index 97ef264..926a368 100644 --- a/src/views/system/UserList.vue +++ b/src/views/system/UserList.vue @@ -146,7 +146,7 @@ export default { ], url: { list: '/sys/user/list', - delete: '/sys/user/delete' + delete: '/sys/user/deleteById' }, roleOptions: [], visible: false, @@ -226,7 +226,8 @@ export default { onDel() { if (this.selectedRowKeys && this.selectedRowKeys.length) { this.$confirm({ - title: 'Do You Want To Delete This Item?', + title: 'Do You Want To Delete This Account?', + content: 'Will Delete All Data Related To This Account, Are You Sure?', okText: 'OK', cancelText: 'Cancel', onOk: () => {