feat: 规则管理
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
<ai-dialog title="评分规则" :visible.sync="dialog" width="800px" @closed="onClosed">
|
||||
<ai-dialog title="评分规则" :visible.sync="dialog" width="800px" @closed="onClosed" @onConfirm="onConfirm">
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="事件类型:" prop="type">
|
||||
<ai-select
|
||||
@@ -144,6 +144,7 @@ export default {
|
||||
tableData: [],
|
||||
dialog:false,
|
||||
form:{
|
||||
id:null,
|
||||
type:'',
|
||||
score:''
|
||||
},
|
||||
@@ -162,6 +163,22 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
onConfirm(){
|
||||
this.$refs['formRef'].validate(async valid=>{
|
||||
if(valid){
|
||||
try {
|
||||
const {code} = await this.instance.post('/app/appscorerules/addOrUpdate')
|
||||
if(code===0){
|
||||
this.$message.success('保存成功')
|
||||
this.getList()
|
||||
this.getStatic()
|
||||
}
|
||||
}catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
onClosed(){
|
||||
this.form = {
|
||||
type:'',
|
||||
|
||||
Reference in New Issue
Block a user