体系搜索-列表页对接

This commit is contained in:
zyn
2023-11-15 16:02:46 +08:00
parent 86d0061a5e
commit 3fd045a63b
@@ -87,10 +87,10 @@
>查询</el-button>
<el-button class="common-button-default"
size="mini"
@click="resetSearchForm"
@click="onResetSearch"
>清空</el-button>
<el-button class="common-button-default export-button"
@click="exportList"
@click="exportData"
size="mini"
title="不勾选时默认导出所有筛选项;勾选时仅导出勾选项"
><i class="iconfont">&#xe6e9;</i>列表导出</el-button>
@@ -113,34 +113,45 @@
</el-table-column>
<el-table-column
prop="standSystem"
width="200"
label="体系结构">
</el-table-column>
<el-table-column
prop="standNo"
width="200"
label="标准编号">
</el-table-column>
<el-table-column
prop="standName"
width="200"
label="标准名称">
</el-table-column>
<el-table-column
prop="standState"
width="120"
label="标准状态">
<template slot-scope="scope">
<span v-if="dict.commonState">{{ this.dict.commonState.find(item => item.value === scope.row.standState).label }}</span>
</template>
</el-table-column>
<el-table-column
prop="releaseDate"
width="120"
label="发布日期">
</el-table-column>
<el-table-column
prop="implementDate"
width="120"
label="实施日期">
</el-table-column>
<el-table-column
prop="replaceStandardNo"
width="120"
label="代替标准">
</el-table-column>
<el-table-column
prop="dept"
width="120"
label="编制单位">
</el-table-column>
<el-table-column
@@ -159,15 +170,21 @@
@pageChange="pageChange"
@pageSizeChange="pageSizeChange"></pagination>
<div slot="footer" class="demo-drawer-footer">
<el-button class="common-button-default" round icon="el-icon-close">取消</el-button>
<el-button class="common-button-default" round icon="el-icon-close" @click="onCancel">取消</el-button>
</div>
<loading :loading="loading">加载中...</loading>
<ExportDialog appendToBody ref="exportDialogRef" @exportName="handleExport"></ExportDialog>
</el-dialog>
</template>
<script>
import ExportDialog from '@/components/hzwlComponents/exportDialog'
export default {
name: "DialogTable",
components: {
ExportDialog
},
data () {
const pickerOptions = {
shortcuts: [{
@@ -209,7 +226,7 @@ export default {
dept: '',
draftUserName: '',
page: 1,
pageSize: 10,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
}
return {
@@ -222,7 +239,8 @@ export default {
implementDate: ['', ''],
dict: {},
data: [],
selected: []
selected: [],
loading: false,
}
},
created() {
@@ -232,22 +250,34 @@ export default {
open (cfg) {
this.visible = true
this.title = `${cfg.menuName}( ${cfg.gbStandCount}/${cfg.fbStandCount}/${cfg.esStandCount} )`
this.searchForm.menuId = cfg.id
this.initSearchForm.menuId = cfg.id
this.resetSearchForm()
this.onSearch()
},
onSearch () {
this.loading = true
this.$http._postData('lawss/sarMenuStandardLimit/standardSystemList', this.searchForm).then(res => {
if (res.ok) {
this.data = res.data.list
this.data = res.data.records
this.searchForm.total = res.data.total
}
}).finally(() => {
this.loading = false
})
},
onCancel () {
this.resetSearchForm()
this.visible = false
},
onResetSearch () {
this.resetSearchForm()
this.onSearch()
},
resetSearchForm () {
this.searchForm = JSON.parse(JSON.stringify(this.initSearchForm))
this.releaseDate = ['', '']
this.implementDate = ['', '']
this.onSearch()
this.selected = []
},
releaseDateChange (event) {
this.releaseDate = event
@@ -273,10 +303,28 @@ export default {
},
selectionChange (row) {
this.selected = row
console.log(row)
},
exportList () {
// 导出
exportData () {
this.$refs.exportDialogRef.openModel()
},
handleExport (exportName) {
const selectIds = this.selected.map(item => item.standId).join(',')
const params = {
...this.searchForm,
exportName: exportName,
selectIds
}
let query = '?'
for(let i in params){
if (params[i] && params[i]!=='') {
query = query + i + '=' + params[i] + '&'
}
}
query = query.slice(0,-1)
window.open('/api/lawss/sarMenuStandardLimit/standardSystemListExport' + query)
this.$refs.exportDialogRef.cancel()
this.$message.success('导出信息成功')
},
getDicTypeListCode () {
this.$http._getData('sys/dictype/getDicTypeListCode').then(res => {
@@ -290,7 +338,7 @@ export default {
<style scoped lang="less">
/deep/ .customDialog {
.el-dialog__body {
padding-top: 0 !important;
padding: 0 20px !important;
}
}
</style>