Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
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
紫光云
web-project
Commits
a84b05f2
Commit
a84b05f2
authored
Oct 29, 2024
by
ccc2wdd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
安全管理,数据填报情况统计
parent
007759ef
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
686 additions
and
132 deletions
+686
-132
safetyEducation.ts
src/api/project/safetyEducation.ts
+1
-1
saftyManage.ts
src/api/project/saftyManage.ts
+28
-0
index.vue
src/views/changeSignature/index.vue
+285
-92
cycleModel.vue
src/views/potentialSafety/cycleModel/cycleModel.vue
+96
-0
fillDetailsModel.vue
...ews/potentialSafety/fillDetailsModel/fillDetailsModel.vue
+56
-0
index.vue
src/views/potentialSafety/index.vue
+207
-10
cycleModel.vue
src/views/safetyEducation/cycleModel/cycleModel.vue
+3
-4
fillDetailsModel.vue
...ews/safetyEducation/fillDetailsModel/fillDetailsModel.vue
+0
-1
index.vue
src/views/safetyEducation/index.vue
+10
-24
No files found.
src/api/project/safetyEducation.ts
View file @
a84b05f2
...
...
@@ -14,7 +14,7 @@ enum Api {
GetCycelDetails
=
'/pro/educationTraining/cycle/details'
,
EditCycel
=
'/pro/educationTraining/cycle/edit'
,
EditStatus
=
'/pro/educationTraining/cycle/editStatus'
,
BusinessComDetails
=
'pro/educationTraining/cycle/businessComDetails'
,
BusinessComDetails
=
'
/
pro/educationTraining/cycle/businessComDetails'
,
}
export
const
getListByPage
=
(
params
?:
ProjectParams
)
=>
...
...
src/api/project/saftyManage.ts
View file @
a84b05f2
...
...
@@ -8,6 +8,10 @@ enum Api {
UpdateProject
=
'/pro/dangerManagement/update'
,
DeleteProject
=
'/pro/dangerManagement/del'
,
Audit
=
'/pro/dangerManagement/audit'
,
GetCycelDetails
=
'/pro/dangerManagement/cycle/details'
,
EditCycel
=
'/pro/dangerManagement/cycle/edit'
,
EditStatus
=
'/pro/dangerManagement/cycle/editStatus'
,
BusinessComDetails
=
'/pro/dangerManagement/cycle/businessComDetails'
,
}
export
const
getListByPage
=
(
params
?:
ProjectParams
)
=>
...
...
@@ -31,3 +35,27 @@ export const auditItem = (params?: any) =>
url
:
Api
.
Audit
,
params
,
});
export
const
getCycel
=
(
params
?:
any
)
=>
defHttp
.
post
<
any
>
({
url
:
Api
.
GetCycelDetails
,
params
,
});
export
const
setCycel
=
(
params
?:
any
)
=>
defHttp
.
post
<
any
>
({
url
:
Api
.
EditCycel
,
params
,
});
export
const
setEditStatus
=
(
params
?:
any
)
=>
defHttp
.
post
<
any
>
({
url
:
Api
.
EditStatus
,
params
,
});
export
const
getFillComDetails
=
(
params
?:
any
)
=>
defHttp
.
post
<
any
>
({
url
:
Api
.
BusinessComDetails
,
params
,
});
src/views/changeSignature/index.vue
View file @
a84b05f2
This diff is collapsed.
Click to expand it.
src/views/potentialSafety/cycleModel/cycleModel.vue
0 → 100644
View file @
a84b05f2
<
template
>
<BasicModal
v-bind=
"$attrs"
@
register=
"register"
title=
"设置填报周期"
:minHeight=
"30"
okText=
"保存"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
:model=
"modelRef"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
setCycel
}
from
'@/api/project/saftyManage'
;
const
props
=
defineProps
({
userData
:
{
type
:
Object
},
});
const
emit
=
defineEmits
([
'getCycle'
,
'register'
]);
const
modelRef
=
ref
({});
const
[
registerForm
,
{
getFieldsValue
,
validate
}]
=
useForm
({
labelWidth
:
100
,
schemas
:
[
{
field
:
'year'
,
label
:
'填报年份'
,
required
:
true
,
component
:
'DatePicker'
,
componentProps
:
{
placeholder
:
'选择年份'
,
picker
:
'year'
,
style
:
{
width
:
'100%'
},
valueFormat
:
'YYYY'
,
format
:
'YYYY'
,
},
},
{
field
:
'quarter'
,
label
:
'填报季度'
,
required
:
true
,
component
:
'Select'
,
componentProps
:
{
options
:
[
{
label
:
'第一季度'
,
value
:
'第一季度'
,
},
{
label
:
'第二季度'
,
value
:
'第二季度'
,
},
{
label
:
'第三季度'
,
value
:
'第三季度'
,
},
{
label
:
'第四季度'
,
value
:
'第四季度'
,
},
],
placeholder
:
'季度'
,
style
:
{
width
:
'100%'
},
},
},
],
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
24
,
},
});
const
cycleData
=
ref
({
beginTime
:
'2024-07-01'
,
endTime
:
'2024-09-02'
,
fillCycle
:
'2024-第四季度'
,
isEdit
:
'0'
,
deptNum
:
8
,
noNum
:
6
,
});
const
[
register
,
{
closeModal
}]
=
useModalInner
((
data
)
=>
{
cycleData
.
value
=
data
.
data
;
});
function
handleSubmit
()
{
validate
().
then
(()
=>
{
const
value
=
getFieldsValue
();
cycleData
.
value
.
fillCycle
=
value
.
year
+
'-'
+
value
.
quarter
;
setCycel
(
cycleData
.
value
).
then
(()
=>
{
emit
(
'getCycle'
);
});
closeModal
();
});
}
</
script
>
src/views/potentialSafety/fillDetailsModel/fillDetailsModel.vue
0 → 100644
View file @
a84b05f2
<
template
>
<BasicModal
v-bind=
"$attrs"
width=
"80%"
@
register=
"register"
:title=
"getTitle"
:showOkBtn=
"false"
>
<Table
:pagination=
"false"
:dataSource=
"dataSource"
:columns=
"columns"
bordered
:sticky=
"true"
:loading=
"loadingRef"
>
<template
#
bodyCell=
"
{ column, record }">
<template
v-if=
"column.dataIndex === 'comStatus'"
>
<Tag
color=
"green"
v-if=
"record.comStatus === '1'"
>
已完成
</Tag>
<Tag
color=
"red"
v-else
>
未完成
</Tag>
</
template
>
</template>
</Table>
</BasicModal>
</template>
<
script
setup
lang=
"ts"
>
import
{
useModalInner
}
from
'@/components/Modal'
;
import
BasicModal
from
'@/components/Modal/src/BasicModal.vue'
;
import
{
ref
}
from
'vue'
;
import
{
Table
,
Tag
}
from
'ant-design-vue'
;
import
{
getFillComDetails
}
from
'@/api/project/saftyManage'
;
const
loadingRef
=
ref
(
false
);
// 列表
const
dataSource
=
ref
([]);
// 表头
const
columns
=
[
{
title
:
'公司名称'
,
dataIndex
:
'companyName'
,
width
:
200
,
},
{
title
:
'完成状态'
,
dataIndex
:
'comStatus'
,
width
:
180
,
},
{
title
:
'上报时间'
,
dataIndex
:
'updateTime'
,
width
:
150
,
},
];
const
getTitle
=
ref
(
''
);
const
params
=
ref
({
mothCycle
:
''
});
const
[
register
,
{
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
params
.
value
.
mothCycle
=
data
.
data
.
fillCycle
;
dataSource
.
value
=
await
getFillComDetails
(
params
.
value
);
});
</
script
>
<
style
scoped
lang=
"less"
></
style
>
src/views/potentialSafety/index.vue
View file @
a84b05f2
This diff is collapsed.
Click to expand it.
src/views/safetyEducation/cycleModel/cycleModel.vue
View file @
a84b05f2
...
...
@@ -11,10 +11,11 @@
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
reactive
}
from
'vue'
;
import
{
ref
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
FormSchema
,
useForm
}
from
'@/components/Form'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
setCycel
}
from
'@/api/project/safetyEducation'
;
const
props
=
defineProps
({
userData
:
{
type
:
Object
},
});
...
...
@@ -79,7 +80,6 @@
noNum
:
6
,
});
const
[
register
,
{
closeModal
}]
=
useModalInner
((
data
)
=>
{
console
.
log
(
data
.
data
);
cycleData
.
value
=
data
.
data
;
});
...
...
@@ -89,7 +89,6 @@
cycleData
.
value
.
fillCycle
=
value
.
year
+
'-'
+
value
.
quarter
;
setCycel
(
cycleData
.
value
).
then
(()
=>
{
emit
(
'getCycle'
);
console
.
log
(
'2123'
,
cycleData
.
value
);
});
closeModal
();
});
...
...
src/views/safetyEducation/fillDetailsModel/fillDetailsModel.vue
View file @
a84b05f2
...
...
@@ -51,7 +51,6 @@
const
[
register
,
{
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
params
.
value
.
mothCycle
=
data
.
data
.
fillCycle
;
dataSource
.
value
=
await
getFillComDetails
(
params
.
value
);
// console.log('212', list);
});
</
script
>
<
style
scoped
lang=
"less"
></
style
>
src/views/safetyEducation/index.vue
View file @
a84b05f2
...
...
@@ -168,7 +168,6 @@
const
APopconfirm
=
Popconfirm
;
const
userStore
=
useUserStore
();
const
isExamine
=
ref
<
boolean
>
(
false
);
let
isEdit
=
ref
(
'1'
);
const
getUserInfo
=
computed
(()
=>
{
const
{
realName
=
''
,
avatar
,
desc
,
deptId
}
=
userStore
.
getUserInfo
||
{};
return
{
realName
,
avatar
:
avatar
,
desc
,
deptId
};
...
...
@@ -431,9 +430,8 @@
isExamine
.
value
=
true
;
}
});
const
data
=
await
getDepartmentList
();
// console.log(data);
searchForm
.
value
[
2
].
componentProps
.
options
=
data
;
const
depart
=
await
getDepartmentList
();
searchForm
.
value
[
2
].
componentProps
.
options
=
depart
;
getStatisticList
();
});
...
...
@@ -480,14 +478,8 @@
}
const
targetDate
=
new
Date
(
year
,
endMonth
+
1
,
0
);
// 得到该季度最后一天
console
.
log
(
'targetDate'
,
targetDate
);
// 计算时间差(毫秒)
const
timeDifference
=
targetDate
-
today
;
console
.
log
(
'timeDifference'
,
timeDifference
);
console
.
log
(
'Math.max(0, Math.ceil(timeDifference / (1000 * 60 * 60 * 24)))'
,
Math
.
max
(
0
,
Math
.
ceil
(
timeDifference
/
(
1000
*
60
*
60
*
24
))),
);
// 计算天数差(天数 = 毫秒差 / 每天的毫秒数)
return
Math
.
max
(
0
,
Math
.
ceil
(
timeDifference
/
(
1000
*
60
*
60
*
24
)));
}
...
...
@@ -505,7 +497,6 @@
}
function
returnEdit
()
{
console
.
log
(
'mothCycle.value.isEdit'
,
mothCycle
.
value
.
isEdit
);
if
(
mothCycle
.
value
.
isEdit
==
'1'
)
{
mothCycle
.
value
.
isEdit
=
'0'
;
setEditStatus
(
mothCycle
.
value
);
...
...
@@ -518,7 +509,6 @@
async
function
getSetCycle
()
{
mothCycle
.
value
=
await
getCycel
();
console
.
log
(
'mothCycle.value'
,
mothCycle
.
value
);
}
//新增
...
...
@@ -558,7 +548,6 @@
async
function
handleExamine
(
record
:
Recordable
)
{
const
id
=
record
.
id
;
const
res
=
await
auditItem
({
id
});
console
.
log
(
res
);
await
getStatisticList
();
}
...
...
@@ -597,20 +586,17 @@
//加载列表数据
async
function
getStatisticList
()
{
loadingRef
.
value
=
true
;
console
.
log
(
'params.value'
,
params
.
value
);
let
data
=
await
getListAll
(
params
.
value
);
if
(
data
.
length
>
0
)
{
isEdit
.
value
=
data
[
0
].
reviewStatus
;
const
cycle
=
await
getCycel
();
mothCycle
.
value
=
cycle
;
console
.
log
(
'getStatisticList:mothCycle.value'
,
mothCycle
.
value
);
// dataSource.value = data;
//将相同的合并单元格
let
propsList
=
[
'companyName'
];
propsList
.
map
((
item
)
=>
{
changeData
(
data
,
item
);
});
mothCycle
.
value
=
await
getCycel
();
// let cycle = await getListAll(mothCycle.value.fillCycle);
// mothCycle.value.isEdit = cycle[0].reviewStatus;
}
// 将相同的合并单元格
let
propsList
=
[
'companyName'
];
propsList
.
map
((
item
)
=>
{
changeData
(
data
,
item
);
});
loadingRef
.
value
=
false
;
}
...
...
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