zcy 4 роки тому
батько
коміт
d1c79c937f

+ 8 - 1
src/components/dict/JDictSelectTag.vue

@@ -98,13 +98,20 @@ export default {
     },
     handleInput(e = '') {
       let val
+      let unit
       if (Object.keys(e).includes('target')) {
         val = e.target.value
       } else {
         val = e
       }
-      console.log(val)
+      for (const item of this.dictOptions) {
+        if (item.dictValue === val) {
+          unit = item.remark
+        }
+      }
+      console.log(val, unit)
       this.$emit('change', val)
+      this.$emit('toolChange', unit)
     },
     setCurrentDictOptions(dictOptions) {
       this.dictOptions = dictOptions

+ 1 - 1
src/layout/components/Navbar.vue

@@ -25,7 +25,7 @@
 
       <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
         <div class="avatar-wrapper" style="margin-top:0">
-          <span>{{user.nickName}}</span>
+          <span>{{user.realName}}</span>
           <i class="el-icon-caret-bottom" />
         </div>
         <el-dropdown-menu slot="dropdown">

+ 1 - 1
src/views/basics/line/index.vue

@@ -145,7 +145,7 @@ export default {
       columns: columns(this),
       url: {
         list: '/business/catenary/bus/line/list',
-        delete: '/business/catenary/bus/line/',
+        delete: '/business/catenary/bus/line/{lineIds}?lineIds=',
         exportXlsUrl: '/exportXlsUrl',
         importExcelUrl: `${process.env.VUE_APP_BASE_API}/importExcelUrl`,
         tree: '/system/dept/treeSelect'

+ 45 - 58
src/views/security/stand/CheckAndEditModel.vue

@@ -8,10 +8,7 @@
     @close="close"
   >
     <a-form-model ref="form" :label-col="labelCol" :wrapper-col="wrapperCol" :rules="validatorRules" :model="model">
-      <a-form-model-item label="支柱号" prop="pillarCode">
-        <a-input v-model="model.pillarCode" />
-      </a-form-model-item>
-      <a-form-model-item label="所属部门" prop="deptId">
+      <a-form-model-item label="车间" prop="deptId">
         <a-tree-select
           v-model="model.deptId"
           :show-search="true"
@@ -23,65 +20,52 @@
           :replace-fields="{children:'children', title:'label', key:'id', value: 'id' }"
         />
       </a-form-model-item>
-      <a-form-model-item label="线别" prop="lineId">
-        <j-list-select-tag
-          v-model="model.lineId"
-          dict-code="line"
-        />
-      </a-form-model-item>
-      <a-form-model-item label="站场区间" prop="stationId">
-        <j-list-select-tag
-          v-model="model.stationId"
-          dict-code="station"
+      <a-form-model-item label="存放处" prop="storePlace">
+        <a-input
+          v-model="model.storePlace"
         />
       </a-form-model-item>
-      <a-form-model-item label="行别" prop="xingbie">
+      <a-form-model-item label="工具名称" prop="toolType">
         <j-dict-select-tag
-          v-model="model.xingbie"
-          type="radioButton"
-          dict-code="xingbie"
+          v-model="model.toolType"
+          dict-code="tool_type"
+          @toolChange="toolChange"
         />
       </a-form-model-item>
-      <a-form-model-item label="公里标" prop="marker">
-        <a-input v-model="model.marker" />
+      <a-form-model-item label="编号" prop="toolCode">
+        <a-input v-model="model.toolCode" />
       </a-form-model-item>
-      <a-form-model-item label="支柱类型" prop="zzlx">
-        <j-dict-select-tag
-          v-model="model.zzlx"
-          dict-code="zzlx"
-        />
+      <a-form-model-item label="电压等级" prop="elecLevel">
+        <a-input v-model="model.elecLevel" />
       </a-form-model-item>
-      <a-form-model-item label="支柱型号" prop="zzxh">
-        <j-dict-select-tag
-          v-model="model.zzxh"
-          dict-code="zzxh"
-        />
+      <a-form-model-item label="计量单位" prop="unit">
+        <a-input v-model="model.unit" :disabled="true"  />
       </a-form-model-item>
-      <a-form-model-item label="支柱用途" prop="zzyt">
-        <j-dict-select-tag
-          v-model="model.zzyt"
-          dict-code="zzyt"
-        />
+      <a-form-model-item label="实验周期" prop="testCycle">
+        <j-dict-select-tag v-model="model.testCycle" type="radioButton" dict-code="test_cycle" />
       </a-form-model-item>
-      <a-form-model-item label="材质" prop="cz">
-        <j-dict-select-tag
-          v-model="model.cz"
-          dict-code="zzcz"
-        />
+      <a-form-model-item label="生产厂家" prop="produceFactory">
+        <a-input v-model="model.produceFactory" />
       </a-form-model-item>
-      <a-form-model-item label="直线/曲外/曲内" prop="zxqwqn">
-        <j-dict-select-tag
-          v-model="model.zxqwqn"
-          type="radioButton"
-          dict-code="word_type"
+      <a-form-model-item label="生产日期" prop="produceDate">
+        <a-date-picker
+          v-model="model.produceDate"
+          style="width: 100%"
+          format="YYYY-MM-DD"
+          value-format="YYYY-MM-DD"
+          placeholder="请选择"
         />
       </a-form-model-item>
+      <a-form-model-item label="备注" prop="remark">
+        <a-textarea v-model="model.remark" :max-length="300" :rows="4" />
+      </a-form-model-item>
     </a-form-model>
   </j-modal>
 </template>
 <script>
 import { httpAction, getAction } from '@/api/request'
 import JModal from '@/components/JModal'
+
 export default {
   name: 'CheckAndEditModel',
   components: {
@@ -98,22 +82,21 @@ export default {
       isCheck: false,
       model: {},
       validatorRules: {
-        pillarCode: [{ required: true, message: '请输入' }],
-        stationId: [{ required: true, message: '请选择' }],
-        lineId: [{ required: true, message: '请选择' }],
         deptId: [{ required: true, message: '请选择' }],
-        xingbie: [{ required: true, message: '请选择' }],
-        marker: [{ required: true, message: '请输入' }],
-        zzlx: [{ required: true, message: '请选择' }],
-        zzxh: [{ required: true, message: '请选择' }],
-        cz: [{ required: true, message: '请选择' }],
-        zzyt: [{ required: true, message: '请选择' }],
-        zxqwqn: [{ required: true, message: '请选择' }]
+        storePlace: [{ required: true, message: '请输入' }],
+        toolType: [{ required: true, message: '请选择' }],
+        toolCode: [{ required: true, message: '请输入' }],
+        elecLevel: [{ required: true, message: '请输入' }],
+        unit: [{ required: true, message: '请输入' }],
+        testCycle: [{ required: true, message: '请选择' }],
+        produceFactory: [{ required: true, message: '请输入' }],
+        produceDate: [{ required: true, message: '请输入' }],
+        remark: [{ required: true, message: '请输入' }]
 
       },
       url: {
-        add: '/business/catenary/bus/zzdzxx/add',
-        edit: '/business/catenary/bus/zzdzxx/update',
+        add: '/business/safetool/base/safety/tool/add',
+        edit: '/business/safetool/base/safety/tool/update',
         tree: '/system/dept/treeSelect'
       }
     }
@@ -130,6 +113,10 @@ export default {
         }
       })
     },
+    toolChange(data) {
+      debugger
+      this.model.unit = data
+    },
     add() {
       this.model = {}
       this.visible = true
@@ -156,7 +143,7 @@ export default {
     },
     saveData() {
       let url, type
-      if (!this.model.id) {
+      if (!this.model.toolId) {
         url = this.url.add
         type = 'post'
       } else {

+ 36 - 34
src/views/security/stand/index.vue

@@ -4,19 +4,11 @@
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-form-item>
-          <j-list-select-tag
-            v-model="queryParam.lineId"
-            style="width: 150px"
-            placeholder="选择线别"
-            dict-code="line"
-          />
-        </a-form-item>
-        <a-form-item>
-          <j-list-select-tag
-            v-model="queryParam.stationId"
+          <j-dict-select-tag
+            v-model="queryParam.toolType"
             style="width: 150px"
-            placeholder="选择区间站场"
-            dict-code="station"
+            placeholder="选择工具名称"
+            dict-code="tool_type"
           />
         </a-form-item>
         <a-form-item>
@@ -32,25 +24,30 @@
           />
         </a-form-item>
         <a-form-item>
-          <j-dict-select-tag
-            v-model="queryParam.xingbie"
+          <a-input
+            v-model="queryParam.storePlace"
             style="width: 150px"
-            placeholder="选择行别"
-            dict-code="xingbie"
+            placeholder="选择存放处"
           />
         </a-form-item>
         <a-form-item>
-          <a-input
-            v-model="queryParam.pillarCode"
-            style="width: 150px"
-            placeholder="输入支柱号"
-          />
+          <a-select v-model="queryParam.testResult" placeholder="选择实验结果" style="width:150px">
+            <a-select-option value="">
+              请选择
+            </a-select-option>
+            <a-select-option value="0">
+              不合格
+            </a-select-option>
+            <a-select-option value="1">
+              合格
+            </a-select-option>
+          </a-select>
         </a-form-item>
         <a-form-item>
           <a-input
-            v-model="queryParam.marker"
+            v-model="queryParam.toolCode"
             style="width: 150px"
-            placeholder="输入公里标"
+            placeholder="输入编号"
           />
         </a-form-item>
         <a-form-item>
@@ -62,17 +59,21 @@
     <!-- 操作按钮区域 -->
     <div class="table-operator" style="margin: 15px 0">
       <a-button type="primary" icon="plus" @click="handleAdd">新增</a-button>
-<!--      <a-button ghost type="danger" icon="download" @click="handleExportXls('角色信息')">导出</a-button>-->
-<!--      <a-upload name="file" :show-upload-list="false" :multiple="false" :headers="tokenHeader" :action="url.importExcelUrl" @change="handleImportExcel">-->
-<!--        <a-button ghost type="danger" icon="import">导入</a-button>-->
-<!--      </a-upload>-->
+      <!--      <a-button ghost type="danger" icon="download" @click="handleExportXls('角色信息')">导出</a-button>-->
+      <!--      <a-upload name="file" :show-upload-list="false" :multiple="false" :headers="tokenHeader" :action="url.importExcelUrl" @change="handleImportExcel">-->
+      <!--        <a-button ghost type="danger" icon="import">导入</a-button>-->
+      <!--      </a-upload>-->
 
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
-          <a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item>
+          <a-menu-item key="1" @click="batchDel">
+            <a-icon type="delete" />
+            删除
+          </a-menu-item>
         </a-menu>
         <a-button style="margin-left: 8px">
-          批量操作 <a-icon type="down" />
+          批量操作
+          <a-icon type="down" />
         </a-button>
       </a-dropdown>
     </div>
@@ -80,7 +81,8 @@
     <!-- table区域-begin -->
     <div>
       <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <i class="anticon anticon-info-circle ant-alert-icon" /> 已选择&nbsp;<a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项&nbsp;&nbsp;
+        <i class="anticon anticon-info-circle ant-alert-icon" /> 已选择&nbsp;<a style="font-weight: 600">{{
+          selectedRowKeys.length }}</a>项&nbsp;&nbsp;
         <a style="margin-left: 24px" @click="onClearSelected">清空</a>
       </div>
 
@@ -88,7 +90,7 @@
         ref="table"
         size="middle"
         bordered
-        row-key="id"
+        row-key="toolId"
         :columns="columns"
         :data-source="dataSource"
         :pagination="ipagination"
@@ -102,7 +104,7 @@
             编辑
           </a-button>
           <a-divider type="vertical" />
-          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.toolId)">
             <a-button size="small" type="danger">
               删除
             </a-button>
@@ -134,8 +136,8 @@ export default {
       columns: columns(this),
       treeData: [],
       url: {
-        list: '/business/catenary/bus/zzdzxx/list',
-        delete: '/business/catenary/bus/zzdzxx/',
+        list: '/business/safetool/base/safety/tool/list',
+        delete: '/business/safetool/base/safety/tool/{toolIds}?toolIds=',
         exportXlsUrl: '/exportXlsUrl',
         tree: '/system/dept/treeSelect',
         importExcelUrl: `${process.env.VUE_APP_BASE_API}/importExcelUrl`

+ 21 - 33
src/views/security/stand/indexColumns.js

@@ -10,58 +10,46 @@ function columns(vm) {
       }
     },
     {
-      title: '线别',
+      title: 'UID',
       align: 'center',
-      dataIndex: 'lineName',
-      key: 'lineName'
+      dataIndex: 'toolId',
+      key: 'toolId'
     },
     {
-      title: '区间/站场',
+      title: '编号',
       align: 'center',
-      dataIndex: 'stationName',
-      key: 'stationName'
+      dataIndex: 'toolCode',
+      key: 'toolCode'
     },
     {
-      title: '车间',
-      align: 'center',
-      dataIndex: 'deptName',
-      key: 'deptName'
-    },
-    {
-      title: '行别',
+      title: '工具名称',
       align: 'center',
-      dataIndex: 'xingbieText',
-      key: 'xingbieText'
+      dataIndex: 'toolName',
+      key: 'toolName'
     },
     {
-      title: '支柱号',
-      align: 'center',
-      dataIndex: 'pillarCode',
-      key: 'pillarCode'
-    },
-    {
-      title: '公里标',
+      title: '车间',
       align: 'center',
-      dataIndex: 'marker',
-      key: 'marker'
+      dataIndex: 'deptName',
+      key: 'deptName'
     },
     {
-      title: '规格型号',
+      title: '存放处所',
       align: 'center',
-      dataIndex: 'zzxh',
-      key: 'zzxh'
+      dataIndex: 'storePlace',
+      key: 'storePlace'
     },
     {
-      title: '支柱类型',
+      title: '上次检验日期',
       align: 'center',
-      dataIndex: 'zzlx',
-      key: 'zzlx'
+      dataIndex: 'lastTestDate',
+      key: 'lastTestDate'
     },
     {
-      title: '安装时间',
+      title: '试验结果',
       align: 'center',
-      dataIndex: 'ccrq',
-      key: 'ccrq'
+      dataIndex: 'testResult',
+      key: 'testResult'
     },
     {
       title: '操作',