zcy vor 3 Jahren
Ursprung
Commit
7f9daf774b

+ 1 - 1
src/utils/request.js

@@ -7,7 +7,7 @@ import { getToken } from '@/utils/auth'
 const service = axios.create({
   baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
   // withCredentials: true, // send cookies when cross-domain requests
-  timeout: 5000 // request timeout
+  timeout: 60000 // request timeout
 })
 
 // request interceptor

+ 36 - 38
src/views/security/checkList/view/dy/index.vue

@@ -3,17 +3,6 @@
     <!-- 查询区域 -->
     <div class="table-page-search-wrapper">
       <!-- 操作按钮区域 -->
-      <div class="table-operator" style="margin: 5px 0;float: right">
-        <a-button ghost type="danger" icon="download" @click="handleExportXls()">导出</a-button>
-        <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>
-          <a-button style="margin-left: 8px">
-            批量操作 <a-icon type="down" />
-          </a-button>
-        </a-dropdown>
-      </div>
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-form-item>
           <a-tree-select
@@ -28,25 +17,31 @@
           />
         </a-form-item>
         <a-form-item>
-          <j-list-select-tag
-            v-model="queryParam.stationId"
-            style="width: 150px"
-            placeholder="选择站场区间"
-            dict-code="station"
-          />
+          <a-select
+            v-model="queryParam.labId"
+            placeholder="选择实验室"
+            style="width:150px"
+          >
+            <a-select-option value="">
+              请选择
+            </a-select-option>
+            <a-select-option
+              v-for="(item,index) in dictOptions"
+              :key="index"
+              :value="item.deptId"
+            >
+              <span style="display: inline-block;width: 100%" :title=" item.deptName ">
+                {{ item.deptName }}
+              </span>
+            </a-select-option>
+          </a-select>
         </a-form-item>
         <a-form-item>
-          <a-input
-            v-model="queryParam.pillarCode"
-            style="width: 150px"
-            placeholder="输入支柱号"
-          />
-        </a-form-item>
-        <a-form-item>
-          <a-input
-            v-model="queryParam.checkUser"
-            style="width: 150px"
-            placeholder="输入检查人"
+          <a-date-picker
+            v-model="queryParam.endTime"
+            format="YYYY-MM-DD"
+            value-format="YYYY-MM-DD"
+            placeholder="选择实验截止日期"
           />
         </a-form-item>
         <a-form-item>
@@ -57,10 +52,6 @@
     </div>
     <!-- table区域-begin -->
     <div>
-      <div class="ant-alert ant-alert-info" style="margin: 16px 0;">
-        <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>
       <a-table
         ref="table"
         size="middle"
@@ -70,7 +61,6 @@
         :data-source="dataSource"
         :pagination="ipagination"
         :loading="loading"
-        :row-selection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
         @change="handleTableChange"
       />
     </div>
@@ -84,25 +74,26 @@ import columns from './indexColumns'
 import { getAction } from '@/api/request'
 
 export default {
-  components: {
-  },
+  components: {},
   mixins: [listMixin],
   data() {
     return {
       // 查询条件
-      queryParam: {},
+      queryParam: { state: 0 },
       treeData: [],
+      dictOptions: [],
       // 表头
       columns: columns(this),
       url: {
-        list: '/business/catenary/bus/jcb/blq/list',
+        list: '/business/safetool/sec/experiment/list',
         tree: '/system/dept/treeSelect',
-        exportXlsUrl: '/business/catenary/bus/jcb/blq/export'
+        sysListL: '/system/dept/listLab'
       }
     }
   },
   created() {
     this.loadTree()
+    this.getSysList()
   },
   methods: {
     loadTree() {
@@ -112,6 +103,13 @@ export default {
           this.treeData = res.data
         }
       })
+    },
+    getSysList() {
+      getAction(this.url.sysListL).then((res) => {
+        if (res.code === 200) {
+          this.dictOptions = res.data
+        }
+      })
     }
   }
 }

