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
2cdf10ee
Commit
2cdf10ee
authored
Jul 16, 2024
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修复问题
parent
d5f365dc
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
87 additions
and
25 deletions
+87
-25
src/mocp/api/assign-work.js
+9
-0
src/mocp/store/assign-work.js
+11
-14
src/pages/modules/mocp/panel/assign-work/components/company-popup.vue
+31
-4
src/pages/modules/mocp/panel/assign-work/details.vue
+7
-2
src/pages/modules/mocp/panel/assign-work/list.vue
+2
-2
src/pages/modules/mocp/panel/my-toDo/components/appraisal-record-list.vue
+6
-0
src/pages/modules/mocp/panel/my-toDo/components/assign-work-list.vue
+5
-1
src/pages/modules/mocp/panel/my-toDo/components/move-decision-list.vue
+8
-1
src/pages/modules/mocp/panel/my-toDo/components/technology-evaluation-list.vue
+8
-1
No files found.
src/mocp/api/assign-work.js
View file @
2cdf10ee
...
@@ -80,3 +80,12 @@ export const savaFollowUpFeedbackApi = (data, config) => {
...
@@ -80,3 +80,12 @@ export const savaFollowUpFeedbackApi = (data, config) => {
config
config
})
})
}
}
export
const
getEnetOrgTreeApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/system/getEnetOrgTree'
,
data
,
config
})
}
src/mocp/store/assign-work.js
View file @
2cdf10ee
import
{
getArrangeWorkDetailApi
,
getSeatUnitApi
}
from
'mocp/api/assign-work'
import
{
getArrangeWorkDetailApi
,
get
EnetOrgTreeApi
,
get
SeatUnitApi
}
from
'mocp/api/assign-work'
import
{
defineStore
}
from
'pinia'
import
{
defineStore
}
from
'pinia'
import
useUserStore
from
'mocp/store/user'
import
useUserStore
from
'mocp/store/user'
...
@@ -26,7 +26,8 @@ const useAssignWorkStore = defineStore('assignWork', {
...
@@ -26,7 +26,8 @@ const useAssignWorkStore = defineStore('assignWork', {
arrangeWorkExtendList
:
[],
//责任单位列表
arrangeWorkExtendList
:
[],
//责任单位列表
arrangeWorkExtend
:
undefined
,
//当前选中的责任单位
arrangeWorkExtend
:
undefined
,
//当前选中的责任单位
selectList
:
{
selectList
:
{
seatList
:
[]
//管理席位
seatList
:
[],
//管理席位
EnetOrgTree
:
[]
//获取易网部门树形列表
}
}
}
}
},
},
...
@@ -109,8 +110,14 @@ const useAssignWorkStore = defineStore('assignWork', {
...
@@ -109,8 +110,14 @@ const useAssignWorkStore = defineStore('assignWork', {
this
.
selectList
.
seatList
=
res
.
data
.
list
||
[]
this
.
selectList
.
seatList
=
res
.
data
.
list
||
[]
}
}
},
},
async
getEnetOrgTree
()
{
const
res
=
await
getEnetOrgTreeApi
({})
if
(
res
.
code
==
200
)
{
this
.
selectList
.
EnetOrgTree
=
res
.
data
||
[]
}
},
async
getArrangeWorkDetail
()
{
async
getArrangeWorkDetail
()
{
const
res
=
await
getArrangeWorkDetailApi
({
id
:
this
.
id
}
,
{
loading
:
true
}
)
const
res
=
await
getArrangeWorkDetailApi
({
id
:
this
.
id
})
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
details
=
res
.
data
this
.
details
=
res
.
data
this
.
arrangeWorkExtendList
=
res
.
data
.
arrangeWorkExtendList
||
[]
this
.
arrangeWorkExtendList
=
res
.
data
.
arrangeWorkExtendList
||
[]
...
@@ -134,16 +141,6 @@ const useAssignWorkStore = defineStore('assignWork', {
...
@@ -134,16 +141,6 @@ const useAssignWorkStore = defineStore('assignWork', {
}
}
},
},
// 配置持久化
// 配置持久化
persist
:
{
persist
:
false
// 调整为兼容多端的API
storage
:
{
setItem
(
key
,
value
)
{
uni
.
setStorageSync
(
key
,
value
)
},
getItem
(
key
)
{
return
uni
.
getStorageSync
(
key
)
}
}
}
})
})
export
default
useAssignWorkStore
export
default
useAssignWorkStore
src/pages/modules/mocp/panel/assign-work/components/company-popup.vue
View file @
2cdf10ee
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<global-popup
v-model=
"showPopup"
mode=
"right"
:width=
"580"
background=
"#F7F8FA"
title=
"选择责任单位"
:round=
"32"
>
<global-popup
v-model=
"showPopup"
mode=
"right"
:width=
"580"
background=
"#F7F8FA"
title=
"选择责任单位"
:round=
"32"
>
<view
class=
"list"
>
<view
class=
"list"
>
<view
class=
"item"
v-for=
"item in arrangeWorkExtendList"
:key=
"item.id"
@
tap=
"handleClick(item)"
>
<view
class=
"item"
v-for=
"item in arrangeWorkExtendList"
:key=
"item.id"
@
tap=
"handleClick(item)"
>
{{
item
.
companyFullName
}}
{{
getCompanyName
(
item
)
}}
</view>
</view>
</view>
</view>
</global-popup>
</global-popup>
...
@@ -14,8 +14,7 @@ import useAssignWorkStore from 'mocp/store/assign-work'
...
@@ -14,8 +14,7 @@ import useAssignWorkStore from 'mocp/store/assign-work'
import
{
storeToRefs
}
from
'pinia'
import
{
storeToRefs
}
from
'pinia'
const
assignWorkStore
=
useAssignWorkStore
()
const
assignWorkStore
=
useAssignWorkStore
()
const
{
arrangeWorkExtendList
}
=
storeToRefs
(
assignWorkStore
)
const
{
arrangeWorkExtendList
,
details
,
selectList
}
=
storeToRefs
(
assignWorkStore
)
const
showPopup
=
ref
(
false
)
const
showPopup
=
ref
(
false
)
const
open
=
()
=>
{
const
open
=
()
=>
{
showPopup
.
value
=
true
showPopup
.
value
=
true
...
@@ -24,7 +23,35 @@ const open = () => {
...
@@ -24,7 +23,35 @@ const open = () => {
const
handleClick
=
(
row
)
=>
{
const
handleClick
=
(
row
)
=>
{
showPopup
.
value
=
false
showPopup
.
value
=
false
assignWorkStore
.
setState
(
'arrangeWorkExtend'
,
row
)
assignWorkStore
.
setState
(
'arrangeWorkExtend'
,
row
)
uni
.
$mocpMessage
.
success
(
'已切换成'
+
row
.
companyFullName
)
uni
.
$mocpMessage
.
success
(
'已切换成'
+
getCompanyName
(
row
))
}
//递归查找责任单位名称
const
findRelatedLabelOfEnetOrg
=
(
items
,
id
)
=>
{
let
res
=
''
for
(
const
item
of
items
)
{
if
(
item
.
nodeId
==
id
)
{
res
=
item
.
fullName
break
}
if
(
Array
.
isArray
(
item
.
nodeList
)
&&
item
.
nodeList
.
length
>
0
)
{
res
=
findRelatedLabelOfEnetOrg
(
item
.
nodeList
,
id
)
if
(
res
)
{
break
}
}
}
return
res
}
//去除前缀
const
removeText
=
(
str
)
=>
{
return
str
.
replace
(
'海航航空技术有限公司-'
,
''
)
}
const
getCompanyName
=
(
v
)
=>
{
return
removeText
(
details
.
value
.
tag
&&
details
.
value
.
tag
*
1
?
findRelatedLabelOfEnetOrg
(
selectList
.
value
.
EnetOrgTree
,
v
.
company
)
:
findRelatedLabelOfEnetOrg
(
selectList
.
value
.
EnetOrgTree
,
v
.
company
.
slice
(
0
,
-
1
))
)
}
}
defineExpose
({
defineExpose
({
open
open
...
...
src/pages/modules/mocp/panel/assign-work/details.vue
View file @
2cdf10ee
...
@@ -200,9 +200,14 @@ const baseStore = useBaseStore()
...
@@ -200,9 +200,14 @@ const baseStore = useBaseStore()
const
query
=
defineProps
([
'id'
])
const
query
=
defineProps
([
'id'
])
const
assignWorkStore
=
useAssignWorkStore
()
const
assignWorkStore
=
useAssignWorkStore
()
const
{
details
,
arrangeWorkExtendList
,
arrangeWorkExtend
}
=
storeToRefs
(
assignWorkStore
)
const
{
details
,
arrangeWorkExtendList
,
arrangeWorkExtend
}
=
storeToRefs
(
assignWorkStore
)
onLoad
(()
=>
{
onLoad
(
async
()
=>
{
assignWorkStore
.
setState
(
'id'
,
query
.
id
)
assignWorkStore
.
setState
(
'id'
,
query
.
id
)
assignWorkStore
.
getArrangeWorkDetail
()
uni
.
showLoading
({
title
:
'加载中...'
,
mask
:
true
})
await
Promise
.
all
([
assignWorkStore
.
getArrangeWorkDetail
(),
assignWorkStore
.
getEnetOrgTree
()])
uni
.
hideLoading
()
})
})
//责任公司弹框
//责任公司弹框
const
companyPopupRef
=
ref
()
const
companyPopupRef
=
ref
()
...
...
src/pages/modules/mocp/panel/assign-work/list.vue
View file @
2cdf10ee
...
@@ -50,14 +50,14 @@ import useBaseStore from 'mocp/store/base'
...
@@ -50,14 +50,14 @@ import useBaseStore from 'mocp/store/base'
import
{
timeStampFormat
}
from
'mocp/utils/tool'
import
{
timeStampFormat
}
from
'mocp/utils/tool'
import
{
getArrangeWorkListApi
}
from
'mocp/api/assign-work'
import
{
getArrangeWorkListApi
}
from
'mocp/api/assign-work'
import
useAssignWorkStore
from
'mocp/store/assign-work'
import
useAssignWorkStore
from
'mocp/store/assign-work'
import
{
on
Load
,
onUnload
}
from
'@dcloudio/uni-app'
import
{
on
Show
,
onUnload
}
from
'@dcloudio/uni-app'
import
{
ref
}
from
'vue'
import
{
ref
}
from
'vue'
import
{
storeToRefs
}
from
'pinia'
import
{
storeToRefs
}
from
'pinia'
const
baseStore
=
useBaseStore
()
const
baseStore
=
useBaseStore
()
//加载下拉框数据
//加载下拉框数据
const
assignWorkStore
=
useAssignWorkStore
()
const
assignWorkStore
=
useAssignWorkStore
()
on
Load
(()
=>
{
on
Show
(()
=>
{
assignWorkStore
.
getSeatUnit
()
assignWorkStore
.
getSeatUnit
()
}
)
}
)
//跳转
//跳转
...
...
src/pages/modules/mocp/panel/my-toDo/components/appraisal-record-list.vue
View file @
2cdf10ee
...
@@ -39,5 +39,11 @@ const ps = defineProps({
...
@@ -39,5 +39,11 @@ const ps = defineProps({
default
:
''
default
:
''
}
}
})
})
//跳转
const
goDetails
=
(
data
)
=>
{
uni
.
$mocpJump
.
navigateTo
(
'/panel/appraisal-record/details'
,
{
id
:
data
.
id
})
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
<
style
lang=
"scss"
scoped
></
style
>
src/pages/modules/mocp/panel/my-toDo/components/assign-work-list.vue
View file @
2cdf10ee
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
auto
auto
>
>
<template
#="
{ dataList }">
<template
#="
{ dataList }">
<view
class=
"item"
v-for=
"item in dataList"
:key=
"item.id"
>
<view
class=
"item"
v-for=
"item in dataList"
:key=
"item.id"
@
tap=
"goDetails(item)"
>
<view
class=
"item-title"
>
<view
class=
"item-title"
>
<view
class=
"left"
>
<view
class=
"left"
>
<custom-state
:value=
"item.state == 1 ? 'OPEN' : 'CLOSE'"
></custom-state>
<custom-state
:value=
"item.state == 1 ? 'OPEN' : 'CLOSE'"
></custom-state>
...
@@ -55,5 +55,9 @@ const ps = defineProps({
...
@@ -55,5 +55,9 @@ const ps = defineProps({
default
:
''
default
:
''
}
}
}
)
}
)
const
goDetails
=
(
data
)
=>
{
uni
.
$mocpJump
.
navigateTo
(
'/panel/assign-work/details'
,
{
id
:
data
.
id
}
)
}
<
/script
>
<
/script
>
<
style
lang
=
"scss"
scoped
><
/style
>
<
style
lang
=
"scss"
scoped
><
/style
>
src/pages/modules/mocp/panel/my-toDo/components/move-decision-list.vue
View file @
2cdf10ee
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
auto
auto
>
>
<template
#="
{ dataList }">
<template
#="
{ dataList }">
<view
class=
"item"
v-for=
"item in dataList"
:key=
"item.id"
>
<view
class=
"item"
v-for=
"item in dataList"
:key=
"item.id"
@
tap=
"goDetails(item)"
>
<view
class=
"item-title"
>
<view
class=
"item-title"
>
<view
class=
"left"
>
<view
class=
"left"
>
<custom-state
:value=
"useGetDictByValue('md_state', item.state)"
></custom-state>
<custom-state
:value=
"useGetDictByValue('md_state', item.state)"
></custom-state>
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
import
{
timeStampFormat
}
from
'mocp/utils/tool'
import
{
timeStampFormat
}
from
'mocp/utils/tool'
import
{
useGetDictByValue
}
from
'mocp/hooks/use-dict/useDict'
import
{
useGetDictByValue
}
from
'mocp/hooks/use-dict/useDict'
import
{
getDecisionApi
}
from
'mocp/api/move-decision'
import
{
getDecisionApi
}
from
'mocp/api/move-decision'
import
useMoveDecisionStore
from
'mocp/store/move-decision'
const
ps
=
defineProps
({
const
ps
=
defineProps
({
height
:
{
height
:
{
...
@@ -50,5 +51,11 @@ const ps = defineProps({
...
@@ -50,5 +51,11 @@ const ps = defineProps({
default
:
''
default
:
''
}
}
}
)
}
)
const
moveDecisionStore
=
useMoveDecisionStore
()
const
goDetails
=
(
data
)
=>
{
uni
.
$mocpJump
.
navigateTo
(
'/panel/move-decision/details'
,
{
id
:
data
.
id
}
).
then
(()
=>
{
moveDecisionStore
.
setState
(
'details'
,
data
)
}
)
}
<
/script
>
<
/script
>
<
style
lang
=
"scss"
scoped
><
/style
>
<
style
lang
=
"scss"
scoped
><
/style
>
src/pages/modules/mocp/panel/my-toDo/components/technology-evaluation-list.vue
View file @
2cdf10ee
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
auto
auto
>
>
<template
#="
{ dataList }">
<template
#="
{ dataList }">
<view
class=
"item"
v-for=
"item in dataList"
:key=
"item.id"
>
<view
class=
"item"
v-for=
"item in dataList"
:key=
"item.id"
@
tap=
"goDetails(item)"
>
<view
class=
"item-title"
>
<view
class=
"item-title"
>
<view
class=
"left"
>
<view
class=
"left"
>
<custom-state
:value=
"useGetDictByValue('te_state', item.state)"
></custom-state>
<custom-state
:value=
"useGetDictByValue('te_state', item.state)"
></custom-state>
...
@@ -47,6 +47,7 @@ import useBaseStore from 'mocp/store/base'
...
@@ -47,6 +47,7 @@ import useBaseStore from 'mocp/store/base'
import
{
useGetDictByValue
}
from
'mocp/hooks/use-dict/useDict'
import
{
useGetDictByValue
}
from
'mocp/hooks/use-dict/useDict'
import
Day
from
'mocp/utils/dayjs'
import
Day
from
'mocp/utils/dayjs'
import
{
getTechnicalEvaluationApi
}
from
'mocp/api/technology-evaluation'
import
{
getTechnicalEvaluationApi
}
from
'mocp/api/technology-evaluation'
import
useTechnologyEvaluationStore
from
'mocp/store/technology-evaluation'
const
baseStore
=
useBaseStore
()
const
baseStore
=
useBaseStore
()
const
ps
=
defineProps
({
const
ps
=
defineProps
({
...
@@ -55,5 +56,11 @@ const ps = defineProps({
...
@@ -55,5 +56,11 @@ const ps = defineProps({
default
:
''
default
:
''
}
}
}
)
}
)
const
technologyEvaluationStore
=
useTechnologyEvaluationStore
()
const
goDetails
=
(
data
)
=>
{
uni
.
$mocpJump
.
navigateTo
(
'/panel/technology-evaluation/details'
,
{
id
:
data
.
id
}
).
then
(()
=>
{
technologyEvaluationStore
.
setState
(
'details'
,
data
)
}
)
}
<
/script
>
<
/script
>
<
style
lang
=
"scss"
scoped
><
/style
>
<
style
lang
=
"scss"
scoped
><
/style
>
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