参数收集清单-添加数据导出功能

This commit is contained in:
zyx.net
2022-07-21 16:01:56 +08:00
parent 8d18ed2bdd
commit 4c5e71459a
4 changed files with 39 additions and 22 deletions
+1
View File
@@ -421,6 +421,7 @@ module.exports = {
MessageNotification: 'Message Notification',
SeeMore: 'See More',
OperationSuccessful: 'Operation Successful',
Intheexport: 'In The Export...',
OperationFailed: 'Operation Failed',
PersonnelSelection: 'Select ',
EmployeeNumber: 'Employee ID',
+1
View File
@@ -426,6 +426,7 @@ module.exports = {
MessageNotification: '消息通知',
SeeMore: '查看更多',
OperationSuccessful: '操作成功',
Intheexport: '导出中...',
operationFailed: '操作失败',
PersonnelSelection: '人员选择',
EmployeeNumber: '员工号',
@@ -3,7 +3,7 @@
<div class="Virtual-detail-header" style="position: fixed;top: 0">
<div class="Virtual-detail-title">
<span>
{{$t('ParameteItemCollectionList')}}(Model - year market)——{{$t(this.paramsManifest.title)}}
{{$t('ParameteItemCollectionList')}}({{$t(this.$route.query.projectName)}})——{{$t(this.paramsManifest.title)}}
</span>
</div>
</div>
@@ -108,10 +108,10 @@
<!-- // R&H Manager manager-->
<!-- // 系统管理员 admin-->
<!-- // 游客 guest-->
<a-popconfirm overlayClassName='popconfirm' placement="bottomRight" v-if='currentPersonRole == "homo"'>
<a-popconfirm overlayClassName='popconfirm' placement="bottomRight" v-if='currentPersonRole == "homo" || currentPersonRole == "sdt"'>
<template slot="title" id="popconfirm">
<!-- 添加-->
<div @click="handleAdd" class="operator-text-title">
<div @click="handleAdd" class="operator-text-title" v-if='currentPersonRole == "homo"'>
<a-icon type="plus"/>
{{$t('addTo')}}
</div>
@@ -120,18 +120,24 @@
<!-- <a-icon type="solution"/>-->
<!-- {{$t('distributionAndCollection')}}-->
<!-- </div>-->
<!-- 导出-->
<div @click="handleExport" class="operator-text-title"
v-if='currentPersonRole == "homo" || currentPersonRole == "sdt"'>
<a-icon type="export"/>
{{$t('export')}}
</div>
<!-- 一键下发收集 -->
<div @click="defOneclickCollection" class="operator-text-title" v-if='currentPersonRole == "homo"'>
<a-icon type="solution"/>
{{$t('OneclickCollection')}}
</div>
<!-- 冻结配置-->
<div @click="freezeConfiguration" class="operator-text-title">
<div @click="freezeConfiguration" class="operator-text-title" v-if='currentPersonRole == "homo"'>
<a-icon type="solution"/>
{{$t('FreezeConfiguration')}}
</div>
<!-- 同步上报库 -->
<div @click="handleSynchronousReportLibraryJurisdiction" class="operator-text-title">
<div @click="handleSynchronousReportLibraryJurisdiction" class="operator-text-title" v-if='currentPersonRole == "homo"'>
<a-icon type="setting"/>
{{$t('SynchronousReportLibrary')}}
</div>
@@ -141,16 +147,16 @@
<!-- {{$t('TaskCutOffTime')}}-->
<!-- </div>-->
<!-- 批量删除-->
<div @click="handleDelJurisdiction" class="operator-text-title">
<div @click="handleDelJurisdiction" class="operator-text-title" v-if='currentPersonRole == "homo"'>
<a-icon type="delete"/>
{{$t('BatchDelete')}}
</div>
<div @click="bringInTheProjectInterfaceClick" class="operator-text-title">
<div @click="bringInTheProjectInterfaceClick" class="operator-text-title" v-if='currentPersonRole == "homo"'>
<a-icon type="profile"/>
{{$t('bringInTheProjectInterface')}}
</div>
</template>
<div class="operator-text" style="position: relative">
<div class="operator-text" style="position: relative " @click='morepop' v-if='currentPersonRole == "homo" || currentPersonRole == "sdt"'>
<span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }}
</div>
</a-popconfirm>
@@ -192,12 +198,7 @@
<a-icon type="delete"/>
{{$t('CompulsoryWithdrawal')}}
</div>
<!-- 导出-->
<div @click="handleExport" class="operator-text"
v-if='currentPersonRole == "homo" || currentPersonRole == "sdt"'>
<a-icon type="export"/>
{{$t('export')}}
</div>
<!-- 角色切换 -->
<div class="operator-text"
v-if="!this.$route.query.it"
@@ -808,14 +809,26 @@
},
//导出
handleExport(){
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let query = {
...this.queryParam,
...this.queryParamQuery,
ids: selectedRowKeys.join(','),
dummyInventoryBaseId: this.$route.query.id
console.log(this.$route.query)
let long = localStorage.getItem('language')
this.cut = ''
if (long && long === 'zh-cn') {
this.cut = 'cn'
} else if (long && long === 'en-us') {
this.cut = 'en'
}
downloadFile(this.url.exportData, this.$route.query.name + this.$t('VirtualList') + '.zip', query, this.Deselect)
let query = {
paramsManifestId: this.paramsManifest.id,
paramsTemplateId: this.$route.query.paramsTemplateId,
paramsTemplatePublishVersion:1,
cut: this.cut,
exportName:this.$route.query.projectName + '(' + this.$route.query.title + ')'
}
console.log(query)
getAction('/params/collectManifest/exportAll', query).then((res) => {
this.$message.success(this.$t('Intheexport'))
this.textLoading = false
})
},
// 高级搜索
handleSuperQuery(params, matchType) {
@@ -255,7 +255,9 @@
localStorage.setItem('paramsManifest', JSON.stringify(item))
let newUrl = _this.$router.resolve({
path: '/ParameterItemCollection',
query: item
query: item
// projectName:this.$route.query.projectName
})
window.open(newUrl.href, '_blank')
} else {