likang 3 years ago
parent
commit
10449a59e3

+ 107 - 0
src/views/device/storage_equipment/bmapModel.vue

@@ -0,0 +1,107 @@
+<template>
+  <ele-form-dialog
+    v-bind="formConfig"
+    v-model="formData"
+    :request-fn="handleRequest"
+    :visible.sync="DialogVisible"
+    @input='getChangeValue'
+    width="30%"
+  />
+</template>
+
+<script>
+export default {
+  props: ["bmapModelVisible","bmapModelData"],
+  data() {
+    return {
+      formData: {
+        lat: '121.480836',
+        lng: '31.236519',
+        address:'上海',
+        location:{'lng':121.480836,'lat':'31.236519','address':'上海'}
+      },
+      formConfig: {
+          isShowLabel: false,
+          inline: true,
+          submitBtnText: "确认",
+        formDesc: {
+          location: {
+            type: "bmap",
+            label: "坐标",
+            attrs: {
+              ak: "LDeyoWgKV2mO1b3MRkTlyzGcNjFUycLL",
+              zoom: 15,
+              isScrollWheelZoom:true,
+            },
+            layout: 24
+          },
+          lng: {
+              
+            type: "input",
+            label: "经度",
+            layout: 8
+          },
+          lat: {
+              
+            type: "input",
+            label: "纬度",
+            layout: 8,
+            
+          }
+        }
+      }
+    };
+  },
+  methods: {
+    handleRequest(data) {
+      
+      if(this.formData.location){
+          this.$parent.location=this.formData.location
+          this.$emit("sendVal", this.formData.location);
+      }else{
+          this.$emit("sendVal", '');
+          this.$parent.location=''
+      }
+    //    console.log(this.$parent.location);
+     
+    },
+    getChangeValue(res){
+      console.log(res);
+        this.formData.lat=res.location.lat
+        this.formData.lng=res.location.lng
+         this.formData.address = res.location.address
+    }
+    
+
+  },
+  computed: {
+    DialogVisible: {
+      set(val) {
+        this.$emit("sendVal", val); // 表示将子组件改变的值传递给父组件
+      },
+      get() {
+          if(this.bmapModelData.longitude){
+            console.log(this.bmapModelData);
+              let record=this.bmapModelData
+              let formData={'lat':record.longitude,'lng':record.latitude,address:record.address,'location':{'lat':record.latitude,'lng':record.longitude,'address':record.address}}
+              this.formData=formData
+          }
+        return this.bmapModelVisible; // 表示获取父组件的值
+      }
+    }
+  }
+};
+</script>
+<style>
+/*去除百度地图版权*/
+.anchorBL{
+    display:none;
+} 
+.ele-form-btns{
+    margin-top:0px !important;
+}
+/*特殊处理 暂时去除地图顶部搜索框*/
+/* .el-autocomplete{
+  display: none;
+} */
+</style>

+ 0 - 132
src/views/device/storage_equipment/checkDetail.vue

