Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
ops_2024_vue
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
ops_2024_vue
Commits
53e45829
Commit
53e45829
authored
Apr 01, 2024
by
heduo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lmy' of
http://119.78.67.12/git/root/ops_2024_vue
into hd
parents
d9605614
50ca4ee0
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1108 additions
and
916 deletions
+1108
-916
src/views/regionalSpotManage/components/addProduct.vue
src/views/regionalSpotManage/components/addProduct.vue
+395
-316
src/views/regionalSpotManage/components/list.vue
src/views/regionalSpotManage/components/list.vue
+620
-525
src/views/regionalSpotManage/components/upLoadTask.vue
src/views/regionalSpotManage/components/upLoadTask.vue
+74
-61
src/views/regionalSpotManage/taskCenter.vue
src/views/regionalSpotManage/taskCenter.vue
+12
-14
types/global.d.ts
types/global.d.ts
+7
-0
No files found.
src/views/regionalSpotManage/components/addProduct.vue
View file @
53e45829
This diff is collapsed.
Click to expand it.
src/views/regionalSpotManage/components/list.vue
View file @
53e45829
This diff is collapsed.
Click to expand it.
src/views/regionalSpotManage/components/upLoadTask.vue
View file @
53e45829
<
script
lang=
"ts"
setup
>
import
{
ref
,
onMounted
}
from
'
vue
'
;
import
{
message
,
}
from
'
ant-design-vue
'
;
const
config
=
import
.
meta
.
env
import
{
import
{
ref
,
onMounted
}
from
'
vue
'
;
import
{
message
}
from
'
ant-design-vue
'
;
const
config
=
import
.
meta
.
env
;
import
{
taskCenterQueryListApi
,
taskCenterRevokeExcelUploadApi
,
}
from
'
/@/api/regionalSpotManage
'
;
onMounted
(
async
()
=>
{
getList
()
});
let
list
=
ref
<
any
[]
>
([])
let
listLoading
=
ref
(
false
)
const
downLoad
=
(
url
)
=>
{
window
.
open
(
config
.
VITE_GLOB_API_URL
+
'
/system/excelFile/
'
+
url
,
'
_blank
'
)
}
const
downloadFail
=
(
record
)
=>
{
if
(
record
.
failNum
===
0
)
return
let
href
=
config
.
VITE_GLOB_API_URL
+
'
/excel/excelNew/fail/download?sysid=
'
+
record
.
sysid
+
'
&type=
'
+
record
.
type
.
slice
(
2
,
6
)
window
.
open
(
href
,
'
blank
'
)
}
const
cancel
=
async
(
record
)
=>
{
}
from
'
/@/api/regionalSpotManage
'
;
onMounted
(
async
()
=>
{
getList
();
});
let
list
=
ref
<
any
[]
>
([]);
let
listLoading
=
ref
(
false
);
const
downLoad
=
(
url
)
=>
{
window
.
open
(
config
.
VITE_GLOB_API_URL
+
'
/system/excelFile/
'
+
url
,
'
_blank
'
);
};
const
downloadFail
=
(
record
)
=>
{
if
(
record
.
failNum
===
0
)
return
;
let
href
=
config
.
VITE_GLOB_API_URL
+
'
/excel/excelNew/fail/download?sysid=
'
+
record
.
sysid
+
'
&type=
'
+
record
.
type
.
slice
(
2
,
6
);
window
.
open
(
href
,
'
blank
'
);
};
const
cancel
=
async
(
record
)
=>
{
const
param
=
ref
<
{
[
key
:
string
]:
any
}
>
({
sysid
:
record
.
sysid
})
const
res
=
await
taskCenterRevokeExcelUploadApi
(
param
.
value
)
sysid
:
record
.
sysid
,
});
const
res
=
await
taskCenterRevokeExcelUploadApi
(
param
.
value
);
if
(
res
.
code
===
20000
)
{
message
.
success
(
'
操作成功
'
)
getList
()
message
.
success
(
'
操作成功
'
);
getList
();
}
else
{
message
.
error
(
res
.
message
)
message
.
error
(
res
.
message
);
}
}
const
getList
=
async
()
=>
{
listLoading
.
value
=
true
const
res
=
await
taskCenterQueryListApi
({
type
:
0
})
};
const
getList
=
async
()
=>
{
listLoading
.
value
=
true
;
const
res
=
await
taskCenterQueryListApi
({
type
:
0
});
if
(
res
.
code
===
20000
)
{
list
.
value
=
res
.
data
list
.
value
=
res
.
data
;
}
else
{
list
.
value
=
[]
list
.
value
=
[];
}
listLoading
.
value
=
false
}
listLoading
.
value
=
false
;
};
</
script
>
<
template
>
...
...
@@ -57,50 +60,60 @@ const getList = async () => {
style=
"margin-top: 15px"
>
<a-table-column
title=
"操作时间"
align=
"center"
:width=
"100"
>
<template
v-slot=
"
{record
}">
<template
#default
="
{ record
}">
{{
record
.
createTime
}}
</
template
>
</a-table-column>
<a-table-column
title=
"类型"
align=
"center"
:width=
"100"
>
<
template
v-slot=
"{record
}"
>
<
template
#default
="{
record
}"
>
{{
record
.
type
}}
</
template
>
</a-table-column>
<a-table-column
title=
"状态"
align=
"center"
:width=
"100"
>
<
template
v-slot=
"{record}"
>
<p>
{{
record
.
isRevoke
?
'
已撤销
'
:
record
.
status
==
0
?
'
待进行
'
:(
record
.
status
==
1
?
'
进行中
'
:
'
已完成
'
)
}}
</p>
<
template
#default
="{
record
}"
>
<p>
{{
record
.
isRevoke
?
'
已撤销
'
:
record
.
status
==
0
?
'
待进行
'
:
record
.
status
==
1
?
'
进行中
'
:
'
已完成
'
}}
</p>
</
template
>
</a-table-column>
<a-table-column
title=
"操作数据"
align=
"center"
:width=
"100"
>
<
template
v-slot=
"{record
}"
>
<
template
#default
="{
record
}"
>
{{
record
.
sproductNumpec
}}
</
template
>
</a-table-column>
<a-table-column
title=
"成功数据"
align=
"center"
:width=
"100"
>
<
template
v-slot=
"{record
}"
>
<
template
#default
="{
record
}"
>
{{
record
.
successNum
}}
</
template
>
</a-table-column>
<a-table-column
title=
"错误数据"
align=
"center"
:width=
"100"
>
<
template
v-slot=
"{record
}"
>
<
template
#default
="{
record
}"
>
{{
record
.
failNum
}}
</
template
>
</a-table-column>
<a-table-column
title=
"操作人"
align=
"center"
:width=
"100"
>
<
template
v-slot=
"{record
}"
>
<
template
#default
="{
record
}"
>
{{
record
.
createName
}}
</
template
>
</a-table-column>
<a-table-column
title=
"操作"
align=
"center"
:width=
"200"
>
<
template
v-slot=
"{record
}"
>
<
template
#default
="{
record
}"
>
<Button
type=
"link"
@
click=
"downLoad(record.fileUrl)"
>
下载源文件
</Button>
<Button
type=
"link"
v-if=
"record.failNum"
@
click=
"downloadFail(record)"
>
下载错误数据
</Button>
<Button
type=
"link"
v-if=
"record.status == 0 && !record.isRevoke"
@
click=
"cancel(record)"
>
撤销
</Button>
<Button
type=
"link"
v-if=
"record.failNum"
@
click=
"downloadFail(record)"
>
下载错误数据
</Button
>
<Button
type=
"link"
v-if=
"record.status == 0 && !record.isRevoke"
@
click=
"cancel(record)"
>
撤销
</Button
>
</
template
>
</a-table-column>
</a-table>
</template>
<
style
lang=
"less"
scoped
>
</
style
>
<
style
lang=
"less"
scoped
></
style
>
src/views/regionalSpotManage/taskCenter.vue
View file @
53e45829
<
script
lang=
"ts"
setup
>
import
{
ref
}
from
'
vue
'
;
import
uploadTask
from
'
./components/upLoadTask.vue
'
import
downLoadTask
from
'
./components/downLoadTask.vue
'
import
platformProBatch
from
'
./components/platformProBatch.vue
'
const
activeKey
=
ref
(
'
1
'
)
const
callback
=
(
val
)
=>
{
activeKey
.
value
=
val
}
import
{
ref
}
from
'
vue
'
;
import
uploadTask
from
'
./components/upLoadTask.vue
'
;
import
downLoadTask
from
'
./components/downLoadTask.vue
'
;
import
platformProBatch
from
'
./components/platformProBatch.vue
'
;
const
activeKey
=
ref
(
'
1
'
);
const
callback
=
(
val
)
=>
{
activeKey
.
value
=
val
;
};
</
script
>
<
template
>
<a-tabs
@
change=
"callback"
v-model:activeKey=
"activeKey"
>
<a-tab-pane
key=
"1"
tab=
"上传任务数据"
>
<uploadTask
v-if=
"activeKey === '1'"
></uploadTask
>
<uploadTask
v-if=
"activeKey === '1'"
/
>
</a-tab-pane>
<a-tab-pane
key=
"2"
tab=
"下载任务数据"
force-render
>
<downLoadTask
v-if=
"activeKey === '2'"
></downLoadTask
>
<downLoadTask
v-if=
"activeKey === '2'"
/
>
</a-tab-pane>
<a-tab-pane
key=
"3"
tab=
"平台商品批量"
>
<platformProBatch
v-if=
"activeKey === '3'"
></platformProBatch
>
<platformProBatch
v-if=
"activeKey === '3'"
/
>
</a-tab-pane>
</a-tabs>
</
template
>
<
style
lang=
"less"
scoped
>
</
style
>
<
style
lang=
"less"
scoped
></
style
>
types/global.d.ts
View file @
53e45829
...
...
@@ -52,6 +52,13 @@ declare global {
declare
interface
WheelEvent
{
path
?:
EventTarget
[];
}
interface
ImportMeta
{
env
:
{
VITE_GLOB_API_URL
?:
string
;
};
}
interface
ImportMetaEnv
extends
ViteEnv
{
__
:
unknown
;
}
...
...
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