Browse Source

modify device relation system dialog

haojianlong 5 years ago
parent
commit
4674200111

+ 7 - 0
src/api/scan/request.js

@@ -920,6 +920,13 @@ export function deleteEquip(param, success) {
     http.postJson(url, data, success)
 }
 
+//设备清单 - 设备关联系统
+export function equipLinkSys(param, success) {
+    let url = `${baseUrl}/datacenter/sy-in-eq/link-sy`;
+    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`;

+ 0 - 7
src/components/dialogs/list/systemType.vue

@@ -26,13 +26,6 @@
             </template>
           </el-table-column>
         </el-table>
-        <!-- <div class="footer" v-if="type != 'read' ">
-          <el-button
-            type="primary"
-            @click="getChange"
-            style="display:block;margin: 10px auto 0;"
-          >确 定</el-button>
-        </div> -->
       </div>
     </div>
     <span slot="footer" class="dialog-footer">

+ 10 - 6
src/components/ledger/handsontables/device.vue

@@ -223,9 +223,11 @@ export default {
       this.changeCader()
       if (this.mess.deviceId) {
         let params = {
-          PageNumber: 1,
-          PageSize: 500,
-          Filters: `type='Equipment' or type='${this.mess.deviceId}'`
+          data: {
+            PageNumber: 1,
+            PageSize: 500
+          },
+          type: this.mess.deviceId
         };
         getDataDictionary(params, res => {
           this.tableHeader = res.Content;
@@ -241,7 +243,7 @@ export default {
       if (!!this.mess.deviceId) {
         let param = {
           PageSize: this.page.size,
-          Orders: "createTime desc",
+          Orders: "createTime desc, EquipID desc",
           PageNumber: this.page.currentPage,
           Filters: `category='${this.mess.deviceId}'`
         }
@@ -615,8 +617,10 @@ export default {
           break;
         //关联系统
         case 'linkSystem':
-          this.systemList = this.tableData[row.row].LinkSystem || [];
-          this.myDialog.systemType = true;
+          if (!this.onlyRead) {
+            this.systemList = this.tableData[row.row].LinkSystem || [];
+            this.myDialog.systemType = true;
+          }
           break;
         //关联资产
         case 'LinkEquipLocalName':

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

@@ -37,7 +37,8 @@
     <!-- 供应商弹窗 -->
     <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>
@@ -250,9 +251,11 @@ export default {
     // 获取表头数据(初始化表格)
     async getTableHeader() {
       let params = {
-        PageNumber: 1,
-        PageSize: 500,
-        Filters: `type='Equipment' or type='${this.category.deviceId}'`
+        data: {
+          PageNumber: 1,
+          PageSize: 500
+        },
+        type: this.category.deviceId
       };
       await getDataDictionary(params, res => {
         this.tableHeader = res.Content;