qa-regulatory-gwj-vue/src/views/keyprojects/punish/components/list.vue

188 lines
5.8 KiB
Vue

<template>
<div class="app-container">
<el-page-header content="处罚管理" @back="back"/>
<div class="level-title mt-20"/>
<el-form label-width="100px">
<el-row>
<el-col :span="4">
<el-form-item label="关键字搜索">
<el-input v-model="KEYWORDS" placeholder="搜索关键字"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label-width="10px">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="varList"
:row-key="getRowKey"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column
:reserve-selection="true"
type="selection"
width="55"
align="center"/>
<el-table-column type="index" label="序号" width="50" align="center"/>
<el-table-column prop="OUTSOURCED_NAME" label="重点工程名称" show-overflow-tooltip/>
<el-table-column prop="DEPARTMENT_NAME" label="监管部门" show-overflow-tooltip/>
<el-table-column v-if="false" prop="INVOLVING_CORPS_NAME" label="辖区单位" show-overflow-tooltip/>
<el-table-column v-if="false" prop="MANAGE_CORPS_NAME" label="监理单位" show-overflow-tooltip/>
<el-table-column prop="UNITS_PIC_NAME" label="相关方单位负责人" show-overflow-tooltip>
<template slot-scope="{row}">
{{ (row.UNITS_PIC_NAME) && (row.UNITS_PIC_NAME !== '') ? row.UNITS_PIC_NAME : row.UNITS_PIC }}
</template>
</el-table-column>
<el-table-column prop="KEY_COUNT" label="处罚次数" show-overflow-tooltip/>
<el-table-column prop="KEY_COUNT_AMOUT" label="处罚金额" show-overflow-tooltip/>
<el-table-column v-if="false" prop="REASON" label="处罚原因" show-overflow-tooltip/>
<el-table-column v-if="false" prop="CREATOR_NAME" label="下发人" show-overflow-tooltip/>
<el-table-column v-if="false" prop="OUTSOURCED_NAME" label="被处罚单位" show-overflow-tooltip/>
<el-table-column v-if="false" prop="PERSON_NAME" label="被处罚人" show-overflow-tooltip/>
<el-table-column label="处罚处理状态" show-overflow-tooltip>
<template slot-scope="{row}">
{{ row.HANDLED === "0" ? "待处理" : "已处理" }}
</template>
</el-table-column>
<el-table-column prop="CORP_NAME" label="创建单位" show-overflow-tooltip/>
<el-table-column prop="FIND_HIDDEN_NUM" label="发现隐患数据" show-overflow-tooltip/>
<el-table-column prop="END_HIDDEN_NUM" label="处理隐患数" show-overflow-tooltip/>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="{row}">
<el-button type="success" icon="el-icon-view" size="mini" @click="goDetail(row.OUTSOURCED_ID)">查看
</el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div/>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
</div>
</div>
</template>
<script>
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
export default {
components: { Pagination },
directives: { waves },
data() {
return {
listLoading: true,
listQuery: {
page: 1,
limit: 20
},
total: 0,
KEYWORDS: '',
HANDLED: '',
varList: []
}
},
created() {
this.getList()
},
methods: {
getRowKey(row) {
return row.OUTSOURCED_ID
},
back() {
this.$parent.CORPINFO_ID = ''
this.$parent.activeName = 'OutSourced'
},
// 搜索
getQuery() {
this.$refs.multipleTable.clearSelection()
this.getList()
},
goKeyReset() {
this.KEYWORDS = ''
this.HANDLED = ''
this.getQuery()
},
// // 获取列表
// getList() {
// this.listLoading = true
// requestFN(
// '/keyprojectpunish/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
// {
// KEYWORDS: this.KEYWORDS,
// HANDLED: this.HANDLED
// }
// ).then((data) => {
// this.listLoading = false
// this.varList = data.varList
// this.total = data.page.totalResult
// }).catch((e) => {
// this.listLoading = false
// })
// },
// 获取列表
getList() {
this.listLoading = true
requestFN(
'/outsourced/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
KEYWORDS: this.KEYWORDS,
CORPINFO_ID: this.$parent.CORPINFO_ID
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
}).catch((e) => {
this.listLoading = false
})
},
// 查看
goDetail(ID) {
this.$parent.OUTSOURCED_ID = ID
this.$parent.activeName = 'List2'
}
}
}
</script>
<style lang="sass" scoped>
.table-qrcode
text-align: center
padding-top: 20px
width: 100%
.filter-container
position: relative
.filter-flot
position: absolute
right: 0
top: 0
.uploader
width: 570px
display: flex
align-items: center
.el-form-item__content
line-height: 1
</style>