Commit a6b11124 by lichengming

修改了项目进度显示

parent 6f6b44e3
......@@ -74,8 +74,6 @@ export default {
// 右侧的连接线
endValue() {
// 最后一个节点数据
console.log('右侧连接线', this.list)
console.log('右侧连接线', this.endList)
// const current_value = this.list[2].value
const currentValue = this.list[2].value
const endValue = this.endList[0].value
......
......@@ -34,7 +34,7 @@
<li>
<div class="title">委托日期</div>
<div class="cont">
{{$dateformat(itemInfo.entrustVO.entrustDate)}}
{{$dateformat(itemInfo.entrustVO.entrustDate,'yyyy-mm-dd HH:MM:ss')}}
</div>
</li>
<li>
......@@ -65,7 +65,7 @@
</Col>
<!--样品进度信息-->
<Col span="18">
<flowIndex></flowIndex>
<flowIndex :listInfo = itemInfo.data></flowIndex>
</Col>
</Row>
</div>
......
......@@ -68,12 +68,16 @@ export default {
FlowBranch,
Legend
},
props: {
// 数据源
listInfo: null
},
data() {
return {
list: {
start: [
{ name: '收样', key: 'key1' },
{ name: '任务评审', key: 'key2' },
{ name: '收样', key: 'receiveSample' },
{ name: '任务评审', key: 'review' },
{ name: '开土', key: 'key3' }
],
branch: [
......@@ -101,7 +105,8 @@ export default {
]
},
// 构造数据源
obj: {}
obj: [],
nodeObj: {}
}
},
mounted() {
......@@ -109,27 +114,33 @@ export default {
},
methods: {
getData() {
if (this.listInfo) {
this.obj = this.listInfo
}
for (let j = 0; j < this.obj.length; j++) {
Object.assign(this.nodeObj, this.obj[j])
}
// 1.后台返回的数据,需要流转的全部节点数据(前后盾自己定义,对应上即可)
// key:bool (已经流转的节点为true,待流转的节点为false)
this.obj = {
key1: true,
key2: true,
key3: true,
key4: true,
key5: true,
key6: undefined,
// key7: true,
// key8: true,
// key9: true,
// key10: false,
// key11: false,
// key12: false,
key13: true,
key14: false,
key15: false,
key16: false,
key20: '20%'
}
// this.obj = {
// key1: true,
// key2: true,
// key3: true,
// key4: true,
// key5: true,
// key6: undefined,
// key7: true,
// key8: true,
// key9: true,
// key10: false,
// key11: false,
// key12: false,
// key13: true,
// key14: false,
// key15: false,
// key16: false,
// key20: '20%'
// }
// 2.前端进行过组合数据
const startArray = this.list.start
const branchArray = this.list.branch.flat() // 将一个二维数组拉平
......@@ -137,17 +148,11 @@ export default {
const allArray = startArray.concat(branchArray, endArray)
for (let i = 0; i < allArray.length; i++) {
const key = allArray[i].key
this.$set(allArray[i], 'value', this.obj[key])
if (allArray[i].key === 'key8') {
this.$set(allArray[i], 'per', this.obj.key20)
}
this.$set(allArray[i], 'value', this.nodeObj[key])
}
console.log('allArray', allArray)
console.log('this.list', this.list)
},
// 上面连接线颜色
upLineClassObj() {
console.log('右侧线')
const valueZero = this.list.end[0].value
const upValue = this.list.branch[0][2].value
const upValueZero = this.list.branch[0][0].value
......
......@@ -56,9 +56,9 @@
<!-- <Col span="12">-->
<!-- <CustomerContract></CustomerContract>-->
<!-- </Col>-->
<!-- <Col span="24">-->
<!-- <ItemFlow></ItemFlow>-->
<!-- </Col>-->
<Col span="24">
<ItemFlow></ItemFlow>
</Col>
<div :style="{height}" v-if="moduleList.length" class="config_home">
<Row :gutter="10">
<Col
......
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