|
|
@ -3,49 +3,53 @@ |
|
|
@ 时间: 2023-07-07 09:11:55 |
|
|
@ 时间: 2023-07-07 09:11:55 |
|
|
@ 备注: 选择行政组织 |
|
|
@ 备注: 选择行政组织 |
|
|
--> |
|
|
--> |
|
|
<script lang='ts' setup> |
|
|
<script lang="ts" setup> |
|
|
import { Search } from '@element-plus/icons-vue' //搜索图标 |
|
|
import { Search } from "@element-plus/icons-vue"; //搜索图标 |
|
|
import { ElDivider } from 'element-plus' |
|
|
import { ElDivider } from "element-plus"; |
|
|
import { orgInfo,breadCrumbs,employeesCont,childDepartmentsCont } from '@/api/displayboardapi/types' |
|
|
import { |
|
|
import { getOrgChiled,getBasisOrgChiled } from '@/api/displayboardapi/indexapi' |
|
|
orgInfo, |
|
|
import { shuttleFramePickData } from '@/api/matrixapi/type' |
|
|
breadCrumbs, |
|
|
|
|
|
employeesCont, |
|
|
|
|
|
childDepartmentsCont, |
|
|
|
|
|
} from "@/api/displayboardapi/types"; |
|
|
|
|
|
import { getOrgChiled, getBasisOrgChiled } from "@/api/displayboardapi/indexapi"; |
|
|
|
|
|
import { shuttleFramePickData } from "@/api/matrixapi/type"; |
|
|
|
|
|
|
|
|
import { queryPeopleCont } from '@/api/hr/people/type' |
|
|
import { queryPeopleCont } from "@/api/hr/people/type"; |
|
|
import { searchUserCont } from '@/api/hr/people/index' |
|
|
import { searchUserCont } from "@/api/hr/people/index"; |
|
|
|
|
|
|
|
|
|
|
|
const spacer = h(ElDivider, { direction: "vertical" }); |
|
|
const spacer = h(ElDivider, { direction: 'vertical' }) |
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
const props = defineProps({ |
|
|
orgBoxShow: { |
|
|
orgBoxShow: { |
|
|
type: Boolean, |
|
|
type: Boolean, |
|
|
default:false |
|
|
default: false, |
|
|
}, |
|
|
}, |
|
|
ismultiselect: { |
|
|
ismultiselect: { |
|
|
type: Boolean, |
|
|
type: Boolean, |
|
|
default:false |
|
|
default: false, |
|
|
}, |
|
|
}, |
|
|
tabledata: { |
|
|
tabledata: { |
|
|
type: Object, |
|
|
type: Object, |
|
|
default() { |
|
|
default() { |
|
|
return {} |
|
|
return {}; |
|
|
} |
|
|
}, |
|
|
} |
|
|
}, |
|
|
}); |
|
|
}); |
|
|
const emits = defineEmits(["update:orgBoxShow"]); //父级元素 |
|
|
const emits = defineEmits(["update:orgBoxShow"]); //父级元素 |
|
|
const dialogTitle = ref<string>() |
|
|
const dialogTitle = ref<string>(); |
|
|
const addOrgUserLoading = ref(false); |
|
|
const addOrgUserLoading = ref(false); |
|
|
const searchKeywords = ref<string>() |
|
|
const searchKeywords = ref<string>(); |
|
|
const keywordsTitle = ref<string>() |
|
|
const keywordsTitle = ref<string>(); |
|
|
const orgInfoList = ref<orgInfo[]>() |
|
|
const orgInfoList = ref<orgInfo[]>(); |
|
|
const orgBreadCrumbs = ref<breadCrumbs[]>() |
|
|
const orgBreadCrumbs = ref<breadCrumbs[]>(); |
|
|
const employees = ref<employeesCont[]>() |
|
|
const employees = ref<employeesCont[]>(); |
|
|
const childDepartments = ref<childDepartmentsCont[]>() |
|
|
const childDepartments = ref<childDepartmentsCont[]>(); |
|
|
const isCheckBox = ref(false); //是否多选 |
|
|
const isCheckBox = ref(false); //是否多选 |
|
|
const pickDataList = ref<any>() |
|
|
const pickDataList = ref<any>(); |
|
|
const duoxuanVal = reactive<shuttleFramePickData[]>([]) |
|
|
const duoxuanVal = reactive<shuttleFramePickData[]>([]); |
|
|
// const danxuanVal = ref<shuttleFramePickData>() |
|
|
// const danxuanVal = ref<shuttleFramePickData>() |
|
|
const countPick=ref(0) |
|
|
const countPick = ref(0); |
|
|
/** |
|
|
/** |
|
|
* 弹窗显示控制 |
|
|
* 弹窗显示控制 |
|
|
*/ |
|
|
*/ |
|
|
@ -61,12 +65,12 @@ const pickorg_is_Show = computed({ |
|
|
function closeBox() { |
|
|
function closeBox() { |
|
|
// eslint-disable-next-line vue/no-mutating-props |
|
|
// eslint-disable-next-line vue/no-mutating-props |
|
|
props.tabledata.isedit = false; |
|
|
props.tabledata.isedit = false; |
|
|
pickDataList.value =[] |
|
|
pickDataList.value = []; |
|
|
orgInfoList.value = [] |
|
|
orgInfoList.value = []; |
|
|
duoxuanVal.slice(0,duoxuanVal.length) |
|
|
duoxuanVal.slice(0, duoxuanVal.length); |
|
|
let emptyOrg = new Array |
|
|
let emptyOrg = new Array(); |
|
|
duoxuanVal.length = 0 |
|
|
duoxuanVal.length = 0; |
|
|
searchKeywords.value="" |
|
|
searchKeywords.value = ""; |
|
|
// //console.log("关闭弹窗",duoxuanVal) |
|
|
// //console.log("关闭弹窗",duoxuanVal) |
|
|
// eslint-disable-next-line vue/no-mutating-props |
|
|
// eslint-disable-next-line vue/no-mutating-props |
|
|
// props.tabledata.namelist=["秦东","马飞"] |
|
|
// props.tabledata.namelist=["秦东","马飞"] |
|
|
@ -79,12 +83,12 @@ function getOrgList(orgId:number){ |
|
|
getOrgChiled({ id: orgId }) |
|
|
getOrgChiled({ id: orgId }) |
|
|
.then(({ data }) => { |
|
|
.then(({ data }) => { |
|
|
// //console.log("获取行政组织",data) |
|
|
// //console.log("获取行政组织",data) |
|
|
orgInfoList.value = data.list |
|
|
orgInfoList.value = data.list; |
|
|
orgBreadCrumbs.value = data.tabval |
|
|
orgBreadCrumbs.value = data.tabval; |
|
|
}) |
|
|
}) |
|
|
.finally(() => { |
|
|
.finally(() => { |
|
|
isPick() |
|
|
isPick(); |
|
|
}) |
|
|
}); |
|
|
} |
|
|
} |
|
|
/** |
|
|
/** |
|
|
* 判断是否选中 |
|
|
* 判断是否选中 |
|
|
@ -93,156 +97,156 @@ function isPick(id?:number|string){ |
|
|
// //console.log("orgInfoList->",orgInfoList) |
|
|
// //console.log("orgInfoList->",orgInfoList) |
|
|
// //console.log("pickDataList->",pickDataList) |
|
|
// //console.log("pickDataList->",pickDataList) |
|
|
if (pickDataList.value && pickDataList.value.length > 0) { |
|
|
if (pickDataList.value && pickDataList.value.length > 0) { |
|
|
orgInfoList.value?.forEach(item=>{ |
|
|
orgInfoList.value?.forEach((item) => { |
|
|
if (id == item.id) { |
|
|
if (id == item.id) { |
|
|
item.isActiveItem = false |
|
|
item.isActiveItem = false; |
|
|
} |
|
|
} |
|
|
pickDataList.value.forEach((items: any) => { |
|
|
pickDataList.value.forEach((items: any) => { |
|
|
if (item.id == items.id) { |
|
|
if (item.id == items.id) { |
|
|
item.isActiveItem = true |
|
|
item.isActiveItem = true; |
|
|
} |
|
|
} |
|
|
}) |
|
|
}); |
|
|
}) |
|
|
}); |
|
|
employees.value?.forEach(item=>{ |
|
|
employees.value?.forEach((item) => { |
|
|
if (id == item.id) { |
|
|
if (id == item.id) { |
|
|
item.ispick = false |
|
|
item.ispick = false; |
|
|
} |
|
|
} |
|
|
pickDataList.value.forEach((items: any) => { |
|
|
pickDataList.value.forEach((items: any) => { |
|
|
if (item.id == items.id) { |
|
|
if (item.id == items.id) { |
|
|
item.ispick = true |
|
|
item.ispick = true; |
|
|
} |
|
|
} |
|
|
}) |
|
|
}); |
|
|
}) |
|
|
}); |
|
|
} else { |
|
|
} else { |
|
|
orgInfoList.value?.forEach(item=>{ |
|
|
orgInfoList.value?.forEach((item) => { |
|
|
if (id == item.id) { |
|
|
if (id == item.id) { |
|
|
item.isActiveItem = false |
|
|
item.isActiveItem = false; |
|
|
} |
|
|
} |
|
|
}) |
|
|
}); |
|
|
employees.value?.forEach(items=>{ |
|
|
employees.value?.forEach((items) => { |
|
|
if (id == items.id) { |
|
|
if (id == items.id) { |
|
|
items.ispick = false |
|
|
items.ispick = false; |
|
|
} |
|
|
} |
|
|
}) |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
/** |
|
|
/** |
|
|
* 监听数据 |
|
|
* 监听数据 |
|
|
*/ |
|
|
*/ |
|
|
watch(() => props.orgBoxShow,() => { |
|
|
watch( |
|
|
duoxuanVal.slice(0,duoxuanVal.length) |
|
|
() => props.orgBoxShow, |
|
|
|
|
|
() => { |
|
|
|
|
|
duoxuanVal.slice(0, duoxuanVal.length); |
|
|
if (props.orgBoxShow) { |
|
|
if (props.orgBoxShow) { |
|
|
isCheckBox.value = props.ismultiselect |
|
|
isCheckBox.value = props.ismultiselect; |
|
|
pickDataList.value = props.tabledata.userlist |
|
|
pickDataList.value = props.tabledata.userlist; |
|
|
// //console.log("监听数据-----sd3------>",isCheckBox.value) |
|
|
// //console.log("监听数据-----sd3------>",isCheckBox.value) |
|
|
switch (props.tabledata.types) { |
|
|
switch (props.tabledata.types) { |
|
|
case 2: |
|
|
case 2: |
|
|
dialogTitle.value = "选择行政组织" |
|
|
dialogTitle.value = "选择行政组织"; |
|
|
keywordsTitle.value = "请输入关键字" |
|
|
keywordsTitle.value = "请输入关键字"; |
|
|
break; |
|
|
break; |
|
|
case 3: |
|
|
case 3: |
|
|
dialogTitle.value = "选择分部" |
|
|
dialogTitle.value = "选择分部"; |
|
|
keywordsTitle.value = "请输入关键字" |
|
|
keywordsTitle.value = "请输入关键字"; |
|
|
break; |
|
|
break; |
|
|
default: |
|
|
default: |
|
|
dialogTitle.value = "选择成员" |
|
|
dialogTitle.value = "选择成员"; |
|
|
keywordsTitle.value = "请输入姓名或工号" |
|
|
keywordsTitle.value = "请输入姓名或工号"; |
|
|
} |
|
|
} |
|
|
if (props.tabledata.types > 1) { |
|
|
if (props.tabledata.types > 1) { |
|
|
getOrgList(313) |
|
|
getOrgList(313); |
|
|
} else { |
|
|
} else { |
|
|
getOrgAndPeople(313) |
|
|
getOrgAndPeople(313); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
} |
|
|
|
|
|
); |
|
|
/** |
|
|
/** |
|
|
* 选定值 |
|
|
* 选定值 |
|
|
*/ |
|
|
*/ |
|
|
function pickval(cont: any) { |
|
|
function pickval(cont: any) { |
|
|
|
|
|
|
|
|
// //console.log("选定在----》",duoxuanVal) |
|
|
// //console.log("选定在----》",duoxuanVal) |
|
|
if (isCheckBox.value) { |
|
|
if (isCheckBox.value) { |
|
|
cont.isActiveItem = true |
|
|
cont.isActiveItem = true; |
|
|
let xieRu = true; |
|
|
let xieRu = true; |
|
|
duoxuanVal.forEach(item =>{ |
|
|
duoxuanVal.forEach((item) => { |
|
|
if (item.id == cont.id) { |
|
|
if (item.id == cont.id) { |
|
|
xieRu = false; |
|
|
xieRu = false; |
|
|
} |
|
|
} |
|
|
}) |
|
|
}); |
|
|
if (xieRu) { |
|
|
if (xieRu) { |
|
|
duoxuanVal.push({ |
|
|
duoxuanVal.push({ |
|
|
id: cont.id.toString(), |
|
|
id: cont.id.toString(), |
|
|
name: cont.name, |
|
|
name: cont.name, |
|
|
icon:"" |
|
|
icon: "", |
|
|
}) |
|
|
}); |
|
|
pickDataList.value = duoxuanVal |
|
|
pickDataList.value = duoxuanVal; |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
pickDataList.value = [ |
|
|
pickDataList.value = [ |
|
|
{ |
|
|
{ |
|
|
id: cont.id.toString(), |
|
|
id: cont.id.toString(), |
|
|
name: cont.name, |
|
|
name: cont.name, |
|
|
icon:"" |
|
|
icon: "", |
|
|
} |
|
|
}, |
|
|
] |
|
|
]; |
|
|
orgInfoList.value?.forEach(item=>{ |
|
|
orgInfoList.value?.forEach((item) => { |
|
|
if (cont.id == item.id) { |
|
|
if (cont.id == item.id) { |
|
|
item.isActiveItem = true |
|
|
item.isActiveItem = true; |
|
|
} else { |
|
|
} else { |
|
|
item.isActiveItem = false |
|
|
item.isActiveItem = false; |
|
|
} |
|
|
} |
|
|
}) |
|
|
}); |
|
|
} |
|
|
} |
|
|
countPick.value = pickDataList.value.length |
|
|
countPick.value = pickDataList.value.length; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
/** |
|
|
/** |
|
|
* 选定人员 |
|
|
* 选定人员 |
|
|
*/ |
|
|
*/ |
|
|
function pickuserval(cont: any) { |
|
|
function pickuserval(cont: any) { |
|
|
if (cont.ispick) { |
|
|
if (cont.ispick) { |
|
|
cont.ispick = false |
|
|
cont.ispick = false; |
|
|
let dxval = new Array |
|
|
let dxval = new Array(); |
|
|
pickDataList.value.forEach((item: any) => { |
|
|
pickDataList.value.forEach((item: any) => { |
|
|
if (item.id != cont.id) { |
|
|
if (item.id != cont.id) { |
|
|
dxval.push(item); |
|
|
dxval.push(item); |
|
|
} |
|
|
} |
|
|
}) |
|
|
}); |
|
|
|
|
|
|
|
|
duoxuanVal.splice(0,duoxuanVal.length) |
|
|
duoxuanVal.splice(0, duoxuanVal.length); |
|
|
dxval.forEach(items=>{ |
|
|
dxval.forEach((items) => { |
|
|
duoxuanVal.push(items) |
|
|
duoxuanVal.push(items); |
|
|
}) |
|
|
}); |
|
|
pickDataList.value = dxval |
|
|
pickDataList.value = dxval; |
|
|
} else { |
|
|
} else { |
|
|
cont.ispick = true |
|
|
cont.ispick = true; |
|
|
let iconVal = cont.icon |
|
|
let iconVal = cont.icon; |
|
|
if(iconVal == "" || iconVal == null) iconVal = cont.iconToBase64 |
|
|
if (iconVal == "" || iconVal == null) iconVal = cont.iconToBase64; |
|
|
|
|
|
|
|
|
duoxuanVal.push({ |
|
|
duoxuanVal.push({ |
|
|
id: cont.id.toString(), |
|
|
id: cont.id.toString(), |
|
|
name: cont.employeeName, |
|
|
name: cont.employeeName, |
|
|
icon:iconVal |
|
|
icon: iconVal, |
|
|
}) |
|
|
}); |
|
|
pickDataList.value = duoxuanVal |
|
|
pickDataList.value = duoxuanVal; |
|
|
//console.log("选定人员--1->",cont) |
|
|
//console.log("选定人员--1->",cont) |
|
|
//console.log("选定人员--2->",pickDataList) |
|
|
//console.log("选定人员--2->",pickDataList) |
|
|
//console.log("选定人员--3->",duoxuanVal) |
|
|
//console.log("选定人员--3->",duoxuanVal) |
|
|
//console.log("选定人员--4->",iconVal) |
|
|
//console.log("选定人员--4->",iconVal) |
|
|
} |
|
|
} |
|
|
countPick.value = pickDataList.value.length |
|
|
countPick.value = pickDataList.value.length; |
|
|
} |
|
|
} |
|
|
/** |
|
|
/** |
|
|
* 删除已经选择 |
|
|
* 删除已经选择 |
|
|
*/ |
|
|
*/ |
|
|
function delPickData(cont: any, index: number) { |
|
|
function delPickData(cont: any, index: number) { |
|
|
pickDataList.value.splice(index, 1); |
|
|
pickDataList.value.splice(index, 1); |
|
|
isPick(cont.id) |
|
|
isPick(cont.id); |
|
|
} |
|
|
} |
|
|
function delPickUserData(cont: any, index: number) { |
|
|
function delPickUserData(cont: any, index: number) { |
|
|
pickDataList.value.splice(index, 1); |
|
|
pickDataList.value.splice(index, 1); |
|
|
isPick(cont.id) |
|
|
isPick(cont.id); |
|
|
} |
|
|
} |
|
|
/** |
|
|
/** |
|
|
* 提交数据 |
|
|
* 提交数据 |
|
|
@ -253,25 +257,25 @@ function submitPickOrgOrUser(){ |
|
|
// eslint-disable-next-line vue/no-mutating-props |
|
|
// eslint-disable-next-line vue/no-mutating-props |
|
|
// props.tabledata.namelist=["秦东","马飞"] |
|
|
// props.tabledata.namelist=["秦东","马飞"] |
|
|
if (pickDataList.value && pickDataList.value.length > 0) { |
|
|
if (pickDataList.value && pickDataList.value.length > 0) { |
|
|
let nameAry = new Array |
|
|
let nameAry = new Array(); |
|
|
let userAry = new Array |
|
|
let userAry = new Array(); |
|
|
pickDataList.value.forEach((item: any) => { |
|
|
pickDataList.value.forEach((item: any) => { |
|
|
nameAry.push(item.name) |
|
|
nameAry.push(item.name); |
|
|
userAry.push({ |
|
|
userAry.push({ |
|
|
id: item.id.toString(), |
|
|
id: item.id.toString(), |
|
|
name: item.name, |
|
|
name: item.name, |
|
|
icon:item.icon |
|
|
icon: item.icon, |
|
|
}) |
|
|
}); |
|
|
}) |
|
|
}); |
|
|
// eslint-disable-next-line vue/no-mutating-props |
|
|
// eslint-disable-next-line vue/no-mutating-props |
|
|
props.tabledata.namelist = nameAry |
|
|
props.tabledata.namelist = nameAry; |
|
|
// eslint-disable-next-line vue/no-mutating-props |
|
|
// eslint-disable-next-line vue/no-mutating-props |
|
|
props.tabledata.userlist = userAry |
|
|
props.tabledata.userlist = userAry; |
|
|
} else { |
|
|
} else { |
|
|
// eslint-disable-next-line vue/no-mutating-props |
|
|
// eslint-disable-next-line vue/no-mutating-props |
|
|
props.tabledata.namelist = [] |
|
|
props.tabledata.namelist = []; |
|
|
// eslint-disable-next-line vue/no-mutating-props |
|
|
// eslint-disable-next-line vue/no-mutating-props |
|
|
props.tabledata.userlist = [] |
|
|
props.tabledata.userlist = []; |
|
|
} |
|
|
} |
|
|
closeBox(); |
|
|
closeBox(); |
|
|
} |
|
|
} |
|
|
@ -279,26 +283,26 @@ function submitPickOrgOrUser(){ |
|
|
* 清空 |
|
|
* 清空 |
|
|
*/ |
|
|
*/ |
|
|
function emptyPickList() { |
|
|
function emptyPickList() { |
|
|
pickDataList.value =[] |
|
|
pickDataList.value = []; |
|
|
duoxuanVal.slice(0,duoxuanVal.length) |
|
|
duoxuanVal.slice(0, duoxuanVal.length); |
|
|
let emptyOrg = new Array |
|
|
let emptyOrg = new Array(); |
|
|
duoxuanVal.length = 0 |
|
|
duoxuanVal.length = 0; |
|
|
orgInfoList.value?.forEach(item=>{ |
|
|
orgInfoList.value?.forEach((item) => { |
|
|
item.isActiveItem = false |
|
|
item.isActiveItem = false; |
|
|
}) |
|
|
}); |
|
|
} |
|
|
} |
|
|
/** =========================================分割线。以下是行政组织人员相关内容=============================================================== */ |
|
|
/** =========================================分割线。以下是行政组织人员相关内容=============================================================== */ |
|
|
/** |
|
|
/** |
|
|
* 清空已选择的人员 |
|
|
* 清空已选择的人员 |
|
|
*/ |
|
|
*/ |
|
|
function emptyPickuserList() { |
|
|
function emptyPickuserList() { |
|
|
pickDataList.value =[] |
|
|
pickDataList.value = []; |
|
|
duoxuanVal.slice(0,duoxuanVal.length) |
|
|
duoxuanVal.slice(0, duoxuanVal.length); |
|
|
let emptyOrg = new Array |
|
|
let emptyOrg = new Array(); |
|
|
duoxuanVal.length = 0 |
|
|
duoxuanVal.length = 0; |
|
|
employees.value?.forEach(item=>{ |
|
|
employees.value?.forEach((item) => { |
|
|
item.ispick = false |
|
|
item.ispick = false; |
|
|
}) |
|
|
}); |
|
|
} |
|
|
} |
|
|
/** |
|
|
/** |
|
|
* 获取行政组织和人员 |
|
|
* 获取行政组织和人员 |
|
|
@ -307,55 +311,56 @@ function getOrgAndPeople(orgid:number){ |
|
|
getBasisOrgChiled({ id: orgid.toString() }) |
|
|
getBasisOrgChiled({ id: orgid.toString() }) |
|
|
.then(({ data }) => { |
|
|
.then(({ data }) => { |
|
|
//console.log("获取行政组织和人员",data) |
|
|
//console.log("获取行政组织和人员",data) |
|
|
orgBreadCrumbs.value = data.titleDepartments |
|
|
orgBreadCrumbs.value = data.titleDepartments; |
|
|
employees.value = data.employees |
|
|
employees.value = data.employees; |
|
|
childDepartments.value = data.childDepartments |
|
|
childDepartments.value = data.childDepartments; |
|
|
}) |
|
|
}) |
|
|
.finally(() => { |
|
|
.finally(() => { |
|
|
isPick() |
|
|
isPick(); |
|
|
}) |
|
|
}); |
|
|
} |
|
|
} |
|
|
/** |
|
|
/** |
|
|
* 搜索人员 |
|
|
* 搜索人员 |
|
|
*/ |
|
|
*/ |
|
|
function searchPeople() { |
|
|
function searchPeople() { |
|
|
if (searchKeywords.value != "") { |
|
|
if (searchKeywords.value != "") { |
|
|
childDepartments.value = new Array |
|
|
childDepartments.value = new Array(); |
|
|
searchUserCont({page:1,pagesize:20,name:searchKeywords.value}) |
|
|
searchUserCont({ page: 1, pagesize: 20, name: searchKeywords.value }).then( |
|
|
.then(({data})=>{ |
|
|
({ data }) => { |
|
|
//console.log("搜索人员",data) |
|
|
//console.log("搜索人员",data) |
|
|
let usAry = new Array |
|
|
let usAry = new Array(); |
|
|
data.list.forEach(item=>{ |
|
|
data.list.forEach((item) => { |
|
|
let pickVal = false |
|
|
let pickVal = false; |
|
|
if (pickDataList.value && pickDataList.value.length > 0) { |
|
|
if (pickDataList.value && pickDataList.value.length > 0) { |
|
|
pickDataList.value.forEach((items: any) => { |
|
|
pickDataList.value.forEach((items: any) => { |
|
|
if (item.id == items.id) { |
|
|
if (item.id == items.id) { |
|
|
pickVal = true |
|
|
pickVal = true; |
|
|
} |
|
|
} |
|
|
}) |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
usAry.push({ |
|
|
usAry.push({ |
|
|
"id":item.id, //string //"95196156539179008", |
|
|
id: item.id, //string //"95196156539179008", |
|
|
"employeeName":item.employeeName, //string //"胡齐帅", |
|
|
employeeName: item.employeeName, //string //"胡齐帅", |
|
|
"isLeave":item.isLeave, //string //"0", |
|
|
isLeave: item.isLeave, //string //"0", |
|
|
"open":item.open, //boolean //"false", |
|
|
open: item.open, //boolean //"false", |
|
|
"icon":item.icon, //string //"", |
|
|
icon: item.icon, //string //"", |
|
|
"iconToBase64":item.iconToBase64, //string //"", |
|
|
iconToBase64: item.iconToBase64, //string //"", |
|
|
"wechat":item.wechat, //string //"", |
|
|
wechat: item.wechat, //string //"", |
|
|
"departmentid":item.departmentid, //number //102, |
|
|
departmentid: item.departmentid, //number //102, |
|
|
"departmentname":item.departmentname, //string //"企管部", |
|
|
departmentname: item.departmentname, //string //"企管部", |
|
|
"postid":item.postid, //number //798, |
|
|
postid: item.postid, //number //798, |
|
|
"postname":item.postname, //string //"岗监员", |
|
|
postname: item.postname, //string //"岗监员", |
|
|
"tema":item.tema, //number //0, |
|
|
tema: item.tema, //number //0, |
|
|
"temaname":item.temaname, //string //"" |
|
|
temaname: item.temaname, //string //"" |
|
|
"ispick":pickVal, //boolean // |
|
|
ispick: pickVal, //boolean // |
|
|
}) |
|
|
}); |
|
|
}) |
|
|
}); |
|
|
employees.value = usAry |
|
|
employees.value = usAry; |
|
|
}) |
|
|
} |
|
|
|
|
|
); |
|
|
} else { |
|
|
} else { |
|
|
getOrgAndPeople(313) |
|
|
getOrgAndPeople(313); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
@ -381,10 +386,19 @@ function searchPeople(){ |
|
|
</div> |
|
|
</div> |
|
|
<el-space :size="-2" :spacer="spacer" class="mianbaoxue"> |
|
|
<el-space :size="-2" :spacer="spacer" class="mianbaoxue"> |
|
|
<el-text class="allSearch" @click="getOrgList(313)">所有</el-text> |
|
|
<el-text class="allSearch" @click="getOrgList(313)">所有</el-text> |
|
|
<el-text v-for="(it,ind) in orgBreadCrumbs" :key="ind" @click="getOrgList(parseInt(it.id))">{{ it.departmentName }}</el-text> |
|
|
<el-text |
|
|
|
|
|
v-for="(it, ind) in orgBreadCrumbs" |
|
|
|
|
|
:key="ind" |
|
|
|
|
|
@click="getOrgList(parseInt(it.id))" |
|
|
|
|
|
>{{ it.departmentName }}</el-text |
|
|
|
|
|
> |
|
|
</el-space> |
|
|
</el-space> |
|
|
<ul class="select-box"> |
|
|
<ul class="select-box"> |
|
|
<li v-for="(item,index) in orgInfoList" :key="index" :class="{active: item.isActiveItem}"> |
|
|
<li |
|
|
|
|
|
v-for="(item, index) in orgInfoList" |
|
|
|
|
|
:key="index" |
|
|
|
|
|
:class="{ active: item.isActiveItem }" |
|
|
|
|
|
> |
|
|
<div class="orgboxdiv"> |
|
|
<div class="orgboxdiv"> |
|
|
<el-tooltip |
|
|
<el-tooltip |
|
|
class="box-item" |
|
|
class="box-item" |
|
|
@ -393,10 +407,14 @@ function searchPeople(){ |
|
|
placement="left" |
|
|
placement="left" |
|
|
> |
|
|
> |
|
|
<el-text truncated @click="pickval(item)"> |
|
|
<el-text truncated @click="pickval(item)"> |
|
|
<img src="@/assets/image/icon_file.png">{{ item.name }} |
|
|
<img src="@/assets/image/icon_file.png" />{{ item.name }} |
|
|
</el-text> |
|
|
</el-text> |
|
|
</el-tooltip> |
|
|
</el-tooltip> |
|
|
<i v-if="item.ischild&&props.tabledata.types!=3" @click="getOrgList(item.id)">下级</i> |
|
|
<i |
|
|
|
|
|
v-if="item.ischild && props.tabledata.types != 3" |
|
|
|
|
|
@click="getOrgList(item.id)" |
|
|
|
|
|
>下级</i |
|
|
|
|
|
> |
|
|
</div> |
|
|
</div> |
|
|
</li> |
|
|
</li> |
|
|
</ul> |
|
|
</ul> |
|
|
@ -415,11 +433,15 @@ function searchPeople(){ |
|
|
placement="right" |
|
|
placement="right" |
|
|
> |
|
|
> |
|
|
<el-text truncated> |
|
|
<el-text truncated> |
|
|
<img src="@/assets/image/icon_file.png">{{ item.name }} |
|
|
<img src="@/assets/image/icon_file.png" />{{ item.name }} |
|
|
</el-text> |
|
|
</el-text> |
|
|
</el-tooltip> |
|
|
</el-tooltip> |
|
|
|
|
|
|
|
|
<svg-icon icon-class="cc_k" class="right_5" @click="delPickData(item,index)" /> |
|
|
<svg-icon |
|
|
|
|
|
icon-class="cc_k" |
|
|
|
|
|
class="right_5" |
|
|
|
|
|
@click="delPickData(item, index)" |
|
|
|
|
|
/> |
|
|
</li> |
|
|
</li> |
|
|
</ul> |
|
|
</ul> |
|
|
</el-col> |
|
|
</el-col> |
|
|
@ -439,10 +461,19 @@ function searchPeople(){ |
|
|
</div> |
|
|
</div> |
|
|
<el-space :size="-2" :spacer="spacer" class="mianbaoxue"> |
|
|
<el-space :size="-2" :spacer="spacer" class="mianbaoxue"> |
|
|
<el-text class="allSearch" @click="getOrgAndPeople(313)">所有</el-text> |
|
|
<el-text class="allSearch" @click="getOrgAndPeople(313)">所有</el-text> |
|
|
<el-text v-for="(it,ind) in orgBreadCrumbs" :key="ind" @click="getOrgAndPeople(parseInt(it.id))">{{ it.departmentName }}</el-text> |
|
|
<el-text |
|
|
|
|
|
v-for="(it, ind) in orgBreadCrumbs" |
|
|
|
|
|
:key="ind" |
|
|
|
|
|
@click="getOrgAndPeople(parseInt(it.id))" |
|
|
|
|
|
>{{ it.departmentName }}</el-text |
|
|
|
|
|
> |
|
|
</el-space> |
|
|
</el-space> |
|
|
<ul class="select-box"> |
|
|
<ul class="select-box"> |
|
|
<li v-for="(item,index) in childDepartments" :key="index" :class="{active: item.isActiveItem}"> |
|
|
<li |
|
|
|
|
|
v-for="(item, index) in childDepartments" |
|
|
|
|
|
:key="index" |
|
|
|
|
|
:class="{ active: item.isActiveItem }" |
|
|
|
|
|
> |
|
|
<div class="orgboxdiv"> |
|
|
<div class="orgboxdiv"> |
|
|
<el-tooltip |
|
|
<el-tooltip |
|
|
class="box-item" |
|
|
class="box-item" |
|
|
@ -451,18 +482,30 @@ function searchPeople(){ |
|
|
placement="left" |
|
|
placement="left" |
|
|
> |
|
|
> |
|
|
<el-text truncated> |
|
|
<el-text truncated> |
|
|
<img src="@/assets/image/icon_file.png">{{ item.departmentName }} |
|
|
<img src="@/assets/image/icon_file.png" />{{ item.departmentName }} |
|
|
</el-text> |
|
|
</el-text> |
|
|
</el-tooltip> |
|
|
</el-tooltip> |
|
|
<i @click="getOrgAndPeople(parseInt(item.id))">下级</i> |
|
|
<i @click="getOrgAndPeople(parseInt(item.id))">下级</i> |
|
|
</div> |
|
|
</div> |
|
|
</li> |
|
|
</li> |
|
|
<li v-for="(item,index) in employees" :key="index" :class="{active: item.ispick}"> |
|
|
<li |
|
|
|
|
|
v-for="(item, index) in employees" |
|
|
|
|
|
:key="index" |
|
|
|
|
|
:class="{ active: item.ispick }" |
|
|
|
|
|
> |
|
|
<div class="userboxdiv" @click="pickuserval(item)"> |
|
|
<div class="userboxdiv" @click="pickuserval(item)"> |
|
|
<svg-icon v-if="item.ispick" icon-class="select3" /><svg-icon v-else icon-class="select1" /> |
|
|
<svg-icon v-if="item.ispick" icon-class="select3" /><svg-icon |
|
|
<img v-if="item.icon && item.icon != ''" :src="item.icon"> |
|
|
v-else |
|
|
<img v-else-if="item.icon == '' && item.iconToBase64 && item.iconToBase64 != ''" :src="item.iconToBase64"> |
|
|
icon-class="select1" |
|
|
<img v-else src="@/assets/image/icon_people.png"> |
|
|
/> |
|
|
|
|
|
<img v-if="item.icon && item.icon != ''" :src="item.icon" /> |
|
|
|
|
|
<img |
|
|
|
|
|
v-else-if=" |
|
|
|
|
|
item.icon == '' && item.iconToBase64 && item.iconToBase64 != '' |
|
|
|
|
|
" |
|
|
|
|
|
:src="item.iconToBase64" |
|
|
|
|
|
/> |
|
|
|
|
|
<img v-else src="@/assets/image/icon_people.png" /> |
|
|
{{ item.employeeName }} |
|
|
{{ item.employeeName }} |
|
|
</div> |
|
|
</div> |
|
|
</li> |
|
|
</li> |
|
|
@ -482,26 +525,37 @@ function searchPeople(){ |
|
|
placement="right" |
|
|
placement="right" |
|
|
> |
|
|
> |
|
|
<el-text truncated> |
|
|
<el-text truncated> |
|
|
<img v-if="item.icon && item.icon != ''" :src="item.icon"><img v-else src="@/assets/image/icon_people.png">{{ item.name }} |
|
|
<img v-if="item.icon && item.icon != ''" :src="item.icon" /><img |
|
|
|
|
|
v-else |
|
|
|
|
|
src="@/assets/image/icon_people.png" |
|
|
|
|
|
/>{{ item.name }} |
|
|
</el-text> |
|
|
</el-text> |
|
|
</el-tooltip> |
|
|
</el-tooltip> |
|
|
|
|
|
|
|
|
<svg-icon icon-class="cc_k" class="right_5" @click="delPickUserData(item,index)" /> |
|
|
<svg-icon |
|
|
|
|
|
icon-class="cc_k" |
|
|
|
|
|
class="right_5" |
|
|
|
|
|
@click="delPickUserData(item, index)" |
|
|
|
|
|
/> |
|
|
</li> |
|
|
</li> |
|
|
</ul> |
|
|
</ul> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template #footer> |
|
|
<template #footer> |
|
|
<div class="dialog-footer"> |
|
|
<div class="dialog-footer"> |
|
|
<el-button type="primary" :loading="addOrgUserLoading" @click="submitPickOrgOrUser" >确 定</el-button> |
|
|
<el-button |
|
|
|
|
|
type="primary" |
|
|
|
|
|
:loading="addOrgUserLoading" |
|
|
|
|
|
@click="submitPickOrgOrUser" |
|
|
|
|
|
>确 定</el-button |
|
|
|
|
|
> |
|
|
<el-button @click="closeBox">取 消</el-button> |
|
|
<el-button @click="closeBox">取 消</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
</template> |
|
|
</template> |
|
|
<style lang='scss' scoped> |
|
|
<style lang="scss" scoped> |
|
|
.biankuang_all { |
|
|
.biankuang_all { |
|
|
border: 1px solid rgb(220, 223, 230); |
|
|
border: 1px solid rgb(220, 223, 230); |
|
|
} |
|
|
} |
|
|
@ -546,7 +600,6 @@ function searchPeople(){ |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: space-between; |
|
|
justify-content: space-between; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
i { |
|
|
i { |
|
|
min-width: 60px; |
|
|
min-width: 60px; |
|
|
|