@@ -1,132 +0,0 @@
-<template>
-    <el-dialog :modal="false" title="校验记录详情" :visible.sync="drowDetailVisible">
-        <el-row>
-          <div style="margin-bottom: 30px; margin-left: 50px ">
-            <el-col
-              :span="6"
-              style="margin-top: 10px; font-size: 14px; color: #a0a0a0"
-            >
-              <div class="detail-item">
-                <pre style="display: inline">扳手编号:</pre>
-                <span class="item">{{ record.wrenchNumber}}</span>
-              </div>
-              <div class="detail-item">
-                <pre style="display: inline">外观检查:</pre>
-                <span class="item">{{ record.inspectionVisual==1?'合格':'不合格' }}</span>
-              </div>
-             
-              <div class="detail-item">
-                <span>检测结果:</span>
-                <span class="item">{{ record.preload_three_results==1?'合格':'不合格' }}</span>
-              </div>
-            </el-col>
-            <el-col
-              :span="6"
-             style="margin-top: 10px; font-size: 14px; color: #a0a0a0"
-            >
-               <div class="detail-item">
-                <pre style="display: inline">校准人:</pre>
-                <span class="item">{{ record.CalibratorName }}</span>
-              </div>
-              <div class="detail-item">
-                <span>校验人:</span>
-                <span class="item">{{ record.CheckName}}</span>
-              </div>
-              <div class="detail-item">
-                <span>签发人: </span>
-                <span class="item">{{ record.IssueName }}</span>
-              </div>
-            </el-col>
-            <el-col
-              :span="6"
-              style="margin-top: 10px; font-size: 14px; color: #a0a0a0"
-            >
-              <div class="detail-item">
-                <pre style="display: inline">校准日期:</pre>
-                <span class="item">{{ record.CalibratorDate}}</span>
-              </div>
-              <div class="detail-item">
-                <pre style="display: inline">校验日期:</pre>
-                <span class="item">{{ record.CheckDate }}</span>
-              </div>
-              <div class="detail-item">
-                <span>签发日期:</span>
-                <span class="item">{{ record.IssueDate }}</span>
-              </div>
-              
-            </el-col>
-            <el-col :span="6"></el-col>
-          </div>
-        </el-row>
-
-        <el-table :data="gridData" style="width: 100%">
-            <el-table-column property="stress" label="压力" ></el-table-column>
-            <el-table-column property="torque" label="扭矩" ></el-table-column>
-        </el-table>
-        
-    </el-dialog>
-</template>
-<script>
-
-  export default {
-    props: ["checkDetailVisible", "record"],
-    data() {
-      return {
-        gridData:[],
-        form: {
-          name: '',
-          region: '',
-          date1: '',
-          date2: '',
-          delivery: false,
-          type: [],
-          resource: '',
-          desc: ''
-        },
-        formLabelWidth: '160px'
-      };
-    },
-    computed:{
-        drowDetailVisible:{
-            set(val) {
-                this.$emit("sendVal", val); // 表示将子组件改变的值传递给父组件
-            },
-            get() {
-               this.$http.get("wrenchCheckRecordData?id="+this.record.id).then((response) => {
-                  this.gridData = response.data;
-                });
-                return this.checkDetailVisible; // 表示获取父组件的值
-            }
-        }
-        
-    },
-
-
-  };
-</script>
-<style scoped>
-.table {
-  margin: 0 auto;
-}
-.detail-item {
-  width: 100%;
-  padding: 15px 0px;
-  list-style-type: none;
-}
-.item {
-  font-size: 14px;
-  color: black;
-  margin-top: 5px;
-}
-.el-table .warning-row {
-  background: oldlace !important;
-}
-
-.el-table .success-row {
-  background: #f0f9eb !important;
-}
-.pagination-container{
-  padding-left:25px;
-  padding-right:25px;
-}
-</style>

+ 51 - 218
src/views/device/storage_equipment/formModel.vue

@@ -1,4 +1,5 @@
 <template>
+<div>
   <ele-form-dialog
     v-bind="formConfig"
     v-model="formFieldsData"
@@ -11,41 +12,24 @@
     label-position="left"
     :dialogAttrs="{ 'close-on-click-modal': false,'top':'8vh'}"
      v-if="fresh"
-  />
+  >
+  </ele-form-dialog>
+  <bmapModel @sendVal="closeBmapDialog" :bmapModelVisible="bmapVisible" :bmapModelData="bmapModelData" />
+  </div>
 </template>
 
 <script>
