From 8a756a7a4cac8714e7e2515e9fd464749dbab5be Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 12 三月 2025 15:35:37 +0800
Subject: [PATCH] 表格组件调整
---
src/components/Table/lims-table.vue | 221 ++++++----
src/views/business/inspectionOrder/index.vue | 1029 ++++++++++++++++++------------------------------
2 files changed, 522 insertions(+), 728 deletions(-)
diff --git a/src/components/Table/lims-table.vue b/src/components/Table/lims-table.vue
index 2d5fce6..0251a1f 100644
--- a/src/components/Table/lims-table.vue
+++ b/src/components/Table/lims-table.vue
@@ -4,6 +4,8 @@
<el-table
ref="multipleTable"
v-loading="tableLoading"
+ element-loading-text="鍔犺浇涓�..."
+ element-loading-spinner="el-icon-loading"
:border="border"
:data="tableData"
:header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }"
@@ -43,7 +45,6 @@
:filter-multiple="item.filterMultiple"
:filtered-value="item.filteredValue"
:filters="item.filters"
- :fixed="item.fixed"
:label="item.label"
:min-width="item.minWidth"
:prop="item.prop"
@@ -132,88 +133,6 @@
>{{ scope.row[item.prop] | formatters(item.formatData) }}</el-tag
>
</div>
-
- <!-- 鎸夐挳 -->
- <div v-else-if="item.dataType == 'action'">
- <template v-for="(o, key) in item.operation">
- <el-button
- v-show="o.type != 'upload'"
- size="mini"
- v-if="o.showHide ? o.showHide(scope.row) : true"
- :disabled="o.disabled ? o.disabled(scope.row) : false"
- :icon="iconFn(o)"
- :plain="o.plain"
- :style="{ color: o.name === '鍒犻櫎' ? '#f56c6c' : o.color }"
- :type="o.type | typeFn(scope.row)"
- @click="o.clickFun(scope.row)"
- :key="key"
- >
- {{ o.name }}
- </el-button>
- <el-upload
- :action="
- javaApi +
- o.url +
- '?id=' +
- (o.uploadIdFun ? o.uploadIdFun(scope.row) : scope.row.id)
- "
- size="mini"
- ref="upload"
- :multiple="o.multiple ? o.multiple : false"
- :limit="1"
- :disabled="o.disabled ? o.disabled(scope.row) : false"
- :accept="
- o.accept
- ? o.accept
- : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'
- "
- v-if="o.type == 'upload' && o.url"
- style="display: inline-block; width: 50px"
- v-show="o.showHide ? o.showHide(scope.row) : true"
- :headers="uploadHeader"
- :on-error="onError"
- :on-exceed="onExceed"
- :on-success="handleSuccessUp"
- :show-file-list="false"
- :key="key"
- >
- <el-button
- :size="o.size ? o.size : 'small'"
- type="text"
- :disabled="o.disabled ? o.disabled(scope.row) : false"
- >{{ o.name }}</el-button
- >
- </el-upload>
- <el-upload
- action="#"
- :on-change="
- (file, fileList) => o.clickFun(scope.row, file, fileList)
- "
- :multiple="o.multiple ? o.multiple : false"
- :limit="o.limit ? o.limit : 1"
- :disabled="o.disabled ? o.disabled(scope.row) : false"
- :accept="
- o.accept
- ? o.accept
- : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'
- "
- v-if="o.type == 'upload' && !o.url"
- style="display: inline-block; width: 50px"
- v-show="o.showHide ? o.showHide(scope.row) : true"
- :auto-upload="false"
- :on-exceed="onExceed"
- :show-file-list="false"
- :key="key"
- >
- <el-button
- :size="o.size ? o.size : 'small'"
- type="text"
- :disabled="o.disabled ? o.disabled(scope.row) : false"
- >{{ o.name }}</el-button
- >
- </el-upload>
- </template>
- </div>
<!-- 鍙偣鍑荤殑鏂囧瓧 -->
<div
v-else-if="item.dataType == 'link'"
@@ -232,6 +151,109 @@
scope.row[item.prop] | formatters(item.formatData)
}}</span>
</div>
+ </template>
+ </el-table-column>
+ <!-- 鎿嶄綔鍒� -->
+ <el-table-column
+ v-if="table.operator"
+ :label="(table.operatorConfig && table.operatorConfig.label) || '鎿嶄綔'"
+ :width="
+ table.operatorConfig &&
+ (table.operatorConfig.width
+ ? table.operatorConfig.width
+ : calcOperationWidth())
+ "
+ :min-width="
+ (table.operatorConfig && table.operatorConfig.width) ||
+ table.operatorConfig.minWidth ||
+ 100
+ "
+ align="center"
+ :fixed="table.operatorConfig ? table.operatorConfig.fixed : 'right'"
+ :show-overflow-tooltip="true"
+ >
+ <template slot-scope="scope">
+ <template v-for="(o, index) in table.operator">
+ <el-button
+ :key="index"
+ v-if="o.type != 'upload'"
+ @click.stop="o.clickFun(scope.row)"
+ :type="o.type || 'text'"
+ :icon="o.icon"
+ :size="o.size || 'small'"
+ :disabled="o.disabled ? o.disabled(scope.row) : false"
+ v-show="o.showFun ? o.showFun(scope.row) : true"
+ :class="[
+ 'commonButton',
+ {
+ del: o.name === '鍒犻櫎' || o.name === '浣滃簾',
+ },
+ ]"
+ >{{ o.name }}
+ </el-button>
+ <el-upload
+ :action="
+ javaApi +
+ o.url +
+ '?id=' +
+ (o.uploadIdFun ? o.uploadIdFun(scope.row) : scope.row.id)
+ "
+ size="mini"
+ ref="upload"
+ :multiple="o.multiple ? o.multiple : false"
+ :limit="1"
+ :disabled="o.disabled ? o.disabled(scope.row) : false"
+ :accept="
+ o.accept
+ ? o.accept
+ : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'
+ "
+ v-if="o.type == 'upload' && o.url"
+ style="display: inline-block; width: 50px"
+ v-show="o.showHide ? o.showHide(scope.row) : true"
+ :headers="uploadHeader"
+ :on-error="onError"
+ :on-exceed="onExceed"
+ :on-success="handleSuccessUp"
+ :show-file-list="false"
+ :key="index"
+ >
+ <el-button
+ :size="o.size ? o.size : 'small'"
+ type="text"
+ :disabled="o.disabled ? o.disabled(scope.row) : false"
+ >{{ o.name }}</el-button
+ >
+ </el-upload>
+ <el-upload
+ action="#"
+ :on-change="
+ (file, fileList) => o.clickFun(scope.row, file, fileList)
+ "
+ :multiple="o.multiple ? o.multiple : false"
+ :limit="o.limit ? o.limit : 1"
+ :disabled="o.disabled ? o.disabled(scope.row) : false"
+ :accept="
+ o.accept
+ ? o.accept
+ : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'
+ "
+ v-if="o.type == 'upload' && !o.url"
+ style="display: inline-block; width: 50px"
+ v-show="o.showHide ? o.showHide(scope.row) : true"
+ :auto-upload="false"
+ :on-exceed="onExceed"
+ :show-file-list="false"
+ :key="index"
+ >
+ <el-button
+ :size="o.size ? o.size : 'small'"
+ type="text"
+ :disabled="o.disabled ? o.disabled(scope.row) : false"
+ >{{ o.name }}</el-button
+ >
+ </el-upload>
+ </template>
</template>
</el-table-column>
</el-table>
@@ -366,11 +388,18 @@
return {};
},
},
- column: {
- type: Array,
+ // column: {
+ // type: Array,
+ // default() {
+ // return [];
+ // },
+ // },
+ table: {
+ type: Object,
default() {
- return [];
+ return {};
},
+ required: true,
},
rowClassName: {
type: Function,
@@ -405,12 +434,32 @@
data() {
return {
spanList: [],
+ column: [],
};
+ },
+ watch: {
+ table(val) {
+ this.doLayout();
+ },
},
mounted() {
this.calculateSpanInfo();
+ this.column = this.table.column;
},
methods: {
+ //璁$畻鎿嶄綔鍒楃殑瀹藉害
+ calcOperationWidth() {
+ let width = 0;
+ this.table.operator.forEach((item) => {
+ width += item.name.length * 15 + 15;
+ });
+ return width;
+ },
+ doLayout() {
+ this.$nextTick(() => {
+ this.$refs.multipleTable && this.$refs.multipleTable.doLayout();
+ });
+ },
getWidth(row) {
let count = 0;
row.forEach((a) => {
diff --git a/src/views/business/inspectionOrder/index.vue b/src/views/business/inspectionOrder/index.vue
index 01efcc4..59d5def 100644
--- a/src/views/business/inspectionOrder/index.vue
+++ b/src/views/business/inspectionOrder/index.vue
@@ -183,7 +183,7 @@
:height="tableHeight + ''"
@pagination="pagination"
:handleSelectionChange="selectionChange"
- :column="column"
+ :table="table"
:page="page"
:tableLoading="tableLoading"
></lims-table>
@@ -376,9 +376,9 @@
>
<lims-table
highlightCurrentRow
- :heigt="'80vh'"
+ :height="'80vh'"
:tableData="dataLooktableData"
- :column="dataLookcolumn"
+ :table="dataLookTable"
:tableLoading="dataLookTableLoading"
></lims-table>
</el-dialog>
@@ -868,351 +868,407 @@
current: 1,
},
tableLoading: false,
- column: [
- {
- label: "濮旀墭缂栧彿",
- prop: "entrustCode",
- minWidth: "160px",
- width: "160px",
- },
- {
- label: "澶栭儴濮旀墭缂栧彿",
- prop: "outEntrustCode",
- minWidth: "160px",
- width: "160px",
- },
- {
- label: "濮旀墭鍗曚綅",
- prop: "company",
- minWidth: "160px",
- width: "160px",
- },
- {
- label: "鏍峰搧鍚嶇О",
- prop: "sampleName",
- minWidth: "160px",
- width: "160px",
- dataType: "link",
- linkEvent: {
- method: "showDetails",
- vueComponent: this,
+ table: {
+ // 鏍囬
+ column: [
+ {
+ label: "濮旀墭缂栧彿",
+ prop: "entrustCode",
+ minWidth: "160px",
+ width: "160px",
},
- },
- {
- label: "鏍峰搧缂栧彿",
- prop: "sampleCode",
- minWidth: "160px",
- width: "160px",
- },
- {
- label: "鏍峰搧鍨嬪彿",
- prop: "sampleModel",
- minWidth: "160px",
- width: "160px",
- },
- {
- label: "鏍峰搧鏁伴噺",
- prop: "sampleNum",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "妫�楠岃繘搴�%",
- prop: "insProgress",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "绱ф�ョ▼搴�",
- prop: "type",
- minWidth: "100px",
- width: "100px",
- dataType: "tag",
- formatData: (params) => {
- let index = this.urgencyDictList.findIndex(
- (item) => item.dictValue == params
- );
- if (index > -1) {
- return this.urgencyDictList[index].dictLabel;
- } else {
- return null;
- }
+ {
+ label: "澶栭儴濮旀墭缂栧彿",
+ prop: "outEntrustCode",
+ minWidth: "160px",
+ width: "160px",
},
- formatType: (params) => {
- let index = this.urgencyDictList.findIndex(
- (item) => item.dictValue == params
- );
- if (index > -1) {
- return this.urgencyDictList[index].listClass;
- } else {
- return null;
- }
+ {
+ label: "濮旀墭鍗曚綅",
+ prop: "company",
+ minWidth: "160px",
+ width: "160px",
},
- },
- {
- label: "澶囨敞",
- prop: "remark",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "鍒跺崟浜�",
- prop: "custom",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "绾﹀畾鏃堕棿",
- prop: "appointed",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "涓嬪崟鏃堕棿",
- prop: "createTime",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "涓嬪彂鏃堕棿",
- prop: "sendTime",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "閫�鍥炵悊鐢�",
- prop: "tell",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "濮旀墭浜�",
- prop: "prepareUser",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "鎾ら攢鏃ユ湡",
- prop: "revocationTime",
- minWidth: "120px",
- width: "120px",
- },
- {
- dataType: "action",
+ {
+ label: "鏍峰搧鍚嶇О",
+ prop: "sampleName",
+ minWidth: "160px",
+ width: "160px",
+ dataType: "link",
+ linkEvent: {
+ method: "showDetails",
+ vueComponent: this,
+ },
+ },
+ {
+ label: "鏍峰搧缂栧彿",
+ prop: "sampleCode",
+ minWidth: "160px",
+ width: "160px",
+ },
+ {
+ label: "鏍峰搧鍨嬪彿",
+ prop: "sampleModel",
+ minWidth: "160px",
+ width: "160px",
+ },
+ {
+ label: "鏍峰搧鏁伴噺",
+ prop: "sampleNum",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "妫�楠岃繘搴�%",
+ prop: "insProgress",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "绱ф�ョ▼搴�",
+ prop: "type",
+ minWidth: "100px",
+ width: "100px",
+ dataType: "tag",
+ formatData: (params) => {
+ let index = this.urgencyDictList.findIndex(
+ (item) => item.dictValue == params
+ );
+ if (index > -1) {
+ return this.urgencyDictList[index].dictLabel;
+ } else {
+ return null;
+ }
+ },
+ formatType: (params) => {
+ let index = this.urgencyDictList.findIndex(
+ (item) => item.dictValue == params
+ );
+ if (index > -1) {
+ return this.urgencyDictList[index].listClass;
+ } else {
+ return null;
+ }
+ },
+ },
+ {
+ label: "澶囨敞",
+ prop: "remark",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "鍒跺崟浜�",
+ prop: "custom",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "绾﹀畾鏃堕棿",
+ prop: "appointed",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "涓嬪崟鏃堕棿",
+ prop: "createTime",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "涓嬪彂鏃堕棿",
+ prop: "sendTime",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "閫�鍥炵悊鐢�",
+ prop: "tell",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "濮旀墭浜�",
+ prop: "prepareUser",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "鎾ら攢鏃ユ湡",
+ prop: "revocationTime",
+ minWidth: "120px",
+ width: "120px",
+ },
+ ],
+ operatorConfig: {
fixed: "right",
label: "鎿嶄綔",
- operation: [
- {
- name: "鏁版嵁鏌ョ湅",
- type: "text",
- clickFun: (row) => {},
- disabled: (row) => {
- return row.state != 1 && row.state != 4;
- },
- clickFun: (row) => {
- this.handleDataLook(row);
- },
- },
- {
- name: "鎶ュ憡涓嬭浇",
- type: "text",
- clickFun: (row) => {},
- disabled: (row, index) => {
- return row.state != 4 || row.isRatify != 1;
- },
- },
- {
- name: "瀹℃牳",
- type: "text",
- clickFun: (row) => {},
- disabled: (row, index) => {
- return row.state != 0;
- },
- },
- {
- name: "鎾ら攢",
- type: "text",
- clickFun: (row) => {},
- disabled: (row, index) => {
- return row.state != 1 && row.state != 0;
- },
- },
- {
- name: "鎾ら攢瀹℃牳",
- type: "text",
- clickFun: (row) => {},
- disabled: (row, index) => {
- return (
- (row.state != 1 && row.state != 0) ||
- this.tabIndex != 1 ||
- row.isRevocation != 1
- );
- },
- },
- {
- name: "鍒嗛厤",
- type: "text",
- clickFun: (row) => {},
- disabled: (row, index) => {
- return (
- row.state != 1 ||
- (row.entrustCode != null &&
- Number(row.assign) > 0 &&
- row.inspectId != null)
- );
- },
- },
- ],
+ minWidth: 100,
},
- ],
+ operator: [
+ {
+ name: "鏁版嵁鏌ョ湅",
+ type: "text",
+ disabled: (row) => {
+ return row.state != 1 && row.state != 4;
+ },
+ clickFun: (row) => {
+ this.handleDataLook(row);
+ },
+ showFun: () => {
+ return true;
+ },
+ },
+ {
+ name: "鎶ュ憡涓嬭浇",
+ type: "text",
+ clickFun: (row) => {},
+ disabled: (row, index) => {
+ return row.state != 4 || row.isRatify != 1;
+ },
+ },
+ {
+ name: "瀹℃牳",
+ type: "text",
+ clickFun: (row) => {},
+ disabled: (row, index) => {
+ return row.state != 0;
+ },
+ },
+ {
+ name: "鎾ら攢",
+ type: "text",
+ clickFun: (row) => {},
+ disabled: (row, index) => {
+ return row.state != 1 && row.state != 0;
+ },
+ },
+ {
+ name: "鎾ら攢瀹℃牳",
+ type: "text",
+ clickFun: (row) => {},
+ disabled: (row, index) => {
+ return (
+ (row.state != 1 && row.state != 0) ||
+ this.tabIndex != 1 ||
+ row.isRevocation != 1
+ );
+ },
+ },
+ {
+ name: "鍒嗛厤",
+ type: "text",
+ clickFun: (row) => {},
+ disabled: (row, index) => {
+ return (
+ row.state != 1 ||
+ (row.entrustCode != null &&
+ Number(row.assign) > 0 &&
+ row.inspectId != null)
+ );
+ },
+ },
+ ],
+ },
+ dataLookTable: {
+ column: [
+ {
+ label: "濮旀墭缂栧彿",
+ prop: "entrustCode",
+ minWidth: "160px",
+ width: "160px",
+ },
+ {
+ label: "鏍峰搧缂栧彿",
+ prop: "sampleCode",
+ minWidth: "160px",
+ width: "160px",
+ },
+ {
+ label: "绠″鑹叉爣",
+ prop: "bushColor",
+ minWidth: "100px",
+ width: "100px",
+ },
+ {
+ label: "鍏夌氦甯︾紪鍙�",
+ prop: "code",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "鍏夌氦鑹叉爣",
+ prop: "color",
+ minWidth: "100px",
+ width: "100px",
+ },
+ {
+ label: "妫�楠岄」",
+ prop: "inspectionItem",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "妫�楠屽瓙椤�",
+ prop: "inspectionItemSubclass",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "妫�楠岀粨鏋�",
+ prop: "lastValue",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "缁撴灉鍒ゅ畾",
+ prop: "insResult",
+ minWidth: "100px",
+ width: "100px",
+ dataType: "tag",
+ formatData: (params) => {
+ let index = this.insResultList.findIndex(
+ (item) => item.value == params
+ );
+ if (index > -1) {
+ return this.insResultList[index].label;
+ } else {
+ return null;
+ }
+ },
+ formatType: (params) => {
+ let index = this.insResultList.findIndex(
+ (item) => item.value == params
+ );
+ if (index > -1) {
+ return this.insResultList[index].type;
+ } else {
+ return null;
+ }
+ },
+ },
+ {
+ label: "鍗曚綅",
+ prop: "unit",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "璇曢獙瑕佹眰",
+ prop: "tell",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "妫�楠屼汉",
+ prop: "checkName",
+ minWidth: "120px",
+ width: "120px",
+ },
+ {
+ label: "妫�楠屾棩鏈�",
+ prop: "checkTime",
+ minWidth: "140px",
+ width: "140px",
+ },
+ {
+ label: "鏍峰搧鍚嶇О",
+ prop: "sample",
+ minWidth: "160px",
+ width: "160px",
+ },
+ {
+ label: "鏍峰搧鍨嬪彿",
+ prop: "model",
+ minWidth: "160px",
+ width: "160px",
+ },
+ {
+ label: "璇曢獙瀹�",
+ prop: "sonLaboratory",
+ minWidth: "120px",
+ width: "120px",
+ },
+ ],
+ operatorConfig: {
+ fixed: "right",
+ label: "鎿嶄綔",
+ width: 80,
+ minWidth: 100,
+ },
+ operator: [
+ {
+ name: "鏌ョ湅",
+ type: "text",
+ clickFun: (row) => {},
+ showFun: (row) => {
+ console.log(row);
+ console.log(row.inspectionItem);
+ return (
+ row.inspectionItem == "鍗曟牴鍨傜洿鐕冪儳" ||
+ row.inspectionItem.includes("鏉惧绠�") ||
+ row.inspectionItemSubclass.includes("鏉惧绠�") ||
+ (row.inspectionItem == "鎶楁媺寮哄害" &&
+ (row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍓�" ||
+ row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍚�")) ||
+ (row.inspectionItem == "鏂浼搁暱鐜�" &&
+ (row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍓�" ||
+ row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍚�"))
+ );
+ },
+ },
+ ],
+ },
dataLookTableLoading: false,
- dataLookcolumn: [
+ dataLooktableData: [],
+ qrData: [],
+ multipleSelection: [],
+ sonLaboratoryList: [],
+ urgencyDictList: [],
+ tableHeight: 0,
+ tabList: [
{
- label: "濮旀墭缂栧彿",
- prop: "entrustCode",
- minWidth: "160px",
- width: "160px",
+ label: "寰呭鏍�",
+ value: 0,
},
{
- label: "鏍峰搧缂栧彿",
- prop: "sampleCode",
- minWidth: "160px",
- width: "160px",
+ label: "寰呮楠�",
+ value: 1,
},
{
- label: "绠″鑹叉爣",
- prop: "bushColor",
- minWidth: "160px",
- width: "160px",
+ label: "宸叉楠�",
+ value: 4,
},
{
- label: "鍏夌氦甯︾紪鍙�",
- prop: "code",
- minWidth: "160px",
- width: "160px",
+ label: "閫�鍥�",
+ value: 2,
},
{
- label: "鍏夌氦鑹叉爣",
- prop: "color",
- minWidth: "160px",
- width: "160px",
- },
- {
- label: "妫�楠岄」",
- prop: "inspectionItem",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "妫�楠屽瓙椤�",
- prop: "inspectionItemSubclass",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "妫�楠岀粨鏋�",
- prop: "lastValue",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "缁撴灉鍒ゅ畾",
- prop: "insResult",
- minWidth: "100px",
- width: "100px",
- dataType: "tag",
- formatData: (params) => {
- let index = this.urgencyDictList.findIndex(
- (item) => item.dictValue == params
- );
- if (index > -1) {
- return this.urgencyDictList[index].dictLabel;
- } else {
- return null;
- }
- },
- formatType: (params) => {
- let index = this.urgencyDictList.findIndex(
- (item) => item.dictValue == params
- );
- if (index > -1) {
- return this.urgencyDictList[index].listClass;
- } else {
- return null;
- }
- },
- },
- {
- label: "鍗曚綅",
- prop: "unit",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "璇曢獙瑕佹眰",
- prop: "tell",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "妫�楠屼汉",
- prop: "checkName",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "妫�楠屾棩鏈�",
- prop: "checkTime",
- minWidth: "120px",
- width: "120px",
- },
- {
- label: "鏍峰搧鍚嶇О",
- prop: "sample",
- minWidth: "160px",
- width: "160px",
- },
- {
- label: "鏍峰搧鍨嬪彿",
- prop: "model",
- minWidth: "160px",
- width: "160px",
- },
- {
- label: "璇曢獙瀹�",
- prop: "sonLaboratory",
- minWidth: "120px",
- width: "120px",
- },
- {
- dataType: "action",
- fixed: "right",
- label: "鎿嶄綔",
- operation: [
- {
- name: "鏌ョ湅",
- type: "text",
- clickFun: (row) => {},
- showHide: (row) => {
- console.log(row);
- console.log(row.inspectionItem);
- return (
- row.inspectionItem == "鍗曟牴鍨傜洿鐕冪儳" ||
- row.inspectionItem.includes("鏉惧绠�") ||
- row.inspectionItemSubclass.includes("鏉惧绠�") ||
- (row.inspectionItem == "鎶楁媺寮哄害" &&
- (row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍓�" ||
- row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍚�")) ||
- (row.inspectionItem == "鏂浼搁暱鐜�" &&
- (row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍓�" ||
- row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍚�"))
- );
- },
- },
- ],
+ label: "鎾ら攢",
+ value: 3,
},
],
- dataLooktableData: [],
+ insResultList: [
+ {
+ value: 1,
+ label: "鍚堟牸",
+ type: "success",
+ },
+ {
+ value: 0,
+ label: "涓嶅悎鏍�",
+ type: "danger",
+ },
+ {
+ value: 3,
+ label: "涓嶅垽瀹�",
+ type: "",
+ },
+ ],
+ tabIndex: 0,
+ active: 0, //1锛氫笅鍗曪紝2锛氭煡鐪嬶紝3锛氬鏍革紝4锛氬厜绾ら厤缃�,榛樿涓�0
+ currentId: null,
+ more: false,
//old
tableHeader: [],
@@ -1255,292 +1311,11 @@
// 浜哄憳鍒楄〃
personList: [],
currentTableData: [],
- // componentData: {
- // entity: {
- // entrustCode: null,
- // sample: null,
- // sampleName: null,
- // sampleModel: null,
- // sampleCode: null,
- // outEntrustCode: null,
- // state: 0,
- // name: null,
- // engineering: null,
- // production: null,
- // startAndEndTime: [],
- // // orderBy: {
- // // field: '',
- // // order: ''
- // // }
- // },
- // isIndex: true,
- // showSelect: true,
- // select: true,
- // selectMethod: "selectMethod",
- // do: [
- // {
- // id: "dataLook",
- // font: "鏁版嵁鏌ョ湅",
- // type: "text",
- // method: "handleDataLook",
- // disabFun: (row, index) => {
- // return row.state != 1 && row.state != 4;
- // },
- // },
- // {
- // id: "download",
- // font: "鎶ュ憡涓嬭浇",
- // type: "text",
- // method: "download",
- // disabFun: (row, index) => {
- // return row.state != 4 || row.isRatify != 1;
- // },
- // },
- // {
- // id: "verify",
- // font: "瀹℃牳",
- // type: "text",
- // method: "handleVerify",
- // disabFun: (row, index) => {
- // return row.state != 0;
- // },
- // },
- // {
- // id: "quash",
- // font: "鎾ら攢",
- // type: "text",
- // method: "handlEquash",
- // disabFun: (row, index) => {
- // return row.state != 1 && row.state != 0;
- // },
- // },
- // {
- // id: "quashCheck",
- // font: "鎾ら攢瀹℃牳",
- // type: "text",
- // method: "handlEquashCheck",
- // disabFun: (row, index) => {
- // return (
- // (row.state != 1 && row.state != 0) ||
- // this.tabIndex != 1 ||
- // row.isRevocation != 1
- // );
- // },
- // },
- // {
- // font: "鍒嗛厤",
- // type: "text",
- // method: "handleIssued",
- // disabFun: (row, index) => {
- // return (
- // row.state != 1 ||
- // (row.entrustCode != null &&
- // Number(row.assign) > 0 &&
- // row.inspectId != null)
- // );
- // },
- // },
- // ],
- // linkEvent: {
- // sampleName: {
- // method: "selectAllByOne",
- // },
- // },
- // tagField: {
- // type: {
- // select: [],
- // },
- // createUser: {
- // select: [],
- // },
- // orderType: {
- // select: [],
- // },
- // processing: {
- // select: [
- // {
- // value: 1,
- // label: "瀹為獙瀹ゅ鐞�",
- // },
- // {
- // value: 0,
- // label: "濮旀墭鍗曚綅鍙栧洖",
- // },
- // ],
- // },
- // isLeave: {
- // select: [
- // {
- // value: 1,
- // label: "鐣欐牱",
- // },
- // {
- // value: 0,
- // label: "涓嶇暀鏍�",
- // },
- // ],
- // },
- // send: {
- // select: [
- // {
- // value: 1,
- // label: "鑷彇",
- // },
- // {
- // value: 0,
- // label: "鍏朵粬",
- // },
- // ],
- // },
- // },
- // selectField: {},
- // requiredAdd: [],
- // requiredUp: [],
- // needSort: ["createTime", "sendTime", "type", "appointed"],
- // },
orderId: "",
revocationInsProductIds: "",
- // componentDataDataLook: {
- // isPage: false,
- // entity: {
- // id: 0,
- // orderBy: {
- // field: "sampleCode",
- // order: "asc",
- // },
- // },
- // isIndex: false,
- // showSelect: false,
- // select: false,
- // do: [
- // {
- // id: "",
- // font: "鏌ョ湅",
- // type: "text",
- // method: "viewDetails",
- // showFun: (row, index) => {
- // return (
- // row.inspectionItem == "鍗曟牴鍨傜洿鐕冪儳" ||
- // row.inspectionItem.includes("鏉惧绠�") ||
- // row.inspectionItemSubclass.includes("鏉惧绠�") ||
- // (row.inspectionItem == "鎶楁媺寮哄害" &&
- // (row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍓�" ||
- // row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍚�")) ||
- // (row.inspectionItem == "鏂浼搁暱鐜�" &&
- // (row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍓�" ||
- // row.inspectionItemSubclass == "鐑�佸寲澶勭悊鍚�"))
- // );
- // },
- // },
- // ],
- // tagField: {
- // insState: {
- // select: [],
- // },
- // insResult: {
- // select: [
- // {
- // value: 1,
- // label: "鍚堟牸",
- // type: "success",
- // },
- // {
- // value: 0,
- // label: "涓嶅悎鏍�",
- // type: "danger",
- // },
- // {
- // value: 3,
- // label: "涓嶅垽瀹�",
- // type: "",
- // },
- // ],
- // },
- // },
- // selectField: {},
- // spanConfig: {
- // rows: [
- // // {
- // // name: "entrustCode",
- // // index: 0,
- // // },
- // // {
- // // name: "sampleCode",
- // // index: 1,
- // // },
- // ],
- // },
- // requiredAdd: [],
- // requiredUp: [],
- // },
- // componentDataDelete: {
- // entity: {
- // // orderId: '',
- // // orderBy: {
- // // field: 'sampleCode',
- // // order: 'asc'
- // // }
- // },
- // isPage: false,
- // isIndex: false,
- // showSelect: true,
- // select: true,
- // selectMethod: "selectDelete",
- // do: [],
- // tagField: {
- // insState: {
- // select: [],
- // },
- // insResult: {
- // select: [
- // {
- // value: 1,
- // label: "鍚堟牸",
- // type: "success",
- // },
- // {
- // value: 0,
- // label: "涓嶅悎鏍�",
- // type: "danger",
- // },
- // ],
- // },
- // },
- // selectField: {},
- // spanConfig: {},
- // requiredAdd: [],
- // requiredUp: [],
- // },
deleteDialogVisible: false,
- entityCopy: {},
- upIndex: 0,
upLoad: false,
- tabList: [
- {
- label: "寰呭鏍�",
- value: 0,
- },
- {
- label: "寰呮楠�",
- value: 1,
- },
- {
- label: "宸叉楠�",
- value: 4,
- },
- {
- label: "閫�鍥�",
- value: 2,
- },
- {
- label: "鎾ら攢",
- value: 3,
- },
- ],
- tabIndex: 0,
- active: 0, //1锛氫笅鍗曪紝2锛氭煡鐪嬶紝3锛氬鏍革紝4锛氬厜绾ら厤缃�,榛樿涓�0
- currentId: null,
- more: false,
+
insOrderRow: {},
checkIndexList: [],
checkDataList: [
@@ -1548,12 +1323,6 @@
sampleCode: "",
},
],
- qrData: [],
- multipleSelection: [],
- sonLaboratoryList: [],
- queryCount: 0,
- urgencyDictList: [],
- tableHeight: 0,
};
},
created() {
@@ -1820,32 +1589,8 @@
this.getLabelPrinting(selection);
this.printDialogVisible = true;
},
- // 閫夋嫨妫�楠屽垎閰嶄汉鍛�
- getAuthorizedPerson() {
- this.$axios.get(this.$api.user.getLaboratoryPersonList).then((res) => {
- // let data = [];
- // res.data.forEach((a) => {
- // data.push({
- // label: a.name,
- // value: a.id,
- // });
- // });
- this.personList = res.data;
- });
- },
refreshTable() {
this.getList();
- },
- getTableData(newData) {
- if (newData && newData.length == 1) {
- const insState = newData[0].state;
- this.tabList.forEach((ele, index) => {
- if (ele.value == insState && this.queryCount == 0) {
- this.handleTab(ele, index);
- this.queryCount = 1;
- }
- });
- }
},
refresh() {
this.queryParams = {
--
Gitblit v1.9.3