|
@@ -47,14 +47,15 @@
|
|
|
暂无数据
|
|
|
</p>
|
|
|
</div>
|
|
|
- <!-- 关联的系统 -->
|
|
|
- <system-type :infos="systemId" :graphyId="graphyId" :dialog="myDialog" :type="onlyRead?'read':'edit'" @change="changeSystemType"></system-type>
|
|
|
|
|
|
<div v-show="mess.deviceId && tableData && tableData.length" v-loading="loading" id="handsontable" ref="handsontable"></div>
|
|
|
<div v-show="mess.deviceId && tableData && tableData.length" class="right">
|
|
|
<my-pagination @change="getTableData" :page="page"></my-pagination>
|
|
|
</div>
|
|
|
<details-dialog :iframeSrc="iframeSrc" v-if="myDialog.details" :dialog="myDialog"></details-dialog>
|
|
|
+ <!-- 关联的系统 -->
|
|
|
+ <system-type :device="mess" :dialog="myDialog" :type="onlyRead?'read':'edit'" @change="changeSystemType"></system-type>
|
|
|
+ <!-- 关联资产 -->
|
|
|
<change-rea @changeProperty="changeProperty" :dialog="myDialog" :category="deviceType"></change-rea>
|
|
|
<look-pic :dialog="myDialog" :keysArr="picsArr"></look-pic>
|
|
|
<!-- 新增设备 -->
|
|
@@ -172,15 +173,14 @@ export default {
|
|
|
changeRea: false,//关联资产
|
|
|
lookPic: false,//图片查看
|
|
|
},
|
|
|
- row: null,//被修改的row
|
|
|
- filesArr: [],//保存临时的文件key
|
|
|
+ row: null, //被修改的row
|
|
|
+ filesArr: [], //保存临时的文件key
|
|
|
messKey: null,
|
|
|
- imgsArr: [],//临时保存的图片key数组
|
|
|
- picsArr: [],//临时设备图片keys数组
|
|
|
+ imgsArr: [], //临时保存的图片key数组
|
|
|
+ picsArr: [], //临时设备图片keys数组
|
|
|
projId: "",
|
|
|
copyMain: null,
|
|
|
graphyId: null,
|
|
|
- systemId: null,
|
|
|
assetGroupList: [],
|
|
|
iframeSrc: "",
|
|
|
id: 0,
|
|
@@ -189,9 +189,9 @@ export default {
|
|
|
showType: 'all',
|
|
|
allMess: true,
|
|
|
linkNameFalg: false,
|
|
|
- qrcodeUrl: "",//二维码图片地址
|
|
|
+ qrcodeUrl: "", //二维码图片地址
|
|
|
loading: false,
|
|
|
- deviceType: {},
|
|
|
+ deviceType: {}, //族3位编码及名称
|
|
|
floorData: []
|
|
|
};
|
|
|
},
|
|
@@ -205,10 +205,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- //只读-编辑
|
|
|
- changeRead() {
|
|
|
- this.getHeaderData(this.mess)
|
|
|
- },
|
|
|
//触发父组件change
|
|
|
getClose(val) {
|
|
|
this.$emit("close", val)
|
|
@@ -244,16 +240,16 @@ export default {
|
|
|
PageNumber: this.page.currentPage,
|
|
|
Filters: `category='${this.mess.deviceId}'`
|
|
|
}
|
|
|
- if (this.mess.buildId && this.mess.buildId != "all") {
|
|
|
- param.Filters += `;buildingId='${this.mess.buildId}'`
|
|
|
- } else if (this.mess.buildId == "noKnow") {
|
|
|
+ if (this.mess.buildId == "noKnow") {
|
|
|
param.Filters += `;buildingId isNull`
|
|
|
+ } else if (this.mess.buildId && this.mess.buildId != "all") {
|
|
|
+ param.Filters += `;buildingId='${this.mess.buildId}'`
|
|
|
}
|
|
|
|
|
|
- if (this.mess.floorId && this.mess.floorId != "all") {
|
|
|
- param.Filters += `;floorId='${this.mess.floorId}'`
|
|
|
- } else if (this.mess.floorId == "noKnow") {
|
|
|
+ if (this.mess.floorId == "noKnow") {
|
|
|
param.Filters += `;floorId isNull`
|
|
|
+ } else if (this.mess.floorId && this.mess.floorId != "all") {
|
|
|
+ param.Filters += `;floorId='${this.mess.floorId}'`
|
|
|
}
|
|
|
getEquipTableCon(param, res => {
|
|
|
this.loading = false;
|
|
@@ -582,7 +578,6 @@ export default {
|
|
|
let val = this.hot.colToProp(row.col);
|
|
|
this.row = row.row;
|
|
|
this.messKey = val;
|
|
|
- this.systemId = infos.EquipID;
|
|
|
switch (val) {
|
|
|
//操作
|
|
|
case 'caozuo':
|
|
@@ -731,18 +726,8 @@ export default {
|
|
|
},
|
|
|
//如果选择供应商之后
|
|
|
supplierChange(data) {
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierWeb", data.website);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierContactor", data.man);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierPhone", data.phone);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierFax", data.fox);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierEmail", data.email);
|
|
|
- for (let key in data) {
|
|
|
- if (key == "venderId") {
|
|
|
- data[key] = data[key] + "-" + data.name;
|
|
|
- this.utilToKey(key, "venderId", data, "DPSupplierID");
|
|
|
- }
|
|
|
- }
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "DPSupplierID", data.venderId)
|
|
|
},
|
|
|
supplyChange(data) {
|
|
|
let changeData = { id: data }
|
|
@@ -762,50 +747,24 @@ export default {
|
|
|
},
|
|
|
//选择型号修改
|
|
|
firmChange(data) {
|
|
|
- tools.setDataForKey(this.tableData[this.row], "DPSpecificationID", data.specificationId);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brand);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Manufacturer", data.venderName);
|
|
|
- for (let key in data) {
|
|
|
- if (key == "venderId") {
|
|
|
- data[key] = data[key] + "-" + data.name + "/" + data.brand;
|
|
|
- this.utilToKey(key, "venderId", data, "DPManufacturerID");
|
|
|
- }
|
|
|
- }
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brand)
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name)
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)
|
|
|
},
|
|
|
//保险商变更
|
|
|
changeInsurer(data) {
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerEmail", data.email);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerFax", data.fox);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerPhone", data.phone);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerContactor", data.man);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerWeb", data.website);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name);
|
|
|
- for (let key in data) {
|
|
|
- if (key == "venderId") {
|
|
|
- data[key] = data[key] + "-" + data.name;
|
|
|
- this.utilToKey(key, "venderId", data, "DPInsurerID");
|
|
|
- }
|
|
|
- }
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name)
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "DPInsurerID", data.venderId)
|
|
|
},
|
|
|
//维修商变更
|
|
|
changeMaintainer(data) {
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerWeb", data.website);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerContactor", data.man);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerPhone", data.phone);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerFax", data.fox);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerEmail", data.email);
|
|
|
- for (let key in data) {
|
|
|
- if (key == "venderId") {
|
|
|
- data[key] = data[key] + "-" + data.name;
|
|
|
- this.utilToKey(key, "venderId", data, "DPMaintainerID");
|
|
|
- }
|
|
|
- }
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name)
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "DPMaintainerID", data.venderId)
|
|
|
},
|
|
|
//修改关联的资产
|
|
|
changeProperty(val) {
|
|
|
- this.setDataToMain(val, 'PropertyId', this.row);
|
|
|
+ this.setDataToMain(val.PropertyId, 'PropertyId', this.row);
|
|
|
+ this.setDataToMain(val.LinkEquipLocalName, 'LinkEquipLocalName', this.row);
|
|
|
},
|
|
|
//上传文件弹窗触发事件
|
|
|
fileChange(keys) {
|
|
@@ -832,7 +791,6 @@ export default {
|
|
|
setDataToMain(data, key, row) {
|
|
|
if (!!data && data != '--') {
|
|
|
if (!!this.tableData[row]) {
|
|
|
- //falg确定每个的是否有值
|
|
|
tools.setDataForKey(this.tableData[row], key, data);
|
|
|
this.handleUpdataTable([[row, key, null, data]], "edit");
|
|
|
} else {
|