200 lines
5.0 KiB
Java
200 lines
5.0 KiB
Java
<template>
|
|
<div class="myList-box">
|
|
<div class="header-text">
|
|
<div class="header-text-left">{{this.$t('toDoProcess')}}</div>
|
|
<div class="header-text-right" @click="moreClick">
|
|
More
|
|
<img src="../../../assets/gengduo.png" alt="">
|
|
</div>
|
|
</div>
|
|
<div class="myList-box-content" v-if="dataSource.length > 0">
|
|
<div class="myList-box-content-box" v-for="(item,index) in dataSource" :key="index" @click="prcClick(item)">
|
|
<div class="top">
|
|
<span class="top-text" :title="item.prcNum">{{item.prcNum}}</span>
|
|
<span class="top-admin" :title="prcTypeName[item.prcType]">{{prcTypeName[item.prcType]}}</span>
|
|
</div>
|
|
<div class="button">
|
|
{{item.creatTime}}
|
|
</div>
|
|
<div class="with">
|
|
{{$t('Pending')}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div v-else style="height: 300px;position: relative">
|
|
<JNoData/>
|
|
</div>
|
|
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
|
import { mapGetters } from 'vuex'
|
|
import moment from 'moment'
|
|
import store from '@/store/'
|
|
|
|
export default {
|
|
name: 'myList',
|
|
data() {
|
|
return {
|
|
pageSize: 4,
|
|
pageNo: 1,
|
|
dataSource: [],
|
|
loading: false,
|
|
prcTypeName: {
|
|
1: this.$t('taskConfirmationProcess')
|
|
}
|
|
}
|
|
},
|
|
mounted() {
|
|
this.queryProcess()
|
|
},
|
|
watch: {
|
|
'$socketPublic.state.msg': {
|
|
//处理接收到的消息
|
|
handler: function(res) {
|
|
let that = this
|
|
let data = JSON.parse(res.data)
|
|
if (data.msgId) {
|
|
this.queryProcess()
|
|
}
|
|
}
|
|
}
|
|
},
|
|
created() {
|
|
if (store.getters.userInfo) {
|
|
this.$socketPublic.dispatch('webSocketInit')//初始化ws
|
|
}
|
|
},
|
|
methods: {
|
|
...mapGetters(['userInfo']),
|
|
queryProcess() {
|
|
this.loading = true
|
|
let parmes = {}
|
|
parmes.current = this.pageNo
|
|
parmes.size = this.pageSize
|
|
parmes.userId = this.userInfo().userId
|
|
postAction('task/todoTaskList', parmes).then((res) => {
|
|
this.dataSource = res.list || []
|
|
this.loading = false
|
|
})
|
|
},
|
|
moreClick() {
|
|
this.$router.push({
|
|
path: '/ProcessCenter'
|
|
})
|
|
},
|
|
prcClick(row) {
|
|
let index = row.taskIds.lastIndexOf(',')
|
|
row.taskIds = row.taskIds.slice(0, index)
|
|
if (row.prcType == '1') {
|
|
let newUrl = this.$router.resolve({
|
|
path: '/handshakeProcess',
|
|
query: row
|
|
})
|
|
window.open(newUrl.href, '_blank')
|
|
} else if (row.prcType == '5') {
|
|
let newUrl = this.$router.resolve({
|
|
path: '/regulatoryProcessReview',
|
|
query: row
|
|
})
|
|
window.open(newUrl.href, '_blank')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="less">
|
|
.myList-box {
|
|
width: 100%;
|
|
position: relative;
|
|
|
|
.header-text {
|
|
width: 100%;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
|
|
.header-text-left {
|
|
font-size: 20px;
|
|
font-weight: 400;
|
|
color: #040B29;
|
|
}
|
|
|
|
.header-text-right {
|
|
font-size: 14px;
|
|
font-weight: 400;
|
|
color: #9B9DA9;
|
|
margin-top: 6px;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
|
|
.myList-box-content {
|
|
margin-top: 16px;
|
|
|
|
.myList-box-content-box {
|
|
width: 100%;
|
|
height: 68px;
|
|
background: #F6F7FA;
|
|
border: 1px solid #EFF1F3;
|
|
border-radius: 4px;
|
|
padding: 13px 16px;
|
|
box-sizing: border-box;
|
|
margin-bottom: 14px;
|
|
position: relative;
|
|
cursor: pointer;
|
|
|
|
.top {
|
|
.top-text {
|
|
font-size: 16px;
|
|
font-family: Blue Sky Noto;
|
|
font-weight: 400;
|
|
color: #040B29;
|
|
max-width: 50%;
|
|
display: inline-block;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.top-admin {
|
|
font-size: 16px;
|
|
font-family: Blue Sky Noto;
|
|
display: inline-block;
|
|
font-weight: 400;
|
|
color: #040B29;
|
|
margin-left: 4px;
|
|
max-width: calc(50% - 72px);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
}
|
|
|
|
.button {
|
|
font-size: 14px;
|
|
font-weight: 400;
|
|
color: #9B9DA9;
|
|
margin-top: -7px;
|
|
}
|
|
|
|
.with {
|
|
width: 64px;
|
|
height: 26px;
|
|
background: #00B3BE;
|
|
border-radius: 0px 4px 0px 10px;
|
|
position: absolute;
|
|
right: 0;
|
|
top: 0;
|
|
text-align: center;
|
|
line-height: 26px;
|
|
font-size: 12px;
|
|
font-weight: 400;
|
|
color: #FFFFFF;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style> |