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
407c8f65
Commit
407c8f65
authored
Jul 25, 2024
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复人员选择相关内容
parent
7dbad92f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
62 additions
and
76 deletions
+62
-76
src/mocp/api/base.js
+1
-9
src/mocp/api/system.js
+10
-0
src/mocp/components/widget/custom-admin-picker.vue
+6
-1
src/mocp/store/base.js
+0
-23
src/pages/modules/mocp/panel/move-decision/edit-approver.vue
+9
-9
src/pages/modules/mocp/panel/move-decision/edit-mco-director.vue
+9
-9
src/pages/modules/mocp/panel/technology-evaluation/add-engineering.vue
+9
-9
src/pages/modules/mocp/panel/technology-evaluation/add-opinion.vue
+9
-8
src/pages/modules/mocp/panel/technology-evaluation/add-ratify.vue
+9
-8
No files found.
src/mocp/api/base.js
View file @
407c8f65
...
...
@@ -9,15 +9,7 @@ export const getAircraftNumbersApi = (data, config) => {
config
})
}
//获取用户基本信息分页列表
export
const
getAdminListApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/system/getAdminList'
,
data
,
config
})
}
//获取所有敏感词
export
const
getBasicParamsListApi
=
(
data
,
config
)
=>
{
return
http
({
...
...
src/mocp/api/system.js
View file @
407c8f65
import
{
http
}
from
'mocp/utils/http'
//获取用户基本信息分页列表
export
const
getAdminListApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/system/getAdminList'
,
data
,
config
})
}
//通过机号查询飞机相关数据
export
const
getAcReduceListApi
=
(
data
,
config
)
=>
{
return
http
({
...
...
src/mocp/components/widget/custom-admin-picker.vue
View file @
407c8f65
...
...
@@ -36,7 +36,7 @@
<
script
setup
>
import
{
debounce
}
from
'lodash'
import
{
getAdminListApi
}
from
'mocp/api/
base
'
import
{
getAdminListApi
}
from
'mocp/api/
system
'
import
{
computed
,
ref
,
watch
,
watchEffect
}
from
'vue'
const
es
=
defineEmits
([
'update:modelValue'
,
'change'
])
...
...
@@ -217,6 +217,11 @@ const handleChoose = (row) => {
es
(
'change'
,
row
[
ps
.
valueField
],
row
)
show
.
value
=
false
}
defineExpose
({
getName
:
()
=>
{
return
labelValue
.
value
?.
split
(
'('
)[
0
]
||
''
}
})
</
script
>
<
style
lang=
"scss"
scoped
>
.picker
{
...
...
src/mocp/store/base.js
View file @
407c8f65
...
...
@@ -164,29 +164,6 @@ const useBaseStore = defineStore('base', {
this
.
selectList
.
ATAList
=
res
.
data
.
ataList
}
},
async
getAdminList
(
realName
=
''
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
params
=
{
pageIndex
:
1
,
pageSize
:
100
,
realName
}
getAdminListApi
(
params
,
{
loading
:
true
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
const
selectList
=
res
.
data
.
list
.
map
((
item
)
=>
{
return
{
label
:
`
${
item
.
nickname
}
(
${(
item
.
enetAccount
||
'无易网号'
)
+
'-'
+
(
item
.
deptFullName
||
'无机构'
)}
)`
,
value
:
item
.
id
}
})
resolve
(
selectList
)
}
else
{
uni
.
$mocpMessage
.
error
(
res
.
message
)
reject
()
}
})
})
},
async
getEngineList
()
{
const
res
=
await
getEngineListApi
({})
if
(
res
.
code
==
200
)
{
...
...
src/pages/modules/mocp/panel/move-decision/edit-approver.vue
View file @
407c8f65
...
...
@@ -10,7 +10,13 @@
<view
class=
"mocp-form"
>
<up-form
labelPosition=
"left"
labelWidth=
"auto"
>
<up-form-item
label=
"公司值班经理"
:borderBottom=
"true"
>
<global-picker
pickAlign=
"right"
clearable
v-model=
"formData.approver"
:options=
"selectList"
filter
></global-picker>
<custom-admin-picker
ref=
"adminPickerRef"
pickAlign=
"right"
clearable
v-model=
"formData.approver"
:searchValue=
"details.approverName"
></custom-admin-picker>
</up-form-item>
<up-form-item
label=
"公司值班经理意见"
:borderBottom=
"true"
>
<global-radio
radioAlign=
"right"
clearable
v-model=
"formData.decisionState"
dictkey=
"md_decisionState"
></global-radio>
...
...
@@ -31,12 +37,10 @@
<
script
setup
>
import
{
onLoad
}
from
'@dcloudio/uni-app'
import
{
reactive
,
ref
}
from
'vue'
import
useBaseStore
from
'mocp/store/base'
import
{
storeToRefs
}
from
'pinia'
import
useMoveDecisionStore
from
'mocp/store/move-decision'
import
{
updateApproverInfoApi
}
from
'mocp/api/move-decision'
const
baseStore
=
useBaseStore
()
const
moveDecisionStore
=
useMoveDecisionStore
()
const
{
details
}
=
storeToRefs
(
moveDecisionStore
)
//表单数据
...
...
@@ -46,24 +50,20 @@ const formData = reactive({
decisionState
:
''
,
decisionOpinion
:
''
})
//获取下拉框列表
const
selectList
=
ref
([])
onLoad
(()
=>
{
formData
.
id
=
details
.
value
.
id
formData
.
approver
=
details
.
value
.
approver
formData
.
decisionState
=
details
.
value
.
decisionState
formData
.
decisionOpinion
=
details
.
value
.
decisionOpinion
baseStore
.
getAdminList
().
then
((
res
)
=>
{
selectList
.
value
=
res
})
})
const
adminPickerRef
=
ref
()
const
handleRightClick
=
async
()
=>
{
const
res
=
await
updateApproverInfoApi
(
formData
,
{
loading
:
true
})
if
(
res
.
code
==
200
)
{
uni
.
$mocpJump
.
navigateBack
()
uni
.
$mocpMessage
.
success
(
res
.
message
)
res
.
data
.
approver
=
formData
.
approver
res
.
data
.
approverName
=
selectList
.
value
.
find
((
item
)
=>
item
.
value
==
formData
.
approver
)?.
label
.
split
(
'('
)[
0
]
||
''
res
.
data
.
approverName
=
adminPickerRef
.
value
?.
getName
()
res
.
data
.
decisionState
=
formData
.
decisionState
res
.
data
.
decisionOpinion
=
formData
.
decisionOpinion
//更新详情
...
...
src/pages/modules/mocp/panel/move-decision/edit-mco-director.vue
View file @
407c8f65
...
...
@@ -3,7 +3,13 @@
<view
class=
"mocp-form"
>
<up-form
labelPosition=
"left"
labelWidth=
"auto"
>
<up-form-item
label=
"MCO主任"
:borderBottom=
"true"
>
<global-picker
pickAlign=
"right"
clearable
v-model=
"formData.mcoDirector"
:options=
"selectList"
filter
></global-picker>
<custom-admin-picker
ref=
"adminPickerRef"
pickAlign=
"right"
clearable
v-model=
"formData.mcoDirector"
:searchValue=
"details.mcoDirectorName"
></custom-admin-picker>
</up-form-item>
<up-form-item
label=
"MCP主任意见"
:borderBottom=
"true"
>
<global-radio
radioAlign=
"right"
clearable
v-model=
"formData.mcoDirectorDecisionState"
dictkey=
"md_decisionState"
></global-radio>
...
...
@@ -24,12 +30,10 @@
<
script
setup
>
import
{
onLoad
}
from
'@dcloudio/uni-app'
import
{
reactive
,
ref
}
from
'vue'
import
useBaseStore
from
'mocp/store/base'
import
{
storeToRefs
}
from
'pinia'
import
useMoveDecisionStore
from
'mocp/store/move-decision'
import
{
updateMcoDirectorInfoApi
}
from
'mocp/api/move-decision'
const
baseStore
=
useBaseStore
()
const
moveDecisionStore
=
useMoveDecisionStore
()
const
{
details
}
=
storeToRefs
(
moveDecisionStore
)
//表单数据
...
...
@@ -39,24 +43,20 @@ const formData = reactive({
mcoDirectorDecisionState
:
''
,
mcoDirectorOpinion
:
''
})
//获取下拉框列表
const
selectList
=
ref
([])
onLoad
(()
=>
{
formData
.
id
=
details
.
value
.
id
formData
.
mcoDirector
=
details
.
value
.
mcoDirector
formData
.
mcoDirectorDecisionState
=
details
.
value
.
mcoDirectorDecisionState
formData
.
mcoDirectorOpinion
=
details
.
value
.
mcoDirectorOpinion
baseStore
.
getAdminList
().
then
((
res
)
=>
{
selectList
.
value
=
res
})
})
const
adminPickerRef
=
ref
()
const
handleRightClick
=
async
()
=>
{
const
res
=
await
updateMcoDirectorInfoApi
(
formData
,
{
loading
:
true
})
if
(
res
.
code
==
200
)
{
uni
.
$mocpJump
.
navigateBack
()
uni
.
$mocpMessage
.
success
(
res
.
message
)
res
.
data
.
mcoDirector
=
formData
.
mcoDirector
res
.
data
.
mcoDirectorName
=
selectList
.
value
.
find
((
item
)
=>
item
.
value
==
formData
.
mcoDirector
)?.
label
.
split
(
'('
)[
0
]
||
''
res
.
data
.
mcoDirectorName
=
adminPickerRef
.
value
?.
getName
()
res
.
data
.
mcoDirectorDecisionState
=
formData
.
mcoDirectorDecisionState
res
.
data
.
mcoDirectorOpinion
=
formData
.
mcoDirectorOpinion
//更新详情
...
...
src/pages/modules/mocp/panel/technology-evaluation/add-engineering.vue
View file @
407c8f65
...
...
@@ -10,7 +10,13 @@
<view
class=
"mocp-form"
>
<up-form
labelPosition=
"left"
labelWidth=
"auto"
>
<up-form-item
label=
"授权工程师"
:borderBottom=
"true"
>
<global-picker
pickAlign=
"right"
v-model=
"formData.estimateEngineer"
clearable
:options=
"estimateOpts"
filter
></global-picker>
<custom-admin-picker
ref=
"adminPickerRef"
pickAlign=
"right"
clearable
v-model=
"formData.estimateEngineer"
:searchValue=
"details.estimateEngineerName"
></custom-admin-picker>
</up-form-item>
<up-form-item
label=
"日期"
:borderBottom=
"true"
>
<global-date
pickAlign=
"right"
v-model=
"formData.engineerTime"
clearable
:timestamp=
"false"
></global-date>
...
...
@@ -62,11 +68,9 @@ import { onLoad } from '@dcloudio/uni-app'
import
useTechnologyEvaluationStore
from
'mocp/store/technology-evaluation'
import
{
storeToRefs
}
from
'pinia'
import
{
reactive
,
ref
}
from
'vue'
import
useBaseStore
from
'mocp/store/base'
import
{
addEngineeringApi
}
from
'mocp/api/technology-evaluation'
import
{
getParamsByType
}
from
'mocp/hooks/use-params/useParams'
const
baseStore
=
useBaseStore
()
const
technologyEvaluationStore
=
useTechnologyEvaluationStore
()
const
{
details
}
=
storeToRefs
(
technologyEvaluationStore
)
const
formData
=
reactive
({
...
...
@@ -79,8 +83,6 @@ const formData = reactive({
estimateType
:
null
,
engineerTime
:
null
})
//页面初始化
const
estimateOpts
=
ref
([])
onLoad
(()
=>
{
formData
.
id
=
details
.
value
.
id
formData
.
num
=
details
.
value
.
num
...
...
@@ -90,17 +92,15 @@ onLoad(() => {
formData
.
estimateEngineer
=
details
.
value
.
estimateEngineer
formData
.
estimateType
=
details
.
value
.
estimateType
formData
.
engineerTime
=
details
.
value
.
engineerTime
baseStore
.
getAdminList
().
then
((
res
)
=>
{
estimateOpts
.
value
=
res
})
})
//保存
const
adminPickerRef
=
ref
()
const
handleSave
=
async
()
=>
{
const
res
=
await
addEngineeringApi
(
formData
,
{
loading
:
true
})
if
(
res
.
code
==
200
)
{
uni
.
$mocpJump
.
navigateBack
()
uni
.
$mocpMessage
.
success
(
res
.
message
)
res
.
data
.
estimateEngineerName
=
estimateOpts
.
value
.
find
((
item
)
=>
item
.
value
==
formData
.
estimateEngineer
)?.
label
.
split
(
'('
)[
0
]
||
''
res
.
data
.
estimateEngineerName
=
adminPickerRef
.
value
?.
getName
()
//更新详情
technologyEvaluationStore
.
setState
(
'details'
,
res
.
data
)
}
else
{
...
...
src/pages/modules/mocp/panel/technology-evaluation/add-opinion.vue
View file @
407c8f65
...
...
@@ -10,7 +10,13 @@
<view
class=
"mocp-form"
>
<up-form
labelPosition=
"left"
labelWidth=
"auto"
>
<up-form-item
label=
"机队经理或其授权人"
:borderBottom=
"true"
>
<global-picker
pickAlign=
"right"
v-model=
"formData.otherName"
clearable
:options=
"otherNameOpts"
filter
></global-picker>
<custom-admin-picker
ref=
"adminPickerRef"
pickAlign=
"right"
clearable
v-model=
"formData.otherName"
:searchValue=
"details.otherFullName"
></custom-admin-picker>
</up-form-item>
<up-form-item
label=
"机队经理或其授权人意见"
:borderBottom=
"true"
>
<global-picker
pickAlign=
"right"
v-model=
"formData.opinionType"
clearable
dictkey=
"te_opinionType"
emptyValue=
"0"
></global-picker>
...
...
@@ -25,10 +31,8 @@ import { onLoad } from '@dcloudio/uni-app'
import
useTechnologyEvaluationStore
from
'mocp/store/technology-evaluation'
import
{
storeToRefs
}
from
'pinia'
import
{
reactive
,
ref
}
from
'vue'
import
useBaseStore
from
'mocp/store/base'
import
{
addOpinionApi
}
from
'mocp/api/technology-evaluation'
const
baseStore
=
useBaseStore
()
const
technologyEvaluationStore
=
useTechnologyEvaluationStore
()
const
{
details
}
=
storeToRefs
(
technologyEvaluationStore
)
const
formData
=
reactive
({
...
...
@@ -38,23 +42,20 @@ const formData = reactive({
opinionType
:
''
})
//页面初始化
const
otherNameOpts
=
ref
([])
onLoad
(()
=>
{
formData
.
id
=
details
.
value
.
id
formData
.
num
=
details
.
value
.
num
formData
.
otherName
=
details
.
value
.
otherName
formData
.
opinionType
=
details
.
value
.
opinionType
baseStore
.
getAdminList
().
then
((
res
)
=>
{
otherNameOpts
.
value
=
res
})
})
//保存
const
adminPickerRef
=
ref
()
const
handleSave
=
async
()
=>
{
const
res
=
await
addOpinionApi
(
formData
,
{
loading
:
true
})
if
(
res
.
code
==
200
)
{
uni
.
$mocpJump
.
navigateBack
()
uni
.
$mocpMessage
.
success
(
res
.
message
)
res
.
data
.
otherFullName
=
otherNameOpts
.
value
.
find
((
item
)
=>
item
.
value
==
formData
.
otherName
)?.
label
.
split
(
'('
)[
0
]
||
''
res
.
data
.
otherFullName
=
adminPickerRef
.
value
?.
getName
()
//更新详情
technologyEvaluationStore
.
setState
(
'details'
,
res
.
data
)
}
else
{
...
...
src/pages/modules/mocp/panel/technology-evaluation/add-ratify.vue
View file @
407c8f65
...
...
@@ -10,7 +10,13 @@
<view
class=
"mocp-form"
>
<up-form
labelPosition=
"left"
labelWidth=
"auto"
>
<up-form-item
label=
"客户工程授权人"
:borderBottom=
"true"
>
<global-picker
pickAlign=
"right"
v-model=
"formData.customName"
clearable
:options=
"customNameOpts"
filter
></global-picker>
<custom-admin-picker
ref=
"adminPickerRef"
pickAlign=
"right"
clearable
v-model=
"formData.customName"
:searchValue=
"details.customFullName"
></custom-admin-picker>
</up-form-item>
<up-form-item
label=
"客户工程授权人意见"
:borderBottom=
"true"
>
<global-picker
pickAlign=
"right"
v-model=
"formData.customType"
clearable
dictkey=
"te_customType"
emptyValue=
"0"
></global-picker>
...
...
@@ -25,10 +31,8 @@ import { onLoad } from '@dcloudio/uni-app'
import
useTechnologyEvaluationStore
from
'mocp/store/technology-evaluation'
import
{
storeToRefs
}
from
'pinia'
import
{
reactive
,
ref
}
from
'vue'
import
useBaseStore
from
'mocp/store/base'
import
{
addRatifyApi
}
from
'mocp/api/technology-evaluation'
const
baseStore
=
useBaseStore
()
const
technologyEvaluationStore
=
useTechnologyEvaluationStore
()
const
{
details
}
=
storeToRefs
(
technologyEvaluationStore
)
const
formData
=
reactive
({
...
...
@@ -38,23 +42,20 @@ const formData = reactive({
customType
:
''
})
//页面初始化
const
customNameOpts
=
ref
([])
onLoad
(()
=>
{
formData
.
id
=
details
.
value
.
id
formData
.
num
=
details
.
value
.
num
formData
.
customName
=
details
.
value
.
customName
formData
.
customType
=
details
.
value
.
customType
baseStore
.
getAdminList
().
then
((
res
)
=>
{
customNameOpts
.
value
=
res
})
})
//保存
const
adminPickerRef
=
ref
()
const
handleSave
=
async
()
=>
{
const
res
=
await
addRatifyApi
(
formData
,
{
loading
:
true
})
if
(
res
.
code
==
200
)
{
uni
.
$mocpJump
.
navigateBack
()
uni
.
$mocpMessage
.
success
(
res
.
message
)
res
.
data
.
customFullName
=
customNameOpts
.
value
.
find
((
item
)
=>
item
.
value
==
formData
.
customName
)?.
label
.
split
(
'('
)[
0
]
||
''
res
.
data
.
customFullName
=
adminPickerRef
.
value
?.
getName
()
//更新详情
technologyEvaluationStore
.
setState
(
'details'
,
res
.
data
)
}
else
{
...
...
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