|
@@ -15,24 +15,31 @@
|
|
|
<el-option v-for="item in showTypes" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
<el-button size="small" style="width: 80px;" @click="addDevice" icon="iconfont icon-tianjia">添加资产</el-button>
|
|
|
-<!-- <el-button size="small" @click="Batch" v-show="!onlyRead" :disabled="!(tableData && tableData.length)">批量维护信息点-->
|
|
|
-<!-- </el-button>-->
|
|
|
+ <el-button size="small" @click="Batch" v-show="!onlyRead" :disabled="!(tableData && tableData.length)">批量维护信息点
|
|
|
+ </el-button>
|
|
|
<el-button size="small" style="width: 80px;" @click="reset" icon="iconfont icon-shuaxin">刷新</el-button>
|
|
|
<el-button v-show="!onlyRead" size="small" style="width: 80px;" @click="undo" icon="iconfont icon-undo">撤销
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<qrcode :qrcodeUrl="qrcodeUrl" :dialog="myDialog" :addBody="true" ref="qrcode"/>
|
|
|
- <firm :firmDataType="firmDataType" ref="firm" :mess="mess" @changeFirm="firmChange" :dialog="myDialog"/>
|
|
|
+ <firm
|
|
|
+ :firmDataType="firmDataType"
|
|
|
+ ref="firm"
|
|
|
+ :mess="mess"
|
|
|
+ @changeFirm="firmChange"
|
|
|
+ :dialog="myDialog"
|
|
|
+ />
|
|
|
<supply-dialog @change="supplyChange" ref="supply" :id="id" :dialog="myDialog"/>
|
|
|
- <supplier-dialog :firmDataType="firmDataType" ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"/>
|
|
|
+ <supplier-dialog :firmDataType="firmDataType" ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"/>
|
|
|
<guarantee-dialog @change="guaranteeChange" :id="id" ref="guarantee" :dialog="myDialog"/>
|
|
|
<upload-files-dialog
|
|
|
- :read="onlyRead ? true : false"
|
|
|
- ref="upload"
|
|
|
- @changeFile="fileChange"
|
|
|
- :keysArr="filesArr"
|
|
|
- :dialog="myDialog"
|
|
|
- :firmDataType="firmDataType"
|
|
|
+ :read="onlyRead ? true : false"
|
|
|
+ ref="upload"
|
|
|
+ @changeFile="fileChange"
|
|
|
+ :keysArr="filesArr"
|
|
|
+ :dialog="myDialog"
|
|
|
+ :firmDataType="firmDataType"
|
|
|
+ :infoType="infoType"
|
|
|
/>
|
|
|
<upload-img-dialog
|
|
|
:read="onlyRead ? true : false"
|
|
@@ -40,6 +47,7 @@
|
|
|
:keysArr="imgsArr"
|
|
|
:dialog="myDialog"
|
|
|
:firmDataType="firmDataType"
|
|
|
+ :infoType="infoType"
|
|
|
/>
|
|
|
<maintainer-dialog
|
|
|
@changeMaintainer="changeMaintainer"
|
|
@@ -59,6 +67,7 @@
|
|
|
:keysArr="picsArr"
|
|
|
@change="changePics"
|
|
|
:firmDataType="firmDataType"
|
|
|
+ :infoType="infoType"
|
|
|
/>
|
|
|
<div class="center middle_sty" style="height: 91%" v-show="!mess.deviceId && (!tableData || !tableData.length)">
|
|
|
<p>
|
|
@@ -139,28 +148,34 @@
|
|
|
deleteProperty,
|
|
|
getDataDictionary,
|
|
|
propertyLinkEq,
|
|
|
- updateProperty,
|
|
|
- queryEquip, //替换掉
|
|
|
- queryUpdate,//替换掉
|
|
|
- updateEquip//替换掉
|
|
|
+ queryProperty,
|
|
|
+ propertyUpdate,
|
|
|
+ updateProperty
|
|
|
} from "@/api/scan/request";
|
|
|
|
|
|
import tools from "@/utils/scan/tools"
|
|
|
import handsonUtils from "@/utils/scan/hasontableUtils"
|
|
|
import showTools from "@/utils/handsontable/notShow"
|
|
|
import buildFloor from '@/utils/handsontable/buildFloorData'
|
|
|
+ import firm from "@/components/dialogs/list/firm"
|
|
|
+ import supplierDialog from "@/components/dialogs/list/supplierDialog"
|
|
|
+ import uploadFilesDialog from "@/components/dialogs/list/filesDialog"
|
|
|
+ import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog"
|
|
|
+ import maintainerDialog from "@/components/dialogs/list/maintainerDialog"
|
|
|
+ import insurerDialog from "@/components/dialogs/list/insurerDialog"
|
|
|
+ import picDialog from "@/components/dialogs/list/picDialog"
|
|
|
|
|
|
import qrcode from "@/components/business_space/lib/qrcode"
|
|
|
- import firm from "@/components/business_space/dialogs/list/firm"
|
|
|
+ // import firm from "@/components/business_space/dialogs/list/firm"
|
|
|
import supplyDialog from "@/components/business_space/dialogs/list/supplyDialog"
|
|
|
- import supplierDialog from "@/components/business_space/dialogs/list/supplierDialog"
|
|
|
- import maintainerDialog from "@/components/business_space/dialogs/list/maintainerDialog"
|
|
|
- import insurerDialog from "@/components/business_space/dialogs/list/insurerDialog"
|
|
|
+ // import supplierDialog from "@/components/business_space/dialogs/list/supplierDialog"
|
|
|
+ // import maintainerDialog from "@/components/business_space/dialogs/list/maintainerDialog"
|
|
|
+ // import insurerDialog from "@/components/business_space/dialogs/list/insurerDialog"
|
|
|
import guaranteeDialog from "@/components/business_space/dialogs/list/guaranteeDialog"
|
|
|
- import uploadFilesDialog from "@/components/business_space/dialogs/list/filesDialog"
|
|
|
- import uploadImgDialog from "@/components/business_space/dialogs/list/uploadImgDialog"
|
|
|
+ // import uploadFilesDialog from "@/components/business_space/dialogs/list/filesDialog"
|
|
|
+ // import uploadImgDialog from "@/components/business_space/dialogs/list/uploadImgDialog"
|
|
|
// import detailsDialog from "@/components/business_space/lib/detailsDia"
|
|
|
- import picDialog from "@/components/business_space/dialogs/list/picDialog"
|
|
|
+ // import picDialog from "@/components/business_space/dialogs/list/picDialog"
|
|
|
import myPagination from "@/components/common/myPagination"
|
|
|
import myCascader from "@/components/ledger/lib/assets"
|
|
|
import floorCascader from "@/components/ledger/lib/floorCascader"
|
|
@@ -209,6 +224,7 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ infoType: '',
|
|
|
batchPage: {
|
|
|
size: 50,
|
|
|
sizes: [10, 30, 50, 100, 150, 200],
|
|
@@ -317,7 +333,7 @@
|
|
|
}
|
|
|
})
|
|
|
this.getTableData()
|
|
|
- this.getTableData()
|
|
|
+ this.getAllData()
|
|
|
// 信息维护
|
|
|
this.newEnclosure = res.Content.filter(i=>i.InputMode =='F2')
|
|
|
});
|
|
@@ -373,30 +389,34 @@
|
|
|
let params = {
|
|
|
"Cascade": [
|
|
|
{
|
|
|
- "Name": "property",
|
|
|
- "Projection": [
|
|
|
- "Family", "EquipLocalName", "EquipLocalID", "EquipID", "CodeType"
|
|
|
+ "Name":"building",
|
|
|
+ "Projection":[
|
|
|
+ "BuildLocalName",
|
|
|
+ "BuildName",
|
|
|
+ "BuildID"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
- "Name": "building",
|
|
|
- "Projection": [
|
|
|
- "BuildLocalName", "BuildName", "BuildID"
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- "Name": "floor",
|
|
|
- "Projection": [
|
|
|
- "FloorLocalName", "FloorName", "FloorID"
|
|
|
+ "Name":"floor",
|
|
|
+ "Projection":[
|
|
|
+ "FloorLocalName",
|
|
|
+ "FloorName",
|
|
|
+ "FloorID"
|
|
|
]
|
|
|
}
|
|
|
],
|
|
|
- Filters: `category='${this.mess.deviceId}'`,
|
|
|
+ Filters: `Family='${this.mess.deviceId}'`,
|
|
|
PageSize: this.batchPage.size,
|
|
|
Orders: "createTime desc, EquipID desc",
|
|
|
PageNumber: this.batchPage.currentPage,
|
|
|
"Projection": [
|
|
|
- "BuildingId", "FloorId", "Category", "EquipLocalName", "EquipLocalID", "EquipID", "BIMID"
|
|
|
+ "BuildingId",
|
|
|
+ "FloorId",
|
|
|
+ "Family",
|
|
|
+ "EquipLocalName",
|
|
|
+ "EquipLocalID",
|
|
|
+ "EquipID",
|
|
|
+ "BIMID"
|
|
|
]
|
|
|
};
|
|
|
if (this.mess.buildId == "noKnow") {
|
|
@@ -410,7 +430,7 @@
|
|
|
} else if (this.mess.floorId && this.mess.floorId != "all") {
|
|
|
params.Filters += `;floorId='${this.mess.floorId}'`
|
|
|
}
|
|
|
- queryEquip(params, res => {
|
|
|
+ queryProperty(params, res => {
|
|
|
this.allObject = res.Content
|
|
|
this.batchPage.total = res.Total
|
|
|
})
|
|
@@ -846,6 +866,7 @@
|
|
|
let inputData = this.inputMap[val];
|
|
|
this.row = row.row;
|
|
|
this.messKey = val;
|
|
|
+ this.firmDataType = 'row'
|
|
|
switch (val) {
|
|
|
//操作
|
|
|
case 'caozuo':
|
|
@@ -1045,7 +1066,11 @@
|
|
|
return a;
|
|
|
},
|
|
|
//如果选择供应商之后
|
|
|
- supplierChange(data) {
|
|
|
+ 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], "LedgerParam.SupplyPurchase.Supplier", data.name)
|
|
|
this.handleUpdataTable(
|
|
@@ -1056,6 +1081,7 @@
|
|
|
"edit"
|
|
|
)
|
|
|
// this.handleUpdataTable([[this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]], "edit")
|
|
|
+ }
|
|
|
},
|
|
|
//供应合同编号
|
|
|
supplyChange(data) {
|
|
@@ -1074,7 +1100,20 @@
|
|
|
}
|
|
|
},
|
|
|
//选择型号修改
|
|
|
- firmChange(data) {
|
|
|
+ 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
|
|
@@ -1094,9 +1133,14 @@
|
|
|
)
|
|
|
// this.handleUpdataTable([[this.row, "LedgerParam.EquipManufactor.Brand", null, data.brand]], "edit")
|
|
|
// this.handleUpdataTable([[this.row, "LedgerParam.EquipManufactor.Specification", null, data.name]], "edit")
|
|
|
+ }
|
|
|
},
|
|
|
//保险商变更
|
|
|
- changeInsurer(data) {
|
|
|
+ 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], "LedgerParam.InsuranceDoc.Insurer", data.name)
|
|
|
this.handleUpdataTable(
|
|
@@ -1107,9 +1151,15 @@
|
|
|
"edit"
|
|
|
)
|
|
|
// this.handleUpdataTable([[this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]], "edit")
|
|
|
+ }
|
|
|
},
|
|
|
//维修商变更
|
|
|
- changeMaintainer(data) {
|
|
|
+ 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], "LedgerParam.OperationMainte.Maintainer", data.name)
|
|
|
this.handleUpdataTable(
|
|
@@ -1120,6 +1170,7 @@
|
|
|
"edit"
|
|
|
)
|
|
|
// this.handleUpdataTable([[this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]], "edit")
|
|
|
+ }
|
|
|
},
|
|
|
//修改关联的资产
|
|
|
changeProperty(val) {
|
|
@@ -1127,20 +1178,51 @@
|
|
|
this.setDataToMain(val.LinkEquipLocalName, 'LinkEquipLocalName', this.row);
|
|
|
},
|
|
|
//上传文件弹窗触发事件
|
|
|
- fileChange(keys) {
|
|
|
+ fileChange(keys,type,file) {
|
|
|
+ if (type === 'dialog') {
|
|
|
+ // this.information = keys
|
|
|
+ this.newEnclosure.forEach(i => {
|
|
|
+ if (i.Path == keys) {
|
|
|
+ this.$set(i, 'value', file)
|
|
|
+ }
|
|
|
+ return i
|
|
|
+ })
|
|
|
+
|
|
|
+ } else {
|
|
|
this.setDataToMain(keys, this.messKey, this.row);
|
|
|
+ }
|
|
|
},
|
|
|
//上传图片弹窗触发事件
|
|
|
- imgChange(keys) {
|
|
|
+ imgChange(keys,type, file) {
|
|
|
+ if (type === 'dialog') {
|
|
|
+ // this.information = keys
|
|
|
+ this.newEnclosure.forEach(i => {
|
|
|
+ if (i.Path == keys) {
|
|
|
+ this.$set(i, 'value', file)
|
|
|
+ }
|
|
|
+ return i
|
|
|
+ })
|
|
|
+ } else {
|
|
|
this.setDataToMain(keys, this.messKey, this.row);
|
|
|
+ }
|
|
|
},
|
|
|
//关联系统更改
|
|
|
changeSystemType(data) {
|
|
|
tools.setDataForKey(this.tableData[this.row], "LinkSystem", data)
|
|
|
},
|
|
|
//资产图片弹窗改变事件
|
|
|
- changePics(keys) {
|
|
|
+ changePics(keys,type,file) {
|
|
|
+ if (type === 'dialog') {
|
|
|
+ // this.information = keys
|
|
|
+ this.newEnclosure.forEach(i => {
|
|
|
+ if (i.Path == keys) {
|
|
|
+ this.$set(i, 'value', file)
|
|
|
+ }
|
|
|
+ return i
|
|
|
+ })
|
|
|
+ } else {
|
|
|
this.setDataToMain(keys, this.messKey, this.row);
|
|
|
+ }
|
|
|
},
|
|
|
utilToKey(key, name, data, messName) {
|
|
|
if (key == name) {
|
|
@@ -1302,12 +1384,12 @@
|
|
|
let filterParam = this.filterCheck(param, 'sole')
|
|
|
let filterParam1 = this.filterCheck(param1, 'multiple')
|
|
|
if (filterParam) {
|
|
|
- updateEquip(param, res => {
|
|
|
+ updateProperty(param, res => {
|
|
|
});
|
|
|
}
|
|
|
if (filterParam1) {
|
|
|
setTimeout(() => {
|
|
|
- queryUpdate(param1, res => {
|
|
|
+ propertyUpdate(param1, res => {
|
|
|
})
|
|
|
})
|
|
|
|
|
@@ -1316,7 +1398,7 @@
|
|
|
if (type === 2) {//覆盖
|
|
|
let filterParams = this.filterCheck(param, 'sole')
|
|
|
if (filterParams) {
|
|
|
- updateEquip(param, res => {
|
|
|
+ updateProperty(param, res => {
|
|
|
});
|
|
|
}
|
|
|
}
|