在线设备录入添加参数
修改组件管理时间线配置
This commit is contained in:
@@ -38,6 +38,7 @@ import { useDictData } from '@/stores/dictData'
|
||||
import { getFatherComponent, componentAdd, componentEdit } from '@/api/user-boot/dept'
|
||||
|
||||
import { componentTree } from '@/api/user-boot/user'
|
||||
import { pid } from 'process'
|
||||
const dictData = useDictData()
|
||||
const emit = defineEmits(['cancel', 'submit'])
|
||||
const dialogVisible = ref(false)
|
||||
@@ -47,7 +48,10 @@ const formRef = ref()
|
||||
const form = ref<anyObj>({
|
||||
name: '',
|
||||
sort: 100,
|
||||
system: ''
|
||||
system: [],
|
||||
timeKey: '3',
|
||||
code: 'base',
|
||||
|
||||
})
|
||||
const props = { label: 'name', value: 'id', checkStrictly: true }
|
||||
const rules = {
|
||||
@@ -78,7 +82,7 @@ const getFather = () => {
|
||||
}
|
||||
|
||||
// 递归删除path不为null的数据
|
||||
function deletePathNotNull(data:any) {
|
||||
function deletePathNotNull(data: any) {
|
||||
// 若为数组,遍历处理每个元素
|
||||
if (Array.isArray(data)) {
|
||||
const filtered = []
|
||||
@@ -110,7 +114,7 @@ const submit = () => {
|
||||
await componentAdd({
|
||||
...form.value,
|
||||
systemType: form.value.system[0],
|
||||
pid: form.value.system[1]
|
||||
pid: form.value.system?.at(-1)
|
||||
}).then(res => {
|
||||
ElMessage.success('新增成功!')
|
||||
emit('submit')
|
||||
|
||||
Reference in New Issue
Block a user