Bladeren bron

Merge branch 'master' of git.sagacloud.cn:web/ibms

zhangyu 5 jaren geleden
bovenliggende
commit
d42639f514

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

@@ -852,15 +852,15 @@ export function getProductList(param, success) {
 
 //完全匹配的厂商信息
 export function getBasicMatch(param) {
-    console.log(param, "param")
     let data = param
     return fetch({ method: 'POST', url: `${venders}/basic/autoFillId`, data })
 }
 
 //设备清单-查询设备内容
-export function getEquipTableCon(param) {
+export function getEquipTableCon(param, success) {
+    let url = `${baseUrl}/equip-component/equip-query/equip-components`;
     let data = param;
-    return fetch({ method: 'POST', url: `${baseUrl}/equip-component/equip-query/equip-components`, data })
+    http.postJson(url, data, success)
 }
 
 //设备清单-查询当前设备下的部件分类
@@ -919,6 +919,20 @@ export function createEquip(param, success) {
     http.postJson(url, data, success)
 }
 
+//设备清单 - 更新设备
+export function updateEquip(param, success) {
+    let url = `${baseUrl}/datacenter/equip/update`;
+    let data = param;
+    http.postJson(url, data, success)
+}
+
+//设备清单 - 删除设备
+export function deleteEquip(param, success) {
+    let url = `${baseUrl}/datacenter/equip/delete`;
+    let data = param;
+    http.postJson(url, data, success)
+}
+
 //创建资产所需(Family族id3位编码)-根据设备类型(4位编码)或部件类型(6位编码)查询
 export function getEquipBelongs(param, success) {
     let url = `${baseUrl}/datacenter/data-dictionary/family-query`;

+ 16 - 58
src/components/dialogs/list/systemType.vue

@@ -6,31 +6,11 @@
     <div>
       <div id="systemType">
         <div class="title-search query-form" style="padding: 10px;margin-bottom: 10px;" v-if="type != 'read' ">
-          <el-input
-            placeholder="输入名称或编码进行查询"
-            v-model="search"
-            size="small"
-            style="width:300px; margin-right:10px"
-            clearable
-          ></el-input>
+          <el-input placeholder="输入名称或编码进行查询" v-model="search" size="small" style="width:300px; margin-right:10px" clearable></el-input>
           <el-button size="small" @click="searchChecked">查找</el-button>
         </div>
-        <el-table
-        class='data-table'
-            border
-          :data="tableData"
-          @selection-change="handleSelectionChange"
-          style="width: 100%"
-          ref="multipleTable"
-        >
-          <el-table-column
-            v-if="type != 'read' "
-            type="selection"
-            :reserve-selection="true"
-            :disabled="true"
-            width="55"
-             
-          ></el-table-column>
+        <el-table class='data-table' border :data="tableData" @selection-change="handleSelectionChange" style="width: 100%" ref="multipleTable">
+          <el-table-column v-if="type != 'read' " type="selection" :reserve-selection="true" :disabled="true" width="55"></el-table-column>
           <el-table-column label="系统名称" header-align='center'>
             <template slot-scope="scope">{{scope.row.infos.SysLocalName || scope.row.infos.SysName}}</template>
           </el-table-column>
@@ -39,7 +19,7 @@
           </el-table-column>
           <el-table-column label="专业" header-align='center'>
             <template slot-scope="scope">{{getName(scope.row.category)}}</template>
-          </el-table-column> 
+          </el-table-column>
           <el-table-column label="详情" header-align='center' width="100" align="center">
             <template slot-scope="scope">
               <el-button @click="lookDeatils(scope.row)" type="text">详情</el-button>
@@ -52,36 +32,15 @@
             @click="getChange"
             style="display:block;margin: 10px auto 0;"
           >确 定</el-button>
-        </div> -->        
+        </div> -->
       </div>
     </div>
     <span slot="footer" class="dialog-footer">
-           <el-button
-            type="primary"
-            @click="getChange"            
-          >确 定</el-button>
-        </span>
-    <el-dialog
-      title="系统详情"
-      :visible.sync="iframeShow"
-      v-if="iframeShow"
-      width="500px"
-      append-to-body
-    >
-      <iframe
-        id="google_ads_frame2"
-        name="google_ads_frame2"
-        frameborder="0"
-        :src="iframeSrc"
-        marginwidth="0"
-        marginheight="0"
-        vspace="0"
-        hspace="0"
-        style="width:100%;height:500px;"
-        allowtransparency="true"
-        scrolling="no"
-        allowfullscreen="true"
-      ></iframe>
+      <el-button type="primary" @click="getChange">确 定</el-button>
+    </span>
+    <el-dialog title="系统详情" :visible.sync="iframeShow" v-if="iframeShow" width="500px" append-to-body>
+      <iframe id="google_ads_frame2" name="google_ads_frame2" frameborder="0" :src="iframeSrc" marginwidth="0" marginheight="0" vspace="0" hspace="0"
+        style="width:100%;height:500px;" allowtransparency="true" scrolling="no" allowfullscreen="true"></iframe>
     </el-dialog>
   </el-dialog>
 </template>
@@ -123,8 +82,7 @@ export default {
   data() {
     return {
       search: "", //搜索文案
-      tableData: [
-      ],
+      tableData: [],
       systemList: [],
       allData: [],
       multipleSelection: [],
@@ -135,9 +93,9 @@ export default {
   },
   computed: {
     ...mapGetters("layout", [
-        "projectId",
-        "secret",
-        "userId"
+      "projectId",
+      "secret",
+      "userId"
     ])
   },
   mounted() { },
@@ -315,8 +273,8 @@ export default {
 
 <style lang="less">
 #systemType {
-    height: 455px;
-    overflow-y:auto; 
+  height: 455px;
+  overflow-y: auto;
   .el-table thead {
     tr {
       th {

File diff suppressed because it is too large
+ 331 - 720
src/components/ledger/handsontables/device.vue


+ 8 - 7
src/views/ledger/facility/addfacility.vue

@@ -39,7 +39,7 @@
     <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>
-    <system-type :infos="systemId" :graphyId="graphyId" :dialog="myDialog"></system-type>
+    <system-type :infos="systemId" :graphyId="graphyId" :dialog="myDialog" :type="'edit'" @change="changeSystemType"></system-type>
     <details-dialog :iframeSrc="iframeSrc" v-if="myDialog.details" :dialog="myDialog"></details-dialog>
   </div>
 </template>
@@ -146,7 +146,6 @@ export default {
   },
   created() {
     this.category = this.$route.query;
-    console.log(this.category)
     this.getBelongs();
     this.getTableHeader();
   },
@@ -217,8 +216,7 @@ export default {
               if (i == newData.length - 1) {
                 this.$router.push({
                   path: "/ledger/facility",
-                  query: {
-                    deviceId: this.category.deviceId                  }
+                  query: { deviceId: this.category.deviceId }
                 });
                 session.remove("deviceAddData")
               }
@@ -229,8 +227,7 @@ export default {
             if (i == newData.length - 1) {
               this.$router.push({
                 path: "/ledger/partsmanage",
-                query: {
-                  deviceId: this.category.deviceId                }
+                query: { deviceId: this.category.deviceId }
               });
               session.remove("deviceAddData")
             }
@@ -439,6 +436,10 @@ export default {
     changePics(keys) {
       this.setDataToMain(keys, this.messKey, this.row);
     },
+    //关联系统变更
+    changeSystemType(data) {
+      tools.setDataForKey(this.tableData[this.row], "linkSystem", data)
+    },
     //表格点击事件
     handleTdClick(el, rowArr) {
       //点击的是表头
@@ -493,7 +494,7 @@ export default {
       }
       //关联系统
       if (val == "linkSystem") {
-        // this.systemList = this.tableData[row.row].linkSystem || [];
+        this.systemList = this.tableData[row.row].linkSystem || [];
         this.myDialog.systemType = true;
       }
       //品牌型号弹窗

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

@@ -39,7 +39,6 @@
     <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>
-    <system-type :infos="systemId" :graphyId="graphyId" :dialog="myDialog"></system-type>
     <details-dialog :iframeSrc="iframeSrc" v-if="myDialog.details" :dialog="myDialog"></details-dialog>
   </div>
 </template>
@@ -69,7 +68,6 @@ 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";
-import systemType from "@/components/dialogs/list/systemType";
 export default {
   components: {
     qrcode, //二维码页面
@@ -82,7 +80,6 @@ export default {
     uploadFilesDialog,
     uploadImgDialog,
     picDialog,
-    systemType,
     handsonTable
   },
   data() {

+ 33 - 117
src/views/ledger/facility/partsmanage/index.vue

@@ -26,7 +26,8 @@
       </div>
     </div>
     <el-pagination class="right" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange"
-      :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="page.total"></el-pagination>
+      :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
+      :total="page.total"></el-pagination>
     <!-- 二维码弹窗 -->
     <qrcode :dialog="myDialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>
     <!-- 型号弹窗 -->
@@ -36,13 +37,15 @@
     <!-- 供应商弹窗 -->
     <supplier-dialog ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"></supplier-dialog>
     <guarantee-dialog :id="id" ref="guarantee" @change="guaranteeChange" :dialog="myDialog"></guarantee-dialog>
-    <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr" :dialog="myDialog"></upload-files-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>
-    <system-type :infos="systemId" :graphyId="graphyId" :dialog="myDialog"></system-type>
     <details-dialog :iframeSrc="iframeSrc" v-if="myDialog.details" :dialog="myDialog"></details-dialog>
+    <!-- 修改关联的资产 -->
+    <!-- <change-rea :dialog="myDialog" :category="category"></change-rea> -->
   </div>
 </template>
 <script>
@@ -72,7 +75,7 @@ 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";
-import systemType from "@/components/dialogs/list/systemType";
+import changeRea from "@/components/dialogs/changeRea"
 export default {
   components: {
     qrcode, //二维码页面
@@ -85,8 +88,8 @@ export default {
     uploadFilesDialog,
     uploadImgDialog,
     picDialog,
-    systemType,
-    handsonTable
+    handsonTable,
+    changeRea
   },
   data() {
     return {
@@ -124,7 +127,8 @@ export default {
         systemType: false,
         details: false, //详情页
         changeRea: false,
-        lookPic: false //图片查看
+        lookPic: false, //图片查看
+        changeRea: false, //关联的资产
       },
       qrcodeUrl: "", //二维码图片地址
       filesArr: [], //保存临时的文件key
@@ -442,26 +446,10 @@ export default {
     },
     //选择型号修改
     firmChange(data) {
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "DPSpecificationID",
-        data.specificationId
-      );
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.EquipManufactor.Brand",
-        data.brand
-      );
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.EquipManufactor.Specification",
-        data.name
-      );
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.EquipManufactor.Manufacturer",
-        data.venderName
-      );
+      tools.setDataForKey(this.tableData[this.row], "DPSpecificationID", data.specificationId);
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brand);
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name);
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Manufacturer", data.venderName);
       for (let key in data) {
         if (key == "venderId") {
           data[key] = data[key] + "-" + data.name + "/" + data.brand;
@@ -475,36 +463,12 @@ export default {
     },
     //如果选择供应商之后
     supplierChange(data) {
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.SupplyPurchase.Supplier",
-        data.name
-      );
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.SupplyPurchase.SupplierWeb",
-        data.website
-      );
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.SupplyPurchase.SupplierContactor",
-        data.man
-      );
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.SupplyPurchase.SupplierPhone",
-        data.phone
-      );
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.SupplyPurchase.SupplierFax",
-        data.fox
-      );
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.SupplyPurchase.SupplierEmail",
-        data.email
-      );
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name);
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierWeb", data.website);
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierContactor", data.man);
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierPhone", data.phone);
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierFax", data.fox);
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierEmail", data.email);
       for (let key in data) {
         if (key == "venderId") {
           data[key] = data[key] + "-" + data.name;
@@ -534,36 +498,12 @@ export default {
     },
     //维修商变更
     changeMaintainer(data) {
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.OperationMainte.Maintainer",
-        data.name
-      );
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.OperationMainte.MaintainerWeb",
-        data.website
-      );
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.OperationMainte.MaintainerContactor",
-        data.man
-      );
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.OperationMainte.MaintainerPhone",
-        data.phone
-      );
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.OperationMainte.MaintainerFax",
-        data.fox
-      );
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.OperationMainte.MaintainerEmail",
-        data.email
-      );
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name);
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerWeb", data.website);
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerContactor", data.man);
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerPhone", data.phone);
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerFax", data.fox);
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerEmail", data.email);
       for (let key in data) {
         if (key == "venderId") {
           data[key] = data[key] + "-" + data.name;
@@ -573,36 +513,12 @@ export default {
     },
     //保险商变更
     changeInsurer(data) {
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.InsuranceDoc.InsurerEmail",
-        data.email
-      );
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.InsuranceDoc.InsurerFax",
-        data.fox
-      );
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.InsuranceDoc.InsurerPhone",
-        data.phone
-      );
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.InsuranceDoc.InsurerContactor",
-        data.man
-      );
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.InsuranceDoc.InsurerWeb",
-        data.website
-      );
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "LedgerParam.InsuranceDoc.Insurer",
-        data.name
-      );
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerEmail", data.email);
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerFax", data.fox);
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerPhone", data.phone);
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerContactor", data.man);
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerWeb", data.website);
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name);
       for (let key in data) {
         if (key == "venderId") {
           data[key] = data[key] + "-" + data.name;