填写记录优化

master
wws 1 year ago
parent 70739f0f4b
commit d06d2f76b2

@ -359,73 +359,54 @@
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="记录"> <el-tab-pane label="记录">
<!-- 设备 --> <el-table
<el-row> :data="recordList"
<el-col :offset="9" :span="6"> border
<el-form-item label="设备名称:"> style="width: 100%">
{{ this.form.equipmentName }} <el-table-column
</el-form-item> prop="itemName"
</el-col> label="检查项"
</el-row> >
<div v-for="(detail,detailIndex) in form.detailList" :key="detailIndex"> </el-table-column>
<!-- 检查项 --> <el-table-column
<el-row> prop="standardName"
<el-col :span="6"> label="标准名称"
<el-form-item label="检查项:"> >
{{ detail.itemName }} </el-table-column>
</el-form-item> <el-table-column
</el-col> prop="detailReach"
</el-row> label="是否达标">
<div v-for="(standard,standardIndex) in detail.standardList" :key="standardIndex"> <template slot-scope="scope">
<div v-if="standard.standardType == 'qualitative' "> <el-select v-model="scope.row.detailReach" placeholder="请选择">
<!-- 标准 --> <el-option
<el-row> v-for="item in dict.type.device_reach_standard"
<el-col :span="6"> :key="item.value"
<el-form-item label="标准:"> :label="item.label"
{{ standard.standardName }} :value="item.value">
</el-form-item> </el-option>
</el-col> </el-select>
<el-col :span="9"> </template>
<el-form-item label="是否达标:"> </el-table-column>
<el-radio v-model="standard.detailReach" label="0"></el-radio> <el-table-column
<el-radio v-model="standard.detailReach" label="1"></el-radio> prop="detailUpLimit"
</el-form-item> label="上限">
</el-col> </el-table-column>
</el-row> <el-table-column
</div> prop="detailDownLimit"
<div v-else> label="下限">
<!-- 标准 --> </el-table-column>
<el-row> <el-table-column
<el-col :span="5"> prop="actualValue"
<el-form-item label="标准:"> label="实际值">
{{ standard.standardName }} <template slot-scope="scope">
</el-form-item> <el-input v-if="scope.row.standardType == 'quantify' " size="small" v-model="scope.row.actualValue" @change="handleEdit(scope.$index,scope.row)"></el-input>
</el-col> </template>
<el-col :span="4"> </el-table-column>
<el-form-item label="上限:"> <el-table-column
{{ standard.detailUpLimit }} prop="detailUnit"
</el-form-item> label="单位">
</el-col> </el-table-column>
<el-col :span="4"> </el-table>
<el-form-item label="下限:">
{{ standard.detailDownLimit }}
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="单位:">
{{ standard.detailUnit }}
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="实际值:">
<el-input v-model="standard.actualValue" placeholder="请输入实际值"></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
</div>
<el-divider></el-divider>
</div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="工单信息修改"> <el-tab-pane label="工单信息修改">
<el-row> <el-row>
@ -475,9 +456,11 @@ import {
export default { export default {
name: "DeviceOrder", name: "DeviceOrder",
dicts: ['device_order_status', 'device_loop_type'], dicts: ['device_order_status', 'device_loop_type','device_reach_standard'],
data() { data() {
return { return {
//
recordList: [],
// //
loading: true, loading: true,
// //
@ -614,11 +597,18 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
this.recordList = [];
const orderCode = row.orderCode || this.ids const orderCode = row.orderCode || this.ids
getDeviceOrder(orderCode).then(response => { getDeviceOrder(orderCode).then(response => {
this.form = response.data; this.form = response.data;
console.log("这里是回显信息") console.log("这里是回显信息")
console.log(response.data) console.log(response.data)
for (let i = 0; i < this.form.detailList.length; i++) {
for (let j = 0; j < this.form.detailList[i].standardList.length; j++) {
this.form.detailList[i].standardList[j].itemName = this.form.detailList[i].itemName;
this.recordList.push(this.form.detailList[i].standardList[j]);
}
}
this.open = true; this.open = true;
this.title = "填写记录"; this.title = "填写记录";
}); });

@ -363,76 +363,54 @@
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="记录"> <el-tab-pane label="记录">
<!-- 设备 --> <el-table
<el-row> :data="recordList"
<el-col :offset="9" :span="6"> border
<el-form-item label="设备名称:"> style="width: 100%">
{{ this.form.equipmentName }} <el-table-column
</el-form-item> prop="itemName"
</el-col> label="检查项"
</el-row> >
<div v-for="(detail,detailIndex) in form.detailList" :key="detailIndex"> </el-table-column>
<!-- 检查项 --> <el-table-column
<el-row> prop="standardName"
<el-col :span="6"> label="标准名称"
<el-form-item label="检查项:"> >
{{ detail.itemName }} </el-table-column>
</el-form-item> <el-table-column
</el-col> prop="detailReach"
</el-row> label="是否达标">
<div v-for="(standard,standardIndex) in detail.standardList" :key="standardIndex"> <template slot-scope="scope">
<div v-if="standard.standardType == 'qualitative' "> <el-select v-model="scope.row.detailReach" placeholder="请选择">
<!-- 标准 --> <el-option
<el-row> v-for="item in dict.type.device_reach_standard"
<el-col :span="6"> :key="item.value"
<el-form-item label="标准:"> :label="item.label"
{{ standard.standardName }} :value="item.value">
</el-form-item> </el-option>
</el-col> </el-select>
<el-col :span="9"> </template>
<el-form-item label="是否达标:"> </el-table-column>
<el-radio v-model="standard.detailReach" label="0"></el-radio> <el-table-column
<el-radio v-model="standard.detailReach" label="1"></el-radio> prop="detailUpLimit"
</el-form-item> label="上限">
</el-col> </el-table-column>
<el-col v-if="false" :span="2"> <el-table-column
<el-button type="primary" icon="el-icon-picture" circle @click="imgDialog = true"></el-button> prop="detailDownLimit"
</el-col> label="下限">
</el-row> </el-table-column>
</div> <el-table-column
<div v-else> prop="actualValue"
<!-- 标准 --> label="实际值">
<el-row> <template slot-scope="scope">
<el-col :span="5"> <el-input v-if="scope.row.standardType == 'quantify' " size="small" v-model="scope.row.actualValue" @change="handleEdit(scope.$index,scope.row)"></el-input>
<el-form-item label="标准:"> </template>
{{ standard.standardName }} </el-table-column>
</el-form-item> <el-table-column
</el-col> prop="detailUnit"
<el-col :span="4"> label="单位">
<el-form-item label="上限:"> </el-table-column>
{{ standard.detailUpLimit }} </el-table>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="下限:">
{{ standard.detailDownLimit }}
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="单位:">
{{ standard.detailUnit }}
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="实际值:">
<el-input v-model="standard.actualValue" placeholder="请输入实际值"></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
</div>
<el-divider></el-divider>
</div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="工单信息修改"> <el-tab-pane label="工单信息修改">
<el-row> <el-row>
@ -478,11 +456,13 @@ import {getWorkCenter} from "@/api/device/plan";
export default { export default {
name: "SpotInspectionOrder", name: "SpotInspectionOrder",
dicts: ['device_order_status', 'device_loop_type'], dicts: ['device_order_status', 'device_loop_type','device_reach_standard'],
data() { data() {
return { return {
dialogImageUrl: '', dialogImageUrl: '',
dialogVisible: false, dialogVisible: false,
//
recordList: [],
disabled: false, disabled: false,
// //
imgDialog: false, imgDialog: false,
@ -654,6 +634,12 @@ export default {
if (response.data.timeArray[0] == null) { if (response.data.timeArray[0] == null) {
response.data.timeArray = []; response.data.timeArray = [];
} }
for (let i = 0; i < this.form.detailList.length; i++) {
for (let j = 0; j < this.form.detailList[i].standardList.length; j++) {
this.form.detailList[i].standardList[j].itemName = this.form.detailList[i].itemName;
this.recordList.push(this.form.detailList[i].standardList[j]);
}
}
this.open = true; this.open = true;
this.title = "填写记录"; this.title = "填写记录";
}); });

@ -745,73 +745,54 @@
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="记录"> <el-tab-pane label="记录">
<!-- 设备 --> <el-table
<el-row> :data="recordList"
<el-col :offset="9" :span="6"> border
<el-form-item label="设备名称:"> style="width: 100%">
{{ this.form.equipmentName }} <el-table-column
</el-form-item> prop="itemName"
</el-col> label="检查项"
</el-row> >
<div v-for="(detail,detailIndex) in form.detailList" :key="detailIndex"> </el-table-column>
<!-- 检查项 --> <el-table-column
<el-row> prop="standardName"
<el-col :span="6"> label="标准名称"
<el-form-item label="检查项:"> >
{{ detail.itemName }} </el-table-column>
</el-form-item> <el-table-column
</el-col> prop="detailReach"
</el-row> label="是否达标">
<div v-for="(standard,standardIndex) in detail.standardList" :key="standardIndex"> <template slot-scope="scope">
<div v-if="standard.standardType == 'qualitative' "> <el-select v-model="scope.row.detailReach" placeholder="请选择">
<!-- 标准 --> <el-option
<el-row> v-for="item in dict.type.device_reach_standard"
<el-col :span="6"> :key="item.value"
<el-form-item label="标准:"> :label="item.label"
{{ standard.standardName }} :value="item.value">
</el-form-item> </el-option>
</el-col> </el-select>
<el-col :span="9"> </template>
<el-form-item label="是否达标:"> </el-table-column>
<el-radio v-model="standard.detailReach" label="0"></el-radio> <el-table-column
<el-radio v-model="standard.detailReach" label="1"></el-radio> prop="detailUpLimit"
</el-form-item> label="上限">
</el-col> </el-table-column>
</el-row> <el-table-column
</div> prop="detailDownLimit"
<div v-else> label="下限">
<!-- 标准 --> </el-table-column>
<el-row> <el-table-column
<el-col :span="5"> prop="actualValue"
<el-form-item label="标准:"> label="实际值">
{{ standard.standardName }} <template slot-scope="scope">
</el-form-item> <el-input v-if="scope.row.standardType == 'quantify' " size="small" v-model="scope.row.actualValue" @change="handleEdit(scope.$index,scope.row)"></el-input>
</el-col> </template>
<el-col :span="4"> </el-table-column>
<el-form-item label="上限:"> <el-table-column
{{ standard.detailUpLimit }} prop="detailUnit"
</el-form-item> label="单位">
</el-col> </el-table-column>
<el-col :span="4"> </el-table>
<el-form-item label="下限:">
{{ standard.detailDownLimit }}
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="单位:">
{{ standard.detailUnit }}
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="实际值:">
<el-input v-model="standard.actualValue" placeholder="请输入实际值"></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
</div>
<el-divider></el-divider>
</div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="备件"> <el-tab-pane label="备件">
<el-table <el-table
@ -898,9 +879,11 @@ import {updateInspectionWork} from "@/api/device/inspectionWork";
export default { export default {
name: "UpkeepOrder", name: "UpkeepOrder",
dicts: ['device_order_status', 'device_loop_type'], dicts: ['device_order_status', 'device_loop_type','device_reach_standard'],
data() { data() {
return { return {
//
recordList: [],
// //
inspect: '0', inspect: '0',
// //
@ -1371,6 +1354,12 @@ export default {
if (response.data.timeArray[0] == null) { if (response.data.timeArray[0] == null) {
response.data.timeArray = [] response.data.timeArray = []
} }
for (let i = 0; i < this.form.detailList.length; i++) {
for (let j = 0; j < this.form.detailList[i].standardList.length; j++) {
this.form.detailList[i].standardList[j].itemName = this.form.detailList[i].itemName;
this.recordList.push(this.form.detailList[i].standardList[j]);
}
}
this.open = true; this.open = true;
this.title = "填写记录"; this.title = "填写记录";
}); });

Loading…
Cancel
Save