Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
+2
-2
@@ -267,10 +267,10 @@ public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl
|
|||||||
String fileName = "";
|
String fileName = "";
|
||||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||||
title = "条款号,条款名称,条款内容,评估人,评估方式,技术文件名称,章节,符合性结果,意见,附件,反馈时间";
|
title = "条款号,条款名称,条款内容,评估人,评估方式,技术文件名称,章节,符合性结果,意见,附件,反馈时间";
|
||||||
fileName = "条款评估结果 " + ".xlsx";
|
fileName = "条款评估结果" + ".xls";
|
||||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||||
title = "Item No.,Item Name,Item Content,Assessor,Evaluation method,Name of technical document,Chapter,Compliance Results,Opinion,Enclosure,Feedback Time";
|
title = "Item No.,Item Name,Item Content,Assessor,Evaluation method,Name of technical document,Chapter,Compliance Results,Opinion,Enclosure,Feedback Time";
|
||||||
fileName = "Item Evaluation results " + ".xlsx";
|
fileName = "Item Evaluation results" + ".xls";
|
||||||
}
|
}
|
||||||
|
|
||||||
OutputStream os = null;
|
OutputStream os = null;
|
||||||
|
|||||||
+2
-1
@@ -51,7 +51,8 @@
|
|||||||
pti.prehomo_person_charge_feedback as "prehomoPersonChargeFeedback",
|
pti.prehomo_person_charge_feedback as "prehomoPersonChargeFeedback",
|
||||||
pti.verify_person_charge_feedback as "verifyPersonChargeFeedback",
|
pti.verify_person_charge_feedback as "verifyPersonChargeFeedback",
|
||||||
plb.studio_engineer as "studioEngineer",
|
plb.studio_engineer as "studioEngineer",
|
||||||
plb.target_market as "targetMarket"
|
plb.target_market as "targetMarket",
|
||||||
|
pti.id as "projectTaskInventoryId"
|
||||||
FROM
|
FROM
|
||||||
project_laws_inventory pli
|
project_laws_inventory pli
|
||||||
LEFT JOIN project_task_inventory pti ON ( pli.id = pti.project_laws_inventory_id )
|
LEFT JOIN project_task_inventory pti ON ( pli.id = pti.project_laws_inventory_id )
|
||||||
|
|||||||
+27
-7
@@ -526,6 +526,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
JSONObject sort = new JSONObject();
|
JSONObject sort = new JSONObject();
|
||||||
|
// JSONObject sort = new JSONObject(new LinkedHashMap<>());
|
||||||
if(StringUtils.isEmpty(selectValue) || StringUtils.equals(selectValue,SEARCH_FLAG)){
|
if(StringUtils.isEmpty(selectValue) || StringUtils.equals(selectValue,SEARCH_FLAG)){
|
||||||
Map<String,Object> createTime = new HashMap<>();
|
Map<String,Object> createTime = new HashMap<>();
|
||||||
Map<String,Object> createTime1 = new HashMap<>();
|
Map<String,Object> createTime1 = new HashMap<>();
|
||||||
@@ -537,7 +538,12 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
|||||||
Map<String,Object> score1 = new HashMap<>();
|
Map<String,Object> score1 = new HashMap<>();
|
||||||
score.put("order","desc");
|
score.put("order","desc");
|
||||||
score1.put("_score",score);
|
score1.put("_score",score);
|
||||||
|
// Map<String,Object> score2 = new HashMap<>();
|
||||||
|
// Map<String,Object> score3 = new HashMap<>();
|
||||||
|
// score2.put("order","desc");
|
||||||
|
// score3.put("_id",score2);
|
||||||
sort.putAll(score1);
|
sort.putAll(score1);
|
||||||
|
// sort.putAll(score3);
|
||||||
}
|
}
|
||||||
log.info("搜索中心-全部索引,排序方式为:" + sort.toJSONString());
|
log.info("搜索中心-全部索引,排序方式为:" + sort.toJSONString());
|
||||||
|
|
||||||
@@ -563,13 +569,13 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
|||||||
if("serial_number".equals(field)){
|
if("serial_number".equals(field)){
|
||||||
map31.put("boost",10);
|
map31.put("boost",10);
|
||||||
}else if("title".equals(field)){
|
}else if("title".equals(field)){
|
||||||
map31.put("boost",10);
|
map31.put("boost",8);
|
||||||
}else if("file_text".equals(field)){
|
}else if("file_text".equals(field)){
|
||||||
map31.put("boost",0.01);
|
map31.put("boost",0.01);
|
||||||
}else if("content".equals(field)){
|
}else if("content".equals(field)){
|
||||||
map31.put("boost",0.01);
|
map31.put("boost",0.01);
|
||||||
}else if("file_name".equals(field)){
|
}else if("file_name".equals(field)){
|
||||||
map31.put("boost",10);
|
map31.put("boost",5);
|
||||||
}
|
}
|
||||||
map31.put("value", selectValue);
|
map31.put("value", selectValue);
|
||||||
map21.put(field + ".keyword", map31);
|
map21.put(field + ".keyword", map31);
|
||||||
@@ -583,13 +589,13 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
|||||||
if("serial_number".equals(field)){
|
if("serial_number".equals(field)){
|
||||||
map32.put("boost",10);
|
map32.put("boost",10);
|
||||||
}else if("title".equals(field)){
|
}else if("title".equals(field)){
|
||||||
map32.put("boost",10);
|
map32.put("boost",8);
|
||||||
}else if("file_text".equals(field)){
|
}else if("file_text".equals(field)){
|
||||||
map32.put("boost",0.01);
|
map32.put("boost",0.01);
|
||||||
}else if("content".equals(field)){
|
}else if("content".equals(field)){
|
||||||
map32.put("boost",0.01);
|
map32.put("boost",0.01);
|
||||||
}else if("file_name".equals(field)){
|
}else if("file_name".equals(field)){
|
||||||
map32.put("boost",10);
|
map32.put("boost",5);
|
||||||
}
|
}
|
||||||
map32.put("query", selectValue);
|
map32.put("query", selectValue);
|
||||||
map22.put(field, map32);
|
map22.put(field, map32);
|
||||||
@@ -604,13 +610,13 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
|||||||
if("serial_number".equals(field)){
|
if("serial_number".equals(field)){
|
||||||
map33.put("boost",10);
|
map33.put("boost",10);
|
||||||
}else if("title".equals(field)){
|
}else if("title".equals(field)){
|
||||||
map33.put("boost",10);
|
map33.put("boost",8);
|
||||||
}else if("file_text".equals(field)){
|
}else if("file_text".equals(field)){
|
||||||
map33.put("boost",0.01);
|
map33.put("boost",0.01);
|
||||||
}else if("content".equals(field)){
|
}else if("content".equals(field)){
|
||||||
map33.put("boost",0.01);
|
map33.put("boost",0.01);
|
||||||
}else if("file_name".equals(field)){
|
}else if("file_name".equals(field)){
|
||||||
map33.put("boost",10);
|
map33.put("boost",5);
|
||||||
}
|
}
|
||||||
map33.put("query", selectValue);
|
map33.put("query", selectValue);
|
||||||
map23.put(field, map33);
|
map23.put(field, map33);
|
||||||
@@ -621,7 +627,21 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
|||||||
//情况举例:用户只记得中间那段字
|
//情况举例:用户只记得中间那段字
|
||||||
Map<String, Object> map24 = new HashMap<>();
|
Map<String, Object> map24 = new HashMap<>();
|
||||||
Map<String, Object> map44 = new HashMap<>();
|
Map<String, Object> map44 = new HashMap<>();
|
||||||
map24.put(field, "*" + selectValue + "*");
|
Map<String, Object> map55 = new HashMap<>();
|
||||||
|
map55.put("value","*" + selectValue + "*");
|
||||||
|
if("serial_number".equals(field)){
|
||||||
|
map55.put("boost",10);
|
||||||
|
}else if("title".equals(field)){
|
||||||
|
map55.put("boost",8);
|
||||||
|
}else if("file_text".equals(field)){
|
||||||
|
map55.put("boost",0.01);
|
||||||
|
}else if("content".equals(field)){
|
||||||
|
map55.put("boost",0.01);
|
||||||
|
}else if("file_name".equals(field)){
|
||||||
|
map55.put("boost",5);
|
||||||
|
}
|
||||||
|
|
||||||
|
map24.put(field, map55);
|
||||||
map44.put("wildcard",map24);
|
map44.put("wildcard",map24);
|
||||||
queryMapJson.add(map44);
|
queryMapJson.add(map44);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,42 +31,45 @@
|
|||||||
<a-input-search style="margin-bottom: 8px" :placeholder="$t('NodeQuickLookup')"
|
<a-input-search style="margin-bottom: 8px" :placeholder="$t('NodeQuickLookup')"
|
||||||
v-model="searchModel" @search="onSearch"/>
|
v-model="searchModel" @search="onSearch"/>
|
||||||
<div class="drawer-content">
|
<div class="drawer-content">
|
||||||
<!-- <virtualNodeTree-->
|
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
|
||||||
<!-- :keeps="50"-->
|
<virtualNodeTree
|
||||||
<!-- show-checkbox-->
|
|
||||||
<!-- v-model="checkboxList"-->
|
|
||||||
<!-- class="treeWrap"-->
|
|
||||||
<!-- :props="{-->
|
|
||||||
<!-- isLeaf: 'leaf'-->
|
|
||||||
<!-- }"-->
|
|
||||||
<!-- :check-strictly="false"-->
|
|
||||||
<!-- node-key="id"-->
|
|
||||||
<!-- @check-change="handleCheckChange"-->
|
|
||||||
<!-- :data="gData">-->
|
|
||||||
<!-- <span slot-scope="{ data }">-->
|
|
||||||
<!-- <span>{{ data.title }}</span>-->
|
|
||||||
<!-- </span>-->
|
|
||||||
<!-- </virtualNodeTree>-->
|
|
||||||
<a-tree
|
|
||||||
style="margin-bottom: 60px;height: 600px"
|
|
||||||
v-if="treeVisible"
|
v-if="treeVisible"
|
||||||
checkable
|
:keeps="40"
|
||||||
checkStrictly
|
show-checkbox
|
||||||
:loading="loading"
|
v-model="checkboxList"
|
||||||
:tree-data="gData"
|
class="treeWrap"
|
||||||
@check="onCheck"
|
:props="{
|
||||||
@expand="onExpand"
|
isLeaf: 'leaf'
|
||||||
v-model:checkedKeys="defaultCheckedKeys"
|
}"
|
||||||
:defaultExpandedKeys="defaultExpandedKeys"
|
:defaultCheckedKeys="defaultCheckedKeys"
|
||||||
>
|
:check-strictly="false"
|
||||||
</a-tree>
|
node-key="id"
|
||||||
|
@check-change="handleCheckChange"
|
||||||
|
:data.sync="gData">
|
||||||
|
<span slot-scope="{ data }">
|
||||||
|
<span>{{ data.title }}</span>
|
||||||
|
</span>
|
||||||
|
</virtualNodeTree>
|
||||||
|
<!-- <a-tree-->
|
||||||
|
<!-- style="margin-bottom: 60px;height: 600px"-->
|
||||||
|
<!-- v-if="treeVisible"-->
|
||||||
|
<!-- checkable-->
|
||||||
|
<!-- checkStrictly-->
|
||||||
|
<!-- :loading="loading"-->
|
||||||
|
<!-- :tree-data="gData"-->
|
||||||
|
<!-- @check="onCheck"-->
|
||||||
|
<!-- @expand="onExpand"-->
|
||||||
|
<!-- v-model:checkedKeys="defaultCheckedKeys"-->
|
||||||
|
<!-- :defaultExpandedKeys="defaultExpandedKeys"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- </a-tree>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-bootom-button">
|
<div class="drawer-bootom-button">
|
||||||
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
|
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
|
||||||
<a-button @click="handleSubmit" type="primary">{{$t('submit')}}</a-button>
|
<a-button @click="handleSubmit" type="primary">{{$t('submit')}}</a-button>
|
||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -78,13 +81,13 @@
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'index',
|
name: 'index',
|
||||||
props: ['query', 'value', 'personneQuery', 'isSingleChoice', 'isInput', 'isClass', 'isDelete', 'disabled'],
|
props: ['query', 'value', 'personneQuery', 'isSingleChoice', 'isInput', 'isClass', 'isDelete', 'disabled', 'selectDepartment'],
|
||||||
components: {
|
components: {
|
||||||
virtualNodeTree
|
virtualNodeTree
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: true,
|
loading: false,
|
||||||
gData: [],
|
gData: [],
|
||||||
autoExpandParent: true,
|
autoExpandParent: true,
|
||||||
checkboxList: [],
|
checkboxList: [],
|
||||||
@@ -99,7 +102,8 @@
|
|||||||
defaultExpandedKeys: [],
|
defaultExpandedKeys: [],
|
||||||
defaultCheckedKeys: [],
|
defaultCheckedKeys: [],
|
||||||
defaultCheckedKeysName: [],
|
defaultCheckedKeysName: [],
|
||||||
content: []
|
content: [],
|
||||||
|
dataList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -107,23 +111,69 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleCheckChange(val, checked, indeterminate) {
|
handleCheckChange(val, checked, indeterminate) {
|
||||||
console.log(val)
|
if (checked) {
|
||||||
console.log(this.checkboxList)
|
this.userName.push(val.title)
|
||||||
|
this.userIds.push(val.id)
|
||||||
|
} else {
|
||||||
|
for (let i = 0; i < this.userName.length; i++) {
|
||||||
|
if (this.userName[i] == val.title) {
|
||||||
|
this.userName.splice(i, 1)
|
||||||
|
i--
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (let i = 0; i < this.userIds.length; i++) {
|
||||||
|
if (this.userIds[i] == val.id) {
|
||||||
|
this.userIds.splice(i, 1)
|
||||||
|
i--
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
standardClick() {
|
standardClick() {
|
||||||
|
this.visible = true
|
||||||
this.treeVisible = false
|
this.treeVisible = false
|
||||||
this.departId = ''
|
this.departId = ''
|
||||||
this.searchModel = ''
|
this.searchModel = ''
|
||||||
this.userIds = []
|
|
||||||
this.userName = []
|
this.userName = []
|
||||||
|
this.userIds = []
|
||||||
let gData = localStorage.getItem('gData')
|
let gData = localStorage.getItem('gData')
|
||||||
// if (gData) {
|
if (gData) {
|
||||||
// this.gData = this.toTree(JSON.parse(gData))
|
let dataList = JSON.parse(gData)
|
||||||
// this.treeVisible = true
|
if (!this.selectDepartment) {
|
||||||
// } else {
|
dataList.forEach(res => {
|
||||||
this.queryDepartUserTreeList(1)
|
if (res.type == 'Depart') {
|
||||||
// }
|
res.disabled = true
|
||||||
this.visible = true
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.dataList = this.toTree(dataList)
|
||||||
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
if (gData) {
|
||||||
|
this.gData = this.dataList
|
||||||
|
this.gData = [...this.gData]
|
||||||
|
// this.treeVisible = true
|
||||||
|
if (this.personneQuery[this.query.db_field_name + 'Name']) {
|
||||||
|
this.userName = this.personneQuery[this.query.db_field_name + 'Name'].split(',')
|
||||||
|
} else if (this.personneQuery[this.query.db_field_name]) {
|
||||||
|
this.userName = this.personneQuery[this.query.db_field_name].split(',')
|
||||||
|
} else {
|
||||||
|
this.userName = []
|
||||||
|
}
|
||||||
|
if (this.personneQuery[this.query.db_field_name + '_id']) {
|
||||||
|
this.userIds = this.personneQuery[this.query.db_field_name + '_id'].split(',')
|
||||||
|
} else if (this.personneQuery[this.query.db_field_name]) {
|
||||||
|
this.userIds = this.personneQuery[this.query.db_field_name].split(',')
|
||||||
|
} else {
|
||||||
|
this.userIds = []
|
||||||
|
}
|
||||||
|
this.defaultCheckedKeys = this.userIds
|
||||||
|
this.defaultCheckedKeys = [...this.defaultCheckedKeys]
|
||||||
|
this.treeVisible = true
|
||||||
|
} else {
|
||||||
|
this.queryDepartUserTreeList(1)
|
||||||
|
}
|
||||||
|
}, 200)
|
||||||
},
|
},
|
||||||
//将数据拼成树形结构
|
//将数据拼成树形结构
|
||||||
toTree(config) {
|
toTree(config) {
|
||||||
@@ -233,6 +283,12 @@
|
|||||||
}
|
}
|
||||||
let userIds = JSON.parse(JSON.stringify(this.userIds))
|
let userIds = JSON.parse(JSON.stringify(this.userIds))
|
||||||
let userName = JSON.parse(JSON.stringify(this.userName))
|
let userName = JSON.parse(JSON.stringify(this.userName))
|
||||||
|
userName = userName.filter(function(item, index) {
|
||||||
|
return userName.indexOf(item) === index // 因为indexOf 只能查找到第一个
|
||||||
|
})
|
||||||
|
userIds = userIds.filter(function(item, index) {
|
||||||
|
return userIds.indexOf(item) === index // 因为indexOf 只能查找到第一个
|
||||||
|
})
|
||||||
this.$emit('input', userName.join(','))
|
this.$emit('input', userName.join(','))
|
||||||
this.$emit('change', this.query.db_field_name, userIds.join(','), this.query.subscript)
|
this.$emit('change', this.query.db_field_name, userIds.join(','), this.query.subscript)
|
||||||
this.visible = false
|
this.visible = false
|
||||||
@@ -250,88 +306,132 @@
|
|||||||
this.defaultCheckedKeys = []
|
this.defaultCheckedKeys = []
|
||||||
},
|
},
|
||||||
onSearch(e) {
|
onSearch(e) {
|
||||||
this.gData = []
|
this.loading = true
|
||||||
this.departId = ''
|
// this.treeVisible = false
|
||||||
this.visibleTree = false
|
let p = new Promise((resolve, reject) => {
|
||||||
if (e) {
|
resolve()
|
||||||
this.getUserAndDepart()
|
|
||||||
} else {
|
|
||||||
this.treeVisible = false
|
|
||||||
this.queryDepartUserTreeList(2)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getUserAndDepart() {
|
|
||||||
getAction('sys/user/getUserAndDepart', { name: this.searchModel }).then((res) => {
|
|
||||||
if (res) {
|
|
||||||
this.gData = res.filter(ele => ele.flag === 'DEPART')
|
|
||||||
} else {
|
|
||||||
this.gData = []
|
|
||||||
}
|
|
||||||
this.visibleTree = true
|
|
||||||
})
|
})
|
||||||
},
|
p.then(() => {
|
||||||
onExpand(selectedKeys, val) {
|
let gData = localStorage.getItem('gData')
|
||||||
if (this.searchModel == '' || !this.searchModel) {
|
let content = []
|
||||||
if (val.expanded) {
|
if (gData) {
|
||||||
if (this.departId == val.node.value) {
|
if (e) {
|
||||||
|
JSON.parse(gData).forEach(res => {
|
||||||
|
if (res.type == 'User') {
|
||||||
|
if (res.name.includes(e)) {
|
||||||
|
content.push(res)
|
||||||
|
}
|
||||||
|
} else if (res.type == 'Depart') {
|
||||||
|
content.push(res)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.gData = this.toTree(content)
|
||||||
} else {
|
} else {
|
||||||
this.departId = val.node.value
|
this.gData = this.toTree(JSON.parse(gData))
|
||||||
this.queryDepartUserTreeList(2)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
this.defaultCheckedKeys = this.userIds
|
||||||
|
this.defaultCheckedKeys = [...this.defaultCheckedKeys]
|
||||||
|
// this.treeVisible = true
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
// this.gData = []
|
||||||
|
// this.departId = ''
|
||||||
|
// this.visibleTree = false
|
||||||
|
// if (e) {
|
||||||
|
// this.getUserAndDepart()
|
||||||
|
// } else {
|
||||||
|
// this.treeVisible = false
|
||||||
|
// this.queryDepartUserTreeList(2)
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
|
// getUserAndDepart() {
|
||||||
|
// getAction('sys/user/getUserAndDepart', { name: this.searchModel }).then((res) => {
|
||||||
|
// if (res) {
|
||||||
|
// this.gData = res.filter(ele => ele.flag === 'DEPART')
|
||||||
|
// } else {
|
||||||
|
// this.gData = []
|
||||||
|
// }
|
||||||
|
// this.visibleTree = true
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
// onExpand(selectedKeys, val) {
|
||||||
|
// if (this.searchModel == '' || !this.searchModel) {
|
||||||
|
// if (val.expanded) {
|
||||||
|
// if (this.departId == val.node.value) {
|
||||||
|
// } else {
|
||||||
|
// this.departId = val.node.value
|
||||||
|
// this.queryDepartUserTreeList(2)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// },
|
||||||
queryDepartUserTreeList(num) {
|
queryDepartUserTreeList(num) {
|
||||||
let gData = JSON.parse(JSON.stringify(this.gData))
|
// let gData = JSON.parse(JSON.stringify(this.gData))
|
||||||
if (gData && gData.length > 0) {
|
// if (gData && gData.length > 0) {
|
||||||
gData = JSON.stringify(gData)
|
// gData = JSON.stringify(gData)
|
||||||
} else {
|
// } else {
|
||||||
gData = ''
|
// gData = ''
|
||||||
}
|
// }
|
||||||
this.confirmLoading = true
|
this.confirmLoading = true
|
||||||
|
this.loading = true
|
||||||
//queryDepartUserTreeList
|
//queryDepartUserTreeList
|
||||||
//queryUserTreeList
|
//queryUserTreeList
|
||||||
postAction('sys/user/queryDepartUserTreeList', {
|
getAction('sys/user/queryUserTreeList', {
|
||||||
departId: this.departId,
|
// departId: this.departId,
|
||||||
json: gData,
|
// json: gData,
|
||||||
flag: '1'
|
// flag: '1'
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
this.confirmLoading = false
|
this.confirmLoading = false
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
// localStorage.setItem('gData', JSON.stringify(res.result))
|
// localStorage.setItem('gData', JSON.stringify(res.result))
|
||||||
this.gData = res.result
|
// this.toTree(dataList)
|
||||||
|
let content = JSON.parse(JSON.stringify(res.result))
|
||||||
|
if (!this.selectDepartment) {
|
||||||
|
res.result.forEach(res => {
|
||||||
|
if (res.type == 'Depart') {
|
||||||
|
res.disabled = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
localStorage.removeItem('gData')
|
||||||
|
localStorage.setItem('gData', JSON.stringify(content))
|
||||||
|
this.gData = this.toTree(res.result)
|
||||||
|
console.log(this.gData)
|
||||||
|
this.gData = [...this.gData]
|
||||||
// this.gData[0].isLeaf = false
|
// this.gData[0].isLeaf = false
|
||||||
this.defaultExpandedKeys = [this.departId]
|
// this.defaultExpandedKeys = [this.departId]
|
||||||
if (num == 1) {
|
if (num == 1) {
|
||||||
if (this.userName && this.userName.length == 0) {
|
// if (this.userName && this.userName.length == 0) {
|
||||||
if (this.personneQuery[this.query.db_field_name + 'Name']) {
|
if (this.personneQuery[this.query.db_field_name + 'Name']) {
|
||||||
this.userName = this.personneQuery[this.query.db_field_name + 'Name'].split(',')
|
this.userName = this.personneQuery[this.query.db_field_name + 'Name'].split(',')
|
||||||
} else if (this.personneQuery[this.query.db_field_name]) {
|
} else if (this.personneQuery[this.query.db_field_name]) {
|
||||||
this.userName = this.personneQuery[this.query.db_field_name].split(',')
|
this.userName = this.personneQuery[this.query.db_field_name].split(',')
|
||||||
} else {
|
} else {
|
||||||
this.userName = []
|
this.userName = []
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (this.userIds && this.userIds.length == 0) {
|
// }
|
||||||
if (this.personneQuery[this.query.db_field_name + '_id']) {
|
// if (this.userIds && this.userIds.length == 0) {
|
||||||
this.userIds = this.personneQuery[this.query.db_field_name + '_id'].split(',')
|
if (this.personneQuery[this.query.db_field_name + '_id']) {
|
||||||
} else if (this.personneQuery[this.query.db_field_name]) {
|
this.userIds = this.personneQuery[this.query.db_field_name + '_id'].split(',')
|
||||||
this.userIds = this.personneQuery[this.query.db_field_name].split(',')
|
} else if (this.personneQuery[this.query.db_field_name]) {
|
||||||
} else {
|
this.userIds = this.personneQuery[this.query.db_field_name].split(',')
|
||||||
this.userIds = []
|
} else {
|
||||||
}
|
this.userIds = []
|
||||||
}
|
}
|
||||||
|
// }
|
||||||
this.defaultCheckedKeys = this.userIds
|
this.defaultCheckedKeys = this.userIds
|
||||||
this.defaultCheckedKeysName = []
|
this.defaultCheckedKeys = [...this.defaultCheckedKeys]
|
||||||
if (this.defaultCheckedKeys.length > 0) {
|
// this.defaultCheckedKeysName = []
|
||||||
for (let i = 0; i < this.defaultCheckedKeys.length; i++) {
|
// if (this.defaultCheckedKeys.length > 0) {
|
||||||
this.defaultCheckedKeysName.push({
|
// for (let i = 0; i < this.defaultCheckedKeys.length; i++) {
|
||||||
id: this.defaultCheckedKeys[i],
|
// this.defaultCheckedKeysName.push({
|
||||||
name: this.userName[i]
|
// id: this.defaultCheckedKeys[i],
|
||||||
})
|
// name: this.userName[i]
|
||||||
}
|
// })
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
this.treeVisible = true
|
this.treeVisible = true
|
||||||
} else {
|
} else {
|
||||||
@@ -378,6 +478,7 @@
|
|||||||
.drawer-content {
|
.drawer-content {
|
||||||
height: calc(100% - 60px);
|
height: calc(100% - 60px);
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-tree {
|
.my-tree {
|
||||||
|
|||||||
@@ -142,6 +142,14 @@ const user = {
|
|||||||
//Vue.ls.set(USER_AUTH,authData);
|
//Vue.ls.set(USER_AUTH,authData);
|
||||||
sessionStorage.setItem(USER_AUTH, JSON.stringify(authData))
|
sessionStorage.setItem(USER_AUTH, JSON.stringify(authData))
|
||||||
sessionStorage.setItem(SYS_BUTTON_AUTH, JSON.stringify(allAuthData))
|
sessionStorage.setItem(SYS_BUTTON_AUTH, JSON.stringify(allAuthData))
|
||||||
|
let gData = localStorage.getItem('gData')
|
||||||
|
if (!gData) {
|
||||||
|
getAction('sys/user/queryUserTreeList', {}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
localStorage.setItem('gData', JSON.stringify(res.result))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
if (menuData && menuData.length > 0) {
|
if (menuData && menuData.length > 0) {
|
||||||
//update--begin--autor:qinfeng-----date:20200109------for:JEECG-63 一级菜单的子菜单全部是隐藏路由,则一级菜单不显示------
|
//update--begin--autor:qinfeng-----date:20200109------for:JEECG-63 一级菜单的子菜单全部是隐藏路由,则一级菜单不显示------
|
||||||
menuData.forEach((item, index) => {
|
menuData.forEach((item, index) => {
|
||||||
@@ -178,6 +186,7 @@ const user = {
|
|||||||
Vue.ls.remove(USER_NAME)
|
Vue.ls.remove(USER_NAME)
|
||||||
Vue.ls.remove(UI_CACHE_DB_DICT_DATA)
|
Vue.ls.remove(UI_CACHE_DB_DICT_DATA)
|
||||||
Vue.ls.remove(CACHE_INCLUDED_ROUTES)
|
Vue.ls.remove(CACHE_INCLUDED_ROUTES)
|
||||||
|
localStorage.removeItem('gData')
|
||||||
//console.log('logoutToken: '+ logoutToken)
|
//console.log('logoutToken: '+ logoutToken)
|
||||||
logout(logoutToken).then(() => {
|
logout(logoutToken).then(() => {
|
||||||
if (process.env.VUE_APP_SSO == 'true') {
|
if (process.env.VUE_APP_SSO == 'true') {
|
||||||
|
|||||||
@@ -208,6 +208,7 @@
|
|||||||
<a-form-model-item class="itemModel" prop="authManageIdsName">
|
<a-form-model-item class="itemModel" prop="authManageIdsName">
|
||||||
<PersonnelSelection class="box-input add-input"
|
<PersonnelSelection class="box-input add-input"
|
||||||
:personneQuery="form"
|
:personneQuery="form"
|
||||||
|
selectDepartment
|
||||||
:query="{db_field_name:'authManageIds',db_field_txt:$t('Administrativeprivileges')}"
|
:query="{db_field_name:'authManageIds',db_field_txt:$t('Administrativeprivileges')}"
|
||||||
@change="PersonnelSelectionChange"
|
@change="PersonnelSelectionChange"
|
||||||
v-model="form.authManageIdsName"/>
|
v-model="form.authManageIdsName"/>
|
||||||
@@ -225,6 +226,7 @@
|
|||||||
<a-form-model-item class="itemModel" prop="authViewIdsName">
|
<a-form-model-item class="itemModel" prop="authViewIdsName">
|
||||||
<PersonnelSelection
|
<PersonnelSelection
|
||||||
class="box-input add-input"
|
class="box-input add-input"
|
||||||
|
selectDepartment
|
||||||
:personneQuery="form"
|
:personneQuery="form"
|
||||||
:query="{db_field_name:'authViewIds',db_field_txt:$t('Checkthepermissions')}"
|
:query="{db_field_name:'authViewIds',db_field_txt:$t('Checkthepermissions')}"
|
||||||
@change="PersonnelSelectionChange"
|
@change="PersonnelSelectionChange"
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
{
|
{
|
||||||
title: this.$t('MenuName'),
|
title: this.$t('MenuName'),
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
key: 'name',
|
key: 'name',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 180
|
width: 180
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
{
|
{
|
||||||
title: this.$t('MenuEnName'),
|
title: this.$t('MenuEnName'),
|
||||||
dataIndex: 'menuEn',
|
dataIndex: 'menuEn',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
key: 'menuEn',
|
key: 'menuEn',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 180
|
width: 180
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
{
|
{
|
||||||
title: 'icon',
|
title: 'icon',
|
||||||
dataIndex: 'icon',
|
dataIndex: 'icon',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
key: 'icon',
|
key: 'icon',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 180
|
width: 180
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
{
|
{
|
||||||
title: this.$t('assembly'),
|
title: this.$t('assembly'),
|
||||||
dataIndex: 'component',
|
dataIndex: 'component',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
key: 'component',
|
key: 'component',
|
||||||
width: 240,
|
width: 240,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
{
|
{
|
||||||
title: this.$t('route'),
|
title: this.$t('route'),
|
||||||
dataIndex: 'url',
|
dataIndex: 'url',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
key: 'url',
|
key: 'url',
|
||||||
width: 240,
|
width: 240,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
{
|
{
|
||||||
title: this.$t('sort'),
|
title: this.$t('sort'),
|
||||||
dataIndex: 'sortNo',
|
dataIndex: 'sortNo',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
width: 80,
|
width: 80,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: 'sortNo'
|
key: 'sortNo'
|
||||||
|
|||||||
Reference in New Issue
Block a user