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
ecd0dc79
Commit
ecd0dc79
authored
Apr 18, 2024
by
cwy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
多个pdf文件问题
parent
dc12e4f0
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
736 additions
and
599 deletions
+736
-599
src/api/claimTasks/index.js
src/api/claimTasks/index.js
+7
-0
src/views/dataScreening/list/details.vue
src/views/dataScreening/list/details.vue
+164
-253
src/views/dataScreening/list/index.vue
src/views/dataScreening/list/index.vue
+4
-22
src/views/dataScreening/list/pdf.vue
src/views/dataScreening/list/pdf.vue
+126
-0
src/views/dataScreening/list/ss.vue
src/views/dataScreening/list/ss.vue
+0
-266
src/views/dataScreening/list/whole.vue
src/views/dataScreening/list/whole.vue
+269
-0
src/views/norm/list/index.vue
src/views/norm/list/index.vue
+21
-5
src/views/norm/list/pdf.vue
src/views/norm/list/pdf.vue
+124
-36
src/views/norm/list/whole.vue
src/views/norm/list/whole.vue
+21
-17
No files found.
src/api/claimTasks/index.js
View file @
ecd0dc79
...
...
@@ -49,6 +49,13 @@ export function claimTasksApi() {
data
,
});
},
normGetPdfList
:
(
data
)
=>
{
return
request
({
url
:
'
/api/normCollects/getPdfList
'
,
method
:
'
post
'
,
data
,
});
},
normReceivesRevoke
:
(
data
)
=>
{
return
request
({
url
:
'
/api/normReceives/revoke
'
,
...
...
src/views/dataScreening/list/details.vue
View file @
ecd0dc79
This diff is collapsed.
Click to expand it.
src/views/dataScreening/list/index.vue
View file @
ecd0dc79
...
...
@@ -10,11 +10,6 @@
<el-option
v-for=
"(item, index) in state.taskList"
:key=
"index"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
<!--
<el-input
class=
"search-item"
placeholder=
"请输入子任务名称"
v-model=
"state.apiData.name"
size=
"default"
style=
"width: 220px;"
clearable
@
change=
"searchChange()"
>
</el-input>
<el-button
size=
"default"
type=
"primary"
@
click=
"searchChange()"
>
查询
</el-button>
<el-button
size=
"default"
@
click=
"reset()"
>
重置
</el-button>
-->
</div>
</div>
...
...
@@ -46,10 +41,6 @@
:total=
"state.tableData.total"
>
</el-pagination>
</div>
<DetailDialog
ref=
"DetailDialogRef"
@
refresh=
"getList()"
/>
<AddDialog
ref=
"AddDialogRef"
@
refresh=
"getList()"
/>
<EditDialog
ref=
"EditDialogRef"
@
refresh=
"getList()"
/>
<ImporDialog
ref=
"ImporDialogRef"
@
refresh=
"getList()"
/>
</el-card>
</div>
</div>
...
...
@@ -64,17 +55,9 @@ import { ElMessageBox, ElMessage } from 'element-plus';
// 引入组件
const
Breadcrumb
=
defineAsyncComponent
(()
=>
import
(
'
/@/layout/navBars/breadcrumb/breadcrumb.vue
'
));
const
AddDialog
=
defineAsyncComponent
(()
=>
import
(
'
/@/views/norm/list/dialog.vue
'
));
const
DetailDialog
=
defineAsyncComponent
(()
=>
import
(
'
/@/views/dataScreening/list/details.vue
'
));
const
EditDialog
=
defineAsyncComponent
(()
=>
import
(
'
/@/views/norm/list/edit.vue
'
));
const
ImporDialog
=
defineAsyncComponent
(()
=>
import
(
'
/@/views/norm/list/impor.vue
'
));
const
router
=
useRouter
();
// 定义变量内容
const
AddDialogRef
=
ref
()
const
DetailDialogRef
=
ref
()
const
EditDialogRef
=
ref
()
const
ImporDialogRef
=
ref
()
const
multipleTableRef
=
ref
()
const
state
=
reactive
({
...
...
@@ -210,8 +193,10 @@ const tableSelection = (val) => {
}
// 详情弹窗
const
details
=
(
norm_id
)
=>
{
DetailDialogRef
.
value
.
openDialog
(
norm_id
);
const
details
=
(
id
)
=>
{
router
.
push
({
path
:
'
/dataScreening/list/details
'
,
query
:
{
norm_id
:
id
}
});
}
...
...
@@ -252,12 +237,9 @@ const multipleExports= () => {
ElMessage
.
error
(
'
导出失败!
'
);
}
multipleTableRef
.
value
.
clearSelection
();
getList
();
}).
catch
(()
=>
{
getList
();
})
}).
catch
(()
=>
{
getList
();
})
}
</
script
>
...
...
src/views/dataScreening/list/pdf.vue
0 → 100644
View file @
ecd0dc79
<
template
>
<div
class=
"system-role-dialog-container"
>
<el-dialog
title=
"所有文件"
v-model=
"state.isShowDialog"
width=
"60%"
@
close=
"closeDialog"
:close-on-click-modal=
"false"
>
<el-table
border
:data=
"state.tableData"
style=
"width: 100%"
ref=
"multipleTableRef"
>
<el-table-column
label=
"序号"
type=
"index"
width=
"100"
show-overflow-tooltip
align=
"center"
></el-table-column>
<el-table-column
prop=
"name"
width=
"500"
label=
"文件名称"
show-overflow-tooltip
align=
"center"
>
</el-table-column>
<el-table-column
prop=
"fileurl"
width=
"300"
label=
"地址"
show-overflow-tooltip
align=
"center"
></el-table-column>
<el-table-column
width=
"200"
label=
"操作"
show-overflow-tooltip
align=
"center"
>
<template
#default
="
scope
"
>
<el-link
type=
"primary"
:href=
"scope.row.url"
target=
"_blank"
>
查看文件
</el-link>
</
template
>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<
script
setup
name=
"systemRoleDialog"
>
import
{
claimTasksApi
}
from
'
/@/api/claimTasks
'
import
{
ElMessage
}
from
'
element-plus
'
;
import
{
toolsApi
}
from
'
/@/api/tools
'
// 定义子组件向父组件传值/事件
const
emit
=
defineEmits
([
'
refresh
'
]);
// 定义变量内容
const
dialogFormRef
=
ref
();
const
router
=
useRouter
();
const
state
=
reactive
({
isShowDialog
:
false
,
tableData
:[],
});
// 打开弹窗
const
openDialog
=
(
id
)
=>
{
state
.
tableData
=
[];
let
query
=
{
id
:
id
}
claimTasksApi
().
normGetPdfList
(
query
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
){
let
pdfList
=
''
;
let
pdfNameList
=
''
;
if
(
res
.
data
.
fileListPdf
&&
typeof
res
.
data
.
fileListPdf
==
"
string
"
){
pdfList
=
res
.
data
.
fileListPdf
.
split
(
'
,
'
);
}
if
(
res
.
data
.
file_name
&&
typeof
res
.
data
.
file_name
==
"
string
"
){
pdfNameList
=
res
.
data
.
file_name
.
split
(
'
,
'
);
}
pdfList
.
forEach
(
function
(
item
,
index
,
arr
)
{
state
.
tableData
.
push
({
name
:
pdfNameList
[
index
],
fileurl
:
item
,
url
:
item
});
});
console
.
log
(
state
.
tableData
)
}
else
{
ElMessage
.
success
(
'
获取不到相关信息!
'
);
}
state
.
isShowDialog
=
true
}).
catch
(()
=>
{
})
};
// 关闭弹窗
const
closeDialog
=
()
=>
{
state
.
isShowDialog
=
false
;
};
// 暴露变量
defineExpose
({
openDialog
,
});
onMounted
(()
=>
{
if
(
router
.
currentRoute
.
value
.
query
.
task_id
){
state
.
formItem
.
addItem
.
task_id
=
router
.
currentRoute
.
value
.
query
.
task_id
}
});
</
script
>
<
style
scoped
lang=
"scss"
>
.el-dialog__body
{
display
:
flex
;
justify-content
:
center
;
align-content
:
center
;
}
.el-input.is-disabled
{
background
:
#fff
!
important
;
color
:
var
(
--
el-radio-text-color
)
!
important
;
-webkit-text-fill-color
:
var
(
--
el-radio-text-color
)
!
important
;
}
:deep
(
.el-input
.el-input__inner
)
{
background
:
#fff
!
important
;
color
:
var
(
--
el-radio-text-color
)
!
important
;
-webkit-text-fill-color
:
var
(
--
el-radio-text-color
)
!
important
;
}
:deep
(
.el-input
.el-input__wrapper
)
{
background
:
#fff
!
important
;
color
:
var
(
--
el-radio-text-color
)
!
important
;
-webkit-text-fill-color
:
var
(
--
el-radio-text-color
)
!
important
;
}
.el-textarea.is-disabled
{
background
:
#fff
!
important
;
color
:
var
(
--
el-radio-text-color
)
!
important
;
-webkit-text-fill-color
:
var
(
--
el-radio-text-color
)
!
important
;
}
:deep
(
.el-textarea
.el-textarea__inner
)
{
background
:
#fff
!
important
;
color
:
var
(
--
el-radio-text-color
)
!
important
;
-webkit-text-fill-color
:
var
(
--
el-radio-text-color
)
!
important
;
}
:deep
(
.el-textarea
.el-textarea__wrapper
)
{
background
:
#fff
!
important
;
color
:
var
(
--
el-radio-text-color
)
!
important
;
-webkit-text-fill-color
:
var
(
--
el-radio-text-color
)
!
important
;
}
</
style
>
\ No newline at end of file
src/views/dataScreening/list/ss.vue
deleted
100644 → 0
View file @
dc12e4f0
<
template
>
<div
class=
"system-menu-container"
>
<div
class=
"breadcrumb-box"
>
<Breadcrumb
/>
</div>
<div
class=
"header-search flex space-between"
>
<div>
<el-select
v-model=
"state.apiData.search_task_id"
placeholder=
"请选择任务"
size=
"default"
@
change=
"searchChange"
clearable
filterable
style=
"width:200px;margin-right: 20px;"
>
<el-option
v-for=
"(item, index) in state.taskList"
:key=
"index"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
<!--
<el-input
class=
"search-item"
placeholder=
"请输入子任务名称"
v-model=
"state.apiData.name"
size=
"default"
style=
"width: 220px;"
clearable
@
change=
"searchChange()"
>
</el-input>
<el-button
size=
"default"
type=
"primary"
@
click=
"searchChange()"
>
查询
</el-button>
<el-button
size=
"default"
@
click=
"reset()"
>
重置
</el-button>
-->
</div>
</div>
<div
class=
"page-main"
v-loading=
"state.tableData.loading"
ref=
"pageMain"
>
<el-card
shadow=
"hover"
style=
"height:100%;"
>
<el-button
size=
"default"
type=
"danger"
@
click=
"multipleExports"
style=
"margin-bottom: 10px;"
>
导出
</el-button>
<el-table
:scrollbar-always-on=
"true"
:row-key=
"(row) => row.id"
:data=
"state.tableData.data"
style=
"width: 100%"
:height=
"state.tableHeight"
@
selection-change=
"tableSelection"
ref=
"multipleTableRef"
>
<el-table-column
type=
"selection"
width=
"55"
:reserve-selection=
"true"
/>
<el-table-column
label=
"序号"
type=
"index"
width=
"100"
show-overflow-tooltip
align=
"center"
></el-table-column>
<el-table-column
prop=
"taskPackageInfo.name"
width=
"200"
label=
"任务名称"
show-overflow-tooltip
align=
"center"
>
<template
#default
="
scope
"
>
<el-tag
type=
'danger'
effect=
"plain"
>
{{
scope
.
row
.
taskPackageInfo
.
name
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"taskPackageInfo.unit"
width=
"200"
label=
"单位名称"
show-overflow-tooltip
align=
"center"
></el-table-column>
<el-table-column
prop=
"name"
label=
"子任务名称"
width=
"200"
show-overflow-tooltip
align=
"center"
>
<
template
#default=
"scope"
>
<span
@
click=
"details(scope.row.id)"
>
{{
scope
.
row
.
name
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"level"
label=
"难度等级"
width=
"100"
show-overflow-tooltip
align=
"center"
></el-table-column>
<el-table-column
prop=
"refer"
label=
"参考信源"
width=
"200"
show-overflow-tooltip
align=
"center"
></el-table-column>
<el-table-column
prop=
"price"
label=
"单价"
width=
"100"
show-overflow-tooltip
align=
"center"
></el-table-column>
<el-table-column
prop=
"sort"
label=
"优先级"
width=
"100"
show-overflow-tooltip
align=
"center"
></el-table-column>
<el-table-column
prop=
"created_at"
width=
"180"
label=
"发布时间"
show-overflow-tooltip
align=
"center"
></el-table-column>
<el-table-column
prop=
"receivedQuantity"
width=
"200"
label=
"领取进度"
show-overflow-tooltip
align=
"center"
>
<
template
#default=
"scope"
>
<span
style=
"color:#409EFF"
v-if=
"scope.row.type==1"
>
--
</span>
<span
style=
"color:#409EFF"
v-else
>
{{
scope
.
row
.
receivedQuantity
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"完成进度"
width=
"200"
show-overflow-tooltip
align=
"center"
>
<
template
#default=
"scope"
>
<span
style=
"color:#F56C6C"
v-if=
"scope.row.type==1"
>
--
</span>
<span
style=
"color:#F56C6C"
v-else
>
{{
scope
.
row
.
collectsQuantity
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"200"
fixed=
"right"
align=
"center"
>
<
template
#default=
"scope"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"details(scope.row.id)"
>
查看详情
</el-button>
<el-button
size=
"small"
type=
"warning"
@
click=
"exportFile(scope.row.id)"
>
导出数据
</el-button>
</
template
>
</el-table-column>
</el-table>
<div
class=
"pagination-box"
>
<el-pagination
@
size-change=
"onHandleSizeChange"
@
current-change=
"onHandleCurrentChange"
class=
"mt15"
:pager-count=
"5"
:page-sizes=
"[10, 20, 30]"
v-model:current-page=
"state.apiData.page"
background
v-model:page-size=
"state.apiData.limit"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"state.tableData.total"
>
</el-pagination>
</div>
<DetailDialog
ref=
"DetailDialogRef"
@
refresh=
"getList()"
/>
<AddDialog
ref=
"AddDialogRef"
@
refresh=
"getList()"
/>
<EditDialog
ref=
"EditDialogRef"
@
refresh=
"getList()"
/>
<ImporDialog
ref=
"ImporDialogRef"
@
refresh=
"getList()"
/>
</el-card>
</div>
</div>
</template>
<
script
setup
name=
"taskPackage-list"
>
import
{
getCurrentInstance
}
from
'
vue
'
;
import
{
normApi
}
from
'
/@/api/norm/index
'
;
import
{
taskPackageApi
}
from
'
/@/api/taskPackage/index
'
;
import
{
excelFileApi
}
from
'
/@/api/excelFile/index
'
;
import
{
ElMessageBox
,
ElMessage
}
from
'
element-plus
'
;
// 引入组件
const
Breadcrumb
=
defineAsyncComponent
(()
=>
import
(
'
/@/layout/navBars/breadcrumb/breadcrumb.vue
'
));
const
AddDialog
=
defineAsyncComponent
(()
=>
import
(
'
/@/views/norm/list/dialog.vue
'
));
// const DetailDialog = defineAsyncComponent(() => import('/@/views/norm/list/details.vue'));
const
EditDialog
=
defineAsyncComponent
(()
=>
import
(
'
/@/views/norm/list/edit.vue
'
));
const
ImporDialog
=
defineAsyncComponent
(()
=>
import
(
'
/@/views/norm/list/impor.vue
'
));
const
router
=
useRouter
();
// 定义变量内容
const
AddDialogRef
=
ref
()
const
DetailDialogRef
=
ref
()
const
EditDialogRef
=
ref
()
const
ImporDialogRef
=
ref
()
const
multipleTableRef
=
ref
()
const
state
=
reactive
({
apiData
:
{
page
:
1
,
limit
:
10
,
name
:
''
,
task_id
:
''
,
search_task_id
:
''
,
},
tableData
:
{
data
:
[],
loading
:
false
,
total
:
0
},
tableHeight
:
'
30vh
'
,
isHide
:
false
,
taskList
:[],
Ids
:[],
});
// 获取任务列表
const
getTaskList
=
()
=>
{
taskPackageApi
().
taskPackageList
({
page
:
-
1
,
limit
:
-
1
}).
then
(
res
=>
{
state
.
taskList
=
res
.
data
})
}
// 页面加载时
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
-
120
-
32
+
"
px
"
;
});
const
searchChange
=
()
=>
{
state
.
apiData
.
page
=
1
getList
()
}
// 分页改变
const
onHandleSizeChange
=
(
val
)
=>
{
state
.
apiData
.
limit
=
val
;
getList
();
};
const
onHandleCurrentChange
=
(
val
)
=>
{
state
.
apiData
.
page
=
val
;
getList
();
};
/**
* 重置按钮
*/
const
reset
=
()
=>
{
state
.
apiData
.
page
=
1
state
.
apiData
.
name
=
''
;
state
.
apiData
.
search_task_id
=
''
;
getList
()
}
// 获取列表
const
getList
=
()
=>
{
state
.
tableData
.
loading
=
true
normApi
().
normList
(
state
.
apiData
).
then
(
res
=>
{
state
.
tableData
.
loading
=
false
state
.
tableData
.
data
=
res
.
data
.
data
state
.
tableData
.
total
=
res
.
data
.
total
}).
catch
(()
=>
{
state
.
tableData
.
loading
=
false
})
}
const
tableSelection
=
(
val
)
=>
{
if
(
val
){
state
.
Ids
=
[];
val
.
forEach
(
item
=>
{
state
.
Ids
.
push
(
item
.
id
);
});
}
console
.
log
(
state
.
Ids
)
}
/**
* 返回上一级页面
*/
const
backToPreviousPage
=
()
=>
{
// this.$router.push('/target')
router
.
go
(
-
1
);
}
// 发布指标弹窗
const
release
=
()
=>
{
AddDialogRef
.
value
.
openDialog
();
}
// 详情弹窗
const
details
=
(
norm_id
)
=>
{
DetailDialogRef
.
value
.
openDialog
(
norm_id
);
}
// 编辑弹窗
const
edit
=
(
norm_id
)
=>
{
EditDialogRef
.
value
.
openDialog
(
norm_id
);
}
// 导入数据窗口
const
importFile
=
()
=>
{
ImporDialogRef
.
value
.
openDialog
(
state
.
apiData
.
task_id
);
}
// 导出文件
const
exportFile
=
(
id
)
=>
{
let
query
=
{
id
:
id
}
excelFileApi
().
normExportFile
(
query
).
then
(
res
=>
{
if
(
res
.
data
){
let
url
=
res
.
data
;
const
iframe
=
document
.
createElement
(
'
iframe
'
);
// 创建一个HTML 元素
iframe
.
style
.
display
=
'
none
'
;
// 隐藏iframe 防止影响页面
iframe
.
style
.
height
=
0
;
// 高度设置0 防止影响页面
iframe
.
src
=
url
;
// 下载链接
document
.
body
.
appendChild
(
iframe
);
// 这一行必须,iframe挂在到dom树上才会发请求 // 5分钟之后删除
setTimeout
(()
=>
{
iframe
.
remove
();
},
5
*
60
*
1000
);
ElMessage
.
success
(
'
导出成功,请点击下载列表查看!
'
);
}
else
{
ElMessage
.
error
(
'
导出失败!
'
);
}
}).
catch
(()
=>
{
})
}
// 多选导出
const
multipleExports
=
()
=>
{
excelFileApi
().
multipleExportFile
({
ids
:
state
.
Ids
}).
then
(
res
=>
{
excelFileApi
().
multipleExportFile
({
ids
:
state
.
Ids
}).
then
(
res
=>
{
if
(
res
.
data
){
let
url
=
res
.
data
;
const
iframe
=
document
.
createElement
(
'
iframe
'
);
// 创建一个HTML 元素
iframe
.
style
.
display
=
'
none
'
;
// 隐藏iframe 防止影响页面
iframe
.
style
.
height
=
0
;
// 高度设置0 防止影响页面
iframe
.
src
=
url
;
// 下载链接
document
.
body
.
appendChild
(
iframe
);
// 这一行必须,iframe挂在到dom树上才会发请求 // 5分钟之后删除
setTimeout
(()
=>
{
iframe
.
remove
();
},
5
*
60
*
1000
);
ElMessage
.
success
(
'
导出成功,请点击下载列表查看!
'
);
}
else
{
ElMessage
.
error
(
'
导出失败!
'
);
}
multipleTableRef
.
value
.
clearSelection
();
getList
();
}).
catch
(()
=>
{
getList
();
})
}).
catch
(()
=>
{
getList
();
})
}
</
script
>
<
style
lang=
"scss"
scoped
>
.page-main
{
height
:
calc
(
100vh
-
90px
-
75px
);
}
</
style
>
src/views/dataScreening/list/whole.vue
0 → 100644
View file @
ecd0dc79
This diff is collapsed.
Click to expand it.
src/views/norm/list/index.vue
View file @
ecd0dc79
...
...
@@ -10,7 +10,11 @@
<el-option
v-for=
"(item, index) in state.taskList"
:key=
"index"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
<el-input
class=
"search-item"
placeholder=
"请输入子任务名称"
v-model=
"state.apiData.name"
size=
"default"
<el-select
v-model=
"state.apiData.norm_id"
placeholder=
"请选择子任务"
size=
"default"
@
change=
"searchChange"
clearable
filterable
style=
"width:300px;margin-right: 20px;"
>
<el-option
v-for=
"(item, index) in state.normList"
:key=
"index"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
<el-input
class=
"search-item"
placeholder=
"请输入子任务名称"
v-model=
"state.apiData.name"
size=
"default"
style=
"width: 220px;"
clearable
@
change=
"searchChange()"
>
</el-input>
<el-button
size=
"default"
type=
"primary"
@
click=
"searchChange()"
>
查询
</el-button>
...
...
@@ -63,10 +67,16 @@
<span
style=
"color:#F56C6C"
v-else
>
{{
scope
.
row
.
collectsQuantity
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"created_at"
width=
"180"
label=
"类型"
show-overflow-tooltip
align=
"center"
>
<
template
#default=
"scope"
>
<span
style=
"color:#F56C6C"
v-if=
"scope.row.type==1"
>
文件导入
</span>
<span
style=
"color:#409EFF"
v-else
>
手动发布
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"480"
fixed=
"right"
align=
"center"
>
<
template
#default=
"scope"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"details(scope.row.id)"
>
查看详情
</el-button>
<el-button
size=
"small"
@
click=
"edit(scope.row.id)"
>
修改子任务
</el-button>
<el-button
size=
"small"
v-if=
"scope.row.type!=1"
@
click=
"edit(scope.row.id)"
>
修改子任务
</el-button>
<el-button
size=
"small"
type=
"warning"
@
click=
"exportFile(scope.row.id)"
>
导出数据
</el-button>
<el-button
size=
"small"
v-if=
"state.admin==1"
type=
"danger"
@
click=
"deleteNorm(scope.row.id)"
>
删除子任务
</el-button>
</
template
>
...
...
@@ -115,6 +125,7 @@ const state = reactive({
limit
:
10
,
name
:
''
,
task_id
:
''
,
norm_id
:
''
,
search_task_id
:
''
,
},
tableData
:
{
...
...
@@ -127,6 +138,7 @@ const state = reactive({
taskList
:[],
Ids
:[],
admin
:
Session
.
get
(
'
userInfo
'
).
id
,
// 1管理员
normList
:[],
});
// 获取任务列表
const
getTaskList
=
()
=>
{
...
...
@@ -134,7 +146,12 @@ const getTaskList = () => {
state
.
taskList
=
res
.
data
})
}
// 获取指标列表
const
getNormList
=
()
=>
{
normApi
().
normList
({
page
:
-
1
,
limit
:
-
1
}).
then
(
res
=>
{
state
.
normList
=
res
.
data
})
}
// 页面加载时
onMounted
(()
=>
{
// getDepatment()
...
...
@@ -144,6 +161,7 @@ onMounted(() => {
}
getList
()
getTaskList
()
getNormList
();
state
.
tableHeight
=
getCurrentInstance
().
refs
.
pageMain
.
offsetHeight
-
100
-
52
+
"
px
"
;
});
...
...
@@ -283,9 +301,7 @@ const multipleExports= () => {
ElMessage
.
error
(
'
导出失败!
'
);
}
multipleTableRef
.
value
.
clearSelection
();
getList
();
}).
catch
(()
=>
{
getList
();
})
}
</
script
>
...
...
src/views/norm/list/pdf.vue
View file @
ecd0dc79
<
template
>
<div
class=
"system-menu-container"
>
<div
class=
"page-main"
ref=
"pageMain"
>
<el-card
shadow=
"hover"
style=
"height:100%;"
>
asdsad
</el-card>
</div>
<div
class=
"system-role-dialog-container"
>
<el-dialog
title=
"所有文件"
v-model=
"state.isShowDialog"
width=
"60%"
@
close=
"closeDialog"
:close-on-click-modal=
"false"
>
<el-table
border
:data=
"state.tableData"
style=
"width: 100%"
ref=
"multipleTableRef"
>
<el-table-column
label=
"序号"
type=
"index"
width=
"100"
show-overflow-tooltip
align=
"center"
></el-table-column>
<el-table-column
prop=
"name"
width=
"500"
label=
"文件名称"
show-overflow-tooltip
align=
"center"
>
</el-table-column>
<el-table-column
prop=
"fileurl"
width=
"300"
label=
"地址"
show-overflow-tooltip
align=
"center"
></el-table-column>
<el-table-column
width=
"200"
label=
"操作"
show-overflow-tooltip
align=
"center"
>
<template
#default
="
scope
"
>
<el-link
type=
"primary"
:href=
"scope.row.url"
target=
"_blank"
>
查看文件
</el-link>
</
template
>
</el-table-column>
</el-table>
</el-dialog>
</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
>
</template>
<
script
setup
name=
"systemRoleDialog"
>
import
{
claimTasksApi
}
from
'
/@/api/claimTasks
'
import
{
ElMessage
}
from
'
element-plus
'
;
import
{
toolsApi
}
from
'
/@/api/tools
'
// 定义子组件向父组件传值/事件
const
emit
=
defineEmits
([
'
refresh
'
]);
// 定义变量内容
const
dialogFormRef
=
ref
();
const
router
=
useRouter
();
const
state
=
reactive
({
isShowDialog
:
false
,
tableData
:[],
});
// 打开弹窗
const
openDialog
=
(
id
)
=>
{
state
.
tableData
=
[];
let
query
=
{
id
:
id
}
claimTasksApi
().
normGetPdfList
(
query
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
){
let
pdfList
=
''
;
let
pdfNameList
=
''
;
if
(
res
.
data
.
fileListPdf
&&
typeof
res
.
data
.
fileListPdf
==
"
string
"
){
pdfList
=
res
.
data
.
fileListPdf
.
split
(
'
,
'
);
}
if
(
res
.
data
.
file_name
&&
typeof
res
.
data
.
file_name
==
"
string
"
){
pdfNameList
=
res
.
data
.
file_name
.
split
(
'
,
'
);
}
pdfList
.
forEach
(
function
(
item
,
index
,
arr
)
{
state
.
tableData
.
push
({
name
:
pdfNameList
[
index
],
fileurl
:
item
,
url
:
item
});
});
console
.
log
(
state
.
tableData
)
}
else
{
ElMessage
.
success
(
'
获取不到相关信息!
'
);
}
state
.
isShowDialog
=
true
}).
catch
(()
=>
{
})
};
// 关闭弹窗
const
closeDialog
=
()
=>
{
state
.
isShowDialog
=
false
;
};
// 暴露变量
defineExpose
({
openDialog
,
});
onMounted
(()
=>
{
if
(
router
.
currentRoute
.
value
.
query
.
task_id
){
state
.
formItem
.
addItem
.
task_id
=
router
.
currentRoute
.
value
.
query
.
task_id
}
});
</
script
>
<
style
scoped
lang=
"scss"
>
.el-dialog__body
{
display
:
flex
;
justify-content
:
center
;
align-content
:
center
;
}
.el-input.is-disabled
{
background
:
#fff
!
important
;
color
:
var
(
--
el-radio-text-color
)
!
important
;
-webkit-text-fill-color
:
var
(
--
el-radio-text-color
)
!
important
;
}
:deep
(
.el-input
.el-input__inner
)
{
background
:
#fff
!
important
;
color
:
var
(
--
el-radio-text-color
)
!
important
;
-webkit-text-fill-color
:
var
(
--
el-radio-text-color
)
!
important
;
}
:deep
(
.el-input
.el-input__wrapper
)
{
background
:
#fff
!
important
;
color
:
var
(
--
el-radio-text-color
)
!
important
;
-webkit-text-fill-color
:
var
(
--
el-radio-text-color
)
!
important
;
}
.el-textarea.is-disabled
{
background
:
#fff
!
important
;
color
:
var
(
--
el-radio-text-color
)
!
important
;
-webkit-text-fill-color
:
var
(
--
el-radio-text-color
)
!
important
;
}
:deep
(
.el-textarea
.el-textarea__inner
)
{
background
:
#fff
!
important
;
color
:
var
(
--
el-radio-text-color
)
!
important
;
-webkit-text-fill-color
:
var
(
--
el-radio-text-color
)
!
important
;
}
:deep
(
.el-textarea
.el-textarea__wrapper
)
{
background
:
#fff
!
important
;
color
:
var
(
--
el-radio-text-color
)
!
important
;
-webkit-text-fill-color
:
var
(
--
el-radio-text-color
)
!
important
;
}
</
style
>
\ No newline at end of file
src/views/norm/list/whole.vue
View file @
ecd0dc79
...
...
@@ -4,7 +4,6 @@
<Breadcrumb
/>
</div>
<div
class=
"header-search flex space-between"
>
<div
@
click=
"getPdfList"
>
123123
</div>
<div>
<el-page-header
@
back=
"backToPreviousPage"
>
</el-page-header>
...
...
@@ -32,6 +31,8 @@
</el-pagination>
</div>
</el-card>
<PdfDialog
ref=
"PdfDialogRef"
/>
<!-- @refresh="getList()" -->
</div>
</div>
</template>
...
...
@@ -42,12 +43,11 @@
import
{
toolsApi
}
from
'
/@/api/tools
'
import
{
getPdfUrl
}
from
"
/@/utils/getHost.js
"
;
const
Breadcrumb
=
defineAsyncComponent
(()
=>
import
(
'
/@/layout/navBars/breadcrumb/breadcrumb.vue
'
));
const
PdfDialog
=
defineAsyncComponent
(()
=>
import
(
'
/@/views/norm/list/pdf.vue
'
));
const
router
=
useRouter
();
// 定义子组件向父组件传值/事件
const
emit
=
defineEmits
([
'
refresh
'
]);
// 定义变量内容
const
dialogFormRef
=
ref
();
const
PdfDialogRef
=
ref
()
const
state
=
reactive
({
loading
:
false
,
...
...
@@ -183,7 +183,10 @@
return
false
;
}
}
//校验链接
function
handleClick
(
id
){
PdfDialogRef
.
value
.
openDialog
(
id
);
}
/**
* 自定义内容格式化输出
* @param {*} vlaue
...
...
@@ -196,11 +199,11 @@
let
str
=
checkUrl
(
item
);
if
(
str
){
if
(
index
==
0
){
txt
+=
"
<a style='color:#409EFF;' href='
"
+
item
+
"
' target ='_blank'>
"
+
item
+
"
</a>
"
;
txt
+=
"
<a style='color:#409EFF;
cursor:pointer
' href='
"
+
item
+
"
' target ='_blank'>
"
+
item
+
"
</a>
"
;
}
else
if
(
index
>
4
){
txt
=
"
<
a style='color:#409EFF;' href='
"
+
state
.
pdfUrl
+
id
+
"
' target ='_blank'>查看所有文件</a
>
"
;
txt
=
"
<
div style='color:#409EFF;cursor:pointer' onclick='handleClick(
"
+
id
+
"
)'>查看所有文件</div
>
"
;
}
else
{
txt
+=
"
<br><br><a style='color:#409EFF;' href='
"
+
item
+
"
' target ='_blank'>
"
+
item
+
"
</a>
"
;
txt
+=
"
<br><br><a style='color:#409EFF;
cursor:pointer
' href='
"
+
item
+
"
' target ='_blank'>
"
+
item
+
"
</a>
"
;
}
}
else
{
txt
+=
item
;
...
...
@@ -231,15 +234,16 @@
onMounted
(()
=>
{
if
(
router
.
currentRoute
.
value
.
query
.
norm_id
){
state
.
apiData
.
id
=
router
.
currentRoute
.
value
.
query
.
norm_id
// state.isHide = true // 如果有任务ID才允许发布
getInfo
()
state
.
pdfUrl
=
getPdfUrl
()
}
else
{
router
.
go
(
-
1
);
}
state
.
tableHeight
=
getCurrentInstance
().
refs
.
pageMain
.
offsetHeight
-
80
-
22
+
"
px
"
;
window
.
handleClick
=
handleClick
if
(
router
.
currentRoute
.
value
.
query
.
norm_id
){
state
.
apiData
.
id
=
router
.
currentRoute
.
value
.
query
.
norm_id
// state.isHide = true // 如果有任务ID才允许发布
getInfo
()
state
.
pdfUrl
=
getPdfUrl
()
}
else
{
router
.
go
(
-
1
);
}
state
.
tableHeight
=
getCurrentInstance
().
refs
.
pageMain
.
offsetHeight
-
80
-
22
+
"
px
"
;
});
</
script
>
...
...
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