-import { array } from 'jszip/lib/support';
+import bmapModel from './bmapModel.vue'
 export default {
   props: ["formModelVisible", "title"],
+  components:{
+    bmapModel
+  },
   data() {
-    // var validateMaxPressure = (rule, value, callback) => {
-    //     if ( (value !== '') && (this.formFieldsData.min_pressure !=='')) {
-    //         var min_pressure = this.formFieldsData.min_pressure - 0;
-    //         var max_pressure = value - 0;
-    //         if (min_pressure > max_pressure) {
-    //             callback(new Error('不能小于最小压力'))
-    //         } else {
-    //             callback()
-    //         }
-    //     } else {
-    //        callback()
-    //     }
-    // };
-    // var validateMinPressure = (rule, value, callback) => {
-    //     if ( (value !== '') && (this.formFieldsData.max_pressure !=='')) {
-    //         var max_pressure = this.formFieldsData.max_pressure - 0;
-    //         var min_pressure = value - 0;
-    //         if (min_pressure > max_pressure) {
-    //             callback(new Error('不能大于最大压力'))
-    //         } else {
-    //             callback()
-    //         }
-    //     } else {
-    //        callback()
-    //     }
-    // };
     return {
+      bmapVisible:false,
+      bmapModelData:{},
+      location:{},
       formData: {},
       fresh:true,
       deviceTypes:[],
@@ -65,6 +49,9 @@ export default {
         check_status:"",
         status:"",
         list:"",
+        address:'',
+        longitude:"",
+        latitude:''
       },
       url: "hydEquipment",
       formConfig: {
@@ -152,169 +139,31 @@ export default {
             options:[],
 
           },
-
-          department_id: {
-            layout: 12,
-            type: "cascader",
-            label: "所属部门",
-            isOptions: true,
-            options: [],
-            required: true,
-            attrs: {
-              props: {
-                label: "department_name",
-                value: "id",
-                emitPath: false,
-                checkStrictly: true
-              }
-            },
-            vif(data)
-            {
-              if(data.equipment_type&&data.equipment_type<5)
-              {
-                return true;
-              }
-              return false;
-            }
-          },
-          number:{
-            layout: 12,
-            type: "input",
-            label: "编号",
-            required:true,
-            vif(data)
-            {
-              if(data.equipment_type&&data.equipment_type<5)
-              {
-                return true;
-              }
-              return false;
-            }
-          },
-          imei: {
-            layout: 12,
-            type: "input",
-            label: "IMEI号",
-            required:true,
-             vif(data)
-            {
-              if(data.equipment_type&&data.equipment_type==2)
-              {
-                return true;
-              }
-              return false;
-            }
-
-          },
-          angle_sensor:{
-            type: 'switch',
-            label: "角度传感器",
-            vif(data)
-            {
-              if(data.equipment_type==3||data.equipment_type==4)
-              {
-                return true;
-              }
-              return false;
-            }
-          },
-          pressure:{
-            layout: 12,
-            type: "input",
-            label: "压力",
-            vif(data)
-            {
-              if(data.equipment_type==3||data.equipment_type==4)
-              {
-                return true;
-              }
-              return false;
-            }
-          },
-           torque:{
-            layout: 12,
-            type: "input",
-            label: "扭矩",
-            vif(data)
-            {
-              if(data.equipment_type==3||data.equipment_type==4)
-              {
-                return true;
-              }
-              return false;
-            }
-          },
-          max_pressure: {
-            layout: 12,
-            type: "input",
-            required: true,
-            label: "最大压力",
-            vif(data)
-            {
-              if(data.equipment_type&&data.equipment_type==2)
-              {
-                
-                return true;
-              }
-              return false;
-            }
-
-          },
-          min_pressure: {
-            layout: 12,
-            type: "input",
-            required: true,
-            label: "最小压力",
-            vif(data)
-            {
-              if(data.equipment_type&&data.equipment_type==2)
-              {
-                return true;
-              }
-              return false;
-            }
-          },
-          effective_period: {
+          address:{
              layout: 12,
-            type: "input",
-            required: true,
-            label: "有效周期",
-            vif(data)
-            {
-              if(data.equipment_type&&data.equipment_type==2)
-              {
-                return true;
-              }
-              return false;
-            }
+              type: "input",
+              label: "地址",
+              on:{
+                input: (val) => {
+                   this.openBmap();
+                }
+              },
+               vif(data)
+                {
+                  if(data.equipment_type&&data.equipment_type==6)
+                  {
+                    return true;
+                  }
+                  return false;
+                }
           },
-         
-          remark: {
-            type: "textarea",
-            label: "显示信息",
-            attrs: {
-              autosizeType: "switch",
-              autosize: false,
-              rows: 2
-            },
-            vif(data)
-            {
-              if(data.equipment_type&&data.equipment_type<5)
-              {
-                return true;
-              }
-              return false;
-            }
-          }
+
         },
-        order: ['equipment_type','equipment_model',"name","material_number",'issue_unit','fixed_asset_number','fixed_asset_number2',"serial_number",'factory_number','check_last_time','check_next_time','check_status','status',"number","department_id","pressure","pressure","torque",'angle_sensor',"imei","min_pressure","max_pressure", "effective_period","remark"]
+        order: ['equipment_type','equipment_model',"name","material_number",'issue_unit','fixed_asset_number','fixed_asset_number2',"serial_number",'factory_number','check_last_time','check_next_time','check_status','status','address']
       }
     };
   },
   created() {
-    this.$http.get("departments").then(response => {
-      this.formConfig.formDesc.department_id.options = response.data;
-    });
      this.$http.get("getHydEquipmentType",{ params: {code:'ToolStatus'} }).then(response => {
       this.formConfig.formDesc.status.options = response.data;
     });
@@ -331,36 +180,26 @@ export default {
      });
   },
   methods: {
-    //更新内容
-    update()
+   openBmap()
+   {
+    if(this.formFieldsData.longitude)
     {
-      // this.formFieldsData.equipment_type=this.formFieldsData.equipment_type;
-
-      if(this.formFieldsData.list)
+        this.bmapModelData={address:this.formFieldsData.address,longitude:this.formFieldsData.longitude,latitude:this.formFieldsData.latitude};
+    }
+     this.bmapVisible = true;
+   },
+  //关闭地图弹窗
+   closeBmapDialog()
+   {
+      if(this.location.lng)
       {
-        this.formFieldsData.number = this.formFieldsData.list.number;
-        this.formFieldsData.remark = this.formFieldsData.list.remark;
-        this.formFieldsData.department_id = this.formFieldsData.list.department_id;
-        if(this.formFieldsData.equipment_type==2)
-        {
-          //泵
-           this.formFieldsData.imei = this.formFieldsData.list.imei;
-           this.formFieldsData.max_pressure= this.formFieldsData.list.max_pressure;
-           this.formFieldsData.min_pressure= this.formFieldsData.list.min_pressure;
-           this.formFieldsData.effective_period = this.formFieldsData.list.effective_period
-        }
-        else
-        {
-          //扳手
-           this.formFieldsData.angle_sensor = this.formFieldsData.list.angle_sensor;
-           this.formFieldsData.pressure= this.formFieldsData.list.pressure;
-           this.formFieldsData.torque= this.formFieldsData.list.torque;
-          
-        }
-
+        this.formFieldsData.address=this.location.address;
+        this.formFieldsData.longitude = this.location.lng;
+        this.formFieldsData.latitude = this.location.lat;
       }
-
-    },
+      this.bmapVisible = false;
+   },
+    //更新内容
     handleFormSubmit(data) {
       this.$parent.handleSubmit();
     },
