This commit is contained in:
helloDy
2024-04-11 16:49:48 +08:00
parent 2592551e66
commit 63a753d7d6
32 changed files with 284 additions and 219 deletions

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-03-21 15:21:32
* @LastEditTime: 2024-04-11 16:22:19
* @Description:
-->
<template>
@@ -121,15 +121,15 @@
</el-row>
</el-form>
</div>
<div class="attr-list" v-if="idAttrShow">
<div class="attr-list" v-if="idAttrShow && this.$auth.hasPermi('base:material-attr:query')">
<small-title
style="margin: 16px 0; padding-left: 8px"
:no-padding="true">
物料属性
</small-title>
<div v-if="!isdetail" class="action_btn">
<div v-if="!isdetail && this.$auth.hasPermi('base:material-attr:create')" class="action_btn">
<template>
<span style="display: inline-block;">
<el-button type="text" @click="addNew()" icon="el-icon-plus">新增</el-button>
@@ -182,16 +182,23 @@ import { parseTime } from '../../core/mixins/code-filter';
import attrAdd from './attr-add';
import { getDictDatas } from "@/utils/dict";
const tableBtn = [
{
type: 'edit',
btnName: '编辑',
},
{
type: 'delete',
btnName: '删除',
},
];
// const tableBtn = [
// this.$auth.hasPermiAnd([
// 'base:material-attr:create',
// 'base:material-attr:update'
// ]) ?
// {
// type: 'edit',
// btnName: '编辑',
// }
// : undefined,
// this.$auth.hasPermi('base:material-attr:delete') ?
// {
// type: 'delete',
// btnName: '删除',
// }
// : undefined,
// ];
const tableProps = [
{
prop: 'createTime',
@@ -213,7 +220,23 @@ export default {
components: { SmallTitle, attrAdd },
data() {
return {
tableBtn,
tableBtn: [
this.$auth.hasPermiAnd([
'base:material-attr:create',
'base:material-attr:update'
]) ?
{
type: 'edit',
btnName: '编辑',
}
: undefined,
this.$auth.hasPermi('base:material-attr:delete') ?
{
type: 'delete',
btnName: '删除',
}
: undefined,
],
tableProps,
addOrUpdateVisible: false,
urlOptions: {