|
@@ -22,32 +22,34 @@
|
|
|
<supply-dialog @change="supplyChange" ref="supply" :id="id" :dialog="myDialog"></supply-dialog>
|
|
|
<supplier-dialog ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"></supplier-dialog>
|
|
|
<guarantee-dialog @change="guaranteeChange" :id="id" ref="guarantee" :dialog="myDialog"></guarantee-dialog>
|
|
|
- <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr" :dialog="myDialog" ></upload-files-dialog>
|
|
|
- <upload-img-dialog :read="onlyRead ? true : false" @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog" ></upload-img-dialog>
|
|
|
+ <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr" :dialog="myDialog">
|
|
|
+ </upload-files-dialog>
|
|
|
+ <upload-img-dialog :read="onlyRead ? true : false" @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog"></upload-img-dialog>
|
|
|
<maintainer-dialog @changeMaintainer="changeMaintainer" ref="maintainer" :dialog="myDialog"></maintainer-dialog>
|
|
|
<insurer-dialog @changeInsurer="changeInsurer" ref="insurer" :dialog="myDialog"></insurer-dialog>
|
|
|
- <pic-dialog :read="onlyRead ? true : false" :dialog="myDialog" :keysArr="picsArr" @change="changePics" ></pic-dialog>
|
|
|
+ <pic-dialog :read="onlyRead ? true : false" :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
|
|
|
<div class="center middle_sty" style="height: 91%" v-show="!mess.deviceId && (!tableData || !tableData.length)">
|
|
|
- <p>
|
|
|
- <i class="icon-wushuju iconfont"></i>
|
|
|
+ <p>
|
|
|
+ <i class="icon-wushuju iconfont"></i>
|
|
|
请选择设备族
|
|
|
- </p>
|
|
|
+ </p>
|
|
|
</div>
|
|
|
<div class="center middle_sty" style="height: 91%" v-show="mess.deviceId && (!tableData || !tableData.length)">
|
|
|
- <p>
|
|
|
- <i class="icon-wushuju iconfont"></i>
|
|
|
+ <p>
|
|
|
+ <i class="icon-wushuju iconfont"></i>
|
|
|
暂无数据
|
|
|
- </p>
|
|
|
+ </p>
|
|
|
</div>
|
|
|
<div v-show="mess.deviceId && tableData && tableData.length" v-loading="loading" id="handsontable" ref="handsontable"></div>
|
|
|
<div v-show="tableData && tableData.length" class='right'>
|
|
|
- <my-pagination @change="getTableData" :page="page"></my-pagination>
|
|
|
+ <my-pagination @change="getTableData" :page="page"></my-pagination>
|
|
|
</div>
|
|
|
<!-- <dialog-assets :assetType="[this.mess.deviceId]" @close="closeDialog" ref="assets" v-if="myDialog.addDevice" :dialog="myDialog" ></dialog-assets> -->
|
|
|
<details-dialog :iframeSrc="iframeSrc" v-if="myDialog.details" :dialog="myDialog"></details-dialog>
|
|
|
<look-pic :dialog="myDialog" :keysArr="picsArr"></look-pic>
|
|
|
<!-- 新增资产 -->
|
|
|
- <el-dialog class="add-assets" :title="showAddByDie?'未关联资产的设备批量创建资产':'确定新增资产类型'" @close="showAddByDie = false" :visible.sync="myDialog.addDevice" width="670px">
|
|
|
+ <el-dialog class="add-assets" :title="showAddByDie?'未关联资产的设备批量创建资产':'确定新增资产类型'" @close="showAddByDie = false" :visible.sync="myDialog.addDevice"
|
|
|
+ width="670px">
|
|
|
<el-row>
|
|
|
<my-cascader v-show="!showAddByDie" ref="cascader" :all="true" @change="changeCader"></my-cascader>
|
|
|
<die-cascader v-show="showAddByDie" ref="dieCascader" :Family="addData.Family" @change="changeDevice"></die-cascader>
|
|
@@ -123,7 +125,7 @@ export default {
|
|
|
buildFloor.getData(this.buildFloorData)
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters("layout", [ "projectId", "secret", "userId" ]),
|
|
|
+ ...mapGetters("layout", ["projectId", "secret", "userId"]),
|
|
|
showTypes() {
|
|
|
return this.onlyRead ?
|
|
|
[{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }] :
|
|
@@ -187,10 +189,10 @@ export default {
|
|
|
showAddByDie: false,//是否显示通过设备添加资产页面
|
|
|
addData: {}, //添加资产选择的资产类型
|
|
|
numParams: { // 查询设备部件数量条件
|
|
|
- category:'',
|
|
|
- buildId:'',
|
|
|
- floorId:'',
|
|
|
- Family:''
|
|
|
+ category: '',
|
|
|
+ buildId: '',
|
|
|
+ floorId: '',
|
|
|
+ Family: ''
|
|
|
},
|
|
|
dieNum: 0 // 查询设备部件数量
|
|
|
};
|
|
@@ -381,7 +383,7 @@ export default {
|
|
|
let param = this.formatFilter()
|
|
|
createPropertys(param, res => {
|
|
|
this.myDialog.addDevice = false
|
|
|
- this.$emit('getJson',{code: this.numParams.Family})
|
|
|
+ this.$emit('getJson', { code: this.numParams.Family })
|
|
|
this.$message.success("创建成功!")
|
|
|
})
|
|
|
},
|
|
@@ -401,7 +403,7 @@ export default {
|
|
|
},
|
|
|
//选择设备类型-添加资产
|
|
|
changeCader(val) {
|
|
|
- if(val.code && val.facility){
|
|
|
+ if (val.code && val.facility) {
|
|
|
this.addData.Family = val.code
|
|
|
this.addData.name = val.facility
|
|
|
this.numParams.Family = val.code
|
|
@@ -409,7 +411,7 @@ export default {
|
|
|
},
|
|
|
//选择设备或部件
|
|
|
changeDevice(val) {
|
|
|
- if(val.code) {
|
|
|
+ if (val.code) {
|
|
|
this.numParams.category = val.code
|
|
|
} else {
|
|
|
this.numParams.category = ''
|
|
@@ -602,7 +604,7 @@ export default {
|
|
|
async removeDevice(param) {
|
|
|
await deleteProperty(param, res => {
|
|
|
this.$message.success("删除成功")
|
|
|
- this.$emit('getJson','')
|
|
|
+ this.$emit('getJson', '')
|
|
|
this.getTableData()
|
|
|
})
|
|
|
},
|
|
@@ -616,8 +618,8 @@ export default {
|
|
|
change.map(item => {
|
|
|
let key = item[1].split(".")[0]
|
|
|
if (key == "flowBuild" && keyList.indexOf(key) == -1) {
|
|
|
- keyList.push("BuildingId","FloorId")
|
|
|
- param.Projection.push("BuildingId","FloorId")
|
|
|
+ keyList.push("BuildingId", "FloorId")
|
|
|
+ param.Projection.push("BuildingId", "FloorId")
|
|
|
}
|
|
|
if (item[1] && keyList.indexOf(key) == -1) {
|
|
|
keyList.push(key)
|
|
@@ -828,8 +830,14 @@ export default {
|
|
|
supplierChange(data) {
|
|
|
tools.setDataForKey(this.tableData[this.row], "DPSupplierID", data.venderId)
|
|
|
tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
|
|
|
- this.handleUpdataTable([[this.row, "DPSupplierID", null, data.venderId]], "edit")
|
|
|
- this.handleUpdataTable([[this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]], "edit")
|
|
|
+ this.handleUpdataTable(
|
|
|
+ [
|
|
|
+ [this.row, "DPSupplierID", null, data.venderId],
|
|
|
+ [this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]
|
|
|
+ ],
|
|
|
+ "edit"
|
|
|
+ )
|
|
|
+ // this.handleUpdataTable([[this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]], "edit")
|
|
|
},
|
|
|
//供应合同编号
|
|
|
supplyChange(data) {
|
|
@@ -852,23 +860,42 @@ export default {
|
|
|
tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)
|
|
|
tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brand)
|
|
|
tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name)
|
|
|
- this.handleUpdataTable([[this.row, "DPManufacturerID", null, data.venderId]], "edit")
|
|
|
- this.handleUpdataTable([[this.row, "LedgerParam.EquipManufactor.Brand", null, data.brand]], "edit")
|
|
|
- this.handleUpdataTable([[this.row, "LedgerParam.EquipManufactor.Specification", null, data.name]], "edit")
|
|
|
+ this.handleUpdataTable(
|
|
|
+ [
|
|
|
+ [this.row, "DPManufacturerID", null, data.venderId],
|
|
|
+ [this.row, "LedgerParam.EquipManufactor.Brand", null, data.brand],
|
|
|
+ [this.row, "LedgerParam.EquipManufactor.Specification", null, data.name]
|
|
|
+ ],
|
|
|
+ "edit"
|
|
|
+ )
|
|
|
+ // this.handleUpdataTable([[this.row, "LedgerParam.EquipManufactor.Brand", null, data.brand]], "edit")
|
|
|
+ // this.handleUpdataTable([[this.row, "LedgerParam.EquipManufactor.Specification", null, data.name]], "edit")
|
|
|
},
|
|
|
//保险商变更
|
|
|
changeInsurer(data) {
|
|
|
tools.setDataForKey(this.tableData[this.row], "DPInsurerID", data.venderId)
|
|
|
tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name)
|
|
|
- this.handleUpdataTable([[this.row, "DPInsurerID", null, data.venderId]], "edit")
|
|
|
- this.handleUpdataTable([[this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]], "edit")
|
|
|
+ this.handleUpdataTable(
|
|
|
+ [
|
|
|
+ [this.row, "DPInsurerID", null, data.venderId],
|
|
|
+ [this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]
|
|
|
+ ],
|
|
|
+ "edit"
|
|
|
+ )
|
|
|
+ // this.handleUpdataTable([[this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]], "edit")
|
|
|
},
|
|
|
//维修商变更
|
|
|
changeMaintainer(data) {
|
|
|
tools.setDataForKey(this.tableData[this.row], "DPMaintainerID", data.venderId)
|
|
|
tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name)
|
|
|
- this.handleUpdataTable([[this.row, "DPMaintainerID", null, data.venderId]], "edit")
|
|
|
- this.handleUpdataTable([[this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]], "edit")
|
|
|
+ this.handleUpdataTable(
|
|
|
+ [
|
|
|
+ [this.row, "DPMaintainerID", null, data.venderId],
|
|
|
+ [this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]
|
|
|
+ ],
|
|
|
+ "edit"
|
|
|
+ )
|
|
|
+ // this.handleUpdataTable([[this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]], "edit")
|
|
|
},
|
|
|
//修改关联的资产
|
|
|
changeProperty(val) {
|
|
@@ -916,11 +943,11 @@ export default {
|
|
|
this.assetGroupList = assetGroupList
|
|
|
},
|
|
|
},
|
|
|
- watch: {
|
|
|
- projectId(){
|
|
|
- this.main = []
|
|
|
- this.mess.deviceId = null
|
|
|
- this.page.total = 0
|
|
|
+ watch: {
|
|
|
+ projectId() {
|
|
|
+ this.main = []
|
|
|
+ this.mess.deviceId = null
|
|
|
+ this.page.total = 0
|
|
|
},
|
|
|
showTypes: {
|
|
|
handler(newName, oldName) {
|
|
@@ -948,16 +975,16 @@ export default {
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
}
|
|
|
-.add-assets{
|
|
|
- .el-dialog__body{
|
|
|
+.add-assets {
|
|
|
+ .el-dialog__body {
|
|
|
height: 130px;
|
|
|
- .die-text{
|
|
|
+ .die-text {
|
|
|
margin-left: 10px;
|
|
|
font-weight: bold;
|
|
|
clear: both;
|
|
|
padding-top: 25px;
|
|
|
padding-bottom: 10px;
|
|
|
- .die-num{
|
|
|
+ .die-num {
|
|
|
width: 100px;
|
|
|
text-align: center;
|
|
|
display: inline-block;
|