Browse Source

adm:feat > 设备,资产台账批量信息维护

shaun-sheep 4 years ago
parent
commit
d0c9a957b1

+ 3 - 2
src/api/scan/request.js

@@ -1324,7 +1324,7 @@ export function queryProperty(param, success) {
 // 修改设备的附件功能
 export function queryUpdate(param, success) {
   // /equip-componnet2/equip-query/update
-  let url = `${baseUrl}/equip-component/equip-query/update`;
+  let url = `${baseUrl}/equip-componet2/equip-query/update`;
   http.postJson(url, param, success)
 }
 
@@ -1382,7 +1382,8 @@ export function deleteProperty(param, success) {
 
 //更新资产信息
 export function updateProperty(param, success) {
-  let url = `${baseUrl}/datacenter2/property/update`;
+  // let url = `${baseUrl}/datacenter2/property/update`;
+  let url = `${baseUrl}/datacenter2/object/property/update`;
   http.postJson(url, param, success)
 }
 

+ 399 - 399
src/components/dialogs/list/batchDialog.vue

@@ -1,50 +1,50 @@
 <template>
   <el-dialog
-      title="批量维护信息点"
-      :visible.sync="batchDialog"
-      class="batchContainer"
+    title="批量维护信息点"
+    :visible.sync="batchDialog"
+    class="batchContainer"
   >
     <el-steps
-        :active="active"
-        align-center
+      :active="active"
+      align-center
     >
       <el-step
-          @click.native="active = 0"
-          description="填写需维护的信息点"
+        @click.native="active = 0"
+        description="填写需维护的信息点"
       />
       <el-step
-          @click.native="active = 1"
-          description="选择批量维护的对象实例"
+        @click.native="active = 1"
+        description="选择批量维护的对象实例"
       />
     </el-steps>
     <hr>
     <div
-        v-show="active === 0"
-        style="overflow: hidden"
+      v-show="active === 0"
+      style="overflow: hidden"
     >
       <section>
         <p class="text-message">维护只有单值的信息点</p>
         <span class="small">请选择需维护的信息点</span>
         <el-checkbox
-            :indeterminate="isIndeterminate"
-            v-model="checkAll"
-            @change="handleCheckChange"
+          :indeterminate="isIndeterminate"
+          v-model="checkAll"
+          @change="handleCheckChange"
         >
           全部选择
         </el-checkbox>
 
         <div style="margin: 15px "></div>
         <el-checkbox-group
-            v-model="checkedCities"
-            @change="handleCheckedCitiesChange"
+          v-model="checkedCities"
+          @change="handleCheckedCitiesChange"
         >
           <el-checkbox
-              v-for="(city,index) in newFirm"
-              :label="city"
-              :key="index"
+            v-for="(city,index) in newFirm"
+            :label="city"
+            :key="index"
           >
-            <span @click="fourVendors(city.code)"> {{city.name}}:</span>
-            <span :title="city.rname">{{city.rname | filterImgNames}}</span>
+            <span @click="fourVendors(city.code)"> {{ city.name }}:</span>
+            <span :title="city.rname">{{ city.rname | filterImgNames }}</span>
           </el-checkbox>
         </el-checkbox-group>
       </section>
@@ -53,8 +53,8 @@
         <p class="text-message">维护有多个值的信息点</p>
         <span class="small">选择值的更新方式</span>
         <el-radio-group
-            v-model="radio"
-            @change="maintenance"
+          v-model="radio"
+          @change="maintenance"
         >
           <el-radio :label="1">以增量方式维护</el-radio>
           <el-radio :label="2">以覆盖方式维护</el-radio>
@@ -63,69 +63,69 @@
         <div class="checkbox">
           <p v-for="(item,index) in newEnclosure">
             <el-checkbox v-model="form[item.path]">
-            <span  @click="multiple(item.path)"  style="cursor: pointer">{{item.name}}</span>
-            <span
-              class="text-color"
-              v-for="i in item.value"
-            >{{i.name | filterImgName}}</span>
+              <span @click="multiple(item.path)" style="cursor: pointer">{{ item.name }}</span>
+              <span
+                class="text-color"
+                v-for="i in item.value"
+              >{{ i.Name | filterImgName }}</span>
             </el-checkbox>
           </p>
         </div>
 
       </section>
       <el-button
-          class="next-step"
-          @click="next"
+        class="next-step"
+        @click="next"
       >下一步
       </el-button>
     </div>
     <div
-        v-show="active === 1"
-        class="all-message"
+      v-show="active === 1"
+      class="all-message"
     >
       <el-table
-          ref="multipleTable"
-          :data="tableData"
-          max-height="300"
-          tooltip-effect="dark"
-          style="width:100%;margin-bottom: 10px"
-          @selection-change="handleSelectionChange"
+        ref="multipleTable"
+        :data="tableData"
+        max-height="300"
+        tooltip-effect="dark"
+        style="width:100%;margin-bottom: 10px"
+        @selection-change="handleSelectionChange"
       >
         <el-table-column
-            type="selection"
-            width="55"
+          type="selection"
+          width="55"
         />
         <el-table-column
-            label="设备本地名称"
-            width=""
+          label="设备本地名称"
+          width=""
         >
-          <template slot-scope="scope">{{scope.row.localName}}</template>
+          <template slot-scope="scope">{{ scope.row.localName }}</template>
         </el-table-column>
         <el-table-column
-            prop="localId"
-            label="设备本地编码"
-            width="120"
+          prop="localId"
+          label="设备本地编码"
+          width="120"
         />
         <el-table-column
-            prop="build"
-            label="所属建筑楼层"
-            show-overflow-tooltip
+          prop="build"
+          label="所属建筑楼层"
+          show-overflow-tooltip
         />
       </el-table>
       <my-pagination
-          @change="getAllData"
-          :page="page"
+        @change="getAllData"
+        :page="page"
       ></my-pagination>
 
       <el-button
-          type="primary"
-          @click="maintenanceSelect"
-          style="margin-top:10px"
+        type="primary"
+        @click="maintenanceSelect"
+        style="margin-top:10px"
       >维护已选
       </el-button>
       <el-button
-          @click="active = 0"
-          style="margin-right: 10px;margin-top:10px"
+        @click="active = 0"
+        style="margin-right: 10px;margin-top:10px"
       >上 一 步
       </el-button>
     </div>
@@ -133,404 +133,404 @@
 </template>
 
 <script>
-  import myPagination from "@/components/ledger/lib/myPagination"
-  import tools from "@/utils/buildfloor/tools";
+import myPagination from "@/components/ledger/lib/myPagination"
+import tools from "@/utils/buildfloor/tools";
 
-  export default {
-    name: "batchDialog",
-    props: ['firmName', 'allObject', 'page', 'information','newEnclosure'],
-    components: {myPagination},
-    data() {
-      return {
-        form:{},
-        batchDialog: false,//dialog
-        active: 0,//进度条
-        checkAll: false,//全选
-        isIndeterminate: true,
-        checkedCities: [],//选择的项,单项
-        firm: [
-          {
-            name: "生产厂家/品牌型号",
-            code: "DPManufacturerID",
-            num: 2,
-          }, {
-            name: "供应商信息",
-            code: "DPSupplierID",
-            num: 8
-          }, {
-            name: "维修商信息",
-            code: "DPMaintainerID",
-            num: 35
-          }, {
-            name: "保险公司信息",
-            code: "DPInsurerID",
-            num: 42
-          }
-        ],
-        radio: 1, //1增加,2覆盖
-        checkedFile: [],//多项
-        multipleSelection: [],//checkbox选择的对象数组
-        filterList: [],//过滤单项选择的值
-        deviceList: [],//过滤全选数据
-        onlySelect: [],//检测是否有勾选单值信息
-        videoModel: {
-          archive: false,
-          checkReport: false,
-          drawing: false,
-          installDrawing: false,
-          insuranceFile: false,
-          installPic: false,
-          nameplate: false,
-          pic: false
-        },
-      }
-    },
-    watch: {
-      information() {
-        return this.information
-      },
-      newEnclosure:{
-        immediate:true,
-        handler(val){
-          this.newEnclosure = val
+export default {
+  name: "batchDialog",
+  props: ['firmName', 'allObject', 'page', 'information', 'newEnclosure'],
+  components: { myPagination },
+  data() {
+    return {
+      form: {},
+      batchDialog: false,//dialog
+      active: 0,//进度条
+      checkAll: false,//全选
+      isIndeterminate: true,
+      checkedCities: [],//选择的项,单项
+      firm: [
+        {
+          name: "生产厂家/品牌型号",
+          code: "DPManufacturerID",
+          num: 2,
+        }, {
+          name: "供应商信息",
+          code: "DPSupplierID",
+          num: 8
+        }, {
+          name: "维修商信息",
+          code: "DPMaintainerID",
+          num: 35
+        }, {
+          name: "保险公司信息",
+          code: "DPInsurerID",
+          num: 42
         }
-      }
-    },
-    created() {
-      this.$forceUpdate()
-    },
-    computed: {
-      newFirm() {
-        this.firm.map(item => {
-          if (item.num === this.firmName.num) {
-            item.rname = this.firmName.name
-            item.info = this.firmName
-          }
-          return item
-        })
-        return this.firm
-      },
-      tableData() {
-        this.allObject.map(item => {
-          let build = ''
-          if (item.building && item.floor) {
-            build = item.building.localName + ' - ' + item.floor.localName
-          } else if (item.building) {
-            build = item.building.localName
-          } else if (item.floor) {
-            build = item.floor.localName
-          } else {
-            build = '-'
-          }
-          item.build = build
-          return item
-        })
-        return this.allObject
+      ],
+      radio: 1, //1增加,2覆盖
+      checkedFile: [],//多项
+      multipleSelection: [],//checkbox选择的对象数组
+      filterList: [],//过滤单项选择的值
+      deviceList: [],//过滤全选数据
+      onlySelect: [],//检测是否有勾选单值信息
+      videoModel: {
+        archive: false,
+        checkReport: false,
+        drawing: false,
+        installDrawing: false,
+        insuranceFile: false,
+        installPic: false,
+        nameplate: false,
+        pic: false
       },
+    }
+  },
+  watch: {
+    information() {
+      return this.information
     },
-    filters: {
-      filterImgName(value) {
-        if (value && value.length > 16) {
-          return value.substring(0, 12) + '...'
-        } else {
-          return value
+    newEnclosure: {
+      immediate: true,
+      handler(val) {
+        this.newEnclosure = val
+      }
+    }
+  },
+  created() {
+    this.$forceUpdate()
+  },
+  computed: {
+    newFirm() {
+      this.firm.map(item => {
+        if (item.num === this.firmName.num) {
+          item.rname = this.firmName.name
+          item.info = this.firmName
         }
-      } ,
-      filterImgNames(value) {
-        if (value && value.length > 16) {
-          return value.substring(0, 16) + '...'
+        return item
+      })
+      return this.firm
+    },
+    tableData() {
+      this.allObject.map(item => {
+        let build = ''
+        if (item.building && item.floor) {
+          build = item.building.localName + ' - ' + item.floor.localName
+        } else if (item.building) {
+          build = item.building.localName
+        } else if (item.floor) {
+          build = item.floor.localName
         } else {
-          return value
+          build = '-'
         }
+        item.build = build
+        return item
+      })
+      return this.allObject
+    },
+  },
+  filters: {
+    filterImgName(value) {
+      if (value && value.length > 16) {
+        return value.substring(0, 12) + '...'
+      } else {
+        return value
       }
     },
-    methods: {
-      next() { //下一步按钮
-        // if (this.active++ > 1) this.active = 0
-        this.deviceList = this.firm.filter(item => item.info)
-        // if (!this.onlySelect.length) { //对单项全选进行过滤
-        //   this.$message({
-        //     message: '还没有选择单值信息哦',
-        //     type: 'warning'
-        //   });
-        //   return false
-        // }
-        let fillIn = this.onlySelect.some(i => !i.info)
-        if (fillIn) {
+    filterImgNames(value) {
+      if (value && value.length > 16) {
+        return value.substring(0, 16) + '...'
+      } else {
+        return value
+      }
+    }
+  },
+  methods: {
+    next() { //下一步按钮
+      // if (this.active++ > 1) this.active = 0
+      this.deviceList = this.firm.filter(item => item.info)
+      // if (!this.onlySelect.length) { //对单项全选进行过滤
+      //   this.$message({
+      //     message: '还没有选择单值信息哦',
+      //     type: 'warning'
+      //   });
+      //   return false
+      // }
+      let fillIn = this.onlySelect.some(i => !i.info)
+      if (fillIn) {
+        this.$message({
+          message: '请填写勾选信息',
+          type: 'warning'
+        });
+        return false
+      }
+      // if (!this.deviceList.length) { //对单项全选进行过滤
+      //   this.$message({
+      //     message: '单值信息没有填写哦',
+      //     type: 'warning'
+      //   });
+      //   return false
+      // }
+      if (this.checkAll) {    // 如果单项全选
+        if (this.deviceList.length < 4) { //对单项全选进行过滤
           this.$message({
-            message: '请填写勾选信息',
+            message: '单值的信息点存在未填写',
             type: 'warning'
           });
           return false
-        }
-        // if (!this.deviceList.length) { //对单项全选进行过滤
-        //   this.$message({
-        //     message: '单值信息没有填写哦',
-        //     type: 'warning'
-        //   });
-        //   return false
-        // }
-        if (this.checkAll) {    // 如果单项全选
-          if (this.deviceList.length < 4) { //对单项全选进行过滤
-            this.$message({
-              message: '单值的信息点存在未填写',
-              type: 'warning'
-            });
-            return false
-          } else {
-            this.active++
-          }
         } else {
           this.active++
         }
-      },
-      handleCheckChange(val) { //全选
-        this.checkedCities = val ? this.firm : []
-        this.isIndeterminate = false
+      } else {
+        this.active++
+      }
+    },
+    handleCheckChange(val) { //全选
+      this.checkedCities = val ? this.firm : []
+      this.isIndeterminate = false
 
-      },
-      handleCheckedCitiesChange(value) { //维护单项触发
-        this.onlySelect = value
-        this.filterList = value.filter(item => item.info)
-        let checkCount = value.length
-        this.checkAll = checkCount === this.firm.length
-        this.isIndeterminate = checkCount > 0 && checkCount < this.firm.length
-      },
-      handleCheckedFileChange(value) { //维护多项触发
-      },
-      fourVendors(code) {
-        this.$emit('code', code)
-      },
-      //    选择维护方式
-      maintenance(val) {
-      },
+    },
+    handleCheckedCitiesChange(value) { //维护单项触发
+      this.onlySelect = value
+      this.filterList = value.filter(item => item.info)
+      let checkCount = value.length
+      this.checkAll = checkCount === this.firm.length
+      this.isIndeterminate = checkCount > 0 && checkCount < this.firm.length
+    },
+    handleCheckedFileChange(value) { //维护多项触发
+    },
+    fourVendors(code) {
+      this.$emit('code', code)
+    },
+    //    选择维护方式
+    maintenance(val) {
+    },
 
-      maintenanceSelect() { //维护已选
-        if (!this.multipleSelection.length) {
-          this.$message({
-            message: '还没有选择实例哦',
-            type: 'warning'
-          });
-          return false
-        }
-        let arr = []
-        // DPSupplierID 供应商 DPManufacturerID 生产商 DPBrandID 品牌
-        // DPSpecificationID 型号 DPInsurerID 保险商 DPMaintainerID 维修商
-        this.multipleSelection.forEach(item => {
-          let id = item.id
-          arr.push({id})
-        })
+    maintenanceSelect() { //维护已选
+      if (!this.multipleSelection.length) {
+        this.$message({
+          message: '还没有选择实例哦',
+          type: 'warning'
+        });
+        return false
+      }
+      let arr = []
+      // DPSupplierID 供应商 DPManufacturerID 生产商 DPBrandID 品牌
+      // DPSpecificationID 型号 DPInsurerID 保险商 DPMaintainerID 维修商
+      this.multipleSelection.forEach(item => {
+        let id = item.id
+        arr.push({ id })
+      })
 
-        let Id = {}
-        let single = {};
-        // this.filterList 单选数组,取到需要数据
-        // 过滤数组,取对象
-        this.checkedCities.filter(item => item.num === 2).forEach(i => { //型号
-          if (i.info) {
-            let {venderName, brandName, Specification, venderId, brandId, specificationId} = i.info
-            single.equipManufactor = {
-              manufacturer: venderName,
-              brand: brandName,
-              specification: Specification
-            }
-            Id.DPManufacturerID = venderId
-            Id.DPBrandID = brandId
-            Id.DPSpecificationID = specificationId
+      let Id = {}
+      let single = {};
+      // this.filterList 单选数组,取到需要数据
+      // 过滤数组,取对象
+      this.checkedCities.filter(item => item.num === 2).forEach(i => { //型号
+        if (i.info) {
+          let { venderName, brandName, Specification, venderId, brandId, specificationId } = i.info
+          single.equipManufactor = {
+            manufacturer: venderName,
+            brand: brandName,
+            specification: Specification
           }
-        })
-        this.checkedCities.filter(item => item.num === 8).forEach(i => {  //供应商8
-          if (i.info) {
-            let {website, name, venderId} = i.info
-            single.supplyPurchase = {
-              SupplierWeb: website,
-              Supplier: name,
+          Id.DPManufacturerID = venderId
+          Id.DPBrandID = brandId
+          Id.DPSpecificationID = specificationId
+        }
+      })
+      this.checkedCities.filter(item => item.num === 8).forEach(i => {  //供应商8
+        if (i.info) {
+          let { website, name, venderId } = i.info
+          single.supplyPurchase = {
+            supplierWeb: website,
+            supplier: name,
 
-            }
-            Id.DPSupplierID = venderId
           }
-        })
-        this.checkedCities.filter(item => item.num === 35).forEach(i => {  //维修商
+          Id.DPSupplierID = venderId
+        }
+      })
+      this.checkedCities.filter(item => item.num === 35).forEach(i => {  //维修商
+        if (i.info) {
+          let { name, venderId } = i.info
+          single.operationMainte = {
+            maintainer: name
+          }
+          Id.DPMaintainerID = venderId
+        }
+      })
+      let insurance = this.checkedCities.filter(item => item.num === 42)
+      let param = {}
+      this.newEnclosure.forEach(({ path, value }) => param[path] = value)
+      let file = param['infos.insuranceFile']
+      if (insurance.length) {
+        insurance.forEach(i => {  //保险
           if (i.info) {
-            let {name, venderId} = i.info
-            single.OperationMainte = {
-              Maintainer: name
+            let { website, name, venderId } = i.info
+            single.insuranceDoc = {
+              insurer: name,
+              insurerWeb: website,
+              insuranceFile: file && file.length > 0 && this.radio === 2 ? file : ''
             }
-            Id.DPMaintainerID = venderId
+            Id.DPInsurerID = venderId
+
           }
         })
-        let insurance = this.checkedCities.filter(item => item.num === 42)
-        let param = {}
-        this.newEnclosure.forEach(({path, value}) => param[path] = value)
-        let file = param['infos.insuranceFile']
-        if (insurance.length) {
-          insurance.forEach(i => {  //保险
-            if (i.info) {
+      } else {
 
-              let {website, name, venderId} = i.info
-              single.InsuranceDoc = {
-                Insurer: name,
-                InsurerWeb: website,
-                InsuranceFile: file && file.length > 0 && this.radio === 2 ? file : ''
-              }
-              Id.DPInsurerID = venderId
-
-            }
-          })
-        } else {
-
-          if (this.radio === 2 && file && file.length > 0) {
-            single.InsuranceDoc = {
-              insuranceFile: file
-            }
+        if (this.radio === 2 && file && file.length > 0) {
+          single.insuranceDoc = {
+            insuranceFile: file
           }
-
         }
 
-        // this.information 多选信息
-        let valuable = [], newValuable  = []
-        valuable = this.newEnclosure.filter(i=>this.form[i.path] && i.value ).forEach(({ code, value }) => newValuable[code] = value);
-        // console.log( newValuable,'多选信息')
-        if (this.radio === 1) { //组装数据,根据是覆盖该是增量,1是增量
-          //    1:单选数据
-          let arr1 = this.deepCopy(arr).map(item => ({
-            ...Id,
-            ...item,
-            infos: {...single}
-          }))
-          let arr2 = this.deepCopy(arr).map(item => ({
-            ...item,
-            ...newValuable
-          }))
-          this.$emit('upDataDevice', 1, arr1, arr2)
-        }
-        if (this.radio === 2) {
-          let param = {},singleList = {}
-          this.newEnclosure.forEach(({path, value}) => param[path] = value)
-          singleList.infos = {...single}
-          let pa = Object.assign(param,singleList)
-          pa = tools.formatData(pa)
-          let arr3 = this.deepCopy(arr).map(item => ({
-            ...Id,
-            ...item,
-            ...pa,
+      }
 
-          }))
-          this.$emit('upDataDevice', 2, arr3)
-        }
-        this.closeDialog()
-      },
-      closeDialog() {  //关闭弹窗,返回初始状态
-        this.batchDialog = false
-        this.clearData()
+      // this.information 多选信息
+      let valuable = [], newValuable = []
+      valuable = this.newEnclosure.filter(i => this.form[i.path] && i.value).forEach(({ code, value }) => newValuable[code] = value);
+      // console.log( newValuable,'多选信息')
+      if (this.radio === 1) { //组装数据,根据是覆盖该是增量,1是增量
+        //    1:单选数据
+        let arr1 = this.deepCopy(arr).map(item => ({
+          ...Id,
+          ...item,
+          infos: { ...single }
+        }))
+        let arr2 = this.deepCopy(arr).map(item => ({
+          ...item,
+          ...newValuable
+        }))
+        this.$emit('upDataDevice', 1, arr1, arr2)
+      }
+      if (this.radio === 2) {
+        let param = {}, singleList = {}
+        this.newEnclosure.forEach(({ path, value }) => param[path] = value)
+        singleList.infos = { ...single }
+        let pa = Object.assign(param, singleList)
+        pa = tools.formatData(pa)
+        let arr3 = this.deepCopy(arr).map(item => ({
+          ...Id,
+          ...item,
+          ...pa,
 
-      },
-      clearData() { //清空规则 filterList
-        this.active = 0
-        this.checkedCities = []//清空单项的checkbox
-        this.firm.forEach(item => {
-          item.rname = ''
-          item.info = ''
-        })
-        // this.filterList = []
-        this.onlySelect = []
-        // this.deviceList = []
-        this.radio = 1 //返回到默认增量
-        //清空附件信息
-        for(let i in this.form)  {
-          this.form[i] = false
-        }
-          this.newEnclosure.map(i=>{
-          this.$set(i,'value',[])
-        })
-      },
-      handleSelectionChange(val) {
-        this.multipleSelection = val
-      },
-      getAllData() {
-        this.$emit('getAllData')
-      },
-      multiple(val) {
-        this.$emit('multiples',val)
-      },
+        }))
+        this.$emit('upDataDevice', 2, arr3)
+      }
+      this.closeDialog()
+    },
+    closeDialog() {  //关闭弹窗,返回初始状态
+      this.batchDialog = false
+      this.clearData()
 
-      deepCopy(obj) {
-        return JSON.parse(JSON.stringify(obj))
+    },
+    clearData() { //清空规则 filterList
+      this.active = 0
+      this.checkedCities = []//清空单项的checkbox
+      this.firm.forEach(item => {
+        item.rname = ''
+        item.info = ''
+      })
+      // this.filterList = []
+      this.onlySelect = []
+      // this.deviceList = []
+      this.radio = 1 //返回到默认增量
+      //清空附件信息
+      for (let i in this.form) {
+        this.form[i] = false
       }
+      this.newEnclosure.map(i => {
+        this.$set(i, 'value', [])
+      })
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val
+    },
+    getAllData() {
+      this.$emit('getAllData')
+    },
+    multiple(val) {
+      this.$emit('multiples', val)
+    },
+
+    deepCopy(obj) {
+      return JSON.parse(JSON.stringify(obj))
     }
   }
+}
 </script>
 
 <style scoped lang="less">
-  .batchContainer {
-    /deep/ .el-table-column--selection .cell {
-      padding: 0;
-    }
-    /deep/ .el-step__description {
-      margin: 2% 0;
-    }
+.batchContainer {
+  /deep/ .el-table-column--selection .cell {
+    padding: 0;
+  }
 
-    .text-color {
-      color: #409EFF
-    }
+  /deep/ .el-step__description {
+    margin: 2% 0;
+  }
 
-    .el-checkbox-group {
-      display: flex;
-      justify-content: space-between;
-      flex-direction: row;
-      flex-wrap: wrap;
+  .text-color {
+    color: #409EFF
+  }
 
-      .el-checkbox {
-        width: 43%;
-      }
+  .el-checkbox-group {
+    display: flex;
+    justify-content: space-between;
+    flex-direction: row;
+    flex-wrap: wrap;
 
-      .el-checkbox:last-of-type {
-        margin-right: 30px;
-      }
+    .el-checkbox {
+      width: 43%;
     }
 
-    .next-step {
-      display: block;
-      float: right;
+    .el-checkbox:last-of-type {
+      margin-right: 30px;
     }
+  }
 
-    .checkbox {
-      display: flex;
-      justify-content: space-between;
-      flex-direction: row;
-      flex-wrap: wrap;
+  .next-step {
+    display: block;
+    float: right;
+  }
 
-      p {
-        width: 50%;
-      }
+  .checkbox {
+    display: flex;
+    justify-content: space-between;
+    flex-direction: row;
+    flex-wrap: wrap;
 
-      .el-checkbox:last-of-type {
-        margin-right: 10px;
-      }
+    p {
+      width: 50%;
     }
 
-    .text-message {
-      overflow: hidden;
-      margin-top: 10px;
-      color: #333;
-      border-left: 8px solid #333;
-      text-indent: 10px;
-      font-weight: 600;
+    .el-checkbox:last-of-type {
+      margin-right: 10px;
     }
+  }
 
-    .small {
-      font-size: 12px;
-      color: #555;
-    }
+  .text-message {
+    overflow: hidden;
+    margin-top: 10px;
+    color: #333;
+    border-left: 8px solid #333;
+    text-indent: 10px;
+    font-weight: 600;
+  }
 
-    .all-message {
-      overflow: hidden;
+  .small {
+    font-size: 12px;
+    color: #555;
+  }
 
-      button {
-        float: right;
-        padding: 10px;
-        margin-left: 5px;
-      }
-    }
+  .all-message {
+    overflow: hidden;
 
+    button {
+      float: right;
+      padding: 10px;
+      margin-left: 5px;
+    }
   }
+
+}
 </style>

+ 29 - 31
src/components/dialogs/list/filesDialog.vue

@@ -59,9 +59,7 @@ export default {
   },
   created() {
   },
-  computed: {
-
-  },
+  computed: {},
   mounted() {
   },
   methods: {
@@ -81,47 +79,47 @@ export default {
             this.information.insuranceFile.InsuranceFile = file
             this.$emit("changeFile", this.information, this.firmDataType)
             break;
-          case 'LedgerParam.InsuranceDoc.InsuranceFile': //保险文件
-            this.$emit("changeFile", info, this.firmDataType,file)
+          case 'infos.insuranceFile': //保险文件
+            this.$emit("changeFile", info, this.firmDataType, file)
             break
-          case 'LedgerParam.PhotoDoc.Archive': //设备文档
-            this.$emit("changeFile", info, this.firmDataType,file)
+          case 'infos.archive': //设备文档
+            this.$emit("changeFile", info, this.firmDataType, file)
             break
-          case 'LedgerParam.Siteinstall.CheckReport': //安装质检报告
-            this.$emit("changeFile", info, this.firmDataType,file)
+          case 'infos.checkReport': //安装质检报告
+            this.$emit("changeFile", info, this.firmDataType, file)
             break
-          case 'LedgerParam.OperationMainte.MaintainManual': //维修保养手册
-            this.$emit("changeFile", info, this.firmDataType,file)
+          case 'infos.maintainManual': //维修保养手册
+            this.$emit("changeFile", info, this.firmDataType, file)
             break
-          case 'LedgerParam.SupplyPurchase.ApproachingAcceptance': //进场验收单
-            this.$emit("changeFile", info, this.firmDataType,file)
+          case 'infos.approachingAcceptance': //进场验收单
+            this.$emit("changeFile", info, this.firmDataType, file)
             break
-          case 'LedgerParam.SupplyPurchase.AcceptanceReport': //验收报告
-            this.$emit("changeFile", info, this.firmDataType,file)
+          case 'infos.acceptanceReport': //验收报告
+            this.$emit("changeFile", info, this.firmDataType, file)
             break
-          case 'LedgerParam.PhotoDoc.OperationManual': //操作说明书
-            this.$emit("changeFile", info, this.firmDataType,file)
+          case 'infos.operationManual': //操作说明书
+            this.$emit("changeFile", info, this.firmDataType, file)
             break
-          case 'LedgerParam.EquipManufactor.OriginalCertificate': //原厂证明
-            this.$emit("changeFile", info, this.firmDataType,file)
+          case 'infos.originalCertificate': //原厂证明
+            this.$emit("changeFile", info, this.firmDataType, file)
             break
-          case 'LedgerParam.EquipManufactor.TestReport': //检测报告
-            this.$emit("changeFile", info, this.firmDataType,file)
+          case 'infos.testReport': //检测报告
+            this.$emit("changeFile", info, this.firmDataType, file)
             break
-          case 'LedgerParam.PhotoDoc.ProductCertification': //产品合格证
-            this.$emit("changeFile", info, this.firmDataType,file)
+          case 'infos.productCertification': //产品合格证
+            this.$emit("changeFile", info, this.firmDataType, file)
             break
-          case 'LedgerParam.Siteinstall.InstallInstruction': //安装说明书
-            this.$emit("changeFile", info, this.firmDataType,file)
+          case 'infos.installInstruction': //安装说明书
+            this.$emit("changeFile", info, this.firmDataType, file)
             break
-          case 'LedgerParam.PhotoDoc.Drawing': //设备图纸
-            this.$emit("changeFile", info, this.firmDataType,file)
+          case 'infos.drawing': //设备图纸
+            this.$emit("changeFile", info, this.firmDataType, file)
             break
-          case 'LedgerParam.Siteinstall.InstallDrawing': //安装图纸
-            this.$emit("changeFile", info, this.firmDataType,file)
+          case 'infos.installDrawing': //安装图纸
+            this.$emit("changeFile", info, this.firmDataType, file)
             break
-          case 'LedgerParam.SupplyPurchase.SupplierContract': //供应合同
-            this.$emit("changeFile", info, this.firmDataType,file)
+          case 'infos.supplierContract': //供应合同
+            this.$emit("changeFile", info, this.firmDataType, file)
             break
         }
       } else {

+ 2 - 2
src/components/dialogs/list/uploadImgDialog.vue

@@ -76,10 +76,10 @@
                 this.information.drawing.Drawing = file
                 this.$emit('changeFile', this.information, this.firmDataType)
                 break
-              case 'LedgerParam.Siteinstall.InstallPic':
+              case 'infos.installPic':
                 this.$emit("changeFile", info, this.firmDataType, file)
                 break
-              case 'LedgerParam.PhotoDoc.Nameplate':
+              case 'infos.nameplate':
                 this.$emit("changeFile", info, this.firmDataType, file)
                 break
             }

+ 42 - 42
src/components/ledger/handsontables/assets.vue

@@ -790,40 +790,40 @@ export default {
     // 更新
     updateProperty(data, change) {
       let param = {
-        Content: [],
-        Projection: []
+        content: [],
+        projection: []
       }, keyList = []
       //生成要修改字段列表
       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)
         }
-        if (item[1] && item[3] == "" && param.Projection.indexOf(key) == -1) {
-          param.Projection.push(key)
+        if (item[1] && item[3] == "" && param.projection.indexOf(key) == -1) {
+          param.projection.push(key)
         }
       })
       //生成对应修改数据
       data.map((item, index) => {
         keyList.map(value => {
-          if (value == "BuildingId") {
+          if (value == "buildingId") {
             let itemData = tools.dataForKey(item, "flowBuild")
             if (itemData == "") {
-              tools.setDataForKey(item, "BuildingId", null)
-              tools.setDataForKey(item, "FloorId", null)
+              tools.setDataForKey(item, "buildingId", null)
+              tools.setDataForKey(item, "floorId", null)
             } else {
               let BuildingId = itemData.split("-")[0]
               let FloorId = itemData.split("-")[1]
               if (BuildingId && FloorId) {
-                tools.setDataForKey(item, "BuildingId", BuildingId)
-                tools.setDataForKey(item, "FloorId", FloorId)
+                tools.setDataForKey(item, "buildingId", BuildingId)
+                tools.setDataForKey(item, "floorId", FloorId)
               } else if (BuildingId && !FloorId) {
-                tools.setDataForKey(item, "BuildingId", BuildingId)
-                tools.setDataForKey(item, "FloorId", null)
+                tools.setDataForKey(item, "buildingId", BuildingId)
+                tools.setDataForKey(item, "floorId", null)
               }
             }
           } else {
@@ -831,7 +831,7 @@ export default {
             tools.setDataForKey(item, value, itemData == "" ? null : itemData)
           }
         });
-        param.Content.push(item)
+        param.content.push(item)
       })
       updateProperty(param, res => {
       })
@@ -1176,7 +1176,7 @@ export default {
       if (type === 'dialog') {
         // this.information = keys
         this.newEnclosure.forEach(i => {
-          if (i.Path == keys) {
+          if (i.path == keys) {
             this.$set(i, 'value', file)
           }
           return i
@@ -1191,7 +1191,7 @@ export default {
       if (type === 'dialog') {
         // this.information = keys
         this.newEnclosure.forEach(i => {
-          if (i.Path == keys) {
+          if (i.path == keys) {
             this.$set(i, 'value', file)
           }
           return i
@@ -1209,7 +1209,7 @@ export default {
       if (type === 'dialog') {
         // this.information = keys
         this.newEnclosure.forEach(i => {
-          if (i.Path == keys) {
+          if (i.path == keys) {
             this.$set(i, 'value', file)
           }
           return i
@@ -1282,88 +1282,88 @@ export default {
     multiples(val) {
       this.firmDataType = 'dialog'
       switch (val) {
-        case 'LedgerParam.InsuranceDoc.InsuranceFile': //保险文件
+        case "infos.insuranceFile": //保险文件
           this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case 'LedgerParam.PhotoDoc.Archive': //设备文档
+        case "infos.archive": //设备文档
           this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case 'LedgerParam.Siteinstall.CheckReport': //安装质检报告
+        case "infos.checkReport": //安装质检报告
           this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case 'LedgerParam.OperationMainte.MaintainManual': //维修保养手册
+        case "infos.maintainManual": //维修保养手册
           this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case 'LedgerParam.SupplyPurchase.ApproachingAcceptance': //进场验收单
+        case "infos.approachingAcceptance": //进场验收单
           this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case 'LedgerParam.SupplyPurchase.AcceptanceReport': //验收报告
+        case "infos.acceptanceReport": //验收报告
           this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case 'LedgerParam.PhotoDoc.OperationManual': //操作说明书
+        case "infos.operationManual": //操作说明书
           this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case 'LedgerParam.EquipManufactor.OriginalCertificate': //原厂证明
+        case "infos.originalCertificate": //原厂证明
           this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case 'LedgerParam.EquipManufactor.TestReport': //检测报告
+        case "infos.testReport": //检测报告
           this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case 'LedgerParam.PhotoDoc.ProductCertification': //产品合格证
+        case "infos.productCertification": //产品合格证
           this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case 'LedgerParam.Siteinstall.InstallInstruction': //安装说明书
+        case "infos.installInstruction": //安装说明书
           this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case 'LedgerParam.PhotoDoc.Drawing': //设备图纸
+        case "infos.drawing": //设备图纸
           this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case 'LedgerParam.Siteinstall.InstallDrawing': //安装图纸
+        case "infos.installDrawing": //安装图纸
           this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case 'LedgerParam.SupplyPurchase.SupplierContract': //供应合同
+        case "infos.supplierContract": //供应合同
           this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case 'LedgerParam.Siteinstall.InstallPic':
+        case "infos.installPic"://安装照片
           this.imgsArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
           this.infoType = val
           this.myDialog.uploadImgs = true;
           break;
-        case 'LedgerParam.PhotoDoc.Nameplate':
+        case "infos.nameplate"://设备铭牌照片
           this.imgsArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
           this.infoType = val
           this.myDialog.uploadImgs = true;
           break;
         //设备照片
-        case 'LedgerParam.PhotoDoc.Pic':
+        case "infos.pic"://设备照片
           this.picsArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
           this.infoType = val
           this.myDialog.pic = true;
@@ -1371,8 +1371,8 @@ export default {
       }
     },
     upDataDevice(type, data1, data2) {
-      let param = { Content: data1 }
-      let param1 = { Content: data2 }
+      let param = { content: data1 }
+      let param1 = { content: data2 }
       if (type === 1) { //增量
         //LedgerParam
         let filterParam = this.filterCheck(param, 'sole')
@@ -1403,17 +1403,17 @@ export default {
     },
     filterCheck(arr, type) {
       if (type === 'sole') {
-        for (let i of arr.Content) {
-          return Object.keys(i.LedgerParam).length
+        for (let i of arr.content) {
+          return Object.keys(i.infos).length
         }
       } else if (type === 'multiple') {
         let nArr = [];
-        arr.Content.forEach(i => {
-          let { EquipID, ...value } = i
-          nArr.push({ LedgerParam: value })
+        arr.content.forEach(i => {
+          let { id, ...value } = i
+          nArr.push({ infos: value })
         })
         for (let j of nArr) {
-          return Object.keys(j.LedgerParam).length
+          return Object.keys(j.infos).length
         }
       }
     }

+ 1 - 1
src/components/ledger/handsontables/device.vue

@@ -1810,7 +1810,7 @@ export default {
       } else if (type === "multiple") {
         let nArr = [];
         arr.content.forEach(i => {
-          let { equipId, ...value } = i;
+          let { id, ...value } = i;
           nArr.push({ infos: value });
         });
         for (let j of nArr) {