diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseEOServiceImpl.java index 4ceb74f0b..0455d852a 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseEOServiceImpl.java @@ -15,12 +15,8 @@ import org.apache.shiro.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Date; +import java.util.*; import java.util.stream.Collectors; -import java.util.stream.Stream; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.transaction.annotation.Propagation; @@ -164,6 +160,11 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl + new TreeSet<>(Comparator.comparing(o -> o.getUserId()))), + ArrayList::new)); + //3.把允许的用户添加进权限表。 this.problemKnowledgeBaseUserEOService.saveOrUpdateBatch(permissionUserList); } diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseAdd.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseAdd.vue index 094e2f5ee..8b17b5343 100644 --- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseAdd.vue +++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseAdd.vue @@ -42,7 +42,6 @@ @@ -293,12 +292,22 @@ getAction('/problemKnowledgeBase/problemKnowledgeBaseEO/queryById', query).then((res) => { if (res.success) { this.formInline = res.result || {} - this.formInline = { ...this.formInline } if (this.formInline.showPermissions == 'Privacy') { this.isDisplay = true + if (this.formInline.permissionUserList && this.formInline.permissionUserList.length > 0) { + let userId = [] + let userName = [] + this.formInline.permissionUserList.forEach(val => { + userId.push(val.userId) + userName.push(val.userName) + }) + this.formInline.studioEngineerName = userName.join(',') + this.formInline.studioEngineer = userId.join(',') + } } else { this.isDisplay = false } + this.formInline = { ...this.formInline } } else { this.formInline = {} } @@ -390,10 +399,13 @@ this.loading = true this.confirmLoading = true let url = '' + let Action if (this.formInline.id) { url = this.url.edit + Action = putAction } else { url = this.url.add + Action = postAction } formInline.permissionUserList = [] if (formInline.showPermissions == 'Privacy') { @@ -404,12 +416,14 @@ }) }) } - postAction(url, formInline).then((res) => { + Action(url, formInline).then((res) => { if (res.success) { this.$message.success(this.$t('OperationSuccessful')) this.loading = false if (this.$route.query.id) { - + this.$router.push({ + path: '/problemKnowledgeBaseRelease' + }) } else { this.$router.push({ path: '/problemknowledgeBase' diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue index a50d4e6f7..d7a10b460 100644 --- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue +++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue @@ -6,7 +6,7 @@ {{$t('searchContent')}} + v-model="searchStr"> {{$t('query')}} {{$t('reset')}} @@ -76,6 +76,7 @@ @showSizeChange="SizeChange" /> + {{$t('dataLoading')}} @@ -95,6 +96,7 @@ checkboxText: [], conList: [], total: 0, + loading: false, pageSize: 10, downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', pageNo: 1, @@ -112,7 +114,7 @@ this.getList() }, ResetSearch() { - this.searchContent = '' + this.searchStr = '' this.pageNo = 1 this.getList() }, @@ -148,14 +150,18 @@ getList() { let query = { pageNo: this.pageNo, - pageSize: this.pageSize + pageSize: this.pageSize, + searchStr: this.searchStr } + this.loading = true getAction(this.url.getInfoList, query).then((res) => { if (res.success) { this.conList = res.result.records this.total = res.result.total + this.loading = false } else { this.conList = [] + this.loading = false } }) }, diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseRelease.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseRelease.vue index 628bdec05..b42131f4f 100644 --- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseRelease.vue +++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseRelease.vue @@ -57,12 +57,14 @@ + {{$t('dataLoading')}}