维修一个检查项多照片提交

master
A0010407 9 months ago
parent c9d0e531f0
commit c79a9c4d00

@ -799,7 +799,7 @@
<el-dialog
:title="title"
:visible.sync="openWrite"
width="1200px"
width="1500px"
append-to-body
v-if="openWrite"
>
@ -807,10 +807,10 @@
<el-tabs type="border-card">
<el-tab-pane label="维修基本信息">
<el-descriptions
:column="2"
:column="3"
border
:contentStyle="CS"
:label-style="LS"
:contentStyle="CS1"
:label-style="LS1"
>
<el-descriptions-item label="维修工单号">{{
form.workCode
@ -876,8 +876,8 @@
<el-descriptions :column="1" border>
<el-descriptions-item
label="维修前故障图片"
:contentStyle="CS"
:label-style="LSP"
:contentStyle="CS1"
:label-style="LSP1"
>
<el-image
v-for="(item, index) in urlBeforeLists"
@ -889,8 +889,8 @@
<el-descriptions :column="1" border>
<el-descriptions-item
label="维修后故障图片"
:contentStyle="CS"
:label-style="LSP"
:contentStyle="CS1"
:label-style="LSP1"
>
<el-image
v-for="(item, index) in urlAfterLists"
@ -900,6 +900,7 @@
></el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="检查项信息">
<el-table
:data="detailList"
@ -967,24 +968,9 @@
</el-table-column>
<el-table-column prop="detailUnit" label="单位" width="40">
</el-table-column>
<el-table-column prop="picturePath" label="维修后图片" width="60">
<el-table-column prop="picturePath" label="提交图片">
<template slot-scope="scope">
<el-popover placement="right" width="300" trigger="hover">
<div class="standardUrl_body">
<div
v-for="(url, index) in scope.row.standardUrlLists"
:key="index"
>
<el-image :src="url"></el-image>
</div>
</div>
<el-button
slot="reference"
type="primary"
icon="el-icon-picture"
circle
></el-button>
</el-popover>
<FileUpload v-model="scope.row.picturePath" />
</template>
</el-table-column>
</el-table>
@ -1490,15 +1476,28 @@ export default {
CS: {
"text-align": "center",
},
CS1: {
"text-align": "center",
width: "250px",
},
LS: {
"text-align": "center",
width: "225px",
},
LS1: {
"text-align": "center",
width: "250px",
},
//
LSP: {
"text-align": "center",
width: "225px",
},
//
LSP1: {
"text-align": "center",
width: "250px",
},
//
detailList: [],
//
@ -1818,6 +1817,7 @@ export default {
this.openAdd = true;
this.title = "快速工单";
},
/** 填写按钮操作 */
handleWrite(row) {
this.reset();
@ -1894,7 +1894,18 @@ export default {
standard.repairValue = item.repairValue;
standard.repairReach = item.repairReach;
standard.standardType = item.standardType;
//
if (item.picturePaths != null) {
var newFiles = [];
item.picturePaths.forEach((item) => {
var newFile = {};
newFile.name = item.fileName;
newFile.url = item.fileAddress;
newFiles.push(newFile);
});
standard.picturePath = newFiles;
}
//
var standardUrlLists = [];
if (item.picturePaths != null) {
item.picturePaths.forEach((item2) => {
@ -1985,12 +1996,22 @@ export default {
this.form.afterRepairFile
);
}
this.form.faultType = this.form.faultType.join(",");
if (this.form.faultType != null) {
this.form.faultType = this.form.faultType.join(",");
}
console.log(this.form.faultType);
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.workId != null) {
this.form.standardList = this.detailList;
//
this.form.standardList.forEach((item) => {
if (Array.isArray(item.picturePath)) {
item.picturePath = this.listToString(item.picturePath);
}
});
console.log(this.form.standardList);
writeRepairOrder(this.form).then((response) => {
this.openWrite = false;

Loading…
Cancel
Save