diff --git a/src/views/quality/base/qualityInspectionDet/index.vue b/src/views/quality/base/qualityInspectionDet/index.vue index 64d263e1..d6aa3a15 100644 --- a/src/views/quality/base/qualityInspectionDet/index.vue +++ b/src/views/quality/base/qualityInspectionDet/index.vue @@ -1,227 +1,308 @@ diff --git a/src/views/quality/base/qualityInspectionType/index.vue b/src/views/quality/base/qualityInspectionType/index.vue index 1a37636e..2b4f04d4 100644 --- a/src/views/quality/base/qualityInspectionType/index.vue +++ b/src/views/quality/base/qualityInspectionType/index.vue @@ -1,62 +1,26 @@ @@ -108,6 +68,16 @@ export default { components: {}, data() { return { + tableBtn: [ + { + type: 'edit', + btnName: '修改', + }, + { + type: 'delete', + btnName: '删除', + }, + ], tableData: [], tableProps: [ { @@ -120,42 +90,38 @@ export default { { prop: 'name', label: '检测类型名称', align: 'center' }, { prop: 'code', label: '检测类型编码', align: 'center' }, { prop: 'remark', label: '备注', align: 'center' }, - { - label: '操作', - alignt: 'center', - subcomponent: { - render: function (h) { - return h( - 'div', - null, - [ - h( - 'el-button', - { - props: { - icon: 'el-icon-edit', - size: 'mini', - type: 'text', - }, - }, - ' 修改' - ), - h( - 'el-button', - { - props: { - icon: 'el-icon-edit', - size: 'mini', - type: 'text', - }, - }, - ' 修改' - ), - ] - ); - }, - }, - }, + // { + // label: '操作', + // alignt: 'center', + // subcomponent: { + // render: function (h) { + // return h('div', null, [ + // h( + // 'el-button', + // { + // props: { + // icon: 'el-icon-edit', + // size: 'mini', + // type: 'text', + // }, + // }, + // ' 修改' + // ), + // h( + // 'el-button', + // { + // props: { + // icon: 'el-icon-edit', + // size: 'mini', + // type: 'text', + // }, + // }, + // ' 修改' + // ), + // ]); + // }, + // }, + // }, ], // 遮罩层 loading: true, @@ -201,11 +167,11 @@ export default { name: 'search', color: 'primary', }, - { - type: 'button', - btnName: '重置', - name: 'reset', - }, + // { + // type: 'button', + // btnName: '重置', + // name: 'reset', + // }, { type: this.$auth.hasPermi('base:quality-inspection-type:create') ? 'button' @@ -215,14 +181,14 @@ export default { plain: true, color: 'primary', }, - { - type: this.$auth.hasPermi('base:quality-inspection-type:export') - ? 'button' - : '', - btnName: '导出', - name: 'export', - color: 'warning', - }, + // { + // type: this.$auth.hasPermi('base:quality-inspection-type:export') + // ? 'button' + // : '', + // btnName: '导出', + // name: 'export', + // color: 'warning', + // }, ], }; }, @@ -230,10 +196,20 @@ export default { this.getList(); }, methods: { + /** base table related */ + handleTableBtnClick({ data, type }) { + switch (type) { + case 'edit': + this.handleUpdate(data); + break; + case 'delete': + this.handleDelete(data); + break; + } + }, /** search bar related */ handleSearchBarBtnClick(btn) { const keys = ['name']; - console.log('btn', btn); switch (btn.btnName) { case 'search': keys.forEach((key) => {