Commit 65a98394 authored by yf's avatar yf

fix:新增字段类型

parent 8de9b187
......@@ -103,8 +103,8 @@
/>
<!-- 添加或修改算法摄像头对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="摄像头名" prop="cameraName">
<el-input v-model="form.cameraName" placeholder="请输入摄像头名" />
</el-form-item>
......@@ -243,7 +243,8 @@
createTime: null,
updateBy: null,
updateTime: null,
remark: null
remark: null,
algorithmType : null
};
this.resetForm("form");
},
......@@ -276,6 +277,10 @@
const id = row.id || this.ids
getBase(id).then(response => {
this.form = response.data;
if( this.form.algorithmType){
const algorithmType = this.form.algorithmType;
this.form.algorithmType = algorithmType.split(',');
}
this.open = true;
this.title = "修改算法摄像头";
});
......@@ -284,6 +289,10 @@
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if(this.form.algorithmType){
const algorithmType = this.form.algorithmType;
this.form.algorithmType = algorithmType.join(',');
}
if (this.form.id != null) {
updateBase(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment