From d68551caef23bd5d3c00035d7add3814f0fdece1 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 19 二月 2025 15:19:52 +0800
Subject: [PATCH] 搬迁检验任务11%
---
src/components/Table/lims-table.vue | 16
src/views/performance/manHour/workTimeManagement.vue | 1
src/views/standard/model/index.vue | 1
src/views/CNAS/process/method/standardMethod/index.vue | 1
src/views/structural/capabilityAndLaboratory/laboratory/index.vue | 573 +++++++++++++++++++++++------------
src/views/performance/manHour/workTimeConfig.vue | 1
src/views/business/inspectionTask/index.vue | 313 +++++++------------
7 files changed, 505 insertions(+), 401 deletions(-)
diff --git a/src/components/Table/lims-table.vue b/src/components/Table/lims-table.vue
index 4ba34e6..582036a 100644
--- a/src/components/Table/lims-table.vue
+++ b/src/components/Table/lims-table.vue
@@ -19,7 +19,12 @@
@current-change="currentChange"
@selection-change="handleSelectionChange"
>
- <el-table-column align="center" type="selection" width="55" v-if="isSelection" />
+ <el-table-column
+ align="center"
+ type="selection"
+ width="55"
+ v-if="isSelection"
+ />
<el-table-column
align="center"
label="搴忓彿"
@@ -405,15 +410,16 @@
.el-table >>> .el-table__empty-text {
text-align: center;
}
+
+>>> .cell {
+ padding: 0 !important;
+}
.cell {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding-right: 4px;
- padding-left: 4px;
-}
->>> .cell {
- padding: 0 !important;
+ padding-left: 10px;
}
.link {
color: rgb(64, 158, 255);
diff --git a/src/views/CNAS/process/method/standardMethod/index.vue b/src/views/CNAS/process/method/standardMethod/index.vue
index 1b63b97..b970b5f 100644
--- a/src/views/CNAS/process/method/standardMethod/index.vue
+++ b/src/views/CNAS/process/method/standardMethod/index.vue
@@ -280,7 +280,6 @@
dataType: "action",
fixed: "right",
label: "鎿嶄綔",
- width: "120px",
operation: [
{
name: "缂栬緫",
diff --git a/src/views/business/inspectionTask/index.vue b/src/views/business/inspectionTask/index.vue
index 127d5bb..8c58f11 100644
--- a/src/views/business/inspectionTask/index.vue
+++ b/src/views/business/inspectionTask/index.vue
@@ -162,17 +162,6 @@
</el-col>
</el-row>
</div>
- <!-- <ValueTable
- :key="upIndex"
- ref="insOrderPlan"
- :componentData="componentData"
- :isColumnWidth="true"
- :tableRowClassName="changeRowClass"
- :upUrl="$api.user.updateUser"
- :url="$api.insOrderPlan.selectInsOrderPlanList"
- class="value-table"
- @handleInspection="handleInspection"
- /> -->
<lims-table
:tableData="tableData"
:column="column"
@@ -180,6 +169,7 @@
:tableLoading="tableLoading"
:height="'calc(100vh - 290px)'"
@pagination="pagination"
+ key="tableData0"
></lims-table>
</div>
</div>
@@ -281,12 +271,15 @@
/>-->
<el-dialog :visible.sync="dataDialogVisible" title="鏁版嵁鏌ョ湅" width="80%">
<div v-if="dataDialogVisible" style="height: 70vh; overflow-y: auto">
- <ValueTable
- ref="ValueTableDataLook"
- :componentData="componentDataDataLook"
- :rowKey="'insProductId'"
- :url="$api.insOrder.selectSampleAndProductByOrderId"
- />
+ <lims-table
+ :tableData="lookTableData"
+ :column="lookColumn"
+ :page="lookPage"
+ :tableLoading="lookTableLoading"
+ :height="'60vh'"
+ @pagination="lookPagination"
+ key="tableData1"
+ ></lims-table>
</div>
</el-dialog>
<el-dialog
@@ -400,6 +393,7 @@
bindingProductTreeByProductId,
delProductTreeByProductId,
selectInsOrderPlanList,
+ selectSampleAndProductByOrderId,
} from "@/api/business/inspectionTask.js";
import { mapGetters } from "vuex";
export default {
@@ -521,182 +515,6 @@
requiredUp: [],
},
dataDialogVisible: false,
- componentData: {
- entity: {
- orderBy: {
- field: "entrustCode",
- order: "asc",
- },
- sonLaboratory: null,
- insState: null,
- userId: null,
- typeSource: null,
- },
- isIndex: true,
- showSelect: false,
- select: false,
- init: false,
- needSort: ["createTime", "sendTime", "type", "appointed", "insState"],
- do: [
- {
- id: "",
- font: "鏁版嵁鏌ョ湅",
- type: "text",
- method: "handleDataLook",
- },
- {
- id: "",
- font: "淇敼妫�楠屽��",
- type: "text",
- method: "editInspection",
- disabFun: (row, index) => {
- return (
- row.userName == null || row.insState == 3 || row.insState == 5
- );
- },
- },
- {
- id: "",
- font: "妫�楠�",
- type: "text",
- method: "handleInspection",
- disabFun: (row, index) => {
- return (
- row.userName == null ||
- row.insState == 3 ||
- row.insState == 5 ||
- (row.userName &&
- !row.userName.includes(
- JSON.parse(localStorage.getItem("user")).name
- ))
- );
- },
- },
- {
- id: "",
- font: "浜ゆ帴",
- type: "text",
- method: "handleConnect",
- disabFun: (row, index) => {
- return (
- row.userName == null ||
- row.insState == 5 ||
- row.insState == 3 ||
- (row.userName &&
- !row.userName.includes(
- JSON.parse(localStorage.getItem("user")).name
- ))
- );
- },
- },
- // {
- // font: '浜т笟閾�',
- // type: 'text',
- // method: 'openInfoDialog',
- // disabFun: (row, index) => {
- // return row.typeSource !== 1
- // }
- // },
- // {
- // id: '',
- // font: '璁ら',
- // type: 'text',
- // method: 'claimFun',
- // disabFun: (row, index) => {
- // return row.userName != null || row.checkName!=null
- // }
- // },
- {
- id: "",
- font: "鍘熷璁板綍",
- type: "text",
- method: "viewInspectInfo",
- },
- ],
- linkEvent: {
- entrustCode: {
- method: "selectAllByOne",
- },
- },
- tagField: {
- type: {
- select: [],
- },
- insState: {
- select: [],
- },
- insResult: {
- select: [
- {
- value: 0,
- label: "涓嶅悎鏍�",
- type: "danger",
- },
- {
- value: 1,
- label: "鍚堟牸",
- type: "success",
- },
- {
- value: "",
- label: "鏈嚭缁撴灉",
- type: "info",
- },
- ],
- },
- typeSource: {
- select: [
- {
- value: 0,
- label: "鎴愬搧涓嬪崟",
- type: "info",
- },
- {
- value: 1,
- label: "鍘熸潗鏂欎笅鍗�",
- type: "info",
- },
- {
- value: 2,
- label: "鍘熸潗鏂欎笅鍗�",
- type: "info",
- },
- ],
- },
- orderType: {
- select: [
- {
- value: "Customer-ordered test",
- label: "濮旀墭璇曢獙",
- type: "success",
- effect: "plain",
- },
- {
- value: "鎶芥",
- label: "鎶芥",
- type: "",
- effect: "plain",
- },
- {
- value: "杩涘巶妫�楠�",
- label: "杩涘巶妫�楠�",
- type: "info",
- effect: "plain",
- },
- {
- value: "Quarterly inspection",
- label: "瀛e害妫�楠�",
- type: "warning",
- effect: "plain",
- },
- ],
- },
- },
- selectField: {},
- requiredAdd: [],
- requiredUp: [],
- },
- upIndex: 0,
planTotal: 0,
insStateList: [],
state: 0, // 0:鍙拌处椤碉紝1锛氭楠岄〉闈�,2妫�楠岄〉闈�(澶嶆牳)锛岄粯璁や负0,3鏁版嵁鏌ョ湅
@@ -819,7 +637,6 @@
dataType: "action",
fixed: "right",
label: "鎿嶄綔",
- width: "260px",
operation: [
{
name: "鏁版嵁鏌ョ湅",
@@ -887,6 +704,91 @@
},
tableLoading: false,
queryParams: {},
+ insResultList: [
+ {
+ value: 1,
+ label: "鍚堟牸",
+ type: "success",
+ },
+ {
+ value: 0,
+ label: "涓嶅悎鏍�",
+ type: "danger",
+ },
+ {
+ value: 3,
+ label: "涓嶅垽瀹�",
+ type: "",
+ },
+ ],
+ lookTableData: [],
+ lookColumn: [
+ {
+ label: "鏍峰搧缂栧彿",
+ prop: "sampleCode",
+ width: "140px",
+ dataType: "link",
+ linkMethod: "selectAllByOne",
+ },
+ { label: "鏍峰搧鍚嶇О", prop: "sample", width: "140px" },
+ { label: "妫�楠岄」鍒嗙被", prop: "inspectionItemClass" },
+ { label: "妫�楠岄」", prop: "inspectionItem", width: "140px" },
+ { label: "妫�楠屽瓙椤�", prop: "inspectionItemSubclass" },
+ { label: "鍗曚綅", prop: "unit" },
+ { label: "鏍峰搧鍨嬪彿", prop: "model" },
+ { label: "鏉′欢", prop: "radius" },
+ { label: "鐢电紗鏍囪瘑", prop: "cableTag" },
+ { label: "璇曢獙瑕佹眰", prop: "tell" },
+ { label: "妫�楠岀粨鏋�", prop: "lastValue" },
+ {
+ label: "缁撴灉鍒ゅ畾",
+ prop: "insResult",
+ dataType: "tag",
+ formatData: (params) => {
+ return this.insResultList.find((m) => m.value == params).label;
+ },
+ formatType: (params) => {
+ return this.insResultList.find((m) => m.value == params).type;
+ },
+ },
+ {
+ dataType: "action",
+ fixed: "right",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "涓嶅悎鏍煎娴嬫煡鐪�",
+ type: "text",
+ clickFun: (row) => {
+ this.getRetestResult(row);
+ },
+ disabled: (row) => {
+ return row.insResult != 0;
+ },
+ },
+ {
+ name: "妫�楠岄」缁戝畾",
+ type: "text",
+ clickFun: (row) => {
+ this.getBinding(row);
+ },
+ disabled: (row) => {
+ return (
+ this.lookInfo.userName == null ||
+ this.lookInfo.insState == 3 ||
+ this.lookInfo.insState == 5
+ );
+ },
+ },
+ ],
+ },
+ ],
+ lookPage: {
+ total: 0,
+ size: 10,
+ current: 0,
+ },
+ lookTableLoading: false,
};
},
created() {
@@ -926,6 +828,27 @@
this.page.size = limit;
this.getList();
},
+ getLookList() {
+ this.lookTableLoading = true;
+ let param = { id: this.lookInfo.id, ...this.lookPage };
+ delete param.total;
+ selectSampleAndProductByOrderId({ ...param })
+ .then((res) => {
+ this.lookTableLoading = false;
+ if (res.code === 200) {
+ this.lookTableData = res.data.records;
+ this.lookPage.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.lookTableLoading = false;
+ });
+ },
+ lookPagination({ page, limit }) {
+ this.lookPage.current = page;
+ this.lookPage.size = limit;
+ this.getLookList();
+ },
// 淇敼妫�楠屽��
editInspection(row) {
this.$refs.editInspectionItem.showDialog(row.id);
@@ -937,7 +860,7 @@
// 鏁版嵁鏌ョ湅
handleDataLook(row) {
this.lookInfo = row;
- this.componentDataDataLook.entity.id = row.id;
+ this.getLookList();
this.dataDialogVisible = true;
},
// 鏌ョ湅涓嶅悎鏍煎娴嬬粨鏋�
diff --git a/src/views/performance/manHour/workTimeConfig.vue b/src/views/performance/manHour/workTimeConfig.vue
index ff79cc8..71eac7d 100644
--- a/src/views/performance/manHour/workTimeConfig.vue
+++ b/src/views/performance/manHour/workTimeConfig.vue
@@ -209,7 +209,6 @@
dataType: "action",
fixed: "right",
label: "鎿嶄綔",
- width: "160px",
operation: [
{
name: "缂栬緫",
diff --git a/src/views/performance/manHour/workTimeManagement.vue b/src/views/performance/manHour/workTimeManagement.vue
index bf8ffec..b93f8fe 100644
--- a/src/views/performance/manHour/workTimeManagement.vue
+++ b/src/views/performance/manHour/workTimeManagement.vue
@@ -597,7 +597,6 @@
dataType: "action",
fixed: "right",
label: "鎿嶄綔",
- width: "160px",
operation: [
{
name: "缂栬緫",
diff --git a/src/views/standard/model/index.vue b/src/views/standard/model/index.vue
index 9a366c8..1d9f42c 100644
--- a/src/views/standard/model/index.vue
+++ b/src/views/standard/model/index.vue
@@ -152,7 +152,6 @@
dataType: "action",
fixed: "right",
label: "鎿嶄綔",
- width: "320px",
operation: [
{
name: "缂栬緫",
diff --git a/src/views/structural/capabilityAndLaboratory/laboratory/index.vue b/src/views/structural/capabilityAndLaboratory/laboratory/index.vue
index c0bf840..820d8d2 100644
--- a/src/views/structural/capabilityAndLaboratory/laboratory/index.vue
+++ b/src/views/structural/capabilityAndLaboratory/laboratory/index.vue
@@ -3,219 +3,383 @@
<div>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
<el-form-item label="璧勮川鍚嶇О" prop="name">
- <el-select v-model="queryParams.name" placeholder="閫夋嫨璧勮川鍚嶇О" size="small" @change="refreshTable()">
- <el-option v-for="dict in dict.type.qualification_name" :key="dict.value" :label="dict.label" :value="dict.value">
+ <el-select
+ v-model="queryParams.name"
+ placeholder="閫夋嫨璧勮川鍚嶇О"
+ size="small"
+ @change="refreshTable()"
+ >
+ <el-option
+ v-for="dict in dict.type.cnas_method_qualification"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ >
{{ dict.label }}
</el-option>
</el-select>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
+ <el-button
+ type="primary"
+ icon="el-icon-search"
+ size="mini"
+ @click="refreshTable"
+ >鏌� 璇�</el-button
+ >
+ <el-button icon="el-icon-refresh" size="mini" @click="refresh"
+ >閲� 缃�</el-button
+ >
</el-form-item>
</el-form>
</div>
<div>
<el-row class="title">
<el-col :span="12" style="text-align: left">
- <el-radio-group v-model="radio" @input="selectorSwitch" size="medium" fill="#409EFF">
+ <el-radio-group
+ v-model="radio"
+ @input="selectorSwitch"
+ size="medium"
+ fill="#409EFF"
+ >
<el-radio-button :label="0">璧勮川鏄庣粏</el-radio-button>
<el-radio-button :label="1">璧勮川鎬昏</el-radio-button>
</el-radio-group>
</el-col>
- <el-col :span="12" style="text-align: right;" v-if="radio===0">
- <el-button size="small" type="primary" @click="openAdd">璧勮川鏇存柊</el-button>
- <el-button size="small" icon="el-icon-delete" @click="handleDel">鍒犻櫎</el-button>
+ <el-col :span="12" style="text-align: right" v-if="radio === 0">
+ <el-button size="small" type="primary" @click="openAdd"
+ >璧勮川鏇存柊</el-button
+ >
+ <el-button size="small" icon="el-icon-delete" @click="handleDel"
+ >鍒犻櫎</el-button
+ >
</el-col>
</el-row>
</div>
- <div v-if="radio===0">
- <lims-table :tableData="tableData" :column="column"
- :isSelection="true" :handleSelectionChange="handleSelectionChange"
- @pagination="pagination" :height="'calc(100vh - 300px)'"
- :page="page" :tableLoading="tableLoading"></lims-table>
+ <div v-if="radio === 0">
+ <lims-table
+ :tableData="tableData"
+ :column="column"
+ :isSelection="true"
+ :handleSelectionChange="handleSelectionChange"
+ @pagination="pagination"
+ :height="'calc(100vh - 300px)'"
+ :page="page"
+ :tableLoading="tableLoading"
+ ></lims-table>
</div>
- <div class="table" v-if="radio===1" v-loading="pageLoading" @scroll="scrollFn">
+ <div
+ class="table"
+ v-if="radio === 1"
+ v-loading="pageLoading"
+ @scroll="scrollFn"
+ >
<el-row :gutter="16">
- <el-col :span="8" v-for="(m,i) in list" :key="i" :xs="24" :sm="12" :md="8" :lg="8" :xl="6" style="margin-bottom: 16px;">
+ <el-col
+ :span="8"
+ v-for="(m, i) in list"
+ :key="i"
+ :xs="24"
+ :sm="12"
+ :md="8"
+ :lg="8"
+ :xl="6"
+ style="margin-bottom: 16px"
+ >
<div class="table-item">
- <el-image style="width: 102px;height: 102px;margin-right: 20px;border-radius: 16px;" :src="javaApi +'/img/'+m.imageUrl">
- <div slot="error" class="image-error" style="width: 100px;
- height: 100px;
+ <el-image
+ style="
+ width: 102px;
+ height: 102px;
+ margin-right: 20px;
border-radius: 16px;
- display: flex;
- align-items: center;
- justify-content: center;
- border: 1px solid #EEEEEE;">
- <i class="el-icon-picture-outline" style="font-size:30px;color:#666666;"></i>
+ "
+ :src="javaApi + '/img/' + m.imageUrl"
+ >
+ <div
+ slot="error"
+ class="image-error"
+ style="
+ width: 100px;
+ height: 100px;
+ border-radius: 16px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border: 1px solid #eeeeee;
+ "
+ >
+ <i
+ class="el-icon-picture-outline"
+ style="font-size: 30px; color: #666666"
+ ></i>
</div>
</el-image>
- <div class="table-item-right" style="flex: 1;font-size: 12px;color: #666666;">
- <p style="line-height: 26px;">璧勮川鍚嶇О锛�<span style="color: #3A7BFA;">{{ m.name }}</span></p>
- <p style="line-height: 26px;">棰佸彂鏃堕棿锛歿{m.recentlyTime}}</p>
- <p style="line-height: 26px;">鍒版湡鏃堕棿锛歿{m.expireTime}}</p>
+ <div
+ class="table-item-right"
+ style="flex: 1; font-size: 12px; color: #666666"
+ >
+ <p style="line-height: 26px">
+ 璧勮川鍚嶇О锛�<span style="color: #3a7bfa">{{ m.name }}</span>
+ </p>
+ <p style="line-height: 26px">棰佸彂鏃堕棿锛歿{ m.recentlyTime }}</p>
+ <p style="line-height: 26px">鍒版湡鏃堕棿锛歿{ m.expireTime }}</p>
<p>
<span>鐘舵�侊細</span>
- <el-tag :type="m.state===0?'danger':'success'" size="small">{{ m.state===0?'澶辨晥':'鏈夋晥' }}</el-tag>
+ <el-tag
+ :type="m.state === 0 ? 'danger' : 'success'"
+ size="small"
+ >{{ m.state === 0 ? "澶辨晥" : "鏈夋晥" }}</el-tag
+ >
</p>
</div>
</div>
</el-col>
</el-row>
- <div v-if="list.length<1&&!pageLoading&&!isLoding" style="color:#909399;font-size:14px;text-align: center;margin-top:200px" >鏆傛棤鏁版嵁</div>
- <div v-if="list.length>0">
- <el-button v-if="isLoding" type="text" style="display: flex; margin: 0 auto; color: #909399">
- <i class="el-icon-loading" style="font-size:20px"></i>
+ <div
+ v-if="list.length < 1 && !pageLoading && !isLoding"
+ style="
+ color: #909399;
+ font-size: 14px;
+ text-align: center;
+ margin-top: 200px;
+ "
+ >
+ 鏆傛棤鏁版嵁
+ </div>
+ <div v-if="list.length > 0">
+ <el-button
+ v-if="isLoding"
+ type="text"
+ style="display: flex; margin: 0 auto; color: #909399"
+ >
+ <i class="el-icon-loading" style="font-size: 20px"></i>
</el-button>
- <el-button type="text" v-if="finishLoding" style="display: flex; margin: 0 auto; color: #909399">宸茬粡娌℃湁鏇村鍟</el-button>
+ <el-button
+ type="text"
+ v-if="finishLoding"
+ style="display: flex; margin: 0 auto; color: #909399"
+ >宸茬粡娌℃湁鏇村鍟</el-button
+ >
</div>
</div>
- <el-dialog title="璧勮川鏇存柊" :visible.sync="qualificationsConnectVisible" width="400px">
- <el-form ref="formDataRef" :model="formData" label-position="right" :rules="formDataRules" label-width="78px">
+ <el-dialog
+ title="璧勮川鏇存柊"
+ :visible.sync="qualificationsConnectVisible"
+ width="400px"
+ >
+ <el-form
+ ref="formDataRef"
+ :model="formData"
+ label-position="right"
+ :rules="formDataRules"
+ label-width="78px"
+ >
<el-form-item label="璧勮川鍚嶇О" prop="name">
- <el-select v-model="formData.name" placeholder="璇烽�夋嫨" style="width: 100%;" size="small" clearable>
- <el-option v-for="dict in dict.type.qualification_name" :key="dict.value" :label="dict.label" :value="dict.value">
+ <el-select
+ v-model="formData.name"
+ placeholder="璇烽�夋嫨"
+ style="width: 100%"
+ size="small"
+ clearable
+ >
+ <el-option
+ v-for="dict in dict.type.cnas_method_qualification"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ >
{{ dict.label }}
</el-option>
</el-select>
</el-form-item>
<el-form-item label="璧勮川缂栫爜" prop="code">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="formData.code"></el-input>
+ <el-input
+ size="small"
+ placeholder="璇疯緭鍏�"
+ clearable
+ v-model="formData.code"
+ ></el-input>
</el-form-item>
<el-form-item label="棰佸彂鏈烘瀯" prop="organization">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="formData.organization"></el-input>
+ <el-input
+ size="small"
+ placeholder="璇疯緭鍏�"
+ clearable
+ v-model="formData.organization"
+ ></el-input>
</el-form-item>
<el-form-item label="璧勮川璇存槑" prop="explanation">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="formData.explanation"></el-input>
+ <el-input
+ size="small"
+ placeholder="璇疯緭鍏�"
+ clearable
+ v-model="formData.explanation"
+ ></el-input>
</el-form-item>
<el-form-item label="棰佸彂鏃堕棿" prop="dateOfIssuance">
- <el-date-picker style="width:100%" v-model="formData.dateOfIssuance"
- type="datetime"
- size="small"
- format="yyyy-MM-dd HH:mm:ss"
- value-format="yyyy-MM-dd HH:mm:ss"
- clearable
- placeholder="閫夋嫨鏃ユ湡">
+ <el-date-picker
+ style="width: 100%"
+ v-model="formData.dateOfIssuance"
+ type="datetime"
+ size="small"
+ format="yyyy-MM-dd HH:mm:ss"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ clearable
+ placeholder="閫夋嫨鏃ユ湡"
+ >
</el-date-picker>
</el-form-item>
<el-form-item label="鍒版湡鏃堕棿" prop="expireTime">
- <el-date-picker style="width:100%" v-model="formData.expireTime"
- type="datetime"
- size="small"
- format="yyyy-MM-dd HH:mm:ss"
- value-format="yyyy-MM-dd HH:mm:ss"
- clearable
- placeholder="閫夋嫨鏃ユ湡">
+ <el-date-picker
+ style="width: 100%"
+ v-model="formData.expireTime"
+ type="datetime"
+ size="small"
+ format="yyyy-MM-dd HH:mm:ss"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ clearable
+ placeholder="閫夋嫨鏃ユ湡"
+ >
</el-date-picker>
</el-form-item>
<el-form-item label="璧勮川鍥剧墖">
<el-upload
ref="upload"
:action="uploadAction"
- :on-success="m=>handleSuccessUpImg(m,'imageUrl')"
- accept='image/jpg,image/jpeg,image/png'
+ :on-success="(m) => handleSuccessUpImg(m, 'imageUrl')"
+ accept="image/jpg,image/jpeg,image/png"
:multiple="false"
:limit="1"
- :headers="headers" :on-change="beforeUpload"
- :on-error="onError">
- <el-button slot="trigger" size="small" type="primary">閫夊彇鍥剧墖</el-button>
+ :headers="headers"
+ :on-change="beforeUpload"
+ :on-error="onError"
+ >
+ <el-button slot="trigger" size="small" type="primary"
+ >閫夊彇鍥剧墖</el-button
+ >
</el-upload>
</el-form-item>
<el-form-item label="璧勮川闄勪欢">
<el-upload
ref="upload1"
:action="uploadAction"
- :on-success="m=>handleSuccessUpImg(m,'fileUrl')"
- accept='image/jpg,image/jpeg,image/png,application/pdf,.doc,.docx'
- :headers="headers" :multiple="false" :limit="1" :on-change="beforeUpload1"
- :on-error="onError1">
- <el-button slot="trigger" size="small" type="primary">閫夊彇鏂囦欢</el-button>
+ :on-success="(m) => handleSuccessUpImg(m, 'fileUrl')"
+ accept="image/jpg,image/jpeg,image/png,application/pdf,.doc,.docx"
+ :headers="headers"
+ :multiple="false"
+ :limit="1"
+ :on-change="beforeUpload1"
+ :on-error="onError1"
+ >
+ <el-button slot="trigger" size="small" type="primary"
+ >閫夊彇鏂囦欢</el-button
+ >
</el-upload>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
- <el-button @click="qualificationsConnectVisible = false">鍙� 娑�</el-button>
- <el-button type="primary" @click="confirmQualifications" :loading="loading">纭� 瀹�</el-button>
- </span>
+ <el-button @click="qualificationsConnectVisible = false"
+ >鍙� 娑�</el-button
+ >
+ <el-button
+ type="primary"
+ @click="confirmQualifications"
+ :loading="loading"
+ >纭� 瀹�</el-button
+ >
+ </span>
</el-dialog>
</div>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
-import {addCertificationDetail, delCertificationDetail, getCertificationDetail} from "@/api/structural/laboratory";
-import {getToken} from "@/utils/auth";
+import {
+ addCertificationDetail,
+ delCertificationDetail,
+ getCertificationDetail,
+} from "@/api/structural/laboratory";
+import { getToken } from "@/utils/auth";
export default {
components: {
- limsTable
+ limsTable,
},
- dicts: ['qualification_name'],
+ dicts: ["cnas_method_qualification"],
data() {
return {
radio: 0,
queryParams: {
- name: ''
+ name: "",
},
tableData: [],
selection: [],
column: [
- {label: '璧勮川鍚嶇О', prop: 'name'},
- {label: '璧勮川缂栫爜', prop: 'code'},
- {label: '棰佸彂鏈烘瀯', prop: 'organization'},
- {label: '璧勮川璇存槑', prop: 'explanation'},
- {label: '棣栨棰佸彂鏃堕棿', prop: 'firstIssuanceDate'},
- {label: '鏈�杩戦鍙戞椂闂�', prop: 'latestIssuanceDate'},
- {label: '鍒版湡棰佸彂鏃堕棿', prop: 'expireTime'},
+ { label: "璧勮川鍚嶇О", prop: "name" },
+ { label: "璧勮川缂栫爜", prop: "code" },
+ { label: "棰佸彂鏈烘瀯", prop: "organization" },
+ { label: "璧勮川璇存槑", prop: "explanation" },
+ { label: "棣栨棰佸彂鏃堕棿", prop: "firstIssuanceDate" },
+ { label: "鏈�杩戦鍙戞椂闂�", prop: "latestIssuanceDate" },
+ { label: "鍒版湡棰佸彂鏃堕棿", prop: "expireTime" },
{
- dataType: 'action',
- fixed: 'right',
- label: '鎿嶄綔',
+ dataType: "action",
+ fixed: "right",
+ label: "鎿嶄綔",
operation: [
{
- name: '闄勪欢涓嬭浇',
- type: 'text',
+ name: "闄勪欢涓嬭浇",
+ type: "text",
clickFun: (row) => {
this.handleDownLoad(row);
},
},
- ]
- }
+ ],
+ },
],
page: {
- total:0,
- size:10,
- current:1
+ total: 0,
+ size: 10,
+ current: 1,
},
tableLoading: false,
- qualificationsList:[],
- qualificationsConnectVisible:false,
- formData:{},
+ qualificationsList: [],
+ qualificationsConnectVisible: false,
+ formData: {},
formDataRules: {
- name: [{ required: true, message: "璇峰~鍐欒祫璐ㄥ悕绉�", trigger: "change" }],
+ name: [
+ { required: true, message: "璇峰~鍐欒祫璐ㄥ悕绉�", trigger: "change" },
+ ],
code: [{ required: true, message: "璇峰~鍐欒祫璐ㄧ紪鐮�", trigger: "blur" }],
- organization: [{ required: true, message: "璇峰~鍐欓鍙戞満鏋�", trigger: "blur" }],
- dateOfIssuance: [{ required: true, message: "璇烽�夋嫨棰佸彂鏃堕棿", trigger: "change" }],
- expireTime: [{ required: true, message: "璇峰~鍐欏埌鏈熸椂闂�", trigger: "change" }],
+ organization: [
+ { required: true, message: "璇峰~鍐欓鍙戞満鏋�", trigger: "blur" },
+ ],
+ dateOfIssuance: [
+ { required: true, message: "璇烽�夋嫨棰佸彂鏃堕棿", trigger: "change" },
+ ],
+ expireTime: [
+ { required: true, message: "璇峰~鍐欏埌鏈熸椂闂�", trigger: "change" },
+ ],
},
- loading:false,
- pageLoading:false,
+ loading: false,
+ pageLoading: false,
isLoding: false, // 鍔犺浇涓紝loading鍥炬爣,榛樿涓簍rue
finishLoding: false, // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
currentPage: 1, // 褰撳墠椤�
pageSize: 16, // 涓�椤�16鏉�
- total: '',
- list:[],
- uploadAction: process.env.VUE_APP_BASE_API + '/deviceScope/uploadFile',
+ total: "",
+ list: [],
+ uploadAction: process.env.VUE_APP_BASE_API + "/deviceScope/uploadFile",
headers: { Authorization: "Bearer " + getToken() },
- }
+ };
},
mounted() {
- this.refreshTable()
+ this.refreshTable();
},
methods: {
selectorSwitch(radio) {
- if(radio === 1){
+ if (radio === 1) {
this.list = [];
this.refreshTable();
}
@@ -223,156 +387,165 @@
refreshTable() {
if (this.radio === 0) {
this.tableLoading = true;
- getCertificationDetail({...this.page,...this.queryParams}).then(res => {
- this.tableLoading = false
- if (res.code === 200) {
- this.tableData = res.data.records
- this.page.total = res.data.total
- }
- }).catch(err => {
- this.tableLoading = false
- })
+ getCertificationDetail({ ...this.page, ...this.queryParams })
+ .then((res) => {
+ this.tableLoading = false;
+ if (res.code === 200) {
+ this.tableData = res.data.records;
+ this.page.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading = false;
+ });
} else {
- if(this.currentPage>1){
- this.isLoding = true
- }else{
- this.pageLoading = true
+ if (this.currentPage > 1) {
+ this.isLoding = true;
+ } else {
+ this.pageLoading = true;
}
- if(this.list.length===0){
- window.addEventListener("scroll", this.throttle(this.scrollFn, 20000));
+ if (this.list.length === 0) {
+ window.addEventListener(
+ "scroll",
+ this.throttle(this.scrollFn, 20000)
+ );
}
getCertificationDetail({
current: this.currentPage,
size: this.pageSize,
- ...this.queryParams
- }).then(res => {
- if(res.code===200){
- this.total = res.data.total
- let list = res.data.records;
- if(list.length===0){
- this.finishLoding = true;
- }else{
- if(list.length<this.pageSize){
+ ...this.queryParams,
+ })
+ .then((res) => {
+ if (res.code === 200) {
+ this.total = res.data.total;
+ let list = res.data.records;
+ if (list.length === 0) {
this.finishLoding = true;
- }
- this.list = this.list.concat(list)
- if(this.total===this.list.length){
- this.finishLoding = true;
+ } else {
+ if (list.length < this.pageSize) {
+ this.finishLoding = true;
+ }
+ this.list = this.list.concat(list);
+ if (this.total === this.list.length) {
+ this.finishLoding = true;
+ }
}
}
- }
- this.pageLoading = false
- this.isLoding = false;
- }).catch(err => {
- this.pageLoading = false
- this.isLoding = false;
- })
+ this.pageLoading = false;
+ this.isLoding = false;
+ })
+ .catch((err) => {
+ this.pageLoading = false;
+ this.isLoding = false;
+ });
}
},
// 閲嶇疆
refresh() {
- if(this.radio === 0){
- this.queryParams.name = ''
- this.page.size = 10
- this.page.current = 1
- this.refreshTable()
+ if (this.radio === 0) {
+ this.queryParams.name = "";
+ this.page.size = 10;
+ this.page.current = 1;
+ this.refreshTable();
} else {
this.finishLoding = false;
- this.currentPage= 1;
- this.list=[];
- this.refreshTable()
+ this.currentPage = 1;
+ this.list = [];
+ this.refreshTable();
}
},
// 琛ㄦ牸澶氶��
- handleSelectionChange (selection) {
+ handleSelectionChange(selection) {
this.selection = selection;
},
- pagination (page) {
- this.page.size = page.limit
- this.refreshTable()
+ pagination(page) {
+ this.page.size = page.limit;
+ this.refreshTable();
},
// 璧勮川鏄庣粏鎵归噺鍒犻櫎
- handleDel(){
- if (this.selection.length===0) {
- this.$message.warning('璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�')
- return
+ handleDel() {
+ if (this.selection.length === 0) {
+ this.$message.warning("璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�");
+ return;
}
- const delIds = []
- this.selection.forEach(item => {
- delIds.push(item.id)
- })
- delCertificationDetail(delIds).then(res => {
- if (res.code !== 200) return
+ const delIds = [];
+ this.selection.forEach((item) => {
+ delIds.push(item.id);
+ });
+ delCertificationDetail(delIds).then((res) => {
+ if (res.code !== 200) return;
this.refreshTable();
- this.$message.success('鍒犻櫎鎴愬姛')
- })
+ this.$message.success("鍒犻櫎鎴愬姛");
+ });
},
// 璧勮川鏄庣粏闄勪欢涓嬭浇
- handleDownLoad(row){
+ handleDownLoad(row) {
// let url = row.fileUrl;
// const link = document.createElement('a');
// link.href = this.javaApi + '/img/'+ url;
// document.body.appendChild(link);
// link.target = '_blank';
// link.click();
- const url = process.env.VUE_APP_BASE_API + '/img/'+ row.fileUrl
+ const url = process.env.VUE_APP_BASE_API + "/img/" + row.fileUrl;
this.$download.saveAs(url, row.fileUrl);
},
openAdd() {
this.qualificationsConnectVisible = true;
- this.$nextTick(()=>{
- this.$refs.upload.clearFiles()
- this.$refs.upload1.clearFiles()
- })
+ this.$nextTick(() => {
+ this.$refs.upload.clearFiles();
+ this.$refs.upload1.clearFiles();
+ });
this.formData = {};
},
- handleSuccessUpImg(response,name) {
+ handleSuccessUpImg(response, name) {
if (response.code === 200) {
this.formData[name] = response.data.url;
}
},
beforeUpload(file) {
if (file.size > 1024 * 1024 * 10) {
- this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
- this.$refs.upload.clearFiles()
+ this.$message.error("涓婁紶鏂囦欢涓嶈秴杩�10M");
+ this.$refs.upload.clearFiles();
return false;
} else {
return true;
}
},
onError(err, file, fileList) {
- this.$message.error('涓婁紶澶辫触')
- this.$refs.upload.clearFiles()
+ this.$message.error("涓婁紶澶辫触");
+ this.$refs.upload.clearFiles();
},
beforeUpload1(file) {
if (file.size > 1024 * 1024 * 10) {
- this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
- this.$refs.upload1.clearFiles()
+ this.$message.error("涓婁紶鏂囦欢涓嶈秴杩�10M");
+ this.$refs.upload1.clearFiles();
return false;
} else {
return true;
}
},
onError1(err, file, fileList) {
- this.$message.error('涓婁紶澶辫触')
- this.$refs.upload1.clearFiles()
+ this.$message.error("涓婁紶澶辫触");
+ this.$refs.upload1.clearFiles();
},
- confirmQualifications(){
- this.$refs['formDataRef'].validate((valid) => {
+ confirmQualifications() {
+ this.$refs["formDataRef"].validate((valid) => {
if (valid) {
this.loading = true;
- addCertificationDetail({...this.formData}).then(res => {
- this.loading = false
- if (res.code === 201) return
- this.$message.success('宸叉彁浜�')
- this.refreshTable()
- this.resetForm("formDataRef");
- this.qualificationsConnectVisible = false
- }).catch(err => {
- this.loading = false
- })
+ addCertificationDetail({ ...this.formData })
+ .then((res) => {
+ this.loading = false;
+ if (res.code === 201) return;
+ this.$message.success("宸叉彁浜�");
+ this.refreshTable();
+ this.resetForm("formDataRef");
+ this.qualificationsConnectVisible = false;
+ })
+ .catch((err) => {
+ this.loading = false;
+ });
}
- })
+ });
},
// 婊氬姩瑙﹀簳鍔犺浇
scrollFn() {
@@ -380,8 +553,14 @@
let scrollHeight = document.body.scrollHeight; // 婊氬姩鏂囨。楂樺害
let scrollTop = parseInt(document.documentElement.scrollTop); // 宸叉粴鍔ㄧ殑楂樺害
let height = 300;
- if (scrollTop + clientHeight >= scrollHeight - height && scrollHeight !== 0) {
- if (!this.finishLoding&&this.currentPage*this.pageSize<this.total) {
+ if (
+ scrollTop + clientHeight >= scrollHeight - height &&
+ scrollHeight !== 0
+ ) {
+ if (
+ !this.finishLoding &&
+ this.currentPage * this.pageSize < this.total
+ ) {
this.currentPage = this.currentPage + 1;
this.refreshTable();
}
@@ -407,7 +586,7 @@
destroyed() {
window.removeEventListener("scroll", this.throttle(), false);
},
-}
+};
</script>
<style scoped>
@@ -416,10 +595,10 @@
line-height: 40px;
margin-bottom: 10px;
}
-.table-item{
+.table-item {
border-radius: 8px 8px 8px 8px;
- box-shadow: 4px 4px 8px 0px rgba(51,51,51,0.04);
- border: 1px solid #EEEEEE;
+ box-shadow: 4px 4px 8px 0px rgba(51, 51, 51, 0.04);
+ border: 1px solid #eeeeee;
box-sizing: border-box;
padding: 14px 12px;
display: flex;
--
Gitblit v1.9.3