From 8c84a99625c08e86bf23805a73a22dd55776f375 Mon Sep 17 00:00:00 2001 From: leave <> Date: Wed, 28 Oct 2020 10:44:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=85=E5=A4=84=E7=90=86=E4=BA=8B=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/style/common.less | 20 ++- .../workbench/initiateAssessment/index.vue | 54 +++--- src/views/kpi/workbench/todo/index.vue | 168 ++++++++++++------ 3 files changed, 156 insertions(+), 86 deletions(-) diff --git a/src/style/common.less b/src/style/common.less index 1678dc7..007167b 100644 --- a/src/style/common.less +++ b/src/style/common.less @@ -1,19 +1,28 @@ @borderColor: #ebebeb; @fontBlue: #3ba1ff; -@headerHeight:60px; -.boderAndRadius{ +@headerHeight: 60px; + +.boderAndRadius { border: 1px solid @borderColor; - border-radius:6px ; + border-radius: 6px; background: #fff; } + .commonFont { font-size: 16px; color: #52575b; } + +.comonPromptFont { + font-size: 14px; + color: #b1b1b1; +} + .common-main { background-color: white; padding: 40px 20px; } + .noSelect { -webkit-touch-callout: none; -webkit-user-select: none; @@ -22,7 +31,8 @@ -ms-user-select: none; user-select: none; } -.center(){ + +.center() { display: flex; align-items: center; justify-content: center; @@ -34,4 +44,4 @@ // } // ::-webkit-scrollbar { // width: 0 !important;height: 0; -// } \ No newline at end of file +// } diff --git a/src/views/kpi/workbench/initiateAssessment/index.vue b/src/views/kpi/workbench/initiateAssessment/index.vue index f08fc20..6b16def 100644 --- a/src/views/kpi/workbench/initiateAssessment/index.vue +++ b/src/views/kpi/workbench/initiateAssessment/index.vue @@ -140,7 +140,7 @@
- - - - - + - - - - + + + + + +
+ > + +
+ +
暂无代办
+
+ @@ -56,14 +66,32 @@ export default { return { activeIndex: '0', waitCount: 0, - rqParameter: { + // 选中项 + selectedTableList: [], + pageSelectedInfo: { currPage: 1, pageSize: 20, status: 0, totalCount: 1, totalPage: 1 }, - waitTableList: [{ imgStr: '', name: '咔咔咔咔咔咔扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩', dateTime: '2020-22-22 02:22:22' }, { imgStr: '', name: '咔咔咔咔咔咔扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩', dateTime: '2020-22-22 02:22:22' }, { imgStr: '', name: '咔咔咔咔咔咔扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩', dateTime: '2020-22-22 02:22:22' }] + // 待处理 + waitTableList: [ + { imgStr: '', name: '咔咔咔咔咔咔扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩', dateTime: '2020-22-22 02:22:22' }, + { imgStr: '', name: '咔咔咔咔咔咔扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩', dateTime: '2020-22-22 02:22:22' }, + { imgStr: '', name: '咔咔咔咔咔咔扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩', dateTime: '2020-22-22 02:22:22' } + ], + // 已处理 + pageWaitInfo: {}, + processedTableList: [], + pageProcessedInfo: { + currPage: 1, + pageSize: 20, + status: 0, + totalCount: 1, + totalPage: 1 + } + } }, components: { @@ -72,44 +100,55 @@ export default { computed: {}, beforeMount () { }, mounted () { - this.activeIndex = '0' - this.rqParameter = { - currPage: 1, - pageSize: 20, - status: this.activeIndex, - totalCount: 1, - totalPage: 1 - } this.handleGetList() }, methods: { handleGetList () { - apiGetWaitList(this.rqParameter).then(res => { - this.rqParameter.currPage = res.data.currPage - this.rqParameter.totalCount = res.data.totalCount - this.rqParameter.totalPage = res.data.totalPage + apiGetWaitList(this.pageSelectedInfo).then(res => { + this.pageSelectedInfo.currPage = res.data.currPage + this.pageSelectedInfo.totalCount = res.data.totalCount + this.pageSelectedInfo.totalPage = res.data.totalPage if (this.activeIndex === 0) { // 待处理事项 this.waitCount = res.data.totalCount } - this.waitTableList = res.data.list + this.selectedTableList = res.data.list console.log('待处理', res) }) }, - handleMenuSeledt () { - this.rqParameter = { - currPage: 1, - pageSize: 20, - status: this.activeIndex, - totalCount: 1, - totalPage: 1 + handleMenuSeledt (val) { + console.log('index ======', this.activeIndex) + console.log(val) + if (this.activeIndex !== val) { + console.log('menu 切换') + // 待处理 已处理 数据切换 + if (val === '0') { + console.log('menu 0') + this.processedTableList = this.selectedTableList + this.pageProcessedInfo = this.pageSelectedInfo + this.selectedTableList = this.waitTableList + this.pageSelectedInfo = this.pageWaitInfo + } else { + console.log('menu 1') + this.waitTableList = this.selectedTableList + this.pageWaitInfo = this.pageSelectedInfo + this.selectedTableList = this.processedTableList + this.pageSelectedInfo = this.pageProcessedInfo + } + // 如果是第一页 刷新 + console.log(this.pageSelectedInfo) + if (this.pageSelectedInfo.currPage === 1) { + this.handleGetList() + } } - this.waitTableList = [] - this.handleGetList() + this.activeIndex = val }, handleCurrentChange (val) { - this.rqParameter.currPage = val - this.handleGetList() + // 页面变更 + this.pageSelectedInfo.currPage = val + }, + handleRowClick (row) { + this.$router.push({ name: 'assessment-stepList', query: { id: row.id } }) } }, watch: {} @@ -122,18 +161,39 @@ export default { .todo { &-content { width: 1252px; - // min-height: 537px; + min-height: 278px; padding: 28px; display: flex; &-left { width: 200px; float: left; + .el-menu-item.is-active { + background-color: #ecf4ff !important; + border-left: 3px solid #409eff; + color: #999; + span { + color: #999 !important; + } + } } &-right { // border-left: 2px solid @borderColor; // padding-left: 20px; padding: 20px; flex: 1; + .el-pagination { + text-align: right; + margin-top: 20px; + } + &-empty { + padding-top: 20px; + img { + width: 100px; + height: 100px; + } + height: 100%; + text-align: center; + } } } }