开发法规预警页面
This commit is contained in:
@@ -0,0 +1,218 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<search ref="searchRef"
|
||||
:searchQueryList="searchQueryList"
|
||||
:flag="'1'"
|
||||
:isDefault="true"
|
||||
:url="url"/>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div @click="handleCompare" class="operator-text">
|
||||
<a-icon type="rocket" :rotate="45"/>
|
||||
{{$t('Push')}}
|
||||
</div>
|
||||
<div @click="handleExport" class="operator-text">
|
||||
<a-icon type="export" :rotate="-90"/>
|
||||
{{$t('export')}}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a-tabs :model="activeTab" @change="callback">
|
||||
<a-tab-pane :key="$t('ImplementationDate')" :tab="$t('ImplementationDate')">
|
||||
</a-tab-pane>
|
||||
<a-tab-pane :key="$t('vehicleInProductionDate')" :tab="$t('vehicleInProductionDate')">
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
:loading="loading"
|
||||
:pagination="false"
|
||||
:scroll="{x: '100%'}"
|
||||
rowKey="id"
|
||||
:data-source="dataSource"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:columns="columns"
|
||||
>
|
||||
</a-table>
|
||||
<div class="page" v-if="dataSource && dataSource.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
@change="pageOnChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<libraryPush
|
||||
:url="url"
|
||||
ref="libraryPushRef"
|
||||
@clearSelected="clearSelected"
|
||||
/>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import search from '@/components/search/index'
|
||||
import libraryPush from '@/components/libraryPush/index'
|
||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||
import moment from 'moment'
|
||||
import eventBUs from '../../common/event'
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
components: {
|
||||
search,
|
||||
libraryPush
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//url传参严格按照当前命名
|
||||
url: {
|
||||
seachList: 'document/bussDocumentLibraryEO/queryCondition' //搜索字段
|
||||
},
|
||||
activeTab: this.$t('ImplementationDate'),
|
||||
loading: false,
|
||||
dataSource: [],
|
||||
selectedRowKeys: [],
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
searchQueryList: [
|
||||
{
|
||||
field_show_type: 6,
|
||||
db_field_txt: this.$t('warningTime'),
|
||||
db_field_name: 'warningTime'
|
||||
}
|
||||
],
|
||||
|
||||
columnsAll: [
|
||||
{
|
||||
title: this.$t('standard'),
|
||||
align: 'center',
|
||||
dataIndex: 'serial_number',
|
||||
width: 170,
|
||||
scopedSlots: { customRender: 'serial_number' }
|
||||
},
|
||||
{
|
||||
title: this.$t('title'),
|
||||
align: 'center',
|
||||
dataIndex: 'title',
|
||||
width: 170,
|
||||
scopedSlots: { customRender: 'titleName' }
|
||||
},
|
||||
{
|
||||
title: this.$t('status'),
|
||||
align: 'center',
|
||||
width: 140,
|
||||
ellipsis: true,
|
||||
dataIndex: 'state'
|
||||
},
|
||||
{
|
||||
title: this.$t('zoneOfApplication'),
|
||||
align: 'center',
|
||||
width: 170,
|
||||
ellipsis: true,
|
||||
dataIndex: 'region'
|
||||
},
|
||||
{
|
||||
title: this.$t('technicalField'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
width: 170,
|
||||
dataIndex: 'technology_territory'
|
||||
},
|
||||
{
|
||||
title: this.$t('vehicleInProductionDate'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
width: 210,
|
||||
dataIndex: 'implement_time'
|
||||
},
|
||||
{
|
||||
title: this.$t('ImplementationDate'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
width: 210,
|
||||
dataIndex: 'xin1_che1_xing2_shi2_shi1_ri4_qi1'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
columns() {
|
||||
let columnsAll = JSON.parse(JSON.stringify(this.columnsAll))
|
||||
if (this.activeTab == this.$t('ImplementationDate')) {
|
||||
for (let i = 0; i < columnsAll.length; i++) {
|
||||
if (columnsAll[i].dataIndex == 'implement_time') {
|
||||
columnsAll.splice(i, 1)
|
||||
i--
|
||||
}
|
||||
}
|
||||
} else if (this.activeTab == this.$t('vehicleInProductionDate')) {
|
||||
for (let i = 0; i < columnsAll.length; i++) {
|
||||
if (columnsAll[i].dataIndex == 'xin1_che1_xing2_shi2_shi1_ri4_qi1') {
|
||||
columnsAll.splice(i, 1)
|
||||
i--
|
||||
}
|
||||
}
|
||||
}
|
||||
return columnsAll
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
eventBUs.$on('searchQuery', search => {
|
||||
Object.keys(search).forEach(res => {
|
||||
if (search[res] instanceof Array) {
|
||||
search[res] = search[res].join(',')
|
||||
}
|
||||
})
|
||||
this.searchParmes = search
|
||||
this.getList()
|
||||
})
|
||||
eventBUs.$on('searchReset', target => {
|
||||
this.searchParmes = {}
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
callback(tab) {
|
||||
this.activeTab = tab
|
||||
},
|
||||
onSelectChange(value) {
|
||||
this.selectedRowKeys = value
|
||||
},
|
||||
handleCompare() {
|
||||
|
||||
},
|
||||
handleExport() {
|
||||
|
||||
},
|
||||
clearSelected() {
|
||||
|
||||
},
|
||||
pageOnChange() {
|
||||
|
||||
},
|
||||
SizeChange() {
|
||||
|
||||
},
|
||||
getList() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user