fix: bug#10557
This commit is contained in:
parent
2963118753
commit
fd603c250d
|
@ -98,7 +98,7 @@ const emit = defineEmits<EmitProps>();
|
|||
const props = defineProps({
|
||||
value: {
|
||||
type: Object as PropType<Record<string, any>>,
|
||||
default: () => {},
|
||||
default: () => ({}),
|
||||
},
|
||||
showStatus: {
|
||||
type: Boolean,
|
||||
|
@ -118,6 +118,7 @@ const props = defineProps({
|
|||
},
|
||||
statusNames: {
|
||||
type: Object,
|
||||
default:()=>({'default':'default'})
|
||||
},
|
||||
actions: {
|
||||
type: Array as PropType<TableActionsType[]>,
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<j-descriptions-item label="ID">{{
|
||||
productStore.current.id
|
||||
}}</j-descriptions-item>
|
||||
<j-descriptions-item label="产品分类">{{
|
||||
productStore.current.classifiedName
|
||||
}}</j-descriptions-item>
|
||||
<j-descriptions-item label="ID">
|
||||
<Ellipsis>{{ productStore.current.id }}</Ellipsis>
|
||||
</j-descriptions-item>
|
||||
<j-descriptions-item label="产品分类">
|
||||
<Ellipsis>{{ productStore.current.classifiedName }}</Ellipsis>
|
||||
</j-descriptions-item>
|
||||
<j-descriptions-item label="设备类型">{{
|
||||
productStore.current.deviceType?.text
|
||||
}}</j-descriptions-item>
|
||||
|
@ -29,10 +29,14 @@
|
|||
}}</j-button>
|
||||
</j-descriptions-item>
|
||||
<j-descriptions-item label="创建时间">{{
|
||||
moment(productStore.current.createTime).format('YYYY-MM-DD HH:mm:ss')
|
||||
moment(productStore.current.createTime).format(
|
||||
'YYYY-MM-DD HH:mm:ss',
|
||||
)
|
||||
}}</j-descriptions-item>
|
||||
<j-descriptions-item label="更新时间">{{
|
||||
moment(productStore.current.modifyTime).format('YYYY-MM-DD HH:mm:ss')
|
||||
moment(productStore.current.modifyTime).format(
|
||||
'YYYY-MM-DD HH:mm:ss',
|
||||
)
|
||||
}}</j-descriptions-item>
|
||||
|
||||
<j-descriptions-item label="说明" :span="3">
|
||||
|
@ -41,7 +45,7 @@
|
|||
</j-descriptions>
|
||||
</j-card>
|
||||
<!-- 编辑 -->
|
||||
<Save ref="saveRef" :isAdd="isAdd" :title="title" @success="refresh"/>
|
||||
<Save ref="saveRef" :isAdd="isAdd" :title="title" @success="refresh" />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@ -74,7 +78,7 @@ const changeTables = () => {
|
|||
/**
|
||||
* 修改成功刷新
|
||||
*/
|
||||
const refresh = () =>{
|
||||
const refresh = () => {
|
||||
productStore.refresh(route.params.id as string);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -8,7 +8,14 @@
|
|||
<template #title>
|
||||
<div>
|
||||
<div style="display: flex; align-items: center">
|
||||
<div>{{ productStore.current.name }}</div>
|
||||
<a-tooltip>
|
||||
<template #title>{{
|
||||
productStore.current.name
|
||||
}}</template>
|
||||
<div class="productDetailHead">
|
||||
{{ productStore.current.name }}
|
||||
</div>
|
||||
</a-tooltip>
|
||||
<div style="margin: -5px 0 0 20px">
|
||||
<j-popconfirm
|
||||
title="确认禁用"
|
||||
|
@ -237,15 +244,19 @@ const jumpDevice = () => {
|
|||
termType: 'eq',
|
||||
value: productStore.current?.id,
|
||||
};
|
||||
menuStory.jumpPage('device/Instance',{},{
|
||||
target: 'device-instance',
|
||||
q: JSON.stringify({ terms: [{ terms: [{searchParams}] }] }),
|
||||
});
|
||||
menuStory.jumpPage(
|
||||
'device/Instance',
|
||||
{},
|
||||
{
|
||||
target: 'device-instance',
|
||||
q: JSON.stringify({ terms: [{ terms: [{ searchParams }] }] }),
|
||||
},
|
||||
);
|
||||
};
|
||||
onMounted(() => {
|
||||
getProtocol();
|
||||
if(history.state?.params?.tab){
|
||||
productStore.tabActiveKey = history.state?.params?.tab
|
||||
if (history.state?.params?.tab) {
|
||||
productStore.tabActiveKey = history.state?.params?.tab;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
@ -254,4 +265,11 @@ onMounted(() => {
|
|||
.ant-switch-disabled {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.productDetailHead {
|
||||
width: 50%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue