|
@@ -12,6 +12,7 @@
|
|
|
tags=""
|
|
|
:tabs="['详细信息']"
|
|
|
:mainData="mainData"
|
|
|
+ @teamList="teamList"
|
|
|
@pageChange="pageChange"
|
|
|
@onEditSuccess="queryMainData($route.query.id)">
|
|
|
<div slot="customOperation">
|
|
@@ -27,15 +28,30 @@
|
|
|
<el-descriptions-item label-class-name="my-label" label="任务标题">{{mainData.title?mainData.title:'--'}}</el-descriptions-item>
|
|
|
<el-descriptions-item label-class-name="my-label" label="任务内容">{{mainData.remarks?mainData.remarks:'--'}}</el-descriptions-item>
|
|
|
<el-descriptions-item label-class-name="my-label" label="执行人">{{mainData.title?mainData.title:'--'}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label-class-name="my-label" label="协助人">{{mainData.title}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label-class-name="my-label" label="协助人">
|
|
|
+ <span v-if="team.length > 0">
|
|
|
+ <span v-for="(item,index) in team">
|
|
|
+ <span v-if="index === team.length - 1">
|
|
|
+ {{item.name}}
|
|
|
+ </span>
|
|
|
+ <span v-else>{{item.name + ','}}</span>
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </el-descriptions-item>
|
|
|
<el-descriptions-item label-class-name="my-label" label="开始时间">{{mainData.starttime?mainData.starttime:'--'}}</el-descriptions-item>
|
|
|
<el-descriptions-item label-class-name="my-label" label="结束时间">{{mainData.endtime?mainData.endtime:'无限'}}</el-descriptions-item>
|
|
|
<el-descriptions-item label-class-name="my-label" label="提醒时间">{{mainData.remindday? mainData.remindday + '天' :'无需提醒'}}</el-descriptions-item>
|
|
|
<el-descriptions-item label-class-name="my-label" label="关联应用数据">
|
|
|
- <el-button type="text">{{mainData.systemapp?mainData.systemapp.length !== 0 ? mainData.systemapp[0].systemappname:'--':'--'}}</el-button>
|
|
|
+ <el-button type="text" v-if="mainData.systemapp.length !== 0" @click="onGoto">{{mainData.systemapp[0].systemappname}}</el-button>
|
|
|
+ <span v-else>--</span>
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label-class-name="my-label" label="负责人">{{mainData.leader?mainData.leader.length !== 0 ?mainData.leader[0].name:'--':"--" }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label-class-name="my-label" label="状态">{{mainData.status?mainData.status:'--'}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label-class-name="my-label" label="状态" >
|
|
|
+ <span :style="{color:mainData.status == '待执行'?'#3874f6':mainData.status == '进行中'?'#52c41a':'#333333'}">
|
|
|
+ {{mainData.status?mainData.status:'--'}}
|
|
|
+ </span>
|
|
|
+ </el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
</div>
|
|
|
|
|
@@ -68,7 +84,8 @@ export default {
|
|
|
return {
|
|
|
mainData:{},
|
|
|
mainAreaData:{},
|
|
|
- disable:false
|
|
|
+ disable:false,
|
|
|
+ team:[]
|
|
|
}
|
|
|
},
|
|
|
computed:{
|
|
@@ -97,7 +114,6 @@ export default {
|
|
|
},
|
|
|
changeDataStructure() {
|
|
|
let that = this
|
|
|
- this.mainData.systemapp.length>0?
|
|
|
this.mainAreaData = [
|
|
|
{
|
|
|
label:'创建人',
|
|
@@ -142,63 +158,13 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label:'关联应用数据',
|
|
|
- value:this.mainData.systemapp?this.mainData.systemapp[0].systemappname:'',
|
|
|
+ value:this.mainData.systemapp?this.mainData.systemapp.length>0?this.mainData.systemapp[0].systemappname:'':'',
|
|
|
style:()=>{
|
|
|
- let color = '#3874f6'
|
|
|
+ let color = this.mainData.systemapp?this.mainData.systemapp.length>0?'#3874f6':'':''
|
|
|
return {color: color}
|
|
|
- }
|
|
|
- },
|
|
|
- ]:this.mainAreaData = [
|
|
|
- {
|
|
|
- label:'创建人',
|
|
|
- value:this.mainData.createby
|
|
|
- },
|
|
|
- {
|
|
|
- label:'创建时间',
|
|
|
- value:this.mainData.createdate
|
|
|
- },
|
|
|
- {
|
|
|
- label:'开始时间',
|
|
|
- value:this.mainData.starttime
|
|
|
- },
|
|
|
- {
|
|
|
- label:'结束时间',
|
|
|
- value:this.mainData.endtime?this.mainData.endtime:'无限'
|
|
|
- },
|
|
|
- {
|
|
|
- label:'提醒时间',
|
|
|
- value:this.mainData.remindday?`${this.mainData.remindday}天`:'无需提醒'
|
|
|
- },
|
|
|
- {
|
|
|
- label:'状态',
|
|
|
- value:this.mainData.status,
|
|
|
- style:()=>{
|
|
|
- let color = ''
|
|
|
- switch (this.mainData.status) {
|
|
|
- case '待执行':
|
|
|
- color = '#3874f6'
|
|
|
- break;
|
|
|
- case '进行中':
|
|
|
- color = '#52c41a'
|
|
|
- break;
|
|
|
- case '已完成':
|
|
|
- color = '#333333'
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- return{color:color}
|
|
|
- }
|
|
|
- },
|
|
|
- /*{
|
|
|
- label:'关联应用数据',
|
|
|
- value:this.mainData.systemapp?this.mainData.systemapp[0].systemappname:'',
|
|
|
- style:()=>{
|
|
|
- let color = '#3874f6'
|
|
|
- return {color: color}
|
|
|
- }
|
|
|
- },*/
|
|
|
- ]
|
|
|
+ },
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
// 监听切换数据,上一页,下一页
|
|
|
pageChange (id,rowindex,tabIndex) {
|
|
@@ -235,7 +201,31 @@ export default {
|
|
|
message: '已取消删除'
|
|
|
});
|
|
|
});
|
|
|
- }
|
|
|
+ },
|
|
|
+ /*任务协助人*/
|
|
|
+ teamList(val){
|
|
|
+ console.log(val,'任务协助人')
|
|
|
+ this.team = []
|
|
|
+ if (val[0].team){
|
|
|
+ this.team = val[0].team
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /*任务页面跳转*/
|
|
|
+ onGoto(){
|
|
|
+ let path = this.mainData.systemapp[0].apppath_index
|
|
|
+ let route = this.$route
|
|
|
+ if (route.path !== path.slice(1)){
|
|
|
+ this.oldRoute = {path:route.path,query:route.query}
|
|
|
+ this.$store.dispatch('setHistoryRouter',this.oldRoute)
|
|
|
+ }
|
|
|
+ this.$router.push({
|
|
|
+ path:path,
|
|
|
+ query:{
|
|
|
+ id:this.mainData.ownerid,
|
|
|
+ rowindex:this.mainData.rowindex
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
},
|
|
|
mounted () {
|
|
|
this.queryMainData(this.$route.query.id)
|