Merge remote-tracking branch 'origin/fix_2nd_period' into fix_2nd_period

This commit is contained in:
wangzhijiang
2022-12-30 11:06:18 +08:00
9 changed files with 160 additions and 11 deletions
@@ -486,6 +486,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
private List<DummyInventoryInfoEO> attestationRankSort(String orderBy, String orderByField, List<DummyInventoryInfoEO> dummyInventoryInfoEOList) {
List<DummyInventoryInfoEO> list = new LinkedList<>();
Collator comparator = Collator.getInstance(Locale.CHINESE);
if(ObjectUtils.isNotEmpty(orderByField) && "attestationRank".equals(orderByField)){
List<DummyInventoryInfoEO> wvta = dummyInventoryInfoEOList.stream()
.filter(e -> e.getAttestationRankStr().startsWith(AttestationRankEnum.WVTA.getValue())).collect(Collectors.toList());
@@ -502,6 +503,11 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
if (OrderEnum.POSITIVE.getValue().equals(orderBy)) {
attestationRankPositive(orderBy, wvta, comparator);
attestationRankPositive(orderBy, vta, comparator);
attestationRankPositive(orderBy, market, comparator);
attestationRankPositive(orderBy, regu, comparator);
attestationRankPositive(orderBy, na, comparator);
//正序
list.addAll(valueNull);
list.addAll(wvta);
@@ -511,6 +517,11 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
list.addAll(na);
} else if (OrderEnum.REVERSE.getValue().equals(orderBy)) {
attestationRankReverse(orderBy, wvta, comparator);
attestationRankReverse(orderBy, vta, comparator);
attestationRankReverse(orderBy, market, comparator);
attestationRankReverse(orderBy, regu, comparator);
attestationRankReverse(orderBy, na, comparator);
//倒序
list.addAll(na);
list.addAll(regu);
@@ -527,6 +538,31 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
}
}
//正序
private void attestationRankPositive(String orderBy, List<DummyInventoryInfoEO> list, Collator comparator) {
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
Collections.sort(list,(e1, e2)->{
return comparator.compare(e1.getAttestationRankStr(),e2.getAttestationRankStr());
});
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
Collections.sort(list,(e1,e2)->{
return comparator.compare(e2.getAttestationRankStr(),e1.getAttestationRankStr());
});
}
}
//倒序
private void attestationRankReverse(String orderBy, List<DummyInventoryInfoEO> list, Collator comparator) {
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
Collections.sort(list,(e1, e2)->{
return comparator.compare(e1.getAttestationRankStr(),e2.getAttestationRankStr());
});
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
Collections.sort(list,(e1,e2)->{
return comparator.compare(e2.getAttestationRankStr(),e1.getAttestationRankStr());
});
}
}
private List<DummyInventoryInfoEO> stateSort(String orderBy, String orderByField, List<DummyInventoryInfoEO> dummyInventoryInfoEOList, List<DummyInventoryInfoEO> list) {
if(ObjectUtils.isNotEmpty(orderByField) && "state".equals(orderByField)){
List<DummyInventoryInfoEO> active = dummyInventoryInfoEOList.stream()
@@ -1084,8 +1084,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
List<ProjectLawsInventoryEO> na = dummyInventoryInfoEOList.stream()
.filter(e -> e.getAttestationRank_dictText().startsWith(AttestationRankEnum.NA.getValue())).collect(Collectors.toList());
Collator comparator = Collator.getInstance(Locale.CHINESE);
if (OrderEnum.POSITIVE.getValue().equals(orderBy)) {
attestationRankPositive(orderBy, wvta, comparator);
attestationRankPositive(orderBy, vta, comparator);
attestationRankPositive(orderBy, market, comparator);
attestationRankPositive(orderBy, regu, comparator);
attestationRankPositive(orderBy, na, comparator);
//正序
List<ProjectLawsInventoryEO> collect = dummyInventoryInfoEOList.stream().filter(e -> StringUtils.isBlank(e.getAttestationRank_dictText())).collect(Collectors.toList());
list.addAll(collect);
@@ -1096,6 +1101,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
list.addAll(na);
} else if (OrderEnum.REVERSE.getValue().equals(orderBy)) {
attestationRankReverse(orderBy, wvta, comparator);
attestationRankReverse(orderBy, vta, comparator);
attestationRankReverse(orderBy, market, comparator);
attestationRankReverse(orderBy, regu, comparator);
attestationRankReverse(orderBy, na, comparator);
//倒序
list.addAll(na);
list.addAll(regu);
@@ -1113,6 +1123,31 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}
}
//正序
private void attestationRankPositive(String orderBy, List<ProjectLawsInventoryEO> list, Collator comparator) {
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
Collections.sort(list,(e1, e2)->{
return comparator.compare(e1.getAttestationRank_dictText(),e2.getAttestationRank_dictText());
});
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
Collections.sort(list,(e1,e2)->{
return comparator.compare(e2.getAttestationRank_dictText(),e1.getAttestationRank_dictText());
});
}
}
//倒序
private void attestationRankReverse(String orderBy, List<ProjectLawsInventoryEO> list, Collator comparator) {
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
Collections.sort(list,(e1, e2)->{
return comparator.compare(e1.getAttestationRank_dictText(),e2.getAttestationRank_dictText());
});
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
Collections.sort(list,(e1,e2)->{
return comparator.compare(e2.getAttestationRank_dictText(),e1.getAttestationRank_dictText());
});
}
}
/**
* 数据字典数据处理方法
* @param result 返回值
@@ -45,7 +45,7 @@
@change='handleTableChange'>
<template slot="file" slot-scope="text, record">
<a class="action-edit" href="javascript:;" @click="dowloadfile(record)" v-has="'bqnrzdpzxlbj'">{{record.exportFileName}}</a>
<a class="action-edit" href="javascript:;" @click="dowloadfile(record)">{{record.exportFileName}}</a>
</template>
</a-table>
<div class="page" style='display: flex;justify-content: flex-end;'>
@@ -698,7 +698,7 @@
this.dataSourcehistory = res.result.records
if(this.dataSourcehistory && this.dataSourcehistory.length > 0){
this.dataSourcehistory.forEach(val=>{
val.logContent = val.logContent.replace(/\"/g,"")
val.logContent = val.logContent.replace(/\"/g,"<span class='textData'>\"</span>")
})
}
this.total = res.result.total
@@ -1036,6 +1036,9 @@
.table .ant-table-column-title {
font-weight: bold;
}
.textData{
font-family:cursive;
}
</style>
<style scoped lang="less">
.box {
@@ -1043,7 +1046,6 @@
height: calc(100% - 100px);
overflow: auto;
}
.text {
margin-right: 10px;
}
@@ -56,6 +56,12 @@
<a-menu-item key="3" @click="orgDelete" v-if="deleteNode"
v-has="'split:sarFileSplitMenu:delete'">{{ $t('deleteNode') }}
</a-menu-item>
<a-menu-item key="4" @click="orgMoveUp" v-if="deleteNode"
v-has="'split:sarFileSplitMenu:moveUp'">{{ $t('moveUp') }}
</a-menu-item>
<a-menu-item key="5" @click="orgmoveDown" v-if="deleteNode"
v-has="'split:sarFileSplitMenu:moveDown'">{{ $t('moveDown') }}
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
@@ -584,6 +590,61 @@ export default {
}
})
},
// 树上移
orgMoveUp(){
let query = {
moveFlag:'up',
infoId:this.infoId,
SarFileSplitMenu:{
id:this.nodeItem.id,
pId:this.nodeItem.pid,
displaySeq:this.nodeItem.displaySeq
}
}
postAction(`split/sarFileSplitMenu/moveUpOrDown`, query).then(res => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.loadMenuData()
let queryParam = {
menu_id: this.menuId,
info_id: this.infoId
}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
// eventBUs.$emit('searchReset')
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
},
// 树下移
orgmoveDown(){
let query = {
moveFlag:'down',
infoId:this.infoId,
SarFileSplitMenu:{
id:this.nodeItem.id,
pId:this.nodeItem.pid,
displaySeq:this.nodeItem.displaySeq
}
}
postAction(`split/sarFileSplitMenu/moveUpOrDown`, query).then(res => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.loadMenuData()
let queryParam = {
menu_id: this.menuId,
info_id: this.infoId
}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
// eventBUs.$emit('searchReset')
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
},
onContextMenuClick(treeKey, menuKey) {
// console.log(`treeKey: ${treeKey}, menuKey: ${menuKey}`);
},
@@ -231,7 +231,7 @@
:title="$t('brand')">{{$t('brand')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'brand'">
<j-multi-select-tag v-model="formInline.brand"
<j-dict-select-tag v-model="formInline.brand"
:placeholder="$t('PleaseSelect')+$t('brand')"
:type="'select'"
:triggerChange="false" :dictCode="'brand'"/>
@@ -1075,7 +1075,10 @@
} else {
roleCodeIndex = 4
}
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' || this.formInlineRoleSwitching.roleSwitchingCode == '12') {
console.log(this.formInlineRoleSwitching.roleSwitchingCode);
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' ||
this.formInlineRoleSwitching.roleSwitchingCode == '12' ||
this.formInlineRoleSwitching.roleSwitchingCode == '13') {
roleCodeIndex = 0
}
row.roleCodeIndex = roleCodeIndex
@@ -1149,7 +1152,9 @@
} else {
roleCodeIndex = 4
}
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' || this.formInlineRoleSwitching.roleSwitchingCode == '12') {
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' ||
this.formInlineRoleSwitching.roleSwitchingCode == '12'||
this.formInlineRoleSwitching.roleSwitchingCode == '13') {
roleCodeIndex = 0
}
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
@@ -1370,7 +1375,9 @@
this.isDisplay = true
} else {
this.isDisplay = false
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' || this.formInlineRoleSwitching.roleSwitchingCode == '12') {
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' ||
this.formInlineRoleSwitching.roleSwitchingCode == '12' ||
this.formInlineRoleSwitching.roleSwitchingCode == '13') {
this.isRoleSwitching = false
}
}
@@ -1451,7 +1458,9 @@
} else {
roleCodeIndex = 4
}
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' || this.formInlineRoleSwitching.roleSwitchingCode == '12') {
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' ||
this.formInlineRoleSwitching.roleSwitchingCode == '12' ||
this.formInlineRoleSwitching.roleSwitchingCode == '13') {
roleCodeIndex = 0
}
item.roleCodeIndex = roleCodeIndex
@@ -39,7 +39,7 @@
</a-form-item>
</a-col>
</a-row>
<a-row :gutter='24' v-if='viewshow'>
<a-row :gutter='24' v-if='viewshowbrand'>
<a-col :span='24'>
<a-form-item :label="$t('brand')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-multi-select-tag class="box-input" v-model:value="brands"
@@ -96,6 +96,7 @@ export default {
spinLoading: false,
confirmLoading: false,
viewshow: false,
viewshowbrand: false,
selectedRowKeys: [],
roleList: [],
dictOptions: [],
@@ -150,6 +151,11 @@ export default {
this.viewshow = true
})
return
} else if(val.roleCode == 'BrandAdministrator' && item == val.id) {
this.$nextTick(() => {
this.viewshowbrand = true
})
return
}else{
this.viewshow = false
}
@@ -86,7 +86,7 @@
<!-- :placeholder="$t('PleaseSelect')+$t('brand')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'brand'"/>-->
<a-select allowClear mode="multiple" :getPopupContainer="triggerNode => triggerNode.parentNode" :placeholder="$t('PleaseSelect')+$t('engineeringInterfacePerson')"
<a-select allowClear mode="multiple" :getPopupContainer="triggerNode => triggerNode.parentNode" :placeholder="$t('PleaseSelect')+$t('brand')"
v-model="brands">
<a-select-option v-for="(item, key) in brandsList" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.text || item.label ">