槽液管理修改

dev-scheduling
jinna 1 month ago
parent 212ccd15ec
commit 7202a33664
  1. 9
      src/api/tankSolutionSystem/resultsCon.js
  2. 186
      src/views/qualityManagement/tankSolutionSystem/workTankLine.vue
  3. 21
      src/views/warehouseManagement/materialMaintenance.vue

@ -89,4 +89,13 @@ export const exportReport = (params) =>{
params, params,
responseType: 'blob', responseType: 'blob',
}) })
}
// 曲线详情
export const getLineDetail = (params) =>{
return request({
url:'/api/blade-desk/QA/LiquidTankWave/detail',
method:'get',
params
})
} }

@ -19,8 +19,8 @@
<el-form :inline="true" v-model="lineForm" label-width="80px"> <el-form :inline="true" v-model="lineForm" label-width="80px">
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="6"> <el-col :span="6">
<el-form-item label="作业中心" prop="workCenterId"> <el-form-item label="作业中心" prop="wcId">
<el-select v-model="lineForm.workCenterId" placeholder="请选择" style="width: 200px;"> <el-select v-model="lineForm.wcId" placeholder="请选择" style="width: 200px;">
<el-option v-for="item in workCenterData" :key="item.id" :label="item.wcName" <el-option v-for="item in workCenterData" :key="item.id" :label="item.wcName"
:value="item.id"></el-option> :value="item.id"></el-option>
</el-select> </el-select>
@ -46,7 +46,7 @@
<div v-if="isShowBox"> <div v-if="isShowBox">
<el-row :gutter="24" id="chartsContainer1"> <el-row :gutter="24" id="chartsContainer1">
<el-col :span="12" v-for="(item,index) in lineData" :key="item.id"> <el-col :span="12" v-for="(item,index) in lineData" :key="item.id">
<div style="width: 100%;height: 240px;" :id="`chart-${index}`"></div> <div style="width: 100%;height: 240px;" :id="`chart-${item.id || index}`"></div>
</el-col> </el-col>
<!-- <el-col :span="12"> <!-- <el-col :span="12">
<div style="width: 100%;height: 240px;" ref="lineChart2"></div> <div style="width: 100%;height: 240px;" ref="lineChart2"></div>
@ -77,22 +77,22 @@
<!-- <div style="width: 33%;margin-bottom: 15px;">槽号{{ detailForm.slotNo }}</div> <!-- <div style="width: 33%;margin-bottom: 15px;">槽号{{ detailForm.slotNo }}</div>
<div style="width: 33%;margin-bottom: 15px;">检测成分{{ detailForm.testName }}</div> --> <div style="width: 33%;margin-bottom: 15px;">检测成分{{ detailForm.testName }}</div> -->
<div style="width: 33%;">曲线时间范围{{ detailForm.lineTime }}</div> <div style="width: 33%;">曲线时间范围{{ detailForm.lineTime }}</div>
<div style="width: 33%;">操作人{{ detailForm.createTime }}</div> <div style="width: 33%;">操作人{{ detailForm.updateUserRealName }}</div>
<div style="width: 33%;">曲线生成时间{{ detailForm.createUser }}</div> <div style="width: 33%;">曲线生成时间{{ detailForm.createTime }}</div>
</div> </div>
</div> </div>
<div style="margin: 20px 0;"> <div style="margin: 20px 0;">
检测曲线 检测曲线
</div> </div>
<div id="chartsContainer1"> <div id="chartsContainer1" style="">
<div style="width: 100%;height: 240px;" v-for="(item,index) in lineData" :key="item.id" :id="`chart-${index}`"></div> <div style="width: 100%;height: 240px;margin-top:30px;" v-for="(item,index) in lineData" :key="item.id" :id="`chart-${item.id || index}`"></div>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {createLineList,generateLine,getLineList,deleteLine} from '@/api/tankSolutionSystem/resultsCon' import {createLineList,generateLine,getLineList,deleteLine,getLineDetail} from '@/api/tankSolutionSystem/resultsCon'
import {getWorkCenter} from '@/api/tankSolutionSystem/info' import {getWorkCenter} from '@/api/tankSolutionSystem/info'
import { detail } from '@/api/flow/flow' import { detail } from '@/api/flow/flow'
import { exportEchartsToPdf } from '@/utils/exportPdf'; // import { exportEchartsToPdf } from '@/utils/exportPdf'; //
@ -248,49 +248,13 @@ export default {
}, },
createLine(){ createLine(){
createLineList({ createLineList({
workCenterId:this.lineForm.workCenterId, workCenterId:this.lineForm.wcId,
createTimeStart:this.lineForm.timeRange && this.lineForm.timeRange.length != 0 ? this.lineForm.timeRange[0] : '', createTimeStart:this.lineForm.timeRange && this.lineForm.timeRange.length != 0 && this.lineForm.timeRange[0] ,
createTimeEnd:this.lineForm.timeRange && this.lineForm.timeRange.length != 0 ? this.lineForm.timeRange[1] : '', createTimeEnd:this.lineForm.timeRange && this.lineForm.timeRange.length != 0 && this.lineForm.timeRange[1] ,
}).then(res =>{ }).then(res =>{
console.log('res--------------',res) console.log('res--------------',res)
this.isShowBox = true this.isShowBox = true
this.lineData = res.data.data.waveData this.lineData = res.data.data.waveData
// this.wareData = res.data.data.records
// this.lineData = [
// {
// workCenterId:"001",
// workCenterName:"A",
// workTankId:"002",
// workTankName:"A",
// testElement:"A",
// date:['2025-12-05','2025-12-06','2025-12-07','2025-12-08','2025-12-09','2025-12-10',],
// max:['10','10','10','10','10','10',],//10
// min: ['5','5','5','5','5','5',],
// targrt:['6','3','2','1','10','15',]
// },
// {
// workCenterId:"001",
// workCenterName:"A",
// workTankId:"002",
// workTankName:"A",
// testElement:"B",
// date:['2025-12-05','2025-12-06','2025-12-07','2025-12-08','2025-12-09','2025-12-10',],
// max:['10','10','10','10','10','10',],//10
// min: ['5','5','5','5','5','5',],
// targrt:['6','3','2','1','10','15',]
// },
// {
// workCenterId:"001",
// workCenterName:"A",
// workTankId:"003",
// workTankName:"B",
// testElement:"C",
// date:['2025-12-05','2025-12-06','2025-12-07','2025-12-08','2025-12-09','2025-12-10',],
// max:['10','10','10','10','10','10',],//10
// min: ['5','5','5','5','5','5',],
// targrt:['6','3','2','1','10','15',]
// }
// ]
this.$nextTick(() =>{ this.$nextTick(() =>{
this.createChart() this.createChart()
}) })
@ -298,12 +262,26 @@ export default {
}, },
createChart(){ createChart(){
console.log('this.lineData',this.lineData)
let globalMax = -Infinity; //
this.lineData.forEach((item, index) => { this.lineData.forEach((item, index) => {
if (item.maxList && item.maxList.length > 0) {
// max
const currentMax = Math.max(...item.maxList);
//
if (currentMax > globalMax) {
globalMax = currentMax;
}
}
console.log('item-----------',item)
const chartId = `chart-${item.id || index}`; const chartId = `chart-${item.id || index}`;
const chartDom = document.getElementById(chartId); const chartDom = document.getElementById(chartId);
console.log('chartDom----------',chartDom)
if (!chartDom) return; if (!chartDom) return;
// ECharts // ECharts
const chart = this.$echarts.init(chartDom); const chart = this.$echarts.init(chartDom);
console.log('chart----------',chart)
const option = { const option = {
title: { title: {
@ -312,8 +290,8 @@ export default {
}, },
legend: { legend: {
show: true, show: true,
orient: "vertical", orient: "horizontal",
right: 'right' right: '0'
}, },
grid: { grid: {
containLabel: true, containLabel: true,
@ -350,7 +328,7 @@ export default {
color: '#000', color: '#000',
fontSize: 14 fontSize: 14
}, },
max: parseInt(item.maxList[0]) + 10, // max: globalMax + 10,
axisTick: { axisTick: {
show: false show: false
}, },
@ -414,14 +392,21 @@ export default {
submit(){ submit(){
const submitParams = this.lineData.map(item =>{ const submitParams = this.lineData.map(item =>{
item.workCenterId = item.wcId item.workCenterId = item.wcId
const {wcId,...submitData} = item const {...submitData} = item
return submitData return submitData
}) })
console.log('submitParams---------',submitParams) console.log('submitParams---------',submitParams)
generateLine(submitParams).then(res =>{ let params = {
wcId:this.lineForm.wcId,
createTimeStart:this.lineForm.timeRange && this.lineForm.timeRange.length != 0 && this.lineForm.timeRange[0],
createTimeEnd:this.lineForm.timeRange && this.lineForm.timeRange.length != 0 && this.lineForm.timeRange[1],
copys:submitParams
}
generateLine(params).then(res =>{
if(res.data.code == 200){ if(res.data.code == 200){
this.$message.success('生成曲线成功') this.$message.success('生成曲线成功')
this.lineBox = false this.lineBox = false
this.lineData = []
this.onLoad() this.onLoad()
} }
}) })
@ -498,51 +483,62 @@ export default {
done(); done();
}, },
handleView(row) { handleView(row) {
this.detailForm = { getLineDetail({
workCenterName:'作业中心B', id:row.id
lineTime:'2025-12-01~2025-12-19', }).then(res =>{
createTime:"111", console.log('res-----------',res)
createUser:"2025-12-19" this.detailForm = res.data.data
} this.lineData = res.data.data.taskCopys
this.lineData = [
{
workCenterId:"001",
workCenterName:"作业中心A",
workTankId:"002",
workTankName:"作业槽A",
testElement:"分析项目A",
date:['2025-12-05','2025-12-06','2025-12-07','2025-12-08','2025-12-09','2025-12-10',],
max:['10','10','10','10','10','10',],//10
min: ['5','5','5','5','5','5',],
targrt:['6','3','2','1','10','15',]
},
{
workCenterId:"001",
workCenterName:"作业中心A",
workTankId:"002",
workTankName:"作业槽A",
testElement:"分析项目B",
date:['2025-12-05','2025-12-06','2025-12-07','2025-12-08','2025-12-09','2025-12-10',],
max:['10','10','10','10','10','10',],//10
min: ['5','5','5','5','5','5',],
targrt:['6','3','2','1','10','15',]
},
{
workCenterId:"001",
workCenterName:"作业中心A",
workTankId:"003",
workTankName:"作业槽B",
testElement:"分析项目C",
date:['2025-12-05','2025-12-06','2025-12-07','2025-12-08','2025-12-09','2025-12-10',],
max:['10','10','10','10','10','10',],//10
min: ['5','5','5','5','5','5',],
targrt:['6','3','2','1','10','15',]
}
]
this.detailBox = true this.detailBox = true
this.$nextTick(() =>{ this.$nextTick(() =>{
this.createChart() this.createChart()
}) })
})
// this.detailForm = {
// workCenterName:'B',
// lineTime:'2025-12-01~2025-12-19',
// createTime:"111",
// createUser:"2025-12-19"
// }
// this.lineData = [
// {
// workCenterId:"001",
// workCenterName:"A",
// workTankId:"002",
// workTankName:"A",
// testElement:"A",
// date:['2025-12-05','2025-12-06','2025-12-07','2025-12-08','2025-12-09','2025-12-10',],
// max:['10','10','10','10','10','10',],//10
// min: ['5','5','5','5','5','5',],
// targrt:['6','3','2','1','10','15',]
// },
// {
// workCenterId:"001",
// workCenterName:"A",
// workTankId:"002",
// workTankName:"A",
// testElement:"B",
// date:['2025-12-05','2025-12-06','2025-12-07','2025-12-08','2025-12-09','2025-12-10',],
// max:['10','10','10','10','10','10',],//10
// min: ['5','5','5','5','5','5',],
// targrt:['6','3','2','1','10','15',]
// },
// {
// workCenterId:"001",
// workCenterName:"A",
// workTankId:"003",
// workTankName:"B",
// testElement:"C",
// date:['2025-12-05','2025-12-06','2025-12-07','2025-12-08','2025-12-09','2025-12-10',],
// max:['10','10','10','10','10','10',],//10
// min: ['5','5','5','5','5','5',],
// targrt:['6','3','2','1','10','15',]
// }
// ]
// this.detailBox = true
// this.$nextTick(() =>{
// this.createChart()
// })
// console.log('row-------------------', row) // console.log('row-------------------', row)
// this.detailForm = row // this.detailForm = row
// let data = row.lineTime.split(' ~ ') // let data = row.lineTime.split(' ~ ')
@ -759,8 +755,8 @@ export default {
current:this.page.currentPage, current:this.page.currentPage,
size:this.page.pageSize, size:this.page.pageSize,
name:this.query.name, name:this.query.name,
createTimeStart:this.query.createTime && this.query.createTime.length != 0 ? this.query.createTime[0] : '', createTimeStart:this.query.createTime && this.query.createTime.length != 0 && this.query.createTime[0],
createTimeEnd:this.query.createTime && this.query.createTime.length != 0 ? this.query.createTime[1] : '', createTimeEnd:this.query.createTime && this.query.createTime.length != 0 && this.query.createTime[1],
}).then(res =>{ }).then(res =>{
this.data = res.data.data.records this.data = res.data.data.records
this.page.total = res.data.data.total this.page.total = res.data.data.total

@ -247,10 +247,15 @@ export default {
if(val.value == 2){ if(val.value == 2){
let tmp = this.option.column.find(item => item.prop == 'minNum') let tmp = this.option.column.find(item => item.prop == 'minNum')
tmp.rules[0].required = true tmp.rules[0].required = true
}else{
let tmp = this.option.column.find(item => item.prop == 'minNum')
tmp.rules[0].required = false
} }
}else{ }else{
let tmp = this.option.column.find(item => item.prop == 'gcId') let tmp = this.option.column.find(item => item.prop == 'gcId')
tmp.rules[0].required = false tmp.rules[0].required = false
let tmp1 = this.option.column.find(item => item.prop == 'minNum')
tmp1.rules[0].required = false
} }
} }
}, },
@ -502,6 +507,22 @@ export default {
this.form.minWarning = this.form.minWarning != '' ? this.form.minWarning : false this.form.minWarning = this.form.minWarning != '' ? this.form.minWarning : false
this.form.reissueType = (this.form.reissueType && this.form.reissueType != -1) ? this.form.reissueType : 0 this.form.reissueType = (this.form.reissueType && this.form.reissueType != -1) ? this.form.reissueType : 0
this.form.gcId = this.form.gcId == -1 ? '' : this.form.gcId this.form.gcId = this.form.gcId == -1 ? '' : this.form.gcId
if(this.form.reissueType != 0){
let tmp = this.option.column.find(item => item.prop == 'gcId')
tmp.rules[0].required = true
if(this.form.reissueType == 2){
let tmp = this.option.column.find(item => item.prop == 'minNum')
tmp.rules[0].required = true
}else{
let tmp = this.option.column.find(item => item.prop == 'minNum')
tmp.rules[0].required = false
}
}else{
let tmp = this.option.column.find(item => item.prop == 'gcId')
tmp.rules[0].required = false
let tmp1 = this.option.column.find(item => item.prop == 'minNum')
tmp1.rules[0].required = false
}
done() done()
}else{ }else{
done() done()

Loading…
Cancel
Save