likang 3 years ago
parent
commit
a375f19059

+ 2 - 2
src/views/work_box_map/routeMap.vue

@@ -8,12 +8,12 @@
             <input
               id="sole-input"
               class="searchbox-content-common"
-              v-model="queryParam.number"
+              v-model="queryParam.name"
               type="text"
               name="word"
               autocomplete="off"
               maxlength="256"
-              placeholder="请输入设备"
+              placeholder="请输入设备名称"
               @change="startSearch"
               value
             />

+ 109 - 200
src/views/work_record/work_plan/formModel.vue

@@ -8,6 +8,7 @@
     :visible.sync="DialogVisible"
     custom-class="abow_dialog"
     label-position="left"
+    width="450px"
     :dialogAttrs="{ 'close-on-click-modal': false,'top':'8vh'}"
   />
 
@@ -20,73 +21,47 @@ export default {
     return {
       formData: {},
       formFieldsData: {
-        id:"",
-        is_used:"",
-        department_id: "",
-        number: "",
-        name: "",
-        model: "",
+        id: "",
+        plan_name:'',
+        wind_id:"",
         fan_id:"",
-        outside:"",
-        torque:"",
-        wrench:"",
-        stress:"",
-        bolt_size:"",
-        bolt_number:"",
-        install_position:"",
-        brand:"",
-        supplier:"",
-        out_date:"",
-        fastening_scheme:"",
-        remark: "",
-
+        work_sign:"",
+        parts_sign:"",
+        boit_type_sign: "",
+        status:'',
+        info: "",
       }, 
-      url: "flange",
+      url: "workplan",
       formConfig: {
         formDesc: {
-           is_used: {
-            break:true,
-            layout:12,
-            type: "select",
-            label: "使用状态",
+          plan_name: {
             required: true,
-            isOptions: true,
-            options: [
-              {
-                text: "使用",
-                value: 1
-              },
-              {
-                text: "未使用",
-                value: -1
-              },
-              {
-                text: "已废弃",
-                value: -2
-              }
-            ]
+            type: "input",
+            label: "计划名称"
           },
+          wind_id: {
           
-           department_id: {
-            layout:12,
             type: "cascader",
-            label: "所属部门",
+            label: "风场名称",
             isOptions: true,
             options: [],
             required: true,
+            vif: true,
             attrs: {
+              //查询 
+              filterable: true,
               props: {
-                label: "department_name",
-                value: "id",
+                label: "text",
+                value: "value",
                 emitPath: false,
-                checkStrictly: true
-
+                multiple: false
               }
             }
+
           },
           //风场id
           fan_id:{
-             layout:12,
+             
               type: "cascader",
               label: "风机编号",
               isOptions: true,
@@ -97,7 +72,7 @@ export default {
                 //查询 
                 filterable:true,
                 props: {
-                  label: "text",
+                  label: "name",
                   value: "value",
                   emitPath: false,
                   multiple:false
@@ -105,160 +80,107 @@ export default {
             }
 
           },
-          number: {
-            layout:12,
-            required:true,
-            type: "input",
-            label: "编号",
-           
-          },
-           name: {
-            layout:12,
-            type: "input",
-            label: "名称",
-            required:true
-          },
-          model: {
-            layout:12,
-            required:true,
-            type: "select",
-            label: "型号",
-            required:true,
-            options:[]
-          },
-           outside:{
-            layout:12,
-            type: "input",
-            label: "外径",
-             required:true
-          },
-           torque:{
-             layout:12,
-             type: "input",
-             label: "扭矩",
-             required:true,
-             rules: [
-             {pattern: /^((0{1}\.\d{1,2})|([1-9]\d*\.{1}\d{1,2})|([1-9]+\d*)|0)$/,message: '请輸入正数,最多保存两位小数'}
-            ]
-          },
-          wrench:{
-             layout:12,
-             type: "select",
-              label: "液压扳手",
-              isOptions: true,
-              options: [],
-              required: true,
-              attrs: {
-                //查询
-                filterable:true,
-                multiple:true,
-                props: {
-                  label: "text",
-                  value: "value",
-                  emitPath: false,
-                  checkStrictly: false,
-                  multiple:false
-                }
+          parts_sign: {
+          
+            type: "cascader",
+            label: "部件类型",
+            isOptions: true,
+            options: [],
+            required: true,
+            vif: true,
+            attrs: {
+              //查询 
+              filterable: true,
+              props: {
+                label: "name",
+                value: "value",
+                emitPath: false,
+                multiple: false
+              }
             }
 
           },
-          fastening_scheme:{
-             layout:12,
-             type: "select",
-              label: "紧固方案",
-              isOptions: true,
-              options: [],
-              required: true,
-              attrs: {
-                //查询
-                filterable:true,
-                multiple:true,
-                props: {
-                  label: "text",
-                  value: "value",
-                  emitPath: false,
-                  checkStrictly: false,
-                  multiple:false
-                }
+          work_sign: {
+            
+            type: "cascader",
+            label: "工作位置",
+            isOptions: true,
+            options: [],
+            required: true,
+            vif: true,
+            attrs: {
+              //查询 
+              filterable: true,
+              props: {
+                label: "name",
+                value: "value",
+                emitPath: false,
+                multiple: false
+              }
             }
 
           },
-          stress:{
-             layout:12,
-             required: true,
-             type: "input",
-             label: "压力",
-             rules: [
-               {pattern: /^((0{1}\.\d{1,2})|([1-9]\d*\.{1}\d{1,2})|([1-9]+\d*)|0)$/,message: '请輸入正数,最多保存两位小数'}
-            ]
-          },
-          bolt_size: {
-             layout:12,
-             type: "input",
-             label: "螺栓尺寸",
-             rules: [
-             {pattern: /^((0{1}\.\d{1,2})|([1-9]\d*\.{1}\d{1,2})|([1-9]+\d*)|0)$/,message: '请輸入正数,最多保存两位小数'}
-            ]
+          boit_type_sign: {
+           
+            type: "cascader",
+            label: "螺栓型号",
+            isOptions: true,
+            options: [],
+            required: true,
+            vif: true,
+            attrs: {
+              //查询 
+              filterable: true,
+              props: {
+                label: "name",
+                value: "value",
+                emitPath: false,
+                multiple: false
+              }
+            }
+
           },
-           bolt_number: {
+          status: {
+            break: true,
+           
+            type: "select",
+            label: "使用状态",
             required: true,
-            layout:12,
-             type: "input",
-             label: "螺栓数量",
-             rules: [
-              
-               {pattern: /^[1-9]\d*$/,message: '请輸入正整数'}
-              
+            isOptions: true,
+            options: [
+              {
+                text: "使用",
+                value: 1
+              },
+              {
+                text: "未使用",
+                value: -1
+              },
             ]
           },
-          install_position:{
-             layout:12,
-            type: "input",
-            label: "安装位置",
-            vif:true
-          },
-           brand: {
-             layout:12,
-            type: "input",
-            label: "品牌"
-          },
-           supplier: {
-            layout:12,
-            type: "input",
-            label: "供应商"
-          },
-            out_date: {
-            layout:12,
-            type: "date",
-            label: "出厂日期"
-          },
-          remark: {
+          info: {
             type: "textarea",
             label: "备注"
-          }
+          },
         },
-        order: ["is_used","model","department_id","fan_id","number", "name","outside","wrench","torque","fastening_scheme","stress","bolt_size","bolt_number","install_position","brand","supplier","out_date","remark"]
+        order: ["plan_name", "wind_id", "fan_id", "parts_sign", "work_sign", "boit_type_sign", "status","info"]
       }
     };
   },
   created() {
-    // this.$http.get("departments").then(response => {
-    //   this.formConfig.formDesc.department_id.options = response.data;
-    // });
-  
-    //  this.$http.get("getwindfan").then(response => {
-    //   this.formConfig.formDesc.fan_id.options = response.data;
-    // });
-    // this.$http.get("get_device_mold",{ params: {type:2} }).then(resp => {
-    //     this.formConfig.formDesc.model.options = resp.data
-    //  });
-    // this.$http.get("wrenchtype").then(response => {
-    //   this.formConfig.formDesc.wrench.options = response.data;
-    // });
-    // this.$http.get("synschemetype").then(response => {
-    //   this.formConfig.formDesc.fastening_scheme.options = response.data;
-    // });
-
+    this.$http.get("wind/getWindOptions").then((response) => {
+      this.formConfig.formDesc.wind_id.options = response.data;
+    });
+   
+    this.$http.get("get_mainten_option?type=" + "2").then((response) => {
+      this.formConfig.formDesc.work_sign.options = response.data;
+    });
+    this.$http.get("get_mainten_option?type=" + "1").then((response) => {
+      this.formConfig.formDesc.parts_sign.options = response.data;
+    });
+    this.$http.get("get_mainten_option?type=" + "4").then((response) => {
+      this.formConfig.formDesc.boit_type_sign.options = response.data;
+    });
 
 
   },
@@ -281,20 +203,7 @@ export default {
         this.$emit("sendVal", val); // 表示将子组件改变的值传递给父组件
       },
       get() {
-        if(this.formModelVisible)
-        {
-      
-            if(!this.formFieldsData.id)
-            {
-                this.formConfig.formDesc.fan_id.vif=false;
-                this.formConfig.formDesc.install_position.vif=false;
-            }
-            else
-            {
-              this.formConfig.formDesc.fan_id.vif=true;
-              this.formConfig.formDesc.install_position.vif=false;
-            }
-        }
+     
         return this.formModelVisible; // 表示获取父组件的值
       }
     }

+ 28 - 40
src/views/work_record/work_plan/index.vue

@@ -192,7 +192,7 @@
         prop="plan_name"
         label="工作计划"
         align="center"
-        v-if="showColumn.number"
+        v-if="showColumn.plan_name"
         :show-overflow-tooltip="true"
       />
        <el-table-column
@@ -214,35 +214,35 @@
         prop="work_sign_name"
         label="工作位置"
         align="center"
-        v-if="showColumn.work_local"
+        v-if="showColumn.work_sign_name"
         :show-overflow-tooltip="true"
       />
       <el-table-column
         prop="parts_sign_name"
         label="部件"
         align="center"
-        v-if="showColumn.parts"
+        v-if="showColumn.parts_sign_name"
         :show-overflow-tooltip="true"
       />
       <el-table-column
         prop="boit_type_sign_name"
         label="螺栓型号"
         align="center"
-        v-if="showColumn.boit_type"
+        v-if="showColumn.boit_type_sign_name"
         :show-overflow-tooltip="true"
       />
       <el-table-column
         prop="creat_name"
         label="创建人名称"
         align="center"
-        v-if="showColumn.work_name"
+        v-if="showColumn.creat_name"
         :show-overflow-tooltip="true"
       />
        <el-table-column
         prop="created_at"
         label="创建时间"
         align="center"
-        v-if="showColumn.create_time"
+        v-if="showColumn.created_at"
         :show-overflow-tooltip="true"
       />
       <el-table-column
@@ -273,17 +273,13 @@
           <div class="head">选择显示字段</div>
           <div class="body">
             <el-checkbox v-model="checkList.id">序号</el-checkbox>
-            <el-checkbox v-model="checkList.department_name">所属地区</el-checkbox>
+            <el-checkbox v-model="checkList.plan_name">工作计划</el-checkbox>
             <el-checkbox v-model="checkList.wind_name">风场名称</el-checkbox>
             <el-checkbox v-model="checkList.fan_number">风机机位号</el-checkbox>
-            <el-checkbox v-model="checkList.number">编号</el-checkbox>
-            <el-checkbox v-model="checkList.parts">所属部件</el-checkbox>
-            <el-checkbox v-model="checkList.bolt_style">螺丝样式</el-checkbox>
-            <el-checkbox v-model="checkList.boit_type">螺栓型号</el-checkbox>
-            <el-checkbox v-model="checkList.torque">扭矩</el-checkbox>
-            <el-checkbox v-model="checkList.pressure">压力</el-checkbox>
-            <el-checkbox v-model="checkList.external_diameter">外径</el-checkbox>
-            <el-checkbox v-model="checkList.work_name">操作人员</el-checkbox>
+            <el-checkbox v-model="checkList.work_sign_name">工作位置</el-checkbox>
+            <el-checkbox v-model="checkList.parts_sign_name">部件</el-checkbox>
+            <el-checkbox v-model="checkList.boit_type_sign_name">螺栓型号</el-checkbox>
+            <el-checkbox v-model="checkList.creat_name">创建人名称</el-checkbox>
             <el-checkbox v-model="checkList.created_at">创建时间</el-checkbox>
 
           </div>
@@ -410,19 +406,15 @@ export default {
       checkList: {},
       showColumn: {
         id:true,
-        department_name:false,
+        plan_name:true,
         wind_name:true,
         fan_number:true,
         number: true,
-        work_local: true,
-        parts:true,
-        bolt_style: true,
-        boit_type: true,
-        torque:true,
-        pressure:true,
-        external_diameter:true,
+        work_sign_name: true,
+        parts_sign_name:true,
+        boit_type_sign_name: true,
+        creat_name: true,
         created_at:true,
-        work_name:true
       }
     };
   },
@@ -482,7 +474,7 @@ export default {
       this.isShowColumn = true;
     },
     saveColumn() {
-      localStorage.setItem("WorklocalSet", JSON.stringify(this.checkList));
+      localStorage.setItem("WorkPlanSet", JSON.stringify(this.checkList));
       this.isShowColumn = false;
     },
     closeDrawer(){
@@ -520,24 +512,20 @@ export default {
       this.searchDis();
     });
     // 发请求得到checkListInitData的列的名字
-    if (localStorage.getItem("WorklocalSet")) {
-      this.checkList = JSON.parse(localStorage.getItem("WorklocalSet"));
+    if (localStorage.getItem("WorkPlanSet")) {
+      this.checkList = JSON.parse(localStorage.getItem("WorkPlanSet"));
     } else {
       this.checkList = {
-        id:true,
-        department_name:false,
-         wind_name:true,
-        fan_number:true,
+        id: true,
+        plan_name: true,
+        wind_name: true,
+        fan_number: true,
         number: true,
-        work_local: true,
-        parts:true,
-        bolt_style: true,
-        boit_type: true,
-        torque:true,
-        pressure:true,
-        external_diameter:true,
-        created_at:true,
-        work_name:true
+        work_sign_name: true,
+        parts_sign_name: true,
+        boit_type_sign_name: true,
+        creat_name: true,
+        created_at: true,
       };
     }
   },