Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43301624
Component
提交
a9b2315d
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看板
提交
a9b2315d
编写于
11月 16, 2023
作者:
水
水晶土豆
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Thu Nov 16 14:26:00 CST 2023 inscode
上级
7ceaf26e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
32 addition
and
22 deletion
+32
-22
src/component/enterpriseAnnouncement/announcementType.vue
src/component/enterpriseAnnouncement/announcementType.vue
+1
-0
src/component/humanResources/department.vue
src/component/humanResources/department.vue
+23
-17
src/component/main/tableList/table/operation/addSubcategories.vue
...onent/main/tableList/table/operation/addSubcategories.vue
+3
-1
src/component/main/tableList/table/table.vue
src/component/main/tableList/table/table.vue
+5
-4
未找到文件。
src/component/enterpriseAnnouncement/announcementType.vue
浏览文件 @
a9b2315d
...
...
@@ -121,6 +121,7 @@ provide("rowID", rowID);
provide
(
"
changeState
"
,()
=>
{
console
.
log
(
1111
);
})
provide
(
"
subString
"
,
"
子分类
"
)
provide
(
"
cellSetStyle
"
,
({
row
,
column
,
rowIndex
,
columnIndex
})
=>
{
if
(
column
.
property
===
"
state
"
)
{
if
(
row
.
state
==
"
正常
"
)
{
...
...
src/component/humanResources/department.vue
浏览文件 @
a9b2315d
...
...
@@ -9,14 +9,14 @@ import { ref, provide, onMounted } from 'vue';
import
{
getHumanResourcesDepartment
}
from
'
@/api/api
'
;
import
{
FlatToTree
}
from
'
@/util/toTree
'
;
import
{
deepClone
}
from
'
@/util/deepCode
'
;
const
addText
=
ref
(
'
添加
分类
'
);
const
addText
=
ref
(
'
添加
部门
'
);
let
tableData
=
ref
([
])
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
let
data
=
(
await
getHumanResourcesDepartment
()).
data
.
data
.
data
;
console
.
log
(
FlatToTre
e
(
data
));
tableData
.
value
=
FlatToTree
(
d
ata
).
tree
;
console
.
log
(
deepClon
e
(
data
));
tableData
.
value
=
FlatToTree
(
d
eepClone
(
data
)
).
tree
;
})
let
tableType
=
ref
([
...
...
@@ -27,27 +27,27 @@ let tableType = ref([
isSort
:
false
,
align
:
"
center
"
},
{
name
:
"
排序
"
,
type
:
"
sort
"
,
width
:
"
100px
"
,
isSort
:
true
,
align
:
"
center
"
},
{
name
:
'
上级ID
'
,
type
:
"
parentID
"
,
width
:
"
auto
"
,
width
:
"
80px
"
,
isSort
:
false
,
align
:
"
left
"
},
{
name
:
'
部门名称
'
,
type
:
"
departmentName
"
,
width
:
"
80px
"
,
width
:
"
auto
"
,
isSort
:
false
,
align
:
"
center
"
},
{
name
:
"
排序
"
,
type
:
"
sort
"
,
width
:
"
100px
"
,
isSort
:
true
,
align
:
"
center
"
},
{
name
:
'
部门负责人
'
,
type
:
"
departmentHead
"
,
...
...
@@ -58,9 +58,14 @@ let tableType = ref([
{
name
:
'
部门电话
'
,
type
:
"
departmentPhone
"
,
width
:
"
1
00px
"
,
width
:
"
2
00px
"
,
isSort
:
false
,
align
:
"
center
"
},
{
name
:
'
状态
'
,
type
:
'
state
'
,
width
:
'
120px
'
,
}
]
);
...
...
@@ -103,9 +108,10 @@ provide("deleteDialog", deleteDialog);
provide
(
"
tableData
"
,
tableData
);
provide
(
"
rowID
"
,
rowID
);
provide
(
"
changeState
"
,
()
=>
{
console
.
log
(
1111
);
provide
(
"
changeState
"
,
()
=>
{
console
.
log
(
1111
);
})
provide
(
"
subString
"
,
"
子部门
"
);
provide
(
"
cellSetStyle
"
,
({
row
,
column
,
rowIndex
,
columnIndex
})
=>
{
if
(
column
.
property
===
"
state
"
)
{
if
(
row
.
state
==
"
正常
"
)
{
...
...
@@ -123,7 +129,7 @@ provide("cellSetStyle", ({ row, column, rowIndex, columnIndex }) => {
</
script
>
<
template
>
<mains
:tableType=
"tableType"
:operation=
"operation"
>
<mains
:tableType=
"tableType"
:operation=
"operation"
>
<headers>
<!--
<headerFmainsorm></headerForm>
-->
<addDownload>
...
...
src/component/main/tableList/table/operation/addSubcategories.vue
浏览文件 @
a9b2315d
<
script
setup
>
import
{
inject
}
from
'
vue
'
;
const
subStirng
=
inject
(
'
subString
'
)?
inject
(
'
subString
'
)
:
""
;
</
script
>
<
template
>
<el-button
color=
"#16baaa"
style=
"color: #fff;"
>
添加
子分类
</el-button>
<el-button
color=
"#16baaa"
style=
"color: #fff;"
>
添加
{{
subStirng
}}
</el-button>
</
template
>
<
style
scoped
></
style
>
src/component/main/tableList/table/table.vue
浏览文件 @
a9b2315d
...
...
@@ -28,15 +28,16 @@ const changeState:any = inject("changeState");
</
script
>
<
template
>
<div>
<el-table
:data=
"tableData"
:header-cell-style=
"headRowStyle"
:cell-style=
"cellSetStyle"
max-height=
"600px"
<el-table
: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
>
<el-table-column
class=
"head"
v-for=
"(item, index) in prop.tableType.filter(item => item.type != 'state')"
:prop=
"item.type"
:label=
"item.name"
:width=
"item.width"
:align=
"item.align"
:sortable=
"item.isSort"
:min-width=
"item.minWidth"
>
<template
#default
="
data
"
>
<span
v-if=
"item.hasBeforeSlot"
:style=
"item.hasBeforeSlot.style"
>
{{
item
.
hasBeforeSlot
.
data
}}
</span>
<div
:style=
"item.contentBackground"
>
{{
data
.
row
[
item
.
type
]
}}
</div>
<span
v-if=
"item.hasAfterSlot"
:style=
"item.hasAfterSlot.style"
>
{{
item
.
hasAfterSlot
.
data
}}
</span>
<span
v-if=
"item.hasBeforeSlot"
:style=
"item.hasBeforeSlot.style"
style=
"display:inline"
>
{{
item
.
hasBeforeSlot
.
data
}}
</span>
<div
:style=
"item.contentBackground"
style=
"display:inline"
>
{{
data
.
row
[
item
.
type
]
}}
</div>
<span
v-if=
"item.hasAfterSlot"
:style=
"item.hasAfterSlot.style"
style=
"display:inline"
>
{{
item
.
hasAfterSlot
.
data
}}
</span>
</
template
>
</el-table-column>
<el-table-column
v-if=
"isExitState"
fixed=
"right"
class=
"head"
prop=
"state"
:width=
"isExitState.width ? isExitState.width : 130"
label=
"状态"
:align=
"isExitState.align ? isExitState.align : 'center'"
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录