| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273 |
- <template>
- <div class="container">
- <div class="card">
- <searchForm :keys="['state']" ref="searchForm"
- @on-search="handleSearch">
- <el-button type="primary" icon="el-icon-plus" plain size="small" @click="addVoteActivity" >新增</el-button>
- </searchForm>
- <RxTable
- ref="rxTable"
- @sizeChange="changePageSize"
- @pageChange="changePage"
- :currentPage="pageInfo.page"
- :pageSize="pageInfo.pageSize"
- :page-count="listData.pageQuantity"
- :data="listData.list"
- :blank-col="true"
- :loading="loading"
- >
- <el-table-column
- :align="item.align || 'left'"
- :prop="item.prop"
- :label="item.label"
- :key="item.id"
- v-for="(item) in tableHeader"
- :show-overflow-tooltip="true"
- :width="item.width"
- :min-width="item.minWidth"
- >
- <template slot-scope="scope">
- <div v-if="item.prop == 'certificateUrl'">
- <el-image fit="fill" :src="scope.row[item.prop]" style="height: 36px;width: 80px;"></el-image>
- </div>
- <div v-else-if="item.prop == 'state'">
- <span style="color:red" v-if="scope.row.state == 2">审核 </span>
- <span style="color:green" v-if="scope.row.state == 1">审核通过 </span>
- </div>
- <span v-else>{{ scope.row[item.prop] || scope.row[item.prop] == 0 ? scope.row[item.prop] : '-' }} </span>
- </template>
- </el-table-column>
- <el-table-column label="操作" fixed="right" align="left" width="200">
- <template slot-scope="scope">
- <el-button type="text" class="btn_text_edit" icon="el-icon-edit" @click="handleEdit(scope.row)" v-if="scope.row.state == 2">审核 </el-button>
- </template>
- </el-table-column>
- </RxTable>
- </div>
- <el-dialog
- title="审核"
- :visible.sync="dialogVisible"
- width="800px"
- :lock-scroll="false">
- <verify ref="verify"></verify>
- <span slot="footer" class="dialog-footer">
- <el-button type="success" icon="el-icon-check" @click="handleAduit(1)">通过</el-button>
- <el-button type="danger" icon="el-icon-close" @click="handleAduit(2)">不通过</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import searchForm from "@/components/searchForm";
- import RxTable from "@/components/RxTable";
- import verify from "./verify";
- export default {
- name: "index",
- components: {
- searchForm,
- RxTable,
- verify
- },
- data() {
- return {
- searchParams: {},
- loading: false,
- dialogVisible: false,
- tableHeader: [
- {
- prop: "certificateNo",
- label: "房产证编号",
- width: "300"
- },
- {
- prop: "realName",
- label: "名称",
- width: "300"
- },
- {
- prop: "certificateUrl",
- label: "图片",
- width: "120"
- },
- {
- prop: "state",
- label: "状态",
- width: "120"
- },
- ],
- listData: {
- list: [],
- pageQuantity:0,
- },
- pageInfo: {
- pageNum: 1,
- pageCapacity: 10,
- },
- addVisible: false,
- dialogVisibleUpdate: false,
- }
- },
- methods: {
- handleAduit(state){
- let {passportId,houseId} = this.$refs.verify.form;
- let params = {
- passportId,
- houseId,
- state
- }
- this.$api.verifyHouseRelation(params).then(res => {
- console.log(res)
- this.$message.success("处理成功!");
- this.dialogVisible = false;
- this.handleSearch()
- })
- },
- addVoteActivity(){
- this.dialogVisible = true;
- },
- handleInfo(row){
- console.log(row)
- // this.$router_({
- // name:"voteActivityInfo",
- // title:"活动详情",
- // canClose:true,
- // params:{
- // ...row
- // }
- // })
- // this.$router.push({
- // name:"voteActivityInfo",
- // params:{
- // activityId:row.activityId
- // }
- // })
- },
- handleEdit(row) {
- console.log(row)
- this.dialogVisible = true;
- this.$nextTick(() => {
- this.$refs.verify.form = JSON.parse(JSON.stringify(row))
- })
- // this.$router_({
- // name:"audio",
- // title:"审核",
- // canClose:true,
- // params:{
- // ...row
- // }
- // })
- },
- handleDelete(row){
- this.$confirm('确认刪除, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- })
- },
- onSubmit(type="add") {
- let form = this.$refs.activityForm.form;
- console.log(type)
- if(type =="add"){
- this.$api.addVoteActivity(form).then(res => {
- this.$message.success("新增成功!");
- this.dialogVisible = false;
- this.handleSearch();
- })
- }else{
- this.$api.editVoteActivity(form).then(res => {
- this.$message.success("编辑成功!");
- this.dialogVisibleUpdate = false;
- this.handleSearch();
- })
- }
- },
- goDeleteSelect() {
- },
- //搜索
- handleSearch() {
- this.pageInfo.pageNum = 1
- this.getHouseRelations()
- },
- //国家list
- getHouseRelations() {
- let state = this.$refs.searchForm.form.state;
- this.searchParams = {
- ...this.pageInfo,
- state
- }
- this.loading = true;
- this.$api.getHouseRelations(this.searchParams).then(res => {
- this.loading = false;
- console.log(res)
- this.listData.list = res.content.list;
- this.listData.pageQuantity = res.content.pageQuantity;
- })
- },
- changePageSize() {
- },
- changePage(page) {
- this.pageInfo.pageNum = page
- this.voteList()
- },
- },
- mounted() {
- this.handleSearch()
- }
- }
- </script>
- <style lang="less" scoped>
- .container {
- /*position: relative;*/
- .btnBox {
- margin-left: 20px;
- }
- }
- </style>
|