feat: 规则管理
This commit is contained in:
@@ -69,7 +69,7 @@
|
|||||||
</ai-table>
|
</ai-table>
|
||||||
</template>
|
</template>
|
||||||
</ai-list>
|
</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 ref="formRef" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-form-item label="事件类型:" prop="type">
|
<el-form-item label="事件类型:" prop="type">
|
||||||
<ai-select
|
<ai-select
|
||||||
@@ -144,6 +144,7 @@ export default {
|
|||||||
tableData: [],
|
tableData: [],
|
||||||
dialog:false,
|
dialog:false,
|
||||||
form:{
|
form:{
|
||||||
|
id:null,
|
||||||
type:'',
|
type:'',
|
||||||
score:''
|
score:''
|
||||||
},
|
},
|
||||||
@@ -162,6 +163,22 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
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(){
|
onClosed(){
|
||||||
this.form = {
|
this.form = {
|
||||||
type:'',
|
type:'',
|
||||||
|
|||||||
Reference in New Issue
Block a user