Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
+6
-5
@@ -15,12 +15,8 @@ import org.apache.shiro.SecurityUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
@@ -164,6 +160,11 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
|||||||
permissionUser.setProblemKnowledgeBaseId(problemKnowledgeBaseEO.getId());
|
permissionUser.setProblemKnowledgeBaseId(problemKnowledgeBaseEO.getId());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//根据用户id去重。
|
||||||
|
permissionUserList = permissionUserList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() ->
|
||||||
|
new TreeSet<>(Comparator.comparing(o -> o.getUserId()))),
|
||||||
|
ArrayList::new));
|
||||||
|
|
||||||
//3.把允许的用户添加进权限表。
|
//3.把允许的用户添加进权限表。
|
||||||
this.problemKnowledgeBaseUserEOService.saveOrUpdateBatch(permissionUserList);
|
this.problemKnowledgeBaseUserEOService.saveOrUpdateBatch(permissionUserList);
|
||||||
}
|
}
|
||||||
|
|||||||
+18
-4
@@ -42,7 +42,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="studioEngineerName">
|
<a-form-model-item class="itemModel" prop="studioEngineerName">
|
||||||
<PersonnelSelection :query="{db_field_name:'studioEngineer',db_field_txt:$t('authorizedUser')}"
|
<PersonnelSelection :query="{db_field_name:'studioEngineer',db_field_txt:$t('authorizedUser')}"
|
||||||
:isSingleChoice="true"
|
|
||||||
:personneQuery="formInline"
|
:personneQuery="formInline"
|
||||||
@change="PersonnelSelectionChange"
|
@change="PersonnelSelectionChange"
|
||||||
v-model="formInline.studioEngineerName"/>
|
v-model="formInline.studioEngineerName"/>
|
||||||
@@ -293,12 +292,22 @@
|
|||||||
getAction('/problemKnowledgeBase/problemKnowledgeBaseEO/queryById', query).then((res) => {
|
getAction('/problemKnowledgeBase/problemKnowledgeBaseEO/queryById', query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.formInline = res.result || {}
|
this.formInline = res.result || {}
|
||||||
this.formInline = { ...this.formInline }
|
|
||||||
if (this.formInline.showPermissions == 'Privacy') {
|
if (this.formInline.showPermissions == 'Privacy') {
|
||||||
this.isDisplay = true
|
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 {
|
} else {
|
||||||
this.isDisplay = false
|
this.isDisplay = false
|
||||||
}
|
}
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
} else {
|
} else {
|
||||||
this.formInline = {}
|
this.formInline = {}
|
||||||
}
|
}
|
||||||
@@ -390,10 +399,13 @@
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
this.confirmLoading = true
|
this.confirmLoading = true
|
||||||
let url = ''
|
let url = ''
|
||||||
|
let Action
|
||||||
if (this.formInline.id) {
|
if (this.formInline.id) {
|
||||||
url = this.url.edit
|
url = this.url.edit
|
||||||
|
Action = putAction
|
||||||
} else {
|
} else {
|
||||||
url = this.url.add
|
url = this.url.add
|
||||||
|
Action = postAction
|
||||||
}
|
}
|
||||||
formInline.permissionUserList = []
|
formInline.permissionUserList = []
|
||||||
if (formInline.showPermissions == 'Privacy') {
|
if (formInline.showPermissions == 'Privacy') {
|
||||||
@@ -404,12 +416,14 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
postAction(url, formInline).then((res) => {
|
Action(url, formInline).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(this.$t('OperationSuccessful'))
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
this.loading = false
|
this.loading = false
|
||||||
if (this.$route.query.id) {
|
if (this.$route.query.id) {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/problemKnowledgeBaseRelease'
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/problemknowledgeBase'
|
path: '/problemknowledgeBase'
|
||||||
|
|||||||
+9
-3
@@ -6,7 +6,7 @@
|
|||||||
<span>{{$t('searchContent')}}</span>
|
<span>{{$t('searchContent')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('searchContent')"
|
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('searchContent')"
|
||||||
v-model="searchContent"></a-input>
|
v-model="searchStr"></a-input>
|
||||||
<a-button class="box-button" type="primary" @click="onSearch">{{$t('query')}}</a-button>
|
<a-button class="box-button" type="primary" @click="onSearch">{{$t('query')}}</a-button>
|
||||||
<a-button class="box-button" style="margin-left: 8px" @click="ResetSearch">{{$t('reset')}}</a-button>
|
<a-button class="box-button" style="margin-left: 8px" @click="ResetSearch">{{$t('reset')}}</a-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -76,6 +76,7 @@
|
|||||||
@showSizeChange="SizeChange"
|
@showSizeChange="SizeChange"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
|
||||||
<classificationMaintenanceModel ref="classificationMaintenanceModelRef"/>
|
<classificationMaintenanceModel ref="classificationMaintenanceModelRef"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -95,6 +96,7 @@
|
|||||||
checkboxText: [],
|
checkboxText: [],
|
||||||
conList: [],
|
conList: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
|
loading: false,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
@@ -112,7 +114,7 @@
|
|||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
ResetSearch() {
|
ResetSearch() {
|
||||||
this.searchContent = ''
|
this.searchStr = ''
|
||||||
this.pageNo = 1
|
this.pageNo = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
@@ -148,14 +150,18 @@
|
|||||||
getList() {
|
getList() {
|
||||||
let query = {
|
let query = {
|
||||||
pageNo: this.pageNo,
|
pageNo: this.pageNo,
|
||||||
pageSize: this.pageSize
|
pageSize: this.pageSize,
|
||||||
|
searchStr: this.searchStr
|
||||||
}
|
}
|
||||||
|
this.loading = true
|
||||||
getAction(this.url.getInfoList, query).then((res) => {
|
getAction(this.url.getInfoList, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.conList = res.result.records
|
this.conList = res.result.records
|
||||||
this.total = res.result.total
|
this.total = res.result.total
|
||||||
|
this.loading = false
|
||||||
} else {
|
} else {
|
||||||
this.conList = []
|
this.conList = []
|
||||||
|
this.loading = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
+14
-6
@@ -57,12 +57,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAction, postAction, putAction } from '@/api/manage'
|
import { getAction, postAction, putAction, deleteAction } from '@/api/manage'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'problemKnowledgeBaseRelease',
|
name: 'problemKnowledgeBaseRelease',
|
||||||
@@ -72,11 +74,12 @@
|
|||||||
conList: [],
|
conList: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
loading: false,
|
||||||
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
url: {
|
url: {
|
||||||
getInfoList: 'search/document/getFullTextInfoList',
|
getInfoList: '/problemKnowledgeBase/problemKnowledgeBaseEO/page',
|
||||||
deleteBatch: ''
|
deleteBatch: '/problemKnowledgeBase/problemKnowledgeBaseEO/deleteBatch'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -84,6 +87,7 @@
|
|||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapGetters(['userInfo']),
|
||||||
pageOnChange(page, pageSize) {
|
pageOnChange(page, pageSize) {
|
||||||
this.pageNo = page
|
this.pageNo = page
|
||||||
this.getList()
|
this.getList()
|
||||||
@@ -96,14 +100,18 @@
|
|||||||
getList() {
|
getList() {
|
||||||
let query = {
|
let query = {
|
||||||
pageNo: this.pageNo,
|
pageNo: this.pageNo,
|
||||||
pageSize: this.pageSize
|
pageSize: this.pageSize,
|
||||||
|
createBy: this.userInfo().username
|
||||||
}
|
}
|
||||||
postAction(this.url.getInfoList, query).then((res) => {
|
this.loading = true
|
||||||
|
getAction(this.url.getInfoList, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.conList = res.result.records
|
this.conList = res.result.records
|
||||||
this.total = res.result.total
|
this.total = res.result.total
|
||||||
|
this.loading = false
|
||||||
} else {
|
} else {
|
||||||
this.conList = []
|
this.conList = []
|
||||||
|
this.loading = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -131,7 +139,7 @@
|
|||||||
this.$confirm({
|
this.$confirm({
|
||||||
content: _this.$t('ConfirmDelete'),
|
content: _this.$t('ConfirmDelete'),
|
||||||
onOk() {
|
onOk() {
|
||||||
getAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
|
deleteAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||||
_this.getList()
|
_this.getList()
|
||||||
|
|||||||
Reference in New Issue
Block a user