Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
P
park-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
huang
park-ui
Commits
31ee22bb
提交
31ee22bb
authored
6月 06, 2020
作者:
huang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加模块
上级
e1256285
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
279 行增加
和
9 行删除
+279
-9
allowance.js
src/api/rule/allowance.js
+27
-0
autoReserve.js
src/api/rule/autoReserve.js
+18
-0
recipeRule.js
src/api/rule/recipeRule.js
+1
-0
index.vue
src/views/announcement/announcementList/index.vue
+2
-3
index.vue
src/views/rule/allowance/index.vue
+129
-2
index.vue
src/views/rule/autoReserve/index.vue
+46
-3
index.vue
src/views/rule/recipeRule/index.vue
+56
-1
没有找到文件。
src/api/rule/allowance.js
0 → 100644
浏览文件 @
31ee22bb
import
request
from
'@/utils/request'
//获取所有部门补贴列表
export
function
getDepAllowanceList
()
{
return
request
({
url
:
'/allowance/getDepAllowanceList'
,
method
:
'get'
,
})
}
//获取当前部门补贴列表
export
function
getCurrentDepAllowance
(
depId
)
{
return
request
({
url
:
'/allowance/getCurrentDepAllowance/'
+
depId
,
method
:
'get'
,
})
}
//更新部门补贴列表
export
function
updateDepAllowance
(
data
)
{
return
request
({
url
:
'/allowance/updateDepAllowance'
,
method
:
'put'
,
data
:
data
})
}
src/api/rule/autoReserve.js
0 → 100644
浏览文件 @
31ee22bb
import
request
from
'@/utils/request'
//get ban auto reserve date list
export
function
getBanReserveDates
()
{
return
request
({
url
:
'/autoReserve/getBanReserveDates'
,
method
:
'get'
,
})
}
//update ban auto reserve dates
export
function
updateBanReserveDates
(
data
)
{
return
request
({
url
:
'/autoReserve/updateBanReserveDates'
,
method
:
'post'
,
data
:
data
})
}
src/api/rule/recipeRule.js
0 → 100644
浏览文件 @
31ee22bb
import
request
from
'@/utils/request'
src/views/announcement/announcementList/index.vue
浏览文件 @
31ee22bb
...
@@ -35,8 +35,7 @@
...
@@ -35,8 +35,7 @@
</el-table>
</el-table>
<!--分页按钮组-->
<!--分页按钮组-->
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
/>
<!-- 添加或修改公告通知对话框 -->
<!-- 添加或修改公告通知对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"600px"
append-to-body
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"600px"
append-to-body
>
...
@@ -121,7 +120,7 @@
...
@@ -121,7 +120,7 @@
// 表单重置
// 表单重置
reset
()
{
reset
()
{
this
.
form
=
{
this
.
form
=
{
/*dictId: undefined*/
id
:
undefined
};
};
this
.
resetForm
(
"form"
);
this
.
resetForm
(
"form"
);
},
},
...
...
src/views/rule/allowance/index.vue
浏览文件 @
31ee22bb
<
template
>
<
template
>
<div>
666
</div>
<div
class=
"app-container"
>
<!--操作按钮组-->
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['system:user:edit']"
>
修改
</el-button>
</el-col>
</el-row>
<!--列表-->
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"40"
align=
"center"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"部门"
align=
"center"
prop=
"deptName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"补贴"
align=
"center"
prop=
"departmentAllowance"
:show-overflow-tooltip=
"true"
/>
</el-table>
<!--分页按钮组-->
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 修改部门补贴对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"600px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"补贴金额"
prop=
"departmentAllowance"
>
<el-input
v-model=
"form.departmentAllowance"
placeholder=
"请输入要修改的补贴金额"
clearable
rows=
"6"
suffix-icon=
"el-icon-date"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getDepAllowanceList
,
getCurrentDepAllowance
,
updateDepAllowance
}
from
"@/api/rule/allowance"
;
export
default
{
//页签缓存页面的name要和路由中的那么要相同,才能缓存,
//如果是自定义菜单,则页面的name和菜单管理中路由地址要相同,才能页签缓存
name
:
"allowance"
,
data
()
{
return
{
// 遮罩层
loading
:
true
,
ids
:
[],
// 选中数组
single
:
true
,
// 非单个禁用
multiple
:
true
,
// 非多个禁用
total
:
0
,
// 总条数
list
:
[],
// 列表
title
:
""
,
// 弹出层标题
open
:
false
,
// 是否显示弹出层
queryParams
:
{
// 查询参数
pageNum
:
1
,
pageSize
:
10
},
form
:
{},
// 表单参数
rules
:
{
// 表单校验
departmentAllowance
:
[
{
required
:
true
,
message
:
"补贴金额不能为空"
,
trigger
:
"blur"
}
]
}
};
},
created
()
{
this
.
getList
()
},
methods
:
{
/** get all announcement list */
getList
()
{
this
.
loading
=
true
;
getDepAllowanceList
(
this
.
queryParams
).
then
(
response
=>
{
this
.
list
=
response
.
rows
this
.
total
=
response
.
total
this
.
loading
=
false
})
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
id
:
undefined
};
this
.
resetForm
(
"form"
);
},
//多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
depId
)
this
.
single
=
selection
.
length
!=
1
this
.
multiple
=
!
selection
.
length
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
//清空表单
this
.
reset
();
const
depId
=
row
.
depId
||
this
.
ids
[
0
]
getCurrentDepAllowance
(
depId
).
then
(
response
=>
{
let
departmentAllowance
=
parseFloat
(
response
.
data
.
departmentAllowance
)
this
.
form
=
response
.
data
;
response
.
data
.
departmentAllowance
=
departmentAllowance
this
.
open
=
true
;
this
.
title
=
"修改部门补贴"
;
});
},
/** 提交按钮 */
submitForm
:
function
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
depId
!=
undefined
)
{
console
.
log
(
this
.
form
)
updateDepAllowance
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
}
else
{
this
.
msgError
(
"修改失败:"
+
response
.
msg
);
}
});
}
}
});
},
}
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
src/views/rule/autoReserve/index.vue
浏览文件 @
31ee22bb
<
template
>
<
template
>
<div>
666
</div>
<div
class=
"app-container"
>
<el-date-picker
style=
"margin-left: 35%"
type=
"dates"
v-model=
"dataList"
placeholder=
"点击查看并选择禁用日期"
align=
"center"
size=
"large"
:clearable=
"clearable"
@
change=
"confirm"
></el-date-picker>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getBanReserveDates
,
updateBanReserveDates
}
from
"@/api/rule/autoReserve"
;
export
default
{
created
(){
this
.
getBanReserveDatesList
();
},
data
()
{
return
{
dataList
:
''
,
clearable
:
false
};
},
methods
:{
getBanReserveDatesList
(){
getBanReserveDates
().
then
(
response
=>
{
if
(
response
.
code
==
200
){
this
.
dataList
=
response
.
data
}
else
{
this
.
msgError
(
response
.
msg
);
}
})
},
confirm
(
data
){
this
.
$confirm
(
'这些时间将禁用自动报餐'
,
"确认"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
updateBanReserveDates
(
data
);
}).
then
(()
=>
{
//重置
this
.
getBanReserveDatesList
()
this
.
msgSuccess
(
"设置成功"
);
}).
catch
(
function
()
{});
}
}
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
</
style
>
</
style
>
src/views/rule/recipeRule/index.vue
浏览文件 @
31ee22bb
<
template
>
<
template
>
<div>
666
</div>
<div
class=
"app-container"
>
<div
style=
"margin-left: 35%;margin-top: 5%"
>
<el-checkbox
:indeterminate=
"isIndeterminate"
v-model=
"selectAllEatPeriod"
@
change=
"handleSelectAllEatPeriod"
>
允许用餐时段
</el-checkbox>
<div
style=
"margin: 15px 0;"
></div>
<el-checkbox-group
v-model=
"currentEatPeriod"
@
change=
"handleEatPeriodChange"
>
<el-checkbox
v-for=
"item in eatPeriodList"
:label=
"item"
:key=
"item"
>
{{
item
}}
</el-checkbox>
</el-checkbox-group>
</div>
<div
style=
"margin-left: 35%;margin-top: 10%"
>
<el-checkbox
:indeterminate=
"isIndeterminate2"
v-model=
"selectAllAutoPeriod"
@
change=
"handleSelectAllAutoPeriod"
>
允许用餐时段
</el-checkbox>
<div
style=
"margin: 15px 0;"
></div>
<el-checkbox-group
v-model=
"currentAutoPeriod"
@
change=
"handleAutoPeriodChange"
>
<el-checkbox
v-for=
"item in autoPeriodList"
:label=
"item"
:key=
"item"
>
{{
item
}}
</el-checkbox>
</el-checkbox-group>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
data
()
{
return
{
selectAllEatPeriod
:
false
,
//全选允许用餐时段
currentEatPeriod
:
[
'早餐'
,
'晚餐'
],
eatPeriodList
:
[
'早餐'
,
'午餐'
,
'晚餐'
],
//只负责样式控制
isIndeterminate
:
true
,
selectAllAutoPeriod
:
false
,
//全选允许自动报餐时段勾号
currentAutoPeriod
:[
'晚餐'
],
autoPeriodList
:
[
'早餐'
,
'午餐'
,
'晚餐'
],
//只负责样式控制
isIndeterminate2
:
true
,
};
},
methods
:
{
/**
* 点击全选
* @param flag 全选时为true
*/
handleSelectAllEatPeriod
(
flag
)
{
this
.
currentEatPeriod
=
flag
?
this
.
eatPeriodList
:
[];
this
.
isIndeterminate
=
false
;
},
handleEatPeriodChange
(
value
)
{
//当前选中的个数
let
checkedCount
=
value
.
length
;
//如果选中的个数等于总数,则设为true
this
.
selectAllEatPeriod
=
checkedCount
===
this
.
eatPeriodList
.
length
;
//只选择了一部分
this
.
isIndeterminate
=
checkedCount
>
0
&&
checkedCount
<
this
.
eatPeriodList
.
length
;
},
handleSelectAllAutoPeriod
(
flag
){
this
.
selectAllAutoPeriod
=
flag
?
this
.
autoPeriodList
:
[];
this
.
isIndeterminate2
=
false
;
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论