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
ee074c32
Commit
ee074c32
authored
Feb 02, 2023
by
YIyiyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pref:添加事项搜索条件
parent
4f3f263e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
137 additions
and
86 deletions
+137
-86
base-manager-ui/admin/src/pages/basicset/business/components/businessTabs2.vue
.../src/pages/basicset/business/components/businessTabs2.vue
+54
-33
base-manager-ui/admin/src/pages/basicset/dept/addWindowMatter.vue
...ager-ui/admin/src/pages/basicset/dept/addWindowMatter.vue
+40
-10
base-manager-ui/admin/src/utils/request.js
base-manager-ui/admin/src/utils/request.js
+43
-43
No files found.
base-manager-ui/admin/src/pages/basicset/business/components/businessTabs2.vue
View file @
ee074c32
...
...
@@ -7,22 +7,22 @@
<div
class=
"left-btn"
>
<a-button
type=
"danger"
@
click=
"handleDelAll"
>
批量移除
</a-button>
</div>
<div
class=
"search-box"
>
<!--
<a-select
style=
"width: 180px"
<div>
<a-space>
<a-select
style=
"width: 120px"
allowClear
v-model=
"leftSearch.deptNam
e"
v-model=
"leftSourc
e"
class=
"select-department"
placeholder=
"请选择部门
"
placeholder=
"事项来源
"
>
<a-select-option
v-for=
"v in deptList"
:key=
"v.id"
:value=
"v.name"
>
{{
v
.
name
}}
<a-select-option
:value=
"0"
>
一体化添加
</a-select-option>
<a-select-option
:value=
"1"
>
手动添加
</a-select-option>
</a-select>
--
>
</a-select
>
<a-input-search
v-model=
"searchLeftVal"
placeholder=
"请输入事项名称搜索"
...
...
@@ -30,6 +30,7 @@
@
search=
"onSearchLeft"
allowClear
/>
</a-space>
</div>
</div>
</div>
...
...
@@ -74,7 +75,7 @@
</
template
>
<div
class=
"matter-name"
>
{{ text.matterName }}
</div>
</a-tooltip>
<a-tag
v-if=
"text.source ==
=
0"
color=
"green"
>
一体化添加
</a-tag>
<a-tag
v-if=
"text.source == 0"
color=
"green"
>
一体化添加
</a-tag>
<a-tag
v-else
color=
"blue"
>
手动添加
</a-tag>
</template>
<!-- 到现场次数 -->
...
...
@@ -118,6 +119,21 @@
<a-button
class=
"add-btn"
@
click=
"addMatter"
>
新增事项
</a-button>
</div>
<div>
<a-space>
<a-select
style=
"width: 120px"
allowClear
v-model=
"rightSource"
class=
"select-department"
placeholder=
"事项来源"
>
<a-select-option
:value=
"0"
>
一体化事项
</a-select-option>
<a-select-option
:value=
"1"
>
自建事项
</a-select-option>
</a-select>
<a-input-search
v-model=
"searchRightVal"
placeholder=
"请输入事项名称搜索"
...
...
@@ -125,6 +141,7 @@
@
search=
"onSearchRight"
allowClear
/>
</a-space>
</div>
</div>
</div>
...
...
@@ -171,8 +188,8 @@
</
template
>
<div
class=
"matter-name"
>
{{ text.matterName }}
</div>
</a-tooltip>
<a-tag
v-if=
"text.source ==
= 0"
color=
"green"
>
一体化添加
</a-tag>
<a-tag
v-else
color=
"blue"
>
手动添加
</a-tag>
<a-tag
v-if=
"text.source ==
0"
color=
"green"
>
一体化事项
</a-tag>
<a-tag
v-else
color=
"blue"
>
自建事项
</a-tag>
</template>
<!-- 操作 -->
<
template
slot=
"action"
slot-scope=
"text"
>
...
...
@@ -284,6 +301,8 @@ export default {
rightColumns
,
leftLoading
:
false
,
rightLoading
:
false
,
leftSource
:
undefined
,
// 左边来源
rightSource
:
undefined
,
// 右边来源
selectedRowKeys
:
[],
matterSiteData
:
[],
// 站点事项
matterDataList
:
[],
//事项列表数据
...
...
@@ -320,6 +339,7 @@ export default {
page
:
this
.
leftCurrent
,
size
:
this
.
leftSize
,
siteId
:
this
.
siteId
,
source
:
this
.
leftSource
,
matterName
:
`%
${
this
.
searchLeftVal
}
%`
,
...
search
,
});
...
...
@@ -340,6 +360,7 @@ export default {
page
:
this
.
rightCurrent
,
size
:
this
.
rightSize
,
matterName
:
this
.
searchRightVal
,
source
:
this
.
rightSource
,
...
search
,
});
if
(
res
.
data
.
code
===
1
)
{
...
...
base-manager-ui/admin/src/pages/basicset/dept/addWindowMatter.vue
View file @
ee074c32
...
...
@@ -101,6 +101,22 @@
</div> -->
<div
class=
"color_title flex jcb"
>
<span>
站点事项列表:
</span>
<div>
<a-space>
<a-select
style=
"width: 120px"
allowClear
v-model=
"source"
class=
"select-department"
placeholder=
"事项来源"
>
<a-select-option
:value=
"0"
>
一体化添加
</a-select-option>
<a-select-option
:value=
"1"
>
手动添加
</a-select-option>
</a-select>
<a-input-search
style=
"width: 300px"
placeholder=
"输入事项名称搜索"
...
...
@@ -109,6 +125,8 @@
@
search=
"onSearchMatter"
v-model=
"matterNameSearch"
/>
</a-space>
</div>
</div>
<div
style=
"margin-top: 10px"
>
<a-table
...
...
@@ -137,6 +155,11 @@
{{
(
page
-
1
)
*
10
+
index
+
1
}}
</span>
</
template
>
<!-- 来源 -->
<
template
slot=
"source"
slot-scope=
"text"
>
<a-tag
v-if=
"text.source == 0"
color=
"green"
>
一体化事项
</a-tag>
<a-tag
v-else
color=
"blue"
>
自建事项
</a-tag>
</
template
>
</a-table>
</div>
<!-- <a-form-model
...
...
@@ -240,6 +263,11 @@ const matterColumns = [
title
:
"
事项名称
"
,
dataIndex
:
"
matterName
"
,
},
{
title
:
"
来源
"
,
width
:
"
15%
"
,
scopedSlots
:
{
customRender
:
"
source
"
},
},
];
export
default
{
components
:
{
...
...
@@ -247,6 +275,7 @@ export default {
},
data
()
{
return
{
source
:
undefined
,
leftColumns
,
matterColumns
,
visible
:
false
,
...
...
@@ -267,7 +296,7 @@ export default {
allDel
:
""
,
// 批量删除id
windowInfo
:
{},
formData
:
{
isShow
:
0
,
isShow
:
1
,
sort
:
0
,
},
// rules: {
...
...
@@ -307,6 +336,7 @@ export default {
size
:
10
,
siteId
:
this
.
windowInfo
.
siteId
,
matterName
:
`%
${
this
.
matterNameSearch
}
%`
,
source
:
this
.
source
,
// deptId: this.windowInfo.deptId,
});
let
{
data
,
total
}
=
res
.
data
.
data
;
...
...
base-manager-ui/admin/src/utils/request.js
View file @
ee074c32
import
axios
from
'
axios
'
import
axios
from
"
axios
"
;
// import Cookie from 'js-cookie'
// 跨域认证信息 header 名
// const xsrfHeaderName = 'Authtoken'
axios
.
defaults
.
timeout
=
5000
//
axios.defaults.timeout = 5000
// axios.defaults.withCredentials = true
// axios.defaults.xsrfHeaderName = xsrfHeaderName
// axios.defaults.xsrfCookieName = xsrfHeaderName
...
...
@@ -21,9 +21,9 @@ axios.defaults.timeout = 5000
// http method
const
METHOD
=
{
GET
:
'
get
'
,
POST
:
'
post
'
}
GET
:
"
get
"
,
POST
:
"
post
"
,
}
;
/**
* axios请求
...
...
@@ -32,14 +32,14 @@ const METHOD = {
* @param params 请求参数
* @returns {Promise<AxiosResponse<T>>}
*/
async
function
request
(
url
,
method
,
params
,
config
)
{
async
function
request
(
url
,
method
,
params
,
config
)
{
switch
(
method
)
{
case
METHOD
.
GET
:
return
axios
.
get
(
url
,
{
params
,
...
config
})
return
axios
.
get
(
url
,
{
params
,
...
config
})
;
case
METHOD
.
POST
:
return
axios
.
post
(
url
,
params
,
config
)
return
axios
.
post
(
url
,
params
,
config
)
;
default
:
return
axios
.
get
(
url
,
{
params
,
...
config
})
return
axios
.
get
(
url
,
{
params
,
...
config
})
;
}
}
...
...
@@ -104,59 +104,59 @@ async function request (url, method, params, config) {
* @param interceptors
* @param options
*/
function
loadInterceptors
(
interceptors
,
options
)
{
const
{
request
,
response
}
=
interceptors
function
loadInterceptors
(
interceptors
,
options
)
{
const
{
request
,
response
}
=
interceptors
;
// 加载请求拦截器
request
.
forEach
(
item
=>
{
let
{
onFulfilled
,
onRejected
}
=
item
if
(
!
onFulfilled
||
typeof
onFulfilled
!==
'
function
'
)
{
onFulfilled
=
config
=>
config
request
.
forEach
(
(
item
)
=>
{
let
{
onFulfilled
,
onRejected
}
=
item
;
if
(
!
onFulfilled
||
typeof
onFulfilled
!==
"
function
"
)
{
onFulfilled
=
(
config
)
=>
config
;
}
if
(
!
onRejected
||
typeof
onRejected
!==
'
function
'
)
{
onRejected
=
error
=>
Promise
.
reject
(
error
)
if
(
!
onRejected
||
typeof
onRejected
!==
"
function
"
)
{
onRejected
=
(
error
)
=>
Promise
.
reject
(
error
);
}
axios
.
interceptors
.
request
.
use
(
config
=>
onFulfilled
(
config
,
options
),
error
=>
onRejected
(
error
,
options
)
)
})
(
config
)
=>
onFulfilled
(
config
,
options
),
(
error
)
=>
onRejected
(
error
,
options
)
)
;
})
;
// 加载响应拦截器
response
.
forEach
(
item
=>
{
let
{
onFulfilled
,
onRejected
}
=
item
if
(
!
onFulfilled
||
typeof
onFulfilled
!==
'
function
'
)
{
onFulfilled
=
response
=>
response
response
.
forEach
(
(
item
)
=>
{
let
{
onFulfilled
,
onRejected
}
=
item
;
if
(
!
onFulfilled
||
typeof
onFulfilled
!==
"
function
"
)
{
onFulfilled
=
(
response
)
=>
response
;
}
if
(
!
onRejected
||
typeof
onRejected
!==
'
function
'
)
{
onRejected
=
error
=>
Promise
.
reject
(
error
)
if
(
!
onRejected
||
typeof
onRejected
!==
"
function
"
)
{
onRejected
=
(
error
)
=>
Promise
.
reject
(
error
);
}
axios
.
interceptors
.
response
.
use
(
response
=>
onFulfilled
(
response
,
options
),
error
=>
onRejected
(
error
,
options
)
)
})
(
response
)
=>
onFulfilled
(
response
,
options
),
(
error
)
=>
onRejected
(
error
,
options
)
)
;
})
;
}
/**
* 解析 url 中的参数
* @param url
* @returns {Object}
*/
function
parseUrlParams
(
url
)
{
const
params
=
{}
if
(
!
url
||
url
===
''
||
typeof
url
!==
'
string
'
)
{
return
params
function
parseUrlParams
(
url
)
{
const
params
=
{}
;
if
(
!
url
||
url
===
""
||
typeof
url
!==
"
string
"
)
{
return
params
;
}
const
paramsStr
=
url
.
split
(
'
?
'
)[
1
]
const
paramsStr
=
url
.
split
(
"
?
"
)[
1
];
if
(
!
paramsStr
)
{
return
params
return
params
;
}
const
paramsArr
=
paramsStr
.
replace
(
/&|=/g
,
'
'
).
split
(
'
'
)
const
paramsArr
=
paramsStr
.
replace
(
/&|=/g
,
"
"
).
split
(
"
"
);
for
(
let
i
=
0
;
i
<
paramsArr
.
length
/
2
;
i
++
)
{
const
value
=
paramsArr
[
i
*
2
+
1
]
params
[
paramsArr
[
i
*
2
]]
=
value
===
'
true
'
?
true
:
(
value
===
'
false
'
?
false
:
value
)
const
value
=
paramsArr
[
i
*
2
+
1
];
params
[
paramsArr
[
i
*
2
]]
=
value
===
"
true
"
?
true
:
value
===
"
false
"
?
false
:
value
;
}
return
params
return
params
;
}
// 获取Cookie
...
...
@@ -174,4 +174,4 @@ export {
loadInterceptors
,
parseUrlParams
,
// getCookie
}
}
;
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