Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sample-form-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
赵啸非
sample-form-platform
Commits
650c003b
Commit
650c003b
authored
Nov 10, 2022
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修改设备管理页面
parent
600c48cf
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
121 additions
and
103 deletions
+121
-103
sample-form-manager-ui/admin/src/App.vue
sample-form-manager-ui/admin/src/App.vue
+2
-1
sample-form-manager-ui/admin/src/pages/hardware/NumberWriteDevice.vue
...manager-ui/admin/src/pages/hardware/NumberWriteDevice.vue
+28
-2
sample-form-manager-ui/admin/src/pages/layouts/Layouts.vue
sample-form-manager-ui/admin/src/pages/layouts/Layouts.vue
+1
-1
sample-form-manager-ui/admin/src/pages/layouts/components/Header.vue
...-manager-ui/admin/src/pages/layouts/components/Header.vue
+1
-1
sample-form-manager-ui/admin/src/pages/login/login.vue
sample-form-manager-ui/admin/src/pages/login/login.vue
+3
-0
sample-form-manager-ui/admin/src/pages/software/materials/modal/CommonLib.vue
...ui/admin/src/pages/software/materials/modal/CommonLib.vue
+16
-27
sample-form-manager-ui/admin/src/pages/software/matter/MatterManage.vue
...nager-ui/admin/src/pages/software/matter/MatterManage.vue
+3
-2
sample-form-manager-ui/admin/src/router/index.js
sample-form-manager-ui/admin/src/router/index.js
+67
-69
No files found.
sample-form-manager-ui/admin/src/App.vue
View file @
650c003b
...
...
@@ -10,9 +10,10 @@ export default {
return
{};
},
created
()
{
//
this.readVueXData();
this
.
readVueXData
();
},
methods
:
{
// 解决刷新store初始化问题
readVueXData
()
{
window
.
addEventListener
(
"
beforeunload
"
,
()
=>
{
sessionStorage
.
setItem
(
"
store
"
,
JSON
.
stringify
(
this
.
$store
.
state
));
...
...
sample-form-manager-ui/admin/src/pages/hardware/NumberWriteDevice.vue
View file @
650c003b
...
...
@@ -113,15 +113,18 @@
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
switch
disabled
class
=
"
tableScopeSwitch
"
:
active
-
value
=
"
1
"
:
inactive
-
value
=
"
0
"
inactive
-
text
=
"
停用
"
active
-
text
=
"
启用
"
v
-
model
=
"
scope.row.enabled
"
@
change
=
"
handleChange(scope.row)
"
>
<
/el-switch
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
操作
"
width
=
"
150
"
>
<
!--
<
el
-
table
-
column
align
=
"
center
"
label
=
"
操作
"
width
=
"
150
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
div
class
=
"
flex jca
"
>
<
span
...
...
@@ -144,7 +147,7 @@
>
<
/div
>
<
/template
>
<
/el-table-column
>
<
/el-table-column>
--
>
<
/el-table
>
<
/div
>
<
div
class
=
"
pagination
"
v
-
if
=
"
total
"
>
...
...
@@ -292,4 +295,27 @@ export default {
.
table
-
content
{
height
:
550
px
;
}
/deep/
.
tableScopeSwitch
.
el
-
switch__label
{
position
:
absolute
;
display
:
none
;
color
:
#
fff
;
}
/*打开时文字位置设置*/
/deep/
.
tableScopeSwitch
.
el
-
switch__label
--
right
{
z
-
index
:
1
;
left
:
0
px
;
/*不同场景下可能不同,自行调整*/
}
/*关闭时文字位置设置*/
/deep/
.
tableScopeSwitch
.
el
-
switch__label
--
left
{
z
-
index
:
1
;
right
:
0
px
;
/*不同场景下可能不同,自行调整*/
}
/*显示文字*/
/deep/
.
tableScopeSwitch
.
el
-
switch__label
.
is
-
active
{
display
:
block
;
}
/deep/
.
tableScopeSwitch
.
el
-
switch
.
el
-
switch__core
,
.
el
-
switch
.
el
-
switch__label
{
width
:
60
px
!
important
;
/*开关按钮的宽度大小*/
}
<
/style>
\ No newline at end of file
sample-form-manager-ui/admin/src/pages/layouts/Layouts.vue
View file @
650c003b
...
...
@@ -57,7 +57,7 @@ export default {
...
mapMutations
([
"
SET_deptList
"
]),
// 计算面包屑
calcBreads
()
{
let
temp
=
[{
to
:
"
/
"
,
title
:
"
数字样表系统
"
}];
let
temp
=
[{
to
:
"
/
basicsset
"
,
title
:
"
数字样表系统
"
}];
// 过滤出路由数据
let
r
=
this
.
$route
.
matched
.
filter
((
v
)
=>
v
.
meta
.
title
)
...
...
sample-form-manager-ui/admin/src/pages/layouts/components/Header.vue
View file @
650c003b
...
...
@@ -59,7 +59,7 @@ export default {
created
()
{},
methods
:
{
handleGoHome
()
{
this
.
$router
.
push
(
"
/
"
);
this
.
$router
.
push
(
"
/
basicsset
"
);
},
},
};
...
...
sample-form-manager-ui/admin/src/pages/login/login.vue
View file @
650c003b
...
...
@@ -37,6 +37,7 @@
<
script
>
import
{
login
}
from
"
@/api/login
"
;
import
local
from
"
@/utils/local
"
;
import
{
calcMenu
}
from
"
@/router
"
;
export
default
{
name
:
"
login
"
,
data
()
{
...
...
@@ -63,6 +64,8 @@ export default {
if
(
token
)
{
local
.
setLocal
(
"
sampleToken
"
,
token
);
local
.
setLocal
(
"
sampleSiteId
"
,
siteid
);
// 渲染菜单
calcMenu
();
this
.
$router
.
push
(
"
/basicsset
"
);
}
}
...
...
sample-form-manager-ui/admin/src/pages/software/materials/modal/CommonLib.vue
View file @
650c003b
...
...
@@ -3,17 +3,26 @@
<el-dialog
title=
"从公共库中选择"
:visible.sync=
"Visible"
width=
"50%"
>
<TableHeader>
<div
slot=
"right"
class=
"flex"
>
<el-select
v-model=
"department"
size=
"small"
placeholder=
"选择部门"
>
<el-select
v-model=
"department"
class=
"autoWidth"
size=
"small"
placeholder=
"选择部门"
>
<template
slot=
"prefix"
>
{{
(
deptList
.
find
((
s
)
=>
s
.
id
===
department
)
||
{
}
).
name
}}
<
/template
>
<
el
-
option
v-for=
"item in
options
"
:key=
"item.
value
"
:label=
"item.
label
"
:value=
"item.
value
"
v
-
for
=
"
item in
deptList
"
:
key
=
"
item.
id
"
:
label
=
"
item.
name
"
:
value
=
"
item.
id
"
>
<
/el-option
>
<
/el-select
>
<
el
-
input
size
=
"
small
"
style
=
"
width: 200px
"
v
-
model
=
"
searchVal
"
class
=
"
ml10 mr10
"
placeholder
=
"
请输入事项名称搜索
"
...
...
@@ -93,6 +102,7 @@
<
script
>
import
TableHeader
from
"
@/components/TableHeader.vue
"
;
import
{
mapGetters
}
from
"
vuex
"
;
export
default
{
components
:
{
TableHeader
,
...
...
@@ -113,28 +123,6 @@ export default {
}
,
data
()
{
return
{
options
:
[
{
value
:
"
选项1
"
,
label
:
"
黄金糕
"
,
},
{
value
:
"
选项2
"
,
label
:
"
双皮奶
"
,
},
{
value
:
"
选项3
"
,
label
:
"
蚵仔煎
"
,
},
{
value
:
"
选项4
"
,
label
:
"
龙须面
"
,
},
{
value
:
"
选项5
"
,
label
:
"
北京烤鸭
"
,
},
],
department
:
""
,
searchVal
:
""
,
tableData
:
[
...
...
@@ -172,6 +160,7 @@ export default {
this
.
$emit
(
"
update:libVisible
"
,
val
);
}
,
}
,
...
mapGetters
([
"
deptList
"
]),
}
,
methods
:
{
handleOk
()
{
...
...
sample-form-manager-ui/admin/src/pages/software/matter/MatterManage.vue
View file @
650c003b
...
...
@@ -97,7 +97,7 @@
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"
total
"
label
=
"
样表
次数
"
label
=
"
填单
次数
"
align
=
"
center
"
width
=
"
80
"
>
...
...
@@ -182,6 +182,7 @@
<
/el-select
>
<
el
-
input
size
=
"
small
"
style
=
"
width: 200px
"
v
-
model
=
"
rightSearch
"
class
=
"
ml10 mr10
"
placeholder
=
"
请输入事项名称搜索
"
...
...
@@ -457,7 +458,7 @@ export default {
}
,
// 右边加入
async
handleJoin
(
id
)
{
let
res
=
await
createMatter
({
ids
:
id
,
siteId
:
this
.
siteId
}
);
let
res
=
await
createMatter
({
ids
:
id
,
siteId
:
this
.
siteId
}
);
let
{
code
,
msg
}
=
res
.
data
;
if
(
code
===
1
)
{
this
.
$message
.
success
(
msg
);
...
...
sample-form-manager-ui/admin/src/router/index.js
View file @
650c003b
import
Vue
from
'
vue
'
import
VueRouter
from
'
vue-router
'
import
Layouts
from
"
@/pages/layouts/Layouts.vue
"
import
store
from
'
@/store
'
import
Vue
from
"
vue
"
;
import
VueRouter
from
"
vue-router
"
;
import
Layouts
from
"
@/pages/layouts/Layouts.vue
"
;
import
store
from
"
@/store
"
;
// 解决重复点击同一个路由报错
const
originalPush
=
VueRouter
.
prototype
.
push
;
VueRouter
.
prototype
.
push
=
function
(
location
)
{
return
originalPush
.
call
(
this
,
location
).
catch
(
err
=>
err
)
}
Vue
.
use
(
VueRouter
)
return
originalPush
.
call
(
this
,
location
).
catch
((
err
)
=>
err
);
};
Vue
.
use
(
VueRouter
);
const
routes
=
[
{
path
:
'
/jump
'
,
name
:
'
跳转页
'
,
component
:
()
=>
import
(
'
@/pages/jump/jump
'
)
path
:
"
/jump
"
,
name
:
"
跳转页
"
,
component
:
()
=>
import
(
"
@/pages/jump/jump
"
),
},
{
path
:
'
/
'
,
redirect
:
'
/login
'
,
path
:
"
/
"
,
redirect
:
"
/jump
"
,
},
{
path
:
'
/login
'
,
name
:
'
登录页
'
,
component
:
()
=>
import
(
'
@/pages/login/login
'
)
path
:
"
/login
"
,
name
:
"
登录页
"
,
component
:
()
=>
import
(
"
@/pages/login/login
"
),
},
]
]
;
const
router
=
new
VueRouter
({
routes
})
routes
,
})
;
// 动态菜单
const
dynamicRouter
=
[
{
path
:
'
/basicsset
'
,
path
:
"
/basicsset
"
,
component
:
Layouts
,
meta
:
{
icon
:
'
el-icon-setting
'
,
title
:
'
样表基础设置
'
icon
:
"
el-icon-setting
"
,
title
:
"
样表基础设置
"
,
},
children
:
[
{
path
:
''
,
path
:
""
,
// name: '样表基础设置',
component
:
()
=>
import
(
'
@/pages/software/basics/BasicsSet
'
),
}
]
component
:
()
=>
import
(
"
@/pages/software/basics/BasicsSet
"
),
},
],
},
{
path
:
'
/mattermanage
'
,
path
:
"
/mattermanage
"
,
component
:
Layouts
,
meta
:
{
icon
:
'
el-icon-document
'
,
title
:
'
样表事项管理
'
icon
:
"
el-icon-document
"
,
title
:
"
样表事项管理
"
,
},
children
:
[
{
path
:
''
,
name
:
'
样表事项管理
'
,
component
:
()
=>
import
(
'
@/pages/software/matter/MatterManage
'
),
}
]
path
:
""
,
name
:
"
样表事项管理
"
,
component
:
()
=>
import
(
"
@/pages/software/matter/MatterManage
"
),
}
,
]
,
},
{
path
:
'
/materialsmanage
'
,
path
:
"
/materialsmanage
"
,
component
:
Layouts
,
meta
:
{
icon
:
'
el-icon-files
'
,
title
:
'
样表管理
'
icon
:
"
el-icon-files
"
,
title
:
"
样表管理
"
,
},
children
:
[
{
path
:
''
,
path
:
""
,
// name: '材料管理',
component
:
()
=>
import
(
'
@/pages/software/materials/MaterialsManage
'
),
}
]
component
:
()
=>
import
(
"
@/pages/software/materials/MaterialsManage
"
),
}
,
]
,
},
{
path
:
'
/librarymanage
'
,
path
:
"
/librarymanage
"
,
component
:
Layouts
,
meta
:
{
icon
:
'
el-icon-refrigerator
'
,
title
:
'
公共库管理
'
icon
:
"
el-icon-refrigerator
"
,
title
:
"
公共库管理
"
,
},
children
:
[
{
path
:
''
,
path
:
""
,
// name: '公共库管理',
component
:
()
=>
import
(
'
@/pages/software/librarymanage/LibraryManage
'
),
}
]
component
:
()
=>
import
(
"
@/pages/software/librarymanage/LibraryManage
"
),
}
,
]
,
},
{
path
:
'
/numberwritedevice
'
,
path
:
"
/numberwritedevice
"
,
component
:
Layouts
,
meta
:
{
icon
:
'
el-icon-monitor
'
,
title
:
'
数字样表设备
'
icon
:
"
el-icon-monitor
"
,
title
:
"
数字样表设备
"
,
},
children
:
[
{
path
:
''
,
path
:
""
,
// name: '数字样表设备',
component
:
()
=>
import
(
'
@/pages/hardware/NumberWriteDevice
'
),
}
]
component
:
()
=>
import
(
"
@/pages/hardware/NumberWriteDevice
"
),
}
,
]
,
},
]
]
;
// 过滤菜单
function
menusFilter
(
arr
)
{
let
router
=
arr
.
filter
(
v
=>
{
let
router
=
arr
.
filter
(
(
v
)
=>
{
if
(
v
.
meta
&&
v
.
meta
.
title
)
{
if
(
v
.
children
)
{
v
.
children
=
menusFilter
(
v
.
children
)
v
.
children
=
menusFilter
(
v
.
children
)
;
}
return
v
return
v
;
}
})
return
router
})
;
return
router
;
}
// 动态菜单
export
function
calcMenu
()
{
dynamicRouter
.
forEach
(
v
=>
{
router
.
addRoute
(
v
)
})
let
menus
=
menusFilter
(
dynamicRouter
)
store
.
commit
(
'
SET_MENUS
'
,
menus
)
dynamicRouter
.
forEach
(
(
v
)
=>
{
router
.
addRoute
(
v
)
;
})
;
let
menus
=
menusFilter
(
dynamicRouter
)
;
store
.
commit
(
"
SET_MENUS
"
,
menus
);
}
calcMenu
()
calcMenu
()
;
export
default
router
export
default
router
;
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