فهرست منبع

挂锁类型代码修复

pm 7 ماه پیش
والد
کامیت
871e2f0993

+ 1 - 1
src/api/mes/hw/hadrwareType.js

@@ -13,7 +13,7 @@ export function listHanrwareType(query) {
 // 获取硬件类型详细信息
 export function getHardwareTypeInfo(repairId) {
   return request({
-    url: '/iscs/type/selectIsHardwareTypeById/?id=' + repairId,
+    url: '/iscs/type/selectIsHardwareTypeById?id=' + repairId,
     method: 'get'
   })
 }

+ 26 - 19
src/views/mes/hw/type/index.vue

@@ -60,6 +60,15 @@
         >
       </el-form-item>
     </el-form>
+<!--    <el-button-->
+<!--      v-no-more-click-->
+<!--      size="mini"-->
+<!--      type="primary"-->
+<!--      icon="el-icon-plus"-->
+<!--      @click="handleAdd"-->
+<!--      v-hasPermi="['mes:hw:type:add']"-->
+<!--    >新增</el-button-->
+<!--    >-->
     <el-table
       v-loading="loading"
       :data="machinerytypeList"
@@ -297,7 +306,18 @@ export default {
         // console.log(this.machinerytypeList, "machinerytypeList");
       });
     },
-    /** 转换设备类型数据结构 */
+    /** 查询设备类型下拉树结构 */
+    getTreeselect() {
+      const data={
+        current: 1,
+        size:-1
+      }
+      listHanrwareType(data).then((response) => {
+        debugger;
+        this.machinerytypeOptions =this.handleTree(response.data.records, "id", "parentTypeId")
+      });
+    },
+    /** 获取父类型 */
     normalizer(node) {
       if (node.children && !node.children.length) {
         delete node.children;
@@ -308,20 +328,7 @@ export default {
         children: node.children,
       };
     },
-    /** 查询设备类型下拉树结构 */
-    getTreeselect() {
-      listHanrwareType().then((response) => {
-        debugger;
-        this.machinerytypeOptions = [];
-        const data = this.handleTree(
-          response.data.records,
-          "id",
-          "parentTypeId"
-        )[0];
-        // console.log(data, "父类型回显");
-        this.machinerytypeOptions.push(data);
-      });
-    },
+
     // 取消按钮
     cancel() {
       this.open = false;
@@ -355,10 +362,7 @@ export default {
       this.resetForm("queryForm");
       this.handleQuery();
     },
-    // 层级计数器函数
-    handleChange(value) {
-      // console.log(value);
-    },
+
     /** 新增按钮操作 */
     handleAdd(row) {
       this.reset();
@@ -376,6 +380,9 @@ export default {
     handleUpdate(row) {
       this.reset();
       this.getTreeselect();
+      if(row.parentTypeId == "0") {
+        this.form.parentTypeId = undefined;
+      }
       if (row != null) {
         this.form.parentTypeId = row.id;
       }

+ 2 - 2
src/views/mes/md/locksettype/index.vue

@@ -171,8 +171,8 @@
     </el-table>
 
     <!-- 添加或修改部门对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+    <el-dialog :title="title" :visible.sync="open" width="640px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="150px">
         <el-row>
           <el-col :span="18">
             <el-form-item label="父级" prop="parentTypeId">

+ 7 - 6
src/views/mes/md/locktype/index.vue

@@ -386,16 +386,17 @@ export default {
     },
     /** 查询挂锁类型下拉树结构 */
     getTreeselect() {
-      listHanrwareType().then((response) => {
+      const data={
+        current: 1,
+        size:-1
+      }
+      listHanrwareType(data).then((response) => {
         debugger;
-        this.machinerytypeOptions = [];
-        const data = this.handleTree(
+        this.machinerytypeOptions=this.handleTree(
           response.data.records,
           "id",
           "parentTypeId"
-        )[0];
-        // console.log(data, "父类型回显");
-        this.machinerytypeOptions.push(data);
+        );
       });
     },
     /** 转换设备类型数据结构 */

+ 1 - 1
vue.config.js

@@ -43,7 +43,7 @@ module.exports = {
         }
       },
       '/ureport': {
-        target: 'http://192.168.28.97:9190',
+        target: 'http://36.133.174.236:9190',
         ws:false,
         changeOrigin: true,
         pathRewrite: {