Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
卡
卡车调度系统
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
caicaicai
卡车调度系统
Commits
c263695a
Commit
c263695a
authored
Aug 31, 2022
by
xxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
81c132d2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
111 deletions
+27
-111
index.vue
...ws/system/dataDictionary/largeScreenMenuDispose/index.vue
+27
-111
No files found.
src/views/system/dataDictionary/largeScreenMenuDispose/index.vue
View file @
c263695a
...
@@ -3,27 +3,21 @@
...
@@ -3,27 +3,21 @@
<!-- 表格 -->
<!-- 表格 -->
<div
class=
"panel-bottom page-row"
>
<div
class=
"panel-bottom page-row"
>
<h3>
大屏标题配置
</h3>
<h3>
大屏
主
标题配置
</h3>
<div
class=
"ctin-box"
>
<div
class=
"ctin-box"
>
<div
class=
"content-within"
>
<div
class=
"content-within"
>
<div
class=
"content-fix"
>
<div
class=
"content-fix"
>
<div
class=
"toolbar"
>
<!--
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
@
click=
"toAdd"
>
新增
</el-button>
-->
</div>
<div
class=
"content"
>
<div
class=
"content"
>
<el-table
:data=
"tableData"
v-loading=
"loading"
border
style=
"width:auto"
:row-class-name=
"tableRowClassName
"
>
<el-table
:data=
"tableData"
v-loading=
"loading"
border
:row-class-name=
"tableRowClassName"
height=
"30vh"
row-key=
"id"
:tree-props=
"
{children: 'children', hasChildren: 'hasChildren'}
">
<el-table-column
prop=
"title"
label=
"标题"
align=
"center"
></el-table-column>
<el-table-column
prop=
"title"
label=
"标题"
align=
"center"
></el-table-column>
<el-table-column
prop=
"componentName"
label=
"组件名称"
align=
"center"
></el-table-column>
<el-table-column
prop=
"componentName"
label=
"组件名称"
align=
"center"
></el-table-column>
<el-table-column
prop=
"status"
label=
"状态"
align=
"center"
:formatter=
"statusChange"
></el-table-column>
<el-table-column
prop=
"status"
label=
"状态"
align=
"center"
:formatter=
"statusChange"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"200"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"toEdit(scope.row)"
></el-button>
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"toEdit(scope.row)"
></el-button>
<!--
<el-button
size=
"mini"
type=
"danger"
icon=
"el-icon-delete"
@
click=
"toDelete(scope.row)"
></el-button>
-->
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<!--分页组件-->
<el-pagination
:total=
"total"
:current-page=
"page"
style=
"margin-top: 8px;"
layout=
"total, prev, pager, next, sizes"
@
size-change=
"sizeChange"
@
current-change=
"pageChange"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -32,7 +26,7 @@
...
@@ -32,7 +26,7 @@
<!-- 表单渲染 -->
<!-- 表单渲染 -->
<el-dialog
append-to-body
:close-on-click-modal=
"true"
:before-close=
"cancelForm"
:visible.sync=
"form.visible"
:title=
"form.title"
width=
"700px"
>
<el-dialog
append-to-body
:close-on-click-modal=
"true"
:before-close=
"cancelForm"
:visible.sync=
"form.visible"
:title=
"form.title"
width=
"700px"
>
<el-form
:model=
"form.item"
:rules=
"rules"
ref=
"form1"
:inline=
"true"
size=
"small"
label-width=
"150px"
>
<el-form
:model=
"form.item"
ref=
"form1"
:inline=
"true"
size=
"small"
label-width=
"150px"
>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-select
v-model=
"form.item.status"
placeholder=
"请选择状态"
style=
"width:280px;"
>
<el-select
v-model=
"form.item.status"
placeholder=
"请选择状态"
style=
"width:280px;"
>
<el-option
label=
"显示"
value=
"1"
></el-option>
<el-option
label=
"显示"
value=
"1"
></el-option>
...
@@ -54,48 +48,44 @@ import { Tools, HttpReq, Dates} from '@/assets/js/common.js';
...
@@ -54,48 +48,44 @@ import { Tools, HttpReq, Dates} from '@/assets/js/common.js';
export
default
{
export
default
{
name
:
'
LargeScreenMenuDispose
'
,
name
:
'
LargeScreenMenuDispose
'
,
components
:
{},
data
()
{
data
()
{
return
{
return
{
//主标题属性
loading
:
false
,
loading
:
false
,
page
:
1
,
size
:
10
,
total
:
0
,
query
:{},
alarmTimeId
:
''
,
alarmTimeId
:
''
,
tableData
:
[],
tableData
:
[],
form
:
{
form
:
{
title
:
'
新增
菜单配置
'
,
title
:
'
修改
菜单配置
'
,
visible
:
false
,
visible
:
false
,
reqType
:
'
add
'
,
reqType
:
'
edit
'
,
status
:{
cu
:
0
},
item
:{},
},
//副标题属性
vice_loading
:
false
,
vice_alarmTimeId
:
''
,
vice_tableData
:
[],
vice_form
:
{
title
:
'
修改菜单配置
'
,
visible
:
false
,
reqType
:
'
edit
'
,
status
:{
cu
:
0
},
status
:{
cu
:
0
},
item
:{},
item
:{},
},
},
}
}
},
},
mounted
()
{
mounted
()
{
var
that
=
this
;
this
.
$nextTick
(()
=>
{
this
.
loadData
();
this
.
loadData
();
})
},
},
methods
:
{
methods
:
{
loadData
()
{
loadData
()
{
var
sort
=
'
id,desc
'
;
//获取大屏顶部大标题
var
param
=
this
.
query
;
HttpReq
.
truckDispatching
.
screenTitleMenuQuery
({
size
:
9999
}).
then
((
res
)
=>
{
param
.
page
=
this
.
page
-
1
;
param
.
size
=
this
.
size
;
//param.sort = sort;
this
.
$nextTick
(()
=>
{
HttpReq
.
truckDispatching
.
screenTitleMenuQuery
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
){
if
(
res
.
code
==
200
){
this
.
loading
=
false
;
this
.
loading
=
false
;
this
.
tableData
=
res
.
data
.
content
;
this
.
tableData
=
res
.
data
.
content
;
this
.
total
=
res
.
data
.
totalElements
;
}
}
})
})
})
},
},
tableRowClassName
({
row
,
rowIndex
})
{
tableRowClassName
({
row
,
rowIndex
})
{
...
@@ -109,15 +99,6 @@ export default {
...
@@ -109,15 +99,6 @@ export default {
cancelForm
(
a
,
b
,
c
){
cancelForm
(
a
,
b
,
c
){
this
.
form
.
visible
=
false
;
this
.
form
.
visible
=
false
;
},
},
toAdd
()
{
// 请除表单验证
this
.
$refs
[
'
form1
'
]
&&
this
.
$refs
[
'
form1
'
].
clearValidate
();
this
.
form
.
title
=
'
新增菜单配置
'
;
this
.
form
.
status
.
cu
=
0
;
this
.
form
.
visible
=
true
;
this
.
form
.
reqType
=
'
add
'
;
this
.
form
.
item
=
{};
},
toEdit
(
item
)
{
toEdit
(
item
)
{
// 请除表单验证
// 请除表单验证
this
.
$refs
[
'
form1
'
]
&&
this
.
$refs
[
'
form1
'
].
clearValidate
();
this
.
$refs
[
'
form1
'
]
&&
this
.
$refs
[
'
form1
'
].
clearValidate
();
...
@@ -128,64 +109,18 @@ export default {
...
@@ -128,64 +109,18 @@ export default {
this
.
form
.
reqType
=
'
edit
'
;
this
.
form
.
reqType
=
'
edit
'
;
this
.
alarmTimeId
=
this
.
form
.
item
.
id
;
this
.
alarmTimeId
=
this
.
form
.
item
.
id
;
},
},
toDelete
(
item
)
{
var
id
=
item
.
id
;
this
.
$confirm
(
'
确认删除该条数据吗?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
((
e
)
=>
{
this
.
reqRemoveProject
([
id
])
}).
catch
((
e
)
=>
{})
},
pageChange
(
e
)
{
this
.
page
=
e
this
.
loadData
()
},
sizeChange
(
e
)
{
this
.
page
=
1
this
.
size
=
e
this
.
loadData
()
},
submitForm
(
validateName
,
item
){
submitForm
(
validateName
,
item
){
if
(
!
this
.
form
.
status
.
cu
){
if
(
!
this
.
form
.
status
.
cu
){
this
.
form
.
status
.
cu
=
2
;
this
.
form
.
status
.
cu
=
2
;
this
.
$refs
[
validateName
].
validate
(
valid
=>
{
this
.
$refs
[
validateName
].
validate
(
valid
=>
{
if
(
valid
){
if
(
valid
){
if
(
this
.
form
.
reqType
===
'
add
'
){
this
.
reqAddItem
(
this
.
form
,
item
)
}
else
{
this
.
reqUpdateItem
(
this
.
form
,
item
)
this
.
reqUpdateItem
(
this
.
form
,
item
)
}
}
else
{
}
else
{
this
.
form
.
status
.
cu
=
0
this
.
form
.
status
.
cu
=
0
}
}
});
});
};
};
},
},
//新增菜单配置
reqAddItem
(
form
,
item
){
let
lastData
=
{...
item
};
HttpReq
.
truckDispatching
.
screenTitleMenuAdd
(
lastData
).
then
((
res
)
=>
{
form
.
visible
=
false
;
if
(
res
.
code
==
200
){
this
.
$notify
({
title
:
'
菜单配置新增成功!
'
,
type
:
'
success
'
,
duration
:
2500
});
this
.
loadData
()
}
else
{
this
.
$notify
({
title
:
res
.
msg
,
type
:
'
error
'
,
duration
:
2500
})
}
}).
catch
(
function
(
error
)
{
form
.
status
.
cu
=
0
});
},
//修改菜单配置
//修改菜单配置
reqUpdateItem
(
form
,
item
){
reqUpdateItem
(
form
,
item
){
let
lastData
=
{...
item
};
let
lastData
=
{...
item
};
...
@@ -210,25 +145,6 @@ export default {
...
@@ -210,25 +145,6 @@ export default {
form
.
status
.
cu
=
0
form
.
status
.
cu
=
0
});
});
},
},
//删除菜单配置
reqRemoveProject
(
item
){
HttpReq
.
truckDispatching
.
screenTitleMenuDel
(
item
).
then
((
res
)
=>
{
if
(
res
.
status
==
400
){
this
.
$notify
({
title
:
res
.
msg
,
type
:
'
error
'
,
duration
:
2500
})
}
else
{
this
.
$notify
({
title
:
'
删除成功!
'
,
type
:
'
success
'
,
duration
:
2500
});
}
this
.
loadData
();
})
},
//组件状态展示修改
//组件状态展示修改
statusChange
(
row
){
statusChange
(
row
){
return
row
.
status
==
'
1
'
?
'
显示
'
:
'
隐藏
'
;
return
row
.
status
==
'
1
'
?
'
显示
'
:
'
隐藏
'
;
...
...
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