feat():前台添加报文模版添加方法
parent
407578b89f
commit
423065945b
|
@ -318,7 +318,14 @@ export function findVehicleFaultData(param) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//添加报文模版
|
||||||
|
export function addTemplate(data) {
|
||||||
|
return request({
|
||||||
|
url: '/saas/template/addTemplate',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -228,7 +228,24 @@
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -262,6 +279,8 @@ export default {
|
||||||
vehicleFoundationData:[],
|
vehicleFoundationData:[],
|
||||||
vehicleData:[],
|
vehicleData:[],
|
||||||
deviceStatusData:[],
|
deviceStatusData:[],
|
||||||
|
//模版添加
|
||||||
|
ruleForm:{}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
//计算属性 类似于data概念",
|
//计算属性 类似于data概念",
|
||||||
|
@ -270,6 +289,19 @@ export default {
|
||||||
watch: {},
|
watch: {},
|
||||||
//方法集合",
|
//方法集合",
|
||||||
methods: {
|
methods: {
|
||||||
|
//报文模版添加
|
||||||
|
submitForm(){
|
||||||
|
addMessageTemplate(this.ruleForm).then(res=>{
|
||||||
|
if(res.code==200){
|
||||||
|
alert("添加成功");
|
||||||
|
this.findTemplateList();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//报文模版添加重置
|
||||||
|
resetForm(){
|
||||||
|
this.ruleForm={};
|
||||||
|
},
|
||||||
//点击模版配置查看相应的模版
|
//点击模版配置查看相应的模版
|
||||||
templateConfiguration(templatedId){
|
templateConfiguration(templatedId){
|
||||||
alert(templatedId)
|
alert(templatedId)
|
||||||
|
|
Loading…
Reference in New Issue