Browse Source

变更输入

han_v1
herenshan112 7 months ago
parent
commit
93d0068bd8
  1. 1
      src/components/DesignForm/public/form/formItem.vue
  2. 177
      src/views/matrix/matrixcont/setupmatrixuser.vue
  3. 401
      src/views/matrix/orgoruser/pickorg.vue

1
src/components/DesignForm/public/form/formItem.vue

@ -1241,6 +1241,7 @@ const diGuiJilian = (val: any, options: any[]) => {
v-model="value"
:disabled="judgeIsDisabled(data.name)"
type="textarea"
:autosize="{ minRows: 2, maxRows: 20 }"
:placeholder="
data.control.placeholder
? data.control.placeholder

177
src/views/matrix/matrixcont/setupmatrixuser.vue

@ -3,41 +3,45 @@
@ 时间: 2023-07-05 15:03:42
@ 备注: 设置字段值
-->
<script lang='ts' setup>
import { matrixTable,objectStruct,orgAndUserMatrixCont } from '@/api/matrixapi/type'
import { getMatrixField,getNumber,submitMatrixData,haveMatrixCont } from '@/api/matrixapi';
import { Search } from '@element-plus/icons-vue'
<script lang="ts" setup>
import { matrixTable, objectStruct, orgAndUserMatrixCont } from "@/api/matrixapi/type";
import {
getMatrixField,
getNumber,
submitMatrixData,
haveMatrixCont,
} from "@/api/matrixapi";
import { Search } from "@element-plus/icons-vue";
/**
* 引入页面
*/
import PickOrg from '@/views/matrix/orgoruser/pickorg.vue'
import PickOrg from "@/views/matrix/orgoruser/pickorg.vue";
const props = defineProps({
userShow: {
type: Boolean,
default:false
default: false,
},
matrixcont: {
type: Object,
default() {
return {}
}
}
return {};
},
},
});
const emits = defineEmits(["update:userShow"]); //
const addFieldLoading = ref(false)
const tabelColumn = reactive<matrixTable[]>([])
const tableList = reactive<any[]>([])
const loading = ref(false)
const addFieldLoading = ref(false);
const tabelColumn = reactive<matrixTable[]>([]);
const tableList = reactive<any[]>([]);
const loading = ref(false);
const orgOrUserBox = ref(false); //
const judgePage = ref(false);
const orguseInfo = reactive<orgAndUserMatrixCont[]>([])
const orguseInfo = reactive<orgAndUserMatrixCont[]>([]);
const systemMenuTreeProps = {
children: "child",
label: "name",
value:"id"
}
value: "id",
};
const orgOptionsList = ref<any>(); //
const tableValue = ref<any>(); //
const ids = ref<number[]>([]); //ID
@ -55,7 +59,7 @@ const field_is_Show = computed({
*/
function handleCloseBox() {
emits("update:userShow", false);
initData()
initData();
}
/**
* 初始化数据
@ -68,56 +72,59 @@ function initData(){
/**
* 监听数据
*/
watch(() => props.userShow,() => {
watch(
() => props.userShow,
() => {
if (props.userShow) {
getMatrixField({ id: props.matrixcont.id })
.then(({ data }) => {
// console.log("---->",data)
tabelColumn.splice(0,tabelColumn.length)
data.factor.forEach(item=>{
console.log("监听数据---->", data);
tabelColumn.splice(0, tabelColumn.length);
data.factor.forEach((item) => {
tabelColumn.push({
id: item.id,
label: item.name,
prop: item.pinyin,
types:item.types
})
})
data.outcome.forEach(item=>{
types: item.types,
});
});
data.outcome.forEach((item) => {
tabelColumn.push({
id: item.id,
label: item.name,
prop: item.pinyin,
types:item.types
})
})
types: item.types,
});
});
})
.finally(() => {
tableList.splice(0,tableList.length)
tableList.splice(0, tableList.length);
haveMatrixCont({ id: props.matrixcont.id })
.then((data) => {
console.log("监听数据--11111-->", data);
if (data.data && data.data.length > 0) {
data.data.forEach((item: any) => {
tableList.push(item)
})
tableList.push(item);
});
}
})
.finally(() => {
if (tableList.length < 1) {
addTableHang();
}
})
})
}
});
});
}
}
);
/**
* 添加行
*/
function addTableHang() {
//
getNumber({id:8})
.then((data)=>{
var jks:objectStruct = {}
tabelColumn.forEach(item=>{
getNumber({ id: 8 }).then((data) => {
var jks: objectStruct = {};
tabelColumn.forEach((item) => {
jks[item.prop] = {
id: item.id,
types: item.types,
@ -126,11 +133,11 @@ function addTableHang(){
orgid: 0,
namelist: [],
isedit: false,
pinyin:item.prop
}
})
tableList.push(jks)
})
pinyin: item.prop,
};
});
tableList.push(jks);
});
// console.log("-1111->",props.orglist,props.orgtree)
}
/**
@ -138,7 +145,7 @@ function addTableHang(){
*/
function submitAddMatrixUser() {
if (orguseInfo && orguseInfo.length > 0) {
orguseInfo.splice(0,orguseInfo.length)
orguseInfo.splice(0, orguseInfo.length);
}
// console.log("-->",tableList)
if (tableList && tableList.length > 0) {
@ -152,9 +159,9 @@ function submitAddMatrixUser(){
const entries = Object.entries(item);
entries.map((val: any) => {
// console.log("-2->",val,val[val.length-1].number)
let typeClass = 1
let typeClass = 1;
if (val[val.length - 1].types == 1) {
typeClass = 2
typeClass = 2;
}
orguseInfo.push({
id: 0,
@ -163,52 +170,54 @@ function submitAddMatrixUser(){
types: typeClass,
mcid: props.matrixcont.id,
mhid: val[val.length - 1].id,
})
})
})
});
});
});
}
submitMatrixData(orguseInfo)
.then((data)=>{
submitMatrixData(orguseInfo).then((data) => {
// console.log("-66666->",data)
handleCloseBox();
})
});
// console.log("-1->",orguseInfo)
}
function sdfdsf(cont: any) {
// console.log("-2222222->",cont)
if (cont.types < 1) {
judgePage.value = true
judgePage.value = true;
} else {
judgePage.value = false
judgePage.value = false;
}
cont.isedit=true
orgOrUserBox.value = true
tableValue.value = cont
cont.isedit = true;
orgOrUserBox.value = true;
tableValue.value = cont;
}
/**
* 删除行
*/
function delTableHang(id: any) {
// console.log("",id)
tableList.splice(id,1)
tableList.splice(id, 1);
if (tableList.length < 1) {
addTableHang();
}
}
</script>
<template>
<el-dialog v-model="field_is_Show" custom-class="dialog_box" title="矩阵数据维护" :before-close="handleCloseBox" width="80%" draggable>
<PickOrg v-model:orgBoxShow="orgOrUserBox" :ismultiselect="false" :tabledata="tableValue" />
<el-table
v-loading="loading"
highlight-current-row
:data="tableList"
border
<el-dialog
v-model="field_is_Show"
custom-class="dialog_box"
title="矩阵数据维护"
:before-close="handleCloseBox"
width="80%"
draggable
>
<PickOrg
v-model:orgBoxShow="orgOrUserBox"
:ismultiselect="false"
:tabledata="tableValue"
/>
<el-table v-loading="loading" highlight-current-row :data="tableList" border>
<el-table-column v-for="(item, index) in tabelColumn" :key="index" align="center">
<!-- 自定义表头 -->
<template #header>
@ -216,8 +225,18 @@ function delTableHang(id:any){
</template>
<!-- 自定义表项/单元格内容 -->
<template #default="scope">
<div v-if="!scope.row[item.prop].isedit" class="edit_table_row" @dblclick="sdfdsf(scope.row[item.prop])" >
<el-tag v-for="(itemtext,ti) in scope.row[item.prop].userlist" :key="ti" class="ml-2" size="small">{{ itemtext.name }}</el-tag>&nbsp;
<div
v-if="!scope.row[item.prop].isedit"
class="edit_table_row"
@dblclick="sdfdsf(scope.row[item.prop])"
>
<el-tag
v-for="(itemtext, ti) in scope.row[item.prop].userlist"
:key="ti"
class="ml-2"
size="small"
>{{ itemtext.name }}</el-tag
>&nbsp;
</div>
<div v-else>
<el-input
@ -230,7 +249,9 @@ function delTableHang(id:any){
</el-table-column>
<el-table-column label="操作" width="80" align="center">
<template #default="scope">
<el-button type="danger" link @click="delTableHang(scope.$index)">删除</el-button>
<el-button type="danger" link @click="delTableHang(scope.$index)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
@ -241,17 +262,19 @@ function delTableHang(id:any){
<el-button type="warning" @click="addTableHang">添加数据</el-button>
</div>
<div>
<el-button type="primary" :loading="addFieldLoading" @click="submitAddMatrixUser" > </el-button>
<el-button
type="primary"
:loading="addFieldLoading"
@click="submitAddMatrixUser"
> </el-button
>
<el-button @click="handleCloseBox"> </el-button>
</div>
</div>
</template>
</el-dialog>
</template>
<style lang='scss' scoped>
<style lang="scss" scoped>
.edit_table_row {
display: block;
width: 100%;

401
src/views/matrix/orgoruser/pickorg.vue

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

Loading…
Cancel
Save