+ 12 - 10
src/views/security/checkList/view/dy/indexColumns.js

@@ -16,28 +16,30 @@ function columns(vm) {
       key: 'deptName'
     },
     {
-      title: '站场/区间',
+      title: '实验室',
       align: 'center',
-      dataIndex: 'stationName',
-      key: 'stationName'
+      dataIndex: 'labName',
+      key: 'labName'
     },
     {
-      title: '支柱号',
+      title: '实验截止日期',
       align: 'center',
-      dataIndex: 'pillarCode',
-      key: 'pillarCode'
+      dataIndex: 'endTime',
+      key: 'endTime'
     },
     {
-      title: '检查人',
+      title: '工具数量',
       align: 'center',
       dataIndex: 'checkUser',
       key: 'checkUser'
     },
     {
-      title: '检查日期',
+      title: '操作',
+      dataIndex: 'action',
+      width: 250,
       align: 'center',
-      dataIndex: 'checkDate',
-      key: 'checkDate'
+      slots: { title: 'actionName' },
+      scopedSlots: { customRender: 'action' }
     }
   ]
   return cols

+ 36 - 38
src/views/security/checkList/view/yy/index.vue

@@ -3,17 +3,6 @@
     <!-- 查询区域 -->
     <div class="table-page-search-wrapper">
       <!-- 操作按钮区域 -->
-      <div class="table-operator" style="margin: 5px 0;float: right">
-        <a-button ghost type="danger" icon="download" @click="handleExportXls()">导出</a-button>
-        <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>
-          <a-button style="margin-left: 8px">
-            批量操作 <a-icon type="down" />
-          </a-button>
-        </a-dropdown>
-      </div>
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-form-item>
           <a-tree-select
@@ -28,25 +17,31 @@
           />
         </a-form-item>
         <a-form-item>
-          <j-list-select-tag
-            v-model="queryParam.stationId"
-            style="width: 150px"
-            placeholder="选择站场区间"
-            dict-code="station"
-          />
+          <a-select
+            v-model="queryParam.labId"
+            placeholder="选择实验室"
+            style="width:150px"
+          >
+            <a-select-option value="">
+              请选择
+            </a-select-option>
+            <a-select-option
+              v-for="(item,index) in dictOptions"
+              :key="index"
+              :value="item.deptId"
+            >
+              <span style="display: inline-block;width: 100%" :title=" item.deptName ">
+                {{ item.deptName }}
+              </span>
+            </a-select-option>
+          </a-select>
         </a-form-item>
         <a-form-item>
-          <a-input
-            v-model="queryParam.pillarCode"
-            style="width: 150px"
-            placeholder="输入支柱号"
-          />
-        </a-form-item>
-        <a-form-item>
-          <a-input
-            v-model="queryParam.checkUser"
-            style="width: 150px"
-            placeholder="输入检查人"
+          <a-date-picker
+            v-model="queryParam.endTime"
+            format="YYYY-MM-DD"
+            value-format="YYYY-MM-DD"
+            placeholder="选择实验截止日期"
           />
         </a-form-item>
         <a-form-item>
@@ -57,10 +52,6 @@
     </div>
     <!-- table区域-begin -->
     <div>
-      <div class="ant-alert ant-alert-info" style="margin: 16px 0;">
-        <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>
       <a-table
         ref="table"
         size="middle"
@@ -70,7 +61,6 @@
         :data-source="dataSource"
         :pagination="ipagination"
         :loading="loading"
-        :row-selection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
         @change="handleTableChange"
       />
     </div>
