Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sgaqgl-vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李苏
sgaqgl-vue
Commits
af91be88
Commit
af91be88
authored
Nov 15, 2022
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
动态路由 和 修改
parent
92f63fb5
Changes
13
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1069 additions
and
1110 deletions
+1069
-1110
.env.development
.env.development
+1
-1
.env.production
.env.production
+1
-1
index.js
src/router/index.js
+1020
-1074
permission.js
src/store/modules/permission.js
+26
-9
edit.vue
src/views/basicData/operationDcManagement/edit.vue
+2
-2
edit.vue
src/views/basicData/securityDocumentManagement/edit.vue
+3
-3
mainEdit.vue
src/views/basicData/securityDocumentManagement/mainEdit.vue
+3
-3
edit.vue
src/views/daily/classification/edit.vue
+2
-2
edit.vue
src/views/daily/nrtm/edit.vue
+2
-2
edit.vue
src/views/daily/planManage/edit.vue
+2
-6
edit.vue
src/views/dangerManagement/yhbzfl/edit.vue
+2
-2
edit.vue
src/views/dangerManagement/yhfl/edit.vue
+2
-2
edit.vue
src/views/riskPrecontrol/screeningCriteria/edit.vue
+3
-3
No files found.
.env.development
View file @
af91be88
...
...
@@ -6,7 +6,7 @@ ENV = 'http://demo.ruoyi.vip/'
# 格物管理系统/开发环境
VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_Print = 'http://1
19.3.92.249
:18080/dmg'
VUE_APP_BASE_Print = 'http://1
92.168.30.254
:18080/dmg'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
.env.production
View file @
af91be88
...
...
@@ -5,4 +5,4 @@ VUE_APP_TITLE = 陕钢安全管理
ENV = 'production'
# 陕钢安全管理/生产环境
VUE_APP_BASE_API = '
http://localhost:80/
'
VUE_APP_BASE_API = '
/dev-api
'
src/router/index.js
View file @
af91be88
This diff is collapsed.
Click to expand it.
src/store/modules/permission.js
View file @
af91be88
...
...
@@ -79,22 +79,34 @@ const permission = {
getRouters
({}).
then
(
res
=>
{
let
menus
=
res
.
data
.
menu
let
asymenus
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
.
menu
))
/* 权限路由*/
console
.
log
(
menus
,
'权限路由——————————————————————————————'
,
powerRoutes
)
/* */
let
mapTree
=
function
(
arr
){
/* 逻辑判断*/
arr
.
forEach
((
item
,
index
)
=>
{
let
mkid
=
item
.
meta
.
mkid
function
filter
(
data
)
{
var
newData
=
data
.
filter
(
(
item
)
=>
{
let
hasMkid
=
false
menus
.
forEach
(
e
=>
{
if
(
e
.
mkid
==
mkid
){
asy
menus
.
forEach
(
e
=>
{
if
(
e
.
mkid
==
item
.
meta
.
mkid
){
hasMkid
=
true
}
})
return
hasMkid
}
)
newData
.
forEach
(
x
=>
x
.
children
&&
(
x
.
children
=
filter
(
x
.
children
)))
return
newData
}
let
mapTree
=
function
(
arr
){
/* 逻辑判断*/
arr
.
forEach
((
item
,
index
)
=>
{
/* 存在权限*/
if
(
hasMkid
){
console
.
log
(
item
,
'存在'
)
}
else
{
console
.
log
(
item
,
'不存在'
)
arr
.
splice
(
index
,
1
)
}
if
(
item
.
children
&&
item
.
children
.
length
>
0
){
...
...
@@ -103,7 +115,8 @@ const permission = {
})
return
arr
}
let
newPowerRoutes
=
filter
(
powerRoutes
)
console
.
log
(
newPowerRoutes
,
'newPowerRoutes'
)
/* 转化菜单格式*/
let
delArr
=
[]
menus
.
forEach
((
item
,
index
)
=>
{
...
...
@@ -125,7 +138,8 @@ const permission = {
newmenus
.
push
(
mi
)
}
})
res
.
data
=
dgmk
(
newmenus
,
0
)
res
.
data
=
[...
dgmk
(
newmenus
,
0
),...
newPowerRoutes
]
const
sdata
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
))
const
rdata
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
))
const
sidebarRoutes
=
filterAsyncRouter
(
sdata
)
...
...
@@ -133,6 +147,9 @@ const permission = {
const
asyncRoutes
=
filterDynamicRoutes
(
dynamicRoutes
);
rewriteRoutes
.
push
({
path
:
'*'
,
redirect
:
'/404'
,
hidden
:
true
})
router
.
addRoutes
(
asyncRoutes
);
// router.addRoutes(powerRoutes1)
commit
(
'SET_ROUTES'
,
rewriteRoutes
)
commit
(
'SET_SIDEBAR_ROUTERS'
,
constantRoutes
.
concat
(
sidebarRoutes
))
commit
(
'SET_DEFAULT_ROUTES'
,
sidebarRoutes
)
...
...
src/views/basicData/operationDcManagement/edit.vue
View file @
af91be88
...
...
@@ -9,13 +9,13 @@
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<!--
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"序号"
ref=
"xh"
prop=
"xh"
>
<el-input
:readonly=
"readonly"
v-model=
"form.xh"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-row>
-->
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
ref=
"bz"
prop=
"bz"
>
...
...
src/views/basicData/securityDocumentManagement/edit.vue
View file @
af91be88
...
...
@@ -3,12 +3,12 @@
<!-- 填写表单内容,slot=form必写-->
<el-form
slot=
"form"
ref=
"form"
:model=
"form"
label-width=
"80px"
:rules=
"rules"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<!--
<el-col
:span=
"12"
>
<el-form-item
label=
"序号"
ref=
"appid"
prop=
"appid"
>
<el-input
:readonly=
"readonly"
v-model=
"form.appid"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"
12
"
>
</el-col>
-->
<el-col
:span=
"
24
"
>
<el-form-item
label=
"标准名称"
ref=
"name"
prop=
"name"
>
<el-input
:readonly=
"readonly"
v-model=
"form.name"
></el-input>
</el-form-item>
...
...
src/views/basicData/securityDocumentManagement/mainEdit.vue
View file @
af91be88
...
...
@@ -3,12 +3,12 @@
<!-- 填写表单内容,slot=form必写-->
<el-form
slot=
"form"
ref=
"form"
:model=
"form"
label-width=
"80px"
:rules=
"rules"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<
!--
<
el-col
:span=
"12"
>
<el-form-item
label=
"序号"
ref=
"xh"
prop=
"xh"
>
<el-input
:readonly=
"readonly"
v-model=
"form.xh"
fieldType=
'int'
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"
12
"
>
</el-col>
-->
<el-col
:span=
"
24
"
>
<el-form-item
label=
"名称"
ref=
"name"
prop=
"name"
>
<el-input
:readonly=
"readonly"
v-model=
"form.name"
></el-input>
</el-form-item>
...
...
src/views/daily/classification/edit.vue
View file @
af91be88
...
...
@@ -16,13 +16,13 @@
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<!--
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"序号"
ref=
"xh"
prop=
"xh"
>
<el-input
:readonly=
"readonly"
v-model=
"form.xh"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-row>
-->
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
ref=
"bz"
prop=
"bz"
>
...
...
src/views/daily/nrtm/edit.vue
View file @
af91be88
...
...
@@ -2,13 +2,13 @@
<RelDialog
:type=
'type'
:editApp=
'editApp'
:app=
'app'
:buttonApp=
'buttonApp'
>
<!-- 填写表单内容,slot=form必写-->
<el-form
slot=
"form"
ref=
"form"
:model=
"form"
label-width=
"80px"
:rules=
"rules"
>
<el-row
:gutter=
"20"
>
<!--
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"序号"
ref=
"xh"
prop=
"xh"
>
<el-input
:readonly=
"readonly"
v-model=
"form.xh"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-row>
-->
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"名称"
ref=
"name"
prop=
"name"
>
...
...
src/views/daily/planManage/edit.vue
View file @
af91be88
...
...
@@ -22,16 +22,12 @@
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"
12
"
>
<el-col
:span=
"
24
"
>
<el-form-item
label=
"部门"
ref=
"bmid"
prop=
"bmid"
>
<RelSelect
:readonly=
"readonly"
style=
"width: 100%;"
src=
'/kzzx/bm/query'
filterable
clearable
:match=
"
{value:'id',label:'bmmc'}" v-model='form.bmid' >
</RelSelect>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"序号"
ref=
"xh"
prop=
"xh"
>
<el-input
:readonly=
"readonly"
v-model=
"form.xh"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
...
...
src/views/dangerManagement/yhbzfl/edit.vue
View file @
af91be88
...
...
@@ -2,13 +2,13 @@
<RelDialog
:type=
'type'
:editApp=
'editApp'
:app=
'app'
:buttonApp=
'buttonApp'
>
<!-- 填写表单内容,slot=form必写-->
<el-form
slot=
"form"
ref=
"form"
:model=
"form"
label-width=
"80px"
:rules=
"rules"
>
<el-row
:gutter=
"20"
>
<!--
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"序号"
ref=
"xh"
prop=
"xh"
>
<el-input
:readonly=
"readonly"
v-model=
"form.xh"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-row>
-->
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"上层分类"
ref=
"pid"
prop=
"pid"
>
...
...
src/views/dangerManagement/yhfl/edit.vue
View file @
af91be88
...
...
@@ -2,13 +2,13 @@
<RelDialog
:type=
'type'
:editApp=
'editApp'
:app=
'app'
:buttonApp=
'buttonApp'
>
<!-- 填写表单内容,slot=form必写-->
<el-form
slot=
"form"
ref=
"form"
:model=
"form"
label-width=
"80px"
:rules=
"rules"
>
<el-row
:gutter=
"20"
>
<
!--
<
el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"序号"
ref=
"xh"
prop=
"xh"
>
<el-input
:readonly=
"readonly"
v-model=
"form.xh"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-row>
-->
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"上层分类"
ref=
"pid"
prop=
"pid"
>
...
...
src/views/riskPrecontrol/screeningCriteria/edit.vue
View file @
af91be88
...
...
@@ -78,12 +78,12 @@
<!--
<el-input
:readonly=
"readonly"
v-model=
"form.pzxx"
></el-input>
-->
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<!--
<el-col
:span=
"12"
>
<el-form-item
label=
"序号"
ref=
"xh"
prop=
"xh"
>
<el-input
:readonly=
"readonly"
v-model=
"form.xh"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"
12
"
>
</el-col>
-->
<el-col
:span=
"
24
"
>
<el-form-item
label=
"图形编号"
ref=
"txcode"
prop=
"txcode"
>
<el-input
:readonly=
"readonly"
v-model=
"form.txcode"
></el-input>
</el-form-item>
...
...
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