修改生产界面

master
夜笙歌 8 months ago
parent cfaa8042fa
commit e9a39e25a8

@ -12,13 +12,6 @@ export default {
name: "App", name: "App",
components: { ThemePicker }, components: { ThemePicker },
mounted() { mounted() {
setInterval(()=>{
this.$notify.info({
title: '通知',
message: '通知公告',
duration: 0
});
},60*1000)
}, },
metaInfo() { metaInfo() {
return { return {

@ -41,7 +41,7 @@ export function completeProductPlanDetail(query) {
// 获取图纸 // 获取图纸
export function getPlanDrawings(query) { export function getPlanDrawings(query) {
return request({ return request({
url: '/mes/api/getPlanDrawings', url: '/mes/api/getProductPlanDrawings',
method: 'get', method: 'get',
params: query params: query
}) })

@ -75,8 +75,8 @@
> >
<el-table-column type="expand"> <el-table-column type="expand">
<template slot-scope="props"> <template slot-scope="props">
<div v-for="i in 5"> <div v-for="i in drawingList">
<div style="display: inline-block;width: 50%;text-align: center">{{ '名称' }}</div> <div style="display: inline-block;width: 50%;text-align: center;color:#000">{{ i.attachName }}</div>
<div style="display: inline-block;width: 50%;text-align: center"> <div style="display: inline-block;width: 50%;text-align: center">
<el-button type="text">开始</el-button> <el-button type="text">开始</el-button>
</div> </div>
@ -256,9 +256,17 @@ export default {
form: {}, form: {},
vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100, vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100,
tableData: [], tableData: [],
drawingList: []
} }
}, },
async mounted() { async mounted() {
setInterval(()=>{
this.$notify.info({
title: '通知',
message: '通知公告',
duration: 0
});
},60*1000)
const data = await getProductPlans({pageNum: 1, pageSize: 5}).then(e => { const data = await getProductPlans({pageNum: 1, pageSize: 5}).then(e => {
this.tableData = e.rows this.tableData = e.rows
this.totalNum1 = Math.ceil(e.total / 5) this.totalNum1 = Math.ceil(e.total / 5)
@ -459,13 +467,23 @@ export default {
}) })
}, },
async expandChange(e, rows) { async expandChange(e, rows) {
console.log('rows',rows)
if (rows.length === 0) return if (rows.length === 0) return
console.log(e)
if (rows.length > 1) { if (rows.length > 1) {
this.$refs.table1.toggleRowExpansion(rows[0], false) this.$refs.table1.toggleRowExpansion(rows[0], false)
} }
const data = await getPlanDrawings({planId: e.planId, attachId: e.attachId}) const data = await getPlanDrawings({planId: e.planId, attachId: e.attachId})
console.log(data) console.log(data)
this.tableData = this.tableData.map(v=>{
if(v.planId === e.planId){
return {
...v,
children:data?.data || []
}
}else{
return v
}
})
}, },
// //
getInfo(e) { getInfo(e) {

Loading…
Cancel
Save