Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mocp-uniapp
Overview
Overview
Details
Activity
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
pangchong
mocp-uniapp
Commits
cdf74bc6
Commit
cdf74bc6
authored
Oct 10, 2024
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 防风害操作单
parent
67f56ff8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
106 additions
and
46 deletions
+106
-46
src/mocp/api/windDamageManagement.js
+8
-0
src/mocp/store/windDamageManagement.js
+31
-9
src/pages.json
+12
-6
src/pages/modules/mocp/panel/windDamageManagement/append.vue
+21
-7
src/pages/modules/mocp/panel/windDamageManagement/editBasic.vue
+13
-8
src/pages/modules/mocp/panel/windDamageManagement/editConclusion.vue
+3
-3
src/pages/modules/mocp/panel/windDamageManagement/list.vue
+15
-13
src/pages/modules/mocp/panel/windDamageManagement/operateDetails.vue
+0
-0
src/pages/modules/mocp/panel/windDamageManagement/patrolDetails.vue
+0
-0
src/static/mocp/css/list.scss
+3
-0
No files found.
src/mocp/api/windDamageManagement.js
View file @
cdf74bc6
...
...
@@ -88,3 +88,11 @@ export const savePatrolWorkApi = (data, config) => {
config
})
}
export
const
saveOperateWorkApi
=
(
data
,
config
)
=>
{
return
post
({
method
:
'POST'
,
url
:
'/terminal/saveOperateWork'
,
data
,
config
})
}
src/mocp/store/windDamageManagement.js
View file @
cdf74bc6
...
...
@@ -48,19 +48,41 @@ const useWindDamageManagementStore = defineStore('windDamageManagement303030', {
getDetails
(
state
)
{
if
(
state
.
tabIndex
==
0
)
{
return
state
.
details
?.
patrolList
.
find
((
item
)
=>
item
.
patrolBasicVo
.
id
==
String
(
state
.
basicId
))
||
{}
}
else
if
(
state
.
tabIndex
==
1
)
{
return
state
.
details
?.
operateList
.
find
((
item
)
=>
item
.
operateBasicVo
.
id
==
String
(
state
.
basicId
))
||
{}
}
return
{}
},
getBasicVo
(
state
)
{
if
(
state
.
tabIndex
==
0
)
{
return
this
.
getDetails
.
patrolBasicVo
||
{}
}
else
if
(
state
.
tabIndex
==
1
)
{
return
this
.
getDetails
?.
operateBasicVo
||
{}
}
return
{}
},
getConclusionVo
(
state
)
{
if
(
state
.
tabIndex
==
0
)
{
return
this
.
getDetails
.
patrolConclusionVo
||
{}
}
else
if
(
state
.
tabIndex
==
1
)
{
return
this
.
getDetails
.
operateConclusionVo
||
{}
}
return
{}
},
getWorkVo
(
state
)
{
if
(
state
.
tabIndex
==
0
)
{
return
this
.
getDetails
.
patrolWorkVo
||
{}
}
else
if
(
state
.
tabIndex
==
1
)
{
return
this
.
getDetails
.
operateWorkVo
||
{}
}
return
{}
}
},
actions
:
{
async
getAllTaskInfoByWeather
(
weatherId
,
weatherSource
)
{
const
res
=
await
getAllTaskInfoByWeatherApi
(
{
weatherId
:
weatherId
||
this
.
weatherId
,
weatherSource
:
weatherSource
||
this
.
weatherSource
},
{
loading
:
true
}
)
async
getAllTaskInfoByWeather
()
{
const
res
=
await
getAllTaskInfoByWeatherApi
({
weatherId
:
this
.
weatherId
,
weatherSource
:
this
.
weatherSource
},
{
loading
:
true
})
if
(
res
.
code
==
200
)
{
if
(
this
.
tabIndex
==
0
)
{
this
.
details
=
res
.
data
}
this
.
details
=
res
.
data
}
else
{
uni
.
$mocpMessage
.
error
(
res
.
message
)
}
...
...
@@ -82,6 +104,6 @@ const useWindDamageManagementStore = defineStore('windDamageManagement303030', {
}
},
// 配置持久化
persist
:
fals
e
persist
:
tru
e
})
export
default
useWindDamageManagementStore
src/pages.json
View file @
cdf74bc6
...
...
@@ -736,12 +736,6 @@
}
},
{
"path"
:
"pages/modules/mocp/panel/windDamageManagement/patrolDetails"
,
"style"
:
{
"navigationBarTitleText"
:
"防风害巡场检查单"
}
},
{
"path"
:
"pages/modules/mocp/panel/windDamageManagement/editBasic"
,
"style"
:
{
"navigationBarTitleText"
:
"基础信息"
...
...
@@ -758,6 +752,18 @@
"style"
:
{
"navigationBarTitleText"
:
"结论"
}
},
{
"path"
:
"pages/modules/mocp/panel/windDamageManagement/patrolDetails"
,
"style"
:
{
"navigationBarTitleText"
:
"防风害巡场检查单"
}
},
{
"path"
:
"pages/modules/mocp/panel/windDamageManagement/operateDetails"
,
"style"
:
{
"navigationBarTitleText"
:
"防风害操作单"
}
}
],
"globalStyle"
:
{
...
...
src/pages/modules/mocp/panel/windDamageManagement/append.vue
View file @
cdf74bc6
...
...
@@ -10,18 +10,21 @@
pickAlign=
"right"
clearable
v-model=
"formData.dutyUid"
:search-value=
"get
Details.patrolBasicVo?
.dutyName"
:search-value=
"get
BasicVo
.dutyName"
></custom-admin-picker>
</up-form-item>
<up-form-item
label=
"航站"
:borderBottom=
"true"
prop=
"terminal"
required
>
<up-input
border=
"none"
inputAlign=
"right"
clearable
v-model=
"formData.terminal"
disabled
disabledColor=
"#fff"
></up-input>
</up-form-item>
<up-form-item
label=
"巡场人员"
:borderBottom=
"true"
>
<up-form-item
label=
"机号"
:borderBottom=
"true"
prop=
"acs"
required
v-if=
"tabIndex > 0"
>
<global-picker
pickAlign=
"right"
v-model=
"formData.acs"
:options=
"deviceNumList"
clearable
filter
></global-picker>
</up-form-item>
<up-form-item
:label=
"tabIndex == 0 ? '巡场人员' : '操作人'"
:borderBottom=
"true"
>
<custom-admin-picker
pickAlign=
"right"
clearable
v-model=
"formData.operateUid"
:search-value=
"get
Details.patrolBasicVo?
.operateName"
:search-value=
"get
BasicVo
.operateName"
></custom-admin-picker>
</up-form-item>
</up-form>
...
...
@@ -35,9 +38,13 @@ import { computed, reactive, ref } from 'vue'
import
{
savePwdCommonTaskApi
}
from
'mocp/api/windDamageManagement'
import
{
storeToRefs
}
from
'pinia'
import
useWindDamageManagementStore
from
'mocp/store/windDamageManagement'
import
useBaseStore
from
'mocp/store/base'
const
{
selectList
:
{
deviceNumList
}
}
=
useBaseStore
()
const
windDamageManagementStore
=
useWindDamageManagementStore
()
const
{
details
,
get
Details
,
tabIndex
}
=
storeToRefs
(
windDamageManagementStore
)
const
{
details
,
get
BasicVo
,
tabIndex
}
=
storeToRefs
(
windDamageManagementStore
)
const
rules
=
reactive
({
windSpeed
:
[
{
...
...
@@ -45,6 +52,13 @@ const rules = reactive({
message
:
'请输入预报风速'
,
trigger
:
[
'blur'
,
'change'
]
}
],
acs
:
[
{
required
:
true
,
message
:
'请选择机号'
,
trigger
:
[
'blur'
,
'change'
]
}
]
})
const
getTitle
=
computed
(()
=>
{
...
...
@@ -76,9 +90,9 @@ onLoad(async () => {
formData
.
terminal
=
details
.
value
?.
terminal
formData
.
weatherId
=
details
.
value
?.
weatherId
formData
.
weatherSource
=
details
.
value
?.
weatherSource
formData
.
dutyUid
=
get
Details
.
value
?.
patrolBasicVo
.
dutyUid
formData
.
operateUid
=
get
Details
.
value
?.
patrolBasicVo
.
operateUid
formData
.
windSpeed
=
get
Details
.
value
?.
patrolBasicVo
.
windSpeed
formData
.
dutyUid
=
get
BasicVo
.
value
.
dutyUid
formData
.
operateUid
=
get
BasicVo
.
value
.
operateUid
formData
.
windSpeed
=
get
BasicVo
.
value
.
windSpeed
})
//提交表单
const
formRef
=
ref
()
...
...
src/pages/modules/mocp/panel/windDamageManagement/editBasic.vue
View file @
cdf74bc6
...
...
@@ -16,18 +16,21 @@
pickAlign=
"right"
clearable
v-model=
"formData.dutyUid"
:searchValue=
"get
Details.patrol
BasicVo.dutyName"
:searchValue=
"getBasicVo.dutyName"
></custom-admin-picker>
</up-form-item>
<up-form-item
label=
"航站"
:borderBottom=
"true"
prop=
"terminal"
required
>
<up-input
border=
"none"
inputAlign=
"right"
clearable
v-model=
"formData.terminal"
disabled
disabledColor=
"#fff"
></up-input>
</up-form-item>
<up-form-item
label=
"巡场人员"
:borderBottom=
"true"
>
<up-form-item
label=
"机号"
:borderBottom=
"true"
prop=
"ac"
required
>
<up-input
border=
"none"
inputAlign=
"right"
clearable
v-model=
"formData.ac"
disabled
disabledColor=
"#fff"
></up-input>
</up-form-item>
<up-form-item
:label=
"tabIndex == 0 ? '巡场人员' : '操作人'"
:borderBottom=
"true"
>
<custom-admin-picker
pickAlign=
"right"
clearable
v-model=
"formData.operateUid"
:searchValue=
"get
Details.patrol
BasicVo.operateName"
:searchValue=
"getBasicVo.operateName"
></custom-admin-picker>
</up-form-item>
</up-form>
...
...
@@ -43,11 +46,12 @@ import { storeToRefs } from 'pinia'
import
useWindDamageManagementStore
from
'mocp/store/windDamageManagement'
const
windDamageManagementStore
=
useWindDamageManagementStore
()
const
{
get
Details
,
tabIndex
,
details
}
=
storeToRefs
(
windDamageManagementStore
)
const
{
get
BasicVo
,
tabIndex
,
details
}
=
storeToRefs
(
windDamageManagementStore
)
// 表单数据
const
formData
=
reactive
({
generateTime
:
''
,
terminal
:
''
,
ac
:
''
,
startTime
:
''
,
dutyUid
:
''
,
id
:
''
,
...
...
@@ -59,12 +63,13 @@ const formData = reactive({
onLoad
(()
=>
{
formData
.
generateTime
=
details
.
value
.
generateTime
formData
.
terminal
=
details
.
value
.
terminal
formData
.
ac
=
getBasicVo
.
value
.
ac
formData
.
startTime
=
details
.
value
.
startTime
formData
.
dutyUid
=
get
Details
.
value
.
patrolBasicVo
.
dutyUid
formData
.
id
=
get
Details
.
value
.
patrolBasicVo
.
id
formData
.
operateUid
=
get
Details
.
value
.
patrolBasicVo
.
operateUid
formData
.
dutyUid
=
get
BasicVo
.
value
.
dutyUid
formData
.
id
=
get
BasicVo
.
value
.
id
formData
.
operateUid
=
get
BasicVo
.
value
.
operateUid
formData
.
type
=
tabIndex
.
value
+
1
formData
.
windSpeed
=
get
Details
.
value
.
patrolBasicVo
.
windSpeed
formData
.
windSpeed
=
get
BasicVo
.
value
.
windSpeed
})
//提交表单
const
handleSubmit
=
async
()
=>
{
...
...
src/pages/modules/mocp/panel/windDamageManagement/editConclusion.vue
View file @
cdf74bc6
...
...
@@ -17,7 +17,7 @@
<up-cell
title=
"附件"
>
<
template
#
label
>
<view
style=
"margin-top: 16rpx"
>
<global-upload
v-model=
"formData.files"
:file-list=
"get
Details.patrolConclusionVo?
.files"
></global-upload>
<global-upload
v-model=
"formData.files"
:file-list=
"get
ConclusionVo
.files"
></global-upload>
</view>
</
template
>
</up-cell>
...
...
@@ -34,7 +34,7 @@ import { storeToRefs } from 'pinia'
import
useWindDamageManagementStore
from
'mocp/store/windDamageManagement'
const
windDamageManagementStore
=
useWindDamageManagementStore
()
const
{
get
Details
}
=
storeToRefs
(
windDamageManagementStore
)
const
{
get
ConclusionVo
}
=
storeToRefs
(
windDamageManagementStore
)
// 表单数据
const
formData
=
reactive
({
basicId
:
''
,
...
...
@@ -46,7 +46,7 @@ const formData = reactive({
})
// 页面初始化
onLoad
(()
=>
{
Object
.
assign
(
formData
,
get
Details
.
value
?.
patrolConclusionVo
)
Object
.
assign
(
formData
,
get
ConclusionVo
.
value
)
})
//提交表单
const
handleSubmit
=
async
()
=>
{
...
...
src/pages/modules/mocp/panel/windDamageManagement/list.vue
View file @
cdf74bc6
...
...
@@ -29,15 +29,15 @@
<custom-state
:value=
"useGetDictByValue('wdm_isOpen', item.isOpen)"
></custom-state>
</view>
<view
class=
"right"
>
<text
class=
"txt u-line-1"
v-if=
"item.ac"
>
{{
item
.
ac
}}
</text>
<text
class=
"txt u-line-1"
v-if=
"item.terminal"
>
{{
item
.
terminal
}}
</text>
<global-tag
:type=
"useGetDictByValue('wdm_rxStatusType', option.rxStatus)"
style=
"margin-left: 12rpx"
>
{{
useGetDictByValue
(
'wdm_rxStatus'
,
option
.
rxStatus
)
}}
</global-tag>
</view>
</view>
<view
class=
"item-content u-line-3"
>
{{
option
.
windSpeed
||
'无'
}}
<view
class=
"item-content"
>
<view
class=
"row"
v-if=
"option.ac"
>
机号:
{{
option
.
ac
}}
</view>
<view
class=
"row"
v-if=
"item.terminal"
>
航站:
{{
baseStore
.
getTerminalObject
[
item
.
terminal
]
}}
</view>
<view
class=
"u-line-3"
>
{{
option
.
windSpeed
||
'无'
}}
</view>
</view>
<view
class=
"item-footer"
>
<view
class=
"label"
>
...
...
@@ -77,39 +77,41 @@ import { onUnload } from '@dcloudio/uni-app'
import
{
timeStampFormat
}
from
'mocp/utils/tool'
import
{
useGetDictByValue
}
from
'mocp/hooks/use-dict/useDict'
import
{
navigateTo
}
from
'mocp/utils/jump'
import
useBaseStore
from
'mocp/store/base'
const
baseStore
=
useBaseStore
()
const
windDamageManagementStore
=
useWindDamageManagementStore
()
const
{
getSearchData
,
tabIndex
}
=
storeToRefs
(
windDamageManagementStore
)
const
tabList
=
[
{
name
:
'巡场检查单'
,
api
:
getPwdPatrolListApi
api
:
getPwdPatrolListApi
,
url
:
'/panel/windDamageManagement/patrolDetails'
},
{
name
:
'操作单'
,
api
:
getPwdOperateListApi
api
:
getPwdOperateListApi
,
url
:
'/panel/windDamageManagement/operateDetails'
},
{
name
:
'系留单'
,
api
:
getPwdMooringListApi
api
:
getPwdMooringListApi
,
url
:
'/panel/windDamageManagement/patrolDetails'
},
{
name
:
'防沙尘暴签署单'
,
api
:
getPwdSandstormListApi
api
:
getPwdSandstormListApi
,
url
:
'/panel/windDamageManagement/patrolDetails'
}
]
const
handleTabsChange
=
(
value
)
=>
{
windDamageManagementStore
.
setState
(
'tabIndex'
,
value
)
}
const
goDetails
=
(
data
,
basicId
)
=>
{
let
url
=
''
if
(
tabIndex
.
value
==
0
)
{
url
=
'/panel/windDamageManagement/patrolDetails'
}
windDamageManagementStore
.
setState
(
'basicId'
,
basicId
)
windDamageManagementStore
.
setState
(
'weatherId'
,
data
.
id
)
windDamageManagementStore
.
setState
(
'weatherSource'
,
data
.
weatherSource
)
uni
.
$mocpJump
.
navigateTo
(
url
)
uni
.
$mocpJump
.
navigateTo
(
tabList
[
tabIndex
.
value
].
url
)
}
//追击
const
goAppend
=
(
data
,
basicId
)
=>
{
...
...
src/pages/modules/mocp/panel/windDamageManagement/operateDetails.vue
0 → 100644
View file @
cdf74bc6
This diff is collapsed.
Click to expand it.
src/pages/modules/mocp/panel/windDamageManagement/patrolDetails.vue
View file @
cdf74bc6
This diff is collapsed.
Click to expand it.
src/static/mocp/css/list.scss
View file @
cdf74bc6
...
...
@@ -65,6 +65,9 @@
margin-left
:
0
;
}
}
.row
{
margin-bottom
:
16rpx
;
}
}
&
-footer
{
display
:
flex
;
...
...
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