体系搜索-列表页对接
This commit is contained in:
@@ -87,10 +87,10 @@
|
|||||||
>查询</el-button>
|
>查询</el-button>
|
||||||
<el-button class="common-button-default"
|
<el-button class="common-button-default"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="resetSearchForm"
|
@click="onResetSearch"
|
||||||
>清空</el-button>
|
>清空</el-button>
|
||||||
<el-button class="common-button-default export-button"
|
<el-button class="common-button-default export-button"
|
||||||
@click="exportList"
|
@click="exportData"
|
||||||
size="mini"
|
size="mini"
|
||||||
title="不勾选时默认导出所有筛选项;勾选时仅导出勾选项"
|
title="不勾选时默认导出所有筛选项;勾选时仅导出勾选项"
|
||||||
><i class="iconfont"></i>列表导出</el-button>
|
><i class="iconfont"></i>列表导出</el-button>
|
||||||
@@ -113,34 +113,45 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="standSystem"
|
prop="standSystem"
|
||||||
|
width="200"
|
||||||
label="体系结构">
|
label="体系结构">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="standNo"
|
prop="standNo"
|
||||||
|
width="200"
|
||||||
label="标准编号">
|
label="标准编号">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="standName"
|
prop="standName"
|
||||||
|
width="200"
|
||||||
label="标准名称">
|
label="标准名称">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="standState"
|
prop="standState"
|
||||||
|
width="120"
|
||||||
label="标准状态">
|
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>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="releaseDate"
|
prop="releaseDate"
|
||||||
|
width="120"
|
||||||
label="发布日期">
|
label="发布日期">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="implementDate"
|
prop="implementDate"
|
||||||
|
width="120"
|
||||||
label="实施日期">
|
label="实施日期">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="replaceStandardNo"
|
prop="replaceStandardNo"
|
||||||
|
width="120"
|
||||||
label="代替标准">
|
label="代替标准">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="dept"
|
prop="dept"
|
||||||
|
width="120"
|
||||||
label="编制单位">
|
label="编制单位">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -159,15 +170,21 @@
|
|||||||
@pageChange="pageChange"
|
@pageChange="pageChange"
|
||||||
@pageSizeChange="pageSizeChange"></pagination>
|
@pageSizeChange="pageSizeChange"></pagination>
|
||||||
<div slot="footer" class="demo-drawer-footer">
|
<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>
|
</div>
|
||||||
|
<loading :loading="loading">加载中...</loading>
|
||||||
|
<ExportDialog appendToBody ref="exportDialogRef" @exportName="handleExport"></ExportDialog>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import ExportDialog from '@/components/hzwlComponents/exportDialog'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "DialogTable",
|
name: "DialogTable",
|
||||||
|
components: {
|
||||||
|
ExportDialog
|
||||||
|
},
|
||||||
data () {
|
data () {
|
||||||
const pickerOptions = {
|
const pickerOptions = {
|
||||||
shortcuts: [{
|
shortcuts: [{
|
||||||
@@ -209,7 +226,7 @@ export default {
|
|||||||
dept: '',
|
dept: '',
|
||||||
draftUserName: '',
|
draftUserName: '',
|
||||||
page: 1,
|
page: 1,
|
||||||
pageSize: 10,
|
pageSize: this.$store.getters.userInfo.configContent,
|
||||||
total: 0,
|
total: 0,
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
@@ -222,7 +239,8 @@ export default {
|
|||||||
implementDate: ['', ''],
|
implementDate: ['', ''],
|
||||||
dict: {},
|
dict: {},
|
||||||
data: [],
|
data: [],
|
||||||
selected: []
|
selected: [],
|
||||||
|
loading: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -232,22 +250,34 @@ export default {
|
|||||||
open (cfg) {
|
open (cfg) {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.title = `${cfg.menuName}( ${cfg.gbStandCount}/${cfg.fbStandCount}/${cfg.esStandCount} )`
|
this.title = `${cfg.menuName}( ${cfg.gbStandCount}/${cfg.fbStandCount}/${cfg.esStandCount} )`
|
||||||
this.searchForm.menuId = cfg.id
|
|
||||||
this.initSearchForm.menuId = cfg.id
|
this.initSearchForm.menuId = cfg.id
|
||||||
|
this.resetSearchForm()
|
||||||
this.onSearch()
|
this.onSearch()
|
||||||
},
|
},
|
||||||
onSearch () {
|
onSearch () {
|
||||||
|
this.loading = true
|
||||||
this.$http._postData('lawss/sarMenuStandardLimit/standardSystemList', this.searchForm).then(res => {
|
this.$http._postData('lawss/sarMenuStandardLimit/standardSystemList', this.searchForm).then(res => {
|
||||||
if (res.ok) {
|
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 () {
|
resetSearchForm () {
|
||||||
this.searchForm = JSON.parse(JSON.stringify(this.initSearchForm))
|
this.searchForm = JSON.parse(JSON.stringify(this.initSearchForm))
|
||||||
this.releaseDate = ['', '']
|
this.releaseDate = ['', '']
|
||||||
this.implementDate = ['', '']
|
this.implementDate = ['', '']
|
||||||
this.onSearch()
|
this.selected = []
|
||||||
},
|
},
|
||||||
releaseDateChange (event) {
|
releaseDateChange (event) {
|
||||||
this.releaseDate = event
|
this.releaseDate = event
|
||||||
@@ -273,10 +303,28 @@ export default {
|
|||||||
},
|
},
|
||||||
selectionChange (row) {
|
selectionChange (row) {
|
||||||
this.selected = 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 () {
|
getDicTypeListCode () {
|
||||||
this.$http._getData('sys/dictype/getDicTypeListCode').then(res => {
|
this.$http._getData('sys/dictype/getDicTypeListCode').then(res => {
|
||||||
@@ -290,7 +338,7 @@ export default {
|
|||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
/deep/ .customDialog {
|
/deep/ .customDialog {
|
||||||
.el-dialog__body {
|
.el-dialog__body {
|
||||||
padding-top: 0 !important;
|
padding: 0 20px !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user