|
|
@@ -9,7 +9,6 @@
|
|
|
append-to-body
|
|
|
width="80%"
|
|
|
:maxable="true"
|
|
|
-
|
|
|
>
|
|
|
<div class="ele-body">
|
|
|
<el-card shadow="never" v-loading="loading">
|
|
|
@@ -39,7 +38,7 @@
|
|
|
height="calc(100vh - 405px)"
|
|
|
full-height="calc(100vh - 116px)"
|
|
|
tool-class="ele-toolbar-form"
|
|
|
- row-key="qualityLevelId"
|
|
|
+ row-key="inspectionCode"
|
|
|
:selection.sync="selection"
|
|
|
@columns-change="handleColumnChange"
|
|
|
:cache-key="cacheKeyUrl"
|
|
|
@@ -120,17 +119,17 @@
|
|
|
import { pageByBom } from '@/api/inspectionTemplate/index.js';
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
|
|
|
-import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
+ import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
export default {
|
|
|
- mixins: [dictMixins,tabMixins],
|
|
|
+ mixins: [dictMixins, tabMixins],
|
|
|
components: {
|
|
|
AssetTree,
|
|
|
userSearch
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- cacheKeyUrl: 'qms-c2e9664a-inspectionTemplate-inspectionClassify',
|
|
|
- columnsVersion: 1,
|
|
|
+ cacheKeyUrl: 'qms-c2e9664a-inspectionTemplate-inspectionClassify',
|
|
|
+ columnsVersion: 1,
|
|
|
// 加载状态
|
|
|
loading: false,
|
|
|
// 表格选中数据
|
|
|
@@ -138,14 +137,17 @@ import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
current: null,
|
|
|
rootId: '12',
|
|
|
visible: false,
|
|
|
-
|
|
|
+ disabledId: [],
|
|
|
columns: [
|
|
|
{
|
|
|
width: 45,
|
|
|
type: 'selection',
|
|
|
columnKey: 'selection',
|
|
|
align: 'center',
|
|
|
- reserveSelection: true
|
|
|
+ reserveSelection: true,
|
|
|
+ selectable: (row) => {
|
|
|
+ return !this.disabledId.includes(row.inspectionCode);
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
{
|
|
|
@@ -213,7 +215,7 @@ import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
align: 'center',
|
|
|
minWidth: 110
|
|
|
},
|
|
|
- {
|
|
|
+ {
|
|
|
prop: 'standardCode',
|
|
|
label: '标准代码',
|
|
|
align: 'center',
|
|
|
@@ -293,11 +295,12 @@ import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
|
|
|
open(list) {
|
|
|
this.visible = true;
|
|
|
- this.$nextTick(() => {
|
|
|
- list.forEach((item) => {
|
|
|
- this.$refs.table && this.$refs.table.toggleRowSelection(item, true);
|
|
|
- });
|
|
|
- });
|
|
|
+ this.disabledId = list.map((item) => item.inspectionCode);
|
|
|
+ // this.$nextTick(() => {
|
|
|
+ // list.forEach((item) => {
|
|
|
+ // this.$refs.table && this.$refs.table.toggleRowSelection(item, true);
|
|
|
+ // });
|
|
|
+ // });
|
|
|
},
|
|
|
|
|
|
handleClose() {
|