@@ -381,13 +220,7 @@ export default {
         this.$emit("sendVal", val); // 表示将子组件改变的值传递给父组件
       },
       get() {
-
-        if(this.formModelVisible)
-        {
-          this.update();
-  
-        }
-        return this.formModelVisible; // 表示获取父组件的值
+       return this.formModelVisible; // 表示获取父组件的值
       }
     }
   }

+ 0 - 179
src/views/device/storage_equipment/hydraulic_detail.vue

@@ -1,179 +0,0 @@
-<template>
-  <el-drawer
-    title="设备信息"
-    :visible.sync="drawerVisible"
-    :direction="direction"
-    size="45%"
-  >
-    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
-      <el-tab-pane label="设备信息" name="first">
-        <el-divider content-position="left">基础信息</el-divider>
-        <el-row>
-          <div style="margin-bottom: 30px; margin-left: 50px">
-            <el-col
-              :span="6"
-              style="margin-top: 10px; font-size: 14px; color: #a0a0a0"
-            >
-              <div class="detail-item">
-                <pre style="display: inline">设备分类:</pre>
-                <span class="item">{{ record.classification }}</span>
-              </div>
-              <div class="detail-item">
-                <pre style="display: inline">设备型号:</pre>
-                <span class="item">{{ record.equipment_model }}</span>
-              </div>
-              <div class="detail-item">
-                <span>名称:</span>
-                <span class="item">{{ record.name }}</span>
-              </div>
-              <div class="detail-item">
-                <span>序列号:</span>
-                <span class="item">{{ record.serial_number }}</span>
-              </div>
-               <div class="detail-item">
-                <span>检验状态:</span>
-                <span class="item">{{ record.check_status1}}</span>
-              </div>
-            </el-col>
-            <el-col
-              :span="6"
-              style="margin-top: 10px; font-size: 14px; color: #a0a0a0"
-            >
-              <div class="detail-item">
-                <pre style="display: inline">设备类别:</pre>
-                <span class="item">{{ record.equ_type_name }}</span>
-              </div>
-              <div class="detail-item">
-                <span>发放单位:</span>
-                <span class="item">{{ record.issue_unit}}</span>
-              </div>
-              <div class="detail-item">
-                <pre style="display: inline">固定资产编号:</pre>
-                <span class="item">{{ record.fixed_asset_number }}</span>
-              </div>
-              <div class="detail-item">
-                <span>上次校验时间:</span>
-                <span class="item">{{ record.check_last_time}}</span>
-              </div>
-                <div class="detail-item">
-                <span>设备状态:</span>
-                <span class="item">{{ record.status1}}</span>
-              </div>
-            </el-col>
-            <el-col
-              :span="6"
-              style="margin-top: 10px; font-size: 14px; color: #a0a0a0"
-            >
-              <div class="detail-item">
-                <pre style="display: inline">物料号:</pre>
-                <span class="item">{{ record.material_number}}</span>
-              </div>
-              <div class="detail-item">
-                <span>出厂编号:</span>
-                <span class="item">{{ record.factory_number}}</span>
-              </div>
-              <div class="detail-item">
-                <pre style="display: inline">类固资产编号:</pre>
-                <span class="item">{{ record.fixed_asset_number2 }}</span>
-              </div>
-               <div class="detail-item">
-                <span>下次校验时间:</span>
-                <span class="item">{{ record.check_next_time}}</span>
-              </div>
-
-            </el-col>
-            <el-col :span="6"></el-col>
-          </div>
-        </el-row>
-      </el-tab-pane>
-      <el-tab-pane label="健康状态" name="fourth">
-          <el-table
-            :data="data"
-            style="width: 100%;margin-left: 20px"
-          >
-          <el-table-column prop="longitude" label="经度" align="center"></el-table-column>
-          <el-table-column prop="latitude" label="纬度" align="center"></el-table-column>
-          <el-table-column prop="device_state" label="设备状态" align="center"></el-table-column>
-          <el-table-column prop="run_time" label="运行时长" align="center"></el-table-column>
-          <el-table-column prop="online_time" label="上报时间" align="center"></el-table-column>
-          <el-table-column prop="info" label="维护信息" align="center"></el-table-column>
-          
-        </el-table>
-        <el-pagination
-      background
-      class="pagination-container"
-      @size-change="handleSizeChange"
-      @current-change="handleCurrentChange"
-      :current-page="paginate.current"
-      :page-sizes="paginate.sizes"
-      :page-size="paginate.limit"
-      :layout="paginate.layout"
-      :total="paginate.total"
-    />
-      </el-tab-pane>
-      
-    </el-tabs>
-  </el-drawer>
-</template>
-<script>
-import rlListOperate from "@/layout/rl-list-operate/rlListOperate";
-export default {
-  props: ["detailVisible", "record"],
-  mixins: [rlListOperate],
-  data() {
-    return {
-      drawer: false,
-      direction: "rtl",
-      activeName: "first",
-      nowData: [],
-      url:'maintainLog',
-      queryParam: {
-        device_number: "",
-      }
-    };
-  },
-  methods: {
-    handleClick(){
-
-    }
-  },
-  computed: {
-    drawerVisible: {
-      set(val) {
-        this.$emit("sendVal", val); // 表示将子组件改变的值传递给父组件
-      },
-      get() {
-        if(this.detailVisible){
-          //获取维护记录
-          this.queryParam.device_number=this.record.number
-          this.getList()
-        }
-        return this.detailVisible; // 表示获取父组件的值
-      },
-    },
-  },
-};
-</script>
-<style scoped>
-.detail-item {
-  width: 100%;
-  padding: 15px 0px;
-  list-style-type: none;
-}
-.item {
-  font-size: 14px;
-  color: black;
-  margin-top: 5px;
-}
-.el-table .warning-row {
-  background: oldlace !important;
-}
-
-.el-table .success-row {
-  background: #f0f9eb !important;
-}
-.pagination-container{
-  padding-left:25px;
-  padding-right:25px;
-}
-</style>

