Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43301624
Component
提交
3efb04b6
C
Component
项目概览
weixin_43301624
/
Component
与 Fork 源项目一致
Fork自
inscode / VueJS
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
Component
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
3efb04b6
编写于
11月 23, 2023
作者:
水
水晶土豆
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Thu Nov 23 12:08:00 CST 2023 inscode
上级
f8449aec
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
41 addition
and
13 deletion
+41
-13
src/App.vue
src/App.vue
+17
-3
src/component/humanResources/emp.vue
src/component/humanResources/emp.vue
+21
-8
src/component/main/tableList/table/table.vue
src/component/main/tableList/table/table.vue
+3
-2
未找到文件。
src/App.vue
浏览文件 @
3efb04b6
...
@@ -8,13 +8,27 @@ import jobTitle from './component/humanResources/jobTitle.vue';
...
@@ -8,13 +8,27 @@ import jobTitle from './component/humanResources/jobTitle.vue';
import
empss
from
'
./component/humanResources/emp.vue
'
;
import
empss
from
'
./component/humanResources/emp.vue
'
;
import
verticalTable
from
'
./component/main/verticalTable/verticalTable.vue
'
;
import
verticalTable
from
'
./component/main/verticalTable/verticalTable.vue
'
;
import
loadingComponents
from
'
./component/loadingComponents/loadingComponents.vue
'
;
import
loadingComponents
from
'
./component/loadingComponents/loadingComponents.vue
'
;
import
{
provide
,
ref
,
watch
}
from
'
vue
'
;
const
size
=
ref
({
offsetWidth
:
1
,
offsetHeight
:
1
,
offsetLeft
:
1
,
offsetTop
:
1
});
watch
(()
=>
size
.
value
.
offsetHeight
,
(
res
)
=>
{
console
.
log
(
size
.
value
.
offsetWidth
);
console
.
log
(
size
.
value
.
offsetHeight
);
console
.
log
(
size
.
value
.
offsetLeft
);
console
.
log
(
size
.
value
.
offsetTop
);
})
provide
(
'
size
'
,
size
);
</
script
>
</
script
>
<
template
>
<
template
>
<!--
<contractCategory></contractCategory>
<!--
<contractCategory></contractCategory>
<contract-list></contract-list>
<contract-list></contract-list>
<announcementType></announcementType>
<announcementType></announcementType>
<departments></departments>
-->
<departments></departments>
-->
<loadingComponents
:width=
"1000"
:height=
"1000"
></loadingComponents>
<loadingComponents
:width=
"1000"
:height=
"1000"
></loadingComponents>
<empss></empss>
<empss></empss>
<!--
<job-title></job-title>
-->
<!--
<job-title></job-title>
-->
...
...
src/component/humanResources/emp.vue
浏览文件 @
3efb04b6
<
script
setup
>
<
script
setup
>
import
{
onMounted
,
ref
,
provide
,
reactive
,
watch
,
toRefs
}
from
'
vue
'
import
{
onMounted
,
ref
,
provide
,
reactive
,
watch
,
toRefs
,
inject
}
from
'
vue
'
import
{
deepClone
}
from
'
@/util/deepCode
'
import
{
deepClone
}
from
'
@/util/deepCode
'
import
{
TreeToFlat
,
FlatToTree
}
from
'
@/util/toTree
'
import
{
TreeToFlat
,
FlatToTree
}
from
'
@/util/toTree
'
import
{
computed
}
from
'
@vue/reactivity
'
;
import
{
computed
}
from
'
@vue/reactivity
'
;
...
@@ -36,7 +36,7 @@ const defExpandedKey = computed(() => {
...
@@ -36,7 +36,7 @@ const defExpandedKey = computed(() => {
return
return_s
;
return
return_s
;
})
})
const
treeInstance
=
ref
([])
const
treeInstance
=
ref
([])
const
treeValue
=
ref
([
"
董事会
"
,
"
人事部
"
,
"
财务部
"
,
"
市场部
"
,
"
销售部
"
,
"
销售一部
"
,
"
销售二部
"
,
"
销售三部
"
,
"
技术部
"
,
"
产品部
"
,
"
设计部
"
,
"
研发部
"
,
"
客服部
"
,
"
客服一部
"
,
"
客服二部
"
]);
const
treeValue
=
ref
([
"
董事会
"
,
"
人事部
"
,
"
财务部
"
,
"
市场部
"
,
"
销售部
"
,
"
销售一部
"
,
"
销售二部
"
,
"
销售三部
"
,
"
技术部
"
,
"
产品部
"
,
"
设计部
"
,
"
研发部
"
,
"
客服部
"
,
"
客服一部
"
,
"
客服二部
"
]);
const
treeCheckChange
=
()
=>
{
const
treeCheckChange
=
()
=>
{
treeValue
.
value
=
treeInstance
.
value
?.
getCheckedKeys
(
false
);
treeValue
.
value
=
treeInstance
.
value
?.
getCheckedKeys
(
false
);
empSelect
.
value
.
deptName
=
JSON
.
stringify
(
treeValue
.
value
);
empSelect
.
value
.
deptName
=
JSON
.
stringify
(
treeValue
.
value
);
...
@@ -76,6 +76,7 @@ const handleSizeChange = (index) => {
...
@@ -76,6 +76,7 @@ const handleSizeChange = (index) => {
}
}
// table
// table
const
tableData
=
ref
();
const
tableData
=
ref
();
const
tableType
=
ref
();
const
tableType
=
ref
();
tableType
.
value
=
[
tableType
.
value
=
[
...
@@ -121,16 +122,16 @@ const empSelect = ref({
...
@@ -121,16 +122,16 @@ const empSelect = ref({
page
:
'
1
'
,
page
:
'
1
'
,
limit
:
'
10
'
,
limit
:
'
10
'
,
// 所属部门
// 所属部门
deptName
:
JSON
.
stringify
([
"
董事会
"
,
"
人事部
"
,
"
财务部
"
,
"
市场部
"
,
"
销售部
"
,
"
销售一部
"
,
"
销售二部
"
,
"
销售三部
"
,
"
技术部
"
,
"
产品部
"
,
"
设计部
"
,
"
研发部
"
,
"
客服部
"
,
"
客服一部
"
,
"
客服二部
"
]),
deptName
:
JSON
.
stringify
([
"
董事会
"
,
"
人事部
"
,
"
财务部
"
,
"
市场部
"
,
"
销售部
"
,
"
销售一部
"
,
"
销售二部
"
,
"
销售三部
"
,
"
技术部
"
,
"
产品部
"
,
"
设计部
"
,
"
研发部
"
,
"
客服部
"
,
"
客服一部
"
,
"
客服二部
"
]),
// select选择
// select选择
employeeType
:
''
,
employeeType
:
''
,
empState
:
''
,
empState
:
''
,
// 并集查询 搜索框
// 并集查询 搜索框
id
:
''
,
id
:
''
,
loginAccount
:
''
,
loginAccount
:
''
,
userName
:
''
,
userName
:
''
,
gender
:
''
,
gender
:
''
,
mobilePhoneNumber
:
''
mobilePhoneNumber
:
''
})
})
provide
(
"
empSelect
"
,
empSelect
);
provide
(
"
empSelect
"
,
empSelect
);
...
@@ -187,10 +188,22 @@ provide("cellSetStyle", ({ row, column, rowIndex, columnIndex }) => {
...
@@ -187,10 +188,22 @@ provide("cellSetStyle", ({ row, column, rowIndex, columnIndex }) => {
}
}
return
;
return
;
});
});
const
size
=
inject
(
'
size
'
);
const
commonLayout
=
ref
();
onMounted
(()
=>
{
watch
(()
=>
tableData
.
value
,
(
res
)
=>
{
setTimeout
(()
=>
{
size
.
value
.
offsetWidth
=
commonLayout
.
value
.
offsetWidth
;
size
.
value
.
offsetHeight
=
commonLayout
.
value
.
offsetHeight
;
size
.
value
.
offsetLeft
=
commonLayout
.
value
.
offsetLeft
;
size
.
value
.
offsetTop
=
commonLayout
.
value
.
offsetTop
;
},
100
)
})
})
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"common-layout"
>
<div
class=
"common-layout"
ref=
"commonLayout"
>
<el-container>
<el-container>
<el-aside>
<el-aside>
<h2>
企业组织架构
</h2>
<h2>
企业组织架构
</h2>
...
...
src/component/main/tableList/table/table.vue
浏览文件 @
3efb04b6
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
inject
,
computed
}
from
'
vue
'
;
import
{
inject
,
computed
,
ref
,
onMounted
}
from
'
vue
'
;
import
operationr
from
'
./operation/operations.vue
'
;
import
operationr
from
'
./operation/operations.vue
'
;
interface
TableType
{
interface
TableType
{
name
:
string
,
name
:
string
,
type
:
string
,
type
:
string
,
...
@@ -28,7 +29,7 @@ const changeState:any = inject("changeState");
...
@@ -28,7 +29,7 @@ const changeState:any = inject("changeState");
</
script
>
</
script
>
<
template
>
<
template
>
<div>
<div>
<el-table
<el-table
:data=
"tableData"
:header-cell-style=
"headRowStyle"
:cell-style=
"cellSetStyle"
max-height=
"600px"
:data=
"tableData"
:header-cell-style=
"headRowStyle"
:cell-style=
"cellSetStyle"
max-height=
"600px"
style=
"max-width: 100%; margin-bottom: 20px"
row-key=
"id"
border
default-expand-all
>
style=
"max-width: 100%; margin-bottom: 20px"
row-key=
"id"
border
default-expand-all
>
<el-table-column
class=
"head"
v-for=
"(item, index) in prop.tableType.filter(item => item.type != 'state')"
<el-table-column
class=
"head"
v-for=
"(item, index) in prop.tableType.filter(item => item.type != 'state')"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录