|
|
@@ -2,7 +2,11 @@
|
|
|
<div class="ele-body">
|
|
|
<el-card shadow="never">
|
|
|
<!-- <search ref="search" @search="reload"></search> -->
|
|
|
- <seek-page :seekList="seekList" @search="search" :keyValue="'qms-inspectionPlan-index-search'"></seek-page>
|
|
|
+ <seek-page
|
|
|
+ :seekList="seekList"
|
|
|
+ @search="search"
|
|
|
+ :keyValue="'qms-inspectionPlan-index-search'"
|
|
|
+ ></seek-page>
|
|
|
|
|
|
<ele-pro-table
|
|
|
ref="tableRef"
|
|
|
@@ -108,353 +112,376 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import search from './components/search.vue';
|
|
|
-// import edit from './components/edit.vue';
|
|
|
-import edit from './components/new-edit.vue';
|
|
|
-import {
|
|
|
- getList,
|
|
|
- removeItem,
|
|
|
- closePlan,
|
|
|
- retractPlan
|
|
|
-} from '@/api/inspectionPlan';
|
|
|
-import dictMixins from '@/mixins/dictMixins';
|
|
|
-import { getFile } from '@/api/system/file';
|
|
|
-import { getByCode } from '@/api/system/dictionary-data';
|
|
|
-import { queryTodo } from '@/api/bpm/task';
|
|
|
+ import search from './components/search.vue';
|
|
|
+ // import edit from './components/edit.vue';
|
|
|
+ import edit from './components/new-edit.vue';
|
|
|
+ import {
|
|
|
+ getList,
|
|
|
+ removeItem,
|
|
|
+ closePlan,
|
|
|
+ retractPlan
|
|
|
+ } from '@/api/inspectionPlan';
|
|
|
+ import dictMixins from '@/mixins/dictMixins';
|
|
|
+ import { getFile } from '@/api/system/file';
|
|
|
+ import { getByCode } from '@/api/system/dictionary-data';
|
|
|
+ import { queryTodo } from '@/api/bpm/task';
|
|
|
+ import { recordingMethodList } from '@/utils/util.js';
|
|
|
|
|
|
-import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
-export default {
|
|
|
- mixins: [dictMixins, tabMixins],
|
|
|
- components: {
|
|
|
- search,
|
|
|
- edit
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- cacheKeyUrl: 'qsm-c2e9664a-inspectionPlan',
|
|
|
- columns: [
|
|
|
- {
|
|
|
- columnKey: 'index',
|
|
|
- label: '序号',
|
|
|
- type: 'index',
|
|
|
- width: 55,
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- fixed: 'left'
|
|
|
- },
|
|
|
+ import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
+ export default {
|
|
|
+ mixins: [dictMixins, tabMixins],
|
|
|
+ components: {
|
|
|
+ search,
|
|
|
+ edit
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ cacheKeyUrl: 'qsm-c2e9664a-inspectionPlan',
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- prop: 'code',
|
|
|
- slot: 'code',
|
|
|
- label: '质检计划编码',
|
|
|
- width: 160,
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- fixed: 'left'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '质检计划名称',
|
|
|
- prop: 'name',
|
|
|
- width: 160,
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- fixed: 'left'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '来源单据编码',
|
|
|
- prop: 'planSourceCode',
|
|
|
- width: 160,
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'productCode',
|
|
|
- width: 120,
|
|
|
- label: '编码',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'productName',
|
|
|
- width: 120,
|
|
|
- label: '名称',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'batchNo',
|
|
|
- label: '批次号',
|
|
|
- width: 160,
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '类型',
|
|
|
- prop: 'type',
|
|
|
- slot: 'type',
|
|
|
- width: 120,
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '检验方式',
|
|
|
- prop: 'qualityMode',
|
|
|
- slot: 'qualityMode',
|
|
|
- width: 120,
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '自动派单',
|
|
|
- prop: 'autoOrder',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- formatter: (row, column, cellValue) => {
|
|
|
- return cellValue == 1 ? '是' : '否';
|
|
|
- }
|
|
|
- },
|
|
|
- // {
|
|
|
- // prop: 'productName',
|
|
|
- // label: '产品名称',
|
|
|
- // },
|
|
|
- // {
|
|
|
- // prop: 'productCode',
|
|
|
- // label: '产品编码',
|
|
|
- // },
|
|
|
- // {
|
|
|
- // prop: 'specification',
|
|
|
- // label: '规格',
|
|
|
- // },
|
|
|
- // {
|
|
|
- // prop: 'brandNo',
|
|
|
- // label: '牌号',
|
|
|
- // },
|
|
|
+ {
|
|
|
+ prop: 'code',
|
|
|
+ slot: 'code',
|
|
|
+ label: '质检计划编码',
|
|
|
+ width: 160,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '质检计划名称',
|
|
|
+ prop: 'name',
|
|
|
+ width: 160,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '来源单据编码',
|
|
|
+ prop: 'planSourceCode',
|
|
|
+ width: 160,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'productCode',
|
|
|
+ width: 120,
|
|
|
+ label: '编码',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'productName',
|
|
|
+ width: 120,
|
|
|
+ label: '名称',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'batchNo',
|
|
|
+ label: '批次号',
|
|
|
+ width: 160,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '类型',
|
|
|
+ prop: 'type',
|
|
|
+ slot: 'type',
|
|
|
+ width: 120,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '检验方式',
|
|
|
+ prop: 'qualityMode',
|
|
|
+ slot: 'qualityMode',
|
|
|
+ width: 120,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // prop: 'recordingMethod',
|
|
|
+ // label: '记录方法',
|
|
|
+ // align: 'center',
|
|
|
+ // formatter: (row) => {
|
|
|
+ // return (
|
|
|
+ // recordingMethodList.find(
|
|
|
+ // (item) => item.value == row.recordingMethod
|
|
|
+ // )?.label || ''
|
|
|
+ // );
|
|
|
+ // },
|
|
|
+ // width: 130,
|
|
|
+ // showOverflowTooltip: true
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ label: '自动派单',
|
|
|
+ prop: 'autoOrder',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ formatter: (row, column, cellValue) => {
|
|
|
+ return cellValue == 1 ? '是' : '否';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // prop: 'productName',
|
|
|
+ // label: '产品名称',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: 'productCode',
|
|
|
+ // label: '产品编码',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: 'specification',
|
|
|
+ // label: '规格',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: 'brandNo',
|
|
|
+ // label: '牌号',
|
|
|
+ // },
|
|
|
|
|
|
- // {
|
|
|
- // prop: 'productNumber',
|
|
|
- // label: '数量',
|
|
|
- // width: 60
|
|
|
- // },
|
|
|
+ // {
|
|
|
+ // prop: 'productNumber',
|
|
|
+ // label: '数量',
|
|
|
+ // width: 60
|
|
|
+ // },
|
|
|
|
|
|
- {
|
|
|
- label: '执行部门',
|
|
|
- prop: 'groupName',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '执行人',
|
|
|
- prop: 'executeName',
|
|
|
- align: 'center',
|
|
|
- width: 120,
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '创建时间',
|
|
|
- prop: 'createTime',
|
|
|
- align: 'center',
|
|
|
- width: 120,
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '开始时间',
|
|
|
- prop: 'planStartTime',
|
|
|
- align: 'center',
|
|
|
- width: 120,
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '结束时间',
|
|
|
- prop: 'planEndTime',
|
|
|
- align: 'center',
|
|
|
- width: 120,
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- // {
|
|
|
- // label: '附件',
|
|
|
- // prop: 'accessory',
|
|
|
- // slot: 'accessory',
|
|
|
- // align: 'center',
|
|
|
- // width: 120,
|
|
|
- // showOverflowTooltip: true
|
|
|
- // },
|
|
|
- {
|
|
|
- label: '状态',
|
|
|
- prop: 'status',
|
|
|
- width: 70,
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- formatter: (row, column, cellValue) => {
|
|
|
- return this.getDictName('质检计划状态', cellValue);
|
|
|
- }
|
|
|
- },
|
|
|
+ {
|
|
|
+ label: '执行部门',
|
|
|
+ prop: 'groupName',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '执行人',
|
|
|
+ prop: 'executeName',
|
|
|
+ align: 'center',
|
|
|
+ width: 120,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '创建时间',
|
|
|
+ prop: 'createTime',
|
|
|
+ align: 'center',
|
|
|
+ width: 120,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '开始时间',
|
|
|
+ prop: 'planStartTime',
|
|
|
+ align: 'center',
|
|
|
+ width: 120,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '结束时间',
|
|
|
+ prop: 'planEndTime',
|
|
|
+ align: 'center',
|
|
|
+ width: 120,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // label: '附件',
|
|
|
+ // prop: 'accessory',
|
|
|
+ // slot: 'accessory',
|
|
|
+ // align: 'center',
|
|
|
+ // width: 120,
|
|
|
+ // showOverflowTooltip: true
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ label: '状态',
|
|
|
+ prop: 'status',
|
|
|
+ width: 70,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ formatter: (row, column, cellValue) => {
|
|
|
+ return this.getDictName('质检计划状态', cellValue);
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- columnKey: 'action',
|
|
|
- label: '操作',
|
|
|
- width: 200,
|
|
|
- align: 'center',
|
|
|
- resizable: false,
|
|
|
- slot: 'action',
|
|
|
- showOverflowTooltip: true,
|
|
|
- fixed: 'right'
|
|
|
- }
|
|
|
- ],
|
|
|
- typeList: [], //类型列表
|
|
|
- qualityMode: []
|
|
|
- };
|
|
|
- },
|
|
|
- computed: {
|
|
|
- seekList() {
|
|
|
- return [
|
|
|
- {
|
|
|
- label: '计划编码:',
|
|
|
- value: 'code',
|
|
|
- type: 'input',
|
|
|
- placeholder: ''
|
|
|
- },
|
|
|
- {
|
|
|
- label: '计划名称:',
|
|
|
- value: 'name',
|
|
|
- type: 'input',
|
|
|
- placeholder: ''
|
|
|
- },
|
|
|
- {
|
|
|
- label: '来源单据编码:',
|
|
|
- value: 'planSourceCode',
|
|
|
- type: 'input',
|
|
|
- placeholder: ''
|
|
|
- },
|
|
|
- {
|
|
|
- label: '编码',
|
|
|
- value: 'productCode',
|
|
|
- type: 'input',
|
|
|
- placeholder: '',
|
|
|
- width: 240
|
|
|
- },
|
|
|
- {
|
|
|
- label: '名称',
|
|
|
- value: 'productName',
|
|
|
- type: 'input',
|
|
|
- placeholder: '',
|
|
|
- width: 240
|
|
|
- },
|
|
|
- {
|
|
|
- label: '类型:',
|
|
|
- value: 'type',
|
|
|
- type: 'select',
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 200,
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ slot: 'action',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'right'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ typeList: [], //类型列表
|
|
|
+ qualityMode: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ seekList() {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ label: '计划编码:',
|
|
|
+ value: 'code',
|
|
|
+ type: 'input',
|
|
|
+ placeholder: ''
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '计划名称:',
|
|
|
+ value: 'name',
|
|
|
+ type: 'input',
|
|
|
+ placeholder: ''
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '来源单据编码:',
|
|
|
+ value: 'planSourceCode',
|
|
|
+ type: 'input',
|
|
|
+ placeholder: ''
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '编码',
|
|
|
+ value: 'productCode',
|
|
|
+ type: 'input',
|
|
|
+ placeholder: '',
|
|
|
+ width: 240
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '名称',
|
|
|
+ value: 'productName',
|
|
|
+ type: 'input',
|
|
|
+ placeholder: '',
|
|
|
+ width: 240
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '类型:',
|
|
|
+ value: 'type',
|
|
|
+ type: 'select',
|
|
|
|
|
|
- placeholder: '',
|
|
|
- width: 240,
|
|
|
- // 加载状态
|
|
|
- planList: this.typeList
|
|
|
- },
|
|
|
- {
|
|
|
- label: '检验方式:',
|
|
|
- value: 'qualityMode',
|
|
|
- type: 'select',
|
|
|
+ placeholder: '',
|
|
|
+ width: 240,
|
|
|
+ // 加载状态
|
|
|
+ planList: this.typeList
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '检验方式:',
|
|
|
+ value: 'qualityMode',
|
|
|
+ type: 'select',
|
|
|
|
|
|
- placeholder: '',
|
|
|
- width: 240,
|
|
|
- planList: this.qualityMode
|
|
|
- }
|
|
|
- ];
|
|
|
- }
|
|
|
- },
|
|
|
- created() {
|
|
|
- this.requestDict('质检计划类型');
|
|
|
- this.requestDict('取样类型');
|
|
|
- this.requestDict('质检计划状态');
|
|
|
- this.getTnspectionPlanType();
|
|
|
- this.getQualityMethodCode();
|
|
|
- },
|
|
|
- methods: {
|
|
|
- // datasource({ page, limit, where }) {
|
|
|
- // return getList({
|
|
|
- // ...where,
|
|
|
- // pageNum: page,
|
|
|
- // size: limit
|
|
|
- // });
|
|
|
- // },
|
|
|
-
|
|
|
- async datasource({ page, where, limit }) {
|
|
|
- try {
|
|
|
- await queryTodo({});
|
|
|
- } catch (err) {
|
|
|
- console.error('调用queryTodo失败:', err);
|
|
|
- }
|
|
|
-
|
|
|
- return getList({
|
|
|
- ...where,
|
|
|
- pageNum: page,
|
|
|
- size: limit
|
|
|
- });
|
|
|
- },
|
|
|
- search(e) {
|
|
|
- if (Array.isArray(e.createTime) && e.createTime.length) {
|
|
|
- e.createTimeStart = e.createTime[0];
|
|
|
- e.createTimeEnd = e.createTime[1];
|
|
|
+ placeholder: '',
|
|
|
+ width: 240,
|
|
|
+ planList: this.qualityMode
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // label: '记录方法:',
|
|
|
+ // value: 'recordingMethod',
|
|
|
+ // type: 'select',
|
|
|
+ // placeholder: '',
|
|
|
+ // width: 240,
|
|
|
+ // planList: recordingMethodList
|
|
|
+ // }
|
|
|
+ ];
|
|
|
}
|
|
|
- this.reload(e);
|
|
|
- },
|
|
|
- openEdit(type, row) {
|
|
|
- console.log(row);
|
|
|
- this.$refs.edit.open(type, row);
|
|
|
- },
|
|
|
- downloadFile(file) {
|
|
|
- getFile({ objectName: file.storePath }, file.name);
|
|
|
},
|
|
|
- remove(row) {
|
|
|
- removeItem([row.id])
|
|
|
- .then((message) => {
|
|
|
- this.$message.success(message);
|
|
|
- this.reload();
|
|
|
- })
|
|
|
- .catch((e) => {});
|
|
|
- },
|
|
|
- async retract(row) {
|
|
|
- await retractPlan(row);
|
|
|
- this.reload();
|
|
|
- },
|
|
|
- async close(row) {
|
|
|
- console.log(row);
|
|
|
- await closePlan(row);
|
|
|
- this.reload();
|
|
|
- },
|
|
|
- reload(where) {
|
|
|
- this.$refs.tableRef.reload({ where });
|
|
|
+ created() {
|
|
|
+ this.requestDict('质检计划类型');
|
|
|
+ this.requestDict('取样类型');
|
|
|
+ this.requestDict('质检计划状态');
|
|
|
+ this.getTnspectionPlanType();
|
|
|
+ this.getQualityMethodCode();
|
|
|
},
|
|
|
+ methods: {
|
|
|
+ // datasource({ page, limit, where }) {
|
|
|
+ // return getList({
|
|
|
+ // ...where,
|
|
|
+ // pageNum: page,
|
|
|
+ // size: limit
|
|
|
+ // });
|
|
|
+ // },
|
|
|
|
|
|
- async getTnspectionPlanType() {
|
|
|
- let res = await getByCode('inspection_plan_type');
|
|
|
- if (res?.code == 0) {
|
|
|
- let list = res.data.map((item) => {
|
|
|
- let key = Object.keys(item)[0];
|
|
|
- return { value: key, label: item[key] };
|
|
|
+ async datasource({ page, where, limit }) {
|
|
|
+ try {
|
|
|
+ await queryTodo({});
|
|
|
+ } catch (err) {
|
|
|
+ console.error('调用queryTodo失败:', err);
|
|
|
+ }
|
|
|
+
|
|
|
+ return getList({
|
|
|
+ ...where,
|
|
|
+ pageNum: page,
|
|
|
+ size: limit
|
|
|
});
|
|
|
- this.typeList = list;
|
|
|
- }
|
|
|
- },
|
|
|
+ },
|
|
|
+ search(e) {
|
|
|
+ if (Array.isArray(e.createTime) && e.createTime.length) {
|
|
|
+ e.createTimeStart = e.createTime[0];
|
|
|
+ e.createTimeEnd = e.createTime[1];
|
|
|
+ }
|
|
|
+ this.reload(e);
|
|
|
+ },
|
|
|
+ openEdit(type, row) {
|
|
|
+ console.log(row);
|
|
|
+ this.$refs.edit.open(type, row);
|
|
|
+ },
|
|
|
+ downloadFile(file) {
|
|
|
+ getFile({ objectName: file.storePath }, file.name);
|
|
|
+ },
|
|
|
+ remove(row) {
|
|
|
+ removeItem([row.id])
|
|
|
+ .then((message) => {
|
|
|
+ this.$message.success(message);
|
|
|
+ this.reload();
|
|
|
+ })
|
|
|
+ .catch((e) => {});
|
|
|
+ },
|
|
|
+ async retract(row) {
|
|
|
+ await retractPlan(row);
|
|
|
+ this.reload();
|
|
|
+ },
|
|
|
+ async close(row) {
|
|
|
+ console.log(row);
|
|
|
+ await closePlan(row);
|
|
|
+ this.reload();
|
|
|
+ },
|
|
|
+ reload(where) {
|
|
|
+ this.$refs.tableRef.reload({ where });
|
|
|
+ },
|
|
|
+
|
|
|
+ async getTnspectionPlanType() {
|
|
|
+ let res = await getByCode('inspection_plan_type');
|
|
|
+ if (res?.code == 0) {
|
|
|
+ let list = res.data.map((item) => {
|
|
|
+ let key = Object.keys(item)[0];
|
|
|
+ return { value: key, label: item[key] };
|
|
|
+ });
|
|
|
+ this.typeList = list;
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
- async getQualityMethodCode() {
|
|
|
- let res = await getByCode('quality_method_code');
|
|
|
- if (res?.code == 0) {
|
|
|
- let list = res.data.map((item) => {
|
|
|
- let key = Object.keys(item)[0];
|
|
|
- return { value: key, label: item[key] };
|
|
|
+ async getQualityMethodCode() {
|
|
|
+ let res = await getByCode('quality_method_code');
|
|
|
+ if (res?.code == 0) {
|
|
|
+ let list = res.data.map((item) => {
|
|
|
+ let key = Object.keys(item)[0];
|
|
|
+ return { value: key, label: item[key] };
|
|
|
+ });
|
|
|
+ this.qualityMode = list;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 打开详情
|
|
|
+ openDetails(row) {
|
|
|
+ console.log(row, 'row 000');
|
|
|
+ let id = row.id;
|
|
|
+ this.$router.push({
|
|
|
+ path: '/inspectionWork/details',
|
|
|
+ query: { id, path: '/inspectionPlan', name: '计划' }
|
|
|
});
|
|
|
- this.qualityMode = list;
|
|
|
}
|
|
|
- },
|
|
|
- // 打开详情
|
|
|
- openDetails(row) {
|
|
|
- console.log(row, 'row 000');
|
|
|
- let id = row.id;
|
|
|
- this.$router.push({
|
|
|
- path: '/inspectionWork/details',
|
|
|
- query: { id, path: '/inspectionPlan', name: '计划' }
|
|
|
- });
|
|
|
}
|
|
|
- }
|
|
|
-};
|
|
|
+ };
|
|
|
</script>
|