Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
data-collect
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
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
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
7 deletions
+61
-7
src/utils/getHost.js
src/utils/getHost.js
+8
-0
src/views/norm/list/pdf.vue
src/views/norm/list/pdf.vue
+38
-0
src/views/norm/list/whole.vue
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() {
}
}
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
()
{
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 @@
<Breadcrumb
/>
</div>
<div
class=
"header-search flex space-between"
>
<div
@
click=
"getPdfList"
>
123123
</div>
<div>
<el-page-header
@
back=
"backToPreviousPage"
>
</el-page-header>
...
...
@@ -14,7 +15,7 @@
<el-table
:data=
"state.tableData"
border
style=
"width: 100%;"
:height=
"state.tableHeight"
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">
<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:#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>
...
...
@@ -39,6 +40,7 @@
import
{
normApi
}
from
'
/@/api/norm
'
import
{
ElMessage
}
from
'
element-plus
'
;
import
{
toolsApi
}
from
'
/@/api/tools
'
import
{
getPdfUrl
}
from
"
/@/utils/getHost.js
"
;
const
Breadcrumb
=
defineAsyncComponent
(()
=>
import
(
'
/@/layout/navBars/breadcrumb/breadcrumb.vue
'
));
const
router
=
useRouter
();
// 定义子组件向父组件传值/事件
...
...
@@ -59,6 +61,7 @@
columns
:[],
collectsTableData
:[],
collectsColumns
:[],
pdfUrl
:
''
,
// 访问pdf列表
});
// 打开页面
...
...
@@ -108,7 +111,7 @@
'
norm_info.price
'
:
addItem
.
price
,
'
norm_info.guide
'
:
addItem
.
guide
?
addItem
.
guide
:
'
/
'
,
'
norm_list_info.name
'
:
item
.
norm_list_info
.
name
,
'
fileListPdf
'
:
item
.
fileListPdf
,
'
fileListPdf
'
:
item
.
fileListPdf
?
item
.
fileListPdf
:
'
/
'
,
}
state
.
tableData
.
push
(
list
);
item
.
norm_list_extend
.
forEach
(
function
(
items
,
indexs
,
arrs
)
{
...
...
@@ -143,14 +146,17 @@
if
(
item
.
status
==
4
){
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_remarks
'
]
=
'
/
'
}
else
{
list
[
'
not_collectible
'
]
=
'
不可采集
'
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
:
'
not_collectible
'
,
width
:
200
})
...
...
@@ -182,7 +188,7 @@
* 自定义内容格式化输出
* @param {*} vlaue
*/
const
formatOutputCustom
=
(
value
)
=>
{
const
formatOutputCustom
=
(
value
,
id
)
=>
{
if
(
value
&&
typeof
value
==
"
string
"
){
let
arr
=
value
.
split
(
'
,
'
);
let
txt
=
''
;
...
...
@@ -191,8 +197,10 @@
if
(
str
){
if
(
index
==
0
){
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
{
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
{
txt
+=
item
;
...
...
@@ -203,7 +211,6 @@
return
value
;
}
}
// /**
// * 检查数据类型并且将多个逗号分隔成数组
// * @param {*} value
...
...
@@ -228,6 +235,7 @@
state
.
apiData
.
id
=
router
.
currentRoute
.
value
.
query
.
norm_id
// state.isHide = true // 如果有任务ID才允许发布
getInfo
()
state
.
pdfUrl
=
getPdfUrl
()
}
else
{
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