+ 4 - 46
src/views/device/storage_equipment/index.vue

@@ -324,16 +324,6 @@
        :record="detail"
     />
    
-     <hydraulicDetail
-      :detailVisible="hydraulicDetailVisible"
-       @sendVal="closeDrawer"
-       :record="hydraulicDetail"
-    />
-     <wrenchDetail
-      :detailVisible="wrenchDetailVisible"
-       @sendVal="closeDrawer"
-       :record="wrenchDetail"
-    />
 
     <!-- 导入弹框 -->
     <el-dialog
@@ -343,14 +333,7 @@
       :visible.sync="uploadDialogVisible"
       custom-class="upload-dialog"
     >
-      <!-- <el-cascader
-        v-model="selectedDepartId"
-        class="filter-item form-search-input fl"
-        :options="departments"
-        :props="{ checkStrictly: true, label: 'department_name', value: 'id' }"
-        style="margin-bottom: 10px"
-        @change="changeCards"
-      ></el-cascader> -->
+
       <el-upload
         class="upload-demo"
         drag
@@ -395,8 +378,6 @@ import rlListOperate from "@/layout/rl-list-operate/rlListOperate";
 import { action } from "@/directive/permission/index.js";
 import { getToken } from "../../../utils/auth";
 import detail from "./detail.vue"
