设备 表格优化

yangwl
A0010407 10 months ago
parent da87612f49
commit 5c2489a7c7

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

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

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

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

Loading…
Cancel
Save