fix: bug#10482 10490 10444 10443

This commit is contained in:
leiqiaochu 2023-03-17 09:59:46 +08:00
parent 886ed03b8b
commit 4a72c05b12
5 changed files with 21 additions and 8 deletions

View File

@ -26,11 +26,10 @@ interface AMapProps {
class?: string;
AMapUI?: string | boolean;
}
const amapKey = localStorage.getItem('amap_key') || 'a0415acfc35af15f10221bfa5a6850b4';
const amapKey = localStorage.getItem('amap_key')
initAMapApiLoader({
key: amapKey || '',
securityJsCode: 'cae6108ec3dd222f946d1a7237c78be0',
});
const props = defineProps({

View File

@ -118,20 +118,20 @@ const submitData = async () => {
if (props.isChild === 1) {
addParams.value = {
...formModel.value,
sortIndex:
childArr.value[childArr.value.length - 1].sortIndex + 1,
// sortIndex:
// childArr.value[childArr.value.length - 1].sortIndex + 1,
parentId: addObj.value.id,
};
} else if (props.isChild === 2) {
addParams.value = {
parentId: addObj.value.id,
...formModel.value,
sortIndex: 1,
// sortIndex: 1,
};
} else if (props.isChild === 3) {
addParams.value = {
...formModel.value,
sortIndex: arr.value[arr.value.length - 1].sortIndex + 1,
// sortIndex: arr.value[arr.value.length - 1].sortIndex + 1,
};
}
const res = await saveTree(addParams.value);

View File

@ -220,6 +220,7 @@ const table = reactive({
title: '说明',
dataIndex: 'description',
key: 'description',
ellipsis: true,
width: 700,
},
{

View File

@ -334,6 +334,7 @@ const submitData = () => {
formRef.value
.validate()
.then(async () => {
console.log(form);
//
if (props.isAdd === 1) {
if (form.id === '') {

View File

@ -103,7 +103,7 @@
...item.tooltip,
}"
@click="item.onClick"
:hasPermission="'device/Product:' + item.key"
:hasPermission="item.key ==='view' ? true : 'device/Product:' + item.key"
>
<AIcon
type="DeleteOutlined"
@ -197,40 +197,52 @@ const columns = [
dataIndex: 'id',
key: 'id',
scopedSlots: true,
width:200,
ellipsis: true,
},
{
title: '产品名称',
dataIndex: 'name',
key: 'name',
width:220,
ellipsis: true,
},
{
title: '接入方式',
dataIndex: 'accessName',
key: 'accessName',
width:220,
ellipsis: true,
},
{
title: '设备类型',
dataIndex: 'deviceType',
key: 'deviceType',
scopedSlots: true,
ellipsis: true,
width:120,
},
{
title: '状态',
dataIndex: 'state',
key: 'state',
scopedSlots: true,
ellipsis: true,
width:90,
},
{
title: '说明',
dataIndex: 'describe',
key: 'describe',
ellipsis: true,
},
{
title: '操作',
key: 'action',
fixed: 'right',
width: 250,
width: 200,
scopedSlots: true,
ellipsis: true,
},
];