Commit c8d6a9bc authored by 旭艳's avatar 旭艳

装配计划维护二期开发-搜索

parent 7c08aa1b
<template>
<div>
content
<div class="tf-mom-web-content">
<header>
<div class="left">
<el-button
:disabled="disabledGenerateUpdates"
@click="generateOrUpdate"
>装配计划生成及更新
</el-button>
<span>提示:双击站位查看站位计划</span>
</div>
<div class="right">
<!-- <el-button @click="exportGantt">导出</el-button> -->
<div class="legnd">
<div v-for="item in planStatusData" :key="item.id">
<span />
<span>{{ item.label }}</span>
</div>
</div>
</div>
</header>
</div>
</template>
<script>
......@@ -10,20 +28,111 @@ export default {
data() {
return {
disabledGenerateUpdates: true,
planStatusData: [],
planStatusLoading: true
}
},
created() {
this.getPlanStatus()
},
mounted() {
},
methods: {
/**
* 装配计划生成及更新
*/
generateOrUpdate() {
// const that = this
// if (that.generateOrUpdateShow) {
// that.$message({
// showClose: true,
// message: '正在更新,请稍后再试',
// type: 'warning'
// })
// } else {
// that.generateOrUpdateShow = true
// }
// that.$refs.gantt.loading = true
// // 如果项目计划状态为已下达
// // 生成
// if (that.projectStatus === 'Y') {
// that.generateProject()
// that.generateOrUpdateShow = false
// // })
// } else {
// // 更新
// // that.initAoLinks()
// that.updateProject()
// }
},
/**
* 获取站位/装配单元计划状态
*/
getPlanStatus() {
this.$utils.getDicListByCode('WRProductionState')
.then((res) => {
this.planStatusData = []
if (res) {
this.planStatusData = res
} else {
this.$message({
showClose: true,
message: res.message,
type: 'error'
})
}
})
.catch((err) => console.error(err))
.finally(() => {
this.$nextTick(() => {
this.planStatusLoading = false
})
})
}
}
}
</script>
<style lang="scss" scoped>
.tf-mom-web-content{
.right {
display: flex;
> .legnd {
display: flex;
position: relative;
> div {
align-items: center;
margin-left: 20px;
display: flex;
> span {
&:first-child {
display: inline-block;
width: 22px;
height: 16px;
margin-right: 6px;
}
&:last-child {
font-size: 10px;
}
}
&:nth-child(1) > span:first-child {
background: #59c4e6;
}
&:nth-child(2) > span:first-child {
background: #fcce10;
}
&:nth-child(3) > span:first-child {
background: #97b552;
}
&:nth-child(4) > span:first-child {
background: rgb(230, 193, 31);
}
}
}
}
}
</style>
......@@ -564,6 +564,41 @@ export default {
' ' +
new Date(date).toTimeString().split(' ')[0]
return text
},
/**
* 修改工期及开工时间
*/
updatePlanTime(item) {
// const that = this
// that.loading = true
// const param = {
// // maxTime: that.getLongTime(),
// // minTime: _min_date,
// minTime: that.start_date,
// parentId: that.$parent.platformId,
// wrProduction: [item]
// }
// // return tooltipData
// this.HttpRequest(`/WrProduction/updatePlanTime`, param, 'post', true)
// .then((res) => {
// if (res.message.includes('成功')) {
// this.$message({
// showClose: true,
// message: '修改成功!',
// type: 'success'
// })
// } else {
// this.$message({
// showClose: true,
// message: res.message,
// type: 'error'
// })
// }
// })
// .catch((err) => console.error(err))
// .finally(() => {
// that.getGanttData()
// })
}
}
}
......
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