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
52f7f6b2
Commit
52f7f6b2
authored
May 21, 2024
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 调整
parent
0561260c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
13 deletions
+36
-13
src/main.js
+4
-1
src/pages/panel/appraisal-record/details.vue
+2
-1
src/pages/panel/appraisal-record/list.vue
+3
-2
src/utils/message.js
+8
-9
src/utils/tool.js
+19
-0
No files found.
src/main.js
View file @
52f7f6b2
import
{
createSSRApp
}
from
'vue'
import
App
from
'./App.vue'
import
pinia
from
'./store'
import
message
from
'@/utils/message'
import
*
as
message
from
'@/utils/message'
import
*
as
tool
from
'@/utils/tool'
// 引入字体
import
'@/static/font/iconfont.css'
//消息提示
uni
.
$message
=
message
//工具方法
uni
.
$tool
=
tool
export
function
createApp
()
{
const
app
=
createSSRApp
(
App
)
app
.
use
(
pinia
)
...
...
src/pages/panel/appraisal-record/details.vue
View file @
52f7f6b2
<
template
>
<global-page
:showNavbar=
"false"
>
<template
#
top
>
<global-navbar
:title=
"
details.appraisee !== '-1' ? details.appraisee : ''
"
>
<global-navbar
:title=
"
showData(details.appraisee)
"
>
<template
#
left
>
<uni-icons
type=
"left"
size=
"16"
@
tap=
"goBack"
></uni-icons>
</
template
>
...
...
@@ -71,6 +71,7 @@
import
{
onLoad
}
from
'@dcloudio/uni-app'
import
CardDetails
from
'./components/card-details.vue'
import
{
ref
}
from
'vue'
import
{
showData
}
from
'@/utils/tool'
const
details
=
ref
({
id
:
'1771004152946348034'
,
...
...
src/pages/panel/appraisal-record/list.vue
View file @
52f7f6b2
...
...
@@ -6,8 +6,8 @@
<view
class=
"item-title"
>
<view
class=
"desc"
>
<view
class=
"type"
>
{{
item
.
status
==
1
?
'OPEN'
:
'ClOSE'
}}
</view>
<view
class=
"txt"
>
{{
item
.
appraisee
!==
'-1'
?
item
.
appraisee
:
''
}}
</view>
<view
class=
"place"
>
{{
item
.
department
!==
'-1'
?
item
.
department
:
''
}}
</view>
<view
class=
"txt"
>
{{
showData
(
item
.
appraisee
)
}}
</view>
<view
class=
"place"
>
{{
showData
(
item
.
department
)
}}
</view>
</view>
<score-details
v-if=
"item.score > 0"
:type=
"item.eventType == 1 ? 'success' : 'warning'"
>
{{
item
.
score
}}
</score-details>
</view>
...
...
@@ -24,6 +24,7 @@
import
{
ref
}
from
'vue'
import
{
getRqmListApi
,
getRqmOptionsApi
}
from
'@/api/appraisal-record'
import
{
onLoad
}
from
'@dcloudio/uni-app'
import
{
showData
}
from
'@/utils/tool'
const
tabList
=
ref
([
{
name
:
'OPEN'
,
value
:
1
},
...
...
src/utils/message.js
View file @
52f7f6b2
// utils/message.js
export
default
{
showToast
(
msg
,
options
)
{
uni
.
showToast
({
title
:
msg
||
'操作失败'
,
icon
:
'none'
,
duration
:
2000
,
...
options
});
}
export
const
showToast
=
(
msg
,
options
)
=>
{
uni
.
showToast
({
title
:
msg
||
'操作失败'
,
icon
:
'none'
,
duration
:
2000
,
...
options
});
}
\ No newline at end of file
src/utils/tool.js
0 → 100644
View file @
52f7f6b2
// utils/tool.js
export
const
showData
=
(
data
)
=>
{
if
(
typeof
data
===
'undefined'
||
data
===
null
)
{
return
''
}
if
(
typeof
data
===
'string'
&&
data
.
trim
()
===
''
)
{
return
''
}
if
(
data
.
trim
()
===
'-1'
||
data
.
trim
()
===
-
1
)
{
return
''
}
if
(
Array
.
isArray
(
data
)
&&
data
.
length
===
0
)
{
return
''
}
if
(
typeof
data
===
'object'
&&
Object
.
keys
(
data
).
length
===
0
)
{
return
''
}
return
data
}
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