@@ -84,25 +74,26 @@ import columns from './indexColumns'
 import { getAction } from '@/api/request'
 
 export default {
-  components: {
-  },
+  components: {},
   mixins: [listMixin],
   data() {
     return {
       // 查询条件
-      queryParam: {},
+      queryParam: { state: 1 },
       treeData: [],
+      dictOptions: [],
       // 表头
       columns: columns(this),
       url: {
-        list: '/business/catenary/bus/jcb/fdfxjyq/list',
+        list: '/business/safetool/sec/experiment/list',
         tree: '/system/dept/treeSelect',
-        exportXlsUrl: '/business/catenary/bus/jcb/fdfxjyq/export'
+        sysListL: '/system/dept/listLab'
       }
     }
   },
   created() {
     this.loadTree()
+    this.getSysList()
   },
   methods: {
     loadTree() {
@@ -112,6 +103,13 @@ export default {
           this.treeData = res.data
         }
       })
+    },
+    getSysList() {
+      getAction(this.url.sysListL).then((res) => {
+        if (res.code === 200) {
+          this.dictOptions = res.data
+        }
+      })
     }
   }
 }

+ 12 - 10
src/views/security/checkList/view/yy/indexColumns.js

@@ -16,28 +16,30 @@ function columns(vm) {
       key: 'deptName'
     },
     {
-      title: '站场/区间',
+      title: '实验室',
       align: 'center',
-      dataIndex: 'stationName',
-      key: 'stationName'
+      dataIndex: 'labName',
+      key: 'labName'
     },
     {
-      title: '支柱号',
+      title: '实验截止日期',
       align: 'center',
-      dataIndex: 'pillarCode',
-      key: 'pillarCode'
+      dataIndex: 'endTime',
+      key: 'endTime'
     },
     {
-      title: '检查人',
+      title: '工具数量',
       align: 'center',
       dataIndex: 'checkUser',
       key: 'checkUser'
     },
     {
-      title: '检查日期',
+      title: '操作',
+      dataIndex: 'action',
+      width: 250,
       align: 'center',
-      dataIndex: 'checkDate',
-      key: 'checkDate'
+      slots: { title: 'actionName' },
+      scopedSlots: { customRender: 'action' }
     }
   ]
   return cols

+ 146 - 0
src/views/security/stand/bfList.vue

@@ -0,0 +1,146 @@
+<template>
+  <j-modal
+    :title="title"
+    width="70%"
+    :visible="visible"
+    :mask-closable="false"
+    cancel-text="关闭"
+    @close="close"
+  >
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-form-item>
+          <j-dict-select-tag
+            v-model="queryParam.toolType"
+            style="width: 150px"
+            placeholder="选择工具名称"
+            dict-code="tool_type"
+          />
+        </a-form-item>
+        <a-form-item>
+          <a-tree-select
+            v-model="queryParam.deptId"
+            style="width: 150px"
+            :show-search="true"
+            allow-clear
+            placeholder="选择车间"
+            :tree-data="treeData"
+            tree-node-filter-prop="label"
+            :replace-fields="{children:'children', title:'label', key:'id', value: 'id' }"
+          />
+        </a-form-item>
+        <a-form-item>
+          <a-input
+            v-model="queryParam.storePlace"
+            style="width: 150px"
+            placeholder="选择存放处"
+          />
+        </a-form-item>
+        <a-form-item />
+        <a-form-item>
+          <a-input
+            v-model="queryParam.toolCode"
+            style="width: 150px"
+            placeholder="输入编号"
+          />
+        </a-form-item>
+        <a-form-item>
+          <a-button type="primary" @click="searchQuery">查询</a-button>
+          <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
+        </a-form-item>
+      </a-form>
+    </div>
+    <!-- 操作按钮区域 -->
+    <div class="table-operator" style="margin: 15px 0">
+      <a-button ghost type="danger" @click="handleExportXls()">导出数据</a-button>
+    </div>
+    <!-- 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;
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        row-key="toolId"
+        :columns="columns"
+        :data-source="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :row-selection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        @change="handleTableChange"
+      >
+        <span slot="action" slot-scope="text, record">
+          <!--          <a-button size="small" type="primary" @click="handleEdit(record)">-->
+          <!--            编辑-->
+          <!--          </a-button>-->
+          <!--          <a-divider type="vertical" />-->
+        </span>
+      </a-table>
+      <check-and-edit-model ref="modalForm" @ok="modalFormOk" />
+      <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
+        <img alt="example" style="width: 100%" :src="previewImage">
+      </a-modal>
+    </div>
+    <!-- table区域-end -->
+    <!-- 表单区域 -->
+  </j-modal>
+</template>
+<script>
+import { getAction, downFile } from '@/api/request'
+import JModal from '@/components/JModal'
+import { listMixin } from '@/mixin/listMixin'
+import columns from './indexColumns'
+
+export default {
+  name: 'CheckAndEditModel',
+  components: {
+    JModal
+  },
+  mixins: [listMixin],
+  data() {
+    return {
+      title: '报废安全工具台账',
+      visible: false,
+      queryParam: {},
+      // 表头
+      columns: columns(this),
+      treeData: [],
+      url: {
+        list: '/business/safetool/base/safety/tool/listScrapTool',
+        tree: '/system/dept/treeSelect',
+        exportXlsUrl: '/business/safetool/base/safety/tool/export'
+      }
+
+    }
+  },
+  created() {
+  },
+  methods: {
+    show() {
+      this.visible = true
+      this.loadData()
+      this.loadTree()
+    },
+    loadTree() {
+      this.treeData = []
+      getAction(this.url.tree).then((res) => {
+        if (res.code === 200) {
+          this.treeData = res.data
+        }
+      })
+    },
+    edit(record) {
+    },
+    close(isSubmit) {
+      if (isSubmit) {
+      } else {
+        this.visible = false
+      }
+    }
+  }
+}
+</script>

