Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
d9cbb94e
Commit
d9cbb94e
authored
Oct 11, 2024
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 优化窗口板块
parent
ae1ef8cb
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
355 additions
and
424 deletions
+355
-424
base-manager-ui/admin/src/assets/css/relas.less
base-manager-ui/admin/src/assets/css/relas.less
+12
-12
base-manager-ui/admin/src/pages/basicset/business/components/businessTabs1.vue
.../src/pages/basicset/business/components/businessTabs1.vue
+22
-17
base-manager-ui/admin/src/pages/basicset/business/components/businessTabs2.vue
.../src/pages/basicset/business/components/businessTabs2.vue
+14
-12
base-manager-ui/admin/src/pages/basicset/business/components/businessTabs3.vue
.../src/pages/basicset/business/components/businessTabs3.vue
+14
-13
base-manager-ui/admin/src/pages/basicset/business/components/businessTabs4.vue
.../src/pages/basicset/business/components/businessTabs4.vue
+7
-4
base-manager-ui/admin/src/pages/basicset/dept/addWindowMatter.vue
...ager-ui/admin/src/pages/basicset/dept/addWindowMatter.vue
+158
-212
base-manager-ui/admin/src/pages/basicset/dept/components/addWindowBusiness.vue
.../src/pages/basicset/dept/components/addWindowBusiness.vue
+1
-1
base-manager-ui/admin/src/pages/basicset/dept/department.vue
base-manager-ui/admin/src/pages/basicset/dept/department.vue
+127
-153
No files found.
base-manager-ui/admin/src/assets/css/relas.less
View file @
d9cbb94e
...
...
@@ -114,19 +114,19 @@
}
// 带按钮搜索框
.search {
input {
font-size: @fz14;
color: #BFBFBF;
}
//
.search {
//
input {
//
font-size: @fz14;
//
color: #BFBFBF;
//
}
.chaxun {
color: @clfff;
border: 1px solid #5ab6ff;
padding: 0 14px;
background: @addbg;
}
}
//
.chaxun {
//
color: @clfff;
//
border: 1px solid #5ab6ff;
//
padding: 0 14px;
//
background: @addbg;
//
}
//
}
// 按钮
.btn {
...
...
base-manager-ui/admin/src/pages/basicset/business/components/businessTabs1.vue
View file @
d9cbb94e
...
...
@@ -42,6 +42,17 @@
}"
@changePagination="getSiteBusinessData"
>
<!-- 序号 -->
<template
slot=
"index"
slot-scope=
"
{ record, index }">
<span
v-if=
"record.parentId === 0"
>
{{
(
siteBusinessTable
.
page
-
1
)
*
siteBusinessTable
.
size
+
index
+
1
}}
</span>
</
template
>
<
template
slot=
"action"
slot-scope=
"{ record }"
>
<a-space
size=
"middle"
>
<span
...
...
@@ -99,6 +110,13 @@
}"
@
changePagination=
"getBusinessListData"
>
<!-- 序号 -->
<
template
slot=
"index"
slot-scope=
"{ record, index }"
>
<span
v-if=
"record.parentId === 0"
>
{{
(
businessTable
.
page
-
1
)
*
businessTable
.
size
+
index
+
1
}}
</span>
</
template
>
<
template
slot=
"action"
slot-scope=
"{ record }"
>
<a-space
size=
"middle"
>
<span
class=
"primary pointer"
@
click=
"handleIn(record.id)"
...
...
@@ -153,15 +171,8 @@ export default {
{
title
:
"
序号
"
,
width
:
"
50px
"
,
customRender
:
(
text
,
record
,
index
)
=>
{
if
(
record
.
parentId
===
0
)
{
return
(
(
this
.
siteBusinessTable
.
page
-
1
)
*
this
.
siteBusinessTable
.
size
+
index
+
1
);
}
scopedSlots
:
{
customRender
:
"
index
"
,
},
},
{
...
...
@@ -189,14 +200,8 @@ export default {
title
:
"
序号
"
,
key
:
"
id
"
,
width
:
"
50px
"
,
customRender
:
(
text
,
record
,
index
)
=>
{
if
(
record
.
parentId
===
0
)
{
return
(
(
this
.
businessTable
.
page
-
1
)
*
this
.
businessTable
.
size
+
index
+
1
);
}
scopedSlots
:
{
customRender
:
"
index
"
,
},
},
{
...
...
base-manager-ui/admin/src/pages/basicset/business/components/businessTabs2.vue
View file @
d9cbb94e
...
...
@@ -71,6 +71,11 @@
}"
@changePagination="getMatterSiteData"
>
<!-- 序号 -->
<template
slot=
"index"
slot-scope=
"
{ index }">
{{
(
siteMatterTable
.
page
-
1
)
*
siteMatterTable
.
size
+
index
+
1
}}
</
template
>
<!-- 事项名称 -->
<
template
slot=
"matterName"
slot-scope=
"{ record }"
>
<a-tooltip
placement=
"topLeft"
>
...
...
@@ -188,6 +193,11 @@
}"
@
changePagination=
"getMatterListData"
>
<!-- 序号 -->
<
template
slot=
"index"
slot-scope=
"{ index }"
>
{{
(
baseMatterTable
.
page
-
1
)
*
baseMatterTable
.
size
+
index
+
1
}}
</
template
>
<!-- 事项名称 -->
<
template
slot=
"matterName"
slot-scope=
"{ record }"
>
<a-tooltip
placement=
"topLeft"
>
...
...
@@ -280,12 +290,8 @@ export default {
{
title
:
"
序号
"
,
width
:
"
50px
"
,
customRender
:
(
text
,
record
,
index
)
=>
{
return
(
(
this
.
siteMatterTable
.
page
-
1
)
*
this
.
siteMatterTable
.
size
+
index
+
1
);
scopedSlots
:
{
customRender
:
"
index
"
,
},
},
{
...
...
@@ -332,12 +338,8 @@ export default {
{
title
:
"
序号
"
,
width
:
"
50px
"
,
customRender
:
(
text
,
record
,
index
)
=>
{
return
(
(
this
.
baseMatterTable
.
page
-
1
)
*
this
.
baseMatterTable
.
size
+
index
+
1
);
scopedSlots
:
{
customRender
:
"
index
"
,
},
},
{
...
...
base-manager-ui/admin/src/pages/basicset/business/components/businessTabs3.vue
View file @
d9cbb94e
...
...
@@ -36,6 +36,11 @@
}"
@changePagination="getBusinessMatterData"
>
<!-- 序号 -->
<template
slot=
"index"
slot-scope=
"
{ index }">
{{
(
siteBusinessTable
.
page
-
1
)
*
siteBusinessTable
.
size
+
index
+
1
}}
</
template
>
<
template
slot=
"action"
slot-scope=
"{ record }"
>
<a-space>
<span
...
...
@@ -109,6 +114,11 @@
}"
@
changePagination=
"getMatterSiteData"
>
<!-- 序号 -->
<
template
slot=
"index"
slot-scope=
"{ index }"
>
{{
(
siteMatterTable
.
page
-
1
)
*
siteMatterTable
.
size
+
index
+
1
}}
</
template
>
<!-- 事项名称 -->
<
template
slot=
"matterName"
slot-scope=
"{ record }"
>
<a-tooltip
placement=
"topLeft"
>
...
...
@@ -282,13 +292,8 @@ export default {
{
title
:
"
序号
"
,
width
:
"
50px
"
,
customRender
:
(
text
,
record
,
index
)
=>
{
return
(
(
this
.
siteBusinessTable
.
page
-
1
)
*
this
.
siteBusinessTable
.
size
+
index
+
1
);
scopedSlots
:
{
customRender
:
"
index
"
,
},
},
{
...
...
@@ -321,12 +326,8 @@ export default {
{
title
:
"
序号
"
,
width
:
"
50px
"
,
customRender
:
(
text
,
record
,
index
)
=>
{
return
(
(
this
.
siteMatterTable
.
page
-
1
)
*
this
.
siteMatterTable
.
size
+
index
+
1
);
scopedSlots
:
{
customRender
:
"
index
"
,
},
},
{
...
...
base-manager-ui/admin/src/pages/basicset/business/components/businessTabs4.vue
View file @
d9cbb94e
...
...
@@ -77,6 +77,11 @@
}"
@changePagination="getMatterSiteData"
>
<!-- 序号 -->
<template
slot=
"index"
slot-scope=
"
{ index }">
{{
(
searchForm
.
page
-
1
)
*
searchForm
.
size
+
index
+
1
}}
</
template
>
<!-- 事项名称 -->
<
template
slot=
"matterName"
slot-scope=
"{ text }"
>
<a-tooltip
placement=
"topLeft"
>
...
...
@@ -168,10 +173,8 @@ export default {
{
title
:
"
序号
"
,
width
:
"
50px
"
,
customRender
:
(
text
,
record
,
index
)
=>
{
return
(
(
this
.
searchForm
.
page
-
1
)
*
this
.
searchForm
.
size
+
index
+
1
);
scopedSlots
:
{
customRender
:
"
index
"
,
},
},
{
...
...
base-manager-ui/admin/src/pages/basicset/dept/addWindowMatter.vue
View file @
d9cbb94e
...
...
@@ -20,6 +20,7 @@
<a-input-search
placeholder=
"请输入事项名称搜索"
enter-button=
"搜索"
v-model=
"winMatterTable.searchForm.matterName"
allowClear
@
search=
"onSearch"
/>
...
...
@@ -28,62 +29,47 @@
</div>
<!-- 表格 -->
<div
class=
"table-content"
>
<a-table
bordered
:loading=
"isLoading"
<y-table
:columns=
"winMatterTable.columns"
:data=
"winMatterTable.data"
:pageSize.sync=
"winMatterTable.size"
:page.sync=
"winMatterTable.page"
:total=
"winMatterTable.total"
:loading=
"winMatterTable.loading"
:scroll=
"
{ y: 500 }"
size="middle"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: Current,
total: total,
pageSize: size,
size: 'middle',
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
onChange: changePagination,
onShowSizeChange: showSizeChange,
}"
:columns="leftColumns"
:data-source="tableData"
:rowKey="(record) => record.id"
:row-selection="{ onChange: onSelectChange }"
@changePagination="getWindowmatterData"
>
<template
slot=
"num"
slot-scope=
"text, record, index"
>
<span>
{{
(
Current
-
1
)
*
size
+
index
+
1
}}
</span>
</
template
>
<!-- 序号 -->
<template
slot=
"index"
slot-scope=
"
{ index }">
{{
(
winMatterTable
.
page
-
1
)
*
winMatterTable
.
size
+
index
+
1
}}
</
template
>
<!-- 排序 -->
<
template
slot=
"sort"
slot-scope=
"
text
"
>
<span
v-if=
"!
text.isEdit"
>
{{
text
.
sort
}}
</span>
<a-input
v-else
v-model=
"
text
.sort"
></a-input>
<
template
slot=
"sort"
slot-scope=
"
{ record }
"
>
<span
v-if=
"!
record.isEdit"
>
{{
record
.
sort
}}
</span>
<a-input
v-else
v-model=
"
record
.sort"
></a-input>
</
template
>
<!-- 是否显示 -->
<
template
slot=
"isShow"
slot-scope=
"text"
>
<!--
<a-tag
v-if=
"text.isShow"
color=
"green"
>
是
</a-tag>
<a-tag
v-else
color=
"red"
>
否
</a-tag>
-->
<y-switch
v-model=
"text.isShow"
:disabled=
"!text.isEdit"
></y-switch>
<
template
slot=
"isShow"
slot-scope=
"{ record }"
>
<y-switch
v-model=
"record.isShow"
:disabled=
"!record.isEdit"
></y-switch>
</
template
>
<
template
slot=
"action"
slot-scope=
"
text
"
>
<
template
slot=
"action"
slot-scope=
"
{ record }
"
>
<a-space
size=
"middle"
>
<span
href=
"javascript:;"
class=
"pointer"
:class=
"
text
.isEdit ? 'edit' : 'primary'"
@
click=
"handleEdit(
text
)"
>
{{
text
.
isEdit
?
"
保存
"
:
"
编辑
"
}}
</span
:class=
"
record
.isEdit ? 'edit' : 'primary'"
@
click=
"handleEdit(
record
)"
>
{{
record
.
isEdit
?
"
保存
"
:
"
编辑
"
}}
</span
>
<span
href=
"javascript:;"
@
click=
"handleDel(+text.id)"
class=
"delete pointer"
<span
@
click=
"handleDel(+record.id)"
class=
"delete pointer"
>
删除
</span
>
</a-space>
</
template
>
</
a
-table>
</
y
-table>
</div>
</div>
<!-- 新增窗口事项 -->
...
...
@@ -97,13 +83,6 @@
<a-button
@
click=
"handleReset"
>
重置
</a-button>
<a-button
type=
"primary"
@
click=
"handleOk"
>
确定
</a-button>
</
template
>
<!-- <div class="form-isShow">
<span>是否显示:</span><y-switch v-model="formData.isShow"></y-switch>
</div>
<div class="form-isShow">
<span>排序:</span>
<a-input-number v-model="formData.sort" :min="0" />
</div> -->
<div
class=
"color_title flex jcb"
>
<span>
站点事项列表:
</span>
<div>
...
...
@@ -111,7 +90,7 @@
<a-select
style=
"width: 120px"
allowClear
v-model=
"source"
v-model=
"s
iteMatterTable.searchForm.s
ource"
class=
"select-department"
placeholder=
"事项来源"
>
...
...
@@ -124,48 +103,33 @@
enter-button=
"搜索"
allowClear
@
search=
"onSearchMatter"
v-model=
"
matterNameSearch
"
v-model=
"
siteMatterTable.searchForm.matterName
"
/>
</a-space>
</div>
</div>
<div
style=
"margin-top: 10px"
>
<a-table
bordered
:loading=
"matterLoading"
:scroll=
"{ y: 350 }"
<y-table
size=
"small"
:pagination=
"{
showTotal: (total) => `共 ${total} 条`,
current: page,
pageSize: matterSize,
total: matterTotal,
size: 'small',
onChange: changeMatter,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
onShowSizeChange: sizeChange,
}"
:columns=
"matterColumns"
:data-source=
"siteMatterData"
:rowKey=
"(record) => record.matterId"
:row-selection=
"{
selectedRowKeys: matterKeys,
onChange: handleChange,
}"
:columns=
"siteMatterTable.columns"
:data=
"siteMatterTable.data"
:pageSize.sync=
"siteMatterTable.size"
:page.sync=
"siteMatterTable.page"
:total=
"siteMatterTable.total"
:loading=
"siteMatterTable.loading"
:scroll=
"{ y: 500 }"
@
changePagination=
"getSiteMatterData"
>
<
template
slot=
"num"
slot-scope=
"text, record, index"
>
<span>
{{
(
page
-
1
)
*
10
+
index
+
1
}}
</span>
</
template
>
<!-- 序号 -->
<
template
slot=
"index"
slot-scope=
"{ index }"
>
{{
(
siteMatterTable
.
page
-
1
)
*
siteMatterTable
.
size
+
index
+
1
}}
</
template
>
<!-- 来源 -->
<
template
slot=
"source"
slot-scope=
"
text
"
>
<a-tag
v-if=
"text
.source
== 0"
color=
"green"
>
一体化事项
</a-tag>
<
template
slot=
"source"
slot-scope=
"
{ text }
"
>
<a-tag
v-if=
"text == 0"
color=
"green"
>
一体化事项
</a-tag>
<a-tag
v-else
color=
"blue"
>
自建事项
</a-tag>
</
template
>
</
a
-table>
</
y
-table>
</div>
</a-modal>
</div>
...
...
@@ -173,7 +137,6 @@
<
script
>
import
{
getSiteMatterList
}
from
"
@/services/matter
"
;
import
{
pageSizeOptions
}
from
"
@/config/pageConfig.js
"
;
import
{
saveWindowbatch
,
getWindowmatterList
,
...
...
@@ -182,105 +145,108 @@ import {
}
from
"
@/services/dept
"
;
import
YSwitch
from
"
@/components/yswitch/YSwitch.vue
"
;
import
TabHeader
from
"
@/components/TabHeader
"
;
const
leftColumns
=
[
{
title
:
"
序号
"
,
dataIndex
:
"
id
"
,
key
:
"
id
"
,
width
:
"
6%
"
,
scopedSlots
:
{
customRender
:
"
num
"
},
},
{
title
:
"
部门名称
"
,
dataIndex
:
"
deptName
"
,
width
:
"
15%
"
,
},
{
title
:
"
事项名称
"
,
dataIndex
:
"
matterName
"
,
ellipsis
:
true
,
},
{
title
:
"
排序
"
,
width
:
"
6%
"
,
scopedSlots
:
{
customRender
:
"
sort
"
,
},
},
{
title
:
"
是否显示
"
,
width
:
"
10%
"
,
scopedSlots
:
{
customRender
:
"
isShow
"
,
},
},
{
title
:
"
操作
"
,
width
:
"
110px
"
,
scopedSlots
:
{
customRender
:
"
action
"
,
},
},
];
const
matterColumns
=
[
{
title
:
"
序号
"
,
key
:
"
id
"
,
width
:
"
10%
"
,
scopedSlots
:
{
customRender
:
"
num
"
},
},
{
title
:
"
部门
"
,
dataIndex
:
"
deptName
"
,
width
:
"
20%
"
,
},
{
title
:
"
事项名称
"
,
dataIndex
:
"
matterName
"
,
},
{
title
:
"
来源
"
,
width
:
"
15%
"
,
scopedSlots
:
{
customRender
:
"
source
"
},
},
];
import
YTable
from
"
@/components/YTable.vue
"
;
export
default
{
components
:
{
YSwitch
,
TabHeader
,
YTable
,
},
data
()
{
return
{
source
:
undefined
,
leftColumns
,
matterColumns
,
visible
:
false
,
isLoading
:
false
,
modalTile
:
"
新增窗口事项
"
,
Current
:
1
,
size
:
10
,
total
:
0
,
pageSizeOptions
,
tableData
:
[],
// 窗口事项表格
winMatterTable
:
{
page
:
1
,
size
:
10
,
total
:
0
,
data
:
[],
searchForm
:
{
matterName
:
""
,
},
columns
:
[
{
title
:
"
序号
"
,
width
:
"
6%
"
,
scopedSlots
:
{
customRender
:
"
index
"
},
},
{
title
:
"
部门名称
"
,
dataIndex
:
"
deptName
"
,
width
:
"
15%
"
,
},
{
title
:
"
事项名称
"
,
dataIndex
:
"
matterName
"
,
ellipsis
:
true
,
},
{
title
:
"
排序
"
,
width
:
"
6%
"
,
scopedSlots
:
{
customRender
:
"
sort
"
,
},
},
{
title
:
"
是否显示
"
,
width
:
"
10%
"
,
scopedSlots
:
{
customRender
:
"
isShow
"
,
},
},
{
title
:
"
操作
"
,
width
:
"
110px
"
,
scopedSlots
:
{
customRender
:
"
action
"
,
},
},
],
},
// 站点事项表格
siteMatterTable
:
{
page
:
1
,
size
:
10
,
total
:
0
,
data
:
[],
searchForm
:
{
matterName
:
""
,
source
:
undefined
,
},
columns
:
[
{
title
:
"
序号
"
,
width
:
"
10%
"
,
scopedSlots
:
{
customRender
:
"
index
"
},
},
{
title
:
"
部门
"
,
dataIndex
:
"
deptName
"
,
width
:
"
20%
"
,
},
{
title
:
"
事项名称
"
,
dataIndex
:
"
matterName
"
,
},
{
title
:
"
来源
"
,
width
:
"
15%
"
,
dataIndex
:
"
source
"
,
scopedSlots
:
{
customRender
:
"
source
"
},
},
],
},
siteMatterData
:
[],
// 站点事项列表
matterTotal
:
0
,
page
:
1
,
matterSize
:
10
,
matterLoading
:
false
,
matterKeys
:
[],
matterRows
:
[],
matterNameSearch
:
""
,
// 事项名称搜索
allDel
:
""
,
// 批量删除id
windowInfo
:
{},
formData
:
{
isShow
:
1
,
sort
:
0
,
},
// rules: {
// siteMatterId: [
// { required: true, message: "事项不能为空", trigger: "change" },
// ],
// },
};
},
created
()
{
...
...
@@ -307,57 +273,48 @@ export default {
},
// 获取站点事项
async
getSiteMatterData
()
{
this
.
matterL
oading
=
true
;
this
.
siteMatterTable
.
l
oading
=
true
;
let
res
=
await
getSiteMatterList
({
page
:
this
.
page
,
size
:
this
.
matterSize
,
siteId
:
this
.
windowInfo
.
siteId
,
matterName
:
`%
${
this
.
matterNameSearch
}
%`
,
source
:
this
.
source
,
// deptId: this.windowInfo.deptId,
matterName
:
`%
${
this
.
siteMatterTable
.
searchForm
.
matterName
}
%`
,
source
:
this
.
siteMatterTable
.
searchForm
.
source
,
});
let
{
data
,
total
}
=
res
.
data
.
data
;
this
.
siteMatterData
=
data
;
this
.
matterTotal
=
total
;
this
.
matterLoading
=
false
;
},
// 站点事项翻页
changeMatter
(
cur
)
{
this
.
page
=
cur
;
this
.
getSiteMatterData
();
},
// 站点事项改变每页显示数量
sizeChange
(
current
,
size
)
{
console
.
log
(
current
,
size
);
this
.
page
=
current
;
this
.
matterSize
=
size
;
this
.
getSiteMatterData
();
if
(
res
.
data
.
code
==
1
)
{
let
{
data
,
total
}
=
res
.
data
.
data
;
this
.
siteMatterTable
.
data
=
data
;
this
.
siteMatterTable
.
total
=
total
;
}
this
.
siteMatterTable
.
loading
=
false
;
},
// 站点事项搜索
onSearchMatter
()
{
this
.
page
=
1
;
this
.
siteMatterTable
.
page
=
1
;
this
.
getSiteMatterData
();
},
// 获取窗口事项列表
async
getWindowmatterData
(
search
=
{}
)
{
this
.
isL
oading
=
true
;
async
getWindowmatterData
()
{
this
.
winMatterTable
.
l
oading
=
true
;
let
res
=
await
getWindowmatterList
({
page
:
this
.
Current
,
size
:
this
.
size
,
page
:
this
.
winMatterTable
.
page
,
size
:
this
.
winMatterTable
.
size
,
windowId
:
this
.
$route
.
query
.
windowId
,
...
search
,
matterName
:
`%
${
this
.
winMatterTable
.
searchForm
.
matterName
}
%`
,
});
let
{
total
,
data
}
=
res
.
data
.
data
;
if
(
!
data
.
length
&&
this
.
Current
>
1
)
{
this
.
Current
-=
1
;
this
.
getWindowmatterData
();
if
(
res
.
data
.
code
==
1
)
{
let
{
total
,
data
}
=
res
.
data
.
data
;
if
(
!
data
.
length
&&
this
.
winMatterTable
.
page
>
1
)
{
this
.
winMatterTable
.
page
-=
1
;
this
.
getWindowmatterData
();
}
data
.
forEach
((
v
)
=>
{
v
.
isEdit
=
false
;
});
this
.
winMatterTable
.
total
=
total
;
this
.
winMatterTable
.
data
=
data
;
}
data
.
forEach
((
v
)
=>
{
v
.
isEdit
=
false
;
});
this
.
total
=
total
;
this
.
tableData
=
data
;
this
.
isLoading
=
false
;
this
.
winMatterTable
.
loading
=
false
;
},
// 打开新增窗口
addWindowMatter
()
{
...
...
@@ -370,19 +327,8 @@ export default {
this
.
visible
=
true
;
},
// 搜索
onSearch
(
val
)
{
this
.
Current
=
1
;
this
.
getWindowmatterData
({
matterName
:
`%
${
val
}
%`
});
},
// 翻页
changePagination
(
num
)
{
this
.
Current
=
num
;
this
.
getWindowmatterData
();
},
// 改变每页显示数量
showSizeChange
(
current
,
size
)
{
this
.
Current
=
current
;
this
.
size
=
size
;
onSearch
()
{
this
.
winMatterTable
.
page
=
1
;
this
.
getWindowmatterData
();
},
// 保存
...
...
base-manager-ui/admin/src/pages/basicset/dept/components/addWindowBusiness.vue
View file @
d9cbb94e
...
...
@@ -134,7 +134,7 @@ export default {
methods
:
{
// 获取窗口信息
async
getWindowInfo
(
info
)
{
await
this
.
s
iteBusinessList
();
await
this
.
getS
iteBusinessList
();
this
.
formData
=
info
;
if
(
info
.
businessIds
.
length
)
{
this
.
rowKeys
=
info
.
businessIds
;
...
...
base-manager-ui/admin/src/pages/basicset/dept/department.vue
View file @
d9cbb94e
...
...
@@ -113,7 +113,7 @@
<a-input-search
placeholder=
"请输入窗口编号搜索"
v-model=
"windowSearch"
v-model=
"windowSearch
Form.fromnum
"
allowClear
enter-button=
"搜索"
style=
"width: 250px"
...
...
@@ -124,30 +124,21 @@
<div
class=
"department_right_tab"
>
<div
class=
"table-content"
>
<!-- 表格 -->
<a-table
:scroll=
"{ y: 550 }"
:loading=
"loading"
bordered
<y-table
:columns=
"columns"
:data-source=
"windowData"
:pagination=
"{
showTotal: (total) => `共 ${total} 条`,
current: page,
total: total,
pageSize: size,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
onChange: onPage,
onShowSizeChange: showSizeChange,
}"
class=
"department_right_table"
:rowKey=
"(record) => record.id"
:data=
"windowData"
:pageSize.sync=
"windowSearchForm.size"
:page.sync=
"windowSearchForm.page"
:total=
"total"
:loading=
"loading"
:scroll=
"{ y: 550 }"
@
changePagination=
"getWindowListData"
>
<a
slot=
"name"
slot-scope=
"text"
>
{{ text }}
</a>
<span
slot=
"number"
slot-scope=
"text, record, index"
>
{{
(page - 1) * size + index + 1
}}
</span>
<!-- 序号 -->
<
template
slot=
"index"
slot-scope=
"{ index }"
>
{{
(
windowSearchForm
.
page
-
1
)
*
windowSearchForm
.
size
+
index
+
1
}}
</
template
>
<!-- 工作人员 -->
<
template
slot=
"workmanList"
slot-scope=
"text"
>
<span
v-if=
"text.workmanList && text.workmanList.length"
>
{{
...
...
@@ -155,40 +146,28 @@
}}
</span>
<span
v-else
>
--
</span>
</
template
>
<!-- 所属楼栋 -->
<
template
slot=
"building"
slot-scope=
"text"
>
<span>
{{
text
.
building
?
text
.
building
+
"
栋
"
:
"
--
"
}}
</span>
</
template
>
<!-- 所属楼层 -->
<
template
slot=
"level"
slot-scope=
"text"
>
<span>
{{
text
.
level
?
text
.
level
+
"
层
"
:
"
--
"
}}
</span>
</
template
>
<!-- 备注 -->
<
template
slot=
"summary"
slot-scope=
"text"
>
<span>
{{
text
.
summary
?
text
.
summary
:
"
--
"
}}
</span>
</
template
>
<!-- 创建时间 -->
<
template
slot=
"createTime"
slot-scope=
"
text
"
>
{{
text
.
createTime
|
dateFormat
}}
<
template
slot=
"createTime"
slot-scope=
"
{ text }
"
>
{{
text
|
dateFormat
}}
</
template
>
<!-- 操作 -->
<div
slot=
"action"
slot-scope=
"
text
"
>
<div
slot=
"action"
slot-scope=
"
{ record }
"
>
<div
class=
"flex jcb flexwrap"
>
<span
class=
"primary pointer"
@
click=
"workModal(
text
)"
<span
class=
"primary pointer"
@
click=
"workModal(
record
)"
>
业务
</span
>
<span
class=
"primary pointer"
@
click=
"addWindowMatter(
text
)"
<span
class=
"primary pointer"
@
click=
"addWindowMatter(
record
)"
>
事项
</span
>
<span
class=
"primary pointer"
@
click=
"editModal(
text
)"
<span
class=
"primary pointer"
@
click=
"editModal(
record
)"
>
编辑
</span
>
<span
class=
"delete pointer"
@
click=
"delWindow(
text
.id)"
<span
class=
"delete pointer"
@
click=
"delWindow(
record
.id)"
>
删除
</span
>
</div>
</div>
</
a
-table>
</
y
-table>
</div>
</div>
</div>
...
...
@@ -219,11 +198,11 @@
<
script
>
import
{
Empty
}
from
"
ant-design-vue
"
;
import
{
pageSizeOptions
}
from
"
@/config/pageConfig.js
"
;
import
adddepartment
from
"
./components/adddepartment.vue
"
;
import
addwindow
from
"
./components/addwindow.vue
"
;
import
addWindowBusiness
from
"
./components/addWindowBusiness.vue
"
;
import
TabHeader
from
"
@/components/TabHeader
"
;
import
YTable
from
"
@/components/YTable.vue
"
;
import
local
from
"
@/utils/local
"
;
import
{
mapGetters
}
from
"
vuex
"
;
import
{
...
...
@@ -240,79 +219,82 @@ export default {
addwindow
,
addWindowBusiness
,
TabHeader
,
YTable
,
},
data
()
{
const
columns
=
[
{
title
:
"
序号
"
,
width
:
"
6%
"
,
scopedSlots
:
{
customRender
:
"
number
"
,
return
{
columns
:
[
{
title
:
"
序号
"
,
width
:
"
6%
"
,
scopedSlots
:
{
customRender
:
"
index
"
,
},
},
},
{
title
:
"
窗口名称
"
,
dataIndex
:
"
name
"
,
width
:
"
10%
"
,
},
{
title
:
"
编号
"
,
width
:
"
10%
"
,
customRender
:
(
text
)
=>
{
return
text
.
fromnum
||
"
--
"
;
{
title
:
"
窗口名称
"
,
dataIndex
:
"
name
"
,
width
:
"
10%
"
,
},
},
{
title
:
"
所属部门
"
,
width
:
"
10%
"
,
customRender
:
(
text
)
=>
{
return
text
.
deptName
||
"
--
"
;
{
title
:
"
编号
"
,
width
:
"
10%
"
,
dataIndex
:
"
fromnum
"
,
},
},
{
title
:
"
工作人员
"
,
width
:
"
10%
"
,
scopedSlots
:
{
customRender
:
"
workmanList
"
,
{
title
:
"
所属部门
"
,
width
:
"
10%
"
,
dataIndex
:
"
deptName
"
,
},
},
{
title
:
"
所属楼栋
"
,
width
:
"
6%
"
,
scopedSlots
:
{
customRender
:
"
building
"
,
{
title
:
"
工作人员
"
,
width
:
"
10%
"
,
dataIndex
:
"
workmanList
"
,
scopedSlots
:
{
customRender
:
"
workmanList
"
,
},
},
},
{
title
:
"
所属楼层
"
,
width
:
"
6%
"
,
scopedSlots
:
{
customRender
:
"
level
"
,
{
title
:
"
所属楼栋
"
,
width
:
"
6%
"
,
dataIndex
:
"
building
"
,
customRender
:
(
text
)
=>
{
if
(
text
)
{
return
text
+
"
栋
"
;
}
},
},
},
{
title
:
"
备注
"
,
ellipsis
:
true
,
scopedSlots
:
{
customRender
:
"
summary
"
,
{
title
:
"
所属楼层
"
,
width
:
"
6%
"
,
dataIndex
:
"
level
"
,
customRender
:
(
text
)
=>
{
if
(
text
)
{
return
text
+
"
层
"
;
}
},
},
},
{
title
:
"
创建时间
"
,
scopedSlots
:
{
customRender
:
"
createTime
"
,
{
title
:
"
备注
"
,
ellipsis
:
true
,
dataIndex
:
"
summary
"
,
},
},
{
title
:
"
操作
"
,
width
:
"
100px
"
,
scopedSlots
:
{
customRender
:
"
action
"
,
{
title
:
"
创建时间
"
,
dataIndex
:
"
createTime
"
,
scopedSlots
:
{
customRender
:
"
createTime
"
,
}
,
},
},
];
return
{
spinning
:
false
,
{
title
:
"
操作
"
,
width
:
"
100px
"
,
scopedSlots
:
{
customRender
:
"
action
"
,
},
},
],
api
:
process
.
env
.
VUE_APP_API_BASE_URL
+
"
/
"
,
loading
:
false
,
deptLoading
:
false
,
...
...
@@ -321,22 +303,24 @@ export default {
WindowTitle
:
"
新增窗口
"
,
siteId
:
local
.
getLocal
(
"
siteId
"
),
// 站点id
business
:
[],
// 站点业务数据
windowSearch
:
""
,
// 窗口搜索
// 窗口搜索
windowSearchForm
:
{
page
:
1
,
size
:
10
,
fromnum
:
""
,
// 窗口编号
deptId
:
""
,
// 部门id
},
deptSearchVal
:
""
,
// 部门搜索
deptId
:
""
,
// 部门搜索窗口
active
:
undefined
,
// 部门激活
// isRelevancy: false,
columns
,
formVisible
:
false
,
visibleWork
:
false
,
visibleAdd
:
false
,
department
:
[],
// 部门列表
deptTotal
:
0
,
// 部门总数
windowData
:
[],
// 窗口列表数据
page
:
1
,
size
:
10
,
total
:
0
,
pageSizeOptions
,
total
:
0
,
// 窗口总数
// businessPage: 1, // 站点业务翻页
// businessTotal: 0, // 站点业务总数
rules
:
{
...
...
@@ -347,6 +331,7 @@ export default {
};
},
filters
:
{
// 过滤展示最近登录用户
workmanList
(
arr
)
{
if
(
arr
.
length
)
{
let
workerList
=
[...
arr
];
...
...
@@ -401,13 +386,12 @@ export default {
});
},
// 获取部门列表
async
getDeptListData
(
obj
=
{}
)
{
async
getDeptListData
()
{
this
.
deptLoading
=
true
;
let
res
=
await
getDeptList
({
siteId
:
this
.
siteId
,
page
:
1
,
size
:
-
1
,
...
obj
,
});
this
.
deptLoading
=
false
;
let
{
code
,
data
}
=
res
.
data
;
...
...
@@ -454,20 +438,20 @@ export default {
},
// 切换部门
changeDept
(
id
,
index
)
{
if
(
this
.
deptId
===
id
)
{
this
.
deptId
=
""
;
if
(
this
.
windowSearchForm
.
deptId
===
id
)
{
this
.
windowSearchForm
.
deptId
=
""
;
this
.
active
=
undefined
;
this
.
page
=
1
;
this
.
windowSearchForm
.
page
=
1
;
this
.
getWindowListData
();
}
else
{
this
.
deptId
=
id
;
this
.
windowSearchForm
.
deptId
=
id
;
this
.
active
=
index
;
this
.
page
=
1
;
this
.
windowSearchForm
.
page
=
1
;
this
.
getWindowListData
();
}
},
// 删除部门
delDepartment
(
num
)
{
delDepartment
(
id
)
{
let
_this
=
this
;
this
.
$confirm
({
title
:
"
系统提示
"
,
...
...
@@ -478,10 +462,10 @@ export default {
centered
:
true
,
maskClosable
:
true
,
async
onOk
()
{
let
res
=
await
delDept
({
id
:
num
});
let
res
=
await
delDept
({
id
});
let
{
code
,
msg
}
=
res
.
data
;
if
(
code
===
1
)
{
_this
.
getDeptListData
(
_this
.
siteId
);
_this
.
getDeptListData
();
_this
.
$message
.
success
(
msg
);
}
},
...
...
@@ -491,22 +475,23 @@ export default {
});
},
// 窗口列表
async
getWindowListData
(
obj
=
{}
)
{
async
getWindowListData
()
{
this
.
loading
=
true
;
let
res
=
await
getWindowList
({
siteId
:
this
.
siteId
,
page
:
this
.
page
,
size
:
this
.
size
,
fromnum
:
`%
${
this
.
windowSearch
}
%`
,
deptId
:
this
.
deptId
,
...
obj
,
...
this
.
windowSearchForm
,
fromnum
:
`%
${
this
.
windowSearchForm
.
fromnum
}
%`
,
});
let
{
code
,
data
}
=
res
.
data
;
if
(
code
===
1
)
{
if
(
!
data
.
data
.
length
&&
this
.
windowSearchForm
.
page
>
1
)
{
this
.
windowSearchForm
.
page
-=
1
;
this
.
getWindowListData
();
}
this
.
total
=
data
.
pageInfo
.
totalResult
;
this
.
windowData
=
data
.
data
;
this
.
loading
=
false
;
}
this
.
loading
=
false
;
},
// 新增窗口
addModal
()
{
...
...
@@ -525,7 +510,7 @@ export default {
this
.
$refs
.
addwindow
.
onEdit
(
data
);
},
// 删除窗口
delWindow
(
num
)
{
delWindow
(
id
)
{
let
_this
=
this
;
this
.
$confirm
({
title
:
"
系统提示
"
,
...
...
@@ -536,10 +521,10 @@ export default {
centered
:
true
,
maskClosable
:
true
,
async
onOk
()
{
let
res
=
await
delWindow
({
id
:
num
});
let
res
=
await
delWindow
({
id
});
let
{
code
,
msg
}
=
res
.
data
;
if
(
code
===
1
)
{
_this
.
getWindowListData
(
_this
.
siteId
);
_this
.
getWindowListData
();
_this
.
$message
.
success
(
msg
);
}
},
...
...
@@ -548,40 +533,29 @@ export default {
},
});
},
// 翻页
onPage
(
num
)
{
this
.
page
=
num
;
this
.
getWindowListData
();
},
// 改变每页显示数量
showSizeChange
(
current
,
size
)
{
this
.
page
=
current
;
this
.
size
=
size
;
this
.
getWindowListData
();
},
// 左边搜索
// 部门搜索
onSearch
(
value
)
{
this
.
getDeptListData
({
name
:
`%
${
value
}
%`
});
},
//
右边
搜索
//
窗口
搜索
onSearchRight
()
{
this
.
page
=
1
;
this
.
windowSearchForm
.
page
=
1
;
this
.
getWindowListData
();
},
// 窗口业务
workModal
(
data
)
{
let
obj
=
{
let
form
=
{
windowName
:
data
.
name
,
windowId
:
data
.
id
,
fromnum
:
data
.
fromnum
,
};
if
(
data
.
windowBusinessList
)
{
obj
.
businessIds
=
data
.
windowBusinessList
.
map
((
v
)
=>
v
.
siteBusinessId
);
form
.
businessIds
=
data
.
windowBusinessList
.
map
((
v
)
=>
v
.
siteBusinessId
);
}
else
{
obj
.
businessIds
=
[];
form
.
businessIds
=
[];
}
this
.
visibleWork
=
true
;
this
.
$refs
.
addWindowBusiness
.
getWindowInfo
(
obj
);
this
.
$refs
.
addWindowBusiness
.
getWindowInfo
(
form
);
},
// 重置业务窗口
...
...
@@ -614,7 +588,7 @@ export default {
},
// 导入窗口
handleChange
({
file
})
{
this
.
spinn
ing
=
true
;
this
.
load
ing
=
true
;
if
(
file
.
status
===
"
done
"
)
{
let
{
code
,
msg
}
=
file
.
response
;
if
(
code
==
1
)
{
...
...
@@ -623,7 +597,7 @@ export default {
}
else
{
this
.
$message
.
error
(
msg
);
}
this
.
spinn
ing
=
false
;
this
.
load
ing
=
false
;
}
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment