Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
425a9e06
提交
425a9e06
authored
1月 13, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(system/attendance): 考勤规则迁移完成
同上
上级
e300685e
显示空白字符变更
内嵌
并排
正在显示
33 个修改的文件
包含
564 行增加
和
142 行删除
+564
-142
.env.development
.env.development
+2
-2
index.js
src/api/index.js
+1
-1
attendance.js
src/api/system/attendance.js
+0
-0
element-ui.scss
src/assets/styles/element-ui.scss
+25
-3
index.scss
src/assets/styles/index.scss
+1
-1
index.vue
src/components/LevitatedSphere/index.vue
+1
-2
date.js
src/utils/date.js
+29
-12
index.js
src/utils/index.js
+1
-79
math.js
src/utils/math.js
+14
-0
index.vue
src/views/bi/competitor/index.vue
+3
-1
index.vue
src/views/bi/prd_tag/index.vue
+2
-3
index.vue
src/views/bi/product/index.vue
+1
-7
index.vue
src/views/bi/sale/index.vue
+1
-2
index.vue
src/views/bi/store/index.vue
+1
-1
index.vue
src/views/index.vue
+2
-0
index.vue
src/views/monitor/cache/index.vue
+1
-1
index.vue
src/views/monitor/job/index.vue
+1
-1
index.vue
src/views/monitor/logininfor/index.vue
+1
-1
index.vue
src/views/monitor/online/index.vue
+1
-1
index.vue
src/views/monitor/operlog/index.vue
+1
-1
index.vue
src/views/monitor/server/index.vue
+1
-1
index.vue
src/views/system/attendance/index.vue
+448
-0
index.vue
src/views/system/config/index.vue
+1
-2
index.vue
src/views/system/dept/index.vue
+1
-2
index.vue
src/views/system/dict/index.vue
+2
-2
index.vue
src/views/system/menu/index.vue
+1
-2
index.vue
src/views/system/notice/index.vue
+1
-2
index.vue
src/views/system/post/index.vue
+1
-2
index.vue
src/views/system/role/index.vue
+14
-3
index.vue
src/views/system/user/index.vue
+1
-3
index.vue
src/views/system/user/profile/index.vue
+1
-1
index.vue
src/views/tool/gen/index.vue
+1
-2
vite.config.js
vite.config.js
+2
-1
没有找到文件。
.env.development
浏览文件 @
425a9e06
...
...
@@ -2,10 +2,10 @@
VITE_APP_TITLE = 王小卤-链路中心
# 基地址
#
VITE_APP_BASE_API = '/dev-api'
VITE_APP_BASE_API = '/dev-api'
# VITE_APP_BASE_API = '/qllan'
# VITE_APP_BASE_API = '/bclan'
VITE_APP_BASE_API = '/home'
#
VITE_APP_BASE_API = '/home'
# 开发环境配置
VITE_APP_ENV = 'development'
...
...
src/api/index.js
浏览文件 @
425a9e06
...
...
@@ -13,6 +13,7 @@ export * from './monitor/online'
export
*
from
'./monitor/server'
export
*
from
'./system/dict/data'
export
*
from
'./system/dict/type'
export
*
from
'./system/attendance'
export
*
from
'./system/config'
export
*
from
'./system/dept'
export
*
from
'./system/logininfor'
...
...
@@ -21,6 +22,5 @@ export * from './system/notice'
export
*
from
'./system/operlog'
export
*
from
'./system/post'
export
*
from
'./system/role'
export
*
from
'./system/rule'
export
*
from
'./system/user'
export
*
from
'./tool/gen'
src/api/system/
rul
e.js
→
src/api/system/
attendanc
e.js
浏览文件 @
425a9e06
File moved
src/assets/styles/element-ui.scss
浏览文件 @
425a9e06
...
...
@@ -59,9 +59,10 @@
margin
:
0
auto
;
display
:
flex
;
flex-direction
:
column
;
height
:
6
0vh
;
height
:
8
0vh
;
padding
:
20px
;
.el-dialog__header
{
.el-dialog__header
{
padding-top
:
10px
;
height
:
40px
;
}
...
...
@@ -69,6 +70,18 @@
.el-dialog__body
{
flex
:
1
;
height
:
calc
(
50vh
-
40px
-
32px
);
overflow-y
:
scroll
;
/* 灰色滚动条背景 */
&
:
:-
webkit-scrollbar-track
{
background-color
:
transparent
;
}
.el-form
{
margin-top
:
20px
;
}
// margin-top: 20px;
}
}
...
...
@@ -116,7 +129,7 @@
// 覆盖默认样式
.el-select
{
width
:
215px
;
width
:
100%
;
}
.el-tabs
{
...
...
@@ -136,3 +149,11 @@
font-size
:
var
(
--
xl-fontsize
)
!
important
;
}
}
@media
(
max-width
:
1400px
)
{
.el-form-item
{
margin-bottom
:
20px
!
important
;
}
}
\ No newline at end of file
src/assets/styles/index.scss
浏览文件 @
425a9e06
...
...
@@ -130,7 +130,7 @@ aside {
align-items
:
center
;
padding
:
20px
;
>
div
:first-of-type
{
>
.container
{
width
:
100%
;
padding
:
20px
;
background-color
:
var
(
--
el-bg-color-overlay
);
...
...
src/components/LevitatedSphere/index.vue
浏览文件 @
425a9e06
<!-- 可拖拽的小球 封装 -->
<
template
>
<div>
<div
ref=
"levitatedSphere"
class=
"wrap"
:style=
"
{
...
...
@@ -19,7 +18,6 @@
size=
"300px"
>
<slot></slot>
</el-drawer>
</div>
</
template
>
<
script
setup
>
...
...
@@ -118,6 +116,7 @@ const handleClick = () => {
align-items
:
center
;
transition
:
all
0
.5s
;
font-size
:
20px
;
padding
:
0
;
}
::v-deep
(
.el-drawer__body
)
{
...
...
src/utils/date.js
浏览文件 @
425a9e06
...
...
@@ -13,6 +13,7 @@ export function generatorDayList(startDate, endDate) {
}
return
dateArr
;
}
/**
* 格式化时间,月日时分秒前面补零
* @param {*} cellValue 时间
...
...
@@ -74,7 +75,12 @@ export function formatTime(time, option) {
}
}
// 日期格式化
/**
* 日期格式化
* @param {*} time 时间
* @param {*} pattern 格式化格式{y}-{m}-{d} {h}:{i}:{s}
* @returns
*/
export
function
parseTime
(
time
,
pattern
)
{
if
(
arguments
.
length
===
0
||
!
time
)
{
return
null
...
...
@@ -130,31 +136,31 @@ export function getTime(type) {
/**
* 时间后补 0 格式 例如:09:00 转成 09:00:00
* @param {*}
s
* @param {*}
time 时间字符串
* @returns
*/
export
function
timeAddZero
(
s
)
{
if
(
s
===
null
||
s
===
''
||
s
===
undefined
)
return
s
if
(
s
.
split
(
":"
).
length
===
3
)
return
s
return
s
+
':00'
export
function
timeAddZero
(
time
)
{
if
(
time
===
null
||
time
===
''
||
time
===
undefined
)
return
time
if
(
time
.
split
(
":"
).
length
===
3
)
return
time
return
time
+
':00'
}
/**
* 时间去 0 格式,例如:09:00:00 转成 09:00
* @param {*}
s
* @param {*}
time 时间字符串
* @returns
*/
export
function
timeDelZero
(
s
)
{
if
(
s
===
null
||
s
===
''
||
s
===
undefined
)
return
'00:00'
if
(
s
.
split
(
":"
).
length
===
2
)
return
s
return
s
.
split
(
":"
)[
0
]
+
':'
+
s
.
split
(
":"
)[
1
]
export
function
timeDelZero
(
time
)
{
if
(
time
===
null
||
time
===
''
||
time
===
undefined
)
return
'00:00'
if
(
time
.
split
(
":"
).
length
===
2
)
return
time
return
time
.
split
(
":"
)[
0
]
+
':'
+
time
.
split
(
":"
)[
1
]
}
/**
* 判断开始时间小于指定时间范围
* @param {*} startTime ["00:00:00", "02:00:00"] 时间数组
* @param {*} endTime 单个要判断的时间
* @returns
* @returns
boolean
*/
export
function
checkStartLessEndTime
(
startTime
,
endTime
)
{
if
(
startTime
===
null
||
startTime
?.
length
===
0
||
endTime
===
null
)
return
true
...
...
@@ -214,3 +220,13 @@ export function addDateRange(params, dateRange, propName) {
return
search
;
}
/**
* 生成唯一字符串
* @returns {string}
*/
export
function
createUniqueString
()
{
const
timestamp
=
+
new
Date
()
+
''
const
randomNum
=
parseInt
((
1
+
Math
.
random
())
*
65536
)
+
''
return
(
+
(
randomNum
+
timestamp
)).
toString
(
32
)
}
\ No newline at end of file
src/utils/index.js
浏览文件 @
425a9e06
...
...
@@ -13,65 +13,6 @@ export * from './ruoyi'
export
*
from
'./scroll-to'
export
*
from
'./theme'
export
*
from
'./validate'
import
{
parseTime
}
from
'./date'
/**
* 表格时间格式化
*/
export
function
formatDate
(
cellValue
)
{
if
(
cellValue
==
null
||
cellValue
==
""
)
return
""
;
var
date
=
new
Date
(
cellValue
)
var
year
=
date
.
getFullYear
()
var
month
=
date
.
getMonth
()
+
1
<
10
?
'0'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
var
day
=
date
.
getDate
()
<
10
?
'0'
+
date
.
getDate
()
:
date
.
getDate
()
var
hours
=
date
.
getHours
()
<
10
?
'0'
+
date
.
getHours
()
:
date
.
getHours
()
var
minutes
=
date
.
getMinutes
()
<
10
?
'0'
+
date
.
getMinutes
()
:
date
.
getMinutes
()
var
seconds
=
date
.
getSeconds
()
<
10
?
'0'
+
date
.
getSeconds
()
:
date
.
getSeconds
()
return
year
+
'-'
+
month
+
'-'
+
day
+
' '
+
hours
+
':'
+
minutes
+
':'
+
seconds
}
/**
* @param {number} time
* @param {string} option
* @returns {string}
*/
export
function
formatTime
(
time
,
option
)
{
if
((
''
+
time
).
length
===
10
)
{
time
=
parseInt
(
time
)
*
1000
}
else
{
time
=
+
time
}
const
d
=
new
Date
(
time
)
const
now
=
Date
.
now
()
const
diff
=
(
now
-
d
)
/
1000
if
(
diff
<
30
)
{
return
'刚刚'
}
else
if
(
diff
<
3600
)
{
// less 1 hour
return
Math
.
ceil
(
diff
/
60
)
+
'分钟前'
}
else
if
(
diff
<
3600
*
24
)
{
return
Math
.
ceil
(
diff
/
3600
)
+
'小时前'
}
else
if
(
diff
<
3600
*
24
*
2
)
{
return
'1天前'
}
if
(
option
)
{
return
parseTime
(
time
,
option
)
}
else
{
return
(
d
.
getMonth
()
+
1
+
'月'
+
d
.
getDate
()
+
'日'
+
d
.
getHours
()
+
'时'
+
d
.
getMinutes
()
+
'分'
)
}
}
/**
* @param {string} url
...
...
@@ -212,17 +153,7 @@ export function toggleClass(element, className) {
element
.
className
=
classString
}
/**
* @param {string} type
* @returns {Date}
*/
export
function
getTime
(
type
)
{
if
(
type
===
'start'
)
{
return
new
Date
().
getTime
()
-
3600
*
1000
*
24
*
90
}
else
{
return
new
Date
(
new
Date
().
toDateString
())
}
}
/**
* @param {Function} func
...
...
@@ -295,15 +226,6 @@ export function uniqueArr(arr) {
return
Array
.
from
(
new
Set
(
arr
))
}
/**
* @returns {string}
*/
export
function
createUniqueString
()
{
const
timestamp
=
+
new
Date
()
+
''
const
randomNum
=
parseInt
((
1
+
Math
.
random
())
*
65536
)
+
''
return
(
+
(
randomNum
+
timestamp
)).
toString
(
32
)
}
/**
* Check if an element has a class
* @param {HTMLElement} elm
...
...
src/utils/math.js
浏览文件 @
425a9e06
...
...
@@ -102,3 +102,16 @@ export function toFixed2(num) {
if
(
num
===
null
||
num
===
undefined
)
return
'0'
return
Number
(
num
).
toFixed
(
2
)
}
/**
* 随机生成 6 位数字和大写字母组合
* @returns
*/
export
function
randomCode
()
{
const
str
=
'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
let
code
=
''
for
(
let
i
=
0
;
i
<
6
;
i
++
)
{
code
+=
str
.
charAt
(
Math
.
floor
(
Math
.
random
()
*
str
.
length
))
}
return
code
}
\ No newline at end of file
src/views/bi/competitor/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<div
class=
"container"
>
<el-tabs
v-model=
"activeName"
class=
"tabs"
>
<el-tab-pane
v-for=
"item in list"
...
...
@@ -11,6 +12,7 @@
</el-tab-pane>
</el-tabs>
</div>
</div>
</
template
>
<
script
setup
>
...
...
@@ -61,7 +63,7 @@ provide('activeName', activeName);
width
:
100%
;
margin-top
:
20px
;
.chart
{
.chart
{
flex
:
1
;
display
:
flex
;
flex-direction
:
column
;
...
...
src/views/bi/prd_tag/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<el-row
:gutter=
"20"
class=
"client-fix-height"
>
class=
"client-fix-height
container
"
>
<!--商品分类-->
<category-tree
:options=
"tagsOptions"
:defaultProps=
"defaultProps"
...
...
@@ -25,8 +25,7 @@
<template
#
buttons
>
<el-button
type=
"primary"
icon=
"Plus"
@
click=
"handleAdd"
v-hasPermi=
"['gen:info:add']"
>
新增
</el-button>
@
click=
"handleAdd"
>
新增
</el-button>
</
template
>
</category-tree>
<el-col
:span=
"10"
...
...
src/views/bi/product/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<el-row
:gutter=
"20"
class=
"client-fix-height"
>
class=
"client-fix-height
container
"
>
<!--商品分类-->
<category-tree
:options=
"seriesOptions"
:defaultProps=
"defaultProps"
...
...
@@ -60,30 +60,25 @@
<el-table
v-loading=
"loading"
:data=
"productList"
>
<el-table-column
label=
"商品编码"
align=
"left"
key=
"prdCode"
prop=
"prdCode"
v-if=
"columns[0].visible"
/>
<el-table-column
label=
"商品名字"
align=
"left"
key=
"prdName"
prop=
"prdName"
v-if=
"columns[1].visible"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"系列名字"
align=
"left"
key=
"series"
prop=
"series"
v-if=
"columns[2].visible"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"条码"
align=
"left"
key=
"prdSpec"
prop=
"prdSpec"
v-if=
"columns[3].visible"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"售卖状态"
align=
"center"
key=
"saleStatus"
v-if=
"columns[4].visible"
>
<template
v-slot=
"scope"
>
...
...
@@ -94,7 +89,6 @@
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
v-if=
"columns[5].visible"
>
<
template
slot-scope=
"scope"
>
...
...
src/views/bi/sale/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<!-- 套表 Item -->
<div
class=
"excel_charts_item"
<div
class=
"excel_charts_item
container
"
v-for=
"item, index in platformSalesList"
>
<!-- 查询表单 -->
<el-form
:model=
"item.queryParams"
...
...
@@ -636,7 +636,6 @@ init()
.el-form-item
{
margin-bottom
:
0
;
}
}
/* 新增套表 */
...
...
src/views/bi/store/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<div
class=
"content"
>
<div
class=
"content
container
"
>
<!-- 搜索表单 -->
<el-form
:model=
"queryParams"
inline
...
...
src/views/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<div
class=
"container"
>
<panel-group
@
handleSetLineChartData=
"handleSetLineChartData"
/>
<common-menu
/>
<el-row
:gutter=
"20"
...
...
@@ -33,6 +34,7 @@
</el-col>
</el-row>
</div>
</div>
</
template
>
<
script
setup
>
...
...
src/views/monitor/cache/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<div>
<div
class=
"container"
>
<el-row>
<el-col
:span=
"24"
class=
"card-box"
>
...
...
src/views/monitor/job/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<div>
<div
class=
"container"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
...
...
src/views/monitor/logininfor/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<div>
<div
class=
"container"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
...
...
src/views/monitor/online/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<div>
<div
class=
"container"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
>
...
...
src/views/monitor/operlog/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<div>
<div
class=
"container"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
...
...
src/views/monitor/server/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<div>
<div
class=
"container"
>
<el-row>
<el-col
:span=
"12"
class=
"card-box"
>
...
...
src/views/system/attendance/index.vue
0 → 100644
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<div
class=
"container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
inline
v-show=
"showSearch"
>
<el-row>
<el-form-item
label=
"规则创建人"
prop=
"ruleNum"
>
<el-input
v-model=
"queryParams.createBy"
placeholder=
"查询规则创建人"
clearable
@
input=
"handleQuery"
prefix-icon=
"Search"
/>
</el-form-item>
<el-form-item
label=
"规则名称"
prop=
"ruleName"
>
<el-input
v-model=
"queryParams.ruleName"
placeholder=
"查询规则名称"
clearable
@
input=
"handleQuery"
prefix-icon=
"Search"
/>
</el-form-item>
</el-row>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"Plus"
@
click=
"handleAdd"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"Edit"
:disabled=
"single"
@
click=
"handleUpdate"
>
修改
</el-button>
</el-col>
<!--
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
:disabled=
"multiple"
@
click=
"handleDelete"
>
删除
</el-button>
</el-col>
-->
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"Download"
@
click=
"handleExport"
>
导出
</el-button>
</el-col>
<right-toolbar
v-model:showSearch=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"ruleList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"25"
align=
"center"
/>
<!--
<el-table-column
label=
"规则ID"
align=
"center"
prop=
"ruleId"
/>
-->
<el-table-column
label=
"规则编号"
align=
"center"
prop=
"ruleNum"
/>
<el-table-column
label=
"规则名称"
align=
"center"
prop=
"ruleName"
/>
<el-table-column
label=
"上班开始时间"
align=
"center"
prop=
"firBegintime"
width=
"120"
>
</el-table-column>
<el-table-column
label=
"上班结束时间"
align=
"center"
prop=
"firEndtime"
width=
"120"
>
</el-table-column>
<el-table-column
label=
"午班开始时间"
align=
"center"
prop=
"secBegintime"
width=
"120"
>
</el-table-column>
<el-table-column
label=
"午班结束时间"
align=
"center"
prop=
"secEndtime"
width=
"120"
>
</el-table-column>
<el-table-column
label=
"下班开始时间"
align=
"center"
prop=
"thiBegintime"
width=
"120"
>
</el-table-column>
<el-table-column
label=
"下班结束时间"
align=
"center"
prop=
"thiEndtime"
width=
"120"
>
</el-table-column>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
>
</el-table-column>
<el-table-column
label=
"备注"
prop=
"remark"
width=
"200px"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<template
v-slot=
"scope"
>
<el-button
type=
"primary"
icon=
"Edit"
link
@
click=
"handleUpdate(scope.row)"
>
修改
</el-button>
<!--
<el-button
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
-->
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 添加或修改考勤规则对话框 -->
<el-dialog
:title=
"title"
v-model=
"open"
append-to-body
>
<el-form
class=
"form"
ref=
"addForm"
:model=
"form"
:rules=
"rules"
label-position=
"right"
label-width=
"140px"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"规则编号"
prop=
"ruleNum"
>
<el-input
v-model=
"form.ruleNum"
placeholder=
"请输入规则编号"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"规则名称"
prop=
"ruleName"
>
<el-input
v-model=
"form.ruleName"
placeholder=
"请输入规则名称"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"上班打卡开始时间"
prop=
"firBegintime"
>
<el-time-select
clearable
v-model=
"form.firBegintime"
start=
"00:00"
step=
"00:30"
end=
"24:00"
:max-time=
"form.firEndtime"
placeholder=
"请选择上班打卡开始时间"
>
</el-time-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"上班打卡结束时间"
prop=
"firEndtime"
>
<el-time-select
clearable
v-model=
"form.firEndtime"
:start=
"form.firBegintime"
step=
'00:30'
end=
'24:00'
:minTime=
"form.firBegintime"
:max-time=
"form.secBegintime"
placeholder=
"请选择上班打卡结束时间"
>
</el-time-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"午班打卡开始时间"
prop=
"secBegintime"
>
<el-time-select
clearable
v-model=
"form.secBegintime"
:start=
"form.firEndtime"
step=
'00:30'
end=
'24:00'
:minTime=
"form.firEndtime"
:maxTime=
"form.secEndtime"
placeholder=
"请选择午班打卡开始时间"
>
</el-time-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"午班打卡结束时间"
prop=
"secEndtime"
>
<el-time-select
clearable
v-model=
"form.secEndtime"
:start=
"form.secBegintime"
step=
'00:30'
end=
'24:00'
:minTime=
"form.secBegintime"
:maxTime=
"form.thiBegintime"
placeholder=
"请选择午班打卡结束时间"
>
</el-time-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"下班打卡开始时间"
prop=
"thiBegintime"
>
<el-time-select
clearable
v-model=
"form.thiBegintime"
:start=
"form.secEndtime"
step=
'00:30'
end=
'24:00'
:minTime=
"form.secEndtime"
:maxTime=
"form.thiEndtime"
placeholder=
"请选择下班打卡开始时间"
>
</el-time-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"下班打卡结束时间"
prop=
"thiEndtime"
>
<el-time-select
clearable
v-model=
"form.thiEndtime"
:start=
"form.thiBegintime"
step=
'00:30'
end=
'24:00'
:minTime=
"form.thiBegintime"
placeholder=
"请选择下班打卡结束时间"
>
</el-time-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<
template
#
footer
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</
template
>
</el-dialog>
</div>
</div>
</template>
<
script
setup
>
import
{
listRule
,
getRule
,
delRule
,
addRule
,
updateRule
}
from
"@/api"
;
import
{
timeAddZero
,
randomCode
,
debounce
}
from
'@/utils'
const
{
proxy
}
=
getCurrentInstance
();
// 遮罩层
const
loading
=
ref
(
true
)
// 选中数组
const
ids
=
ref
([])
// 非单个禁用
const
single
=
ref
(
true
)
// 非多个禁用
const
multiple
=
ref
(
true
)
// 显示搜索条件
const
showSearch
=
ref
(
true
)
// 总条数
const
total
=
ref
(
0
)
// 考勤规则表格数据
const
ruleList
=
ref
([])
// 弹出层标题
const
title
=
ref
(
""
)
// 是否显示弹出层
const
open
=
ref
(
false
)
// 表单数据
const
data
=
reactive
({
form
:
{},
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
ruleNum
:
null
,
ruleName
:
null
,
},
rules
:
{
ruleName
:
[
{
required
:
true
,
message
:
"规则名称不能为空"
}
],
firBegintime
:
[
{
required
:
true
,
message
:
"上班打卡开始时间不能为空"
,
},
// { validator: checkfirBeginTime }
],
firEndtime
:
[
{
required
:
true
,
message
:
"上班打卡结束时间不能为空"
,
},
// { validator: checkfirEndTime }
],
secBegintime
:
[
// { validator: checksecBeginTime }
],
secEndtime
:
[
// { validator: checksecEndTime }
],
thiBegintime
:
[
{
required
:
true
,
message
:
"下班打卡开始时间不能为空"
},
// { validator: checkthiBeginTime }
],
thiEndtime
:
[
{
required
:
true
,
message
:
"下班打卡结束时间不能为空"
},
// { validator: checkthiEndTime }
]
}
})
const
{
form
,
queryParams
,
rules
}
=
toRefs
(
data
)
const
getList
=
()
=>
{
loading
.
value
=
true
;
listRule
(
queryParams
).
then
(
response
=>
{
response
.
data
.
rows
.
forEach
(
obj
=>
{
obj
.
thiEndtime
=
obj
.
thiEndtime
})
ruleList
.
value
=
response
.
data
.
rows
total
.
value
=
response
.
data
.
total
loading
.
value
=
false
})
}
getList
()
// 表单重置
const
reset
=
()
=>
{
form
.
value
=
{
ruleNum
:
randomCode
(),
ruleName
:
undefined
,
firBegintime
:
undefined
,
firEndtime
:
undefined
,
secBegintime
:
undefined
,
secEndtime
:
undefined
,
thiBegintime
:
undefined
,
thiEndtime
:
undefined
,
remark
:
undefined
}
proxy
.
resetForm
(
'addForm'
);
}
// 取消按钮
const
cancel
=
()
=>
{
open
.
value
=
false
reset
()
}
/** 搜索按钮操作 */
const
handleQuery
=
debounce
(
function
()
{
queryParams
.
value
.
pageNum
=
1
;
getList
();
})
/** 重置按钮操作 */
const
resetQuery
=
()
=>
{
proxy
.
resetForm
(
"addForm"
);
handleQuery
();
}
// 多选框选中数据
const
handleSelectionChange
=
(
selection
)
=>
{
ids
.
value
=
selection
.
map
(
item
=>
item
.
ruleId
)
single
.
value
=
selection
.
length
!==
1
multiple
.
value
=
!
selection
.
length
}
/** 新增按钮操作 */
const
handleAdd
=
()
=>
{
reset
()
open
.
value
=
true
title
.
value
=
"添加考勤规则"
}
/** 修改按钮操作 */
const
handleUpdate
=
(
row
)
=>
{
reset
()
const
ruleId
=
row
.
ruleId
||
ids
.
value
getRule
(
ruleId
).
then
(
response
=>
{
response
.
data
.
thiEndtime
=
response
.
data
.
thiEndtime
open
.
value
=
true
nextTick
(()
=>
{
form
.
value
=
response
.
data
title
.
value
=
"修改考勤规则"
})
});
}
/** 提交按钮 */
const
submitForm
=
()
=>
{
proxy
.
$refs
[
"addForm"
].
validate
(
valid
=>
{
if
(
valid
)
{
// 时间尾数补 0
Object
.
keys
(
form
.
value
).
forEach
(
key
=>
{
if
(
key
.
includes
(
'time'
))
{
form
.
value
[
key
]
=
timeAddZero
(
form
.
value
[
key
])
}
})
if
(
form
.
value
.
ruleId
!=
null
)
{
updateRule
(
form
.
value
).
then
(
response
=>
{
reset
()
proxy
.
$modal
.
msgSuccess
(
"修改成功"
);
open
.
value
=
false
;
getList
();
});
}
else
{
addRule
(
form
.
value
).
then
(
response
=>
{
reset
()
proxy
.
$modal
.
msgSuccess
(
"新增成功"
);
open
.
value
=
false
;
getList
();
});
}
}
});
}
/** 删除按钮操作 */
const
handleDelete
=
(
row
)
=>
{
const
ruleIds
=
row
.
ruleId
||
ids
.
value
;
proxy
.
$modal
.
confirm
(
'是否确认删除考勤规则编号为"'
+
ruleIds
+
'"的数据项?'
).
then
(
function
()
{
return
delRule
(
ruleIds
);
}).
then
(()
=>
{
getList
();
});
}
/** 导出按钮操作 */
const
handleExport
=
()
=>
{
proxy
.
$refs
[
"queryForm"
].
validate
(
valid
=>
{
if
(
valid
)
{
proxy
.
$download
(
"/rule/export"
,
queryParams
.
value
);
}
});
}
</
script
>
<
style
scoped
lang=
"scss"
>
::v-deep
(
.el-date-editor
)
{
width
:
100%
!
important
;
}
</
style
>
\ No newline at end of file
src/views/system/config/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<div>
<div
class=
"container"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
...
...
@@ -164,7 +164,6 @@
<!-- 添加或修改参数配置对话框 -->
<el-dialog
:title=
"title"
v-model=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"configRef"
:model=
"form"
...
...
src/views/system/dept/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<div>
<div
class=
"container"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
...
...
@@ -109,7 +109,6 @@
<!-- 添加或修改部门对话框 -->
<el-dialog
:title=
"title"
v-model=
"open"
width=
"600px"
append-to-body
>
<el-form
ref=
"deptRef"
:model=
"form"
...
...
src/views/system/dict/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<div>
<div
class=
"container"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"字典名称"
prop=
"dictName"
>
<el-input
...
...
@@ -141,7 +141,7 @@
/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog
:title=
"title"
v-model=
"open"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"title"
v-model=
"open"
append-to-body
>
<el-form
ref=
"dictRef"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"字典名称"
prop=
"dictName"
>
<el-input
v-model=
"form.dictName"
placeholder=
"请输入字典名称"
/>
...
...
src/views/system/menu/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<div>
<div
class=
"container"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
...
...
@@ -123,7 +123,6 @@
<!-- 添加或修改菜单对话框 -->
<el-dialog
:title=
"title"
v-model=
"open"
width=
"680px"
append-to-body
>
<el-form
ref=
"menuRef"
:model=
"form"
...
...
src/views/system/notice/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<div>
<div
class=
"container"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
...
...
@@ -142,7 +142,6 @@
<!--
添加或修改公告对话框
-->
<
el
-
dialog
:
title
=
"title"
v
-
model
=
"open"
width
=
"780px"
append
-
to
-
body
>
<
el
-
form
ref
=
"noticeRef"
:
model
=
"form"
...
...
src/views/system/post/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<div>
<div
class=
"container"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
...
...
@@ -140,7 +140,6 @@
<!-- 添加或修改岗位对话框 -->
<el-dialog
:title=
"title"
v-model=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"postRef"
:model=
"form"
...
...
src/views/system/role/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<div>
<div
class=
"container"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
v-show=
"showSearch"
...
...
@@ -178,7 +178,6 @@
<!-- 添加或修改角色配置对话框 -->
<el-dialog
:title=
"title"
v-model=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"roleRef"
:model=
"form"
...
...
@@ -249,7 +248,6 @@
<!-- 分配角色数据权限对话框 -->
<el-dialog
:title=
"title"
v-model=
"openDataScope"
width=
"500px"
append-to-body
>
<el-form
:model=
"form"
label-width=
"80px"
>
...
...
@@ -643,3 +641,15 @@
getList
();
</
script
>
<
style
scoped
lang=
"scss"
>
.el-tree
{
height
:
210px
;
overflow-y
:
scroll
;
/* 灰色滚动条背景 */
&
:
:-
webkit-scrollbar-track
{
background-color
:
transparent
;
}
}
</
style
>
\ No newline at end of file
src/views/system/user/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<el-row
:gutter=
"20"
class=
"client-fix-height"
>
<el-row
:gutter=
"20"
class=
"client-fix-height
container
"
>
<!--部门数据-->
<category-tree
:options=
"deptOptions"
:defaultProps=
"
{ label: 'label', children: 'children' }"
...
...
@@ -211,7 +211,6 @@
<!-- 添加或修改用户配置对话框 -->
<el-dialog
:title=
"title"
v-model=
"open"
width=
"600px"
append-to-body
>
<el-form
:model=
"form"
:rules=
"rules"
...
...
@@ -350,7 +349,6 @@
<!-- 用户导入对话框 -->
<el-dialog
:title=
"upload.title"
v-model=
"upload.open"
width=
"400px"
append-to-body
>
<el-upload
ref=
"uploadRef"
:limit=
"1"
...
...
src/views/system/user/profile/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<el-row
:gutter=
"20"
>
<el-row
:gutter=
"20"
class=
"container"
>
<el-col
:span=
"6"
:xs=
"24"
>
<el-card
class=
"box-card"
>
...
...
src/views/tool/gen/index.vue
浏览文件 @
425a9e06
<
template
>
<div
class=
"app-container"
>
<div>
<div
class=
"container"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
...
...
@@ -173,7 +173,6 @@
<!-- 预览界面 -->
<el-dialog
:title=
"preview.title"
v-model=
"preview.open"
width=
"80%"
top=
"5vh"
append-to-body
class=
"scrollbar"
>
...
...
vite.config.js
浏览文件 @
425a9e06
...
...
@@ -32,7 +32,8 @@ export default defineConfig(({ mode, command }) => {
rewrite
:
(
p
)
=>
p
.
replace
(
/^
\/
qllan/
,
''
)
},
'/bclan'
:
{
target
:
'http://192.168.141.188:8080'
,
// target: 'http://192.168.141.188:8080',
target
:
'http://192.168.204.205:8080'
,
changeOrigin
:
true
,
rewrite
:
(
p
)
=>
p
.
replace
(
/^
\/
bclan/
,
''
)
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论