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
dfa7f786
Commit
dfa7f786
authored
May 24, 2024
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改调整
parent
52fbb4b0
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
255 additions
and
132 deletions
+255
-132
src/App.vue
+4
-4
src/components/global-picker/global-picker.vue
+14
-8
src/components/global-tabs/global-tabs.vue
+79
-0
src/components/global-upload/global-upload.vue
+28
-3
src/manifest.json
+6
-2
src/pages.json
+1
-1
src/pages/login/constants/index.compositions.js
+2
-1
src/pages/login/constants/index.functionals.js
+1
-0
src/pages/login/index.vue
+10
-10
src/pages/panel/appraisal-record/add.vue
+3
-12
src/pages/panel/appraisal-record/components/card-details.vue
+1
-1
src/pages/panel/appraisal-record/constants/edit.compositions.js
+43
-0
src/pages/panel/appraisal-record/constants/edit.functionals.js
+17
-0
src/pages/panel/appraisal-record/details.vue
+2
-6
src/pages/panel/appraisal-record/edit.vue
+21
-60
src/pages/panel/appraisal-record/list.vue
+5
-2
src/pages/panel/constants/panel-menu.scss
+1
-16
src/pages/panel/panel-menu.vue
+17
-6
No files found.
src/App.vue
View file @
dfa7f786
...
@@ -6,10 +6,10 @@ export default {
...
@@ -6,10 +6,10 @@ export default {
},
},
onShow
:
function
()
{
onShow
:
function
()
{
//退出登录
//退出登录
//
const userStore = useUserStore()
const
userStore
=
useUserStore
()
//
if (!userStore.token) {
if
(
!
userStore
.
token
)
{
//
userStore.handleLogOut()
userStore
.
handleLogOut
()
//
}
}
console
.
log
(
'App Show'
)
console
.
log
(
'App Show'
)
},
},
onHide
:
function
()
{
onHide
:
function
()
{
...
...
src/components/global-picker/global-picker.vue
View file @
dfa7f786
...
@@ -33,6 +33,11 @@ const ps = defineProps({
...
@@ -33,6 +33,11 @@ const ps = defineProps({
type
:
String
,
type
:
String
,
default
:
'selector'
default
:
'selector'
},
},
//显示为空的value值
emptyValue
:
{
type
:
[
String
,
Number
],
default
:
''
},
dictkey
:
{
dictkey
:
{
type
:
String
,
type
:
String
,
default
:
''
default
:
''
...
@@ -101,7 +106,7 @@ const getOptions = computed(() => {
...
@@ -101,7 +106,7 @@ const getOptions = computed(() => {
const
selectedValue
=
ref
(
''
)
//显示的内容
const
selectedValue
=
ref
(
''
)
//显示的内容
watch
(
watch
(
[()
=>
ps
.
modelValue
,
()
=>
ps
.
options
],
[()
=>
ps
.
modelValue
,
()
=>
ps
.
options
],
(
value
)
=>
{
()
=>
{
if
(
ps
.
mode
==
'selector'
)
{
if
(
ps
.
mode
==
'selector'
)
{
const
option
=
getOptions
.
value
.
find
((
option
)
=>
String
(
option
[
ps
.
valueField
])
===
String
(
ps
.
modelValue
))
const
option
=
getOptions
.
value
.
find
((
option
)
=>
String
(
option
[
ps
.
valueField
])
===
String
(
ps
.
modelValue
))
if
(
option
)
{
if
(
option
)
{
...
@@ -110,7 +115,7 @@ watch(
...
@@ -110,7 +115,7 @@ watch(
selectedValue
.
value
=
''
selectedValue
.
value
=
''
}
}
}
else
{
}
else
{
selectedValue
.
value
=
v
alue
selectedValue
.
value
=
ps
.
modelV
alue
}
}
},
},
{
immediate
:
true
}
{
immediate
:
true
}
...
@@ -123,12 +128,13 @@ const onChange = (event) => {
...
@@ -123,12 +128,13 @@ const onChange = (event) => {
if
(
ps
.
mode
==
'selector'
)
{
if
(
ps
.
mode
==
'selector'
)
{
const
index
=
event
.
detail
.
value
const
index
=
event
.
detail
.
value
selectedValue
.
value
=
getOptions
.
value
[
index
][
ps
.
labelField
]
selectedValue
.
value
=
getOptions
.
value
[
index
][
ps
.
labelField
]
es
(
'update:modelValue'
,
getOptions
.
value
[
index
][
ps
.
valueField
])
const
value
=
getOptions
.
value
[
index
][
ps
.
valueField
]
!==
''
?
getOptions
.
value
[
index
][
ps
.
valueField
]
:
ps
.
emptyValue
es
(
'change'
,
getOptions
.
value
[
index
][
ps
.
valueField
])
es
(
'update:modelValue'
,
value
)
es
(
'change'
,
value
)
}
else
{
}
else
{
selectedValue
.
value
=
String
(
Day
(
event
.
detail
.
value
).
valueOf
())
selectedValue
.
value
=
String
(
Day
(
event
.
detail
.
value
).
valueOf
())
es
(
'update:modelValue'
,
selectedValue
.
value
)
es
(
'update:modelValue'
,
selectedValue
.
value
||
ps
.
emptyValue
)
es
(
'change'
,
selectedValue
.
value
)
es
(
'change'
,
selectedValue
.
value
||
ps
.
emptyValue
)
}
}
}
}
const
getVal
=
computed
(()
=>
{
const
getVal
=
computed
(()
=>
{
...
@@ -147,8 +153,8 @@ const getPickerValue = computed(() => {
...
@@ -147,8 +153,8 @@ const getPickerValue = computed(() => {
//清空值
//清空值
const
clear
=
()
=>
{
const
clear
=
()
=>
{
selectedValue
.
value
=
''
selectedValue
.
value
=
''
es
(
'update:modelValue'
,
''
)
es
(
'update:modelValue'
,
ps
.
emptyValue
)
es
(
'change'
,
''
)
es
(
'change'
,
ps
.
emptyValue
)
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/components/global-tabs/global-tabs.vue
0 → 100644
View file @
dfa7f786
<
template
>
<up-tabs
:list=
"list"
:lineColor=
"lineColor"
:activeStyle=
"activeStyle"
:inactiveStyle=
"inactiveStyle"
:lineWidth=
"lineWidth"
:lineHeight=
"lineHeight"
:itemStyle=
"itemStyle"
:current=
"current"
:keyName=
"keyName"
@
click=
"handleClick"
@
change=
"handleChange"
>
<template
#
right
>
<slot
name=
"right"
></slot>
</
template
>
</up-tabs>
</template>
<
script
setup
>
const
es
=
defineEmits
([
'handleClick'
,
'handleChange'
])
const
ps
=
defineProps
({
list
:
{
type
:
Array
,
default
:
()
=>
[]
},
lineColor
:
{
type
:
String
,
default
:
'#165dff'
},
activeStyle
:
{
type
:
[
String
,
Object
],
default
:
()
=>
{
return
{
color
:
'#165dff'
}
}
},
inactiveStyle
:
{
type
:
[
String
,
Object
],
default
:
()
=>
{
return
{
color
:
'#000000'
}
}
},
lineWidth
:
{
type
:
[
Number
,
String
],
default
:
20
},
lineHeight
:
{
type
:
[
Number
,
String
],
default
:
3
},
itemStyle
:
{
type
:
[
String
,
Object
],
default
:
()
=>
{
return
{
height
:
'88rpx'
}
}
},
current
:
{
type
:
[
Number
,
String
],
default
:
0
},
keyName
:
{
type
:
String
,
default
:
'name'
}
})
const
handleClick
=
(
item
,
index
)
=>
{
es
(
'handleClick'
,
item
,
index
)
}
const
handleChange
=
(
tabItem
)
=>
{
es
(
'handleChange'
,
tabItem
)
}
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
src/components/global-upload/global-upload.vue
View file @
dfa7f786
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
<
script
setup
>
<
script
setup
>
import
{
computed
,
ref
,
watch
}
from
'vue'
import
{
computed
,
ref
,
watch
}
from
'vue'
import
{
cloneDeep
}
from
'lodash'
const
es
=
defineEmits
([
'handleUpload'
])
const
es
=
defineEmits
([
'handleUpload'
])
const
ps
=
defineProps
({
const
ps
=
defineProps
({
...
@@ -82,15 +83,23 @@ const afterRead = async (event) => {
...
@@ -82,15 +83,23 @@ const afterRead = async (event) => {
// const imgFile = new File([imgBlob], lists[i].name, { type: imgBlob.type })
// const imgFile = new File([imgBlob], lists[i].name, { type: imgBlob.type })
// let form = new FormData()
// let form = new FormData()
// form.append('file', imgFile)
// form.append('file', imgFile)
try
{
const
res
=
await
uploadFilePromise
(
lists
[
i
].
url
,
binary
)
const
res
=
await
uploadFilePromise
(
lists
[
i
].
url
,
binary
)
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
fileList
.
value
.
splice
(
fileListLen
,
1
,
{
fileList
.
value
.
splice
(
fileListLen
,
1
,
{
...
res
.
data
...
res
.
data
,
status
:
'success'
,
message
:
''
})
})
fileListLen
++
}
else
{
}
else
{
fileList
.
value
.
splice
(
fileListLen
,
1
)
uni
.
$message
.
showToast
(
res
.
message
||
'请求错误'
)
uni
.
$message
.
showToast
(
res
.
message
||
'请求错误'
)
}
}
}
catch
(
error
)
{
fileList
.
value
.
splice
(
fileListLen
,
1
)
uni
.
$message
.
showToast
(
'上传失败'
)
}
fileListLen
++
}
}
}
}
...
@@ -105,7 +114,19 @@ function arrayBufferToBinary(buffer) {
...
@@ -105,7 +114,19 @@ function arrayBufferToBinary(buffer) {
watch
(
watch
(
fileList
,
fileList
,
(
value
)
=>
{
(
value
)
=>
{
es
(
'handleUpload'
,
value
)
es
(
'handleUpload'
,
cloneDeep
(
value
)
.
filter
((
item
)
=>
{
return
item
.
status
!=
'uploading'
})
.
filter
((
item
)
=>
{
return
delete
item
.
status
})
.
filter
((
item
)
=>
{
return
delete
item
.
message
})
)
},
},
{
deep
:
true
}
{
deep
:
true
}
)
)
...
@@ -121,6 +142,10 @@ const uploadFilePromise = (url, binary) => {
...
@@ -121,6 +142,10 @@ const uploadFilePromise = (url, binary) => {
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
resolve
(
JSON
.
parse
(
res
.
data
))
resolve
(
JSON
.
parse
(
res
.
data
))
},
fail
:
(
res
)
=>
{
console
.
error
(
JSON
.
parse
(
res
.
data
))
reject
(
false
)
}
}
})
})
})
})
...
...
src/manifest.json
View file @
dfa7f786
...
@@ -42,9 +42,13 @@
...
@@ -42,9 +42,13 @@
"versionCode"
:
1001
"versionCode"
:
1001
},
},
/*
ios打包配置
*/
/*
ios打包配置
*/
"ios"
:
{},
"ios"
:
{
"dSYMs"
:
false
},
/*
SDK配置
*/
/*
SDK配置
*/
"sdkConfigs"
:
{}
"sdkConfigs"
:
{
"ad"
:
{}
}
}
}
},
},
/*
快应用特有相关
*/
/*
快应用特有相关
*/
...
...
src/pages.json
View file @
dfa7f786
...
@@ -120,7 +120,7 @@
...
@@ -120,7 +120,7 @@
},
},
"condition"
:
{
"condition"
:
{
//模式配置,仅开发期间生效
//模式配置,仅开发期间生效
"current"
:
0
,
//当前激活的模式(list
的索引项)
"current"
:
1
,
//当前激活的模式(list
的索引项)
"list"
:
[
"list"
:
[
{
{
"name"
:
"test"
,
//模式名称
"name"
:
"test"
,
//模式名称
...
...
src/pages/login/constants/index.compositions.js
View file @
dfa7f786
import
{
reactive
,
ref
}
from
"vue"
import
{
ref
,
reactive
}
from
'vue'
export
const
loginFormRef
=
ref
()
//表单数据
//表单数据
export
const
loginForm
=
reactive
({
export
const
loginForm
=
reactive
({
username
:
'devzj3'
,
username
:
'devzj3'
,
...
...
src/pages/login/constants/index.functionals.js
View file @
dfa7f786
import
{
loginCode
,
loginForm
}
from
'./index.compositions'
import
{
loginCode
,
loginForm
}
from
'./index.compositions'
import
{
getGifCaptchaApi
}
from
'@/api/user'
import
{
getGifCaptchaApi
}
from
'@/api/user'
//获取验证码
export
const
getGifCaptcha
=
async
()
=>
{
export
const
getGifCaptcha
=
async
()
=>
{
const
params
=
{
const
params
=
{
username
:
loginForm
.
username
username
:
loginForm
.
username
...
...
src/pages/login/index.vue
View file @
dfa7f786
...
@@ -36,13 +36,13 @@
...
@@ -36,13 +36,13 @@
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
{
ref
,
toRaw
,
watch
}
from
'vue'
import
{
loginApi
}
from
'@/api/user'
import
{
debounce
}
from
'lodash'
import
{
debounce
}
from
'lodash'
import
useUserStore
from
'@/store/user'
import
{
loginCode
,
loginForm
,
rules
,
loginFormRef
}
from
'./constants/index.compositions'
import
{
loginCode
,
loginForm
,
rules
}
from
'./constants/index.compositions'
import
{
getGifCaptcha
}
from
'./constants/index.functionals'
import
{
getGifCaptcha
}
from
'./constants/index.functionals'
import
{
onLoad
}
from
'@dcloudio/uni-app'
import
{
onLoad
}
from
'@dcloudio/uni-app'
import
{
ref
,
toRaw
,
watch
}
from
'vue'
import
useUserStore
from
'@/store/user'
import
{
loginApi
}
from
'@/api/user'
watch
(
watch
(
()
=>
loginForm
.
username
,
()
=>
loginForm
.
username
,
...
@@ -52,10 +52,14 @@ watch(
...
@@ -52,10 +52,14 @@ watch(
}
}
},
500
)
},
500
)
)
)
onLoad
(()
=>
{
loginForm
.
verifyCode
=
''
getGifCaptcha
()
})
//登录
//登录
const
userStore
=
useUserStore
()
const
loginFormRef
=
ref
()
const
loading
=
ref
(
false
)
const
loading
=
ref
(
false
)
const
userStore
=
useUserStore
()
const
handleLogin
=
async
()
=>
{
const
handleLogin
=
async
()
=>
{
await
loginFormRef
.
value
?.
validate
()
await
loginFormRef
.
value
?.
validate
()
loading
.
value
=
true
loading
.
value
=
true
...
@@ -67,10 +71,6 @@ const handleLogin = async () => {
...
@@ -67,10 +71,6 @@ const handleLogin = async () => {
uni
.
$message
.
showToast
(
res
.
message
)
uni
.
$message
.
showToast
(
res
.
message
)
}
}
}
}
onLoad
(()
=>
{
loginForm
.
verifyCode
=
''
getGifCaptcha
()
})
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
...
src/pages/panel/appraisal-record/add.vue
View file @
dfa7f786
...
@@ -3,10 +3,10 @@
...
@@ -3,10 +3,10 @@
<view
class=
"form"
>
<view
class=
"form"
>
<up-form
labelPosition=
"left"
labelWidth=
"auto"
>
<up-form
labelPosition=
"left"
labelWidth=
"auto"
>
<up-form-item
:label=
"formData.isDuty == 0 ? '公司值班经理' : '品质中心经理'"
:borderBottom=
"true"
>
<up-form-item
:label=
"formData.isDuty == 0 ? '公司值班经理' : '品质中心经理'"
:borderBottom=
"true"
>
<global-picker
pickAlign=
"right"
clearable
v-model=
"formData.mid"
:options=
"selectList"
></global-picker>
<global-picker
pickAlign=
"right"
clearable
v-model=
"formData.mid"
:options=
"selectList"
emptyValue=
"-1"
></global-picker>
</up-form-item>
</up-form-item>
<up-form-item
:label=
"formData.isDuty == 0 ? '公司值班经理意见' : '品质中心经理意见'"
:borderBottom=
"true"
>
<up-form-item
:label=
"formData.isDuty == 0 ? '公司值班经理意见' : '品质中心经理意见'"
:borderBottom=
"true"
>
<global-picker
pickAlign=
"right"
clearable
v-model=
"formData.opinionType"
dictkey=
"opinionType"
></global-picker>
<global-picker
pickAlign=
"right"
clearable
v-model=
"formData.opinionType"
dictkey=
"opinionType"
:emptyValue=
"-1"
></global-picker>
</up-form-item>
</up-form-item>
<up-form-item
<up-form-item
:label=
"formData.isDuty == 0 ? '公司值班经理意见描述' : '品质中心经理意见描述'"
:label=
"formData.isDuty == 0 ? '公司值班经理意见描述' : '品质中心经理意见描述'"
...
@@ -71,16 +71,7 @@ const handleCancel = () => {
...
@@ -71,16 +71,7 @@ const handleCancel = () => {
uni
.
navigateBack
()
uni
.
navigateBack
()
}
}
const
handleSave
=
async
()
=>
{
const
handleSave
=
async
()
=>
{
const
params
=
{
const
res
=
await
saveRqmOpinionApi
(
formData
,
{
loading
:
true
})
...
formData
}
if
(
!
params
.
mid
)
{
params
.
mid
=
-
1
}
if
(
!
params
.
opinionType
)
{
params
.
opinionType
=
-
1
}
const
res
=
await
saveRqmOpinionApi
(
params
,
{
loading
:
true
})
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
uni
.
navigateBack
()
uni
.
navigateBack
()
appraisalRecordStore
.
getRqmDetails
()
appraisalRecordStore
.
getRqmDetails
()
...
...
src/pages/panel/appraisal-record/components/card-details.vue
View file @
dfa7f786
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<text>
{{
title
}}
</text>
<text>
{{
title
}}
</text>
</view>
</view>
<view
class=
"right"
v-if=
"edit"
>
<view
class=
"right"
v-if=
"edit"
>
<global-button
type=
"text"
@
tap=
"handleAdd"
>
添加
</global-button>
<global-button
type=
"text"
@
tap=
"handleAdd"
>
{{
calendar
!=
-
1
?
'编辑'
:
'添加'
}}
</global-button>
</view>
</view>
</view>
</view>
<view
class=
"card-content"
>
<view
class=
"card-content"
>
...
...
src/pages/panel/appraisal-record/constants/edit.compositions.js
0 → 100644
View file @
dfa7f786
import
{
reactive
,
ref
}
from
'vue'
export
const
formRef
=
ref
()
export
const
fileList
=
ref
([])
// 校验规则
export
const
rules
=
reactive
({
eventTime
:
[
{
required
:
true
,
message
:
'请选择日期'
,
trigger
:
[
'blur'
,
'change'
]
}
]
})
// 表单数据
export
const
formData
=
reactive
({
id
:
''
,
ac
:
''
,
acOwn
:
''
,
acType
:
''
,
appealInfo
:
'-1'
,
appraisee
:
'-1'
,
department
:
'-1'
,
dmUid
:
'-1'
,
eventMsg
:
''
,
eventSource
:
''
,
eventTime
:
-
1
,
eventType
:
-
1
,
examineBasis
:
''
,
examineType
:
'-1'
,
onDutyUser
:
''
,
opinionMsg
:
''
,
opinionType
:
-
1
,
score
:
null
,
qmUid
:
''
,
qualityOpinionMsg
:
''
,
qualityOpinionType
:
-
1
,
status
:
''
,
emailSendTime
:
-
1
})
src/pages/panel/appraisal-record/constants/edit.functionals.js
0 → 100644
View file @
dfa7f786
import
{
getAcReduceListApi
}
from
'@/api/base'
import
{
fileList
,
formData
}
from
'./edit.compositions'
//切换机号
export
const
changeAc
=
async
()
=>
{
const
res
=
await
getAcReduceListApi
({
ac
:
formData
.
ac
},
{
loading
:
true
})
if
(
res
.
code
==
200
)
{
formData
.
acOwn
=
res
.
data
[
0
]?.
zop3
formData
.
acType
=
res
.
data
[
0
]?.
zstortgc
}
else
{
uni
.
$message
.
showToast
(
res
.
message
)
}
}
//获取文件内容
export
const
handleUpload
=
(
data
)
=>
{
fileList
.
value
=
data
}
src/pages/panel/appraisal-record/details.vue
View file @
dfa7f786
<
template
>
<
template
>
<global-page
:showNavbar=
"false"
>
<global-page
:showNavbar=
"false"
>
<template
#
top
>
<template
#
top
>
<global-navbar
:title=
"details?.appraiseeshowData || '暂无标题~'
"
>
<global-navbar
title=
"考核记录详情
"
>
<template
#
left
>
<template
#
left
>
<uni-icons
type=
"left"
size=
"16"
@
tap=
"goBack"
></uni-icons>
<uni-icons
type=
"left"
size=
"16"
@
tap=
"goBack"
></uni-icons>
</
template
>
</
template
>
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<view
class=
"details-body-top"
>
<view
class=
"details-body-top"
>
<view
class=
"left"
>
<view
class=
"left"
>
<global-icon
icon=
"mind-mapping"
></global-icon>
<global-icon
icon=
"mind-mapping"
></global-icon>
<text>
来源编号:{{ details.
acOwn
|| '暂无~' }}
</text>
<text>
来源编号:{{ details.
eventSource
|| '暂无~' }}
</text>
</view>
</view>
<view
class=
"right"
>
<view
class=
"right"
>
{{ details.department != '-1' ? details.department : '' }}
{{ details.department != '-1' ? details.department : '' }}
...
@@ -79,11 +79,8 @@
...
@@ -79,11 +79,8 @@
<card-details-item
label=
"品质中心经理意见描述"
:value=
"details.qmMsg || '-'"
></card-details-item>
<card-details-item
label=
"品质中心经理意见描述"
:value=
"details.qmMsg || '-'"
></card-details-item>
</card-details>
</card-details>
<card-details
type=
"appeal"
title=
"申诉状态"
titleIcon=
"email"
>
<card-details
type=
"appeal"
title=
"申诉状态"
titleIcon=
"email"
>
<
template
v-if=
"details.appealInfo != -1"
>
<view
class=
"appeal-status"
>
{{ useGetDictByValue('appealInfo', details.appealInfo) }}
</view>
<view
class=
"appeal-status"
>
{{ useGetDictByValue('appealInfo', details.appealInfo) }}
</view>
<image
:src=
"item.fileUrl"
v-for=
"(item, index) in getFileList"
:key=
"item.id"
@
tap=
"previewImage(index)"
/>
<image
:src=
"item.fileUrl"
v-for=
"(item, index) in getFileList"
:key=
"item.id"
@
tap=
"previewImage(index)"
/>
</
template
>
<global-empty
v-else
></global-empty>
</card-details>
</card-details>
</view>
</view>
</global-page>
</global-page>
...
@@ -105,7 +102,6 @@ onLoad(() => {
...
@@ -105,7 +102,6 @@ onLoad(() => {
appraisalRecordStore
.
setState
(
'id'
,
query
.
id
)
appraisalRecordStore
.
setState
(
'id'
,
query
.
id
)
appraisalRecordStore
.
getRqmDetails
()
appraisalRecordStore
.
getRqmDetails
()
})
})
//跳转
//跳转
const
goTo
=
()
=>
{
const
goTo
=
()
=>
{
uni
.
navigateTo
({
uni
.
navigateTo
({
...
...
src/pages/panel/appraisal-record/edit.vue
View file @
dfa7f786
...
@@ -7,10 +7,16 @@
...
@@ -7,10 +7,16 @@
<up-input
border=
"none"
inputAlign=
"right"
placeholder=
"请输入"
clearable
v-model=
"formData.eventSource"
></up-input>
<up-input
border=
"none"
inputAlign=
"right"
placeholder=
"请输入"
clearable
v-model=
"formData.eventSource"
></up-input>
</up-form-item>
</up-form-item>
<up-form-item
label=
"基地/职能部门"
:borderBottom=
"true"
>
<up-form-item
label=
"基地/职能部门"
:borderBottom=
"true"
>
<global-picker
pickAlign=
"right"
clearable
v-model=
"formData.department"
:options=
"department"
></global-picker>
<global-picker
pickAlign=
"right"
clearable
v-model=
"formData.department"
:options=
"department"
emptyValue=
"-1"
></global-picker>
</up-form-item>
</up-form-item>
<up-form-item
label=
"考核对象"
:borderBottom=
"true"
>
<up-form-item
label=
"考核对象"
:borderBottom=
"true"
>
<global-picker
pickAlign=
"right"
clearable
v-model=
"formData.appraisee"
:options=
"appraisee"
></global-picker>
<global-picker
pickAlign=
"right"
clearable
v-model=
"formData.appraisee"
:options=
"appraisee"
emptyValue=
"-1"
></global-picker>
</up-form-item>
</up-form-item>
<up-form-item
label=
"机号"
:borderBottom=
"true"
>
<up-form-item
label=
"机号"
:borderBottom=
"true"
>
<global-picker
<global-picker
...
@@ -28,7 +34,7 @@
...
@@ -28,7 +34,7 @@
<up-input
border=
"none"
inputAlign=
"right"
clearable
v-model=
"formData.acType"
disabled
disabledColor=
"#fff"
></up-input>
<up-input
border=
"none"
inputAlign=
"right"
clearable
v-model=
"formData.acType"
disabled
disabledColor=
"#fff"
></up-input>
</up-form-item>
</up-form-item>
<up-form-item
label=
"日期"
:borderBottom=
"true"
required
prop=
"eventTime"
>
<up-form-item
label=
"日期"
:borderBottom=
"true"
required
prop=
"eventTime"
>
<global-picker
pickAlign=
"right"
clearable
v-model=
"formData.eventTime"
mode=
"date"
></global-picker>
<global-picker
pickAlign=
"right"
clearable
v-model=
"formData.eventTime"
mode=
"date"
:emptyValue=
"-1"
></global-picker>
</up-form-item>
</up-form-item>
<up-form-item
label=
"事件描述"
:borderBottom=
"true"
labelPosition=
"top"
>
<up-form-item
label=
"事件描述"
:borderBottom=
"true"
labelPosition=
"top"
>
<up-textarea
<up-textarea
...
@@ -38,10 +44,16 @@
...
@@ -38,10 +44,16 @@
></up-textarea>
></up-textarea>
</up-form-item>
</up-form-item>
<up-form-item
label=
"事件类别"
:borderBottom=
"true"
>
<up-form-item
label=
"事件类别"
:borderBottom=
"true"
>
<global-picker
pickAlign=
"right"
clearable
v-model=
"formData.eventType"
dictkey=
"eventType"
></global-picker>
<global-picker
pickAlign=
"right"
clearable
v-model=
"formData.eventType"
dictkey=
"eventType"
:emptyValue=
"-1"
></global-picker>
</up-form-item>
</up-form-item>
<up-form-item
label=
"考核类型"
:borderBottom=
"true"
>
<up-form-item
label=
"考核类型"
:borderBottom=
"true"
>
<global-picker
pickAlign=
"right"
clearable
v-model=
"formData.examineType"
:options=
"examineType"
></global-picker>
<global-picker
pickAlign=
"right"
clearable
v-model=
"formData.examineType"
:options=
"examineType"
emptyValue=
"-1"
></global-picker>
</up-form-item>
</up-form-item>
<up-form-item
label=
"考核依据"
:borderBottom=
"true"
labelPosition=
"top"
>
<up-form-item
label=
"考核依据"
:borderBottom=
"true"
labelPosition=
"top"
>
<up-textarea
<up-textarea
...
@@ -111,29 +123,19 @@
...
@@ -111,29 +123,19 @@
</template>
</template>
<
script
setup
>
<
script
setup
>
import
{
reactive
,
ref
}
from
'vue'
import
CardDetails
from
'./components/card-details.vue'
import
CardDetails
from
'./components/card-details.vue'
import
CardDetailsItem
from
'./components/card-details-item.vue'
import
CardDetailsItem
from
'./components/card-details-item.vue'
import
{
onShow
}
from
'@dcloudio/uni-app'
import
{
onShow
}
from
'@dcloudio/uni-app'
import
useBaseStore
from
'@/store/base'
import
useBaseStore
from
'@/store/base'
import
{
useGetDictByValue
}
from
'@/components/global-picker/useDict'
import
{
useGetDictByValue
}
from
'@/components/global-picker/useDict'
import
{
rules
,
formData
,
fileList
,
formRef
}
from
'./constants/edit.compositions'
import
{
changeAc
,
handleUpload
}
from
'./constants/edit.functionals'
import
useAppraisalRecordStore
from
'@/store/appraisal-record'
import
useAppraisalRecordStore
from
'@/store/appraisal-record'
import
{
updateRqmDataApi
}
from
'@/api/appraisal-record'
import
{
getAcReduceListApi
}
from
'@/api/base'
import
{
storeToRefs
}
from
'pinia'
import
{
storeToRefs
}
from
'pinia'
import
{
updateRqmDataApi
}
from
'@/api/appraisal-record'
const
appraisalRecordStore
=
useAppraisalRecordStore
()
const
appraisalRecordStore
=
useAppraisalRecordStore
()
const
{
details
,
getFileList
}
=
storeToRefs
(
appraisalRecordStore
)
const
{
details
,
getFileList
}
=
storeToRefs
(
appraisalRecordStore
)
// 校验规则
const
rules
=
reactive
({
eventTime
:
[
{
required
:
true
,
message
:
'请选择日期'
,
trigger
:
[
'blur'
,
'change'
]
}
]
})
//获取下拉框选项
//获取下拉框选项
const
{
const
{
selectList
:
{
deviceNumSelect
}
selectList
:
{
deviceNumSelect
}
...
@@ -141,33 +143,7 @@ const {
...
@@ -141,33 +143,7 @@ const {
const
{
const
{
selectList
:
{
appraisee
,
department
,
examineType
}
selectList
:
{
appraisee
,
department
,
examineType
}
}
=
useAppraisalRecordStore
()
}
=
useAppraisalRecordStore
()
// 表单数据
// 页面初始化
const
formData
=
reactive
({
id
:
''
,
ac
:
''
,
acOwn
:
''
,
acType
:
''
,
appealInfo
:
'-1'
,
appraisee
:
'-1'
,
department
:
'-1'
,
dmUid
:
'-1'
,
eventMsg
:
''
,
eventSource
:
''
,
eventTime
:
-
1
,
eventType
:
-
1
,
examineBasis
:
''
,
examineType
:
'-1'
,
onDutyUser
:
''
,
opinionMsg
:
''
,
opinionType
:
-
1
,
score
:
null
,
qmUid
:
''
,
qualityOpinionMsg
:
''
,
qualityOpinionType
:
-
1
,
status
:
''
,
emailSendTime
:
-
1
})
const
fileList
=
ref
([])
onShow
(()
=>
{
onShow
(()
=>
{
formData
.
id
=
details
.
value
.
id
formData
.
id
=
details
.
value
.
id
formData
.
ac
=
details
.
value
.
ac
formData
.
ac
=
details
.
value
.
ac
...
@@ -196,7 +172,6 @@ onShow(() => {
...
@@ -196,7 +172,6 @@ onShow(() => {
fileList
.
value
=
getFileList
.
value
fileList
.
value
=
getFileList
.
value
})
})
//提交表单
//提交表单
const
formRef
=
ref
()
const
handleSubmit
=
async
()
=>
{
const
handleSubmit
=
async
()
=>
{
await
formRef
.
value
?.
validate
()
await
formRef
.
value
?.
validate
()
const
params
=
{
...
formData
,
file
:
JSON
.
stringify
(
fileList
.
value
)
}
const
params
=
{
...
formData
,
file
:
JSON
.
stringify
(
fileList
.
value
)
}
...
@@ -227,20 +202,6 @@ const handleAdd = (isDuty) => {
...
@@ -227,20 +202,6 @@ const handleAdd = (isDuty) => {
}
}
})
})
}
}
//获取文件内容
const
handleUpload
=
(
data
)
=>
{
fileList
.
value
=
data
}
//切换机号
const
changeAc
=
async
()
=>
{
const
res
=
await
getAcReduceListApi
({
ac
:
formData
.
ac
},
{
loading
:
true
})
if
(
res
.
code
==
200
)
{
formData
.
acOwn
=
res
.
data
[
0
]?.
zop3
formData
.
acType
=
res
.
data
[
0
]?.
zstortgc
}
else
{
uni
.
$message
.
showToast
(
res
.
message
)
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.content
{
.content
{
...
...
src/pages/panel/appraisal-record/list.vue
View file @
dfa7f786
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
</view>
</view>
<global-score
v-if=
"item.score != -1"
:type=
"item.eventType == 1 ? 'success' : 'warning'"
:count=
"item.score"
></global-score>
<global-score
v-if=
"item.score != -1"
:type=
"item.eventType == 1 ? 'success' : 'warning'"
:count=
"item.score"
></global-score>
</view>
</view>
<view
class=
"item-content"
>
<view
class=
"item-content
u-line-3
"
>
{{
item
.
eventMsg
||
'暂无内容~'
}}
{{
item
.
eventMsg
||
'暂无内容~'
}}
</view>
</view>
</view>
</view>
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<
script
setup
>
<
script
setup
>
import
{
ref
}
from
'vue'
import
{
ref
}
from
'vue'
import
{
getRqmListApi
}
from
'@/api/appraisal-record'
import
{
getRqmListApi
}
from
'@/api/appraisal-record'
import
{
onLoad
}
from
'@dcloudio/uni-app'
import
{
onLoad
,
onUnload
}
from
'@dcloudio/uni-app'
import
useAppraisalRecordStore
from
'@/store/appraisal-record'
import
useAppraisalRecordStore
from
'@/store/appraisal-record'
const
tabList
=
ref
([
const
tabList
=
ref
([
...
@@ -47,6 +47,9 @@ const paging = ref()
...
@@ -47,6 +47,9 @@ const paging = ref()
uni
.
$on
(
'appraisalRecordReload'
,
()
=>
{
uni
.
$on
(
'appraisalRecordReload'
,
()
=>
{
paging
.
value
?.
reload
()
paging
.
value
?.
reload
()
})
})
onUnload
(()
=>
{
uni
.
$off
(
'appraisalRecordReload'
)
})
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
'./constants/list.scss'
;
@import
'./constants/list.scss'
;
...
...
src/pages/panel/constants/panel-menu.scss
View file @
dfa7f786
.content
{
.content
{
border-radius
:
16rpx
16rpx
0
0
;
border-radius
:
16rpx
16rpx
0
0
;
background
:
#fff
;
background
:
#fff
;
padding-top
:
32
rpx
;
padding-top
:
5
rpx
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
margin
:
0
32rpx
;
margin
:
0
32rpx
;
.tab-nav
{
display
:
flex
;
padding
:
0
32rpx
;
&
-item
{
color
:
rgba
(
0
,
0
,
0
,
0
.6
);
position
:
relative
;
margin-right
:
56rpx
;
padding-bottom
:
12rpx
;
border-bottom
:
4rpx
solid
#fff
;
&
.active
{
color
:
#165dff
;
border-bottom
:
4rpx
solid
#165dff
;
}
}
}
.tab-content
{
.tab-content
{
margin-top
:
36rpx
;
margin-top
:
36rpx
;
flex
:
auto
;
flex
:
auto
;
...
...
src/pages/panel/panel-menu.vue
View file @
dfa7f786
<
template
>
<
template
>
<view
class=
"content"
:style=
"
{ height: `calc(100vh - 386rpx - ${safeAreaInsets?.top + 'px'})` }">
<view
class=
"content"
:style=
"
{ height: `calc(100vh - 386rpx - ${safeAreaInsets?.top + 'px'})` }">
<view
class=
"tab-nav"
>
<view
class=
"tab-nav"
>
<template
v-for=
"(item, index) in tabNav"
:key=
"index"
>
<global-tabs
:list=
"tabNav"
@
handleClick=
"handleClick"
></global-tabs>
<view
class=
"tab-nav-item"
:class=
"
{ active: activeIndex == index ? true : false }" @tap="activeIndex = index">
{{
item
}}
</view>
</
template
>
</view>
</view>
<scroll-view
class=
"tab-content"
scroll-y=
"true"
>
<scroll-view
class=
"tab-content"
scroll-y=
"true"
>
<view
class=
"tab-content-item"
v-if=
"activeIndex == 0"
>
<view
class=
"tab-content-item"
v-if=
"activeIndex == 0"
>
<view
class=
"menu-list"
>
<view
class=
"menu-list"
>
<menu-item
class=
"menu-item"
v-for=
"item in userStore.getHomeMenuList"
:data=
"item"
:key=
"item.id"
@
tap=
"goTo(item.url)"
></menu-item>
<menu-item
class=
"menu-item"
v-for=
"item in userStore.getHomeMenuList"
:data=
"item"
:key=
"item.id"
@
tap=
"goTo(item.url)"
></menu-item>
<menu-item
class=
"menu-item"
:data=
"userStore.allMenuItem"
@
tap=
"goAppCenter"
></menu-item>
<menu-item
class=
"menu-item"
:data=
"userStore.allMenuItem"
@
tap=
"goAppCenter"
></menu-item>
</view>
</view>
</view>
</view>
...
@@ -36,11 +40,18 @@ const userStore = useUserStore()
...
@@ -36,11 +40,18 @@ const userStore = useUserStore()
// 获取屏幕边界到安全区域距离
// 获取屏幕边界到安全区域距离
const
{
safeAreaInsets
}
=
uni
.
getSystemInfoSync
()
const
{
safeAreaInsets
}
=
uni
.
getSystemInfoSync
()
//分类
//分类
const
tabNav
=
ref
([
'常用'
,
'分组'
])
const
activeIndex
=
ref
(
0
)
const
activeIndex
=
ref
(
0
)
const
tabNav
=
ref
([{
name
:
'常用'
},
{
name
:
'分组'
}])
const
handleClick
=
(
_
,
index
)
=>
{
activeIndex
.
value
=
index
}
//跳转
//跳转
const
goTo
=
(
url
)
=>
{
const
goTo
=
(
url
)
=>
{
url
&&
uni
.
navigateTo
({
url
})
if
(
url
)
{
uni
.
navigateTo
({
url
})
}
else
{
uni
.
$message
.
showToast
(
'暂未开放!'
)
}
}
}
//跳转应用中心
//跳转应用中心
const
goAppCenter
=
()
=>
{
const
goAppCenter
=
()
=>
{
...
...
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