Browse Source

更新

wangqin
hui 10 months ago
parent
commit
bf82b4786b
  1. 22
      ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/components/AddNEditDialog.vue
  2. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/index.vue

22
ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/components/AddNEditDialog.vue

@ -4,7 +4,7 @@
<Form :value="formData" class="form" ref="FormConfigRef" :formList="formList" column="1" labelWidth="120px" />
</div>
<template #footer>
<template #footer> this.checkRepeat();
<Button style="background-color: rgba(0, 179, 204, .3);" @click.native="modelVisible = false, submitting = false">
取消
</Button>
@ -38,7 +38,8 @@ export default {
},
props: {
visible: Boolean,
data: Object
data: Object,
dataAll: Array
},
data() {
return {
@ -70,11 +71,26 @@ export default {
}
},
methods: {
checkRepeat(word){
let temp = _.find(this.data, { word: word });
console.log(temp, 'ttttttttttt')
if (temp) {
this.$message.danger("该关键词已存在。")
return false
} else {
return true;
}
},
handleSubmit() {
this.$refs.FormConfigRef.validate()
.then((data) => {
this.submitting = true;
data.word = data.word.trim();
if(!this.checkRepeat(data.word)){
return ;
}
this.submitting = true;
if (this.data) data.id = this.data.id;
request({

4
ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/index.vue

@ -50,7 +50,7 @@
</div>
</template>
</div>
<AddNEditDialog v-model="isShowDialog" :data="dialogData" @afterSubmit = "getData" />;
<AddNEditDialog v-model="isShowDialog" :data="dialogData" @onSuccess = "getData" :dataAll="data"/>;
</div>
</template>
@ -138,7 +138,7 @@ export default {
handleExport() {
exportFile({
url: "/business/dcInfoBoardVocabulary/export",
filename: "管辖路段",
filename: "情报板敏感词",
data: this.getSearchData()
});
},

Loading…
Cancel
Save