Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
9649d05d9a
|
@ -66,7 +66,14 @@
|
||||||
配置
|
配置
|
||||||
</j-button>
|
</j-button>
|
||||||
</j-tooltip>
|
</j-tooltip>
|
||||||
<InputParams v-else v-model:value="data.record.inputs" />
|
<PermissionButton
|
||||||
|
v-else
|
||||||
|
:has-permission="`${permission}:update`"
|
||||||
|
type="link"
|
||||||
|
key="inputs"
|
||||||
|
>
|
||||||
|
<InputParams v-model:value="data.record.inputs" />
|
||||||
|
</PermissionButton>
|
||||||
</template>
|
</template>
|
||||||
<template #output="{ data }">
|
<template #output="{ data }">
|
||||||
{{ data.record.output?.type }}
|
{{ data.record.output?.type }}
|
||||||
|
@ -91,7 +98,14 @@
|
||||||
配置
|
配置
|
||||||
</j-button>
|
</j-button>
|
||||||
</j-tooltip>
|
</j-tooltip>
|
||||||
<ConfigParams v-else v-model:value="data.record.valueType" />
|
<PermissionButton
|
||||||
|
v-else
|
||||||
|
:has-permission="`${permission}:update`"
|
||||||
|
type="link"
|
||||||
|
key="properties"
|
||||||
|
>
|
||||||
|
<ConfigParams v-model:value="data.record.valueType" />
|
||||||
|
</PermissionButton>
|
||||||
</template>
|
</template>
|
||||||
<template #outInput>
|
<template #outInput>
|
||||||
object
|
object
|
||||||
|
@ -112,8 +126,13 @@
|
||||||
配置
|
配置
|
||||||
</j-button>
|
</j-button>
|
||||||
</j-tooltip>
|
</j-tooltip>
|
||||||
<OtherSetting
|
<PermissionButton
|
||||||
v-else
|
v-else
|
||||||
|
:has-permission="`${permission}:update`"
|
||||||
|
type="link"
|
||||||
|
key="setting"
|
||||||
|
>
|
||||||
|
<OtherSetting
|
||||||
v-model:value="data.record.expands"
|
v-model:value="data.record.expands"
|
||||||
:id="data.record.id"
|
:id="data.record.id"
|
||||||
:disabled="target === 'device' && productNoEdit.id?.includes?.(data.record.id)"
|
:disabled="target === 'device' && productNoEdit.id?.includes?.(data.record.id)"
|
||||||
|
@ -123,11 +142,13 @@
|
||||||
} : undefined"
|
} : undefined"
|
||||||
:type="data.record.valueType.type"
|
:type="data.record.valueType.type"
|
||||||
/>
|
/>
|
||||||
|
</PermissionButton>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<template #action="{data}">
|
<template #action="{data}">
|
||||||
<j-space>
|
<j-space>
|
||||||
<PermissionButton
|
<PermissionButton
|
||||||
:has-permission="`${permission}:add`"
|
:has-permission="`${permission}:update`"
|
||||||
type="link"
|
type="link"
|
||||||
key="edit"
|
key="edit"
|
||||||
style="padding: 0"
|
style="padding: 0"
|
||||||
|
@ -168,7 +189,7 @@
|
||||||
<AIcon type="FileSearchOutlined" />
|
<AIcon type="FileSearchOutlined" />
|
||||||
</PermissionButton>
|
</PermissionButton>
|
||||||
<PermissionButton
|
<PermissionButton
|
||||||
:has-permission="`${permission}:delete`"
|
:has-permission="`${permission}:update`"
|
||||||
type="link"
|
type="link"
|
||||||
key="delete"
|
key="delete"
|
||||||
style="padding: 0"
|
style="padding: 0"
|
||||||
|
@ -248,6 +269,7 @@ import {cloneDeep} from "lodash";
|
||||||
import {useSystem} from "store/system";
|
import {useSystem} from "store/system";
|
||||||
import {storeToRefs} from "pinia";
|
import {storeToRefs} from "pinia";
|
||||||
import { FULL_CODE } from 'jetlinks-ui-components/es/DataTable'
|
import { FULL_CODE } from 'jetlinks-ui-components/es/DataTable'
|
||||||
|
import { usePermissionStore } from '@/store/permission';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
target: {
|
target: {
|
||||||
|
@ -273,6 +295,7 @@ const router = useRouter()
|
||||||
const { data: metadata, noEdit, productNoEdit } = useMetadata(_target, props.type);
|
const { data: metadata, noEdit, productNoEdit } = useMetadata(_target, props.type);
|
||||||
const { hasOperate } = useOperateLimits(_target);
|
const { hasOperate } = useOperateLimits(_target);
|
||||||
|
|
||||||
|
const permissionStore = usePermissionStore()
|
||||||
const metadataStore = useMetadataStore()
|
const metadataStore = useMetadataStore()
|
||||||
const instanceStore = useInstanceStore()
|
const instanceStore = useInstanceStore()
|
||||||
const productStore = useProductStore()
|
const productStore = useProductStore()
|
||||||
|
@ -487,7 +510,7 @@ const handleSaveClick = async (next?: Function) => {
|
||||||
const tabsChange = inject('tabsChange')
|
const tabsChange = inject('tabsChange')
|
||||||
|
|
||||||
const parentTabsChange = (next?: Function) => {
|
const parentTabsChange = (next?: Function) => {
|
||||||
if (editStatus.value) {
|
if (editStatus.value && permissionStore.hasPermission(`${props.permission}:update`)) {
|
||||||
const modal = Modal.confirm({
|
const modal = Modal.confirm({
|
||||||
content: '页面改动数据未保存',
|
content: '页面改动数据未保存',
|
||||||
okText: '保存',
|
okText: '保存',
|
||||||
|
|
Loading…
Reference in New Issue