feat():前台添加报文模版添加方法

master
Number7 2024-09-30 16:17:47 +08:00
parent 407578b89f
commit 423065945b
2 changed files with 41 additions and 2 deletions

View File

@ -318,7 +318,14 @@ export function findVehicleFaultData(param) {
})
}
//添加报文模版
export function addTemplate(data) {
return request({
url: '/saas/template/addTemplate',
method: 'post',
data
})
}

View File

@ -228,7 +228,24 @@
</el-main>
</el-container>
</el-container>
<el-dialog
title="提示"
:visible.sync="dialogFormVisible"
width="30%"
:before-close="handleClose">
<el-form :model="ruleForm" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="模版名称" prop="templateName">
<el-input type="" v-model="ruleForm.templateName" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="模版描述" prop="templateDescribe">
<el-input type="" v-model="ruleForm.templateDescribe" autocomplete="off"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('ruleForm')"></el-button>
<el-button @click="resetForm('ruleForm')"></el-button>
</el-form-item>
</el-form>
</el-dialog>
</div>
</template>
@ -262,6 +279,8 @@ export default {
vehicleFoundationData:[],
vehicleData:[],
deviceStatusData:[],
//
ruleForm:{}
};
},
// data",
@ -270,6 +289,19 @@ export default {
watch: {},
//",
methods: {
//
submitForm(){
addMessageTemplate(this.ruleForm).then(res=>{
if(res.code==200){
alert("添加成功");
this.findTemplateList();
}
})
},
//
resetForm(){
this.ruleForm={};
},
//
templateConfiguration(templatedId){
alert(templatedId)