Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
罗鑫霖
/
vion-tools
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 70a5719f
authored
Jan 26, 2022
by
李金轩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
完成版
1 parent
21755519
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
134 additions
and
160 deletions
.gitignore
README.md
package-lock.json
package.json
src/App.vue
src/Request/PublicAxiosInstance.js
src/views/DataRepair/DataRepair.vue
src/views/DataRerun/DataRerun.vue
src/views/Main/Main.vue
src/views/Test/Test.vue
.gitignore
View file @
70a5719
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
node_modules
node_modules
/dist
/dist
dist.zip
dist.zip
label-cloud
.zip
vion-tools
.zip
# local env files
# local env files
.env.local
.env.local
...
...
README.md
View file @
70a5719
#
label-cloud
#
vion-tools
## Project setup
## Project setup
```
```
...
...
package-lock.json
View file @
70a5719
{
{
"name"
:
"
label-cloud
"
,
"name"
:
"
vion-tools
"
,
"version"
:
"0.1.0"
,
"version"
:
"0.1.0"
,
"lockfileVersion"
:
2
,
"lockfileVersion"
:
2
,
"requires"
:
true
,
"requires"
:
true
,
"packages"
:
{
"packages"
:
{
""
:
{
""
:
{
"name"
:
"
label-cloud
"
,
"name"
:
"
vion-tools
"
,
"version"
:
"0.1.0"
,
"version"
:
"0.1.0"
,
"dependencies"
:
{
"dependencies"
:
{
"ant-design-vue"
:
"^2.2.8"
,
"ant-design-vue"
:
"^2.2.8"
,
package.json
View file @
70a5719
{
{
"name"
:
"
label-cloud
"
,
"name"
:
"
vion-tools
"
,
"version"
:
"0.1.0"
,
"version"
:
"0.1.0"
,
"private"
:
true
,
"private"
:
true
,
"scripts"
:
{
"scripts"
:
{
...
...
src/App.vue
View file @
70a5719
...
@@ -55,5 +55,9 @@ html, body, #app, .el-container {
...
@@ -55,5 +55,9 @@ html, body, #app, .el-container {
justify-content
:
center
;
justify-content
:
center
;
}
}
.flex-horizontal-right
{
display
:
flex
;
justify-content
:
flex-end
;
}
</
style
>
</
style
>
src/Request/PublicAxiosInstance.js
View file @
70a5719
...
@@ -15,7 +15,7 @@ axiosInstance.interceptors.request.use(
...
@@ -15,7 +15,7 @@ axiosInstance.interceptors.request.use(
config
=>
{
config
=>
{
if
([
'localhost'
,
'192.168.1.104'
].
includes
(
window
.
location
.
hostname
))
if
([
'localhost'
,
'192.168.1.104'
].
includes
(
window
.
location
.
hostname
))
{
{
config
.
headers
.
Authorization
=
'
6196e80b-a10d-4318-b669-50e96b52b042
'
config
.
headers
.
Authorization
=
'
5607a210-f2fc-414f-bb21-a469da68530a
'
}
}
else
else
{
{
...
...
src/views/DataRepair/DataRepair.vue
View file @
70a5719
...
@@ -81,6 +81,9 @@
...
@@ -81,6 +81,9 @@
</a-form-item>
</a-form-item>
</a-form>
</a-form>
<div
style=
"display:flex; justify-content: flex-end;padding: 3px"
>
<a-button
@
click=
"suspendRepair"
type=
"primary"
>
暂停修复
</a-button>
</div>
<a-table
:dataSource=
"dataList"
v-loading=
"isLoading"
:columns=
"columns"
:pagination=
"false"
>
<a-table
:dataSource=
"dataList"
v-loading=
"isLoading"
:columns=
"columns"
:pagination=
"false"
>
<template
#
status=
"
{ text }">
<template
#
status=
"
{ text }">
<span
:class=
"getClass(text)"
>
{{
text
}}
</span>
<span
:class=
"getClass(text)"
>
{{
text
}}
</span>
...
@@ -158,9 +161,11 @@ const columns = [
...
@@ -158,9 +161,11 @@ const columns = [
export
default
{
export
default
{
setup
()
{
setup
()
{
// scalar
const
isLoading
=
ref
(
false
)
const
isLoading
=
ref
(
false
)
const
resultList
=
ref
([]
)
const
isSuspended
=
ref
(
false
)
// sequence
// sequence
const
resultList
=
ref
([])
const
accountList
=
ref
([])
const
accountList
=
ref
([])
const
plazaList
=
ref
([])
const
plazaList
=
ref
([])
const
zoneList
=
ref
([])
const
zoneList
=
ref
([])
...
@@ -289,62 +294,18 @@ export default {
...
@@ -289,62 +294,18 @@ export default {
return
formatNum
>=
100
?
100
:
formatNum
return
formatNum
>=
100
?
100
:
formatNum
}
}
const
dealMessage
=
function
(
message
)
{
// scheduleType
const
{
dates
,
mallIds
,
mallNames
,
status
,
stepCount
,
scheduleType
,
counter
}
=
message
let
resObj
=
{}
resObj
.
dates
=
dates
resObj
.
mallIds
=
mallIds
resObj
.
mallNames
=
mallNames
resObj
.
status
=
status
resObj
.
progress
=
floatToPercent
(
stepCount
)
resObj
.
totalNum
=
0
resObj
.
totalPage
=
0
resObj
.
current
=
0
resObj
.
curPageSize
=
0
resObj
.
currentPage
=
0
resObj
.
scheduleType
=
scheduleType
if
(
counter
)
{
// dataNum dateMallNum step totalData totalDate totalMall totalMallDateProduct allDataCount
resObj
.
totalNum
=
counter
.
allDataCount
resObj
.
totalPage
=
counter
.
totalMallDateProduct
resObj
.
current
=
counter
.
dataNum
resObj
.
curPageSize
=
counter
.
totalData
resObj
.
currentPage
=
counter
.
dateMallNum
}
if
(
resultList
.
value
.
length
)
{
const
isSameScheduleType
=
resultList
.
value
.
some
(
item
=>
item
.
scheduleType
===
scheduleType
)
isSameScheduleType
?
resultList
.
value
.
forEach
(
item
=>
{
//
item
.
progress
=
floatToPercent
(
stepCount
)
if
(
counter
)
{
item
.
totalNum
=
counter
.
allDataCount
item
.
totalPage
=
counter
.
totalMallDateProduct
item
.
current
=
counter
.
dataNum
item
.
curPageSize
=
counter
.
totalData
item
.
currentPage
=
counter
.
dateMallNum
}
})
:
resultList
.
value
.
push
(
resObj
)
resObj
=
{}
}
else
{
resultList
.
value
.
push
(
resObj
)
resObj
=
{}
}
}
const
preview
=
async
function
()
{
const
preview
=
async
function
()
{
isLoading
.
value
=
true
isLoading
.
value
=
true
isSuspended
.
value
=
false
dataList
.
value
=
[]
dataList
.
value
=
[]
const
rawData
=
toRaw
(
queryForm
)
const
rawData
=
toRaw
(
queryForm
)
for
(
const
channelId
of
rawData
.
channel_id
)
for
(
const
channelId
of
rawData
.
channel_id
)
{
{
if
(
isSuspended
.
value
===
true
)
{
isLoading
.
value
=
false
return
}
const
data
=
filterEmptyValueInObject
(
const
data
=
filterEmptyValueInObject
(
{
{
channelSerialnum
:
channelId
,
channelSerialnum
:
channelId
,
...
@@ -358,6 +319,7 @@ export default {
...
@@ -358,6 +319,7 @@ export default {
)
)
const
r
=
await
dataRepairApi
.
preview
(
data
)
const
r
=
await
dataRepairApi
.
preview
(
data
)
if
(
r
.
msg_code
===
200
)
if
(
r
.
msg_code
===
200
)
{
{
r
.
data
.
status
=
'已修复'
r
.
data
.
status
=
'已修复'
...
@@ -369,14 +331,21 @@ export default {
...
@@ -369,14 +331,21 @@ export default {
dataList
.
value
.
push
(
r
.
data
)
dataList
.
value
.
push
(
r
.
data
)
}
}
isLoading
.
value
=
false
isLoading
.
value
=
false
isSuspended
.
value
=
false
}
}
const
repair
=
async
function
()
{
const
repair
=
async
function
()
{
isLoading
.
value
=
true
isLoading
.
value
=
true
isSuspended
.
value
=
true
dataList
.
value
=
[]
dataList
.
value
=
[]
const
rawData
=
toRaw
(
queryForm
)
const
rawData
=
toRaw
(
queryForm
)
for
(
const
channelId
of
rawData
.
channel_id
)
for
(
const
channelId
of
rawData
.
channel_id
)
{
{
if
(
isSuspended
.
value
===
true
)
{
isLoading
.
value
=
false
return
}
const
data
=
filterEmptyValueInObject
(
const
data
=
filterEmptyValueInObject
(
{
{
channelSerialnum
:
channelId
,
channelSerialnum
:
channelId
,
...
@@ -401,6 +370,7 @@ export default {
...
@@ -401,6 +370,7 @@ export default {
dataList
.
value
.
push
(
r
.
data
)
dataList
.
value
.
push
(
r
.
data
)
}
}
isLoading
.
value
=
false
isLoading
.
value
=
false
isSuspended
.
value
=
false
}
}
const
getClass
=
function
(
text
)
{
const
getClass
=
function
(
text
)
{
...
@@ -431,6 +401,13 @@ export default {
...
@@ -431,6 +401,13 @@ export default {
)
)
}
}
const
suspendRepair
=
function
()
{
if
(
isLoading
.
value
===
true
)
{
isSuspended
.
value
=
true
}
}
const
__main
=
function
()
{
const
__main
=
function
()
{
getAccountList
()
getAccountList
()
}
}
...
@@ -458,6 +435,7 @@ export default {
...
@@ -458,6 +435,7 @@ export default {
repair
,
repair
,
getClass
,
getClass
,
deleteRecord
,
deleteRecord
,
suspendRepair
,
}
}
}
}
}
}
...
...
src/views/DataRerun/DataRerun.vue
View file @
70a5719
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
</a-select-option>
</a-select-option>
</a-select>
</a-select>
</a-form-item>
</a-form-item>
<a-form-item
label=
"数据:"
>
<a-form-item
label=
"数据
类型
:"
>
<a-select
v-model:value=
"queryForm.scheduleTypeList"
<a-select
v-model:value=
"queryForm.scheduleTypeList"
style=
"width: 200px"
style=
"width: 200px"
mode=
"multiple"
mode=
"multiple"
...
...
src/views/Main/Main.vue
View file @
70a5719
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<el-main
style=
"padding: 0"
>
<el-main
style=
"padding: 0"
>
<el-container>
<el-container>
<el-aside
style=
"background: black"
width=
"190px"
>
<el-aside
style=
"background: black"
width=
"190px"
>
<a-menu
mode=
"inline"
theme=
"dark"
@
click=
"onClick"
>
<a-menu
mode=
"inline"
theme=
"dark"
v-model:selectedKeys=
"selectedKeys"
@
click=
"onClick"
>
<a-menu-item
:key=
"'/Main/DataRerun'"
>
<a-menu-item
:key=
"'/Main/DataRerun'"
>
<span>
数据重跑
</span>
<span>
数据重跑
</span>
</a-menu-item>
</a-menu-item>
...
@@ -50,15 +50,17 @@
...
@@ -50,15 +50,17 @@
</el-container>
</el-container>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
defineComponent
,
ref
}
from
'vue'
import
{
defineComponent
,
getCurrentInstance
,
ref
}
from
'vue'
import
{
useRouter
}
from
'vue-router'
import
{
useRouter
}
from
'vue-router'
import
moment
from
"moment"
import
moment
from
"moment"
export
default
defineComponent
({
export
default
defineComponent
({
setup
()
{
setup
()
{
const
{
proxy
}
=
getCurrentInstance
()
const
selectedKeys
=
ref
([
proxy
.
$root
.
$route
.
path
])
const
router
=
useRouter
()
const
router
=
useRouter
()
const
currentTime
=
ref
(
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
))
const
currentTime
=
ref
(
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
))
const
goto
=
function
(
path
)
{
const
goto
=
function
(
path
)
{
router
.
push
(
path
)
router
.
push
(
path
)
}
}
...
@@ -110,6 +112,7 @@ export default defineComponent({
...
@@ -110,6 +112,7 @@ export default defineComponent({
return
{
return
{
// scalar
// scalar
currentTime
,
currentTime
,
selectedKeys
,
// sequence
// sequence
// mapping
// mapping
// function
// function
...
...
src/views/Test/Test.vue
View file @
70a5719
<
template
>
<
template
>
<a-table
:columns=
"columns"
:data-source=
"data"
>
<div
style=
"width: 256px"
>
<template
#
name=
"
{ text }">
<a-button
type=
"primary"
@
click=
"toggleCollapsed"
style=
"margin-bottom: 16px"
>
<a>
{{
text
}}
</a>
<MenuUnfoldOutlined
v-if=
"collapsed"
/>
</
template
>
<MenuFoldOutlined
v-else
/>
<
template
#
customTitle
>
</a-button>
<span>
<a-menu
<smile-outlined/>
mode=
"inline"
Name
theme=
"dark"
</span>
:inline-collapsed=
"collapsed"
</
template
>
v-model:selectedKeys=
"selectedKeys"
<
template
#
tags=
"{ text: tags }"
>
>
<span>
<a-menu-item
key=
"1"
>
<a-tag
<template
#
icon
>
v-for=
"tag in tags"
<PieChartOutlined/>
:key=
"tag"
</
template
>
:color=
"tag === 'loser' ? 'volcano' : tag.length > 5 ? 'geekblue' : 'green'"
<span>
Option 1
</span>
>
</a-menu-item>
{{
tag
.
toUpperCase
()
}}
<a-menu-item
key=
"2"
>
</a-tag>
<
template
#
icon
>
</span>
<DesktopOutlined/>
</
template
>
</
template
>
<
template
#
action=
"{ record }"
>
<span>
Option 2
</span>
<span>
</a-menu-item>
<a>
Invite 一
{{
record
.
name
}}
</a>
<a-menu-item
key=
"3"
>
<a-divider
type=
"vertical"
/>
<
template
#
icon
>
<a>
Delete
</a>
<InboxOutlined/>
<a-divider
type=
"vertical"
/>
</
template
>
<a
class=
"ant-dropdown-link"
>
<span>
Option 3
</span>
More actions
</a-menu-item>
<down-outlined/>
<a-sub-menu
key=
"sub1"
>
</a>
<
template
#
icon
>
</span>
<MailOutlined/>
</
template
>
</
template
>
</a-table>
<
template
#
title
>
Navigation One
</
template
>
<a-menu-item
key=
"5"
>
Option 5
</a-menu-item>
<a-menu-item
key=
"6"
>
Option 6
</a-menu-item>
<a-menu-item
key=
"7"
>
Option 7
</a-menu-item>
<a-menu-item
key=
"8"
>
Option 8
</a-menu-item>
</a-sub-menu>
<a-sub-menu
key=
"sub2"
>
<
template
#
icon
>
<AppstoreOutlined/>
</
template
>
<
template
#
title
>
Navigation Two
</
template
>
<a-menu-item
key=
"9"
>
Option 9
</a-menu-item>
<a-menu-item
key=
"10"
>
Option 10
</a-menu-item>
<a-sub-menu
key=
"sub3"
title=
"Submenu"
>
<a-menu-item
key=
"11"
>
Option 11
</a-menu-item>
<a-menu-item
key=
"12"
>
Option 12
</a-menu-item>
</a-sub-menu>
</a-sub-menu>
</a-menu>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
SmileOutlined
,
DownOutlined
}
from
'@ant-design/icons-vue'
import
{
defineComponent
,
reactive
,
toRefs
,
watch
}
from
'vue'
import
{
defineComponent
}
from
'vue'
import
{
MenuFoldOutlined
,
MenuUnfoldOutlined
,
PieChartOutlined
,
MailOutlined
,
DesktopOutlined
,
InboxOutlined
,
AppstoreOutlined
,
}
from
'@ant-design/icons-vue'
const
columns
=
[
{
dataIndex
:
'name'
,
key
:
'name'
,
slots
:
{
title
:
'customTitle'
,
customRender
:
'name'
,
},
},
{
title
:
'Age'
,
dataIndex
:
'age'
,
key
:
'age'
,
},
{
title
:
'Address'
,
dataIndex
:
'address'
,
key
:
'address'
,
},
{
title
:
'Tags'
,
key
:
'tags'
,
dataIndex
:
'tags'
,
slots
:
{
customRender
:
'tags'
,
},
},
{
title
:
'Action'
,
key
:
'action'
,
slots
:
{
customRender
:
'action'
,
},
},
]
const
data
=
[
{
key
:
'1'
,
name
:
'John Brown'
,
age
:
32
,
address
:
'New York No. 1 Lake Park'
,
tags
:
[
'nice'
,
'developer'
],
},
{
key
:
'2'
,
name
:
'Jim Green'
,
age
:
42
,
address
:
'London No. 1 Lake Park'
,
tags
:
[
'loser'
],
},
{
key
:
'3'
,
name
:
'Joe Black'
,
age
:
32
,
address
:
'Sidney No. 1 Lake Park'
,
tags
:
[
'cool'
,
'teacher'
],
},
]
export
default
defineComponent
({
export
default
defineComponent
({
setup
()
{
setup
()
{
return
{
const
state
=
reactive
({
data
,
collapsed
:
false
,
columns
,
selectedKeys
:
[
'1'
],
openKeys
:
[
'sub1'
],
preOpenKeys
:
[
'sub1'
],
})
watch
(
()
=>
state
.
openKeys
,
(
val
,
oldVal
)
=>
{
state
.
preOpenKeys
=
oldVal
},
)
const
toggleCollapsed
=
()
=>
{
state
.
collapsed
=
!
state
.
collapsed
state
.
openKeys
=
state
.
collapsed
?
[]
:
state
.
preOpenKeys
}
}
return
{...
toRefs
(
state
),
toggleCollapsed
}
},
},
components
:
{
components
:
{
SmileOutlined
,
MenuFoldOutlined
,
DownOutlined
,
MenuUnfoldOutlined
,
PieChartOutlined
,
MailOutlined
,
DesktopOutlined
,
InboxOutlined
,
AppstoreOutlined
,
},
},
})
})
</
script
>
</
script
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment