工作台逻辑修改

This commit is contained in:
a0049873 2022-10-27 15:03:21 +08:00
parent 3e310fb7ea
commit 140f927763
2 changed files with 43 additions and 33 deletions

View File

@ -9,7 +9,7 @@
> >
<div class="content"> <div class="content">
<img class="img" :src="dataInfo.imgSrc" /> <img class="img" :src="dataInfo.imgSrc" />
<div class="title">{{ title }}</div> <div class="title">{{ '我的'+title }}</div>
<div class="flex-row-bottom"> <div class="flex-row-bottom">
<span class="num" :style="{ color: dataInfo.textColor }">{{ <span class="num" :style="{ color: dataInfo.textColor }">{{
formatNum(dataInfo.num) formatNum(dataInfo.num)
@ -90,7 +90,7 @@
</div> </div>
<div class="more" @click="goPage(dataInfo.url)">查看更多 ></div> <div class="more" @click="goPage(dataInfo.url)">查看更多 ></div>
</div> </div>
<div class="list-box flex-row-center no-data" v-else>暂无数据</div> <div class="list-box flex-row-center no-data" v-else>暂无{{title}}任务</div>
</div> </div>
</template> </template>
<script> <script>

View File

@ -3,8 +3,8 @@
<!-- --> <!-- -->
<div class="flex-row-start top"> <div class="flex-row-start top">
<div class="flex-row-start dept-left"> <div class="flex-row-start dept-left">
<dept-todo-view title="部门待办" v-loading="loadingToDo" :dataInfo="toToData"></dept-todo-view> <dept-todo-view title="待办" v-loading="loadingToDo" :dataInfo="toToData"></dept-todo-view>
<dept-todo-view title="部门已办" v-loading="loadingHasToDo" :dataInfo="hasToDodoData" <dept-todo-view title="已办" v-loading="loadingHasToDo" :dataInfo="hasToDodoData"
style="margin-left: 0"></dept-todo-view> style="margin-left: 0"></dept-todo-view>
</div> </div>
<div class="flex-row-start dept-chart-box"> <div class="flex-row-start dept-chart-box">
@ -56,7 +56,7 @@ export default {
list: [], list: [],
type: 'todo', type: 'todo',
// url: 'activiti-my-todo-task', // url: 'activiti-my-todo-task',
url: 'myAgent-CompetencyApplication', url: 'myAgent-CompetencyApplication'
}, },
// //
hasToDodoData: { hasToDodoData: {
@ -69,7 +69,7 @@ export default {
num: 0, num: 0,
list: [], list: [],
// url: 'activiti-my-join-task', // url: 'activiti-my-join-task',
url: 'hasToDoTasks-CompetencyApplication', url: 'hasToDoTasks-CompetencyApplication'
}, },
// //
resourceData: [], resourceData: [],
@ -103,43 +103,53 @@ export default {
// //
getToDo () { getToDo () {
this.loadingToDo = true this.loadingToDo = true
const data = { // const data = {
limit: 5, // limit: 5,
page: 1 // page: 1
} // }
Apis.getToDoTask(data, res => { this.$http.get('/act/task/myToDoTaskPage?page=1&limit=5').then(res => {
this.loadingToDo = false this.loadingToDo = false
if (res.data.code !== 0) { this.toToData.list = res.data.data.list || []
return this.$message.error(res.data.msg)
}
console.log('res----待办-------->', res.data)
this.toToData.list = res.data.data.records || []
this.toToData.num = res.data.data.total || 0 this.toToData.num = res.data.data.total || 0
}, err => {
this.$message.error(err)
this.loadingToDo = false
}) })
// Apis.getToDoTask(data, res => {
// this.loadingToDo = false
// if (res.data.code !== 0) {
// return this.$message.error(res.data.msg)
// }
// console.log('res------------>', res.data)
// this.toToData.list = res.data.data.records || []
// this.toToData.num = res.data.data.total || 0
// }, err => {
// this.$message.error(err)
// this.loadingToDo = false
// })
}, },
// //
getHasToDo () { getHasToDo () {
const data = { // const data = {
limit: 5, // limit: 5,
page: 1 // page: 1
} // }
this.loadingHasToDo = true this.loadingHasToDo = true
Apis.getHasToDoTask(data, res => { this.$http.get('/act/his/getMyHandledInstancePage?page=1&limit=5').then(res => {
this.loadingHasToDo = false this.loadingHasToDo = false
if (res.data.code !== 0) { this.hasToDodoData.list = res.data.data.list || []
return this.$message.error(res.data.msg)
}
console.log('res----已办-------->', res.data)
this.hasToDodoData.list = res.data.data.records || []
this.hasToDodoData.num = res.data.data.total || 0 this.hasToDodoData.num = res.data.data.total || 0
}, err => {
this.$message.error(err)
this.loadingHasToDo = false
console.log('err-----已办------->', err)
}) })
// Apis.getHasToDoTask(data, res => {
// this.loadingHasToDo = false
// if (res.data.code !== 0) {
// return this.$message.error(res.data.msg)
// }
// console.log('res------------>', res.data)
// this.hasToDodoData.list = res.data.data.records || []
// this.hasToDodoData.num = res.data.data.total || 0
// }, err => {
// this.$message.error(err)
// this.loadingHasToDo = false
// console.log('err------------>', err)
// })
}, },
// //
getShelvesTotal () { getShelvesTotal () {