Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-collect
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyi.chen
data-collect
Commits
dc12e4f0
Commit
dc12e4f0
authored
Apr 17, 2024
by
wenyi.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成批量导入批量导出,pdf多文件列表
parent
5c9fb340
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
7 deletions
+62
-7
src/utils/getHost.js
+9
-0
src/views/norm/list/pdf.vue
+38
-0
src/views/norm/list/whole.vue
+15
-7
No files found.
src/utils/getHost.js
View file @
dc12e4f0
...
@@ -28,6 +28,14 @@ export function getServerUrl() {
...
@@ -28,6 +28,14 @@ export function getServerUrl() {
}
}
}
}
export
function
getPdfUrl
()
{
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
return
'http://localhost:8888/false#/norm/list/pdf?id='
}
else
{
return
'http://gcspider.raisound.com:81/data-collect/#/norm/list/pdf?id='
}
}
export
function
getServerPublic
()
{
export
function
getServerPublic
()
{
return
Session
.
get
(
'resource_address'
);
return
Session
.
get
(
'resource_address'
);
}
}
\ No newline at end of file
src/views/norm/list/pdf.vue
0 → 100644
View file @
dc12e4f0
<
template
>
<div
class=
"system-menu-container"
>
<div
class=
"page-main"
ref=
"pageMain"
>
<el-card
shadow=
"hover"
style=
"height:100%;"
>
asdsad
</el-card>
</div>
</div>
</
template
>
<
script
setup
name=
"taskPackage-list"
>
const
router
=
useRouter
();
const
state
=
reactive
({
apiData
:
{
page
:
1
,
},
});
// 页面加载时
onMounted
(()
=>
{
// getDepatment()
// if(router.currentRoute.value.query.task_id){
// state.apiData.task_id = router.currentRoute.value.query.task_id
// state.isHide = true // 如果有任务ID才允许发布
// }
// getList()
// getTaskList()
state
.
tableHeight
=
getCurrentInstance
().
refs
.
pageMain
.
offsetHeight
-
100
-
52
+
"px"
;
});
</
script
>
<
style
lang=
"scss"
scoped
>
.page-main
{
height
:
calc
(
100vh
-
50px
-
126px
);
}
</
style
>
src/views/norm/list/whole.vue
View file @
dc12e4f0
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
<Breadcrumb
/>
<Breadcrumb
/>
</div>
</div>
<div
class=
"header-search flex space-between"
>
<div
class=
"header-search flex space-between"
>
<div
@
click=
"getPdfList"
>
123123
</div>
<div>
<div>
<el-page-header
@
back=
"backToPreviousPage"
>
<el-page-header
@
back=
"backToPreviousPage"
>
</el-page-header>
</el-page-header>
...
@@ -14,7 +15,7 @@
...
@@ -14,7 +15,7 @@
<el-table
:data=
"state.tableData"
border
style=
"width: 100%;"
:height=
"state.tableHeight"
<el-table
:data=
"state.tableData"
border
style=
"width: 100%;"
:height=
"state.tableHeight"
ref=
"multipleTableRef"
>
ref=
"multipleTableRef"
>
<el-table-column
:cell-style=
"
{ 'white-space': 'normal' }" v-for="column in state.columns" :key="column.prop" :label="column.label" :prop="column.prop" :width="column.width" show-overflow-tooltip align="center">
<el-table-column
:cell-style=
"
{ 'white-space': 'normal' }" v-for="column in state.columns" :key="column.prop" :label="column.label" :prop="column.prop" :width="column.width" show-overflow-tooltip align="center">
<template
#
default=
"scope"
><
span
v-html=
"formatOutputCustom(scope.row[column.prop])"
></span
>
<template
#
default=
"scope"
><
div
v-html=
"formatOutputCustom(scope.row[column.prop],scope.row.id)"
></div
>
<!--
<span
style=
"color:#409EFF"
v-if=
"column.label =='用户名称'"
>
{{
scope
.
row
[
column
.
prop
]
}}
</span>
<!--
<span
style=
"color:#409EFF"
v-if=
"column.label =='用户名称'"
>
{{
scope
.
row
[
column
.
prop
]
}}
</span>
<span
style=
"color:#909399"
v-else-if=
"column.label =='领取状态' && scope.row[column.prop] ==1"
>
已领取
</span>
<span
style=
"color:#909399"
v-else-if=
"column.label =='领取状态' && scope.row[column.prop] ==1"
>
已领取
</span>
<span
style=
"color:#E6A23C"
v-else-if=
"column.label =='完成状态' && scope.row[column.prop] ==0"
>
未完成
</span>
<span
style=
"color:#E6A23C"
v-else-if=
"column.label =='完成状态' && scope.row[column.prop] ==0"
>
未完成
</span>
...
@@ -39,6 +40,7 @@
...
@@ -39,6 +40,7 @@
import
{
normApi
}
from
'/@/api/norm'
import
{
normApi
}
from
'/@/api/norm'
import
{
ElMessage
}
from
'element-plus'
;
import
{
ElMessage
}
from
'element-plus'
;
import
{
toolsApi
}
from
'/@/api/tools'
import
{
toolsApi
}
from
'/@/api/tools'
import
{
getPdfUrl
}
from
"/@/utils/getHost.js"
;
const
Breadcrumb
=
defineAsyncComponent
(()
=>
import
(
'/@/layout/navBars/breadcrumb/breadcrumb.vue'
));
const
Breadcrumb
=
defineAsyncComponent
(()
=>
import
(
'/@/layout/navBars/breadcrumb/breadcrumb.vue'
));
const
router
=
useRouter
();
const
router
=
useRouter
();
// 定义子组件向父组件传值/事件
// 定义子组件向父组件传值/事件
...
@@ -59,6 +61,7 @@
...
@@ -59,6 +61,7 @@
columns
:[],
columns
:[],
collectsTableData
:[],
collectsTableData
:[],
collectsColumns
:[],
collectsColumns
:[],
pdfUrl
:
''
,
// 访问pdf列表
});
});
// 打开页面
// 打开页面
...
@@ -108,7 +111,7 @@
...
@@ -108,7 +111,7 @@
'norm_info.price'
:
addItem
.
price
,
'norm_info.price'
:
addItem
.
price
,
'norm_info.guide'
:
addItem
.
guide
?
addItem
.
guide
:
'/'
,
'norm_info.guide'
:
addItem
.
guide
?
addItem
.
guide
:
'/'
,
'norm_list_info.name'
:
item
.
norm_list_info
.
name
,
'norm_list_info.name'
:
item
.
norm_list_info
.
name
,
'fileListPdf'
:
item
.
fileListPdf
,
'fileListPdf'
:
item
.
fileListPdf
?
item
.
fileListPdf
:
'/'
,
}
}
state
.
tableData
.
push
(
list
);
state
.
tableData
.
push
(
list
);
item
.
norm_list_extend
.
forEach
(
function
(
items
,
indexs
,
arrs
)
{
item
.
norm_list_extend
.
forEach
(
function
(
items
,
indexs
,
arrs
)
{
...
@@ -143,14 +146,17 @@
...
@@ -143,14 +146,17 @@
if
(
item
.
status
==
4
){
if
(
item
.
status
==
4
){
list
[
'status'
]
=
'已通过、已结算'
list
[
'status'
]
=
'已通过、已结算'
}
}
if
(
item
.
not_collectible
==
0
||
item
.
not_collectible
==
""
){
console
.
log
(
item
)
if
(
item
.
not_collectible
==
null
){
list
[
'not_collectible'
]
=
'待采集'
list
[
'not_collectible_remarks'
]
=
'/'
}
else
if
(
item
.
not_collectible
==
0
){
list
[
'not_collectible'
]
=
'可采集'
list
[
'not_collectible'
]
=
'可采集'
list
[
'not_collectible_remarks'
]
=
'/'
list
[
'not_collectible_remarks'
]
=
'/'
}
else
{
}
else
{
list
[
'not_collectible'
]
=
'不可采集'
list
[
'not_collectible'
]
=
'不可采集'
list
[
'not_collectible_remarks'
]
=
'/'
list
[
'not_collectible_remarks'
]
=
'/'
}
}
list
[
'not_collectible_remarks'
]
=
item
.
not_collectible_remarks
?
item
.
not_collectible_remarks
:
"是"
});
});
state
.
columns
.
push
(
{
label
:
'状态'
,
prop
:
'status'
,
width
:
350
})
state
.
columns
.
push
(
{
label
:
'状态'
,
prop
:
'status'
,
width
:
350
})
state
.
columns
.
push
(
{
label
:
'是否可采集'
,
prop
:
'not_collectible'
,
width
:
200
})
state
.
columns
.
push
(
{
label
:
'是否可采集'
,
prop
:
'not_collectible'
,
width
:
200
})
...
@@ -182,7 +188,7 @@
...
@@ -182,7 +188,7 @@
* 自定义内容格式化输出
* 自定义内容格式化输出
* @param {*} vlaue
* @param {*} vlaue
*/
*/
const
formatOutputCustom
=
(
value
)
=>
{
const
formatOutputCustom
=
(
value
,
id
)
=>
{
if
(
value
&&
typeof
value
==
"string"
){
if
(
value
&&
typeof
value
==
"string"
){
let
arr
=
value
.
split
(
','
);
let
arr
=
value
.
split
(
','
);
let
txt
=
''
;
let
txt
=
''
;
...
@@ -191,8 +197,10 @@
...
@@ -191,8 +197,10 @@
if
(
str
){
if
(
str
){
if
(
index
==
0
){
if
(
index
==
0
){
txt
+=
"<a style='color:#409EFF;' href='"
+
item
+
"' target ='_blank'>"
+
item
+
"</a>"
;
txt
+=
"<a style='color:#409EFF;' href='"
+
item
+
"' target ='_blank'>"
+
item
+
"</a>"
;
}
else
if
(
index
>
4
){
txt
=
"<a style='color:#409EFF;' href='"
+
state
.
pdfUrl
+
id
+
"' target ='_blank'>查看所有文件</a>"
;
}
else
{
}
else
{
txt
+=
"<br><br><a style='color:#409EFF;' href='"
+
item
+
"' target ='_blank'>"
+
item
+
"</a>"
;
txt
+=
"<br><br><a style='color:#409EFF;' href='"
+
item
+
"' target ='_blank'>"
+
item
+
"</a>"
;
}
}
}
else
{
}
else
{
txt
+=
item
;
txt
+=
item
;
...
@@ -203,7 +211,6 @@
...
@@ -203,7 +211,6 @@
return
value
;
return
value
;
}
}
}
}
// /**
// /**
// * 检查数据类型并且将多个逗号分隔成数组
// * 检查数据类型并且将多个逗号分隔成数组
// * @param {*} value
// * @param {*} value
...
@@ -228,6 +235,7 @@
...
@@ -228,6 +235,7 @@
state
.
apiData
.
id
=
router
.
currentRoute
.
value
.
query
.
norm_id
state
.
apiData
.
id
=
router
.
currentRoute
.
value
.
query
.
norm_id
// state.isHide = true // 如果有任务ID才允许发布
// state.isHide = true // 如果有任务ID才允许发布
getInfo
()
getInfo
()
state
.
pdfUrl
=
getPdfUrl
()
}
else
{
}
else
{
router
.
go
(
-
1
);
router
.
go
(
-
1
);
}
}
...
...
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