Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
E
east-nanjing-new
Project
Project
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
郭铭瑶
east-nanjing-new
Commits
d0d62fa9
Commit
d0d62fa9
authored
Apr 19, 2021
by
程卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
热词更新
parent
f63552e9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
76 deletions
+40
-76
index.ts
src/store/index.ts
+1
-1
mutations.ts
src/store/mutations.ts
+1
-1
demand.vue
src/view/right/demand.vue
+17
-52
key-task.vue
src/view/right/key-task.vue
+21
-22
No files found.
src/store/index.ts
View file @
d0d62fa9
...
@@ -115,7 +115,7 @@ export interface GlobalStateProps {
...
@@ -115,7 +115,7 @@ export interface GlobalStateProps {
todayCase
:
{
[
key
:
string
]:
number
}
todayCase
:
{
[
key
:
string
]:
number
}
stageCase
:
{
[
key
:
string
]:
number
}
stageCase
:
{
[
key
:
string
]:
number
}
workstationKind
:
any
[]
workstationKind
:
any
[]
workstationKindPiEData
:
{
[
key
:
string
]:
any
}
workstationKindPiEData
:
{
[
key
:
string
]:
number
}
trackEvent
:
any
[]
trackEvent
:
any
[]
analysisRank
:
Partial
<
DutyDataProp
>
analysisRank
:
Partial
<
DutyDataProp
>
moreHappenAddr
:
Partial
<
DutyDataProp
>
moreHappenAddr
:
Partial
<
DutyDataProp
>
...
...
src/store/mutations.ts
View file @
d0d62fa9
...
@@ -227,7 +227,7 @@ export default {
...
@@ -227,7 +227,7 @@ export default {
},
},
SET_WORKSTATION_PIEDATA
(
SET_WORKSTATION_PIEDATA
(
state
:
GlobalStateProps
,
state
:
GlobalStateProps
,
data
:
{
[
key
:
string
]:
any
}
data
:
{
[
key
:
string
]:
number
}
):
void
{
):
void
{
state
.
workstationKindPiEData
=
data
state
.
workstationKindPiEData
=
data
},
},
...
...
src/view/right/demand.vue
View file @
d0d62fa9
...
@@ -85,9 +85,6 @@ export default defineComponent({
...
@@ -85,9 +85,6 @@ export default defineComponent({
const
workstationKind
=
computed
(()
=>
store
.
state
.
workstationKind
)
const
workstationKind
=
computed
(()
=>
store
.
state
.
workstationKind
)
const
pieDatamodel
=
computed
(()
=>
store
.
state
.
workstationKindPiEData
)
const
pieDatamodel
=
computed
(()
=>
store
.
state
.
workstationKindPiEData
)
const
trackEvent
=
computed
(()
=>
store
.
state
.
trackEvent
)
const
trackEvent
=
computed
(()
=>
store
.
state
.
trackEvent
)
// console.log(moment(new Date()).format('YYYY-MM-DD'))
const
fontSize
=
computed
(()
=>
Math
.
floor
((
screen
.
height
*
1.6
)
/
100
))
const
fontSize
=
computed
(()
=>
Math
.
floor
((
screen
.
height
*
1.6
)
/
100
))
const
showChart
=
computed
(()
=>
store
.
state
.
curTheme
===
'manage'
)
const
showChart
=
computed
(()
=>
store
.
state
.
curTheme
===
'manage'
)
const
summary
=
computed
(()
=>
{
const
summary
=
computed
(()
=>
{
...
@@ -206,24 +203,35 @@ export default defineComponent({
...
@@ -206,24 +203,35 @@ export default defineComponent({
})),
})),
})
})
const
pieData
=
computed
(()
=>
{
const
pieData
=
computed
(()
=>
{
console
.
log
(
pieDatamodel
.
value
)
return
[
return
[
{
{
name
:
'第一工作站'
,
name
:
'第一工作站'
,
value
:
8
,
value
:
parseInt
(
(
pieDatamodel
.
value
.
oneDisposalNum
/
pieDatamodel
.
value
.
oneNum
)
*
100
)
||
0
,
num
:
pieDatamodel
.
value
.
oneNum
,
num
:
pieDatamodel
.
value
.
oneNum
,
color
:
'#47B3FF'
,
color
:
'#47B3FF'
,
},
},
{
{
name
:
'第二工作站'
,
name
:
'第二工作站'
,
value
:
9
,
value
:
parseInt
(
(
pieDatamodel
.
value
.
twoDisposalNum
/
pieDatamodel
.
value
.
twoNum
)
*
100
)
||
0
,
num
:
pieDatamodel
.
value
.
twoNum
,
num
:
pieDatamodel
.
value
.
twoNum
,
color
:
'#FF9D27'
,
color
:
'#FF9D27'
,
},
},
{
{
name
:
'第三工作站'
,
name
:
'第三工作站'
,
value
:
8
,
value
:
parseInt
(
(
pieDatamodel
.
value
.
threeDisposalNum
/
pieDatamodel
.
value
.
threeNum
)
*
100
)
||
0
,
num
:
pieDatamodel
.
value
.
threeNum
,
num
:
pieDatamodel
.
value
.
threeNum
,
color
:
'#6EB629'
,
color
:
'#6EB629'
,
},
},
...
@@ -273,50 +281,7 @@ export default defineComponent({
...
@@ -273,50 +281,7 @@ export default defineComponent({
const
searchCase
=
(
key
:
string
)
=>
{
const
searchCase
=
(
key
:
string
)
=>
{
console
.
log
(
'searck key: '
,
key
)
console
.
log
(
'searck key: '
,
key
)
}
}
// watch(
// [() => workstationKind.value, () => showChart.value],
// ([arr, show]) => {
// if (!show) return
// if (arr[0]) {
// pieData.value = [
// {
// name: '第一工作站',
// value:
// (
// (arr[0].statistical.oneDisposalNum /
// arr[0].statistical.oneNum) *
// 100
// ).toFixed(0) || 0,
// num: arr[0].statistical.oneDisposalNum,
// color: '#47B3FF',
// },
// {
// name: '第二工作站',
// value:
// (
// (arr[0].statistical.twoDisposalNum /
// arr[0].statistical.twoNum) *
// 100
// ).toFixed(0) || 0,
// num: arr[0].statistical.twoNum,
// color: '#FF9D27',
// },
// {
// name: '第三工作站',
// value:
// (
// (arr[0].statistical.threeDisposalNum /
// arr[0].statistical.threeNum) *
// 100
// ).toFixed(0) || 0,
// num: arr[0].statistical.threeDisposalNum,
// color: '#6EB629',
// },
// ]
// }
// },
// { immediate: true }
// )
return
{
return
{
summary
,
summary
,
showChart
,
showChart
,
...
...
src/view/right/key-task.vue
View file @
d0d62fa9
...
@@ -76,7 +76,7 @@ export default defineComponent({
...
@@ -76,7 +76,7 @@ export default defineComponent({
const
maskImage
=
new
Image
()
const
maskImage
=
new
Image
()
maskImage
.
src
=
symbolUrl
maskImage
.
src
=
symbolUrl
const
option
=
{
const
option
=
{
backgroundColor
:
'
rgba(0,0,0,0.1)
'
,
backgroundColor
:
'
#000
'
,
tooltip
:
{
tooltip
:
{
show
:
true
,
show
:
true
,
},
},
...
@@ -101,14 +101,13 @@ export default defineComponent({
...
@@ -101,14 +101,13 @@ export default defineComponent({
name
:
'pictorial'
,
name
:
'pictorial'
,
silent
:
true
,
silent
:
true
,
symbol
:
'image://'
+
symbolUrl
,
//按背景渲染云词
symbol
:
'image://'
+
symbolUrl
,
//按背景渲染云词
symbolSize
:
[
'1
65%'
,
'18
0%'
],
symbolSize
:
[
'1
00%'
,
'10
0%'
],
symbolPosition
:
'center'
,
symbolPosition
:
'center'
,
barWidth
:
'100%'
,
barWidth
:
'100%'
,
barMaxWidth
:
'100%'
,
barMaxWidth
:
'100%'
,
itemStyle
:
{
itemStyle
:
{
normal
:
{
opacity
:
0.2
,
//自己项目中这里可以设置0全透明,然后可以写一个div背景加载一个美化过的云图片,重合放在这个图表下面。
opacity
:
0.2
,
//自己项目中这里可以设置0全透明,然后可以写一个div背景加载一个美化过的云图片,重合放在这个图表下面。
border
:
'1px solid red'
,
},
},
},
data
:
[
data
:
[
{
{
...
@@ -118,30 +117,28 @@ export default defineComponent({
...
@@ -118,30 +117,28 @@ export default defineComponent({
},
},
{
{
type
:
'wordCloud'
,
type
:
'wordCloud'
,
sizeRange
:
[
19
,
23
],
sizeRange
:
[
20
,
22
],
rotationRange
:
[
0
,
1
0
],
rotationRange
:
[
0
,
0
],
maskImage
:
maskImage
,
maskImage
:
maskImage
,
textPadding
:
3
0
,
textPadding
:
0
,
gridSize
:
20
,
//用于标记画布可用性的网格大小(以像素为单位)//字距越大,字距越大。
gridSize
:
39
,
//用于标记画布可用性的网格大小(以像素为单位)//字距越大,字距越大。
width
:
'
9
0%'
,
width
:
'
10
0%'
,
height
:
'
9
0%'
,
height
:
'
10
0%'
,
left
:
'
center
'
,
left
:
'
0
'
,
top
:
'
center
'
,
top
:
'
0
'
,
drawOutOfBound
:
false
,
drawOutOfBound
:
false
,
textStyle
:
{
textStyle
:
{
normal
:
{
// fontFamily: 'sans-serif',
fontFamily
:
'sans-serif'
,
fontWeight
:
600
,
color
:
function
()
{
color
:
function
()
{
const
index
=
Math
.
floor
(
Math
.
random
()
*
colorList
.
length
)
const
index
=
Math
.
floor
(
Math
.
random
()
*
colorList
.
length
)
return
colorList
[
index
]
return
colorList
[
index
]
},
},
},
},
},
data
:
data
,
data
:
data
,
},
},
],
],
}
}
cloudCharts
.
setOption
(
option
)
cloudCharts
.
setOption
(
option
)
}
}
...
@@ -151,7 +148,7 @@ export default defineComponent({
...
@@ -151,7 +148,7 @@ export default defineComponent({
if
(
!
type
)
return
if
(
!
type
)
return
setTimeout
(()
=>
{
setTimeout
(()
=>
{
init
()
init
()
},
1
0
00
)
},
1
9
00
)
},
},
{
immediate
:
true
}
{
immediate
:
true
}
)
)
...
@@ -168,5 +165,7 @@ export default defineComponent({
...
@@ -168,5 +165,7 @@ export default defineComponent({
width 100%
width 100%
box-sizing border-box
box-sizing border-box
overflow hidden
overflow hidden
// background #000
#cloud
height 2rem
width 100%
</
style
>
</
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