紧急修复一老BUG

This commit is contained in:
aixianling
2023-10-08 14:14:27 +08:00
parent dec9937830
commit 4eeb00b093

View File

@@ -1,18 +1,20 @@
<template>
<ai-detail>
<template slot="title">
<ai-title :title="id ? '编辑项目' : '添加项目'" isShowBack isShowBottomBorder @onBackClick="cancel"/>
<ai-title :title="isEdit ? '编辑项目' : '添加项目'" isShowBack isShowBottomBorder @onBackClick="cancel"/>
</template>
<template slot="content">
<el-form ref="form" :model="form" label-width="110px" label-position="right">
<ai-card title="基本信息">
<template #content>
<div class="ai-form">
<el-form-item label="名称" prop="name" :rules="[{ required: true, message: '请输入大屏项目名称', trigger: 'blur' }]">
<el-form-item label="名称" prop="name"
:rules="[{ required: true, message: '请输入大屏项目名称', trigger: 'blur' }]">
<el-input size="small" :maxlength="30" placeholder="请输入大屏项目名称" v-model="form.name"></el-input>
</el-form-item>
<el-form-item label="描述" style="width: 100%;" prop="description">
<el-input size="small" :maxlength="200" :rows="5" type="textarea" style="width: 100%;" placeholder="请输入描述"
<el-input size="small" :maxlength="200" :rows="5" type="textarea" style="width: 100%;"
placeholder="请输入描述"
v-model="form.description"></el-input>
</el-form-item>
<el-form-item label="是否开启" style="width: 100%;" prop="status">
@@ -25,7 +27,7 @@
</div>
</template>
</ai-card>
<ai-card title="大屏" v-if="id">
<ai-card title="大屏" v-if="isEdit">
<template #right>
<el-button @click="gotoDesign()" type="primary">添加大屏</el-button>
<el-button @click="dialog=true" type="primary">定制大屏</el-button>
@@ -132,9 +134,12 @@ export default {
}
}
},
computed: {
isEdit: v => !!v.$route.query.id
},
created() {
this.dict.load('customizedDVs')
this.getInfo().then(() => this.$route.params?.id && this.onChange(this.$route.params))
this.getInfo()
},
methods: {
...mapActions(['closePage']),
@@ -206,9 +211,6 @@ export default {
...this.form,
relationLsIds: ids,
relationLsNames: names
}).then(res => {
if (res.code == 0) {
}
})
}
})