Merge branch 'test' into dy
This commit is contained in:
@@ -139,6 +139,12 @@ export default {
|
||||
btnName: '删除',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi(`base:equipment:update`)
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
}
|
||||
: undefined,
|
||||
].filter((v) => v),
|
||||
tableProps: [
|
||||
{
|
||||
@@ -153,32 +159,32 @@ export default {
|
||||
{ prop: 'equipmentType', label: '设备类型' },
|
||||
{ prop: 'enName', label: '英文名称' },
|
||||
{ prop: 'abbr', label: '缩写' },
|
||||
{
|
||||
action: 'show-detail',
|
||||
label: '详情',
|
||||
subcomponent: {
|
||||
props: ['injectData'],
|
||||
render: function (h) {
|
||||
const _this = this;
|
||||
return h(
|
||||
'el-button',
|
||||
{
|
||||
props: { type: 'text', size: 'mini' },
|
||||
on: {
|
||||
click: function () {
|
||||
console.log('inejctdata', _this.injectData);
|
||||
_this.$emit('emitData', {
|
||||
action: _this.injectData.action,
|
||||
value: _this.injectData.id,
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
'查看详情'
|
||||
);
|
||||
},
|
||||
},
|
||||
},
|
||||
// {
|
||||
// action: 'show-detail',
|
||||
// label: '详情',
|
||||
// subcomponent: {
|
||||
// props: ['injectData'],
|
||||
// render: function (h) {
|
||||
// const _this = this;
|
||||
// return h(
|
||||
// 'el-button',
|
||||
// {
|
||||
// props: { type: 'text', size: 'mini' },
|
||||
// on: {
|
||||
// click: function () {
|
||||
// console.log('inejctdata', _this.injectData);
|
||||
// _this.$emit('emitData', {
|
||||
// action: _this.injectData.action,
|
||||
// value: _this.injectData.id,
|
||||
// });
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// '查看详情'
|
||||
// );
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
],
|
||||
searchBarFormConfig: [
|
||||
{
|
||||
@@ -532,6 +538,10 @@ export default {
|
||||
case 'delete':
|
||||
this.handleDelete(data);
|
||||
break;
|
||||
case 'detail':
|
||||
const { id } = data;
|
||||
this.viewDetail(id);
|
||||
break;
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user