添加导出列表
This commit is contained in:
@@ -1973,4 +1973,6 @@ module.exports = {
|
||||
by:'By',
|
||||
Changeto:'Change to',
|
||||
emptyc:'empty',
|
||||
Exportsuccessexportlist:'Export success! Check in the export list',
|
||||
Derivedlist:'Derived list',
|
||||
}
|
||||
@@ -3929,4 +3929,6 @@ module.exports = {
|
||||
by:'由',
|
||||
Changeto:'改为了',
|
||||
emptyc:'空',
|
||||
Exportsuccessexportlist:'导出成功!请在导出列表中查看',
|
||||
Derivedlist:'导出列表',
|
||||
}
|
||||
@@ -185,6 +185,11 @@
|
||||
<a-icon type="export" :rotate="-90"/>
|
||||
{{$t('dataExport')}}
|
||||
</div>
|
||||
<!-- 导出列表-->
|
||||
<div @click="Derivedlist" class="operator-text-title" v-if='currentPersonRole == "homo"'>
|
||||
<a-icon type="export" :rotate="-90"/>
|
||||
{{$t('Derivedlist')}}
|
||||
</div>
|
||||
<!-- 一键下发收集 -->
|
||||
<div @click="defOneclickCollection" class="operator-text-title" v-if='currentPersonRole == "homo"'>
|
||||
<a-icon type="solution"/>
|
||||
@@ -266,6 +271,11 @@
|
||||
<a-icon type="export"/>
|
||||
{{$t('dataExport')}}
|
||||
</div>
|
||||
<!-- 导出列表-->
|
||||
<div @click="Derivedlist" class="operator-text" v-if='currentPersonRole == "sdt" || currentPersonRole == "admin" || currentPersonRole == "studio"'>
|
||||
<a-icon type="export"/>
|
||||
{{$t('Derivedlist')}}
|
||||
</div>
|
||||
<!-- 引用参数-->
|
||||
<div @click="referenceparameter" class="operator-text" v-if='currentPersonRole == "dre" || currentPersonRole == "homo"'>
|
||||
<a-icon type="plus"/>
|
||||
@@ -598,6 +608,50 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 导出列表-->
|
||||
<a-modal
|
||||
:title="$t('Derivedlist')"
|
||||
:width="900"
|
||||
:visible="exportvisible"
|
||||
:confirm-loading="confirmLoading"
|
||||
:maskClosable="false"
|
||||
@ok="exportok"
|
||||
@cancel="exportvisiblecancel"
|
||||
>
|
||||
<!-- <historyTable :columnshistory='columnshistory' :dataSourcehistory='dataSourcehistory'></historyTable>-->
|
||||
<a-table
|
||||
class="table"
|
||||
:components="drag(columnsexport,'columnsexport')"
|
||||
:columns="columnsexport"
|
||||
:pagination="false"
|
||||
rowKey="id"
|
||||
:scroll="{x: '100%',y: 400}"
|
||||
:data-source="dataSourceexport"
|
||||
:loading="loading"
|
||||
>
|
||||
<span slot="operation" slot-scope="text,record">
|
||||
<a @click="exportdata(record)" v-if="record.state == '1'">{{$t('download')}}</a>
|
||||
<a style="margin-left: 5px;" @click="exportdelete(record)">{{$t('delete')}}</a>
|
||||
</span>
|
||||
<!-- <span slot="detailText" slot-scope="text,record">-->
|
||||
<!-- <span class="text" :title="text">-->
|
||||
<!-- {{text && text.length > 40?text.slice(0,39)+'...':text}}-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
</a-table>
|
||||
<div class="page" v-if="dataSourceexport.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSizehistory"
|
||||
:total="total"
|
||||
:current="pageNohistory"
|
||||
@change="onChangehistory"
|
||||
@showSizeChange="SizeChangehistory"
|
||||
/>
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 数据导出弹框-->
|
||||
<a-modal
|
||||
:title="$t('dataExport')"
|
||||
@@ -639,6 +693,27 @@
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
<!-- 数据导出异步弹窗-->
|
||||
<a-modal
|
||||
:title="$t('dataExport')"
|
||||
:width="500"
|
||||
:visible="ExportFailed"
|
||||
:maskClosable="false"
|
||||
@ok="exportsubmit"
|
||||
@cancel="exportcancel"
|
||||
>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div style='font-size: 18px;margin-bottom: 20px;display: flex;justify-content: center'
|
||||
class="box-title-text-index">
|
||||
<span>{{$t('Exportsuccessexportlist')}}</span>
|
||||
<!-- <div>{{$t('NiOnumberis')}}{{ item.nioNumber }},{{$t('Statusis')}}-->
|
||||
<!-- <span style='color: red'>{{ item.state }}</span>,{{$t('NoOperationPermissionForthisbutton')}}。-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-modal>
|
||||
<JLoading :loading="textLoading">{{this.$t('pleaseWaitWhileRunning')}}</JLoading>
|
||||
<batchUpdateDeadline ref="batchUpdateDeadlineRef" @batchUpdateDeadlineForm="batchUpdateDeadlineForm"/>
|
||||
|
||||
@@ -666,6 +741,7 @@
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import Vue from 'vue'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
|
||||
|
||||
export default {
|
||||
name: 'ParameterItemCollectionList',
|
||||
@@ -685,6 +761,7 @@
|
||||
globalAdvancedQuery,
|
||||
batchUpdateDeadline
|
||||
},
|
||||
mixins:[ResizeHeader, ResizeColumnProvide],
|
||||
data() {
|
||||
this.statusList = [
|
||||
{
|
||||
@@ -742,6 +819,10 @@
|
||||
// 系统管理员 admin
|
||||
// 游客 guest
|
||||
toggleSearchStatus: false,
|
||||
ExportFailed: false,
|
||||
pageNohistory: 1,
|
||||
pageSizehistory: 10,
|
||||
exportvisible: false,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('title'),
|
||||
@@ -787,6 +868,35 @@
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
}
|
||||
],
|
||||
columnsexport: [
|
||||
{
|
||||
title: this.$t('fileName'),
|
||||
align: 'left',
|
||||
dataIndex: 'fileName',
|
||||
width: 300,
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'detailText' }
|
||||
},
|
||||
{
|
||||
title: this.$t('status'),
|
||||
align: 'left',
|
||||
dataIndex: 'stateText',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: this.$t('Exporttime'),
|
||||
align: 'left',
|
||||
dataIndex: 'createTime',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'left',
|
||||
fixed: 'right',
|
||||
width: 100,
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
}
|
||||
],
|
||||
fieldList: [
|
||||
{
|
||||
type: '',
|
||||
@@ -829,6 +939,7 @@
|
||||
checkAll: false,
|
||||
visible: false,
|
||||
selectedValue: [],
|
||||
dataSourceexport: [],
|
||||
checkedList: ['nio_number', 'params_name', 'operation'],
|
||||
// customizeList: [
|
||||
// {
|
||||
@@ -1448,6 +1559,75 @@
|
||||
// let name = this.$route.query.projectName + '(' + this.$route.query.title + ')' + '.zip'
|
||||
// downloadFile('/params/collectManifest/exportAll', name, query, this.selectClear)
|
||||
},
|
||||
// 导出列表
|
||||
Derivedlist(){
|
||||
this.exportvisible = true
|
||||
this.expoteList()
|
||||
},
|
||||
onChangehistory(page, pageSize) {
|
||||
this.pageNohistory = page
|
||||
this.expoteList()
|
||||
},
|
||||
SizeChangehistory(page, pageSize) {
|
||||
this.pageNohistory = 1
|
||||
this.pageSizehistory = pageSize
|
||||
this.expoteList()
|
||||
},
|
||||
exportok(){
|
||||
this.exportvisible = false
|
||||
},
|
||||
exportvisiblecancel(){
|
||||
this.exportvisible = false
|
||||
},
|
||||
exportsubmit(){
|
||||
this.ExportFailed = false
|
||||
},
|
||||
exportcancel(){
|
||||
this.ExportFailed = false
|
||||
},
|
||||
exportdata(item){
|
||||
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.fileId })
|
||||
},
|
||||
exportdelete(item){
|
||||
this.$confirm({
|
||||
title: this.$t('confirmDeletion'),
|
||||
content: '',
|
||||
onOk:
|
||||
async () => {
|
||||
getAction(`tag/onlCgformArea/delete`, { id: item.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.expoteList()
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
expoteList(val) {
|
||||
let query = {
|
||||
pageNo: this.pageNohistory,
|
||||
pageSize: this.pageSizehistory,
|
||||
paramsManifestId: this.$route.query.id,
|
||||
paramsCollectManifestId: this.paramsReportDetailId
|
||||
}
|
||||
this.loading = true
|
||||
getAction('params/paramsCollectExport/page', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSourceexport = res.result.records
|
||||
// if (this.dataSourcehistory && this.dataSourcehistory.length > 0) {
|
||||
// this.dataSourcehistory.forEach(val => {
|
||||
// val.logContent = val.logContent.replace(/\"/g, '<span class=\'textData\'>"</span>')
|
||||
// })
|
||||
// }
|
||||
this.total = res.result.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
// 导出确定
|
||||
handleExportSubmit() {
|
||||
this.$refs.dataExportruleForm.validate(valid => {
|
||||
@@ -1470,7 +1650,13 @@
|
||||
exportName: this.$route.query.projectName + '(' + this.$route.query.title + ')'
|
||||
}
|
||||
let name = this.$route.query.projectName + '(' + this.$route.query.title + ')' + '.zip'
|
||||
downloadFile('/params/collectManifest/exportAll', name, query, this.selectClear)
|
||||
getAction('/params/collectManifest/exportAll', query).then((res) => {
|
||||
// if (res.success) {
|
||||
this.dataExportFailed = false
|
||||
this.ExportFailed = true
|
||||
// }
|
||||
})
|
||||
// downloadFile('/params/collectManifest/exportAll', name, query, this.selectClear)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user