fix: edit button permission issue
This commit is contained in:
parent
6f0f34a33c
commit
c0df1d704a
|
@ -1637,7 +1637,7 @@ declare namespace API {
|
||||||
/** 产品名称 */
|
/** 产品名称 */
|
||||||
name?: string;
|
name?: string;
|
||||||
/** 产品规格 */
|
/** 产品规格 */
|
||||||
productSpecification: string;
|
productSpecification?: string;
|
||||||
/** 所属公司 */
|
/** 所属公司 */
|
||||||
companyId?: number;
|
companyId?: number;
|
||||||
/** 单位 */
|
/** 单位 */
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<a-button
|
<a-button
|
||||||
type="primary"
|
type="primary"
|
||||||
:disabled="!$auth('system:role:create')"
|
:disabled="!$auth('app:company:create')"
|
||||||
@click="openEditModal({})"
|
@click="openEditModal({})"
|
||||||
>
|
>
|
||||||
新增
|
新增
|
||||||
|
|
|
@ -1,21 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<div v-if="columns?.length">
|
<div v-if="columns?.length">
|
||||||
<DynamicTable
|
<DynamicTable row-key="id"
|
||||||
row-key="id"
|
|
||||||
header-title="产品管理"
|
header-title="产品管理"
|
||||||
title-tooltip=""
|
title-tooltip=""
|
||||||
:data-request="Api.product.productList"
|
:data-request="Api.product.productList"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:exportFileName="'产品'"
|
:exportFileName="'产品'"
|
||||||
bordered
|
bordered
|
||||||
size="small"
|
size="small">
|
||||||
>
|
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<a-button
|
<a-button type="primary"
|
||||||
type="primary"
|
:disabled="!$auth('app:product:create')"
|
||||||
:disabled="!$auth('system:role:create')"
|
@click="openEditModal({})">
|
||||||
@click="openEditModal({})"
|
|
||||||
>
|
|
||||||
新增
|
新增
|
||||||
</a-button>
|
</a-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<a-button
|
<a-button
|
||||||
type="primary"
|
type="primary"
|
||||||
:disabled="!$auth('system:role:create')"
|
:disabled="!$auth('app:project:create')"
|
||||||
@click="openEditModal({})"
|
@click="openEditModal({})"
|
||||||
>
|
>
|
||||||
新增
|
新增
|
||||||
|
|
|
@ -43,9 +43,9 @@
|
||||||
if (!isJpgOrPng) {
|
if (!isJpgOrPng) {
|
||||||
message.error('You can only upload JPG/PNG file!');
|
message.error('You can only upload JPG/PNG file!');
|
||||||
}
|
}
|
||||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
const isLt2M = file.size / 1024 / 1024 < 30;
|
||||||
if (!isLt2M) {
|
if (!isLt2M) {
|
||||||
message.error('Image must smaller than 2MB!');
|
message.error('Image must smaller than 30MB!');
|
||||||
}
|
}
|
||||||
|
|
||||||
return isJpgOrPng && isLt2M;
|
return isJpgOrPng && isLt2M;
|
||||||
|
|
Loading…
Reference in New Issue