13 changed files with 1980 additions and 34 deletions
@ -1,6 +1,7 @@ |
|||
NODE_ENV=production |
|||
# VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api |
|||
VUE_APP_API_SERVER = http://192.168.1.140/api |
|||
#VUE_APP_API_SERVER = http://192.168.1.140/api |
|||
VUE_APP_API_SERVER = http://219.146.91.110:30802/api |
|||
VUE_APP_NODE_ENV=prod:sit |
|||
VUE_APP_PUBLIC_PATH=epmet-oper |
|||
VUE_APP_CUSTOMER=yantai |
|||
@ -0,0 +1,410 @@ |
|||
<template> |
|||
<div class="div_main"> |
|||
<div class="div_search"> |
|||
<el-form |
|||
:inline="true" |
|||
:model="formData" |
|||
ref="ref_searchform" |
|||
:label-width="'100px'" |
|||
> |
|||
<div> |
|||
<el-form-item label="所属组织" prop="orgId" > |
|||
<el-cascader |
|||
class="item_width_2" |
|||
ref="myCascaderm" |
|||
size="small" |
|||
v-model="agencyIdArray" |
|||
:options="orgOptions" |
|||
:props="orgOptionProps" |
|||
:show-all-levels="false" |
|||
@change="handleChangeAgency" |
|||
></el-cascader> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="房主姓名" prop="ownerName"> |
|||
<el-input |
|||
class="item_width_2" |
|||
size="small" |
|||
v-model="formData.ownerName" |
|||
clearable |
|||
placeholder="请输入" |
|||
> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
|
|||
|
|||
<el-form-item label="联系方式" prop="ownerPhone"> |
|||
<el-input |
|||
class="item_width_2" |
|||
size="small" |
|||
v-model="formData.ownerPhone" |
|||
clearable |
|||
placeholder="请输入" |
|||
> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="房屋用途" prop="purpose"> |
|||
<el-select v-model="formData.purpose" |
|||
placeholder="'请选择'" |
|||
size="small" |
|||
clearable |
|||
style="width: 240px" |
|||
:multiple="false"> |
|||
<el-option v-for="item in housePurposeOption" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="备注" prop="remark"> |
|||
<el-input |
|||
class="item_width_2" |
|||
size="small" |
|||
v-model="formData.remark" |
|||
clearable |
|||
placeholder="请输入" |
|||
> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<el-button |
|||
style="margin-left: 30px" |
|||
size="small" |
|||
class="diy-button--search" |
|||
@click="handleSearch" |
|||
>查询</el-button |
|||
> |
|||
<el-button |
|||
style="margin-left: 10px" |
|||
size="small" |
|||
class="diy-button--reset" |
|||
@click="resetSearch" |
|||
>重置</el-button |
|||
> |
|||
</div> |
|||
</el-form> |
|||
</div> |
|||
|
|||
<div class="div_table"> |
|||
<el-table |
|||
border |
|||
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }" |
|||
class="table" |
|||
:data="tableData" |
|||
style="width: 100%" |
|||
:height="maxTableHeight" |
|||
> |
|||
|
|||
<el-table-column |
|||
label="序号" |
|||
fixed="left" |
|||
type="index" |
|||
align="center" |
|||
width="50" |
|||
/> |
|||
<el-table-column |
|||
prop="gridName" |
|||
align="center" |
|||
min-width="190" |
|||
label="所属组织" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<span>{{scope.row.agencyName }}-{{ scope.row.gridName}}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="houseName" |
|||
align="center" |
|||
min-width="180" |
|||
label="房屋名称" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="houseType" |
|||
label="类型" |
|||
min-width="150" |
|||
align="center" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="purpose" |
|||
align="center" |
|||
min-width="150" |
|||
label="用途" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="rentFlag" |
|||
align="center" |
|||
width="150" |
|||
:show-overflow-tooltip="true" |
|||
label="房屋状态" |
|||
> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="ownerName" |
|||
align="center" |
|||
width="150" |
|||
:show-overflow-tooltip="true" |
|||
label="房主姓名" |
|||
> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="ownerPhone" |
|||
align="center" |
|||
width="150" |
|||
:show-overflow-tooltip="true" |
|||
label="联系方式" |
|||
> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="ownerIdCard" |
|||
align="center" |
|||
width="150" |
|||
:show-overflow-tooltip="true" |
|||
label="身份证" |
|||
> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="remark" |
|||
align="center" |
|||
width="150" |
|||
:show-overflow-tooltip="true" |
|||
label="备注" |
|||
> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<!-- <el-button v-if="scope.row.issueStatus==='voting'&& agencyId===scope.row.orgId" |
|||
@click="handleDispose(scope.row)" |
|||
type="text" size="small" |
|||
class="div-table-button--edit">处理</el-button> --> |
|||
|
|||
<el-button @click="handleWatch(scope.row)" type="text" size="small" |
|||
>查看</el-button |
|||
> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<div> |
|||
<el-pagination |
|||
@size-change="handleSizeChange" |
|||
@current-change="handleCurrentChange" |
|||
:current-page.sync="pageNo" |
|||
:page-sizes="[20, 50, 100, 200]" |
|||
:page-size="parseInt(pageSize)" |
|||
layout="sizes, prev, pager, next, total" |
|||
:total="total" |
|||
> |
|||
</el-pagination> |
|||
</div> |
|||
</div> |
|||
<el-dialog |
|||
title="房屋详情" |
|||
:visible.sync="showhtglDialog" |
|||
:close-on-click-modal="false" |
|||
:close-on-press-escape="false" |
|||
width="950px" |
|||
v-if="showhtglDialog" |
|||
@close="detailFormCancle" |
|||
> |
|||
<qzf-info |
|||
ref="qzf_info" |
|||
@diaDetailClose="detailFormCancle" |
|||
> |
|||
</qzf-info> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapGetters } from "vuex"; |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import qzfInfo from "./qzfInfo.vue" |
|||
import axios from "axios"; |
|||
|
|||
export default { |
|||
|
|||
data() { |
|||
let orgOptionProps = { |
|||
multiple: false, |
|||
value: 'agencyId', |
|||
label: 'agencyName', |
|||
children: 'subAgencyList', |
|||
checkStrictly: true |
|||
} |
|||
return { |
|||
orgOptions: [], |
|||
orgOptionProps, |
|||
housePurposeOption:[ |
|||
{ value: '1', label: '住宅' }, |
|||
{ value: '2', label: '商业' }, |
|||
{ value: '3', label: '办公' }, |
|||
{ value: '4', label: '工业' }, |
|||
{ value: '5', label: '仓储' }, |
|||
{ value: '6', label: '商住混用' }, |
|||
{ value: '7', label: '其他' } |
|||
], |
|||
formData: { |
|||
ownerName: '', |
|||
ownerPhone: '', |
|||
startDate: '', |
|||
endDate: '', |
|||
purpose:'', |
|||
remark:'', |
|||
orgId:'' |
|||
}, |
|||
showhtglDialog:false, |
|||
topicId:'', |
|||
tableData:[], |
|||
dialogVisible:false, |
|||
agencyIdArray: [], |
|||
pageNo: 1, |
|||
pageSize: window.localStorage.getItem("pageSize") || 20, |
|||
total: 1, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getTableData() |
|||
}, |
|||
mounted() { |
|||
this.getOrgTreeList(); |
|||
}, |
|||
methods: { |
|||
async getOrgTreeList() { |
|||
const url = "/gov/org/customeragency/agencygridtree"; |
|||
let params = { |
|||
agencyId: this.agencyId, |
|||
purpose: "query", |
|||
}; |
|||
|
|||
const { data, code, msg } = await requestPost(url, params); |
|||
|
|||
if (code === 0) { |
|||
this.orgOptions = []; |
|||
this.orgOptions.push(data); |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
handleChangeAgency (val) { |
|||
let obj = this.$refs["myCascaderm"].getCheckedNodes()[0].data |
|||
console.log(obj); |
|||
if (obj) { |
|||
if (obj.level === 'grid') { |
|||
this.formData.orgId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; |
|||
} else { |
|||
this.formData.orgId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; |
|||
} |
|||
|
|||
} else { |
|||
this.formData.orgId = '' |
|||
} |
|||
}, |
|||
handleSizeChange (val) { |
|||
|
|||
this.pageSize = val; |
|||
window.localStorage.setItem("pageSize", val); |
|||
this.getTableData(); |
|||
}, |
|||
handleCurrentChange (val) { |
|||
this.pageNo = val; |
|||
this.getTableData(); |
|||
}, |
|||
handleSearch (val) { |
|||
this.pageNo = 1; |
|||
this.getTableData(); |
|||
console.log(this.agencyIdArray); |
|||
}, |
|||
|
|||
resetSearch () { |
|||
this.agencyIdArray = [] |
|||
this.formData = { |
|||
ownerName: '', |
|||
ownerPhone: '', |
|||
startDate: '', |
|||
endDate: '', |
|||
} |
|||
this.pageNo = 1 |
|||
}, |
|||
|
|||
async getTableData () { |
|||
const url = "/gov/org/house/group-rent-house-list"; |
|||
let { pageSize, pageNo, formData } = this; |
|||
// if(this.agencyIdArray.length ==1){ |
|||
// orgId = JSONparse(JSON.stringify(this.agencyIdArray[0])).join() |
|||
// }else if(this.agencyIdArray.length ==2){ |
|||
// orgId = JSONparse(JSON.stringify(this.agencyIdArray[1])).splice(1).join() |
|||
// }else if(this.agencyIdArray.length ==3){ |
|||
// orgId = JSONparse(JSON.stringify(this.agencyIdArray[0])).splice(2).join() |
|||
// }else if(this.agencyIdArray.length ==4){ |
|||
// orgId = JSONparse(JSON.stringify(this.agencyIdArray[0])).splice(3).join() |
|||
// }else{ |
|||
// this.agencyIdArray = [] |
|||
// } |
|||
console.log( this.agencyIdArray); |
|||
const { data, code, msg } = await requestPost(url, { |
|||
pageSize, |
|||
pageNo, |
|||
// orgId, |
|||
orgType: "agency", |
|||
...formData, |
|||
}); |
|||
if (code === 0) { |
|||
this.total = data.total || 0; |
|||
this.tableData = data.list |
|||
? data.list.map((item) => { |
|||
return item; |
|||
}) |
|||
: []; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
detailFormCancle () { |
|||
this.showhtglDialog = false |
|||
}, |
|||
async handleWatch (row) { |
|||
console.log(row,'see'); |
|||
this.showhtglDialog = true |
|||
this.$nextTick(() => { |
|||
this.$refs.qzf_info.initForm(row) |
|||
}) |
|||
|
|||
}, |
|||
}, |
|||
components: { |
|||
qzfInfo |
|||
}, |
|||
computed: { |
|||
maxTableHeight () { |
|||
return this.$store.state.inIframe |
|||
? this.clientHeight - 240 + this.iframeHeigh |
|||
: this.clientHeight - 240; |
|||
}, |
|||
...mapGetters(["clientHeight", "iframeHeight"]), |
|||
}, |
|||
watch: {}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/buttonstyle.scss"; |
|||
@import "@/assets/scss/modules/management/list-main.scss"; |
|||
@import "@/assets/scss/modules/shequzhili/event-info.scss"; |
|||
::v-deep .el-row{ |
|||
margin:20px 0px 10px; |
|||
font-size: 15px; |
|||
} |
|||
</style> |
|||
|
|||
@ -0,0 +1,360 @@ |
|||
<template> |
|||
<div> |
|||
<div class="dialog-h-content scroll-h"> |
|||
<div class="div_tuomin"> |
|||
<el-button |
|||
size="mini" |
|||
class="diy-button--search" |
|||
@click="handleTuomin">显示脱敏信息</el-button> |
|||
</div> |
|||
<div v-if="initLoading" |
|||
class="m-row"> |
|||
<div class="m-info"> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">所属楼栋:</span> |
|||
<span>{{ dataForm.neighborHoodName }}-{{dataForm.buildingName}}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">单元号:</span> |
|||
<span>{{ dataForm.unitName?dataForm.unitName:'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">门牌号:</span> |
|||
<span>{{ dataForm.doorName}}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">房屋编码:</span> |
|||
<span>{{ dataForm.coding?dataForm.coding:'--'}}</span> |
|||
</div> |
|||
<div v-if="dataForm.houseQrcodeUrl" |
|||
style="display: flex;flex-direction: column;"> |
|||
<img style="margin-left: 70px;width: 200px;" |
|||
:src="dataForm.houseQrcodeUrl"> |
|||
<a style="margin-left: 80px" |
|||
:href="dataForm.houseQrcodeUrl" |
|||
target="_blank">下载</a> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">房屋类型:</span> |
|||
<span>{{dataForm.houseTypeName?dataForm.houseTypeName:'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">房屋用途:</span> |
|||
<span>{{dataForm.purposeName?dataForm.purposeName:'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">房屋状态:</span> |
|||
<span>{{dataForm.rentName?dataForm.rentName:'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">房主姓名:</span> |
|||
<span>{{dataForm.ownerName?dataForm.ownerName:'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">联系方式:</span> |
|||
<span>{{dataForm.showOwnerPhone?dataForm.showOwnerPhone:'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">房主身份证:</span> |
|||
<span>{{dataForm.showOwnerIdCard?dataForm.showOwnerIdCard:'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">备注:</span> |
|||
<span>{{dataForm.remark?dataForm.remark:'--' }}</span> |
|||
</div> |
|||
<div class="leftPostion_box"> |
|||
<span class="">居住成员信息</span> |
|||
<span v-if="quanzufangResiList.length==0">--</span> |
|||
</div> |
|||
<section> |
|||
<el-row > |
|||
<el-col :span="3"> 姓名</el-col> |
|||
<el-col :span="7">联系方式</el-col> |
|||
<el-col :span="9">房主身份证</el-col> |
|||
</el-row> |
|||
<el-row type="flex" v-for="(item,index) in quanzufangResiList" :key="index"> |
|||
<el-col :span="3"> {{item.name}}</el-col> |
|||
<el-col :span="7"> {{item.mobile?item.mobile:"--"}}</el-col> |
|||
<el-col :span="9"> {{item.idCard?item.idCard:"--"}}</el-col> |
|||
</el-row> |
|||
</section> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
<div class="div-btn"> |
|||
<el-button size="small" |
|||
@click="handleCancle">关 闭</el-button> |
|||
|
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapGetters } from 'vuex' |
|||
import { Loading } from 'element-ui' // 引入Loading服务 |
|||
import { requestPost, requestGet } from '@/js/dai/request' |
|||
|
|||
|
|||
let loading // 加载动画 |
|||
export default { |
|||
data () { |
|||
return { |
|||
formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 |
|||
btnDisable: false, |
|||
initLoading: false, |
|||
unitList: [], |
|||
|
|||
houseId: '', //房屋ID |
|||
houseType: '1', |
|||
purpose: '1', |
|||
rentFlag: 0, |
|||
dataForm: { |
|||
neighborHoodId: '', // 所属小区ID |
|||
buildingId: '',//所属楼栋ID |
|||
buildingUnitId: '',//所属单元ID |
|||
doorName: '',//门牌号 |
|||
houseType: '',//房屋类型【楼房,平房,别墅】 |
|||
purpose: '',//房屋用途【住宅,商业,办公,工业,仓储,商住混用,其他】 |
|||
rentFlag: 0,//房屋状态【是:1,否:0】 出租1、闲置2、自住 0 |
|||
ownerPhone: '', //联系方式 |
|||
ownerName: '', //房主名字 |
|||
ownerIdCard: '', //房主身份证 |
|||
remark: '', |
|||
quanzufangResiList:[],//群租房人员 |
|||
// realPerson: 0, |
|||
coding: '', |
|||
sysCoding: '' |
|||
}, |
|||
|
|||
keyWords: '', |
|||
agencyObj: {}, |
|||
|
|||
} |
|||
}, |
|||
components: {}, |
|||
mounted () { |
|||
|
|||
}, |
|||
|
|||
methods: { |
|||
handleCancle () { |
|||
// this.diaDestroy() |
|||
this.$emit('diaDetailClose') |
|||
|
|||
}, |
|||
diaDestroy () { |
|||
|
|||
}, |
|||
async initForm (row, agencyObj) { |
|||
// this.dataForm = JSON.parse(JSON.stringify(row)) |
|||
this.agencyObj = agencyObj |
|||
this.houseId = row.houseId |
|||
await this.loadHouseInfo() |
|||
await this.loadQunzufangInfo() |
|||
this.initLoading = true |
|||
|
|||
|
|||
// this.$refs.ref_form.resetFields(); |
|||
// this.agencyObj = agencyObj |
|||
// this.formType = type |
|||
// console.log('agencyObj-----', agencyObj) |
|||
// if (row) { |
|||
|
|||
// this.houseId = row.houseId |
|||
// await this.loadHouseInfo() |
|||
|
|||
|
|||
// } else { |
|||
|
|||
// this.dataForm.neighborHoodId = this.agencyObj.neighborHoodId |
|||
// this.dataForm.buildingId = this.agencyObj.id |
|||
// } |
|||
|
|||
|
|||
// await this.loadUnitList() |
|||
|
|||
}, |
|||
|
|||
async handleTuomin () { |
|||
const url = "/data/aggregator/epmetuser/detailByType"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
id:this.houseId, |
|||
type: "checkHouse", |
|||
}); |
|||
for(let i in this.quanzufangResiList){ |
|||
await this.getResiTuomin( this.quanzufangResiList[i].id) |
|||
} |
|||
if (code === 0) { |
|||
this.$set(this.dataForm, 'showOwnerPhone', data.mobile) |
|||
this.$set(this.dataForm, 'showOwnerIdCard', data.idCard) |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
async getResiTuomin(id){ |
|||
const url = "/data/aggregator/epmetuser/detailByType"; |
|||
const { data, code, msg } = await requestPost(url, { |
|||
id:id, |
|||
type: "checkIcResiUser", |
|||
}); |
|||
if(code == 0){ |
|||
for(let i in this.quanzufangResiList){ |
|||
// console.log(this.quanzufangResiList[i].mobile.split(7,11)); |
|||
// console.log(data.mobile.split(7,11)); |
|||
if(this.quanzufangResiList[i].mobile.substr(7,4) == data.mobile.substr(7,4)){ |
|||
this.$set(this.quanzufangResiList[i],'mobile',data.mobile) |
|||
this.$set(this.quanzufangResiList[i],'idCard',data.idCard) |
|||
} |
|||
} |
|||
|
|||
}else { |
|||
this.$message.error(msg) |
|||
} |
|||
|
|||
}, |
|||
async loadHouseInfo () { |
|||
|
|||
const url = "/gov/org/ichouse/" + this.houseId |
|||
|
|||
const { data, code, msg } = await requestGet(url) |
|||
|
|||
if (code === 0) { |
|||
// debugger |
|||
this.dataForm = { ...data } |
|||
|
|||
this.houseType = this.dataForm.houseType |
|||
this.purpose = this.dataForm.purpose |
|||
this.rentFlag = parseInt(this.dataForm.rentFlag) |
|||
|
|||
|
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
|
|||
}, |
|||
|
|||
async loadQunzufangInfo () { |
|||
|
|||
const url = "/epmetuser/icresiuser/listhomeuserbrief-encrypt/" + this.houseId |
|||
|
|||
const { data, code, msg } = await requestPost(url) |
|||
|
|||
if (code === 0) { |
|||
// debugger |
|||
// this.dataForm = { ...data } |
|||
|
|||
// this.houseType = this.dataForm.houseType |
|||
// this.purpose = this.dataForm.purpose |
|||
// this.rentFlag = parseInt(this.dataForm.rentFlag) |
|||
this.quanzufangResiList = data |
|||
console.log(data); |
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
|
|||
}, |
|||
resetData () { |
|||
this.houseId = '' //房屋ID |
|||
this.houseType = '1' |
|||
this.purpose = '1' |
|||
this.rentFlag = 0 |
|||
this.dataForm = { |
|||
neighborHoodId: '', // 所属小区ID |
|||
buildingId: '',//所属楼栋ID |
|||
buildingUnitId: '',//所属单元ID |
|||
doorName: '',//门牌号 |
|||
houseType: '1',//房屋类型【楼房,平房,别墅】 |
|||
purpose: '1',//房屋用途【住宅,商业,办公,工业,仓储,商住混用,其他】 |
|||
rentFlag: 0,//是否出租【是:1,否:0】 |
|||
ownerPhone: '', //联系方式 |
|||
ownerName: '', //房主名字 |
|||
ownerIdCard: '', //房主身份证 |
|||
remark: '', // 备注 |
|||
coding: '', |
|||
sysCoding: '' |
|||
} |
|||
|
|||
}, |
|||
// 开启加载动画 |
|||
startLoading () { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: '正在加载……', // 加载中需要显示的文字 |
|||
background: 'rgba(0,0,0,.7)' // 背景颜色 |
|||
}) |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading () { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close() |
|||
} |
|||
} |
|||
}, |
|||
computed: { |
|||
dataRule () { |
|||
return { |
|||
buildingUnitId: [ |
|||
{ required: true, message: '所属单元不能为空', trigger: 'blur' }, |
|||
], |
|||
doorName: [ |
|||
{ required: true, message: '门牌号不能为空', trigger: 'blur' } |
|||
], |
|||
coding: [ |
|||
{ required: true, message: '房屋编码不能为空', trigger: 'blur' } |
|||
], |
|||
houseType: [ |
|||
{ required: true, message: '房屋类型不能为空', trigger: 'blur' } |
|||
], |
|||
purpose: [ |
|||
{ required: true, message: '房屋用途不能为空', trigger: 'blur' } |
|||
], |
|||
rentFlag: [ |
|||
{ required: true, message: '是否出租不能为空', trigger: 'blur' } |
|||
], |
|||
ownerPhone: [ |
|||
{ required: false } |
|||
], |
|||
ownerName: [ |
|||
{ required: false } |
|||
], |
|||
ownerIdCard: [ |
|||
{ required: false } |
|||
], |
|||
remark: [ |
|||
{ required: false } |
|||
], |
|||
} |
|||
}, |
|||
|
|||
}, |
|||
props: { |
|||
view_real_data: {//显示【显示脱敏信息】按钮 |
|||
type: Boolean, |
|||
default: false, |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped > |
|||
@import "@/assets/scss/modules/management/detail-main.scss"; |
|||
|
|||
.div_tuomin { |
|||
position: absolute; |
|||
top: 52px; |
|||
right: 40px; |
|||
z-index: 1000; |
|||
} |
|||
.leftPostion_box{ |
|||
position: relative; |
|||
left: -80px; |
|||
font-size: 18px; |
|||
} |
|||
</style> |
|||
|
|||
@ -0,0 +1,294 @@ |
|||
<template> |
|||
<div class="epidemic-form"> |
|||
<div class="dialog-h-content scroll-h"> |
|||
<el-form |
|||
ref="ref_form" |
|||
:inline="true" |
|||
:model="formData" |
|||
:rules="rules" |
|||
:disabled="formType === 'detail'" |
|||
class="form" |
|||
> |
|||
<el-form-item |
|||
label="分类名称" |
|||
prop="tagName" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-input |
|||
class="item_width_2" |
|||
placeholder="请输入角色名称" |
|||
style="width: 260px" |
|||
clearable |
|||
v-model="formData.tagName" |
|||
> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item |
|||
label="应用范围" |
|||
label-width="150px" |
|||
prop="agencyId" |
|||
style="display: block" |
|||
> |
|||
<!-- --> |
|||
<el-cascader |
|||
ref="cascaderUnit" |
|||
style="width: 260px;" |
|||
v-model="formData.agencyId" |
|||
:options="orgOptions" |
|||
collapse-tags |
|||
:props="{ |
|||
multiple: true, |
|||
emitPath: false, |
|||
children: 'subAgencyList', |
|||
label: 'agencyName', |
|||
value: 'agencyId', |
|||
}" |
|||
clearable |
|||
/> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> |
|||
|
|||
<div class="form_div_btn"> |
|||
<el-button size="small" @click="handleCancle">取 消</el-button> |
|||
<el-button |
|||
size="small" |
|||
type="primary" |
|||
:disabled="btnDisable" |
|||
@click="handleComfirm" |
|||
>确 定</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { Loading } from "element-ui"; // 引入Loading服务 |
|||
import { requestPost, requestGet } from "@/js/dai/request"; |
|||
import nextTick from "dai-js/tools/nextTick"; |
|||
let loading; // 加载动画 |
|||
export default { |
|||
data() { |
|||
return { |
|||
formType: "add", //表单操作类型 add新增,edit编辑,detail详情 |
|||
btnDisable: false, |
|||
orgOptions: [], |
|||
tagId: "", |
|||
sarr: [], |
|||
targetObj: {}, |
|||
formData: { |
|||
tagName: "", |
|||
agencyId: [], |
|||
orgIdPath: "", |
|||
}, |
|||
formDatam: [], |
|||
rules: { |
|||
tagName: [ |
|||
{ required: true, message: "分类名称不能为空", trigger: "blur" }, |
|||
], |
|||
agencyId: [ |
|||
{ required: true, message: "应用范围不能为空", trigger: "blur" }, |
|||
], |
|||
}, |
|||
}; |
|||
}, |
|||
components: {}, |
|||
async mounted() { |
|||
await this.getOrgTreeList(); |
|||
}, |
|||
|
|||
methods: { |
|||
async initForm(type, row) { |
|||
console.log(row); |
|||
this.startLoading(); |
|||
this.formType = type; |
|||
if (type != "add") { |
|||
console.log(this.formData); |
|||
this.formData.tagName = row.tagName; |
|||
this.tagId = row.id; |
|||
this.formData.agencyId = []; |
|||
|
|||
if (row.agencyList.length >= 1) { |
|||
for (let i in row.agencyList) { |
|||
this.formData.agencyId.push(row.agencyList[i].agencyId); |
|||
} |
|||
} else { |
|||
this.endLoading(); |
|||
} |
|||
} else { |
|||
} |
|||
this.endLoading(); |
|||
}, |
|||
async getOrgTreeList() { |
|||
this.dataListLoading = true; |
|||
const url = "/gov/org/customeragency/agencylist"; |
|||
// const url = 'http://yapi.elinkservice.cn/mock/102/gov/org/agency/agencylist' |
|||
|
|||
let params = { |
|||
customerId: this.customerId, |
|||
}; |
|||
const { data, code, msg } = await requestPost(url, params); |
|||
if (code === 0) { |
|||
this.options = []; |
|||
this.orgOptions.push(data); |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
this.dataListLoading = false; |
|||
}, |
|||
|
|||
|
|||
getLastItem(list, vals, key) { |
|||
let LIST = list || []; |
|||
for (let item of LIST) { |
|||
// console.log(item[key]); |
|||
for (let i of vals) { |
|||
if (item[key] === i) { |
|||
this.sarr.push(item); |
|||
break; |
|||
} else { |
|||
this.getLastItem(item.subAgencyList, vals, key); |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
handleComfirm() { |
|||
this.$refs["ref_form"].validate((valid, messageObj) => { |
|||
if (!valid) { |
|||
app.util.validateRule(messageObj); |
|||
} else { |
|||
this.addNat(); |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
async addNat() { |
|||
this.newArr = []; |
|||
this.formDatam = []; |
|||
const map = new Map(); |
|||
this.getLastItem(this.orgOptions, this.formData.agencyId, "agencyId"); |
|||
this.newArr = this.sarr.filter( |
|||
(v) => !map.has(v.agencyId) && map.set(v.agencyId, 1) |
|||
); |
|||
for (let i in this.newArr) { |
|||
this.formDatam.push({ |
|||
agencyId: this.newArr[i].agencyId, |
|||
orgIdPath: this.newArr[i].orgIdPath, |
|||
pid: this.newArr[i].pid, |
|||
agencyName: this.newArr[i].agencyName, |
|||
}); |
|||
} |
|||
this.btnDisable = true; |
|||
setTimeout(() => { |
|||
this.btnDisable = false; |
|||
}, 5000); |
|||
|
|||
let url = ""; |
|||
if (this.formType === "add") { |
|||
url = "/gov/voice/tag/save"; |
|||
} else { |
|||
url = "/gov/voice/tag/update"; |
|||
} |
|||
const { tagName } = this.formData; |
|||
let params = {}; |
|||
if (this.formType != "add") { |
|||
if (this.formDatam.length == 0) { |
|||
this.formDatam.push({ |
|||
agencyId: this.formData.agencyId, |
|||
orgIdPath: this.formData.orgIdPath, |
|||
}); |
|||
} |
|||
params = { |
|||
tagName, |
|||
agencyList: this.formDatam, |
|||
id: this.tagId, |
|||
}; |
|||
} else { |
|||
if (this.formDatam.length == 0) { |
|||
this.formDatam.push({ |
|||
agencyId: this.formData.agencyId, |
|||
orgIdPath: this.formData.orgIdPath, |
|||
}); |
|||
} |
|||
params = { |
|||
tagName, |
|||
agencyList: this.formDatam, |
|||
}; |
|||
} |
|||
console.log(params); |
|||
const { data, code, msg } = await requestPost(url, params); |
|||
if (code === 0) { |
|||
this.$message({ |
|||
type: "success", |
|||
message: "操作成功", |
|||
}); |
|||
this.resetData(); |
|||
this.$emit("dialogOk"); |
|||
this.btnDisable = false; |
|||
} else { |
|||
this.btnDisable = false; |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
handleCancle() { |
|||
this.resetData(); |
|||
this.$emit("dialogCancle"); |
|||
}, |
|||
|
|||
resetData() { |
|||
this.formData = { |
|||
tagName: "", |
|||
}; |
|||
this.$refs["ref_form"].resetFields(); |
|||
}, |
|||
// 开启加载动画 |
|||
startLoading() { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: "正在加载……", // 加载中需要显示的文字 |
|||
background: "rgba(0,0,0,.7)", // 背景颜色 |
|||
}); |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading() { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close(); |
|||
} |
|||
}, |
|||
}, |
|||
computed: {}, |
|||
props: { |
|||
customerId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
|
|||
<style lang="scss" scoped > |
|||
@import "@/assets/scss/modules/management/epidemic.scss"; |
|||
|
|||
.item_border { |
|||
border: 1px; |
|||
border-radius: 50%; |
|||
} |
|||
</style> |
|||
|
|||
<style lang='scss'> |
|||
// 隐藏上传按钮 |
|||
.hide .el-upload--picture-card { |
|||
display: none; |
|||
} |
|||
// 添加/删除文件时去掉动画过渡 |
|||
.el-upload-list__item { |
|||
transition: none !important; |
|||
} |
|||
</style> |
|||
|
|||
|
|||
|
|||
@ -0,0 +1,351 @@ |
|||
<template> |
|||
<div class="div_main"> |
|||
<div class="div_search"> |
|||
<el-form |
|||
:inline="true" |
|||
:model="formData" |
|||
ref="ref_searchform" |
|||
:label-width="'110px'" |
|||
> |
|||
<el-form-item label="标签名称" prop="tagName"> |
|||
<el-input |
|||
v-model="formData.tagName" |
|||
size="small" |
|||
class="list_item_width_1" |
|||
clearable |
|||
placeholder="请输入标签名称" |
|||
> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<el-button |
|||
style="margin-left: 30px" |
|||
size="small" |
|||
class="diy-button--search" |
|||
@click="handleSearch" |
|||
>查询</el-button |
|||
> |
|||
<el-button |
|||
style="margin-left: 10px" |
|||
size="small" |
|||
class="diy-button--reset" |
|||
@click="resetSearch" |
|||
>重置</el-button |
|||
> |
|||
</el-form> |
|||
</div> |
|||
|
|||
<div class="div_table"> |
|||
<div class="div_btn"> |
|||
<el-button |
|||
class="diy-button--add" |
|||
size="small" |
|||
@click="handleAdd" |
|||
>新增</el-button |
|||
> |
|||
</div> |
|||
|
|||
<div style="padding: 0 10px"> |
|||
<el-table |
|||
class="table" |
|||
ref="ref_table" |
|||
:data="tableData" |
|||
border |
|||
:height="tableHeight" |
|||
v-loading="tableLoading" |
|||
:header-cell-style="{ |
|||
background: '#2195FE', |
|||
color: '#FFFFFF', |
|||
}" |
|||
style="width: 100%" |
|||
> |
|||
<el-table-column |
|||
label="序号" |
|||
header-align="center" |
|||
align="center" |
|||
type="index" |
|||
width="50" |
|||
></el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="tagName" |
|||
header-align="center" |
|||
align="center" |
|||
label="标签名称" |
|||
min-width="100" |
|||
> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="showFlag" |
|||
header-align="center" |
|||
align="center" |
|||
label="状态" |
|||
min-width="110" |
|||
> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row.showFlag == 1 ? "显示" : "隐藏" }} |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
label="操作" |
|||
fixed="right" |
|||
width="140" |
|||
header-align="center" |
|||
align="center" |
|||
class="operate" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<el-button |
|||
v-if="false" |
|||
type="text" |
|||
class="div-table-button--detail" |
|||
size="small" |
|||
@click="handleDetail(scope.row)" |
|||
>查看</el-button |
|||
> |
|||
<el-button |
|||
type="text" |
|||
class="div-table-button--edit" |
|||
size="small" |
|||
@click="handleEdit(scope.row)" |
|||
>修改</el-button |
|||
> |
|||
|
|||
<el-button |
|||
v-if="true" |
|||
type="text" |
|||
class="div-table-button--delete" |
|||
size="small" |
|||
@click="showOrHide(scope.row)" |
|||
>{{ |
|||
scope.row.showFlag == 0 ? "显示" : "隐藏" |
|||
}}</el-button |
|||
> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-pagination |
|||
@size-change="handleSizeChange" |
|||
@current-change="handleCurrentChange" |
|||
:current-page.sync="pageNo" |
|||
:page-sizes="[20, 50, 100, 200]" |
|||
:page-size="pageSize" |
|||
layout="sizes, prev, pager, next, total" |
|||
:total="total" |
|||
> |
|||
</el-pagination> |
|||
</div> |
|||
</div> |
|||
|
|||
<!-- 修改弹出框 --> |
|||
<el-dialog |
|||
:visible.sync="formShow" |
|||
:close-on-click-modal="false" |
|||
:close-on-press-escape="false" |
|||
:title="formTitle" |
|||
destroy-on-close |
|||
width="850px" |
|||
top="5vh" |
|||
class="dialog-h" |
|||
@closed="diaClose" |
|||
> |
|||
<edit |
|||
:customerId="customerId" |
|||
ref="ref_form" |
|||
@dialogCancle="diaClose" |
|||
@dialogOk="addFormOk" |
|||
></edit> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import edit from "./edit"; |
|||
|
|||
import { requestPost, requestGet } from "@/js/dai/request"; |
|||
import { mapGetters } from "vuex"; |
|||
import { Loading } from "element-ui"; // 引入Loading服务 |
|||
|
|||
let loading; // 加载动画 |
|||
export default { |
|||
components: { |
|||
edit, |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
loading: false, |
|||
total: 0, |
|||
pageSize: 20, |
|||
pageNo: 0, |
|||
tableLoading: false, |
|||
isResiUser: true, |
|||
customerId:"", |
|||
agencyId: "", |
|||
|
|||
timeRange: [], |
|||
formData: { |
|||
tagName: "", //名称 |
|||
// createdTime: '',//时间 |
|||
}, |
|||
|
|||
tableData: [], |
|||
|
|||
//form相关 |
|||
formShow: false, |
|||
formTitle: "新增", |
|||
}; |
|||
}, |
|||
|
|||
computed: { |
|||
tableHeight() { |
|||
return this.$store.state.inIframe |
|||
? this.clientHeight - 360 + this.iframeHeight |
|||
: this.clientHeight - 360; |
|||
}, |
|||
|
|||
...mapGetters(["clientHeight", "iframeHeight"]), |
|||
}, |
|||
|
|||
async mounted() { |
|||
const { user } = this.$store.state; |
|||
this.agencyId = user.agencyId; |
|||
|
|||
await this.loadTable(); |
|||
this.customerId = localStorage.getItem("customerId"); |
|||
}, |
|||
|
|||
activated() { |
|||
this.$refs["ref_table"].doLayout(); |
|||
}, |
|||
|
|||
methods: { |
|||
async handleSearch() { |
|||
this.isResiUser = this.formData.orgType === "current"; |
|||
|
|||
await this.loadTable(); |
|||
|
|||
this.$nextTick(() => { |
|||
this.$refs.ref_table.doLayout(); // 解决表格错位 |
|||
}); |
|||
}, |
|||
|
|||
async loadTable() { |
|||
this.tableLoading = true; |
|||
|
|||
const url = "/gov/voice/tag/page-list"; |
|||
|
|||
let params = { |
|||
pageSize: this.pageSize, |
|||
pageNo: this.pageNo, |
|||
...this.formData, |
|||
}; |
|||
|
|||
const { data, code, msg } = await requestPost(url, params); |
|||
|
|||
if (code === 0) { |
|||
this.total = data.total; |
|||
this.tableData = data.list; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
this.tableLoading = false; |
|||
}, |
|||
|
|||
diaClose() { |
|||
this.$refs.ref_form.resetData(); |
|||
this.formShow = false; |
|||
}, |
|||
|
|||
handleAdd() { |
|||
this.formTitle = "新增"; |
|||
this.formShow = true; |
|||
this.$nextTick(() => { |
|||
this.$refs.ref_form.initForm("add", null); |
|||
}); |
|||
}, |
|||
|
|||
handleEdit(row) { |
|||
this.formTitle = "修改"; |
|||
this.formShow = true; |
|||
this.$nextTick(() => { |
|||
this.$refs.ref_form.initForm("edit", row); |
|||
}); |
|||
}, |
|||
|
|||
handleDetail(row) { |
|||
this.formTitle = "详情"; |
|||
this.formShow = true; |
|||
this.$nextTick(() => { |
|||
this.$refs.ref_form.initForm("detail", row.id); |
|||
}); |
|||
}, |
|||
|
|||
addFormOk() { |
|||
this.formShow = false; |
|||
this.loadTable(); |
|||
}, |
|||
|
|||
async showOrHide(row) { |
|||
const url = "/gov/voice/tag/change-show-flag"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
id: row.id, |
|||
showFlag: row.showFlag == 1 ? 0 : 1, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.$message({ |
|||
type: "success", |
|||
message: "操作成功", |
|||
}); |
|||
|
|||
this.loadTable(); |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
//重置搜索条件 |
|||
resetSearch() { |
|||
this.formData = { |
|||
tagName: "", //姓名 |
|||
}; |
|||
|
|||
this.pageNo = 0; |
|||
this.loadTable(); |
|||
}, |
|||
|
|||
handleSizeChange(val) { |
|||
this.pageSize = val; |
|||
this.pageNo = 1; |
|||
this.loadTable(); |
|||
}, |
|||
handleCurrentChange(val) { |
|||
this.pageNo = val; |
|||
this.loadTable(); |
|||
}, |
|||
|
|||
// 开启加载动画 |
|||
startLoading() { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: "正在加载……", // 加载中需要显示的文字 |
|||
background: "rgba(0,0,0,.7)", // 背景颜色 |
|||
}); |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading() { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close(); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/modules/management/epidemic.scss"; |
|||
</style> |
|||
@ -0,0 +1,182 @@ |
|||
<template> |
|||
<div> |
|||
<div class="body"> |
|||
<el-row type="flex" > |
|||
<el-col :span="24"> |
|||
<span class="htgl_info_label">所属网格:</span> {{emblemObj.gridName||'--'}} |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row type="flex" > |
|||
<el-col :span="24" style="display: flex;"> |
|||
<span class="htgl_info_label">徽章类型:</span> <section style="flex:1">{{emblemObj.badgeName ||'--'}}</section> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row type="flex" > |
|||
<el-col :span="24" style="display: flex;"> |
|||
<span class="htgl_info_label">姓名:</span> <section style="flex:1">{{emblemObj.surname +emblemObj.name||'--'}}</section> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row type="flex" > |
|||
<el-col :span="24" style="display: flex;"> |
|||
<span class="htgl_info_label">身份证号:</span> <section style="flex:1">{{emblemObj.idcard||'--'}}</section> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row type="flex" > |
|||
<el-col :span="24" style="display: flex;"> |
|||
<span class="htgl_info_label">手机号:</span> <section style="flex:1">{{emblemObj.mobile||'--'}}</section> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row type="flex" > |
|||
<el-col :span="24" style="display: flex;"> |
|||
<span :class="emblemObj.topicImages?'img_label':'htgl_info_label'" >认证证件:</span> |
|||
<template v-if="emblemObj.certificationImg"> |
|||
<img :src="emblemObj.certificationImg" alt="" width="150px" height="200px" /> |
|||
</template> |
|||
<template v-else > |
|||
<span>--</span> |
|||
</template> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row type="flex" v-show="emblemObj.authResult=='auditing'"> |
|||
<el-col :span="24" style="display: flex;"> |
|||
<span class="htgl_info_label">审核原因:</span> |
|||
<template> |
|||
<el-input |
|||
type="textarea" |
|||
:rows="2" |
|||
maxlength="200" |
|||
placeholder="请输入内容" |
|||
v-model="auditTextarea"> |
|||
</el-input> |
|||
</template> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row type="flex" v-show="emblemObj.authResult=='rejected'"> |
|||
<el-col :span="24" style="display: flex;"> |
|||
<span class="htgl_info_label">审核原因:</span> |
|||
<template> |
|||
{{emblemObj.authReason||"--"}} |
|||
</template> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row type="flex" > |
|||
<el-col :span="24" style="display: flex;"> |
|||
<span class="htgl_info_label">备注:</span> <section style="flex:1">{{emblemObj.remark||'--'}}</section> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-button size="small" @click="handleDiaClose"> 取消</el-button> |
|||
<el-button v-show="emblemObj.authResult=='auditing'" @click="handleAudit('no')"> 审核不通过</el-button> |
|||
<el-button v-show="emblemObj.authResult=='auditing'" @click="handleAudit('yes')"> 审核通过</el-button> |
|||
</el-row> |
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import nextTick from "dai-js/tools/nextTick"; |
|||
import { requestPost } from "@/js/dai/request"; |
|||
export default { |
|||
|
|||
data() { |
|||
return { |
|||
auditTextarea:'', |
|||
btnFlag:false |
|||
}; |
|||
}, |
|||
props:{ |
|||
emblemObj:{ |
|||
type:Object, |
|||
default:()=>{} |
|||
}, |
|||
}, |
|||
created() { |
|||
// console.log(this.emblemObj); |
|||
// this.$set(this.emblemObj,'topicVoices',this.emblemObj) |
|||
|
|||
}, |
|||
mounted(){ |
|||
}, |
|||
methods:{ |
|||
async handleAudit(status){ |
|||
if(status == 'yes'){ |
|||
}else{ |
|||
if (this.auditTextarea == ""){ |
|||
this.$message.error('请填写审核原因!') |
|||
return |
|||
} |
|||
} |
|||
const url = "/epmetuser/badge/audit" |
|||
let params = { |
|||
recordId:this.emblemObj.recordId, |
|||
auditStatus:status == 'yes'?'approved':'rejected', |
|||
auditRemark:this.auditTextarea |
|||
} |
|||
let {code,msg,data} = await requestPost(url,params) |
|||
if(code==0){ |
|||
this.$message.success('操作成功!') |
|||
this.$emit('dialogOk') |
|||
}else if(code>=8000){ |
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
handleDiaClose(){ |
|||
this.$emit('dialogCancle') |
|||
} |
|||
|
|||
}, |
|||
|
|||
components: {}, |
|||
computed: { |
|||
}, |
|||
watch: {}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
.img_label{ |
|||
display: inline-block; |
|||
height: 75px; |
|||
vertical-align: top; |
|||
padding-left: 10px; |
|||
width: 90px; |
|||
text-align: left; |
|||
margin-right: 6px; |
|||
} |
|||
.body{ |
|||
padding: 0 60px; |
|||
} |
|||
.htgl_info_label{ |
|||
display: inline-block; |
|||
width: 90px; |
|||
text-align: left; |
|||
padding-left: 10px; |
|||
position: relative; |
|||
margin-right: 6px; |
|||
} |
|||
.htgl_info_label::before{ |
|||
content: ""; |
|||
display: block; |
|||
position: absolute; |
|||
top: 5px; |
|||
width: 7px; |
|||
left: -5px; |
|||
height: 7px; |
|||
background: #0c81fe; |
|||
border-radius: 3px; |
|||
margin-right: 10px; |
|||
} |
|||
.img_label::before{ |
|||
content: ""; |
|||
display: block; |
|||
position: absolute; |
|||
left: -5px; |
|||
top: 5px; |
|||
width: 7px; |
|||
height: 7px; |
|||
background: #0c81fe; |
|||
border-radius: 3px; |
|||
margin-right: 10px; |
|||
} |
|||
</style> |
|||
@ -0,0 +1,331 @@ |
|||
<template> |
|||
<div class="div_main"> |
|||
<div class="div_search"> |
|||
<el-form |
|||
:inline="true" |
|||
:model="formData" |
|||
ref="ref_searchform" |
|||
:label-width="'100px'" |
|||
> |
|||
<div> |
|||
<el-form-item label="所属网格" prop="orgId" > |
|||
|
|||
<el-select |
|||
v-model="formData.gridId" |
|||
placeholder="请选择" |
|||
size="small" |
|||
clearable |
|||
> |
|||
<el-option v-for="item in orgOptions" |
|||
:key="item.value" |
|||
:value="item.value" |
|||
:label="item.label" |
|||
> |
|||
|
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
|
|||
|
|||
<el-form-item label="徽章类型"> |
|||
<el-select v-model="formData.badgeId" |
|||
class="item_width_2" |
|||
placeholder="请选择" |
|||
size="small" |
|||
clearable> |
|||
<el-option v-for="item in orgOptionA" |
|||
:key="item.badgeId" |
|||
:label="item.badgeName" |
|||
:value="item.badgeId"> |
|||
</el-option> |
|||
</el-select> |
|||
|
|||
</el-form-item> |
|||
|
|||
<el-form-item label="状态"> |
|||
<el-select v-model="formData.auditStatus" |
|||
class="item_width_2" |
|||
placeholder="请选择" |
|||
size="small" |
|||
clearable> |
|||
<el-option v-for="item in orgOptionB" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
|
|||
</el-form-item> |
|||
<el-button |
|||
style="margin-left: 30px" |
|||
size="small" |
|||
class="diy-button--search" |
|||
@click="handleSearch" |
|||
>查询</el-button |
|||
> |
|||
<el-button |
|||
style="margin-left: 10px" |
|||
size="small" |
|||
class="diy-button--reset" |
|||
@click="resetSearch" |
|||
>重置</el-button |
|||
> |
|||
</div> |
|||
</el-form> |
|||
</div> |
|||
|
|||
<div class="div_table"> |
|||
<el-table |
|||
border |
|||
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }" |
|||
class="table" |
|||
:data="tableData" |
|||
style="width: 100%" |
|||
:height="maxTableHeight" |
|||
> |
|||
|
|||
<el-table-column |
|||
label="序号" |
|||
fixed="left" |
|||
type="index" |
|||
align="center" |
|||
width="50" |
|||
/> |
|||
|
|||
<el-table-column |
|||
prop="gridName" |
|||
align="center" |
|||
label="所属网格" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="badgeName" |
|||
label="徽章类型" |
|||
min-width="150" |
|||
align="center" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="userName" |
|||
align="center" |
|||
min-width="150" |
|||
label="申请人" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="auditStatus" |
|||
align="center" |
|||
width="180" |
|||
:show-overflow-tooltip="true" |
|||
label="状态" |
|||
> |
|||
<template slot-scope="scope"> |
|||
{{scope.row.auditStatus == 'approved'?'已通过':scope.row.auditStatus == 'rejected'?'未通过':'审核中'}} |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<el-table-column fixed="right" label="操作" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<el-button @click="handleWatch(scope.row)" type="text" size="small" |
|||
>{{scope.row.auditStatus=='auditing'?'审核':'查看'}}</el-button |
|||
> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<div> |
|||
<el-pagination |
|||
@size-change="handleSizeChange" |
|||
@current-change="handleCurrentChange" |
|||
:current-page.sync="pageNo" |
|||
:page-sizes="[20, 50, 100, 200]" |
|||
:page-size="parseInt(pageSize)" |
|||
layout="sizes, prev, pager, next, total" |
|||
:total="total" |
|||
> |
|||
</el-pagination> |
|||
</div> |
|||
</div> |
|||
<el-dialog |
|||
title="审核信息" |
|||
:visible.sync="showhtglDialog" |
|||
width="950px" |
|||
v-if="showhtglDialog" |
|||
@close="showhtglDialog = false" |
|||
> |
|||
<emblem-ifon |
|||
@dialogCancle="diaClose" |
|||
@dialogOk="addFormOk" |
|||
:emblemObj="emblemObj" |
|||
> |
|||
</emblem-ifon> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapGetters } from "vuex"; |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import emblemIfon from "./cpts/emblemIfon.vue" |
|||
export default { |
|||
data() { |
|||
return { |
|||
orgOptions: [], |
|||
orgOptionA:[], |
|||
orgOptionB:[ |
|||
{label:'审核通过',value:'approved'}, |
|||
{label:'审核驳回',value:'rejected'}, |
|||
{label:'审核中',value:'auditing'}, |
|||
], |
|||
formData: { |
|||
gridId:'', |
|||
badgeId:'', |
|||
auditStatus:'', |
|||
}, |
|||
showhtglDialog:false, |
|||
topicId:'', |
|||
tableData:[], |
|||
emblemObj:{}, |
|||
customerId:"", |
|||
pageNo: 1, |
|||
pageSize: window.localStorage.getItem("pageSize") || 20, |
|||
total: 1, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getTableData() |
|||
}, |
|||
mounted() { |
|||
this.getOrgTreeList(); |
|||
this.getEmblemType() |
|||
this.customerId = localStorage.getItem("customerId"); |
|||
}, |
|||
methods: { |
|||
async getOrgTreeList() { |
|||
const url = "/gov/org/customergrid/gridoption"; |
|||
|
|||
let params = { |
|||
agencyId: this.$store.state.user.agencyId, |
|||
purpose: "addorupdate", |
|||
}; |
|||
|
|||
const { data, code, msg } = await requestPost(url, params); |
|||
|
|||
if (code === 0) { |
|||
this.orgOptions= data; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
async getEmblemType() { |
|||
const url = "/epmetuser/badge/badge-options"; |
|||
|
|||
const { data, code, msg } = await requestPost(url); |
|||
if (code === 0) { |
|||
this.orgOptionA= data; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
handleSizeChange (val) { |
|||
|
|||
this.pageSize = val; |
|||
window.localStorage.setItem("pageSize", val); |
|||
this.getTableData(); |
|||
}, |
|||
handleCurrentChange (val) { |
|||
this.pageNo = val; |
|||
this.getTableData(); |
|||
}, |
|||
handleSearch (val) { |
|||
this.pageNo = 1; |
|||
this.getTableData(); |
|||
}, |
|||
diaClose() { |
|||
this.showhtglDialog = false; |
|||
}, |
|||
addFormOk() { |
|||
this.showhtglDialog = false; |
|||
this.getTableData(); |
|||
}, |
|||
async getEmblemIfon(row){ |
|||
const url = "/epmetuser/more/badge/certification/detail"; |
|||
const { data, code, msg } = await requestPost(url, { |
|||
badgeId:row.badgeId, |
|||
recordId:row.recordId, |
|||
customerId:this.customerId, |
|||
}); |
|||
if(code == 0){ |
|||
return data |
|||
}else { |
|||
this.$message.error(msg) |
|||
} |
|||
|
|||
}, |
|||
resetSearch () { |
|||
|
|||
this.formData = { |
|||
gridId:'', |
|||
badgeId:'', |
|||
auditStatus:'', |
|||
} |
|||
this.pageNo = 1 |
|||
}, |
|||
|
|||
async getTableData () { |
|||
const url = "/epmetuser/badge/audit-page-list"; |
|||
const { pageSize, pageNo, formData } = this; |
|||
const { data, code, msg } = await requestPost(url, { |
|||
pageSize, |
|||
pageNo, |
|||
agencyId:this.$store.state.user.agencyId, |
|||
...formData, |
|||
}); |
|||
if (code === 0) { |
|||
this.total = data.total || 0; |
|||
this.tableData = data.list |
|||
? data.list.map((item) => { |
|||
return item; |
|||
}) |
|||
: []; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
async handleWatch (row) { |
|||
this.showhtglDialog = true |
|||
let obj = await this.getEmblemIfon(row) |
|||
this.emblemObj = {row,...obj} |
|||
}, |
|||
}, |
|||
components: { |
|||
emblemIfon |
|||
}, |
|||
computed: { |
|||
maxTableHeight () { |
|||
return this.$store.state.inIframe |
|||
? this.clientHeight - 240 + this.iframeHeigh |
|||
: this.clientHeight - 240; |
|||
}, |
|||
...mapGetters(["clientHeight", "iframeHeight"]), |
|||
}, |
|||
watch: {}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/buttonstyle.scss"; |
|||
@import "@/assets/scss/modules/management/list-main.scss"; |
|||
@import "@/assets/scss/modules/shequzhili/event-info.scss"; |
|||
::v-deep .el-row{ |
|||
margin:20px 0px 10px; |
|||
font-size: 15px; |
|||
} |
|||
</style> |
|||
|
|||
Loading…
Reference in new issue