设备 表格优化

yangwl
A0010407 1 year ago
parent da87612f49
commit 5c2489a7c7

@ -312,11 +312,12 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="openCheck" :visible.sync="openCheck"
width="1000px" width="1100px"
append-to-body append-to-body
v-if="openCheck"
> >
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-tabs type="border-card" :key="new Date().getTime()"> <el-tabs type="border-card">
<el-tab-pane label="基本信息"> <el-tab-pane label="基本信息">
<el-descriptions <el-descriptions
:column="3" :column="3"
@ -386,6 +387,26 @@
</el-table-column> </el-table-column>
<el-table-column prop="detailUnit" label="单位" width="47"> <el-table-column prop="detailUnit" label="单位" width="47">
</el-table-column> </el-table-column>
<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>
</template>
</el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="审核"> <el-tab-pane label="审核">
@ -610,8 +631,9 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="viewCheck" :visible.sync="viewCheck"
width="1000px" width="1100px"
append-to-body append-to-body
v-if="viewCheck"
> >
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-tabs type="border-card" :key="new Date().getTime()"> <el-tabs type="border-card" :key="new Date().getTime()">
@ -663,13 +685,9 @@
:column="1" :column="1"
border border
:contentStyle="CS" :contentStyle="CS"
:label-style="LSP2" :label-style="LSP"
> >
<el-descriptions-item <el-descriptions-item label="故障图片">
label="故障图片"
:contentStyle="CS"
:label-style="LSP"
>
<el-image <el-image
v-for="(item, index) in urlLists" v-for="(item, index) in urlLists"
:key="index" :key="index"
@ -704,15 +722,40 @@
</el-table-column> </el-table-column>
<el-table-column prop="detailUnit" label="单位" width="47"> <el-table-column prop="detailUnit" label="单位" width="47">
</el-table-column> </el-table-column>
<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>
</template>
</el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="报修审核结果"> <el-tab-pane label="报修审核结果">
<el-descriptions <el-descriptions
:column="2" :column="3"
border border
:contentStyle="CS"
:label-style="LS"
v-if="form.repairDestination == '计划性维修'" v-if="form.repairDestination == '计划性维修'"
> >
<el-descriptions-item label="审核结果">{{
form.orderStatus
}}</el-descriptions-item>
<el-descriptions-item label="报修去向">{{ <el-descriptions-item label="报修去向">{{
form.repairDestination form.repairDestination
}}</el-descriptions-item> }}</el-descriptions-item>
@ -935,8 +978,9 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="openView" :visible.sync="openView"
width="1000px" width="1100px"
append-to-body append-to-body
v-if="openView"
> >
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-tabs type="border-card" :key="new Date().getTime()"> <el-tabs type="border-card" :key="new Date().getTime()">
@ -1009,6 +1053,26 @@
</el-table-column> </el-table-column>
<el-table-column prop="detailUnit" label="单位" width="47"> <el-table-column prop="detailUnit" label="单位" width="47">
</el-table-column> </el-table-column>
<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>
</template>
</el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@ -1046,6 +1110,7 @@ export default {
}, },
LS: { LS: {
"text-align": "center", "text-align": "center",
width: "110px",
}, },
LSP: { LSP: {
"text-align": "center", "text-align": "center",
@ -1270,7 +1335,9 @@ export default {
// //
reset() { reset() {
this.form = { this.form = {
fileList: "", //
fileList: null,
//
orderId: null, orderId: null,
orderCode: null, orderCode: null,
equipmentCode: null, equipmentCode: null,
@ -1354,27 +1421,28 @@ export default {
const orderId = row.orderId || this.ids; const orderId = row.orderId || this.ids;
getFaultReport(orderId).then((response) => { getFaultReport(orderId).then((response) => {
this.form = response.data; this.form = response.data;
//
if (response.data.files != null) { if (response.data.files != null) {
var newFiles = []; var newFiles = [];
console.log("1", response.data.files);
response.data.files.forEach((item) => { response.data.files.forEach((item) => {
var newFile = {}; var newFile = {};
console.log("2", response.data.files);
newFile.name = item.fileName; newFile.name = item.fileName;
newFile.url = item.fileAddress; newFile.url = item.fileAddress;
newFiles.push(newFile); newFiles.push(newFile);
}); });
this.form.fileList = newFiles; this.form.fileList = newFiles;
//
this.urlLists = null;
var urlLists = []; var urlLists = [];
this.form.fileList.forEach((item) => { this.form.fileList.forEach((item) => {
urlLists.push(item.url); urlLists.push(item.url);
}); });
this.urlLists = urlLists; this.urlLists = urlLists;
console.log("2222222222", this.urlLists);
} else if (response.data.files == null) { } else if (response.data.files == null) {
this.urlLists = null; this.urlLists = null;
} }
//
this.checkList = null; this.checkList = null;
this.checkList = response.data.checkList; this.checkList = response.data.checkList;
if (this.checkList != null) { if (this.checkList != null) {
@ -1394,20 +1462,21 @@ export default {
standard.detailReach = item.detailReach; standard.detailReach = item.detailReach;
standard.actualValue = item.actualValue; standard.actualValue = item.actualValue;
standard.standardType = item.standardType; standard.standardType = item.standardType;
//
var standardUrlLists = []; var standardUrlLists = [];
item.picturePaths.forEach((item2) => { if (item.picturePaths != null) {
standardUrlLists.push(item2.fileAddress); item.picturePaths.forEach((item2) => {
}); standardUrlLists.push(item2.fileAddress);
standard.standardUrlLists = standardUrlLists; });
standard.standardUrlLists = standardUrlLists;
standards.push(standard); standards.push(standard);
}
}); });
} }
}); });
this.checkList = standards; this.checkList = standards;
console.log("1111111111", this.checkList); console.log(this.checkList);
} }
this.openView = true; this.openView = true;
@ -1424,6 +1493,7 @@ export default {
}); });
getFaultReport(orderId).then((response) => { getFaultReport(orderId).then((response) => {
this.form = response.data; this.form = response.data;
//
if (response.data.files != null) { if (response.data.files != null) {
var newFiles = []; var newFiles = [];
response.data.files.forEach((item) => { response.data.files.forEach((item) => {
@ -1433,16 +1503,18 @@ export default {
newFiles.push(newFile); newFiles.push(newFile);
}); });
this.form.fileList = newFiles; this.form.fileList = newFiles;
//
this.urlLists = null;
var urlLists = []; var urlLists = [];
this.form.fileList.forEach((item) => { this.form.fileList.forEach((item) => {
urlLists.push(item.url); urlLists.push(item.url);
}); });
this.urlLists = urlLists; this.urlLists = urlLists;
console.log("2222222222", this.urlLists);
} else if (response.data.files == null) { } else if (response.data.files == null) {
this.urlLists = null; this.urlLists = null;
} }
//
this.checkList = null; this.checkList = null;
this.checkList = response.data.checkList; this.checkList = response.data.checkList;
if (this.checkList != null) { if (this.checkList != null) {
@ -1462,20 +1534,21 @@ export default {
standard.detailReach = item.detailReach; standard.detailReach = item.detailReach;
standard.actualValue = item.actualValue; standard.actualValue = item.actualValue;
standard.standardType = item.standardType; standard.standardType = item.standardType;
//
var standardUrlLists = []; var standardUrlLists = [];
item.picturePaths.forEach((item2) => { if (item.picturePaths != null) {
standardUrlLists.push(item2.fileAddress); item.picturePaths.forEach((item2) => {
}); standardUrlLists.push(item2.fileAddress);
standard.standardUrlLists = standardUrlLists; });
standard.standardUrlLists = standardUrlLists;
standards.push(standard); standards.push(standard);
}
}); });
} }
}); });
this.checkList = standards; this.checkList = standards;
console.log("1111111111", this.checkList); console.log(this.checkList);
} }
if ( if (
@ -1570,3 +1643,10 @@ export default {
}, },
}; };
</script> </script>
<style>
.standardUrl_body {
height: 400px;
overflow-y: auto;
}
</style>

