|
@@ -4,7 +4,8 @@
|
|
|
<div style="float:right;overflow:hidden;">
|
|
|
<span>当前筛选条件下共{{ page.total || "--" }}设备</span>
|
|
|
</div>
|
|
|
- <el-select v-model="onlyRead" @change="getHeaderData(mess)" style="width:100px;margin-right:20px;vertical-align:bottom;">
|
|
|
+ <el-select v-model="onlyRead" @change="getHeaderData(mess)"
|
|
|
+ style="width:100px;margin-right:20px;vertical-align:bottom;">
|
|
|
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
<el-select v-model="showType" @change="initTable" style="width:100px;margin-right:10px;vertical-align:bottom;">
|
|
@@ -24,30 +25,24 @@
|
|
|
<!-- 二维码弹窗 -->
|
|
|
<qrcode :dialog="myDialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>
|
|
|
<!-- bim坐标弹框 -->
|
|
|
- <bimDialog :dialog="myDialog" :bimcodeobj="bimcodeobj" @closeBIM="closeBIM" :addBody="true" ref="bimdialog"></bimDialog>
|
|
|
- <!-- 型号弹窗 -->
|
|
|
- <firm :mess="{ deviceId: deviceType.assetType }" :firmDataType="firmDataType" ref="firm" @changeFirm="firmChange" :dialog="myDialog"></firm>
|
|
|
- <!-- 供应商合同弹窗 -->
|
|
|
- <supply-dialog ref="supply" @change="supplyChange" :id="id" :dialog="myDialog" />
|
|
|
- <!-- 供应商弹窗 -->
|
|
|
- <supplier-dialog ref="supplier" :firmDataType="firmDataType" @changeSupplier="supplierChange" :dialog="myDialog" />
|
|
|
-
|
|
|
- <guarantee-dialog :id="id" ref="guarantee" @change="guaranteeChange" :dialog="myDialog" />
|
|
|
+ <bimDialog :dialog="myDialog" :bimcodeobj="bimcodeobj" @closeBIM="closeBIM" :addBody="true"
|
|
|
+ ref="bimdialog" :read="onlyRead ? true : false"></bimDialog>
|
|
|
<!-- 上传文件-->
|
|
|
- <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr" :firmDataType="firmDataType"
|
|
|
- :information="information" :infoType="infoType" :dialog="myDialog" />
|
|
|
+ <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr"
|
|
|
+ :firmDataType="firmDataType"
|
|
|
+ :information="information" :infoType="infoType" :dialog="myDialog"/>
|
|
|
<!-- 上传图片-->
|
|
|
- <upload-img-dialog :read="onlyRead ? true : false" @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog" :firmDataType="firmDataType"
|
|
|
- :information="information" :infoType="infoType" />
|
|
|
- <!-- 维修商信息-->
|
|
|
- <maintainer-dialog @changeMaintainer="changeMaintainer" :firmDataType="firmDataType" ref="maintainer" :dialog="myDialog" />
|
|
|
- <insurer-dialog @changeInsurer="changeInsurer" :firmDataType="firmDataType" ref="insurer" :dialog="myDialog" />
|
|
|
- <pic-dialog :read="onlyRead ? true : false" :dialog="myDialog" :keysArr="picsArr" @change="changePics" :firmDataType="firmDataType"
|
|
|
- :information="information" :infoType="infoType" />
|
|
|
- <div class="middle_sty" style="height: 91%; text-align:center" v-show="!mess.deviceId && (!tableData || !tableData.length)">
|
|
|
+ <upload-img-dialog :read="onlyRead ? true : false" @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog"
|
|
|
+ :firmDataType="firmDataType"
|
|
|
+ :information="information" :infoType="infoType"/>
|
|
|
+ <pic-dialog :read="onlyRead ? true : false" :dialog="myDialog" :keysArr="picsArr" @change="changePics"
|
|
|
+ :firmDataType="firmDataType"
|
|
|
+ :information="information" :infoType="infoType"/>
|
|
|
+ <div class="middle_sty" style="height: 91%; text-align:center"
|
|
|
+ v-show="!mess.deviceId && (!tableData || !tableData.length)">
|
|
|
<p>
|
|
|
<i class="icon-wushuju iconfont"></i>
|
|
|
- 请选择设备族
|
|
|
+ 请选择设备类别
|
|
|
</p>
|
|
|
</div>
|
|
|
|
|
@@ -64,8 +59,9 @@
|
|
|
</div>
|
|
|
<details-dialog :iframeSrc="iframeSrc" v-if="myDialog.details" :dialog="myDialog"></details-dialog>
|
|
|
<!-- 关联的系统 -->
|
|
|
- <system-type :device="mess" :curDevice="curDevice" :dialog="myDialog" :type="onlyRead ? 'read' : 'edit'" @change="changeSystemType"
|
|
|
- :list="systemList"></system-type>
|
|
|
+ <system-type :device="mess" :curDevice="curDevice" :dialog="myDialog" :type="onlyRead ? 'read' : 'edit'"
|
|
|
+ @change="changeSystemType"
|
|
|
+ :list="systemList"></system-type>
|
|
|
<!-- 关联资产 -->
|
|
|
<change-rea @changeProperty="changeProperty" :dialog="myDialog" :category="deviceType"></change-rea>
|
|
|
<look-pic :dialog="myDialog" :keysArr="picsArr"></look-pic>
|
|
@@ -78,7 +74,8 @@
|
|
|
。
|
|
|
</el-row>
|
|
|
<el-row style="margin-top:20px;" v-show="updateInputShow">
|
|
|
- <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 8 }" placeholder="请输入内容" v-model="updateInput"></el-input>
|
|
|
+ <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 8 }" placeholder="请输入内容"
|
|
|
+ v-model="updateInput"></el-input>
|
|
|
</el-row>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="myDialog.update = false">取 消</el-button>
|
|
@@ -95,14 +92,16 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
<!-- 维护信息弹窗-->
|
|
|
- <batchDialog ref="batchDialogs" @code="fourVendors" :firmName="firmName" :allObject="allObject" :page="batchPage" :information="information"
|
|
|
- :newEnclosure="newEnclosure" @getAllData="getAllData" @multiples="multiples" @upDataDevice="upDataDevice" />
|
|
|
+ <batchDialog ref="batchDialogs" @code="fourVendors" :firmName="firmName" :allObject="allObject" :page="batchPage"
|
|
|
+ :information="information"
|
|
|
+ :newEnclosure="newEnclosure" @getAllData="getAllData" @multiples="multiples"
|
|
|
+ @upDataDevice="upDataDevice"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { BeatchQueryParam, deleteEquip, getEquipBelongs, queryUpdate, updateEquip } from "@/api/scan/request";
|
|
|
-import { getEquipTableCon, queryEquip } from "@/api/object/equip";
|
|
|
-import { getDataDictionary } from "@/api/dict";
|
|
|
+import {BeatchQueryParam, deleteEquip, getEquipBelongs, queryUpdate, updateEquip} from "@/api/scan/request";
|
|
|
+import {getEquipTableCon, queryEquip} from "@/api/object/equip";
|
|
|
+import {getDataDictionary} from "@/api/dict";
|
|
|
|
|
|
import tools from "@/utils/scan/tools";
|
|
|
import handsonUtils from "@/utils/hasontableUtils";
|
|
@@ -113,12 +112,6 @@ import buildFloor from "@/utils/handsontable/buildFloorData";
|
|
|
|
|
|
import qrcode from "@/components/ledger/lib/qrcode";
|
|
|
import bimDialog from "@/components/ledger/lib/bimDialog";
|
|
|
-import firm from "@/components/dialogs/list/firm";
|
|
|
-import supplyDialog from "@/components/dialogs/list/supplyDialog";
|
|
|
-import supplierDialog from "@/components/dialogs/list/supplierDialog";
|
|
|
-import maintainerDialog from "@/components/dialogs/list/maintainerDialog";
|
|
|
-import insurerDialog from "@/components/dialogs/list/insurerDialog";
|
|
|
-import guaranteeDialog from "@/components/dialogs/list/guaranteeDialog";
|
|
|
import uploadFilesDialog from "@/components/dialogs/list/filesDialog";
|
|
|
import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog";
|
|
|
import picDialog from "@/components/dialogs/list/picDialog";
|
|
@@ -127,12 +120,13 @@ import systemType from "@/components/dialogs/list/systemType";
|
|
|
import myPagination from "@/components/ledger/lib/myPagination";
|
|
|
import detailsDialog from "@/components/ledger/lib/detailsDia";
|
|
|
import changeRea from "@/components/dialogs/changeRea";
|
|
|
-import { mapGetters } from "vuex";
|
|
|
+import {mapGetters} from "vuex";
|
|
|
//图片查看
|
|
|
import lookPic from "@/components/ledger/lib/lookImages";
|
|
|
import Handsontable from "handsontable-pro";
|
|
|
import "handsontable-pro/dist/handsontable.full.css";
|
|
|
import lStorage from "@/utils/localStorage";
|
|
|
+import dataTypeMap from "@/utils/handsontable/dataTypeMap"
|
|
|
//下拉插件
|
|
|
// import "@/assets/js/chosen.jquery.min";
|
|
|
// import "@/assets/js/handsontable-chosen-editor";
|
|
@@ -141,13 +135,7 @@ export default {
|
|
|
props: ["myParam"],
|
|
|
components: {
|
|
|
qrcode, //二维码页面
|
|
|
- firm, //
|
|
|
- supplyDialog,
|
|
|
- supplierDialog,
|
|
|
- guaranteeDialog,
|
|
|
uploadFilesDialog,
|
|
|
- maintainerDialog,
|
|
|
- insurerDialog,
|
|
|
uploadImgDialog,
|
|
|
picDialog,
|
|
|
myPagination,
|
|
@@ -163,17 +151,16 @@ export default {
|
|
|
buildFloor.getData(this.buildFloorData);
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters("layout", ["projectId", "secret", "userId"]),
|
|
|
+ ...mapGetters("layout", ["projectId", "secret", "userId", "group_code"]),
|
|
|
showTypes() {
|
|
|
return this.onlyRead
|
|
|
? [
|
|
|
- { value: "Visible", label: "只看采集信息" },
|
|
|
- { value: "all", label: "全部" }
|
|
|
+ {value: "Visible", label: "只看采集信息"},
|
|
|
+ {value: "all", label: "全部"}
|
|
|
]
|
|
|
: [
|
|
|
- { value: "partInfo", label: "隐藏信息点" },
|
|
|
- { value: "all", label: "全部" },
|
|
|
- { value: "Visible", label: "只看采集信息" }
|
|
|
+ {value: "Visible", label: "只看采集信息"},
|
|
|
+ {value: "all", label: "全部"}
|
|
|
];
|
|
|
},
|
|
|
// batchDate() {
|
|
@@ -216,12 +203,6 @@ export default {
|
|
|
myDialog: {
|
|
|
qrcode: false, //二维码弹窗
|
|
|
bimcode: false, //bim弹窗
|
|
|
- firm: false, //厂商弹窗
|
|
|
- supply: false, //选择供应合同
|
|
|
- supplier: false, //供应商选择
|
|
|
- guarantee: false, //选择保单
|
|
|
- maintainer: false, //选择维修商
|
|
|
- insurer: false, //选择保险公司
|
|
|
uploadFiles: false, //上传文件
|
|
|
uploadImgs: false, //上传单个图片
|
|
|
pic: false, //多个图片
|
|
@@ -254,11 +235,12 @@ export default {
|
|
|
showParts: false,
|
|
|
inputMap: {
|
|
|
flowBuild: {
|
|
|
- inputMode: "D1",
|
|
|
editable: true,
|
|
|
code: "flowBuild",
|
|
|
name: "建筑楼层",
|
|
|
- path: "flowBuild"
|
|
|
+ path: "flowBuild",
|
|
|
+ category: 'STATIC',
|
|
|
+ dataType: "ENUM"
|
|
|
}
|
|
|
}, //信息点和输入方式映射表
|
|
|
updateInputShow: false, //是否显示临时维护输入框
|
|
@@ -326,8 +308,8 @@ export default {
|
|
|
getHeaderData(code) {
|
|
|
let tempParams = this.$route.params;
|
|
|
if (!tempParams.used && tempParams.pageSize) {
|
|
|
- this.page.currentPage = tempParams.pageNo;
|
|
|
- this.page.size = tempParams.pageSize;
|
|
|
+ this.page.currentPage = Number(tempParams.pageNo);
|
|
|
+ this.page.size = Number(tempParams.pageSize);
|
|
|
this.onlyRead = tempParams.readOnly;
|
|
|
tempParams.used = true;
|
|
|
} else {
|
|
@@ -362,7 +344,7 @@ export default {
|
|
|
this.getTableData();
|
|
|
this.getAllData();
|
|
|
// 信息维护
|
|
|
- this.newEnclosure = res.content.filter(i => i.inputMode == "F2");
|
|
|
+ this.newEnclosure = res.content.filter(i => i.dataType == dataTypeMap.ATTACHMENT && i.editable == true);
|
|
|
});
|
|
|
}
|
|
|
},
|
|
@@ -423,6 +405,9 @@ export default {
|
|
|
this.initTable();
|
|
|
}
|
|
|
});
|
|
|
+ } else {
|
|
|
+ this.loading = false;
|
|
|
+ this.$message.info("请选择设备类别!");
|
|
|
}
|
|
|
},
|
|
|
//获取所有主体数据---用于维护信息
|
|
@@ -433,13 +418,6 @@ export default {
|
|
|
cascade: [
|
|
|
{
|
|
|
name: "property"
|
|
|
- // projection: [
|
|
|
- // "Family",
|
|
|
- // "EquipLocalName",
|
|
|
- // "EquipLocalID",
|
|
|
- // "EquipID",
|
|
|
- // "CodeType"
|
|
|
- // ]
|
|
|
},
|
|
|
{
|
|
|
Name: "building",
|
|
@@ -484,7 +462,7 @@ export default {
|
|
|
//获取动态参数
|
|
|
getBatch(data) {
|
|
|
let param = {
|
|
|
- groupCode: "WD",
|
|
|
+ groupCode: this.group_code,
|
|
|
appId: "datacenter",
|
|
|
projectId: this.projectId,
|
|
|
data: []
|
|
@@ -493,14 +471,10 @@ export default {
|
|
|
//一级遍历list
|
|
|
this.tableHeader.map(head => {
|
|
|
//如果一级标签为动态参数或者设定参数放入数据等待请求
|
|
|
- if (
|
|
|
- head.inputMode == "L" ||
|
|
|
- head.inputMode == "L1" ||
|
|
|
- head.inputMode == "L2" ||
|
|
|
- head.inputMode == "M"
|
|
|
- ) {
|
|
|
+ if (head.category != 'STATIC') {
|
|
|
data.map(item => {
|
|
|
let cur = tools.dataForKey(item, head.path);
|
|
|
+
|
|
|
if (cur) {
|
|
|
param.data.push({
|
|
|
objectId: item.id,
|
|
@@ -535,11 +509,10 @@ export default {
|
|
|
item,
|
|
|
head.path,
|
|
|
child.error
|
|
|
- // child.error
|
|
|
- // ? child.value
|
|
|
- // ? "表号功能号格式错误"
|
|
|
- // : "表号功能号不存在"
|
|
|
- // : "暂未采集到实时数据"
|
|
|
+ ? child.value
|
|
|
+ ? "表号功能号格式错误"
|
|
|
+ : "表号功能号不存在"
|
|
|
+ : "暂未采集到实时数据"
|
|
|
);
|
|
|
}
|
|
|
});
|
|
@@ -754,6 +727,7 @@ export default {
|
|
|
// colWidths: 200,
|
|
|
autoColumnSize: true,
|
|
|
language: "zh-CN",
|
|
|
+ fillHandle: 'vertical', //允许纵向填充
|
|
|
manualColumnResize: true,
|
|
|
manualColumnMove: true,
|
|
|
dropdownMenu: [
|
|
@@ -798,7 +772,7 @@ export default {
|
|
|
let infos = this.tableData[trimmedArr[sortArr[rowArr.row]]];
|
|
|
this.getInfors(
|
|
|
infos,
|
|
|
- { row: sortArr[rowArr.row], col: rowArr.col },
|
|
|
+ {row: sortArr[rowArr.row], col: rowArr.col},
|
|
|
el
|
|
|
);
|
|
|
} else if (isSort) {
|
|
@@ -807,14 +781,14 @@ export default {
|
|
|
let infos = this.tableData[sortArr[rowArr.row]];
|
|
|
this.getInfors(
|
|
|
infos,
|
|
|
- { row: sortArr[rowArr.row], col: rowArr.col },
|
|
|
+ {row: sortArr[rowArr.row], col: rowArr.col},
|
|
|
el
|
|
|
);
|
|
|
} else if (trimmedArr.length) {
|
|
|
let infos = this.tableData[trimmedArr[rowArr.row]];
|
|
|
this.getInfors(
|
|
|
infos,
|
|
|
- { row: trimmedArr[rowArr.row], col: rowArr.col },
|
|
|
+ {row: trimmedArr[rowArr.row], col: rowArr.col},
|
|
|
el
|
|
|
);
|
|
|
} else {
|
|
@@ -858,7 +832,7 @@ export default {
|
|
|
let param = [];
|
|
|
params.map(item => {
|
|
|
this.deleteCode = item.classCode;
|
|
|
- param.push({ id: item.id });
|
|
|
+ param.push({id: item.id});
|
|
|
});
|
|
|
this.$confirm("此操作将删除设备,是否继续?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
@@ -877,16 +851,17 @@ export default {
|
|
|
async removeDevice(param) {
|
|
|
await deleteEquip(param, res => {
|
|
|
this.$message.success("删除成功");
|
|
|
- this.$emit("close", { code: this.deleteCode });
|
|
|
+ this.$emit("close", {code: this.deleteCode});
|
|
|
// this.getTableData()
|
|
|
});
|
|
|
},
|
|
|
// 更新
|
|
|
updateBusiness(data, change) {
|
|
|
let param = {
|
|
|
- content: [],
|
|
|
- projection: []
|
|
|
- },
|
|
|
+ content: [],
|
|
|
+ projection: [],
|
|
|
+ nullItems: []
|
|
|
+ },
|
|
|
keyList = [];
|
|
|
//生成要修改字段列表
|
|
|
change.map(item => {
|
|
@@ -905,6 +880,11 @@ export default {
|
|
|
item[1] != "propertyId"
|
|
|
) {
|
|
|
param.projection.push(key);
|
|
|
+ keyList.push(item[1])
|
|
|
+ }
|
|
|
+ // 保存置空字段
|
|
|
+ if (item[1] && item[3] == "" && param.nullItems.indexOf(item[1]) == -1) {
|
|
|
+ param.nullItems.push(item[1])
|
|
|
}
|
|
|
});
|
|
|
//生成对应修改数据
|
|
@@ -980,12 +960,14 @@ export default {
|
|
|
forValue(arr, val) {
|
|
|
let enclosure = [];
|
|
|
arr &&
|
|
|
- arr.length &&
|
|
|
- arr.map(i => {
|
|
|
- if (i.path == val) {
|
|
|
- enclosure = i.value;
|
|
|
- }
|
|
|
- });
|
|
|
+ arr.length &&
|
|
|
+ arr.map(i => {
|
|
|
+ if (i.path == val) {
|
|
|
+ enclosure = i.value;
|
|
|
+ } else {
|
|
|
+ enclosure = []
|
|
|
+ }
|
|
|
+ });
|
|
|
return enclosure;
|
|
|
},
|
|
|
multiples(val) {
|
|
@@ -993,123 +975,99 @@ export default {
|
|
|
switch (val) {
|
|
|
case "infos.insuranceFile": //保险文件
|
|
|
this.filesArr = this.forValue(this.newEnclosure, val)
|
|
|
- ? this.forValue(this.newEnclosure, val)
|
|
|
- : [];
|
|
|
this.infoType = val;
|
|
|
this.myDialog.uploadFiles = true;
|
|
|
break;
|
|
|
case "infos.archive": //设备文档
|
|
|
this.filesArr = this.forValue(this.newEnclosure, val)
|
|
|
- ? this.forValue(this.newEnclosure, val)
|
|
|
- : [];
|
|
|
this.infoType = val;
|
|
|
this.myDialog.uploadFiles = true;
|
|
|
break;
|
|
|
case "infos.checkReport": //安装质检报告
|
|
|
this.filesArr = this.forValue(this.newEnclosure, val)
|
|
|
- ? this.forValue(this.newEnclosure, val)
|
|
|
- : [];
|
|
|
this.infoType = val;
|
|
|
this.myDialog.uploadFiles = true;
|
|
|
break;
|
|
|
case "infos.maintainManual": //维修保养手册
|
|
|
this.filesArr = this.forValue(this.newEnclosure, val)
|
|
|
- ? this.forValue(this.newEnclosure, val)
|
|
|
- : [];
|
|
|
this.infoType = val;
|
|
|
this.myDialog.uploadFiles = true;
|
|
|
break;
|
|
|
case "infos.approachingAcceptance": //进场验收单
|
|
|
this.filesArr = this.forValue(this.newEnclosure, val)
|
|
|
- ? this.forValue(this.newEnclosure, val)
|
|
|
- : [];
|
|
|
this.infoType = val;
|
|
|
this.myDialog.uploadFiles = true;
|
|
|
break;
|
|
|
case "infos.acceptanceReport": //验收报告
|
|
|
this.filesArr = this.forValue(this.newEnclosure, val)
|
|
|
- ? this.forValue(this.newEnclosure, val)
|
|
|
- : [];
|
|
|
this.infoType = val;
|
|
|
this.myDialog.uploadFiles = true;
|
|
|
break;
|
|
|
case "infos.operationManual": //操作说明书
|
|
|
this.filesArr = this.forValue(this.newEnclosure, val)
|
|
|
- ? this.forValue(this.newEnclosure, val)
|
|
|
- : [];
|
|
|
this.infoType = val;
|
|
|
this.myDialog.uploadFiles = true;
|
|
|
break;
|
|
|
case "infos.originalCertificate": //原厂证明
|
|
|
this.filesArr = this.forValue(this.newEnclosure, val)
|
|
|
- ? this.forValue(this.newEnclosure, val)
|
|
|
- : [];
|
|
|
this.infoType = val;
|
|
|
this.myDialog.uploadFiles = true;
|
|
|
break;
|
|
|
case "infos.testReport": //检测报告
|
|
|
this.filesArr = this.forValue(this.newEnclosure, val)
|
|
|
- ? this.forValue(this.newEnclosure, val)
|
|
|
- : [];
|
|
|
this.infoType = val;
|
|
|
this.myDialog.uploadFiles = true;
|
|
|
break;
|
|
|
case "infos.productCertification": //产品合格证
|
|
|
this.filesArr = this.forValue(this.newEnclosure, val)
|
|
|
- ? this.forValue(this.newEnclosure, val)
|
|
|
- : [];
|
|
|
this.infoType = val;
|
|
|
this.myDialog.uploadFiles = true;
|
|
|
break;
|
|
|
case "infos.installInstruction": //安装说明书
|
|
|
this.filesArr = this.forValue(this.newEnclosure, val)
|
|
|
- ? this.forValue(this.newEnclosure, val)
|
|
|
- : [];
|
|
|
this.infoType = val;
|
|
|
this.myDialog.uploadFiles = true;
|
|
|
break;
|
|
|
case "infos.drawing": //设备图纸
|
|
|
this.filesArr = this.forValue(this.newEnclosure, val)
|
|
|
- ? this.forValue(this.newEnclosure, val)
|
|
|
- : [];
|
|
|
this.infoType = val;
|
|
|
this.myDialog.uploadFiles = true;
|
|
|
break;
|
|
|
case "infos.installDrawing": //安装图纸
|
|
|
this.filesArr = this.forValue(this.newEnclosure, val)
|
|
|
- ? this.forValue(this.newEnclosure, val)
|
|
|
- : [];
|
|
|
this.infoType = val;
|
|
|
this.myDialog.uploadFiles = true;
|
|
|
break;
|
|
|
case "infos.supplierContract": //供应合同
|
|
|
this.filesArr = this.forValue(this.newEnclosure, val)
|
|
|
- ? this.forValue(this.newEnclosure, val)
|
|
|
- : [];
|
|
|
this.infoType = val;
|
|
|
this.myDialog.uploadFiles = true;
|
|
|
break;
|
|
|
case "infos.installPic"://安装照片
|
|
|
this.imgsArr = this.forValue(this.newEnclosure, val)
|
|
|
- ? this.forValue(this.newEnclosure, val)
|
|
|
- : [];
|
|
|
this.infoType = val;
|
|
|
this.myDialog.uploadImgs = true;
|
|
|
break;
|
|
|
case "infos.nameplate"://设备铭牌照片
|
|
|
this.imgsArr = this.forValue(this.newEnclosure, val)
|
|
|
- ? this.forValue(this.newEnclosure, val)
|
|
|
- : [];
|
|
|
this.infoType = val;
|
|
|
this.myDialog.uploadImgs = true;
|
|
|
break;
|
|
|
case "infos.pic"://设备照片
|
|
|
this.picsArr = this.forValue(this.newEnclosure, val)
|
|
|
- ? this.forValue(this.newEnclosure, val)
|
|
|
- : [];
|
|
|
this.infoType = val;
|
|
|
this.myDialog.pic = true;
|
|
|
break;
|
|
|
+ case "infos.designIDGraph": //设计工况空调机组处理过程焓湿图(F2)
|
|
|
+ this.filesArr = this.forValue(this.newEnclosure, val)
|
|
|
+ this.infoType = val;
|
|
|
+ this.myDialog.uploadFiles = true;
|
|
|
+ break;
|
|
|
+ case "infos.fanCharacterCurve": //风机性能曲线(F1)
|
|
|
+ this.filesArr = this.forValue(this.newEnclosure, val)
|
|
|
+ this.infoType = val;
|
|
|
+ this.myDialog.uploadFiles = true;
|
|
|
+ break;
|
|
|
}
|
|
|
},
|
|
|
getInfors(infos, row, el) {
|
|
@@ -1117,12 +1075,12 @@ export default {
|
|
|
let inputData = this.inputMap[val];
|
|
|
this.row = row.row;
|
|
|
this.messKey = val;
|
|
|
+ this.curDevice = infos.id;
|
|
|
this.firmDataType = "row";
|
|
|
lStorage.set("screen_data", {
|
|
|
path: this.$route.path,
|
|
|
- data: { equip: infos }
|
|
|
+ data: {equip: infos}
|
|
|
});
|
|
|
- console.log(val, '=================================')
|
|
|
switch (val) {
|
|
|
//操作
|
|
|
case "caozuo":
|
|
@@ -1173,7 +1131,6 @@ export default {
|
|
|
return false;
|
|
|
//关联系统()
|
|
|
case "linkSystem":
|
|
|
- this.curDevice = infos.EquipID;
|
|
|
this.systemList = this.tableData[row.row].linkSystem || [];
|
|
|
this.myDialog.systemType = true;
|
|
|
return false;
|
|
@@ -1183,62 +1140,30 @@ export default {
|
|
|
this.myDialog.changeRea = true;
|
|
|
}
|
|
|
return false;
|
|
|
- //品牌型号弹窗
|
|
|
- case "dpManufacturerId":
|
|
|
- if (!this.onlyRead) {
|
|
|
- this.myDialog.firm = true;
|
|
|
- }
|
|
|
- return false;
|
|
|
- //供应商信息弹窗
|
|
|
- case "dpSupplierId":
|
|
|
- if (!this.onlyRead) {
|
|
|
- this.myDialog.supplier = true;
|
|
|
- }
|
|
|
- return false;
|
|
|
- //维修商信息弹窗
|
|
|
- case "dpMaintainerId":
|
|
|
- if (!this.onlyRead) {
|
|
|
- this.myDialog.maintainer = true;
|
|
|
- }
|
|
|
- return false;
|
|
|
- //保险公司信息
|
|
|
- case "dpInsurerId":
|
|
|
- if (!this.onlyRead) {
|
|
|
- this.myDialog.insurer = true;
|
|
|
- }
|
|
|
- return false;
|
|
|
- //供应合同编号(B1)
|
|
|
- case "infos.supplierContractID":
|
|
|
- if (!this.onlyRead) {
|
|
|
- let ContractIDflag = null;
|
|
|
- let DPSdata = this.tableData[row.row].dpSupplierId;
|
|
|
- if (DPSdata) {
|
|
|
- ContractIDflag = DPSdata.split("-")[0];
|
|
|
- }
|
|
|
- if (!!ContractIDflag) {
|
|
|
- this.id = ContractIDflag;
|
|
|
- this.myDialog.supply = true;
|
|
|
- } else {
|
|
|
- this.$message("请先选择供应商");
|
|
|
- }
|
|
|
- }
|
|
|
- return false;
|
|
|
- //保险单号(B1)
|
|
|
- case "infos.insuranceNum":
|
|
|
- if (!this.onlyRead) {
|
|
|
- let DPInsurerIDflag = null;
|
|
|
- let DPIdata = this.tableData[row.row].dpInsurerId;
|
|
|
- if (DPIdata) {
|
|
|
- DPInsurerIDflag = DPIdata.split("-")[0];
|
|
|
- }
|
|
|
- if (!!DPInsurerIDflag) {
|
|
|
- this.id = DPInsurerIDflag;
|
|
|
- this.myDialog.guarantee = true;
|
|
|
- } else {
|
|
|
- this.$message("请先选择保险商");
|
|
|
- }
|
|
|
- }
|
|
|
- return false;
|
|
|
+ /**
|
|
|
+ * 关联资产后才可维护的信息点
|
|
|
+ */
|
|
|
+ // case 'flowBuild': //所属建筑楼层
|
|
|
+ // case 'infos.productDate': //生产日期
|
|
|
+ // case 'infos.serialNum': //出厂编号
|
|
|
+ // case 'infos.assetID': //资产编号
|
|
|
+ // case 'infos.purchasePrice': //采购价格
|
|
|
+ // case 'infos.insuranceNum': //保险单号
|
|
|
+ // case 'infos.insuranceFile': //保险文件
|
|
|
+ // if (!this.onlyRead) {
|
|
|
+ // const linkId = this.tableData[row.row].linkId;
|
|
|
+ // if (!linkId) { //未关联资产
|
|
|
+ // this.$confirm('您暂未关联设备对应的资产,该信息点不可编辑', '提示', {
|
|
|
+ // confirmButtonText: '我知道了',
|
|
|
+ // showCancelButton: false,
|
|
|
+ // type: 'warning',
|
|
|
+ // center: true
|
|
|
+ // }).then(() => {
|
|
|
+ // return false;
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // return false;
|
|
|
//保险文件--设备文档--安装质检报告
|
|
|
case "infos.insuranceFile": //保险文件(F2)
|
|
|
case "infos.archive": //设备文档(F2)
|
|
@@ -1254,6 +1179,8 @@ export default {
|
|
|
case "infos.supplierContract": //供应合同(F2)
|
|
|
case "infos.drawing": //设备图纸(F2)
|
|
|
case "infos.installDrawing": //安装图纸(F2)
|
|
|
+ case "infos.designIDGraph": //设计工况空调机组处理过程焓湿图(F2)
|
|
|
+ case "infos.fanCharacterCurve": //风机性能曲线(F1)
|
|
|
let IPSdata = tools.dataForKey(this.tableData[row.row], val);
|
|
|
this.filesArr = IPSdata ? IPSdata : [];
|
|
|
if (!this.onlyRead || this.filesArr.length) {
|
|
@@ -1278,12 +1205,12 @@ export default {
|
|
|
}
|
|
|
return false;
|
|
|
//包含的部件字段
|
|
|
- case "Count":
|
|
|
+ case "count":
|
|
|
let countUrl = this.onlyRead ? "/ledger/parts" : "/ledger/partsmanage";
|
|
|
this.$router.push({
|
|
|
path: countUrl,
|
|
|
query: {
|
|
|
- deviceId: infos.EquipID,
|
|
|
+ deviceId: infos.id,
|
|
|
typeId: this.mess.deviceId,
|
|
|
pageNo: this.page.currentPage,
|
|
|
pageSize: this.page.size
|
|
@@ -1293,15 +1220,19 @@ export default {
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
- console.log(inputData);
|
|
|
- console.log('====================');
|
|
|
if (!this.onlyRead && !inputData.editable) {
|
|
|
- this.$message("该信息点的值为自动生成,不可人工维护!");
|
|
|
- return false;
|
|
|
+ this.$confirm('该信息点的值为自动生成,不可人工维护!', '提示', {
|
|
|
+ confirmButtonText: '我知道了',
|
|
|
+ showCancelButton: false,
|
|
|
+ type: 'warning',
|
|
|
+ center: true
|
|
|
+ }).then(() => {
|
|
|
+ return false;
|
|
|
+ });
|
|
|
}
|
|
|
if (
|
|
|
!this.onlyRead &&
|
|
|
- showTools.inputModeArr.indexOf(inputData.inputMode) == "-1"
|
|
|
+ showTools.inputModeArr.indexOf(inputData.dataType) == "-1"
|
|
|
) {
|
|
|
this.updateInfoPoint = val;
|
|
|
this.updateInput = tools.dataForKey(this.tableData[row.row], val);
|
|
@@ -1357,190 +1288,6 @@ export default {
|
|
|
}
|
|
|
return a;
|
|
|
},
|
|
|
- //如果选择供应商之后
|
|
|
- supplierChange(data, type) {
|
|
|
- if (type === "dialog") {
|
|
|
- let firm = { ...data, num: 8 };
|
|
|
- this.firmName = firm;
|
|
|
- } else {
|
|
|
- tools.setDataForKey(
|
|
|
- this.tableData[this.row],
|
|
|
- "dpSupplierId",
|
|
|
- data.venderId
|
|
|
- );
|
|
|
- tools.setDataForKey(
|
|
|
- this.tableData[this.row],
|
|
|
- "infos.supplier",
|
|
|
- data.name
|
|
|
- );
|
|
|
- this.handleUpdataTable(
|
|
|
- [
|
|
|
- [this.row, "dpSupplierId", null, data.venderId],
|
|
|
- [this.row, "infos.supplier", null, data.name]
|
|
|
- ],
|
|
|
- "edit"
|
|
|
- );
|
|
|
- // this.handleUpdataTable([[this.row, "infos.SupplyPurchase.Supplier", null, data.name]], "edit")
|
|
|
- }
|
|
|
- },
|
|
|
- //供应合同编号
|
|
|
- supplyChange(data) {
|
|
|
- tools.setDataForKey(
|
|
|
- this.tableData[this.row],
|
|
|
- "infos.supplierContractID",
|
|
|
- { id: data }
|
|
|
- );
|
|
|
- },
|
|
|
- //保险单号-保险文件
|
|
|
- guaranteeChange(data) {
|
|
|
- for (let key in data) {
|
|
|
- this.utilToKey(key, "insuranceNo", data, "InsuranceNum");
|
|
|
- if (key == "contractFile") {
|
|
|
- if (!!data[key]) {
|
|
|
- data[key] = [data[key]];
|
|
|
- }
|
|
|
- }
|
|
|
- this.utilToKey(key, "contractFile", data, "InsuranceFile");
|
|
|
- }
|
|
|
- },
|
|
|
- //选择型号修改
|
|
|
- firmChange(data, type) {
|
|
|
- if (type === "dialog") {
|
|
|
- // 如果是批量信息维护
|
|
|
- let venderName = data.venderName ? data.venderName : "空";
|
|
|
- let brandName = data.brandName ? data.brandName : "空";
|
|
|
- let name = data.name ? data.name : "空";
|
|
|
- let firm = {
|
|
|
- ...data,
|
|
|
- num: 2,
|
|
|
- Specification: data.name,
|
|
|
- name: `${venderName}/${brandName}/${name}`
|
|
|
- };
|
|
|
- this.firmName = firm; //批量维护dialog显示对象的字段
|
|
|
- } else {
|
|
|
- //如果是表格操作
|
|
|
- tools.setDataForKey(
|
|
|
- this.tableData[this.row],
|
|
|
- "dpManufacturerId",
|
|
|
- data.venderId
|
|
|
- ); //生产商ID
|
|
|
- tools.setDataForKey(
|
|
|
- this.tableData[this.row],
|
|
|
- "dpBrandId",
|
|
|
- data.brandId
|
|
|
- ); //品牌ID
|
|
|
- tools.setDataForKey(
|
|
|
- this.tableData[this.row],
|
|
|
- "dpSpecificationId",
|
|
|
- data.specificationId
|
|
|
- ); //型号ID
|
|
|
- tools.setDataForKey(
|
|
|
- this.tableData[this.row],
|
|
|
- "testReport",
|
|
|
- data.venderName
|
|
|
- );
|
|
|
- tools.setDataForKey(
|
|
|
- this.tableData[this.row],
|
|
|
- "infos.manufacturer",
|
|
|
- data.venderName
|
|
|
- );
|
|
|
- tools.setDataForKey(
|
|
|
- this.tableData[this.row],
|
|
|
- "infos.brand",
|
|
|
- data.name
|
|
|
- );
|
|
|
- tools.setDataForKey(
|
|
|
- this.tableData[this.row],
|
|
|
- "infos.specification",
|
|
|
- data.brandName
|
|
|
- );
|
|
|
- this.handleUpdataTable(
|
|
|
- [
|
|
|
- [this.row, "dpManufacturerId", null, data.venderId],
|
|
|
- [this.row, "dpBrandId", null, data.brandId],
|
|
|
- [this.row, "dpSpecificationId", null, data.specificationId],
|
|
|
- [
|
|
|
- this.row,
|
|
|
- "infos.manufacturer",
|
|
|
- null,
|
|
|
- data.venderName
|
|
|
- ],
|
|
|
- [
|
|
|
- this.row,
|
|
|
- "infos.brand",
|
|
|
- null,
|
|
|
- data.brandName
|
|
|
- ],
|
|
|
- [
|
|
|
- this.row,
|
|
|
- "infos.specification",
|
|
|
- null,
|
|
|
- data.name
|
|
|
- ]
|
|
|
- ],
|
|
|
- "edit"
|
|
|
- );
|
|
|
- // this.handleUpdataTable([[this.row, "infos.equipManufactor.Brand", null, data.brand]], "edit")
|
|
|
- // this.handleUpdataTable([[this.row, "infos.equipManufactor.Specification", null, data.name]], "edit")
|
|
|
- }
|
|
|
- },
|
|
|
- //保险商变更
|
|
|
- changeInsurer(data, type) {
|
|
|
- if (type === "dialog") {
|
|
|
- let firm = { ...data, num: 42 };
|
|
|
- this.firmName = firm;
|
|
|
- } else {
|
|
|
- tools.setDataForKey(
|
|
|
- this.tableData[this.row],
|
|
|
- "dpInsurerId",
|
|
|
- data.venderId
|
|
|
- );
|
|
|
- tools.setDataForKey(
|
|
|
- this.tableData[this.row],
|
|
|
- "infos.insurer",
|
|
|
- data.name
|
|
|
- );
|
|
|
- this.handleUpdataTable(
|
|
|
- [
|
|
|
- [this.row, "dpInsurerId", null, data.venderId],
|
|
|
- [this.row, "infos.insurer", null, data.name]
|
|
|
- ],
|
|
|
- "edit"
|
|
|
- );
|
|
|
- // this.handleUpdataTable([[this.row, "infos.InsuranceDoc.Insurer", null, data.name]], "edit")
|
|
|
- }
|
|
|
- },
|
|
|
- //维修商变更
|
|
|
- changeMaintainer(data, type) {
|
|
|
- if (type === "dialog") {
|
|
|
- let firm = { ...data, num: 35 };
|
|
|
- this.firmName = firm;
|
|
|
- } else {
|
|
|
- tools.setDataForKey(
|
|
|
- this.tableData[this.row],
|
|
|
- "dpMaintainerId",
|
|
|
- data.venderId
|
|
|
- );
|
|
|
- tools.setDataForKey(
|
|
|
- this.tableData[this.row],
|
|
|
- "infos.maintainer",
|
|
|
- data.name
|
|
|
- );
|
|
|
- this.handleUpdataTable(
|
|
|
- [
|
|
|
- [this.row, "dpMaintainerId", null, data.venderId],
|
|
|
- [
|
|
|
- this.row,
|
|
|
- "infos.maintainer",
|
|
|
- null,
|
|
|
- data.name
|
|
|
- ]
|
|
|
- ],
|
|
|
- "edit"
|
|
|
- );
|
|
|
- // this.handleUpdataTable([[this.row, "infos.operationMainte.maintainer", null, data.name]], "edit")
|
|
|
- }
|
|
|
- },
|
|
|
//修改关联的资产
|
|
|
changeProperty(val) {
|
|
|
this.setDataToMain(val.propertyId, "propertyId", this.row);
|
|
@@ -1553,7 +1300,6 @@ export default {
|
|
|
//上传文件弹窗触发事件
|
|
|
fileChange(keys, type, file) {
|
|
|
if (type === "dialog") {
|
|
|
- // this.information = keys
|
|
|
this.newEnclosure.forEach(i => {
|
|
|
if (i.path == keys) {
|
|
|
this.$set(i, "value", file);
|
|
@@ -1567,7 +1313,6 @@ export default {
|
|
|
//上传图片弹窗触发事件
|
|
|
imgChange(keys, type, file) {
|
|
|
if (type === "dialog") {
|
|
|
- // this.information = keys
|
|
|
this.newEnclosure.forEach(i => {
|
|
|
if (i.path == keys) {
|
|
|
this.$set(i, "value", file);
|
|
@@ -1629,69 +1374,11 @@ export default {
|
|
|
params: query
|
|
|
})
|
|
|
},
|
|
|
- upDataDevice(type, data1, data2) {
|
|
|
- let param = { content: data1 };
|
|
|
- let param1 = { content: data2 };
|
|
|
- if (type === 1) {
|
|
|
- //增量
|
|
|
- //LedgerParam
|
|
|
- let filterParam = this.filterCheck(param, "sole");
|
|
|
- let filterParam1 = this.filterCheck(param1, "multiple");
|
|
|
- if (filterParam) {
|
|
|
- updateEquip(param, res => {
|
|
|
- });
|
|
|
- }
|
|
|
- if (filterParam1) {
|
|
|
- param1.content.map(i => {
|
|
|
- i.equipId = i.id
|
|
|
- delete i.id
|
|
|
- return i
|
|
|
- })
|
|
|
- setTimeout(() => {
|
|
|
- queryUpdate(param1, res => {
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- if (type === 2) {
|
|
|
- //覆盖
|
|
|
- let filterParams = this.filterCheck(param, "sole");
|
|
|
- if (filterParams) {
|
|
|
- updateEquip(param, res => {
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
+ upDataDevice() {
|
|
|
setTimeout(() => {
|
|
|
this.getTableData();
|
|
|
this.getAllData();
|
|
|
}, 1000);
|
|
|
- },
|
|
|
- filterCheck(arr, type) {
|
|
|
- if (type === "sole") {
|
|
|
- for (let i of arr.content) {
|
|
|
- for (let j in i.infos) {
|
|
|
- if (Array.isArray(i.infos[j]) && i.infos[j].length < 1) {
|
|
|
- delete i.infos[j]
|
|
|
- }
|
|
|
- }
|
|
|
- return Object.keys(i.infos).length;
|
|
|
- }
|
|
|
- } else if (type === "multiple") {
|
|
|
- let nArr = [];
|
|
|
- arr.content.forEach(i => {
|
|
|
- let { id, ...value } = i;
|
|
|
- nArr.push({ infos: value });
|
|
|
- });
|
|
|
- // nArr.map(i => {
|
|
|
- // if (Array.isArray(i) && i.length < 1) {
|
|
|
- // console.log(i)
|
|
|
- // }
|
|
|
- // })
|
|
|
- for (let j of nArr) {
|
|
|
- return Object.keys(j.infos).length;
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -1707,7 +1394,7 @@ export default {
|
|
|
if (newName && newName[0] && newName[0].value) {
|
|
|
this.showType = newName[0].value;
|
|
|
} else {
|
|
|
- this.showType = "";
|
|
|
+ this.showType = "Visible";
|
|
|
}
|
|
|
},
|
|
|
immediate: true,
|