fix: 优化物模型配置按钮样式
This commit is contained in:
parent
09d77f4b07
commit
16d9f5a158
2
.npmrc
2
.npmrc
|
@ -1,2 +1,2 @@
|
||||||
always-auth=true
|
always-auth=true
|
||||||
registry=http://registry.jetlinks.cn/
|
registry=https://registry.npmjs.org/
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
"event-source-polyfill": "^1.0.31",
|
"event-source-polyfill": "^1.0.31",
|
||||||
"global": "^4.4.0",
|
"global": "^4.4.0",
|
||||||
"jetlinks-store": "^0.0.3",
|
"jetlinks-store": "^0.0.3",
|
||||||
"jetlinks-ui-components": "^1.0.33",
|
"jetlinks-ui-components": "^1.0.34",
|
||||||
"js-cookie": "^3.0.1",
|
"js-cookie": "^3.0.1",
|
||||||
"jsencrypt": "^3.3.2",
|
"jsencrypt": "^3.3.2",
|
||||||
"less": "^4.1.3",
|
"less": "^4.1.3",
|
||||||
|
|
|
@ -65,16 +65,13 @@
|
||||||
<AIcon type="SettingOutlined" />
|
<AIcon type="SettingOutlined" />
|
||||||
配置
|
配置
|
||||||
</j-button>
|
</j-button>
|
||||||
|
|
||||||
</j-tooltip>
|
</j-tooltip>
|
||||||
<PermissionButton
|
<InputParams
|
||||||
v-else
|
v-else
|
||||||
:has-permission="`${permission}:update`"
|
v-model:value="data.record.inputs"
|
||||||
type="link"
|
:has-permission="`${permission}:update`"
|
||||||
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 }}
|
||||||
|
@ -99,14 +96,11 @@
|
||||||
配置
|
配置
|
||||||
</j-button>
|
</j-button>
|
||||||
</j-tooltip>
|
</j-tooltip>
|
||||||
<PermissionButton
|
<ConfigParams
|
||||||
v-else
|
v-else
|
||||||
:has-permission="`${permission}:update`"
|
v-model:value="data.record.valueType"
|
||||||
type="link"
|
:has-permission="`${permission}:update`"
|
||||||
key="properties"
|
/>
|
||||||
>
|
|
||||||
<ConfigParams v-model:value="data.record.valueType" />
|
|
||||||
</PermissionButton>
|
|
||||||
</template>
|
</template>
|
||||||
<template #outInput>
|
<template #outInput>
|
||||||
object
|
object
|
||||||
|
@ -127,22 +121,17 @@
|
||||||
配置
|
配置
|
||||||
</j-button> -->
|
</j-button> -->
|
||||||
<!-- </j-tooltip> -->
|
<!-- </j-tooltip> -->
|
||||||
<PermissionButton
|
<OtherSetting
|
||||||
:has-permission="`${permission}:update`"
|
|
||||||
type="link"
|
|
||||||
key="setting"
|
|
||||||
:tooltip="target === 'device' && productNoEdit.id?.includes?.(data.record.id) ? {
|
|
||||||
title: '继承自产品物模型的数据不支持删除',
|
|
||||||
} : undefined"
|
|
||||||
>
|
|
||||||
<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)"
|
||||||
:record="data.record"
|
:record="data.record"
|
||||||
:type="data.record.valueType.type"
|
:type="data.record.valueType.type"
|
||||||
|
:has-permission="`${permission}:update`"
|
||||||
|
:tooltip="target === 'device' && productNoEdit.id?.includes?.(data.record.id) ? {
|
||||||
|
title: '继承自产品物模型的数据不支持删除',
|
||||||
|
} : undefined"
|
||||||
/>
|
/>
|
||||||
</PermissionButton>
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<template #action="{data}">
|
<template #action="{data}">
|
||||||
|
@ -563,4 +552,4 @@ onBeforeRouteLeave((to, from, next) => { // 设备管理外路由跳转
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding-bottom: 16px;
|
padding-bottom: 16px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -6,7 +6,15 @@
|
||||||
<template #config="{ data }">
|
<template #config="{ data }">
|
||||||
<ConfigModal v-model:value="data.record.valueType" :showOther="false" />
|
<ConfigModal v-model:value="data.record.valueType" :showOther="false" />
|
||||||
</template>
|
</template>
|
||||||
<ModelButton />
|
<PermissionButton
|
||||||
|
key="properties"
|
||||||
|
:has-permission="hasPermission"
|
||||||
|
style="padding-left: 0;"
|
||||||
|
type="link"
|
||||||
|
>
|
||||||
|
<AIcon type="SettingOutlined" />
|
||||||
|
配置
|
||||||
|
</PermissionButton>
|
||||||
</DataTableObject>
|
</DataTableObject>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -23,7 +31,7 @@ import {omit} from "lodash-es";
|
||||||
import {TypeStringMap, validatorConfig} from "../../columns";
|
import {TypeStringMap, validatorConfig} from "../../columns";
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: '参数标识',
|
title: '参数标识',
|
||||||
dataIndex: 'id',
|
dataIndex: 'id',
|
||||||
type: 'text',
|
type: 'text',
|
||||||
|
@ -52,7 +60,7 @@ const columns = [
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '参数名称',
|
title: '参数名称',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
type: 'text',
|
type: 'text',
|
||||||
|
@ -139,6 +147,7 @@ const props = defineProps({
|
||||||
type: Array as PropType<{ label: string; value: string }[]>,
|
type: Array as PropType<{ label: string; value: string }[]>,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
|
hasPermission: String,
|
||||||
});
|
});
|
||||||
|
|
||||||
const value = ref(props.value.properties);
|
const value = ref(props.value.properties);
|
||||||
|
@ -151,7 +160,7 @@ const confirm = (data: any) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log('ConfigParams',newObject)
|
console.log('ConfigParams',newObject)
|
||||||
|
|
||||||
emit('update:value', {
|
emit('update:value', {
|
||||||
properties: newObject,
|
properties: newObject,
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
|
|
@ -9,7 +9,14 @@
|
||||||
<template #config="{ data }">
|
<template #config="{ data }">
|
||||||
<ConfigModal v-model:value="data.record.valueType" :showOther="false" />
|
<ConfigModal v-model:value="data.record.valueType" :showOther="false" />
|
||||||
</template>
|
</template>
|
||||||
<ModelButton />
|
<PermissionButton
|
||||||
|
key="properties"
|
||||||
|
:has-permission="hasPermission"
|
||||||
|
type="link"
|
||||||
|
>
|
||||||
|
<AIcon type="SettingOutlined" />
|
||||||
|
配置
|
||||||
|
</PermissionButton>
|
||||||
</DataTableObject>
|
</DataTableObject>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -43,6 +50,7 @@ const props = defineProps({
|
||||||
type: Array as PropType<{ label: string; value: string }[]>,
|
type: Array as PropType<{ label: string; value: string }[]>,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
|
hasPermission: String,
|
||||||
});
|
});
|
||||||
const formItemContext = Form.useInjectFormItemContext();
|
const formItemContext = Form.useInjectFormItemContext();
|
||||||
|
|
||||||
|
|
|
@ -17,4 +17,4 @@ const props = defineProps({
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -51,8 +51,17 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<PermissionButton
|
||||||
<ModelButton :disabled="disabled"/>
|
key="setting"
|
||||||
|
:disabled="disabled"
|
||||||
|
:has-permission="hasPermission"
|
||||||
|
:tooltip="tooltip"
|
||||||
|
style="padding-left: 0;"
|
||||||
|
type="link"
|
||||||
|
>
|
||||||
|
<AIcon type="SettingOutlined" />
|
||||||
|
配置
|
||||||
|
</PermissionButton>
|
||||||
</j-popconfirm-modal>
|
</j-popconfirm-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -88,6 +97,8 @@ const props = defineProps({
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({})
|
default: () => ({})
|
||||||
},
|
},
|
||||||
|
hasPermission: String,
|
||||||
|
tooltip: Object
|
||||||
})
|
})
|
||||||
|
|
||||||
const fullRef = inject(FULL_CODE);
|
const fullRef = inject(FULL_CODE);
|
||||||
|
@ -225,4 +236,4 @@ watch(() => props.value, () => {
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -3738,10 +3738,10 @@ jetlinks-store@^0.0.3:
|
||||||
resolved "https://registry.npmjs.org/jetlinks-store/-/jetlinks-store-0.0.3.tgz"
|
resolved "https://registry.npmjs.org/jetlinks-store/-/jetlinks-store-0.0.3.tgz"
|
||||||
integrity sha512-AZf/soh1hmmwjBZ00fr1emuMEydeReaI6IBTGByQYhTmK1Zd5pQAxC7WLek2snRAn/HHDgJfVz2hjditKThl6Q==
|
integrity sha512-AZf/soh1hmmwjBZ00fr1emuMEydeReaI6IBTGByQYhTmK1Zd5pQAxC7WLek2snRAn/HHDgJfVz2hjditKThl6Q==
|
||||||
|
|
||||||
jetlinks-ui-components@^1.0.33:
|
jetlinks-ui-components@^1.0.34:
|
||||||
version "1.0.33"
|
version "1.0.34"
|
||||||
resolved "http://registry.jetlinks.cn/jetlinks-ui-components/-/jetlinks-ui-components-1.0.33.tgz#49ce2b8c1e7be66272864728d5df82f834ec4490"
|
resolved "https://registry.npmjs.org/jetlinks-ui-components/-/jetlinks-ui-components-1.0.34.tgz#e158f87cf626904fd97b63fa379dbea12dc0230f"
|
||||||
integrity sha512-vYUP4MhzO6r0golmKqO8lHk8w5ldhAkgXWZfFII1Zoa7JtUwveqpSywTU23iSmCN+4muPaSLvHw713k6OdzLmg==
|
integrity sha512-1O41g3VYrwnHJ3AWCbfbTaq62B55EwLvOC9frbiF1y/Lf+GZBkK1D1R4+gFQF/pgDdonlZoaT5pE1mdZWXrfHQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@vueuse/core" "^9.12.0"
|
"@vueuse/core" "^9.12.0"
|
||||||
"@vueuse/router" "^9.13.0"
|
"@vueuse/router" "^9.13.0"
|
||||||
|
|
Loading…
Reference in New Issue