Commit 9c3afd1c authored by renjintao's avatar renjintao

task detail index

parent a9d98134
<template>
<div class="detail" style="width:100%">
<Row style="height:284px">
<Filed :span="6" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="6" :name="l('creatorUserId')">
<User :value="entity.creatorUserId"></User>
</Filed>
<Filed :span="6" :name="l('title')">{{entity.title}}</Filed>
<Filed :span="6" :name="l('level')">
<state code="project.task.level" :value="entity.level" type="text"></state>
......@@ -12,14 +8,22 @@
<Filed :span="6" :name="l('status')">
<state code="project.task.status" :value="entity.status" type="text"></state>
</Filed>
<Filed :span="6" :name="l('userId')">{{entity.userId}}</Filed>
<Filed :span="6" :name="l('endDate')">{{entity.endDate}}</Filed>
<Filed :span="6" :name="l('startDate')">{{entity.startDate}}</Filed>
<Filed :span="6" :name="l('userId')">
<User :value="parseInt(entity.userId)"></User>
</Filed>
<Filed :span="24" :name="l('startDate')">
<TimeDifference :timeValue="timeValue" :work="1"></TimeDifference>
</Filed>
<Filed :span="24" :name="l('note')">
<div style="height:200px" v-html="entity.note" class="tex_in10"></div>
</Filed>
<Filed :span="6" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="6" :name="l('creatorUserId')">
<User :value="entity.creatorUserId"></User>
</Filed>
</Row>
<component :is="detail" :eid="curId" />
<component :is="detail" :eid="curId" v-if="false" />
</div>
</template>
......@@ -30,6 +34,10 @@ export default {
data() {
return {
entity: {},
timeValue: {
startDate: "",
endDate: "",
},
rules: {
name: [{
required: true,
......@@ -60,9 +68,13 @@ export default {
id: v
}).then(r => {
this.entity = r.result;
this.$emit('on-load')
this.curId = v
this.detail = () => import('../record/index1')
this.timeValue = {
startDate: r.result.startDate,
endDate: r.result.endDate,
},
this.$emit('on-load')
// this.curId = v
//this.detail = () => import('../record/index1')
})
},
......
......@@ -190,15 +190,39 @@ export default {
},
{
key: "startDate",
title: this.l("startDate"),
title: '计划起止日期',
align: "center",
high: true,
width: 400,
render: (h, params) => {
return h('TimeDifference', {
props: {
timeValue: {
startDate: params.row.planStartDate,
endDate: params.row.planEndDate,
},
work: 1
}
})
}
},
{
key: "endDate",
title: this.l("endDate"),
key: "startDate",
title: '实际起止日期',
align: "center",
high: true,
width: 400,
render: (h, params) => {
return h('TimeDifference', {
props: {
timeValue: {
startDate: params.row.startDate,
endDate: params.row.endDate,
},
work: 1
}
})
}
},
{
key: "workHour",
......@@ -279,7 +303,7 @@ export default {
//disable: (params.row.status != 0 && params.row.status != 3) ? false : true
},
on: {
click: () => this.updatepart(params.row.id, 3)
click: () => this.updatepart(params.row.id, 2)
}
}),
h('op', {
......@@ -439,6 +463,12 @@ export default {
id: valId,
status: valStatus
}
if (valStatus == 1) {
params.startDate = ''
}
if (valStatus == 2) {
params.endDate = ''
}
Api.updatepart(params).then(r => {
if (r.success) {
this.$refs.grid.load();
......@@ -458,7 +488,7 @@ export default {
viewRecord(id) {
this.curId = id;
this.title = "查看记录";
this.fullScreen = true;
this.fullScreen = false;
this.detail = () => import('./detail')
this.modal = true;
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment