Browse Source

adm:feat > 批量信息维护

shaun-sheep 4 years ago
parent
commit
bac161c46f

+ 14 - 11
src/components/dialogs/list/batchDialog.vue

@@ -63,12 +63,14 @@
         <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>
             </el-checkbox>
+            <span style="cursor: pointer">{{ item.name }}</span>
+            <el-button @click="multiple(item.path)" type="text">请选择</el-button>
+            <span
+              class="text-color"
+              v-for="i in item.value"
+            >{{ i.name | filterImgName }}</span>
+
           </p>
         </div>
 
@@ -313,12 +315,13 @@ export default {
         });
         return false
       }
+
       let arr = []
       // dpSupplierId 供应商 dpManufacturerId 生产商 dpBrandId 品牌
       // dpSpecificationId 型号 dpInsurerId 保险商 dpMaintainerId 维修商
       this.multipleSelection.forEach(item => {
         let id = item.id
-        arr.push({ id })
+        arr.push({id})
       })
 
       let Id = {}
@@ -383,19 +386,19 @@ export default {
             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,'多选信息')
+
+      valuable = this.newEnclosure.filter(i => this.form[i.path] && i.value).forEach(({code, value}) => newValuable[code] = value);
+      console.log(newValuable, '多选信息', valuable)
+
       if (this.radio === 1) { //组装数据,根据是覆盖该是增量,1是增量
         //    1:单选数据
         let arr1 = this.deepCopy(arr).map(item => ({
           ...Id,
           ...item,
-          infos: { ...equipManufactor, ...supplyPurchase, ...operationMainte, ...insuranceDoc }
+          infos: {...equipManufactor, ...supplyPurchase, ...operationMainte, ...insuranceDoc}
         }))
         let arr2 = this.deepCopy(arr).map(item => ({
           ...item,

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

@@ -344,7 +344,7 @@ export default {
           this.getTableData();
           this.getAllData();
           //  信息维护
-          this.newEnclosure = res.content.filter(i => i.dataType == dataTypeMap.ATTACHMENT);
+          this.newEnclosure = res.content.filter(i => i.dataType == dataTypeMap.ATTACHMENT && i.editable == true);
         });
       }
     },
@@ -1093,7 +1093,6 @@ export default {
         path: this.$route.path,
         data: {equip: infos}
       });
-      console.log(val, '=================================')
       switch (val) {
         //操作
         case "caozuo":
@@ -1382,6 +1381,7 @@ export default {
       })
     },
     upDataDevice(type, data1, data2) {
+
       let param = {content: data1};
       let param1 = {content: data2};
       if (type === 1) {

+ 1 - 1
src/components/ledger/lib/uploadFiles.vue

@@ -149,7 +149,7 @@ export default {
           reader.onprogress = function (p) {
             // 这个事件在读取进行中定时触发
             let value = (p.loaded / size) * 100;
-            console.log(p.loaded,size,value,'loaded')
+            // console.log(p.loaded,size,value,'loaded')
           };
 
           reader.onload = function () {