国际化列表导出

uat_us
wangxiaoshuang 2024-10-29 15:46:56 +08:00
parent ee9a30f6d0
commit 19a6371008
2 changed files with 83 additions and 0 deletions

View File

@ -230,3 +230,12 @@ export function getCommonJudgeRatioList_Export(data) {
data
})
}
// 导出国际化列表
export function GetInternationalizationList_Export(data) {
return requestDownload({
url: `/ExcelExport/GetInternationalizationList_Export`,
responseType: 'blob',
method: 'post',
data
})
}

View File

@ -87,6 +87,30 @@
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('system:l18n:form:createTime')">
<el-date-picker
v-model="datetimerange_createTime"
type="datetimerange"
:default-time="['00:00:00', '23:59:59']"
:start-placeholder="$t('system:l18n:search:beginTime')"
:end-placeholder="$t('system:l18n:search:endTime')"
value-format="yyyy-MM-dd HH:mm:ss"
@change="(val) => handleDatetimeChange(val, 'createTime')"
style="width: 250px"
/>
</el-form-item>
<el-form-item :label="$t('system:l18n:form:uploadTime')">
<el-date-picker
v-model="datetimerange_updateTime"
type="datetimerange"
:default-time="['00:00:00', '23:59:59']"
:start-placeholder="$t('system:l18n:search:beginTime')"
:end-placeholder="$t('system:l18n:search:endTime')"
value-format="yyyy-MM-dd HH:mm:ss"
@change="(val) => handleDatetimeChange(val, 'updateTime')"
style="width: 250px"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
@ -96,6 +120,15 @@
>
查询
</el-button>
<!-- 重置 -->
<el-button
size="mini"
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
{{ $t('common:button:reset') }}
</el-button>
<el-button
type="primary"
icon="el-icon-plus"
@ -121,6 +154,14 @@
>
批量更新
</el-button>
<el-button
size="mini"
type="primary"
icon="el-icon-download"
@click="exportTable"
>
{{ $t('common:button:export') }}
</el-button>
</el-form-item>
</el-form>
<el-table
@ -296,6 +337,7 @@ import {
getPublishVersionSelect,
batchUpdateInternationalInfo,
} from '@/api/admin'
import { GetInternationalizationList_Export } from '@/api/export'
import Pagination from '@/components/Pagination'
import I18nForm from './components/I18nForm.vue'
import BatchAddForm from './components/BatchAddForm.vue'
@ -313,6 +355,10 @@ const searchDataDefault = () => {
SortField: '',
PageIndex: 1,
PageSize: 20,
BeginCreateTime: null,
EndCreatTime: null,
BeginUpdateTime: null,
EndUpdateTime: null,
}
}
export default {
@ -327,6 +373,8 @@ export default {
loading: false,
PublishVersionList: [],
selectTableList: [],
datetimerange_createTime: [],
datetimerange_updateTime: [],
}
},
mounted() {
@ -420,6 +468,8 @@ export default {
//
handleReset() {
this.searchData = searchDataDefault()
this.datetimerange_createTime = []
this.datetimerange_updateTime = []
this.getList()
},
//
@ -459,6 +509,30 @@ export default {
handleSelectionChange(val) {
this.selectTableList = val
},
handleDatetimeChange(val, key) {
if (val) {
if (key === 'createTime') {
this.searchData.BeginCreateTime = val[0]
this.searchData.EndCreatTime = val[1]
}
if (key === 'updateTime') {
this.searchData.BeginUpdateTime = val[0]
this.searchData.EndUpdateTime = val[1]
}
} else {
if (key === 'createTime') {
this.searchData.BeginCreateTime = ''
this.searchData.EndCreatTime = ''
}
if (key === 'updateTime') {
this.searchData.BeginUpdateTime = ''
this.searchData.EndUpdateTime = ''
}
}
},
exportTable() {
return GetInternationalizationList_Export(this.searchData)
},
},
}
</script>