|
|
@@ -36,8 +36,8 @@
|
|
|
<div class="item ww30"
|
|
|
>报工总重量 /{{ row.extInfo.weightUnit }}
|
|
|
</div>
|
|
|
- <div class="item ww30">设备</div>
|
|
|
- <div class="item ww30">炉次号</div>
|
|
|
+ <div class="item ww30" v-if="deviceList.length > 0 && clientEnvironmentId==3">设备</div>
|
|
|
+ <div class="item ww30" v-if="deviceList.length > 0 && clientEnvironmentId==3">炉次号</div>
|
|
|
<div class="item ww30">处置</div>
|
|
|
<div class="item ww10">操作</div>
|
|
|
</div>
|
|
|
@@ -72,7 +72,8 @@
|
|
|
></el-input>
|
|
|
</div>
|
|
|
<!-- 1 -->
|
|
|
- <div class="item ww30">
|
|
|
+ <div class="item ww30" v-if="deviceList.length > 0 && clientEnvironmentId==3">
|
|
|
+ <div v-if="isDetails">{{ it.deviceName }}</div>
|
|
|
<el-select
|
|
|
class="content_num"
|
|
|
v-model="it.deviceId"
|
|
|
@@ -80,7 +81,7 @@
|
|
|
placeholder="请选择"
|
|
|
@change="(e) => selectValBatch(e, row, $index, yyIdx)"
|
|
|
size="mini"
|
|
|
- :disabled="isDetails"
|
|
|
+ v-else
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in deviceList"
|
|
|
@@ -92,13 +93,15 @@
|
|
|
</el-select>
|
|
|
</div>
|
|
|
|
|
|
- <div class="item ww30">
|
|
|
+ <div class="item ww30" v-if="deviceList.length > 0 && clientEnvironmentId==3">
|
|
|
+ <div v-if="isDetails">{{ it.heatNumber }}</div>
|
|
|
<el-input
|
|
|
size="mini"
|
|
|
class="content_num"
|
|
|
v-model="it.heatNumber"
|
|
|
placeholder="请输入炉次号"
|
|
|
:disabled="isDetails"
|
|
|
+ v-else
|
|
|
/>
|
|
|
</div>
|
|
|
<!-- 2 -->
|
|
|
@@ -152,8 +155,8 @@
|
|
|
<div class="item ww20"
|
|
|
>类型
|
|
|
</div>
|
|
|
- <div class="item ww30">设备</div>
|
|
|
- <div class="item ww30">炉次号</div>
|
|
|
+ <div class="item ww30" v-if="deviceList.length > 0 && clientEnvironmentId==3">设备</div>
|
|
|
+ <div class="item ww30" v-if="deviceList.length > 0 && clientEnvironmentId==3">炉次号</div>
|
|
|
<div class="item ww30">处置/原因</div>
|
|
|
<div class="item ww10">操作</div>
|
|
|
</div>
|
|
|
@@ -211,7 +214,8 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 1 -->
|
|
|
- <div class="item ww30">
|
|
|
+ <div class="item ww30" v-if="deviceList.length > 0 && clientEnvironmentId==3">
|
|
|
+ <div v-if="isDetails">{{ it.deviceName }}</div>
|
|
|
<el-select
|
|
|
class="content_num"
|
|
|
v-model="it.deviceId"
|
|
|
@@ -220,6 +224,7 @@
|
|
|
@change="(e) => selectValNoBatch(e, row, $index, yyIdx)"
|
|
|
size="mini"
|
|
|
:disabled="isDetails"
|
|
|
+ v-else
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in deviceList"
|
|
|
@@ -231,12 +236,14 @@
|
|
|
</el-select>
|
|
|
</div>
|
|
|
|
|
|
- <div class="item ww30">
|
|
|
+ <div class="item ww30" v-if="deviceList.length > 0 && clientEnvironmentId==3">
|
|
|
+ <div v-if="isDetails">{{ it.heatNumber }}</div>
|
|
|
<el-input
|
|
|
size="mini"
|
|
|
class="content_num"
|
|
|
v-model="it.heatNumber"
|
|
|
placeholder="请输入炉次号"
|
|
|
+ v-else
|
|
|
:disabled="isDetails"
|
|
|
/>
|
|
|
</div>
|
|
|
@@ -356,7 +363,7 @@
|
|
|
</el-table-column>
|
|
|
|
|
|
<!-- <el-table-column
|
|
|
- v-if="deviceList.length > 0"
|
|
|
+ v-if="deviceList.length > 0 && clientEnvironmentId!=3"
|
|
|
width="140"
|
|
|
label="设备"
|
|
|
prop="deviceId"
|
|
|
@@ -384,7 +391,7 @@
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column
|
|
|
- v-if="deviceList.length > 0"
|
|
|
+ v-if="deviceList.length > 0 && clientEnvironmentId!=3"
|
|
|
label="炉次号"
|
|
|
width="90"
|
|
|
prop="heatNumber"
|
|
|
@@ -459,18 +466,26 @@
|
|
|
immediate: true,
|
|
|
deep: true,
|
|
|
handler(newVal) {
|
|
|
- console.log('cccccc',newVal)
|
|
|
-
|
|
|
//设备下拉框数据来源
|
|
|
let newData=JSON.parse(JSON.stringify(newVal))
|
|
|
- // this.deviceList = newData;
|
|
|
- this.deviceArr(newData)
|
|
|
+
|
|
|
+ if(this.isDetails){
|
|
|
+ this.deviceList = newData;
|
|
|
+ }else{
|
|
|
+ this.deviceArr(newData)
|
|
|
+ }
|
|
|
+ //
|
|
|
|
|
|
this.changeHeatNumber();
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+ computed: {
|
|
|
+ clientEnvironmentId() {
|
|
|
+ return this.$store.state.user.info.clientEnvironmentId;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
data() {
|
|
|
return {
|
|
|
deviceList: [],
|
|
|
@@ -502,8 +517,25 @@
|
|
|
|
|
|
};
|
|
|
},
|
|
|
-
|
|
|
+ mounted(){
|
|
|
+ this.theFirst()
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ theFirst(){
|
|
|
+ if(this.deviceList.length>0){
|
|
|
+ let obj = this.deviceList[0];
|
|
|
+
|
|
|
+ this.list.map((item,index)=>{
|
|
|
+ this.$set(this.list[index].extInfo.batchReportInfo[0],'deviceName',obj.name)
|
|
|
+ this.$set(this.list[index].extInfo.batchReportInfo[0], 'heatNumber',obj.extInfo.heatNumber)
|
|
|
+ this.$set(this.list[index].extInfo.batchReportInfo[0],'deviceId',obj.instanceId)
|
|
|
+ this.$set(this.list[index].extInfo.notBatchReportInfo[0],'deviceName',obj.name)
|
|
|
+ this.$set(this.list[index].extInfo.notBatchReportInfo[0], 'heatNumber',obj.extInfo.heatNumber)
|
|
|
+ this.$set(this.list[index].extInfo.notBatchReportInfo[0],'deviceId',obj.instanceId)
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
getTaskFn() {
|
|
|
getTaskInstanceList(this.item.workOrderId).then((res) => {
|
|
|
this.stepsList = res;
|
|
|
@@ -523,8 +555,11 @@
|
|
|
obj.extInfo.heatNumber
|
|
|
);
|
|
|
},
|
|
|
+ //碳谷
|
|
|
selectValBatch(e, item, idx,bidx){
|
|
|
let obj = this.deviceList.find((f) => f.id||f.instanceId == e);
|
|
|
+ console.log('aaa',e, item, idx,bidx)
|
|
|
+ console.log('cccc',obj)
|
|
|
//设备名称
|
|
|
this.$set(this.list[idx].extInfo.batchReportInfo[bidx],'deviceName',obj.name)
|
|
|
//炉次号
|
|
|
@@ -549,10 +584,11 @@
|
|
|
})
|
|
|
|
|
|
this.deviceList = data;
|
|
|
- if (this.deviceList.length > 0) {
|
|
|
+ console.log('1111',this.deviceList)
|
|
|
+ if (this.deviceList.length == 0) {
|
|
|
this.list.forEach((o,index) => {
|
|
|
|
|
|
- //合格分批设备炉次号
|
|
|
+ //碳谷合格分批设备炉次号
|
|
|
o.extInfo.batchReportInfo.map((report,ridx)=>{
|
|
|
this.$set(this.list[index].extInfo.batchReportInfo[ridx],'deviceName',this.deviceList[0].name)
|
|
|
this.$set(this.list[index].extInfo.batchReportInfo[ridx],'deviceId',this.deviceList[0].id||this.deviceList[0].instanceId)
|
|
|
@@ -561,7 +597,7 @@
|
|
|
this.$set(this.list[index].extInfo.notBatchReportInfo[noidx],'deviceName',this.deviceList[0].name)
|
|
|
this.$set(this.list[index].extInfo.notBatchReportInfo[noidx],'deviceId',this.deviceList[0].id||this.deviceList[0].instanceId)
|
|
|
})
|
|
|
- //合格分批设备炉次号
|
|
|
+ //碳谷合格分批设备炉次号
|
|
|
this.$forceUpdate();
|
|
|
|
|
|
})
|
|
|
@@ -579,7 +615,7 @@
|
|
|
// o.extInfo.heatNumber = f.extInfo.heatNumber;
|
|
|
this.$set(this.list[index].extInfo,'heatNumber',f.extInfo.heatNumber)
|
|
|
|
|
|
- //合格分批设备炉次号
|
|
|
+ //碳谷合格分批设备炉次号
|
|
|
o.extInfo.batchReportInfo.map((report,ridx)=>{
|
|
|
if(report.deviceId==f.instanceId){
|
|
|
this.$set(this.list[index].extInfo.batchReportInfo[ridx],'heatNumber',f.extInfo.heatNumber)
|
|
|
@@ -590,23 +626,22 @@
|
|
|
this.$set(this.list[index].extInfo.notBatchReportInfo[noidx],'heatNumber',f.extInfo.heatNumber)
|
|
|
}
|
|
|
})
|
|
|
- //合格分批设备炉次号
|
|
|
this.$forceUpdate();
|
|
|
|
|
|
} else if (this.deviceList.length == 1) {
|
|
|
- o['deviceId'] = this.deviceList[0].id;
|
|
|
+ // o['deviceId'] = this.deviceList[0].instanceId;
|
|
|
// o.extInfo.heatNumber = this.deviceList[0].extInfo.heatNumber;
|
|
|
this.$set(this.list[index].extInfo,'heatNumber',this.deviceList[0].extInfo.heatNumber)
|
|
|
|
|
|
- //合格分批设备炉次号
|
|
|
+ //碳谷合格分批设备炉次号
|
|
|
o.extInfo.batchReportInfo.map((report,ridx)=>{
|
|
|
- this.$set(this.list[index].extInfo.batchReportInfo[ridx],'deviceId',this.deviceList[0].id)
|
|
|
+ this.$set(this.list[index].extInfo.batchReportInfo[ridx],'deviceId',this.deviceList[0].instanceId)
|
|
|
this.$set(this.list[index].extInfo.batchReportInfo[ridx],'heatNumber',this.deviceList[0].extInfo.heatNumber)
|
|
|
this.$set(this.list[index].extInfo.batchReportInfo[ridx],'deviceName',this.deviceList[0].extInfo.name)
|
|
|
})
|
|
|
- //合格分批设备炉次号
|
|
|
+ //碳谷合格分批设备炉次号
|
|
|
o.extInfo.notBatchReportInfo.map((noReport,noidx)=>{
|
|
|
- this.$set(this.list[index].extInfo.notBatchReportInfo[noidx],'deviceId',this.deviceList[0].id)
|
|
|
+ this.$set(this.list[index].extInfo.notBatchReportInfo[noidx],'deviceId',this.deviceList[0].instanceId)
|
|
|
this.$set(this.list[index].extInfo.notBatchReportInfo[noidx],'heatNumber',this.deviceList[0].extInfo.heatNumber)
|
|
|
this.$set(this.list[index].extInfo.notBatchReportInfo[noidx],'deviceName',this.deviceList[0].extInfo.name)
|
|
|
})
|