Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
063e1485
authored
2023-03-23 10:33:46 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:区县接入
1 parent
6368c208
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
430 additions
and
424 deletions
public/config.json
src/layout1/components/AppMain.vue
src/layout1/components/TagsView/index.vue
src/layout1/index.vue
src/router/index.js
src/store/modules/permission.js
src/styles/sbPublic.scss
src/views/jsbwcx/index.vue
src/views/loginjg/index.vue
src/views/system/menus/edit-dialog.vue
src/views/system/users/data/index.js
public/config.json
View file @
063e148
{
"TITLE"
:
"汉中市数据上报系统"
,
"THEME"
:
"
jg
"
,
"THEME"
:
"
sb
"
,
"SERVERAPI"
:
"/bdcsjsb"
,
"MANAGEMENTAPI"
:
"http: //192.168.2.236/management"
}
\ No newline at end of file
...
...
src/layout1/components/AppMain.vue
View file @
063e148
...
...
@@ -4,7 +4,7 @@
* @LastEditTime: 2023-03-22 10:23:46
-->
<
template
>
<section
class=
"app-main"
>
<section>
<transition
name=
"fade-transform"
mode=
"out-in"
>
<router-view
/>
</transition>
...
...
@@ -20,14 +20,3 @@ export default {
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.app-main
{
height
:
calc
(
100vh
-
74px
);
overflow-x
:
hidden
;
box-sizing
:
border-box
;
flex
:
1
;
width
:
100%
;
background
:
#EAEBF0
;
padding
:
15px
;
}
</
style
>
...
...
src/layout1/components/TagsView/index.vue
View file @
063e148
...
...
@@ -35,7 +35,7 @@ export default {
},
computed
:
{
visitedViews
()
{
return
this
.
$store
.
state
.
tagsView
.
visitedViews
return
this
.
$store
.
state
.
tagsView
.
visitedViews
.
slice
(
1
)
},
routes
()
{
return
this
.
$store
.
state
.
permission
.
routes
...
...
@@ -199,7 +199,7 @@ export default {
box-sizing
:
border-box
;
padding-top
:
3px
;
box-shadow
:
0
1px
3px
0
rgba
(
0
,
0
,
0
,
.12
),
0
0
3px
0
rgba
(
0
,
0
,
0
,
.04
);
margin-bottom
:
5px
;
.tags-view-wrapper
{
.tags-view-item
{
display
:
inline-block
;
...
...
src/layout1/index.vue
View file @
063e148
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-03-2
0 16:05:15
* @LastEditTime: 2023-03-2
3 09:21:00
-->
<
template
>
<div
class=
"app-wrapper"
>
<navbar
/>
<div
class=
"main-container"
>
<sidebar
class=
"sidebar-container"
/>
<app-main
/>
<div
class=
"app-main"
>
<tags-view
v-if=
"needTagsView"
/>
<app-main
/>
</div>
</div>
</div>
</
template
>
...
...
@@ -37,6 +40,17 @@ export default {
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.app-main
{
height
:
calc
(
100vh
-
74px
);
overflow-x
:
hidden
;
box-sizing
:
border-box
;
flex
:
1
;
width
:
100%
;
background
:
#EAEBF0
;
padding
:
10px
;
}
</
style
>
<
style
lang=
"scss"
>
@import
"~@/styles/mixin.scss"
;
@import
"~@/styles/sbSidebar.scss"
;
...
...
src/router/index.js
View file @
063e148
...
...
@@ -33,7 +33,7 @@ export const constantRoutes = [
{
path
:
'/'
,
component
:
Layout
,
redirect
:
'/jg
?redirect=%2Fhome
'
,
redirect
:
'/jg'
,
meta
:
{
title
:
'首页'
},
children
:
[
{
...
...
@@ -59,7 +59,7 @@ export const asyncRoutes = [
path
:
'index'
,
component
:
()
=>
import
(
'@/views/jsbwcx/index'
),
name
:
'jsbwcx'
,
meta
:
{
title
:
'
接收报文查询
'
,
icon
:
'zsgl'
}
meta
:
{
title
:
'
区县接入
'
,
icon
:
'zsgl'
}
}
]
},
...
...
src/store/modules/permission.js
View file @
063e148
...
...
@@ -2,7 +2,7 @@
* @Author: xiaomiao 1158771342@qq.com
* @Date: 2023-03-09 15:24:53
* @LastEditors: Please set LastEditors
* @LastEditTime: 2023-03-2
1 16:05:39
* @LastEditTime: 2023-03-2
3 10:19:35
* @FilePath: \上报\bdcjg-web\src\store\modules\permission.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -25,7 +25,7 @@ const mutations = {
}
const
actions
=
{
// 添加全部菜单
generateRoutes
({
commit
},
getMenuInfo
)
{
generateRoutes
({
commit
},
getMenuInfo
)
{
let
Layout
;
if
(
Vue
.
prototype
.
BASE_API
.
THEME
==
'sb'
)
{
Layout
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
`@/layout1`
)))
...
...
@@ -40,6 +40,7 @@ const actions = {
item
.
children
=
asyncRouter
(
item
.
children
)
}
item
.
path
=
JSON
.
parse
(
item
.
metadata
)?.
path
||
'/'
item
.
affix
=
JSON
.
parse
(
item
.
metadata
)?.
affix
||
false
if
(
!
item
.
parentId
)
{
item
.
component
=
Layout
}
else
{
...
...
@@ -47,7 +48,8 @@ const actions = {
}
item
.
meta
=
{
title
:
item
.
name
,
icon
:
item
.
icon
icon
:
item
.
icon
,
affix
:
item
.
affix
}
})
return
routers
...
...
src/styles/sbPublic.scss
View file @
063e148
...
...
@@ -6,7 +6,6 @@
min-width
:
1280px
;
box-sizing
:
border-box
;
overflow-x
:
hidden
;
padding
:
2px
;
&
-header
{
width
:
100%
;
...
...
@@ -20,7 +19,7 @@
&
-content
{
width
:
100%
;
box-sizing
:
border-box
;
margin-top
:
1
5
px
;
margin-top
:
1
0
px
;
background
:
#FFFFFF
;
border-radius
:
4px
;
background-size
:
100%
100%
;
...
...
@@ -142,4 +141,4 @@
background-color
:
white
;
;
background-size
:
cover
;
}
}
\ No newline at end of file
...
...
src/views/jsbwcx/index.vue
View file @
063e148
...
...
@@ -4,13 +4,15 @@
<!-- 头部搜索 -->
<div
class=
"from-clues-header"
>
<el-form
ref=
"ruleForm"
:model=
"form"
label-width=
"100px"
>
<el-form-item>
<el-form-item
v-if=
"BASE_API.THEME=='jg'"
>
<Breadcrumb
/>
</el-form-item>
<el-row
class=
"mb-5"
>
<el-col
:span=
"6"
>
<el-form-item
label=
"行政区"
prop=
"qxdm"
>
<el-select
v-model=
"$store.state.user.userInfo.grade === 'county' ? form.qxdm = $store.state.user.userInfo.areaCode : form.qxdm"
class=
"width100"
clearable
placeholder=
"行政区"
:disabled=
"$store.state.user.userInfo.grade === 'county'"
>
<el-select
v-model=
"$store.state.user.userInfo.grade === 'county' ? form.qxdm = $store.state.user.userInfo.areaCode : form.qxdm"
class=
"width100"
clearable
placeholder=
"行政区"
:disabled=
"$store.state.user.userInfo.grade === 'county'"
>
<el-option
v-for=
"item in dicData['A20']"
:key=
"item.DCODE"
:label=
"item.DNAME"
:value=
"item.DCODE"
>
</el-option>
</el-select>
...
...
@@ -99,6 +101,7 @@
</
template
>
<
script
>
import
Vue
from
'vue'
// 接收报文查询
// 引入表格头部数据
import
data
from
"./data"
;
...
...
src/views/loginjg/index.vue
View file @
063e148
...
...
@@ -23,242 +23,243 @@
</
template
>
<
script
>
import
{
loginIn
}
from
"@/api/login.js"
;
import
{
api
,
getAction
}
from
"@/api/manageApi"
;
export
default
{
name
:
"Login"
,
data
()
{
return
{
user
:
{
account
:
""
,
password
:
""
,
checkStatus
:
false
,
},
productName
:
""
,
rules
:
{
account
:
[{
required
:
true
,
message
:
"请填写帐号"
,
trigger
:
"blur"
}],
password
:
[{
required
:
true
,
message
:
"请填写密码"
,
trigger
:
"blur"
}],
},
};
},
created
()
{
const
params
=
{};
const
queryOptions
=
{
conditionGroup
:
{
conditions
:
[
{
property
:
"code"
,
value
:
"BDCJGPT"
,
operator
:
"EQ"
,
},
],
queryRelation
:
"AND"
,
},
};
params
.
queryOptions
=
JSON
.
stringify
(
queryOptions
);
//根据子系统code获取子系统详细信息
getAction
(
api
.
subsystem
,
params
).
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
this
.
productName
=
res
.
content
[
0
].
name
;
this
.
$store
.
dispatch
(
"products/setData"
,
res
.
content
[
0
].
code
);
sessionStorage
.
setItem
(
"products"
,
res
.
content
[
0
].
code
)
import
{
loginIn
}
from
"@/api/login.js"
;
import
{
api
,
getAction
}
from
"@/api/manageApi"
;
export
default
{
name
:
"Login"
,
data
()
{
return
{
user
:
{
account
:
""
,
password
:
""
,
checkStatus
:
false
,
},
productName
:
""
,
rules
:
{
account
:
[{
required
:
true
,
message
:
"请填写帐号"
,
trigger
:
"blur"
}],
password
:
[{
required
:
true
,
message
:
"请填写密码"
,
trigger
:
"blur"
}],
},
};
},
created
()
{
const
params
=
{};
const
queryOptions
=
{
conditionGroup
:
{
conditions
:
[
{
property
:
"code"
,
value
:
"BDCJGPT"
,
operator
:
"EQ"
,
},
],
queryRelation
:
"AND"
,
},
};
params
.
queryOptions
=
JSON
.
stringify
(
queryOptions
);
//根据子系统code获取子系统详细信息
getAction
(
api
.
subsystem
,
params
).
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
this
.
productName
=
res
.
content
[
0
].
name
;
this
.
$store
.
dispatch
(
"products/setData"
,
res
.
content
[
0
].
code
);
sessionStorage
.
setItem
(
"products"
,
res
.
content
[
0
].
code
)
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
});
}
});
},
mounted
()
{
// this.checkUserName();
},
methods
:
{
//记住用户名
checkUserName
:
function
(
flag
)
{
this
.
user
.
checkStatus
=
flag
;
if
(
this
.
user
.
checkStatus
)
{
localStorage
.
setItem
(
"accountId"
,
this
.
user
.
account
);
let
name
=
localStorage
.
getItem
(
"accountId"
);
if
(
name
===
""
)
{
return
;
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
})
;
this
.
user
.
account
=
name
;
}
});
},
mounted
()
{
// this.checkUserName();
}
else
{
this
.
user
.
account
=
localStorage
.
getItem
(
"accountId"
);
}
},
methods
:
{
//记住用户名
checkUserName
:
function
(
flag
)
{
this
.
user
.
checkStatus
=
flag
;
if
(
this
.
user
.
checkStatus
)
{
localStorage
.
setItem
(
"accountId"
,
this
.
user
.
account
);
let
name
=
localStorage
.
getItem
(
"accountId"
);
if
(
name
===
""
)
{
return
;
}
else
{
this
.
user
.
account
=
name
;
}
}
else
{
this
.
user
.
account
=
localStorage
.
getItem
(
"accountId"
);
login
(
user
)
{
var
self
=
this
;
this
.
$refs
[
user
].
validate
((
valid
)
=>
{
if
(
valid
)
{
loginIn
(
self
.
user
.
account
,
self
.
user
.
password
)
.
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
//存储token
localStorage
.
setItem
(
"token"
,
`Bearer
${
res
.
content
}
`
);
//登录成功后需判断有无重定向,没有重定向则跳转首页
console
.
log
(
this
.
$route
.
query
.
redirect
);
this
.
$router
.
replace
(
this
.
$route
.
query
.
redirect
||
"/home"
);
}
else
{
//错误处理
}
})
.
catch
((
error
)
=>
{
// console.dir(error);
});
}
},
login
(
user
)
{
var
self
=
this
;
this
.
$refs
[
user
].
validate
((
valid
)
=>
{
if
(
valid
)
{
loginIn
(
self
.
user
.
account
,
self
.
user
.
password
)
.
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
//存储token
localStorage
.
setItem
(
"token"
,
`Bearer
${
res
.
content
}
`
);
//登录成功后需判断有无重定向,没有重定向则跳转首页
this
.
$router
.
replace
(
this
.
$route
.
query
.
redirect
||
"/"
);
}
else
{
//错误处理
}
})
.
catch
((
error
)
=>
{
// console.dir(error);
});
}
});
},
});
},
components
:
{},
};
},
components
:
{},
};
</
script
>
<
style
scoped
lang=
"scss"
>
.username
,
.password
{
position
:
relative
;
&:before
{
content
:
""
;
display
:
block
;
width
:
16px
;
height
:
16px
;
position
:
absolute
;
left
:
10px
;
top
:
7px
;
background-size
:
100%
100%
;
}
.username
,
.password
{
position
:
relative
;
/
deep
/
.el-input__inner
{
text-indent
:
24px
;
border
:
1px
solid
rgba
(
11
,
161
,
248
,
0.4
);
background-color
:
rgba
(
6
,
135
,
205
,
0.3
)
!important
;
}
&:before
{
content
:
""
;
display
:
block
;
width
:
16px
;
height
:
16px
;
position
:
absolute
;
left
:
10px
;
top
:
7px
;
background-size
:
100%
100%
;
}
.username
::before
{
background-image
:
url(../../image/username.png)
;
/
deep
/
.el-input__inner
{
text-indent
:
24px
;
border
:
1px
solid
rgba
(
11
,
161
,
248
,
0.4
);
background-color
:
rgba
(
6
,
135
,
205
,
0.3
)
!important
;
}
}
.password
::before
{
background-image
:
url(../../image/password
.png)
;
}
.username
::before
{
background-image
:
url(../../image/username
.png)
;
}
.bg
{
width
:
100%
;
height
:
100%
;
min-width
:
1440px
;
min-height
:
560px
;
background
:
url(../../image/loginBoxBg.png)
no-repeat
;
.password
::before
{
background-image
:
url(../../image/password.png)
;
}
.bg
{
width
:
100%
;
height
:
100%
;
min-width
:
1440px
;
min-height
:
560px
;
background
:
url(../../image/loginBoxBg.png)
no-repeat
;
background-size
:
100%
100%
;
overflow
:
hidden
;
position
:
relative
;
.login-logo
{
background
:
url(../../image/loginLogo.png)
no-repeat
;
background-size
:
100%
100%
;
overflow
:
hidden
;
position
:
relative
;
.login-logo
{
background
:
url(../../image/loginLogo.png)
no-repeat
;
background-size
:
100%
100%
;
width
:
580px
;
height
:
540px
;
position
:
absolute
;
top
:
25%
;
left
:
19%
;
}
width
:
580px
;
height
:
540px
;
position
:
absolute
;
top
:
25%
;
left
:
19%
;
}
}
.login-inner-bg
{
background
:
url(../../image/loginBg.png)
no-repeat
;
width
:
20.6%
;
height
:
43%
;
min-width
:
360px
;
min-height
:
380px
;
top
:
30%
;
right
:
18%
;
position
:
absolute
;
background-size
:
100%
100%
;
box-sizing
:
border-box
;
padding
:
56px
;
.login-inner-bg
{
background
:
url(../../image/loginBg.png)
no-repeat
;
width
:
20.6%
;
height
:
43%
;
min-width
:
360px
;
min-height
:
380px
;
top
:
30%
;
right
:
18%
;
position
:
absolute
;
background-size
:
100%
100%
;
box-sizing
:
border-box
;
padding
:
56px
;
h2
{
width
:
100%
;
font-size
:
36px
;
font-weight
:
700
;
color
:
#fff
;
text-align
:
center
;
white-space
:
nowrap
;
position
:
absolute
;
right
:
0
;
top
:
-70px
;
background-image
:
linear-gradient
(
180deg
,
h2
{
width
:
100%
;
font-size
:
36px
;
font-weight
:
700
;
color
:
#fff
;
text-align
:
center
;
white-space
:
nowrap
;
position
:
absolute
;
right
:
0
;
top
:
-70px
;
background-image
:
linear-gradient
(
180deg
,
rgba
(
99
,
163
,
255
,
1
)
0
,
rgba
(
99
,
163
,
255
,
1
)
0
,
rgba
(
182
,
220
,
255
,
1
)
49.731445%
,
rgba
(
114
,
190
,
255
,
1
)
100%
,
rgba
(
114
,
190
,
255
,
1
)
100%
);
overflow-wrap
:
break-word
;
color
:
rgba
(
255
,
255
,
255
,
1
);
font-size
:
36px
;
font-family
:
AlimamaShuHeiTi-Bold
;
-webkit-background-clip
:
text
;
-webkit-text-fill-color
:
transparent
;
}
rgba
(
114
,
190
,
255
,
1
)
100%
);
overflow-wrap
:
break-word
;
color
:
rgba
(
255
,
255
,
255
,
1
);
font-size
:
36px
;
font-family
:
AlimamaShuHeiTi-Bold
;
-webkit-background-clip
:
text
;
-webkit-text-fill-color
:
transparent
;
}
}
.login
{
.user_style
{
h3
{
color
:
#fff
;
font-size
:
22px
;
font-weight
:
normal
;
text-align
:
center
;
margin
:
16px
auto
34px
;
font-weight
:
400
;
}
}
.btn
{
width
:
100%
;
height
:
6vh
;
background-color
:
#00c2de
;
border-radius
:
5px
;
font-size
:
1.4vw
;
color
:
#ffffff
;
}
.btn
:hover
{
cursor
:
pointer
;
background-color
:
#2d8cf0
;
.login
{
.user_style
{
h3
{
color
:
#fff
;
font-size
:
22px
;
font-weight
:
normal
;
text-align
:
center
;
margin
:
16px
auto
34px
;
font-weight
:
400
;
}
}
.login
#loginform
{
.el-form-item
{
margin-bottom
:
24px
!important
;
}
.btn
{
width
:
100%
;
height
:
6vh
;
background-color
:
#00c2de
;
border-radius
:
5px
;
font-size
:
1.4vw
;
color
:
#ffffff
;
}
.login-btn
{
margin-top
:
40px
!important
;
}
.btn
:hover
{
cursor
:
pointer
;
background-color
:
#2d8cf0
;
}
}
.el-button
{
font-size
:
18px
;
background
:
#0d8cc0
!important
;
color
:
#ffffff
!important
;
cursor
:
pointer
!important
;
}
.login
#loginform
{
.el-form-item
{
margin-bottom
:
24px
!important
;
}
.el-input__inner
{
width
:
100%
!important
;
}
.login-btn
{
margin-top
:
40px
!important
;
}
.el-checkbox__label
{
color
:
#fff
;
}
.el-button
{
font-size
:
18px
;
background
:
#0d8cc0
!important
;
color
:
#ffffff
!important
;
cursor
:
pointer
!important
;
}
.inputUser
.ivu-input
{
padding
:
6px
24px
!important
;
border
:
1px
solid
#9f9f9f
!important
;
.el-input__inner
{
width
:
100%
!important
;
}
tr
.hover-row
>
td
.el-table__cell
{
background-color
:
transparent
!important
;
.el-checkbox__label
{
color
:
#fff
;
}
}
.inputUser
.ivu-input
{
padding
:
6px
24px
!important
;
border
:
1px
solid
#9f9f9f
!important
;
}
tr
.hover-row
>
td
.el-table__cell
{
background-color
:
transparent
!important
;
}
</
style
>
...
...
src/views/system/menus/edit-dialog.vue
View file @
063e148
...
...
@@ -11,12 +11,7 @@
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"图标:"
label-width=
"54px"
>
<el-input
v-model=
"form.icon"
placeholder=
"请选择图标"
:prefix-icon=
"form.icon"
clearable
@
focus=
"getIconList"
/>
<el-input
v-model=
"form.icon"
placeholder=
"请选择图标"
:prefix-icon=
"form.icon"
clearable
@
focus=
"getIconList"
/>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -68,206 +63,208 @@
</
template
>
<
script
>
import
{
getParentMenuListAction
}
from
'@/api/authorityManage'
import
IconList
from
'../../../components/IconList'
import
JsonEditor
from
'@/components/JsonEditors'
import
{
validateCode
}
from
'@/utils/validate'
;
import
{
api
,
httpAction
}
from
'@/api/manageApi'
export
default
{
name
:
'MenuModal'
,
components
:
{
JsonEditor
,
IconList
,
},
props
:
{
value
:
{
type
:
Boolean
,
default
:
false
},
productId
:
{
type
:
String
,
default
:
''
import
{
getParentMenuListAction
}
from
'@/api/authorityManage'
import
IconList
from
'../../../components/IconList'
import
JsonEditor
from
'@/components/JsonEditors'
import
{
validateCode
}
from
'@/utils/validate'
;
import
{
api
,
httpAction
}
from
'@/api/manageApi'
export
default
{
name
:
'MenuModal'
,
components
:
{
JsonEditor
,
IconList
,
},
props
:
{
value
:
{
type
:
Boolean
,
default
:
false
},
productId
:
{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
myValue
:
this
.
value
,
form
:
{
icon
:
''
,
code
:
''
},
rules
:
{
name
:
[{
required
:
true
,
message
:
'请输入菜单名称'
,
trigger
:
'blur'
}],
code
:
[
{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
},
{
validator
:
validateCode
,
trigger
:
'blur'
}
]
},
title
:
''
,
type
:
''
,
visible
:
false
,
parentMenuList
:
[],
menuKey
:
0
,
jumpModeList
:
[
{
name
:
'在当前页面显示'
,
value
:
1
},
{
name
:
'跳转到新页面'
,
value
:
2
}
],
setProps
:
{
value
:
'id'
,
label
:
'name'
,
children
:
'children'
,
expandTrigger
:
'hover'
,
checkStrictly
:
true
,
// 可取消关联,选择任意一级选项
emitPath
:
false
},
dataUrl
:
api
.
menus
}
},
computed
:
{
codeComputed
:
{
get
:
function
()
{
return
this
.
form
.
code
},
set
:
function
(
val
)
{
this
.
form
.
code
=
val
.
toUpperCase
()
}
}
},
watch
:
{
value
(
val
)
{
this
.
myValue
=
val
}
},
methods
:
{
// 获取父级菜单
getParentMenuList
(
id
)
{
getParentMenuListAction
(
id
).
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
const
list
=
this
.
$dealArrChildren
(
res
.
content
)
if
(
id
)
{
this
.
parentMenuList
=
this
.
$dealArrDisabled
(
this
.
$deepCopy
(
list
),
id
)
this
.
menuKey
++
}
else
{
this
.
parentMenuList
=
list
}
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
})
}
})
},
data
()
{
return
{
myValue
:
this
.
value
,
form
:
{
icon
:
''
,
code
:
''
},
rules
:
{
name
:
[{
required
:
true
,
message
:
'请输入菜单名称'
,
trigger
:
'blur'
}],
code
:
[
{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
},
{
validator
:
validateCode
,
trigger
:
'blur'
}
]
},
title
:
''
,
type
:
''
,
visible
:
false
,
parentMenuList
:
[],
menuKey
:
0
,
jumpModeList
:
[
{
name
:
'在当前页面显示'
,
value
:
1
},
{
name
:
'跳转到新页面'
,
value
:
2
}
],
setProps
:
{
value
:
'id'
,
label
:
'name'
,
children
:
'children'
,
expandTrigger
:
'hover'
,
checkStrictly
:
true
,
// 可取消关联,选择任意一级选项
emitPath
:
false
},
dataUrl
:
api
.
menus
}
// 选择图标
getIconName
(
data
)
{
this
.
form
.
icon
=
data
;
},
computed
:
{
codeComputed
:
{
get
:
function
()
{
return
this
.
form
.
code
},
set
:
function
(
val
)
{
this
.
form
.
code
=
val
.
toUpperCase
()
}
}
getIconList
()
{
this
.
$refs
.
iconList
.
show
(
true
)
},
getIconName
(
data
)
{
this
.
form
.
icon
=
data
},
// 配置参数
getJsonString
(
data
)
{
this
.
form
.
metadata
=
data
},
watch
:
{
value
(
val
)
{
this
.
myValue
=
val
// 新增菜单
add
()
{
this
.
getParentMenuList
(
this
.
productId
)
this
.
type
=
0
this
.
form
.
jumpMode
=
1
},
// 编辑菜单
edit
(
record
)
{
this
.
type
=
1
// 若有id为编辑
if
(
record
.
id
)
{
this
.
$nextTick
(()
=>
{
this
.
form
=
Object
.
assign
({},
record
)
this
.
getParentMenuList
(
this
.
productId
)
})
}
},
methods
:
{
// 获取父级菜单
getParentMenuList
(
id
)
{
getParentMenuListAction
(
id
).
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
const
list
=
this
.
$dealArrChildren
(
res
.
content
)
if
(
id
)
{
this
.
parentMenuList
=
this
.
$dealArrDisabled
(
this
.
$deepCopy
(
list
),
id
)
this
.
menuKey
++
}
else
{
this
.
parentMenuList
=
list
}
// 选择上级菜单
handleChange
(
value
)
{
this
.
form
.
parentId
=
value
},
// 保存
submitForm
(
submitType
)
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
let
method
=
''
let
url
=
''
const
formData
=
this
.
form
formData
.
productId
=
this
.
productId
if
(
!
formData
.
id
)
{
method
=
'post'
url
=
this
.
dataUrl
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
})
method
=
'put'
url
=
`
${
this
.
dataUrl
}
/
${
formData
.
id
}
`
}
})
},
// 选择图标
getIconName
(
data
)
{
this
.
form
.
icon
=
data
;
},
getIconList
()
{
this
.
$refs
.
iconList
.
show
(
true
)
},
getIconName
(
data
)
{
this
.
form
.
icon
=
data
},
// 配置参数
getJsonString
(
data
)
{
this
.
form
.
metadata
=
data
},
// 新增菜单
add
()
{
this
.
getParentMenuList
(
this
.
productId
)
this
.
type
=
0
this
.
form
.
jumpMode
=
1
},
// 编辑菜单
edit
(
record
)
{
this
.
type
=
1
// 若有id为编辑
if
(
record
.
id
)
{
this
.
$nextTick
(()
=>
{
this
.
form
=
Object
.
assign
({},
record
)
this
.
getParentMenuList
(
this
.
productId
)
})
}
},
// 选择上级菜单
handleChange
(
value
)
{
this
.
form
.
parentId
=
value
},
// 保存
submitForm
(
submitType
)
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
let
method
=
''
let
url
=
''
const
formData
=
this
.
form
formData
.
productId
=
this
.
productId
if
(
!
formData
.
id
)
{
method
=
'post'
url
=
this
.
dataUrl
}
else
{
method
=
'put'
url
=
`
${
this
.
dataUrl
}
/
${
formData
.
id
}
`
}
debugger
httpAction
(
url
,
formData
,
method
)
.
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
this
.
$message
.
success
({
message
:
res
.
message
,
showClose
:
true
})
httpAction
(
url
,
formData
,
method
)
.
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
this
.
$message
.
success
({
message
:
res
.
message
,
showClose
:
true
})
this
.
resetForm
()
this
.
$emit
(
'ok'
)
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
})
}
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
}
})
},
resetForm
()
{
this
.
$refs
.
form
.
resetFields
()
this
.
form
=
{
icon
:
''
,
code
:
''
this
.
resetForm
()
this
.
$emit
(
'ok'
)
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
})
}
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
}
},
close
()
{
this
.
resetForm
()
this
.
$emit
(
'input'
,
false
)
})
},
resetForm
()
{
this
.
$refs
.
form
.
resetFields
()
this
.
form
=
{
icon
:
''
,
code
:
''
}
},
close
()
{
this
.
resetForm
()
this
.
$emit
(
'input'
,
false
)
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.modifydialog
{
&-con
{
background
:
#031a46
;
}
/
deep
/
.el-dialog__header
{
.dialog_title
{
display
:
-webkit-box
;
display
:
-ms-flexbox
;
display
:
flex
;
position
:
relative
;
top
:
-8px
;
width
:
28%
;
height
:
40px
;
margin-left
:
28px
;
-webkit-box-pack
:
center
;
-ms-flex-pack
:
center
;
justify-content
:
center
;
white-space
:
nowrap
;
b
{
font-size
:
16px
;
}
}
.el-dialog__headerbtn
{
right
:
20px
!important
;
top
:
23px
!important
;
.modifydialog
{
&-con
{
background
:
#031a46
;
}
/
deep
/
.el-dialog__header
{
.dialog_title
{
display
:
-webkit-box
;
display
:
-ms-flexbox
;
display
:
flex
;
position
:
relative
;
top
:
-8px
;
width
:
28%
;
height
:
40px
;
margin-left
:
28px
;
-webkit-box-pack
:
center
;
-ms-flex-pack
:
center
;
justify-content
:
center
;
white-space
:
nowrap
;
b
{
font-size
:
16px
;
}
}
.el-dialog__headerbtn
{
right
:
20px
!important
;
top
:
23px
!important
;
}
}
}
</
style
>
...
...
src/views/system/users/data/index.js
View file @
063e148
/*
* @Author: xiaomiao 1158771342@qq.com
* @Date: 2023-01-30 17:59:51
* @LastEditors:
xiaomiao 1158771342@qq.com
* @LastEditTime: 2023-03-2
1 18:34:17
* @LastEditors:
Please set LastEditors
* @LastEditTime: 2023-03-2
3 09:34:50
* @FilePath: \监管系统\js-web-jianguan\src\views\system\users\data\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -29,7 +29,8 @@ class data extends filter {
},
{
prop
:
"departmentName"
,
label
:
"组织机构"
label
:
"组织机构"
,
minWidth
:
130
},
{
prop
:
"telephone"
,
...
...
Please
register
or
sign in
to post a comment