-import wrenchDetail from "./wrench_detail.vue"
-import hydraulicDetail from "./hydraulic_detail.vue"
 import formModel from './formModel.vue'
 import alarm from './alarm.vue'
 export default {
@@ -406,8 +387,6 @@ export default {
   components: {
     formModel,
     detail,
-    wrenchDetail,
-    hydraulicDetail,
     alarm
   },
   data() {
@@ -426,7 +405,7 @@ export default {
         0: "success",
         1: "danger",
       },
-      formName:'hydraulic',
+      formName:'sto_equ',
       formVisible:false,
       //搜索
       searchDisplay: true,
@@ -435,13 +414,6 @@ export default {
       //详情
       detailVisible:false,
       detail:{},
-      //泵详情
-      hydraulicDetailVisible:false,
-      hydraulicDetail:{},
-      //扳手详情
-      wrenchDetailVisible:false,
-      wrenchDetail:{},
-
       isShowColumn: false,
       // 列的配置化对象,存储配置信息
       checkList: {},
@@ -527,27 +499,13 @@ export default {
     },
 
     handleDetail(row){
-      if(row.equipment_type==2)
-      {
-        this.hydraulicDetailVisible=true;
-        this.hydraulicDetail=row;
-      }
-      if(row.equipment_type==3||row.equipment_type==4)
-      {
-        this.wrenchDetailVisible=true;
-        this.wrenchDetail=row;
-
-      }
-      else
-      {
+     
          this.detailVisible = true,
          this.detail = row
-      }
+      
     },
     closeDrawer(){
       this.detailVisible = false;
-      this.hydraulicDetailVisible=false;
-      this.wrenchDetailVisible=false;
     },
     changeUsedEvent(row,value){
 

+ 0 - 132
src/views/device/storage_equipment/wrenchCheckDetail.vue

@@ -1,132 +0,0 @@
-<template>
-    <el-dialog :modal="false" title="校验记录详情" :visible.sync="drowDetailVisible">
-        <el-row>
-          <div style="margin-bottom: 30px; margin-left: 50px ">
-            <el-col
-              :span="6"
-              style="margin-top: 10px; font-size: 14px; color: #a0a0a0"
-            >
-              <div class="detail-item">
-                <pre style="display: inline">扳手编号:</pre>
-                <span class="item">{{ record.wrenchNumber}}</span>
-              </div>
-              <div class="detail-item">
-                <pre style="display: inline">外观检查:</pre>
-                <span class="item">{{ record.inspectionVisual==1?'合格':'不合格' }}</span>
-              </div>
-             
-              <div class="detail-item">
-                <span>检测结果:</span>
-                <span class="item">{{ record.preload_three_results==1?'合格':'不合格' }}</span>
-              </div>
-            </el-col>
-            <el-col
-              :span="6"
-             style="margin-top: 10px; font-size: 14px; color: #a0a0a0"
-            >
-               <div class="detail-item">
-                <pre style="display: inline">校准人:</pre>
-                <span class="item">{{ record.CalibratorName }}</span>
-              </div>
-              <div class="detail-item">
-                <span>校验人:</span>
-                <span class="item">{{ record.CheckName}}</span>
-              </div>
-              <div class="detail-item">
-                <span>签发人: </span>
-                <span class="item">{{ record.IssueName }}</span>
-              </div>
-            </el-col>
-            <el-col
-              :span="6"
-              style="margin-top: 10px; font-size: 14px; color: #a0a0a0"
-            >
-              <div class="detail-item">
-                <pre style="display: inline">校准日期:</pre>
-                <span class="item">{{ record.CalibratorDate}}</span>
-              </div>
-              <div class="detail-item">
-                <pre style="display: inline">校验日期:</pre>
-                <span class="item">{{ record.CheckDate }}</span>
-              </div>
-              <div class="detail-item">
-                <span>签发日期:</span>
-                <span class="item">{{ record.IssueDate }}</span>
-              </div>
-              
-            </el-col>
-            <el-col :span="6"></el-col>
-          </div>
-        </el-row>
-
-        <el-table :data="gridData" style="width: 100%">
-            <el-table-column property="stress" label="压力" ></el-table-column>
-            <el-table-column property="torque" label="扭矩" ></el-table-column>
-        </el-table>
-        
-    </el-dialog>
-</template>
-<script>
-
-  export default {
-    props: ["checkDetailVisible", "record"],
-    data() {
-      return {
-        gridData:[],
-        form: {
-          name: '',
-          region: '',
-          date1: '',
-          date2: '',
-          delivery: false,
-          type: [],
-          resource: '',
-          desc: ''
-        },
-        formLabelWidth: '160px'
-      };
-    },
-    computed:{
-        drowDetailVisible:{
-            set(val) {
-                this.$emit("sendVal", val); // 表示将子组件改变的值传递给父组件
-            },
-            get() {
-               this.$http.get("wrenchCheckRecordData?id="+this.record.id).then((response) => {
-                  this.gridData = response.data;
-                });
-                return this.checkDetailVisible; // 表示获取父组件的值
-            }
-        }
-        
-    },
-
-
-  };
-</script>
-<style scoped>
-.table {
-  margin: 0 auto;
-}
-.detail-item {
-  width: 100%;
-  padding: 15px 0px;
-  list-style-type: none;
-}
-.item {
-  font-size: 14px;
-  color: black;
-  margin-top: 5px;
-}
-.el-table .warning-row {
-  background: oldlace !important;
-}
-
-.el-table .success-row {
-  background: #f0f9eb !important;
-}
-.pagination-container{
-  padding-left:25px;
-  padding-right:25px;
-}
-</style>

+ 0 - 227
src/views/device/storage_equipment/wrench_detail.vue

@@ -1,227 +0,0 @@
-<template>
-  <el-drawer
-    title="设备信息"
-    :visible.sync="drawerVisible"
-    :direction="direction"
-    size="60%"
-  >
-    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
-     <el-tab-pane label="设备信息" name="first">
-        <el-divider content-position="left">基础信息</el-divider>
-        <el-row>
-          <div style="margin-bottom: 30px; margin-left: 50px">
-            <el-col
-              :span="6"
-              style="margin-top: 10px; font-size: 14px; color: #a0a0a0"
-            >
-              <div class="detail-item">
-                <pre style="display: inline">设备分类:</pre>
-                <span class="item">{{ record.classification }}</span>
-              </div>
-              <div class="detail-item">
-                <pre style="display: inline">设备型号:</pre>
-                <span class="item">{{ record.equipment_model }}</span>
-              </div>
-              <div class="detail-item">
-                <span>名称:</span>
-                <span class="item">{{ record.name }}</span>
-              </div>
-              <div class="detail-item">
-                <span>序列号:</span>
-                <span class="item">{{ record.serial_number }}</span>
-              </div>
-               <div class="detail-item">
-                <span>检验状态:</span>
-                <span class="item">{{ record.check_status1}}</span>
-              </div>
-            </el-col>
-            <el-col
-              :span="6"
-              style="margin-top: 10px; font-size: 14px; color: #a0a0a0"
-            >
-              <div class="detail-item">
-                <pre style="display: inline">设备类别:</pre>
-                <span class="item">{{ record.equ_type_name }}</span>
-              </div>
-              <div class="detail-item">
-                <span>发放单位:</span>
-                <span class="item">{{ record.issue_unit}}</span>
-              </div>
-              <div class="detail-item">
-                <pre style="display: inline">固定资产编号:</pre>
-                <span class="item">{{ record.fixed_asset_number }}</span>
-              </div>
-              <div class="detail-item">
-                <span>上次校验时间:</span>
-                <span class="item">{{ record.check_last_time}}</span>
-              </div>
-                <div class="detail-item">
-                <span>设备状态:</span>
-                <span class="item">{{ record.status1}}</span>
-              </div>
-            </el-col>
-            <el-col
-              :span="6"
-              style="margin-top: 10px; font-size: 14px; color: #a0a0a0"
-            >
-              <div class="detail-item">
-                <pre style="display: inline">物料号:</pre>
-                <span class="item">{{ record.material_number}}</span>
-              </div>
-              <div class="detail-item">
-                <span>出厂编号:</span>
-                <span class="item">{{ record.factory_number}}</span>
-              </div>
-              <div class="detail-item">
-                <pre style="display: inline">类固资产编号:</pre>
-                <span class="item">{{ record.fixed_asset_number2 }}</span>
-              </div>
-               <div class="detail-item">
-                <span>下次校验时间:</span>
-                <span class="item">{{ record.check_next_time}}</span>
-              </div>
-
-            </el-col>
-            <el-col :span="6"></el-col>
-          </div>
-        </el-row>
-      </el-tab-pane>
-      <el-tab-pane label="校验记录" name="fourth">
-        <el-table :data="data" style="width: 100%; margin-left: 20px">
-          <el-table-column prop="CalibratorName" label="校准人名称" align="center"></el-table-column>
-          <el-table-column prop="CheckName" label="校验人名称" align="center"></el-table-column>
-          <el-table-column prop="IssueName" label="签发人名称" align="center"></el-table-column>
-          <el-table-column  label="检测是否合格" align="center">
-           <template slot-scope="scope">
-              <p  v-if="scope.row.preload_three_results==1">合格</p>
-              <p  v-else style="color:red">不合格</p>
-            </template>
-          </el-table-column>
-          <el-table-column label="外观是否合格" align="center">
-            <template slot-scope="scope">
-                <p  v-if="scope.row.inspectionVisual==1">合格</p>
-                <p  v-else style="color:red">不合格</p>
-              </template>
-          </el-table-column>
-          <el-table-column prop="CheckDate" label="检验时间" align="center" min-width="160"></el-table-column>
-          <el-table-column
-        label="操作"
-        width="180"
-        align="center"
-        fixed="right"
-      >
-        <template slot-scope="record">
-          <el-tooltip
-            content="查看"
-            placement="top"
-            :enterable="false"
-          >
-            <el-button
-              type="primary"
-              size="mini"
-              icon="el-icon-view"
-              @click="handleDetail(record.row)"
-            ></el-button>
-          </el-tooltip>
-       
-        </template>
-      </el-table-column>
-        </el-table>
-        <el-pagination
-      background
-      class="pagination-container"
-      @size-change="handleSizeChange"
-      @current-change="handleCurrentChange"
-      :current-page="paginate.current"
-      :page-sizes="paginate.sizes"
-      :page-size="paginate.limit"
-      :layout="paginate.layout"
-      :total="paginate.total"
-    />
-      </el-tab-pane>
-     
-    </el-tabs>
-    <checkdetail :checkDetailVisible="checkDetailVisible" :record="detail"  @sendVal="closeDrawer"></checkdetail>
-  </el-drawer>
-
-</template>
-<script>
-import rlListOperate from "@/layout/rl-list-operate/rlListOperate";
-import checkdetail from './checkDetail.vue';
-export default {
-  components: { checkdetail },
-  props: ["detailVisible", "record"],
-   mixins: [rlListOperate],
-  data() {
-    return {
-      url:'wrenchCheckRecord',
-      drawer: false,
-      data:[],
-      direction: "rtl",
-      activeName: "first",
-      detail:'',
-      checkDetailVisible:false
-    };
-  },
-  methods: {
-
-    handleClick(tab, event) {
-      // console.log(tab, event);
-    },
-    closeDrawer(){
-      this.checkDetailVisible = false
-    },
-    handleDetail(row){
-
-      this.detail = row;
-      this.checkDetailVisible=true;
-    },
-    tableRowClassName({ row, rowIndex }) {
-      if (rowIndex === 1) {
-        return "warning-row";
-      } else if (rowIndex === 3) {
-        return "success-row";
-      }
-      return "";
-    },
-  },
-  computed: {
-    drawerVisible: {
-      set(val) {
-        this.$emit("sendVal", val); // 表示将子组件改变的值传递给父组件
-      },
-      get() {
-        if(this.detailVisible){
-          //获取维护记录
-          this.queryParam.wrench_id=this.record.list.id;
-          this.getList()
-        }
-        return this.detailVisible; // 表示获取父组件的值
-      },
-    },
-  },
-};
-</script>
-<style scoped>
-.detail-item {
-  width: 100%;
-  padding: 15px 0px;
-  list-style-type: none;
-}
-.item {
-  font-size: 14px;
-  color: black;
-  margin-top: 5px;
-}
-.el-table .warning-row {
-  background: oldlace !important;
-}
-
-.el-table .success-row {
-  background: #f0f9eb !important;
-}
-.pagination-container{
-  padding-left:25px;
-  padding-right:25px;
-}
-</style>