Преглед на файлове

fix update too many times and pointconfig text

haojianlong преди 5 години
родител
ревизия
ba9a903f35

+ 67 - 40
src/components/ledger/handsontables/assets.vue

@@ -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;

+ 37 - 12
src/components/ledger/handsontables/device.vue

@@ -54,7 +54,8 @@
     </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>
@@ -183,7 +184,7 @@ export default {
       messKey: null,
       imgsArr: [], //临时保存的图片key数组
       picsArr: [], //临时设备图片keys数组
-      systemList:[], //关联的系统
+      systemList: [], //关联的系统
       copyMain: null,
       iframeSrc: "",
       id: 0,
@@ -507,7 +508,6 @@ export default {
           if (changeData.length == 1 && changeData[0][1].indexOf("/") > 0) {
             changeData[0][1] = changeData[0][1].split("/").join(".")
           }
-
           //存在data进行修改请求
           if (data && data.length) {
             this.updateBusiness(data, changeData);
@@ -746,8 +746,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) {
@@ -770,23 +776,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) {

+ 37 - 12
src/views/ledger/facility/partsmanage/index.vue

@@ -153,7 +153,7 @@ export default {
       id: 0,
       EquipmentList: [],
       firmId: "", //品牌型号所需字段--族id三位编码(传设备类id或部件类id)
-      deviceType:{}
+      deviceType: {}
     };
   },
   computed: {
@@ -245,10 +245,10 @@ export default {
       //生成要修改字段列表
       change.map((item) => {
         let key = item[1].split(".")[0]
-        if(item[1] && keyList.indexOf(key) == -1) {
+        if (item[1] && keyList.indexOf(key) == -1) {
           keyList.push(key)
         }
-        if(item[1] && item[3] == "" && param.data.Projection.indexOf(key) == -1) {
+        if (item[1] && item[3] == "" && param.data.Projection.indexOf(key) == -1) {
           param.data.Projection.push(key)
         }
       })
@@ -439,30 +439,55 @@ 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")
     },
     //供应商变更
     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")
     },
     //保险商变更
     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")
     },
     supplyChange(data) {
       let changeData = { id: data };

+ 1 - 1
src/views/point/dynamicdata/index.vue

@@ -3,7 +3,7 @@
     <!-- tab分页 -->
     <el-row class="top-tab" v-show="typeList.length">
       <el-tabs v-model="curType" type='card'>
-        <el-tab-pane v-for="(item) in typeList" :key="item.Name" :label="item.Name+'('+item.Sum+'/'+item.Rcount+')'" :name="item.Name">
+        <el-tab-pane v-for="(item) in typeList" :key="item.Name" :label="item.Name+'('+item.Sum+''+item.Rcount+')'" :name="item.Name">
         </el-tab-pane>
       </el-tabs>
       <div class="pos-right">