Commit 622df50c by lichengming

修改了项目进度显示

parent fd22911b
......@@ -266,6 +266,10 @@ export default {
.then(res => res),
aloneSampleDelete: data =>
http.delete('soil/v1/alone_sample/?ids=' + data).then(res => res),
pageWarehouseLocationSample: data =>
http
.post('/v1/sample/page_warehouse_location_sample', data)
.then(res => res),
storageSampleSubmit: data =>
http
.post('soil/v1/alone_sample/storage_sample_submit', data)
......
......@@ -9,7 +9,7 @@
</div>
<div v-if="item.type === 'rect'" class="flow-start" style="position: absolute;right: -10px;bottom:-60px">
<PtArrow :isRote="true" :value="item.value"/>
<PtRect :name="item.name" :value="item.value" style="margin-top: 60px;"/>
<PtRect :name="item.name" :num="item.num?item.num:''" :value="item.value" style="margin-top: 60px;"/>
</div>
<!--最后的连接线-->
<div style="position: absolute;left: 81px;top: 30px">
......
<template>
<div :class="classObj(value)" class="rect">{{name}}</div>
<div :class="classObj(value)" class="rect">
<p :class="style(name)">{{name}}<br>{{num}}</p>
</div>
</template>
<script>
......@@ -12,7 +14,8 @@ export default {
// 显示的内容
name: null,
// 节点变色的依据(存在的变色)
value: null
value: null,
num: null
},
methods: {
// 颜色
......@@ -25,6 +28,13 @@ export default {
default:
break
}
},
style(name) {
if (name === '自校版' && this.num !== '') {
return 'haveNum'
} else {
return 'noNum'
}
}
}
}
......@@ -32,7 +42,6 @@ export default {
<style scoped>
.rect {
padding: 10px;
border: 1px solid #999;
background: #999;
color: #fff;
......@@ -40,7 +49,12 @@ export default {
width: 80px;
text-align: center;
}
.haveNum {
}
.noNum {
margin-top: 10px;
margin-bottom: 10px;
}
.blue-color {
border-color: #00a0e9;
background-color: #00a0e9;
......
......@@ -146,9 +146,6 @@ export default {
}
}
},
mounted() {
this._page()
},
methods: {
// 操作按钮
_btnClick(msg, currentComponent) {
......
<template>
<div>
<div class="layout-content-padding">
<div class="layout-content-main">
<el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="待完成" name="wait"></el-tab-pane>
<el-tab-pane label="历史记录" name="his"></el-tab-pane>
</el-tabs>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent"></component>
</keep-alive>
</div>
</div>
</div>
</template>
<script>
import MeterSendEntrust from './AddressManage'
import MeterSendEntrustHis from './AddressManageHis'
export default {
name: 'MeterSendEntrustIndex',
components: {
// eslint-disable-next-line vue/no-unused-components
MeterSendEntrust,
// eslint-disable-next-line vue/no-unused-components
MeterSendEntrustHis
},
data() {
return {
activeName: 'wait',
currentComponent: ''
}
},
mounted() {
this.activeName = 'wait'
this.currentComponent = 'MeterSendEntrust'
this.$nextTick(() => {
this.$refs.refModal._page()
})
},
methods: {
_changeTabs(tab, event) {
if (tab.name === 'wait') {
this.currentComponent = 'MeterSendEntrust'
this.$nextTick(() => {
this.$refs.refModal._page()
})
} else {
this.currentComponent = 'MeterSendEntrustHis'
this.$nextTick(() => {
this.$refs.refModal._page()
})
}
}
}
}
</script>
<style scoped>
</style>
......@@ -78,30 +78,30 @@ export default {
start: [
{ name: '收样', key: 'receiveSample' },
{ name: '任务评审', key: 'review' },
{ name: '开土', key: 'key3' }
{ name: '开土', key: 'openSoil' }
],
branch: [
[
{ name: '物性试验', key: 'key4' },
{ name: '完成率', key: 'key5', line: true },
{ name: '自校版1', key: 'key6', type: 'rect' }
{ name: '物性试验', key: 'wuxing' },
{ name: '完成率', key: 'wuxingEnd', line: true },
{ name: '自校版', key: 'wuxingZiJiaoCheck', type: 'rect' }
],
[
{ name: '力学试验', key: 'key7' },
{ name: '完成率', key: 'key8', line: true },
{ name: '自校版2', key: 'key9', type: 'rect' }
{ name: '力学试验', key: 'lixue' },
{ name: '完成率', key: 'lixueEnd', line: true },
{ name: '自校版', key: 'lixueZiJiaoCheck', type: 'rect' }
],
[
{ name: '高级试验', key: 'key10' },
{ name: '完成率', key: 'key11', line: true },
{ name: '自校版1', key: 'key12', type: 'rect' }
{ name: '高级试验', key: 'gaoji' },
{ name: '完成率', key: 'gaojiEnd', line: true },
{ name: '自校版', key: 'gaojiZiJiaoCheck', type: 'rect' }
]
],
end: [
{ name: '报告编制', key: 'key13' },
{ name: '报告审核', key: 'key14' },
{ name: '报告批准', key: 'key15' },
{ name: '报告签发', key: 'key16' }
{ name: '报告编制', key: 'reportMake' },
{ name: '报告审核', key: 'reportCheck' },
{ name: '报告批准', key: 'reportIssue' },
{ name: '报告签发', key: 'reportEnd' }
]
},
// 构造数据源
......@@ -149,6 +149,33 @@ export default {
for (let i = 0; i < allArray.length; i++) {
const key = allArray[i].key
this.$set(allArray[i], 'value', this.nodeObj[key])
switch (allArray[i].key) {
case 'wuxingEnd':
this.$set(allArray[i], 'per', this.nodeObj.wuxingEndRate)
break
case 'lixueEnd':
this.$set(allArray[i], 'per', this.nodeObj.lixueEndRate)
break
case 'gaojiEnd':
this.$set(allArray[i], 'per', this.nodeObj.gaojiEndRate)
break
case 'wuxingZiJiaoCheck':
this.$set(allArray[i], 'num', this.nodeObj.wuxingZiJiao)
break
}
// if (allArray[i].key === 'wuxingEnd') {
// this.$set(allArray[i], 'per', this.nodeObj.wuxingEndRate)
// } else if (allArray[i].key === 'lixueEnd') {
// this.$set(allArray[i], 'per', this.nodeObj.lixueEndRate)
// } else if (allArray[i].key === 'gaojiEnd') {
// this.$set(allArray[i], 'per', this.nodeObj.gaojiEndRate)
// } else if (allArray[i].key === 'wuxingZiJiao') {
// if (this.nodeObj.wuxingZiJiao) {
// this.list.branch[0][2].name = this.nodeObj.wuxingZiJiao
// } else {
// this.list.branch[0][2].name = '自校'
// }
// }
}
},
// 上面连接线颜色
......
......@@ -10,7 +10,7 @@ import ReceiveSampleIndex from '../pages/soil-alone-sample/EntrustIndex'
import InstockIndex from '../pages/soil-alone-sample-instock/EntrustIndex'
import OutstockIndex from '../pages/soil-alone-sample-manage/soil-alone-sample-outstock/EntrustIndex'
import StorehousePlace from '../pages/soil-alone-sample-manage/storehouse-place-manage/AddressManage'
import StorehouseSample from '../pages/soil-alone-sample-manage/storehouse-sample-manage/AddressManage'
import StorehouseSample from '../pages/soil-alone-sample-manage/storehouse-sample-manage/storehouseSampleIndex'
import ReviewEntrust from '../pages/meter-entrust/entrust-review/ReviewEntrust'
import SampleReceiveIndex from '../pages/soil-sample-manage/sample-receive/SampleReceiveIndex'
import AloneKeepIndex from '../pages/soil-sample-manage/sample-alone-keep/SampleReceiveIndex'
......
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