Bläddra i källkod

Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType

haojianlong 4 år sedan
förälder
incheckning
8217699438

+ 2 - 0
config/index.js

@@ -210,6 +210,7 @@ module.exports = {
         }
       },
       '/api': {
+        // target: 'http://192.168.64.17:28888/',
         target: 'http://192.168.64.14:28888/',
         changeOrigin: true,
         pathRewrite: {
@@ -293,6 +294,7 @@ module.exports = {
         // target: 'http://192.168.12.238:8080/',
         // target: 'http://60.205.177.43:28888',
         target: 'http://192.168.64.14:28888',
+        // target: 'http://192.168.64.17:28888',
         // 如果要代理 websockets
         ws: true,
         // 将主机标头的原点更改为目标URL

+ 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 () {

+ 4 - 70
src/views/ledger/facility/parts/index.vue

@@ -2,15 +2,11 @@
   <div id="partsList">
     <el-row>
       <el-tabs @tab-click="getTableHeader" v-model="tabVal">
-        <el-tab-pane v-for="t in partsTypeList" :key="t.Category" :name="t.Category"
-                     :label="t.CategoryName+'('+t.count+')'"></el-tab-pane>
+        <el-tab-pane v-for="t in partsTypeList" :key="t.category" :name="t.category"
+                     :label="`${t.categoryName}(${t.count?t.count:0})`"></el-tab-pane>
       </el-tabs>
     </el-row>
     <el-row class="left">
-      <!-- <div style="width:200px;display:inline-block;text-align:left;color:gray;">
-        <span>只看要采集的信息</span>
-        <el-checkbox v-model="allMess" @change="getTableHeader"></el-checkbox>
-      </div> -->
       <el-button size="small" type="default" icon="el-icon-back" @click="goback" style="margin-right:10px;"></el-button>
       <el-select v-model="showType" @change="initTable" style="width:100px;margin-right:10px;vertical-align:bottom;">
         <el-option v-for="item in showTypes" :key="item.value" :label="item.label" :value="item.value">
@@ -49,12 +45,6 @@ import tools from "@/utils/scan/tools";
 import showTools from "@/utils/handsontable/notShow";
 
 import qrcode from "@/components/ledger/lib/qrcode";
-import firm from "@/components/dialogs/list/firm";
-import supplyDialog from "@/components/dialogs/list/supplyDialog";
-import supplierDialog from "@/components/dialogs/list/supplierDialog";
-import maintainerDialog from "@/components/dialogs/list/maintainerDialog";
-import insurerDialog from "@/components/dialogs/list/insurerDialog";
-import guaranteeDialog from "@/components/dialogs/list/guaranteeDialog";
 import uploadFilesDialog from "@/components/dialogs/list/filesDialog";
 import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog";
 import picDialog from "@/components/dialogs/list/picDialog";
@@ -67,12 +57,6 @@ import {mapGetters} from "vuex";
 export default {
   components: {
     qrcode, //二维码页面
-    firm, //品牌型号弹窗
-    supplyDialog,
-    supplierDialog,
-    maintainerDialog,
-    insurerDialog,
-    guaranteeDialog,
     uploadFilesDialog,
     uploadImgDialog,
     picDialog,
@@ -104,12 +88,6 @@ export default {
       partsTypeList: [], //tabs
       myDialog: {
         qrcode: false, //二维码弹窗
-        firm: false, //厂商弹窗
-        supply: false, //选择供应合同
-        supplier: false, //供应商选择
-        guarantee: false, //选择保单
-        maintainer: false, //选择维修商
-        insurer: false, //选择保险公司
         uploadFiles: false, //上传文件
         uploadImgs: false, //上传单个图片
         pic: false, //多个图片
@@ -119,6 +97,7 @@ export default {
         changeRea: false,
         lookPic: false //图片查看
       },
+      inputMap: {},
       qrcodeUrl: "", //二维码图片地址
       filesArr: [], //保存临时的文件key
       imgsArr: [], //临时保存的图片key数组
@@ -190,7 +169,7 @@ export default {
       let params = {
         pageNumber: this.page.pageNumber,
         pageSize: this.page.PageSize,
-        orders: "createTime desc, EquipLocalName desc, EquipLocalID desc, EquipID desc",
+        orders: "createTime desc, localName desc, localId desc, id desc",
         filters: `category='${this.tabVal}';parentId='${this.deviceId}'`
       };
       await getEquipPartsCon(params, res => {
@@ -326,51 +305,6 @@ export default {
         // this.systemList = this.tableData[row.row].linkSystem || [];
         this.myDialog.systemType = true;
       }
-      //品牌型号弹窗
-      if (val == "dpManufacturerId") {
-        this.myDialog.firm = true;
-      }
-      //供应商信息弹窗
-      if (val == "dpSupplierId") {
-        this.myDialog.supplier = true;
-      }
-      //维修商信息弹窗
-      if (val == "dpMaintainerId") {
-        this.myDialog.maintainer = true;
-      }
-      //保险公司信息
-      if (val == "dpInsurerId") {
-        this.myDialog.insurer = true;
-      }
-      //供应合同编号
-      if (val == "infos.supplierContractID") {
-        let falg = null;
-        let data = this.tableData[row.row].dpSupplierId;
-        if (data) {
-          falg = data.split("-")[0];
-        }
-        if (!!falg) {
-          this.id = falg;
-          this.myDialog.supply = true;
-        } else {
-          this.$message("请先选择供应商");
-        }
-      }
-      //保险单号
-      if (val == "infos.insuranceNum") {
-        //选择保单
-        let falg = null;
-        let data = this.tableData[row.row].dpInsurerId;
-        if (data) {
-          falg = data.split("-")[0];
-        }
-        if (!!falg) {
-          this.id = falg;
-          this.myDialog.guarantee = true;
-        } else {
-          this.$message("请先选择保险商");
-        }
-      }
       //保险文件--设备文档--安装质检报告
       if (
         val == "infos.insuranceFile" || //保险文件

+ 3 - 3
src/views/ledger/facility/partsmanage/index.vue

@@ -2,8 +2,8 @@
   <div id="deviceList">
     <el-row>
       <el-tabs @tab-click="tabsClick" v-model="tabVal">
-        <el-tab-pane v-for="t in partsTypeList" :key="t.id" :name="t.code"
-                     :label="t.name+'('+t.count+')'"></el-tab-pane>
+        <el-tab-pane v-for="t in partsTypeList" :key="t.code" :name="t.code"
+                     :label="`${t.name}(${t.count?t.count:0})`"></el-tab-pane>
       </el-tabs>
     </el-row>
     <el-row class="left">
@@ -338,7 +338,7 @@ export default {
         data: []
       };
       params.map(item => {
-        param.data.push({ EquipID: item.EquipID });
+        param.data.push({ id: item.id });
       });
       this.$confirm("此操作将删除部件,是否继续?", "提示", {
         confirmButtonText: "确定",