对接问题知识库的转发

This commit is contained in:
范强强
2022-08-31 17:03:04 +08:00
parent a9d023c036
commit ba2312c33f
2 changed files with 30 additions and 10 deletions
+6 -1
View File
@@ -51,7 +51,7 @@
title: { title: {
type: String, type: String,
default: '' default: ''
}, }
}, },
data() { data() {
return { return {
@@ -102,7 +102,12 @@
this.visibleTree = false this.visibleTree = false
}, },
handleSubmit() { handleSubmit() {
if (this.userIds && this.userIds.length > 0) {
this.submitLoading = true
this.$emit('SelectedByForm', this.userIds.join(',')) this.$emit('SelectedByForm', this.userIds.join(','))
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
}, },
onSearch(e) { onSearch(e) {
this.gData = [] this.gData = []
@@ -156,8 +156,23 @@
}, },
methods: { methods: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),
SelectedByForm() { SelectedByForm(userIds) {
let query = {
userIds: userIds,
departIds: userIds,
problemKnowledgeBaseId: this.queryForm.id,
problemKnowledgeBaseTitle: this.queryForm.title
}
postAction('/problemKnowledgeBase/problemKnowledgeBaseEO/forward', query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.$refs.SelectedByRef.visible = false
this.$refs.SelectedByRef.submitLoading = false
} else {
this.$message.warning(this.$t('operationFailed'))
this.$refs.SelectedByRef.submitLoading = false
}
})
}, },
queryById() { queryById() {
let query = { let query = {