Commit 9c3afd1c authored by renjintao's avatar renjintao

task detail index

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