Commit 302ec7aa authored by gaoyan's avatar gaoyan

可见范围及选部门代码提交

parent 2fa73afe
This diff is collapsed.
export default {
// name: '$util',
// install: {
/**
* @description
* @param {Function} fn 处理函数
* @param {Number} delay 延时时间(ms)
*/
Debounce(fn, delay) {
let timeout;
return function() {
clearTimeout(timeout);
let args = arguments;
let context = this;
timeout = setTimeout(() => {
fn.apply(context, args);
}, delay);
};
},
//数组去重
deduplication(array,key){
let hash = {};
array = array.reduce((preVal, curVal) => {
hash[curVal[key]] ? '' : hash[curVal[key]] = true && preVal.push(curVal);
return preVal
}, [])
return array;
},
// }
}
...@@ -354,8 +354,8 @@ ...@@ -354,8 +354,8 @@
this.recommendList = res.data; this.recommendList = res.data;
for (const i in res.data) { for (const i in res.data) {
const obj = { const obj = {
name: '李太友', name: res.data[i].targetName,
accountId: '133' id: res.data[i].targetId
}; };
if (res.data[i].type === '1') { if (res.data[i].type === '1') {
// 推荐的是部门 // 推荐的是部门
...@@ -363,11 +363,6 @@ ...@@ -363,11 +363,6 @@
} }
defaulSelectRe.push(obj); defaulSelectRe.push(obj);
} }
const aa =
{ accountId: '133',
name: '李太友' };
console.log('dfdf1', defaulSelectRe);
console.log('dfdf2', [aa]);
this.organizationData.allselectedData = defaulSelectRe; this.organizationData.allselectedData = defaulSelectRe;
this.organizationData.openDialog = true; this.organizationData.openDialog = true;
this.organizationData = JSON.parse(JSON.stringify(this.organizationData)); this.organizationData = JSON.parse(JSON.stringify(this.organizationData));
...@@ -394,6 +389,8 @@ ...@@ -394,6 +389,8 @@
// 选中部门及人员后,提交推荐数据 // 选中部门及人员后,提交推荐数据
getPeopleDialoResult(res) { getPeopleDialoResult(res) {
console.log('getPeopleDialoResult', res); console.log('getPeopleDialoResult', res);
this.recommendSelectData.recommendDepart = [];
this.recommendSelectData.recommendPerson = [];
for (const i in res) { for (const i in res) {
if (res[i].isDept) { if (res[i].isDept) {
this.recommendSelectData.recommendDepart.push(res[i].id); this.recommendSelectData.recommendDepart.push(res[i].id);
...@@ -531,10 +528,18 @@ ...@@ -531,10 +528,18 @@
} }
} }
.show_people_modal { .show_people_modal {
height: 100%;
.ant-modal-content { .ant-modal-content {
position: fixed; /*position: fixed;*/
height: 95%; height: 95%;
width: 520px; // width: 520px;
&:before{
content: " ";
position: absolute;
top: 0;
right: 0;
bottom: 0;
}
.ant-modal-body { .ant-modal-body {
height: 82%; height: 82%;
.modal_tag_div { .modal_tag_div {
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
:dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }" :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
:treeData="departTreeList" :treeData="departTreeList"
placeholder="请选择" placeholder="请选择"
treeDefaultExpandAll
v-model="queryParam.depart" v-model="queryParam.depart"
> >
<a-icon type="caret-down" slot="suffixIcon"/> <a-icon type="caret-down" slot="suffixIcon"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment