|
@@ -291,6 +291,7 @@
|
|
<script type="text/javascript">
|
|
<script type="text/javascript">
|
|
import api from '@api/knowledgeLib.js';
|
|
import api from '@api/knowledgeLib.js';
|
|
import AddNewRuleTable from './AddNewRuleTable';
|
|
import AddNewRuleTable from './AddNewRuleTable';
|
|
|
|
+import axios from 'axios';
|
|
export default {
|
|
export default {
|
|
name: 'AddRule',
|
|
name: 'AddRule',
|
|
data() {
|
|
data() {
|
|
@@ -319,6 +320,7 @@ export default {
|
|
editCount: -1, // 页面会否被编辑 >0被编辑 =0 未编辑
|
|
editCount: -1, // 页面会否被编辑 >0被编辑 =0 未编辑
|
|
startCount: -1,
|
|
startCount: -1,
|
|
isSaveSuccess: false, // 是否保存成功
|
|
isSaveSuccess: false, // 是否保存成功
|
|
|
|
+ timeout: null,
|
|
rules: {
|
|
rules: {
|
|
collectionLibType: [
|
|
collectionLibType: [
|
|
{ required: true, message: '请选择术语集合类型', trigger: 'change' }
|
|
{ required: true, message: '请选择术语集合类型', trigger: 'change' }
|
|
@@ -353,6 +355,11 @@ export default {
|
|
}, 500);
|
|
}, 500);
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ cancelRequest() {
|
|
|
|
+ if (typeof this.source === 'function') {
|
|
|
|
+ this.source('终止请求');
|
|
|
|
+ }
|
|
|
|
+ },
|
|
getDict() {
|
|
getDict() {
|
|
api
|
|
api
|
|
.zskgetDict()
|
|
.zskgetDict()
|
|
@@ -414,14 +421,23 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 基础术语
|
|
// 基础术语
|
|
- async searchConcept() {
|
|
|
|
|
|
+ searchConcept(e) {
|
|
|
|
+ this.conceptText = e.target.value
|
|
|
|
+ if (this.timeout) {
|
|
|
|
+ clearTimeout(this.timeout);
|
|
|
|
+ }
|
|
|
|
+ this.timeout = setTimeout(() => {
|
|
|
|
+ this.getTreeSearchList()
|
|
|
|
+ }, 800);
|
|
|
|
+ },
|
|
|
|
+ async getTreeSearchList(){
|
|
this.whether = true;
|
|
this.whether = true;
|
|
const params = {
|
|
const params = {
|
|
typeId: this.form.conceptLibType,
|
|
typeId: this.form.conceptLibType,
|
|
name: this.conceptText,
|
|
name: this.conceptText,
|
|
excludedConceptIds: this.excludedConceptIds
|
|
excludedConceptIds: this.excludedConceptIds
|
|
};
|
|
};
|
|
- const data = await api.getTreeSearchList(params);
|
|
|
|
|
|
+ const data = await api.getTreeSearchList(params)
|
|
if (data.data.code == '0') {
|
|
if (data.data.code == '0') {
|
|
this.conceptList = data.data.data;
|
|
this.conceptList = data.data.data;
|
|
this.whether = false;
|
|
this.whether = false;
|
|
@@ -442,7 +458,7 @@ export default {
|
|
this.getList(this.form.concepts);
|
|
this.getList(this.form.concepts);
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- this.searchConcept();
|
|
|
|
|
|
+ this.getTreeSearchList();
|
|
}, 150);
|
|
}, 150);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -464,7 +480,7 @@ export default {
|
|
this.excludedConceptIds.splice(index, 1);
|
|
this.excludedConceptIds.splice(index, 1);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- this.searchConcept();
|
|
|
|
|
|
+ this.getTreeSearchList();
|
|
if (this.searchtext != '') {
|
|
if (this.searchtext != '') {
|
|
this.searchList(this.searchtext);
|
|
this.searchList(this.searchtext);
|
|
} else {
|
|
} else {
|
|
@@ -515,7 +531,7 @@ export default {
|
|
this.ruleTermTypeList = [];
|
|
this.ruleTermTypeList = [];
|
|
this.form.concepts = [];
|
|
this.form.concepts = [];
|
|
this.getList(this.form.concepts);
|
|
this.getList(this.form.concepts);
|
|
- this.searchConcept();
|
|
|
|
|
|
+ this.getTreeSearchList();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|