|
@@ -43,28 +43,28 @@
|
|
|
v-model="searchKey"
|
|
|
placeholder="搜索"
|
|
|
width="192"
|
|
|
- @pressEnter="getTableData"
|
|
|
- @clear="getTableData"
|
|
|
+ @pressEnter="getTableDatas"
|
|
|
+ @clear="getTableDatas"
|
|
|
/>
|
|
|
</div>
|
|
|
- <TableGrid
|
|
|
+ <div v-loading="loading">
|
|
|
+ <TableGrid
|
|
|
:width="'100%'"
|
|
|
:border="true"
|
|
|
:setting="true"
|
|
|
:header="header"
|
|
|
:data="sbdata"
|
|
|
@screenHandle="screenHandle"
|
|
|
+ @statusScreenHandle="statusScreenHandle"
|
|
|
:key="tableGridCustom"
|
|
|
render="custom"
|
|
|
>
|
|
|
<template v-for="th in header" #[th.key]="{item}">
|
|
|
<!-- {{item}} -->
|
|
|
<!-- 检测结果 -->
|
|
|
- <span
|
|
|
- :key="th.key"
|
|
|
- class="span-text"
|
|
|
- v-if="item.headerKey == 'testResult'"
|
|
|
- >{{item.item[item.headerKey].text}}</span>
|
|
|
+ <span :key="th.key" class="span-text" v-if="item.headerKey == 'testResult'">
|
|
|
+ {{item.item[item.headerKey].text}}
|
|
|
+ </span>
|
|
|
<!-- 重要检测证件和附件 -->
|
|
|
<span :key="th.key" class="span-text" v-else-if="item.headerKey == 'importantTestImg'">
|
|
|
<section style="width:60px">
|
|
@@ -114,20 +114,20 @@
|
|
|
<!-- 最近一次重要维保完成时间 -->
|
|
|
<span :key="th.key" class="span-text" v-else-if="item.headerKey == 'importantWbTime'">
|
|
|
<span>{{item.item['importantWbTime'].text?formatter(item.item['importantWbTime'].text):'--'}}/</span>
|
|
|
- <span class="codestyle">{{item.item['importantWbTaskCode']}}</span>
|
|
|
+ <span class="codestyle">{{item.item['importantWbTaskCode']|| '--'}}</span>
|
|
|
</span>
|
|
|
<!-- 最近一次重要维修完成时间 -->
|
|
|
<span :key="th.key" class="span-text" v-else-if="item.headerKey == 'importantWxTime'">
|
|
|
<span>{{item.item['importantWxTime'].text?formatter(item.item['importantWxTime'].text):'--'}}/</span>
|
|
|
- <span class="codestyle">{{item.item['importantWxTaskCode']}}</span>
|
|
|
+ <span class="codestyle">{{item.item['importantWxTaskCode'] || '--'}}</span>
|
|
|
</span>
|
|
|
<!-- 最近一次专维完成时间 -->
|
|
|
<span :key="th.key" class="span-text" v-else-if="item.headerKey == 'importantZwTime'">
|
|
|
<span>{{item.item['importantZwTime'].text?formatter(item.item['importantZwTime'].text):'--'}}/</span>
|
|
|
- <span class="codestyle">{{item.item['importantZwTaskCode']}}</span>
|
|
|
+ <span class="codestyle">{{item.item['importantZwTaskCode'] || '--'}}</span>
|
|
|
</span>
|
|
|
<!-- 维保照片 -->
|
|
|
- <span :key="th.key" class="span-text" v-else-if="item.headerKey == 'importantWbimg'">
|
|
|
+ <span :key="th.key" class="span-text" v-else-if="item.headerKey == 'importantWbImg'">
|
|
|
<span
|
|
|
v-if="item.item[item.headerKey].length>0"
|
|
|
class="imgspan"
|
|
@@ -139,7 +139,7 @@
|
|
|
<span v-else>--</span>
|
|
|
</span>
|
|
|
<!-- 报修照片 -->
|
|
|
- <span :key="th.key" class="span-text" v-else-if="item.headerKey == 'importantWximg'">
|
|
|
+ <span :key="th.key" class="span-text" v-else-if="item.headerKey == 'importantWxImg'">
|
|
|
<span
|
|
|
v-if="item.item[item.headerKey].length>0"
|
|
|
class="imgspan"
|
|
@@ -178,6 +178,7 @@
|
|
|
</template>
|
|
|
</TableGrid>
|
|
|
|
|
|
+ </div>
|
|
|
<div class="page">
|
|
|
<el-pagination
|
|
|
background
|
|
@@ -285,7 +286,7 @@
|
|
|
>已完工</Tag>
|
|
|
<span
|
|
|
class="successimg"
|
|
|
- v-if="this.curImg.childimg && this.curImg.childimg.length>0"
|
|
|
+ v-if="this.curImg.childImg && this.curImg.childImg.length>0"
|
|
|
@click.self="lookChildImg"
|
|
|
>
|
|
|
查看完工照片
|
|
@@ -298,7 +299,7 @@
|
|
|
:initial-index="currentIndex"
|
|
|
arrow="always"
|
|
|
>
|
|
|
- <el-carousel-item v-for="item in this.curImg.childimg" :key="item.id">
|
|
|
+ <el-carousel-item v-for="item in this.curImg.childImg" :key="item.id">
|
|
|
<img class="smallimg" :src="item.url" alt />
|
|
|
</el-carousel-item>
|
|
|
</el-carousel>
|
|
@@ -375,7 +376,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- tableGridCustom:0,
|
|
|
+ loading:false,
|
|
|
+ tableGridCustom: 0,
|
|
|
imgUrl: [],
|
|
|
formatter,
|
|
|
changecar: 0,
|
|
@@ -426,15 +428,18 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
key: "equipmentName",
|
|
|
- text: "设备名称"
|
|
|
+ text: "设备名称",
|
|
|
+ width: 320
|
|
|
},
|
|
|
{
|
|
|
key: "equipmentCode",
|
|
|
- text: "设备内码"
|
|
|
+ text: "设备内码",
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
key: "testResult",
|
|
|
text: "重要检测结果",
|
|
|
+ width: 140,
|
|
|
screen: {
|
|
|
open: true,
|
|
|
status: "multiple", // 筛选4种状态【'single', 'multiple', 'singleSearch', 'multipleSearch'】
|
|
@@ -450,6 +455,7 @@ export default {
|
|
|
{
|
|
|
key: "currentStatus",
|
|
|
text: "当前状况",
|
|
|
+ width: 130,
|
|
|
screen: {
|
|
|
open: true,
|
|
|
status: "multiple", // 筛选4种状态【'single', 'multiple', 'singleSearch', 'multipleSearch'】
|
|
@@ -459,19 +465,21 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
key: "importantWbTime",
|
|
|
- text: "最近一次重要维保完成时间/任务编号"
|
|
|
+ text: "最近一次重要维保完成时间/任务编号",
|
|
|
+ width: 240
|
|
|
},
|
|
|
{
|
|
|
- key: "importantWbimg",
|
|
|
+ key: "importantWbImg",
|
|
|
text: "维保照片"
|
|
|
},
|
|
|
{
|
|
|
key: "importantWxTime",
|
|
|
text: "最近一次重要维修完成时间/工单编号",
|
|
|
- checked: "uncheck"
|
|
|
+ checked: "uncheck",
|
|
|
+ width: 240
|
|
|
},
|
|
|
{
|
|
|
- key: "importantWximg",
|
|
|
+ key: "importantWxImg",
|
|
|
text: "报修照片",
|
|
|
checked: "uncheck"
|
|
|
},
|
|
@@ -483,6 +491,7 @@ export default {
|
|
|
{
|
|
|
key: "importantZwTime",
|
|
|
text: "最后一次专维完成时间/任务编号",
|
|
|
+ width: 240,
|
|
|
checked: "uncheck"
|
|
|
},
|
|
|
{
|
|
@@ -542,7 +551,7 @@ export default {
|
|
|
*/
|
|
|
getOrderList() {
|
|
|
const postParams = {};
|
|
|
- queryFxbbOrderArray().then(res => {
|
|
|
+ queryFxbbOrderArray({ postParams }).then(res => {
|
|
|
if (res.result == "success") {
|
|
|
Object.keys(res).forEach(item => {
|
|
|
if (Array.isArray(res[item])) {
|
|
@@ -557,9 +566,17 @@ export default {
|
|
|
this.header[5].screen.data = JSON.parse(
|
|
|
JSON.stringify(res.currentStatus)
|
|
|
);
|
|
|
- this.mainsort = JSON.parse(JSON.stringify(res.mainCheckResult));
|
|
|
+ this.mainsort = JSON.parse(JSON.stringify(res.mainCheckResult)).map(
|
|
|
+ item => {
|
|
|
+ return item.id;
|
|
|
+ }
|
|
|
+ );
|
|
|
this.mainsortbank = JSON.parse(JSON.stringify(res.mainCheckResult));
|
|
|
- this.currentsort = JSON.parse(JSON.stringify(res.currentStatus));
|
|
|
+ this.currentsort = JSON.parse(JSON.stringify(res.currentStatus)).map(
|
|
|
+ item => {
|
|
|
+ return item.id;
|
|
|
+ }
|
|
|
+ );
|
|
|
this.currentsortbank = JSON.parse(JSON.stringify(res.currentStatus));
|
|
|
}
|
|
|
});
|
|
@@ -599,18 +616,16 @@ export default {
|
|
|
},
|
|
|
//重要检测结果筛选
|
|
|
screenHandle() {
|
|
|
+ // ["testResult", "2,3,4,5,6", undefined]
|
|
|
const list = Array.from(arguments);
|
|
|
- this.mainsortcurrentsort = JSON.parse(
|
|
|
- JSON.stringify(list.slice(1, list.length - 1))
|
|
|
- );
|
|
|
+ this.mainsort = list.slice(1, list.length - 1)[0].split(',').map(Number)
|
|
|
+ this.getTableData();
|
|
|
},
|
|
|
//当前状况筛选
|
|
|
statusScreenHandle() {
|
|
|
const list = Array.from(arguments);
|
|
|
- this.currentsort = JSON.parse(
|
|
|
- JSON.stringify(list.slice(1, list.length - 1))
|
|
|
- );
|
|
|
- console.log(list.slice(1, list.length - 1));
|
|
|
+ this.currentsort = list.slice(1, list.length - 1)[0].split(',').map(Number);
|
|
|
+ this.getTableData();
|
|
|
},
|
|
|
/**
|
|
|
* 获取系统列表数据
|
|
@@ -641,14 +656,27 @@ export default {
|
|
|
* 切换系统名称
|
|
|
*/
|
|
|
changeCurSystem(val) {
|
|
|
- console.log("val", val);
|
|
|
+ // console.log("val", val);
|
|
|
this.curPage = 1;
|
|
|
+ this.searchKey = '';
|
|
|
this.tableGridCustom++;
|
|
|
- this.mainsort = JSON.parse(JSON.stringify(this.mainsortbank));
|
|
|
- this.currentsort = JSON.parse(JSON.stringify(this.currentsortbank));
|
|
|
+ this.mainsort = JSON.parse(JSON.stringify(this.mainsortbank)).map(
|
|
|
+ item => {
|
|
|
+ return item.id;
|
|
|
+ }
|
|
|
+ );
|
|
|
+ this.currentsort = JSON.parse(JSON.stringify(this.currentsortbank)).map(
|
|
|
+ item => {
|
|
|
+ return item.id;
|
|
|
+ }
|
|
|
+ );
|
|
|
// 切换设备,重置表头默认全选条件
|
|
|
- this.header[3].screen.data = JSON.parse(JSON.stringify(this.mainsortbank))
|
|
|
- this.header[5].screen.data = JSON.parse(JSON.stringify(this.currentsortbank))
|
|
|
+ this.header[3].screen.data = JSON.parse(
|
|
|
+ JSON.stringify(this.mainsortbank)
|
|
|
+ );
|
|
|
+ this.header[5].screen.data = JSON.parse(
|
|
|
+ JSON.stringify(this.currentsortbank)
|
|
|
+ );
|
|
|
this.getEquipmentOfSystem();
|
|
|
},
|
|
|
/**
|
|
@@ -723,32 +751,56 @@ export default {
|
|
|
*/
|
|
|
changeEquipment(id) {
|
|
|
this.curPage = 1;
|
|
|
- this.tableGridCustom++;
|
|
|
+ this.searchKey = '';
|
|
|
+ this.tableGridCustom++;
|
|
|
_.map(this.systemContentData, o => {
|
|
|
return (o.isActive = o.category_code === id);
|
|
|
});
|
|
|
- this.mainsort = JSON.parse(JSON.stringify(this.mainsortbank));
|
|
|
- this.currentsort = JSON.parse(JSON.stringify(this.currentsortbank));
|
|
|
+ this.mainsort = JSON.parse(JSON.stringify(this.mainsortbank)).map(
|
|
|
+ item => {
|
|
|
+ return item.id;
|
|
|
+ }
|
|
|
+ );
|
|
|
+ this.currentsort = JSON.parse(JSON.stringify(this.currentsortbank)).map(
|
|
|
+ item => {
|
|
|
+ return item.id;
|
|
|
+ }
|
|
|
+ );
|
|
|
// 切换设备,重置表头默认全选条件
|
|
|
- this.header[3].screen.data = JSON.parse(JSON.stringify(this.mainsortbank))
|
|
|
- this.header[5].screen.data = JSON.parse(JSON.stringify(this.currentsortbank))
|
|
|
+ this.header[3].screen.data = JSON.parse(
|
|
|
+ JSON.stringify(this.mainsortbank)
|
|
|
+ );
|
|
|
+ this.header[5].screen.data = JSON.parse(
|
|
|
+ JSON.stringify(this.currentsortbank)
|
|
|
+ );
|
|
|
+ this.getTableData();
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @description 搜索按钮事件
|
|
|
+ */
|
|
|
+ getTableDatas(){
|
|
|
+ this.curPage =1;
|
|
|
this.getTableData();
|
|
|
},
|
|
|
/**
|
|
|
* 获取表数据
|
|
|
*/
|
|
|
getTableData() {
|
|
|
+ this.loading = true;
|
|
|
const postParams = {
|
|
|
category_code: _.find(this.systemContentData, o => {
|
|
|
return o.isActive;
|
|
|
}).category_code,
|
|
|
+ onlyMainAsset: true,
|
|
|
+ testResult: this.mainsort,
|
|
|
+ status: this.currentsort,
|
|
|
plazaId: this.plazaId, //类型:String 必有字段 备注:项目编码
|
|
|
equipmentName: this.searchKey, //设备名称
|
|
|
pageSize: this.pageSize, //类型:Number 必有字段 备注:记录条数
|
|
|
pageNum: this.curPage //类型:Number 必有字段 备注:页码数
|
|
|
};
|
|
|
queryFxbbList({ postParams }).then(res => {
|
|
|
- this.drawtotalcount = res.pageCount;
|
|
|
+ this.tatol = res.pageCount;
|
|
|
const keys1 = ["importantWbTime", "importantWxTime", "importantZwTime"];
|
|
|
const keys2 = ["testResult", "currentStatus"];
|
|
|
//合并状态数组,从中对应ID和name
|
|
@@ -759,20 +811,32 @@ export default {
|
|
|
Object.keys(item).forEach(jtem => {
|
|
|
if (keys1.includes(jtem)) {
|
|
|
item[jtem] = {
|
|
|
- text: item[jtem] || "--"
|
|
|
+ text: item[jtem]
|
|
|
};
|
|
|
}
|
|
|
- if (keys2.includes(jtem)) {
|
|
|
+ if (jtem == "currentStatus") {
|
|
|
+ const obj = this.header[5].screen.data.find(n => {
|
|
|
+ return n.id == item[jtem];
|
|
|
+ });
|
|
|
item[jtem] = {
|
|
|
- text: arrList.find(n => {
|
|
|
- return n.id == item[jtem];
|
|
|
- }).name
|
|
|
+ text: obj.name
|
|
|
+ };
|
|
|
+ }
|
|
|
+ if (jtem == "testResult") {
|
|
|
+ const obj = this.header[3].screen.data.find(n => {
|
|
|
+ return n.id == item[jtem];
|
|
|
+ });
|
|
|
+ item[jtem] = {
|
|
|
+ text: obj.name
|
|
|
};
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
- console.log(res.data);
|
|
|
this.sbdata = JSON.parse(JSON.stringify(res.data));
|
|
|
+ this.loading = false;
|
|
|
+ }).catch( err => {
|
|
|
+ console.log(err);
|
|
|
+ this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
/**
|
|
@@ -992,7 +1056,8 @@ export default {
|
|
|
.filestyspan {
|
|
|
cursor: pointer;
|
|
|
color: #0091ff;
|
|
|
- line-height: 36px;
|
|
|
+ line-height: 25px;
|
|
|
+ display: inline-block;
|
|
|
}
|
|
|
.el-tooltip__popper {
|
|
|
min-width: 120px;
|
|
@@ -1273,7 +1338,12 @@ export default {
|
|
|
/deep/ .el-carousel__indicators {
|
|
|
display: none;
|
|
|
}
|
|
|
-
|
|
|
+/deep/ .p-table-td-last-child{
|
|
|
+ padding-right: 0px !important;
|
|
|
+}
|
|
|
+/deep/ .p-table-header-span{
|
|
|
+ white-space:normal !important;
|
|
|
+}
|
|
|
.imgdes {
|
|
|
padding-left: 10%;
|
|
|
padding-top: 15px;
|