|
After Width: | Height: | Size: 466 B |
|
After Width: | Height: | Size: 223 B |
|
After Width: | Height: | Size: 549 B |
|
After Width: | Height: | Size: 325 B |
|
After Width: | Height: | Size: 209 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 245 B |
|
After Width: | Height: | Size: 266 B |
@ -0,0 +1,19 @@ |
|||||
|
import $func from '@/utils/workflow/index' |
||||
|
|
||||
|
import { outputOrgAndUser } from '@/api/displayboardapi/types' |
||||
|
import { getBasisOrgChiled } from '@/api/displayboardapi/indexapi' |
||||
|
|
||||
|
|
||||
|
export let searchVal = ref<any>('') |
||||
|
export let departments = ref<outputOrgAndUser>() |
||||
|
export let roles = ref({}) |
||||
|
|
||||
|
//获取行政组织及人员
|
||||
|
export let getDepartmentList = async (parentId:any = 0) => { |
||||
|
if(parentId == 0){ |
||||
|
parentId = 309 |
||||
|
} |
||||
|
let { data } = await getBasisOrgChiled({ id:parentId.toString() }) |
||||
|
console.log("data---->",data) |
||||
|
departments.value = data; |
||||
|
} |
||||
@ -0,0 +1,83 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 秦东 |
||||
|
@ 时间: 2023-10-13 08:48:13 |
||||
|
@ 备注: 选在人员或角色通用模块 |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
defineProps({ |
||||
|
list: { |
||||
|
type: Array, |
||||
|
default: () => [] |
||||
|
} |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<ul class="select-box"> |
||||
|
<template v-for="(elem, i) in list" :key="i"> |
||||
|
<template v-if="elem.type === 'role'"> |
||||
|
<li v-for="item in elem.data" :key="item.roleId" |
||||
|
class="check_box" |
||||
|
:class="{active: elem.isActive && elem.isActive(item), not: elem.not}" |
||||
|
@click="elem.change(item)"> |
||||
|
<a :title="item.description" :class="{active: elem.isActiveItem && elem.isActiveItem(item)}"> |
||||
|
<img src="@/assets/images/icon_role.png">{{item.roleName}} |
||||
|
</a> |
||||
|
</li> |
||||
|
</template> |
||||
|
<template v-if="elem.type === 'department'"> |
||||
|
<li v-for="item in elem.data" :key="item.id" class="check_box" :class="{not: !elem.isDepartment}"> |
||||
|
<a v-if="elem.isDepartment" |
||||
|
:class="elem.isActive(item) && 'active'" |
||||
|
@click="elem.change(item)"> |
||||
|
<img src="@/assets/images/icon_file.png">{{item.departmentName}}</a> |
||||
|
<a v-else><img src="@/assets/images/icon_file.png">{{item.departmentName}}</a> |
||||
|
<i @click="elem.next(item)">下级</i> |
||||
|
</li> |
||||
|
</template> |
||||
|
<template v-if="elem.type === 'employee'"> |
||||
|
<li v-for="item in elem.data" :key="item.id" class="check_box"> |
||||
|
<a :class="elem.isActive(item) && 'active'" |
||||
|
@click="elem.change(item)" |
||||
|
:title="item.departmentNames"> |
||||
|
<img v-if="item.icon != ''" :src="item.icon"> |
||||
|
<img v-if="item.icon == '' && item.iconToBase64 != ''" :src="item.iconToBase64"> |
||||
|
<img v-if="item.icon == '' && item.iconToBase64 == ''" src="@/assets/images/icon_people.png">{{item.employeeName}} |
||||
|
</a> |
||||
|
</li> |
||||
|
</template> |
||||
|
</template> |
||||
|
</ul> |
||||
|
</template> |
||||
|
<style lang="less"> |
||||
|
.select-box { |
||||
|
height: 420px; |
||||
|
overflow-y: auto; |
||||
|
|
||||
|
li { |
||||
|
padding: 5px 0; |
||||
|
|
||||
|
i { |
||||
|
float: right; |
||||
|
padding-left: 24px; |
||||
|
padding-right: 10px; |
||||
|
color: #3195f8; |
||||
|
font-size: 12px; |
||||
|
cursor: pointer; |
||||
|
background: url('../../assets/images/next_level_active.png') no-repeat 10px center; |
||||
|
border-left: 1px solid rgb(238, 238, 238); |
||||
|
} |
||||
|
|
||||
|
a.active+i { |
||||
|
color: rgb(197, 197, 197); |
||||
|
background-image: url('../../assets/images/next_level.png'); |
||||
|
pointer-events: none; |
||||
|
} |
||||
|
|
||||
|
img { |
||||
|
width: 14px; |
||||
|
vertical-align: middle; |
||||
|
margin-right: 5px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,98 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 秦东 |
||||
|
@ 时间: 2023-10-13 09:48:27 |
||||
|
@ 备注: 已选择得内容 |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
defineProps({ |
||||
|
total: { |
||||
|
type: Number, |
||||
|
default: 0 |
||||
|
}, |
||||
|
list: { |
||||
|
type: Array, |
||||
|
default: () => [{ type: 'role', data, cancel }] |
||||
|
} |
||||
|
}) |
||||
|
let emits = defineEmits(['del']) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="select-result l"> |
||||
|
<p class="clear">已选({{total}}) |
||||
|
<a @click="emits('del')">清空</a> |
||||
|
</p> |
||||
|
<ul> |
||||
|
<template v-for="({type, data, cancel}) in list" :key="type"> |
||||
|
<template v-if="type === 'role'"> |
||||
|
<li v-for="item in data" :key="item.roleId"> |
||||
|
<img src="@/assets/images/icon_role.png"> |
||||
|
<span>{{item.roleName}}</span> |
||||
|
<img src="@/assets/images/cancel.png" @click="cancel(item)"> |
||||
|
</li> |
||||
|
</template> |
||||
|
<template v-if="type === 'department'"> |
||||
|
<li v-for="item in data" :key="item.id"> |
||||
|
<img src="@/assets/images/icon_file.png"> |
||||
|
<span>{{item.departmentName}}</span> |
||||
|
<img src="@/assets/images/cancel.png" @click="cancel(item)"> |
||||
|
</li> |
||||
|
</template> |
||||
|
<template v-if="type === 'employee'"> |
||||
|
<li v-for="item in data" :key="item.id"> |
||||
|
<img v-if="item.icon != ''" :src="item.icon"> |
||||
|
<img v-if="item.icon == '' && item.iconToBase64 != ''" :src="item.iconToBase64"> |
||||
|
<img v-if="item.icon == '' && item.iconToBase64 == ''" src="@/assets/images/icon_people.png"> |
||||
|
<span>{{item.employeeName}}</span> |
||||
|
<img src="@/assets/images/cancel.png" @click="cancel(item)"> |
||||
|
</li> |
||||
|
</template> |
||||
|
</template> |
||||
|
</ul> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang="less"> |
||||
|
.select-result { |
||||
|
width: 276px; |
||||
|
height: 100%; |
||||
|
font-size: 12px; |
||||
|
|
||||
|
ul { |
||||
|
height: 460px; |
||||
|
overflow-y: auto; |
||||
|
|
||||
|
li { |
||||
|
margin: 11px 26px 13px 19px; |
||||
|
line-height: 17px; |
||||
|
|
||||
|
span { |
||||
|
vertical-align: middle; |
||||
|
} |
||||
|
|
||||
|
img { |
||||
|
&:first-of-type { |
||||
|
width: 14px; |
||||
|
vertical-align: middle; |
||||
|
margin-right: 5px; |
||||
|
} |
||||
|
|
||||
|
&:last-of-type { |
||||
|
float: right; |
||||
|
margin-top: 2px; |
||||
|
width: 14px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
p { |
||||
|
padding-left: 19px; |
||||
|
padding-right: 20px; |
||||
|
line-height: 37px; |
||||
|
border-bottom: 1px solid #f2f2f2; |
||||
|
|
||||
|
a { |
||||
|
float: right; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,41 @@ |
|||||
|
.person_body { |
||||
|
border: 1px solid #f5f5f5; |
||||
|
height: 500px; |
||||
|
} |
||||
|
.tree_nav span { |
||||
|
display: inline-block; |
||||
|
padding-right: 10px; |
||||
|
margin-right: 5px; |
||||
|
max-width: 6em; |
||||
|
color: #38adff; |
||||
|
font-size: 12px; |
||||
|
cursor: pointer; |
||||
|
background: url(~@/assets/images/jiaojiao.png) no-repeat right center; |
||||
|
background: url("../../assets/images/jiaojiao.png") no-repeat right center; |
||||
|
} |
||||
|
.tree_nav span:last-of-type { |
||||
|
background: none; |
||||
|
} |
||||
|
.person_tree { |
||||
|
padding: 10px 12px 0 8px; |
||||
|
width: 280px; |
||||
|
height: 100%; |
||||
|
border-right: 1px solid #f5f5f5; |
||||
|
} |
||||
|
.person_tree input { |
||||
|
padding-left: 22px; |
||||
|
width: 210px; |
||||
|
height: 30px; |
||||
|
font-size: 12px; |
||||
|
border-radius: 2px; |
||||
|
border: 1px solid #d5dadf; |
||||
|
background: url(~@/assets/images/list_search.png) no-repeat 10px center; |
||||
|
background: url("../../assets/images/list_search.png") no-repeat 5px center; |
||||
|
background-size: 14px 14px; |
||||
|
margin-bottom: 14px; |
||||
|
} |
||||
|
.ellipsis { |
||||
|
overflow: hidden; |
||||
|
text-overflow: ellipsis; |
||||
|
white-space: nowrap; |
||||
|
} |
||||