+ 11 - 2
src/views/security/stand/index.vue

@@ -27,7 +27,7 @@
           <a-input
             v-model="queryParam.storePlace"
             style="width: 150px"
-            placeholder="选择存放处"
+            placeholder="输入存放处"
           />
         </a-form-item>
         <a-form-item>
@@ -87,6 +87,8 @@
           <a-icon type="down" />
         </a-button>
       </a-dropdown>
+
+      <a-button style="float: right" type="link" @click="showBFList">报废安全工具</a-button>
     </div>
 
     <!-- table区域-begin -->
@@ -127,6 +129,7 @@
         </span>
       </a-table>
       <check-and-edit-model ref="modalForm" @ok="modalFormOk" />
+      <bf-list ref="bfList" />
       <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
         <img alt="example" style="width: 100%" :src="previewImage">
       </a-modal>
@@ -140,10 +143,12 @@ import { listMixin } from '@/mixin/listMixin'
 import columns from './indexColumns'
 import CheckAndEditModel from './CheckAndEditModel'
 import { getAction, downFile } from '@/api/request'
+import bfList from './bfList'
 
 export default {
   components: {
-    CheckAndEditModel
+    CheckAndEditModel,
+    bfList
   },
   mixins: [listMixin],
   data() {
@@ -170,6 +175,9 @@ export default {
     this.loadTree()
   },
   methods: {
+    showBFList() {
+      this.$refs.bfList.show()
+    },
     handleCancel() {
       this.previewImage = ''
       this.previewVisible = false
@@ -204,6 +212,7 @@ export default {
       })
     },
     handleExportCodeAll() {
+      this.$message.warning('时间稍长,请耐心等待')
       downFile(this.url.qrcodeAll).then((data) => {
         if (data.code !== 200) {
           this.$message.warning('文件下载失败')

+ 2 - 2
src/views/security/stand/indexColumns.js

@@ -48,8 +48,8 @@ function columns(vm) {
     {
       title: '试验结果',
       align: 'center',
-      dataIndex: 'testResult',
-      key: 'testResult'
+      dataIndex: 'testResultDesc',
+      key: 'testResultDesc'
     },
     {
       title: '操作',