@ -751,7 +751,7 @@
append-to-body append-to-body
> >
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-descriptions :column="2" border> <el-descriptions :column="2" border :contentStyle="WCS" :label-style="WLS">
<el-descriptions-item label="设备编号">{{ <el-descriptions-item label="设备编号">{{
form.equipmentCode form.equipmentCode
}}</el-descriptions-item> }}</el-descriptions-item>
@ -794,13 +794,14 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="openWrite" :visible.sync="openWrite"
width="1000px" width="1100px"
append-to-body append-to-body
v-if="openWrite"
> >
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-tabs type="border-card"> <el-tabs type="border-card">
<el-tab-pane label="维修基本信息"> <el-tab-pane label="维修基本信息">
<el-descriptions :column="2" border> <el-descriptions :column="2" border :contentStyle="CS" :label-style="LS">
<el-descriptions-item label="维修工单号">{{ <el-descriptions-item label="维修工单号">{{
form.workCode form.workCode
}}</el-descriptions-item> }}</el-descriptions-item>
@ -863,7 +864,7 @@
}}</el-descriptions-item> }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="1" border> <el-descriptions :column="1" border>
<el-descriptions-item label="维修前故障图片"> <el-descriptions-item label="维修前故障图片" :contentStyle="CS" :label-style="LSP">
<el-image <el-image
v-for="(item, index) in urlBeforeLists" v-for="(item, index) in urlBeforeLists"
:key="index" :key="index"
@ -872,7 +873,7 @@
></el-descriptions-item> ></el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="1" border> <el-descriptions :column="1" border>
<el-descriptions-item label="维修后故障图片"> <el-descriptions-item label="维修后故障图片" :contentStyle="CS" :label-style="LSP">
<el-image <el-image
v-for="(item, index) in urlAfterLists" v-for="(item, index) in urlAfterLists"
:key="index" :key="index"
@ -882,7 +883,7 @@
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="检查项信息"> <el-tab-pane label="检查项信息">
<el-table :data="detailList" border style="width: 100%"> <el-table :data="detailList" border :contentStyle="CS" :label-style="LS">
<el-table-column prop="itemName" label="检查项名称" width="150"> <el-table-column prop="itemName" label="检查项名称" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="itemMethod" label="检查项方法" width="150"> <el-table-column prop="itemMethod" label="检查项方法" width="150">
@ -935,6 +936,27 @@
</el-table-column> </el-table-column>
<el-table-column prop="detailUnit" label="单位" width="50"> <el-table-column prop="detailUnit" label="单位" width="50">
</el-table-column> </el-table-column>
</el-table-column>
<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>
</template>
</el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
@ -1096,6 +1118,28 @@ export default {
dicts: ["device_repair_status"], dicts: ["device_repair_status"],
data() { data() {
return { return {
//
WCS: {
"text-align": "center",
},
WLS: {
"text-align": "center",
width: "200px",
},
CS: {
"text-align": "center",
},
LS: {
"text-align": "center",
width: "200px",
},
//
LSP: {
"text-align": "center",
width: "200px",
},
//
detailList: [],
// //
urlBeforeLists: [], urlBeforeLists: [],
// //
@ -1448,9 +1492,9 @@ export default {
var standards = []; var standards = [];
this.detailList.forEach((item1) => { this.detailList.forEach((item1) => {
// //
if (item1 != null) {
item1.standardList.forEach((item) => { item1.standardList.forEach((item) => {
var standard = {}; var standard = {};
standard.id = item.id;
standard.itemName = item1.itemName; standard.itemName = item1.itemName;
standard.itemMethod = item1.itemMethod; standard.itemMethod = item1.itemMethod;
standard.standardName = item.standardName; standard.standardName = item.standardName;
@ -1459,10 +1503,23 @@ export default {
standard.detailUnit = item.detailUnit; standard.detailUnit = item.detailUnit;
standard.detailReach = item.detailReach; standard.detailReach = item.detailReach;
standard.actualValue = item.actualValue; standard.actualValue = item.actualValue;
//
standard.repairValue = item.repairValue;
standard.repairReach = item.repairReach;
standard.standardType = item.standardType; standard.standardType = item.standardType;
standards.push(standard); //
}); var standardUrlLists = [];
if (item.picturePaths != null) {
item.picturePaths.forEach((item2) => {
standardUrlLists.push(item2.fileAddress);
});
standard.standardUrlLists = standardUrlLists;
standards.push(standard);
}
});
}
}); });
this.detailList = standards; this.detailList = standards;
console.log("111111111111", this.detailList); console.log("111111111111", this.detailList);
} }
@ -1605,6 +1662,11 @@ export default {
.step-body { .step-body {
margin-top: 30px; margin-top: 30px;
} }
.standardUrl_body {
height: 400px;
overflow-y: auto;
}
</style> </style>

@ -55,13 +55,6 @@
> >
</el-form-item> </el-form-item>
<el-row :gutter="10" class="mb8">
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table <el-table
v-loading="loading" v-loading="loading"
:data="sparePartsLedgerList" :data="sparePartsLedgerList"

@ -177,10 +177,6 @@
>导出</el-button >导出</el-button
> >
</el-col> </el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="repairOrderList"> <el-table v-loading="loading" :data="repairOrderList">
@ -346,13 +342,13 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="openView" :visible.sync="openView"
width="1000px" width="1100px"
append-to-body append-to-body
> >
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-tabs type="border-card"> <el-tabs type="border-card">
<el-tab-pane label="报修基本信息"> <el-tab-pane label="报修基本信息">
<el-descriptions :column="3" border> <el-descriptions :column="3" border :contentStyle="CS" :label-style="LS">
<el-descriptions-item label="报修单编号">{{ <el-descriptions-item label="报修单编号">{{
form.orderCode form.orderCode
}}</el-descriptions-item> }}</el-descriptions-item>
@ -394,7 +390,7 @@
}}</el-descriptions-item> }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="1" border> <el-descriptions :column="1" border>
<el-descriptions-item label="维修前故障图片"> <el-descriptions-item label="维修前故障图片" :contentStyle="CS" :label-style="LS">
<el-image <el-image
v-for="(item, index) in urlBeforeLists" v-for="(item, index) in urlBeforeLists"
:key="index" :key="index"
@ -405,7 +401,7 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="维修基本信息"> <el-tab-pane label="维修基本信息">
<el-descriptions :column="2" border> <el-descriptions :column="2" border :contentStyle="CS" :label-style="LS">
<el-descriptions-item label="维修工单号">{{ <el-descriptions-item label="维修工单号">{{
form.workCode form.workCode
}}</el-descriptions-item> }}</el-descriptions-item>
@ -469,7 +465,7 @@
form.workReason form.workReason
}}</el-descriptions-item> }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="1" border> <el-descriptions :column="1" border :contentStyle="CS" :label-style="LS">
<el-descriptions-item label="维修后图片"> <el-descriptions-item label="维修后图片">
<el-image <el-image
v-for="(item, index) in urlAfterLists" v-for="(item, index) in urlAfterLists"
@ -479,17 +475,54 @@
></el-descriptions-item> ></el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="检查项信息"> <el-tab-pane label="检查项信息">
<el-table :data="detailList" border style="width: 100%"> <el-table :data="detailList" border >
<el-table-column prop="itemName" label="检查项名称" width="150"> <el-table-column prop="itemName" label="检查项名称" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="standardName" label="标准名称" width="180"> <el-table-column prop="itemMethod" label="检查项方法" width="150">
</el-table-column>
<el-table-column prop="standardName" label="标准名称" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="standardType" label="标准类型" width="100"> <el-table-column
prop="detailReach"
label="维修前是否达标"
width="67"
>
<template slot-scope="scope">
{{ scope.row.detailReach == "1" ? "达标" : "不达标" }}
</template>
</el-table-column> </el-table-column>
<el-table-column prop="detailReach" label="是否达标" width="50"> <el-table-column
prop="repairReach"
label="维修后是否达标"
width="110"
>
<template scope="scope">
<el-radio-group v-model="scope.row.repairReach">
<el-radio label="1">达标</el-radio>
<el-radio label="0">不达标</el-radio>
</el-radio-group>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="actualValue" label="实际值" width="50"> <el-table-column
prop="actualValue"
label="维修前实际值"
width="50"
>
</el-table-column>
<el-table-column
prop="repairValue"
label="维修后实际值"
width="100"
>
<template slot-scope="scope">
<el-input
size="small"
v-model="scope.row.repairValue"
v-if="scope.row.standardType == 'quantify'"
></el-input>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="detailUpLimit" label="上限" width="50"> <el-table-column prop="detailUpLimit" label="上限" width="50">
</el-table-column> </el-table-column>
@ -497,9 +530,28 @@
</el-table-column> </el-table-column>
<el-table-column prop="detailUnit" label="单位" width="50"> <el-table-column prop="detailUnit" label="单位" width="50">
</el-table-column> </el-table-column>
<el-table-column prop="detailUnit" label="故障图片">
</el-table-column> </el-table-column>
</el-table> <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>
</template>
</el-table-column>
</el-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-form> </el-form>
@ -527,6 +579,16 @@ export default {
dicts: ["device_repair_status"], dicts: ["device_repair_status"],
data() { data() {
return { return {
//
CS: {
"text-align": "center",
},
LS: {
"text-align": "center",
width: "200px",
},
//
detailList: [],
// //
urlBeforeLists: [], urlBeforeLists: [],
// //
@ -554,6 +616,7 @@ export default {
openView: false, openView: false,
// //
queryParams: { queryParams: {
workStatus:"1",
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
orderId: null, orderId: null,
@ -759,25 +822,45 @@ export default {
this.urlAfterLists = urlAfterLists; this.urlAfterLists = urlAfterLists;
} }
//
this.detailList = null;
this.detailList = response.data.detailList; this.detailList = response.data.detailList;
// if (this.detailList != null) {
var standards = []; //
this.detailList.forEach((item1) => { var standards = [];
// this.detailList.forEach((item1) => {
item1.standardList.forEach((item) => { //
var standard = {}; if (item1 != null) {
standard.itemName = item1.itemName; item1.standardList.forEach((item) => {
standard.standardName = item.standardName; var standard = {};
standard.detailUpLimit = item.detailUpLimit; standard.itemName = item1.itemName;
standard.detailDownLimit = item.detailDownLimit; standard.itemMethod = item1.itemMethod;
standard.detailUnit = item.detailUnit; standard.standardName = item.standardName;
standard.detailReach = item.detailReach; standard.detailUpLimit = item.detailUpLimit;
standard.actualValue = item.actualValue; standard.detailDownLimit = item.detailDownLimit;
standard.standardType = item.standardType; standard.detailUnit = item.detailUnit;
standards.push(standard); standard.detailReach = item.detailReach;
standard.actualValue = item.actualValue;
//
standard.repairValue = item.repairValue;
standard.repairReach = item.repairReach;
standard.standardType = item.standardType;
//
var standardUrlLists = [];
if (item.picturePaths != null) {
item.picturePaths.forEach((item2) => {
standardUrlLists.push(item2.fileAddress);
});
standard.standardUrlLists = standardUrlLists;
standards.push(standard);
}
});
}
}); });
});
this.detailList = standards; this.detailList = standards;
console.log("111111111111", this.detailList);
}
// //
this.loading = false; this.loading = false;
@ -800,3 +883,10 @@ export default {
}; };
</script> </script>
<style>
.standardUrl_body {
height: 400px;
overflow-y: auto;
}
</style>

Loading…
Cancel
Save