Browse Source

111

dev-烟台中转登录
jiangyy 3 years ago
parent
commit
7577fbd4b9
  1. 262
      src/views/components/editResi.vue
  2. 392
      src/views/modules/base/resi.vue

262
src/views/components/editResi.vue

@ -1,28 +1,44 @@
<template>
<div :id="formId" class="resi-container">
<el-form :ref="formId" class="resi-form" :model="form" :rules="rulesForm" :label-width="labelWidth">
<div :id="formId"
class="resi-container">
<el-form :ref="formId"
class="resi-form"
:model="form"
:rules="rulesForm"
:label-width="labelWidth">
<template v-if="supportAdd">
<el-row style="margin-bottom: 10px;">
<el-col :span="24">
<el-button icon="el-icon-plus" size="small" @click="handleAddRow"></el-button>
<el-button icon="el-icon-plus"
size="small"
@click="handleAddRow"></el-button>
</el-col>
</el-row>
<edit-form v-for="(item, index) in addList" :key="index" :ref="'baseForms' + index" :columns="3"
:form-list="item.itemList || formList" :form-id="'baseForms' + item.row" />
<edit-form v-for="(item, index) in addList"
:key="index"
:ref="'baseForms' + index"
:columns="3"
:form-list="item.itemList || formList"
:form-id="'baseForms' + item.row" />
</template>
<template v-else>
<el-row v-if="fixed" class="resi-row">
<el-row v-if="fixed"
class="resi-row">
<!-- <el-col v-for="n in item" :key="n.id" :span="n.itemType === 'textarea'&&24 || (24/columns)"> -->
<el-col :span="6">
<el-form-item prop="GRID_ID" label="所属网格">
<el-form-item prop="GRID_ID"
label="所属网格">
<!-- <div class="resi-cell"> -->
<!-- <div class="resi-cell-label">{{n.label}}</div> -->
<div class="resi-cell-value">
<el-select v-model.trim="form.GRID_ID" :disabled="disabled" placeholder="请选择网格" size="small"
clearable class="resi-cell-select" @change="handleChangeGrid"
>
<el-option
v-for="item in optionsG"
<el-select v-model.trim="form.GRID_ID"
:disabled="disabled"
placeholder="请选择网格"
size="small"
clearable
class="resi-cell-select"
@change="handleChangeGrid">
<el-option v-for="item in optionsG"
:key="item.value"
:label="item.label"
:value="item.value">
@ -33,15 +49,19 @@
</el-form-item>
</el-col>
<el-col :span="18">
<el-form-item label="所属房屋" required>
<el-form-item label="所属房屋"
required>
<div class="resi-cell-value">
<div class="resi-cell-col">
<el-form-item prop="VILLAGE_ID">
<el-select v-model.trim="form.VILLAGE_ID" placeholder="请选择小区" size="small"
clearable class="resi-cell-select" :disabled="disabled" @change="handleChangeV"
>
<el-option
v-for="item in optionsV"
<el-select v-model.trim="form.VILLAGE_ID"
placeholder="请选择小区"
size="small"
clearable
class="resi-cell-select"
:disabled="disabled"
@change="handleChangeV">
<el-option v-for="item in optionsV"
:key="item.value"
:label="item.label"
:value="item.value">
@ -49,11 +69,14 @@
</el-select>
</el-form-item>
<el-form-item prop="BUILD_ID">
<el-select v-model.trim="form.BUILD_ID" placeholder="请选择楼号" size="small"
clearable :disabled="disabled" class="resi-cell-select resi-cell-select-middle" @change="handleChangeB"
>
<el-option
v-for="item in optionsB"
<el-select v-model.trim="form.BUILD_ID"
placeholder="请选择楼号"
size="small"
clearable
:disabled="disabled"
class="resi-cell-select resi-cell-select-middle"
@change="handleChangeB">
<el-option v-for="item in optionsB"
:key="item.value"
:label="item.label"
:value="item.value">
@ -61,11 +84,14 @@
</el-select>
</el-form-item>
<el-form-item prop="UNIT_ID">
<el-select v-model.trim="form.UNIT_ID" placeholder="请选择单元" size="small"
clearable :disabled="disabled" class="resi-cell-select resi-cell-select-middle" @change="handleChangeD"
>
<el-option
v-for="item in optionsD"
<el-select v-model.trim="form.UNIT_ID"
placeholder="请选择单元"
size="small"
clearable
:disabled="disabled"
class="resi-cell-select resi-cell-select-middle"
@change="handleChangeD">
<el-option v-for="item in optionsD"
:key="item.value"
:label="item.label"
:value="item.value">
@ -73,12 +99,14 @@
</el-select>
</el-form-item>
<el-form-item prop="HOME_ID">
<el-select v-model.trim="form.HOME_ID" placeholder="请选择房号" size="small"
clearable :disabled="disabled" class="resi-cell-select resi-cell-select-middle"
@change="handleChangeH"
>
<el-option
v-for="item in optionsH"
<el-select v-model.trim="form.HOME_ID"
placeholder="请选择房号"
size="small"
clearable
:disabled="disabled"
class="resi-cell-select resi-cell-select-middle"
@change="handleChangeH">
<el-option v-for="item in optionsH"
:key="item.value"
:label="item.label"
:value="item.value">
@ -134,34 +162,46 @@
</el-form-item>
</el-col> -->
</el-row>
<el-row v-for="(item, index) in sliceList(formList, columns)" :key="index" class="resi-row">
<el-row v-for="(item, index) in sliceList(formList, columns)"
:key="index"
class="resi-row">
<!-- <el-col v-for="n in item" :key="n.id" :span="n.itemType === 'textarea'&&24 || (24/columns)"> -->
<el-col v-for="n in item" :key="n.itemId" :span="item.length === 1 ? 24 : (24/columns)"
<el-col v-for="n in item"
:key="n.itemId"
:span="item.length === 1 ? 24 : (24/columns)"
:style="n.itemType === 'divider' && 'display: none;'">
<el-form-item :prop="n.columnName" :label="n.label">
<el-form-item :prop="n.columnName"
:label="n.label">
<!-- <div class="resi-cell"> -->
<!-- <div class="resi-cell-label">{{n.label}}</div> -->
<div class="resi-cell-value">
<template v-if="n.itemType === 'input' || n.itemType === 'textarea'">
<el-input
v-if="n.validType"
<!-- <span v-if="n.columnName==='MOBILE'||n.columnName==='ID_CARD'">{{ form[n.columnName]||'--'}}</span> -->
<el-input v-if="n.columnName==='MOBILE'||n.columnName==='ID_CARD'"
v-model.trim="form[n.columnName]"
:disabled="disabled"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入内容"
>
placeholder="请输入内容">
</el-input>
<el-input
v-else
<el-input v-else-if="n.validType"
v-model.trim="form[n.columnName]"
:disabled="disabled"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入内容"
>
placeholder="请输入内容">
</el-input>
<el-input v-else
v-model.trim="form[n.columnName]"
:disabled="disabled"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</template>
<!-- <template v-if="n.itemType === 'textarea'">
@ -175,8 +215,7 @@
>
</el-input>
</template> -->
<el-date-picker
v-else-if="n.itemType === 'datepicker'"
<el-date-picker v-else-if="n.itemType === 'datepicker'"
v-model.trim="form[n.columnName]"
:disabled="disabled"
class="resi-cell-input"
@ -187,8 +226,7 @@
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd">
</el-date-picker>
<el-date-picker
v-else-if="n.itemType === 'daterange'"
<el-date-picker v-else-if="n.itemType === 'daterange'"
v-model.trim="form[n.columnName]"
:disabled="disabled"
type="daterange"
@ -197,17 +235,14 @@
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
end-placeholder="结束日期">
</el-date-picker>
<el-time-picker
v-else-if="n.itemType === 'timepicker'"
<el-time-picker v-else-if="n.itemType === 'timepicker'"
v-model.trim="form[n.columnName]"
:disabled="disabled"
placeholder="任意时间点">
</el-time-picker>
<el-time-picker
v-else-if="n.itemType === 'timerange'"
<el-time-picker v-else-if="n.itemType === 'timerange'"
v-model.trim="form[n.columnName]"
:disabled="disabled"
is-range
@ -216,12 +251,15 @@
end-placeholder="结束时间"
placeholder="选择时间范围">
</el-time-picker>
<el-select v-else-if="n.itemType === 'select'" v-model.trim="form[n.columnName]"
<el-select v-else-if="n.itemType === 'select'"
v-model.trim="form[n.columnName]"
:multiple="n.multiSelect"
:disabled="disabled"
placeholder="请选择" size="small" clearable class="resi-cell-select">
<el-option
v-for="item in n.options || options"
placeholder="请选择"
size="small"
clearable
class="resi-cell-select">
<el-option v-for="item in n.options || options"
:key="item.value"
:label="item.label"
:value="item.value">
@ -231,8 +269,7 @@
:options="options"
:props="{ checkStrictly: true }"
clearable></el-cascader> -->
<el-cascader
v-else-if="n.itemType === 'cascader'"
<el-cascader v-else-if="n.itemType === 'cascader'"
v-model.trim="form[n.columnName]"
:options="n.options"
:disabled="disabled"
@ -242,7 +279,10 @@
class="resi-cell-select">
</el-cascader>
<template v-else-if="n.itemType === 'radio'">
<el-radio v-for="ns in n.options" :key="ns.value" v-model.trim="form[n.columnName]" :disabled="disabled"
<el-radio v-for="ns in n.options"
:key="ns.value"
v-model.trim="form[n.columnName]"
:disabled="disabled"
:label="ns.value">
{{ ns.label }}
</el-radio>
@ -250,7 +290,10 @@
</template>
<template v-else-if="n.itemType === 'checkbox'">
<el-checkbox-group v-model.trim="form[n.columnName]">
<el-checkbox v-for="ns in n.options" :key="ns.value" :label="ns.value" :disabled="disabled">{{ns.label}}</el-checkbox>
<el-checkbox v-for="ns in n.options"
:key="ns.value"
:label="ns.value"
:disabled="disabled">{{ns.label}}</el-checkbox>
<!-- <el-checkbox label="n.la"></el-checkbox> -->
</el-checkbox-group>
</template>
@ -266,10 +309,15 @@
<script>
import { isCard, isMobile } from '@/utils/validate'
import { requestPost } from "@/js/dai/request";
export default {
name: 'editForm',
props: {
editUserId: {
type: String,
default: ''
},
fixed: {
type: Boolean,
default: false
@ -381,7 +429,7 @@ export default {
}
let form = initForm(this.formInfo, this.formList)
let rules = initRules(this.formList)
let tempFormList = [ ...this.formList ]
let tempFormList = [...this.formList]
let constForm = {
...form
}
@ -504,6 +552,7 @@ export default {
created () {
this.initForm()
console.log('formInfo---gggreg', this.rulesForm)
console.log('formList', this.formList)
if (this.supportAdd) {
this.addList = [...this.mutiList]
// console.log('addList----111', this.addList)
@ -515,8 +564,34 @@ export default {
this.getUniList()
this.getHouseList()
}
},
mounted () {
console.log('this.editUserId', this.editUserId)
if (this.editUserId) {
this.handleTuomin()
}
},
methods: {
async handleTuomin () {
const url = "/data/aggregator/epmetuser/detailByType";
const { data, code, msg } = await requestPost(url, {
id: this.editUserId,
type: "checkIcResiUser",
});
if (code === 0) {
this.$set(this.form, 'MOBILE', data.mobile)
this.$set(this.form, 'ID_CARD', data.idCard)
} else {
this.$message.error(msg);
}
},
initForm () {
this.formList.forEach(async item => {
if (item.optionSourceType === 'remote') {
@ -526,13 +601,13 @@ export default {
}
})
},
getTreeData(data){
getTreeData (data) {
if (!Array.isArray(data)) return []
let arr = data.map(item => {
let _item = {}
if (item.children) {
if (item.children.length === 0) _item = { ...item, children: undefined }
else _item = { ...item, children: this.getTreeData(item.children)}
else _item = { ...item, children: this.getTreeData(item.children) }
} else {
_item = { ...item }
}
@ -614,9 +689,9 @@ export default {
this.getHouseList()
},
//
handleChangeH(val){
handleChangeH (val) {
let item = this.optionsH.find(item => item.value === val);
if(item && item.type == '1'){
if (item && item.type == '1') {
this.form.IS_TENANT = '1'
console.log('item-----', item)
} else this.form.IS_TENANT = '0'
@ -625,7 +700,7 @@ export default {
let arr = []
this.addList.forEach(item => {
// console.log('handlerMuscForm----000', this.$refs['baseForms' + item.row || item][0].handleForm())
arr.push([ ...this.$refs['baseForms' + item.row][0].handleForm() ])
arr.push([...this.$refs['baseForms' + item.row][0].handleForm()])
})
if (arr.length === 0) return arr
let arr2 = arr.reduce(function (a, b) { return a.concat(b) })
@ -808,17 +883,16 @@ export default {
<style lang="scss" scoped>
.resi-form {
:deep .el-date-editor.el-input, .el-date-editor.el-input__inner {
:deep .el-date-editor.el-input,
.el-date-editor.el-input__inner {
width: 100% !important;
}
}
.resi-cell-value .resi-cell-input {
width: 190px;
}
</style>
<style lang="scss" scoped>
.resi-form .resi-row {
margin-bottom: 0;
}
@ -826,31 +900,31 @@ export default {
// .resi-form .resi-cell {
// display: flex;
// align-items: center;
// .resi-cell-label {
// width: 70px;
// box-sizing: border-box;
// margin-right: 15px;
// text-align: right;
// }
// .resi-cell-value-radio {
// display: flex;
// align-items: center;
// min-height: 36px;
// }
// .resi-cell-value .resi-cell-input {
// width: 180px;
// }
// .resi-cell-label {
// width: 70px;
// box-sizing: border-box;
// margin-right: 15px;
// text-align: right;
// }
// .resi-cell-value-radio {
// display: flex;
// align-items: center;
// min-height: 36px;
// }
// .resi-cell-value .resi-cell-input {
// width: 180px;
// }
.resi-cell-value .resi-cell-textarea {
.resi-cell-value .resi-cell-textarea {
width: 300px;
}
.resi-cell-col {
}
.resi-cell-col {
display: flex;
.el-form-item {
margin-right: 10px;
}
}
.resi-cell-select {
}
.resi-cell-select {
width: 190px;
box-sizing: border-box;
margin-right: 10px;
@ -860,9 +934,9 @@ export default {
&-small {
width: 88px;
}
}
.resi-cell-select:last-child {
}
.resi-cell-select:last-child {
margin-right: 0;
}
}
// }
</style>

392
src/views/modules/base/resi.vue

@ -1,74 +1,63 @@
<template>
<div class="resi-container">
<el-card class="resi-card">
<el-collapse v-if="openSearch" v-model="activeNames">
<el-collapse-item
v-for="item in searchList"
<el-collapse v-if="openSearch"
v-model="activeNames">
<el-collapse-item v-for="item in searchList"
:key="item.itemGroupId"
:name="item.itemGroupId"
>
:name="item.itemGroupId">
<template slot="title">
<div class="collapse-title">{{ item.groupName }}</div>
</template>
<resi-search
v-if="searchList.length > 0"
<resi-search v-if="searchList.length > 0"
:ref="'resiSearch' + item.itemGroupId"
:form-list="item.queryItemList"
:column-name="defaultCategotyKey"
:show-grid="item.groupName == '基础信息'"
/>
:show-grid="item.groupName == '基础信息'" />
</el-collapse-item>
</el-collapse>
<template v-else>
<resi-search
v-if="searchList.length > 0"
<resi-search v-if="searchList.length > 0"
ref="resiSearch"
:form-list="searchList[0].queryItemList"
:column-name="defaultCategotyKey"
:show-grid="true"
:is-arrow="true"
@search="handleSearch"
/>
@search="handleSearch" />
</template>
<el-row v-if="openSearch" class="resi-search">
<el-row v-if="openSearch"
class="resi-search">
<!-- <el-col :span="20">
<el-button type="primary" size="mini">查询</el-button>
</el-col> -->
<el-col :span="24">
<el-button type="primary" size="small" @click="handleSearchFrom"
>查询</el-button
>
<el-button
class="diy-button--reset"
<el-button type="primary"
size="small"
@click="handleSearchFrom">查询</el-button>
<el-button class="diy-button--reset"
size="small"
@click="resetSearchForm"
>重置</el-button
>
@click="resetSearchForm">重置</el-button>
</el-col>
</el-row>
<div class="resi-down" @click="handleOpenSearch">
<img v-if="openSearch" src="../../../assets/img/arrow-up.png" />
<img v-else src="../../../assets/img/arrow-down.png" />
<div class="resi-down"
@click="handleOpenSearch">
<img v-if="openSearch"
src="../../../assets/img/arrow-up.png" />
<img v-else
src="../../../assets/img/arrow-down.png" />
</div>
</el-card>
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button
v-if="btnAuths.ic_resi_add"
<el-button v-if="btnAuths.ic_resi_add"
size="small"
class="diy-button--add"
@click="handleAdd"
>新增</el-button
>
<el-button
v-if="btnAuths.ic_resi_import"
@click="handleAdd">新增</el-button>
<el-button v-if="btnAuths.ic_resi_import"
class="diy-button--export"
size="small"
@click="handleExportModule('room')"
>下载模板</el-button
>
<el-upload
v-if="btnAuths.ic_resi_import"
@click="handleExportModule('room')">下载模板</el-button>
<el-upload v-if="btnAuths.ic_resi_import"
:headers="$getElUploadHeaders()"
ref="upload"
class="upload-demo"
@ -81,46 +70,32 @@
:on-progress="handleProgress"
:on-success="handleExcelSuccess"
:before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest"
>
<el-button
size="small"
:http-request="uploadHttpRequest">
<el-button size="small"
class="diy-button--delete"
:loading="importLoading"
>{{ importBtnTitle }}</el-button
>
:loading="importLoading">{{ importBtnTitle }}</el-button>
</el-upload>
<!-- <el-button size="small"
class="diy-button--reset"
:loading="exportBtn"
@click="handleExport">{{exportBtnTitle}}</el-button> -->
<el-button
v-if="btnAuths.ic_resi_export"
<el-button v-if="btnAuths.ic_resi_export"
class="diy-button--reset"
size="small"
@click="diyExport"
>导出</el-button
>
<el-button
v-if="btnAuths.ic_resi_batch_del"
@click="diyExport">导出</el-button>
<el-button v-if="btnAuths.ic_resi_batch_del"
class="diy-button--add"
size="small"
@click="deleteBatch"
>批量删除</el-button
>
@click="deleteBatch">批量删除</el-button>
<!-- <el-button type="primary" size="small">下载人口模板</el-button> -->
<el-button
size="small"
<el-button size="small"
v-if="btnAuths.ic_resi_smart_import && displayedBaobiaoBtn"
class="diy-button--add"
@click="reportForm"
>智能填报</el-button
>
@click="reportForm">智能填报</el-button>
</div>
<el-table
ref="ref_table"
<el-table ref="ref_table"
:data="tableData"
v-loading="tableLoading"
border
@ -128,46 +103,40 @@
class="resi-table"
:height="tableHeight"
@select-all="selectAll"
@selection-change="selectionChange"
>
<el-table-column
type="selection"
@selection-change="selectionChange">
<el-table-column type="selection"
fixed="left"
align="center"
:selectable="checkSelect"
width="55"
/>
<el-table-column
label="序号"
width="55" />
<el-table-column label="序号"
type="index"
fixed="left"
align="center"
width="50"
>
width="50">
</el-table-column>
<el-table-column
v-for="item in tableHeader"
<el-table-column v-for="item in tableHeader"
:key="item.columnName"
:prop="item.columnName"
:label="item.label"
align="center"
:fixed="item.columnName == 'NAME' ? 'left' : false"
:show-overflow-tooltip="true"
:width="item.width || computedWidth(item.label, item.itemType)"
>
:width="item.width || computedWidth(item.label, item.itemType)">
<!-- :width="item.itemType === 'radio' ? computedWidth(item.label) : 180" -->
<template slot-scope="scope">
<a
v-if="item.columnName == 'NAME' && btnAuths.ic_resi_view"
<a v-if="item.columnName == 'NAME' && btnAuths.ic_resi_view"
class="name-a"
@click="handleLook(scope.row)"
>
@click="handleLook(scope.row)">
{{ handleFilterSpan(scope.row, item) }}
</a>
<span v-else>{{ handleFilterSpan(scope.row, item) }}</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="150">
<el-table-column fixed="right"
label="操作"
align="center"
width="150">
<template slot-scope="scope">
<!-- <el-button @click="handleLook(scope.row)"
type="text"
@ -177,28 +146,20 @@
type="text"
size="small"
class="div-table-button--detail">变动</el-button> -->
<el-button
v-if="btnAuths.ic_resi_change_rec"
<el-button v-if="btnAuths.ic_resi_change_rec"
@click="handleChangeRecord(scope.row)"
type="text"
size="small"
class="div-table-button--detail"
>变更记录</el-button
>
class="div-table-button--detail">变更记录</el-button>
<template v-if="filterEdit(scope.row.ORG_ID)">
<el-button
v-if="btnAuths.ic_resi_update"
<el-button v-if="btnAuths.ic_resi_update"
@click="handleEdit(scope.row)"
type="text"
size="small"
class="div-table-button--edit"
>修改</el-button
>
<el-popconfirm
v-if="btnAuths.ic_resi_del"
class="div-table-button--edit">修改</el-button>
<el-popconfirm v-if="btnAuths.ic_resi_del"
title="删除之后无法回复,确认删除?"
@onConfirm="handleDel(scope.row)"
>
@onConfirm="handleDel(scope.row)">
<!-- <el-button slot="reference"
type="text"
size="small"
@ -221,56 +182,48 @@
@click="deleteBatch">删除</el-button> -->
</div>
<div>
<el-pagination
@size-change="handleSizeChange"
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total"
>
:total="total">
</el-pagination>
</div>
</div>
</el-card>
<el-dialog
:title="formName"
<el-dialog :title="formName"
:visible.sync="dialogVisible"
width="80%"
top="5vh"
append-to-body
class="dialog-h"
:close-on-click-modal="false"
:before-close="handlerCancle"
>
:before-close="handlerCancle">
<div class="dialog-h-content scroll-h">
<resi-form
v-if="dialogVisible"
<resi-form v-if="dialogVisible"
ref="baseForm"
:fixed="true"
:form-list="formList"
@changegroup="handleChangeGroup"
/>
<div v-if="dialogVisible" class="resi-other">
@changegroup="handleChangeGroup" />
<div v-if="dialogVisible"
class="resi-other">
<div class="resi-other-title">其他</div>
<div class="tabs-other-info">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
v-for="item in tabsList"
<el-tabs v-model="activeName"
@tab-click="handleClick">
<el-tab-pane v-for="item in tabsList"
:key="item.groupId"
:label="item.label"
:name="'group' + item.groupId"
>
<resi-form
:ref="'group' + item.groupId"
:name="'group' + item.groupId">
<resi-form :ref="'group' + item.groupId"
:columns="3"
:form-info="item.formInfo && item.formInfo"
:support-add="item.supportAdd"
:form-id="item.columnName"
:form-list="item.itemList"
/>
:form-list="item.itemList" />
</el-tab-pane>
</el-tabs>
</div>
@ -278,50 +231,44 @@
</div>
<div class="resi-btns">
<el-button size="small" @click="handlerCancle">取消</el-button>
<el-button
type="primary"
<el-button size="small"
@click="handlerCancle">取消</el-button>
<el-button type="primary"
size="small"
:loading="btnLoading"
@click="handleSUbmit"
>提交</el-button
>
@click="handleSUbmit">提交</el-button>
</div>
</el-dialog>
<el-dialog
:title="formName"
<el-dialog :title="formName"
:visible.sync="dialogEditVisible"
width="80%"
append-to-body
class="dialog-h"
top="5vh"
:close-on-click-modal="false"
:before-close="handlerEditCancle"
>
:before-close="handlerEditCancle">
<div class="dialog-h-content scroll-h">
<edit-resi
v-if="dialogEditVisible"
<edit-resi v-if="dialogEditVisible"
ref="baseForm"
:disabled="disabled"
:editUserId="editUserId"
:form-info="editForm"
:fixed="true"
:form-list="formList"
:agency-id="editAgencyId"
@changegroup="handleChangeGroup"
/>
<div v-if="dialogEditVisible" class="resi-other">
@changegroup="handleChangeGroup" />
<div v-if="dialogEditVisible"
class="resi-other">
<div class="resi-other-title">其他</div>
<div class="tabs-other-info">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
v-for="item in tabsList"
<el-tabs v-model="activeName"
@tab-click="handleClick">
<el-tab-pane v-for="item in tabsList"
:key="item.groupId"
:label="item.label"
:name="'group' + item.groupId"
>
<edit-resi
:ref="'group' + item.groupId"
:name="'group' + item.groupId">
<edit-resi :ref="'group' + item.groupId"
:columns="3"
:support-add="item.supportAdd"
:form-id="item.columnName"
@ -329,65 +276,53 @@
:form-list="item.itemList"
:disabled="disabled"
:label-width="'140px'"
:agency-id="editAgencyId"
/>
:agency-id="editAgencyId" />
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
<div class="resi-btns">
<el-button size="small" @click="handlerEditCancle">取消</el-button>
<el-button
v-if="!disabled"
<el-button size="small"
@click="handlerEditCancle">取消</el-button>
<el-button v-if="!disabled"
type="primary"
size="small"
:loading="btnLoading"
@click="handleEditSUbmit"
>提交</el-button
>
@click="handleEditSUbmit">提交</el-button>
</div>
</el-dialog>
<!-- 调动 -->
<el-dialog
:visible.sync="tranferShow"
<el-dialog :visible.sync="tranferShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'人员变动'"
width="950px"
top="5vh"
class="dialog-h"
@closed="diaClose"
>
<resi-transfer
ref="ref_transfer"
@dialogCancle="transferClose"
></resi-transfer>
@closed="diaClose">
<resi-transfer ref="ref_transfer"
@dialogCancle="transferClose"></resi-transfer>
</el-dialog>
<!-- 变更记录 -->
<el-dialog
:visible.sync="changeRecordShow"
<el-dialog :visible.sync="changeRecordShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'变更记录'"
width="1150px"
top="5vh"
@closed="diaClose"
>
@closed="diaClose">
<resi-change-record ref="ref_changerecord"></resi-change-record>
</el-dialog>
<el-dialog
:visible.sync="diyDialog"
<el-dialog :visible.sync="diyDialog"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="1150px"
top="5vh"
class="dialog-h"
>
<diy-info
v-if="diyDialog"
class="dialog-h">
<diy-info v-if="diyDialog"
ref="ref_diy"
:list="exportList"
:search="{
@ -396,16 +331,13 @@
pageSize: pageSize,
conditions: conditions,
}"
@close="handleDiyClose"
></diy-info>
@close="handleDiyClose"></diy-info>
</el-dialog>
<people-more
v-if="showedPeopleMoreInfo && lookInfo.userId"
<people-more v-if="showedPeopleMoreInfo && lookInfo.userId"
:view_real_data="btnAuths.ic_resi_view_real_data"
:userId="lookInfo.userId"
:gridName="lookInfo.gridName"
@close="handleCancleLook"
/>
@close="handleCancleLook" />
<baobiao ref="baobiao" />
</div>
</template>
@ -435,7 +367,7 @@ export default {
peopleMore,
diyInfo,
},
data() {
data () {
return {
activeNames: [],
diyDialog: false,
@ -489,6 +421,7 @@ export default {
userId: "",
gridName: "",
},
editUserId: '',
displayedBaobiaoBtn: false,
@ -507,7 +440,7 @@ export default {
};
},
props: {},
async activated() {
async activated () {
console.log("this.$route.query---", this.$route.query);
if (this.$route.query && this.$route.query.columnName) {
this.searchList = [];
@ -520,13 +453,13 @@ export default {
},
computed: {
...mapGetters(["clientHeight", "iframeHeight"]),
tableHeight() {
tableHeight () {
const h = this.clientHeight - this.searchH - 310 + this.iframeHeight;
const _h = this.clientHeight - 310 - this.searchH;
return this.$store.state.inIframe ? h : _h;
},
},
async created() {
async created () {
this.updateBtnAuths();
if (this.$route.query) {
@ -547,7 +480,7 @@ export default {
console.log("storeoooo----0000", this.$store);
console.log("resiSearch", this.$refs.resiSearch.$el.offsetHeight);
},
async mounted() {
async mounted () {
// this.$nextTick(() => {
// this.tableHeight = document.documentElement.clientHeight - this.$refs.resiSearch.$el.offsetHeight - 280 + 'px'
// })
@ -564,7 +497,7 @@ export default {
},
methods: {
//
updateBtnAuths() {
updateBtnAuths () {
let rot = this.$route;
if (Array.isArray(rot.meta.btns)) {
rot.meta.btns.forEach((item) => {
@ -572,7 +505,7 @@ export default {
});
}
},
reportForm() {
reportForm () {
this.$refs.baobiao.init({
elseParams: {
categoryKeys: ["resi_info"],
@ -588,11 +521,11 @@ export default {
},
});
},
checkSelect(row, index) {
checkSelect (row, index) {
return row.isChecked;
},
//
async handleTransfer(row) {
async handleTransfer (row) {
this.tranferShow = true;
await nextTick(200);
@ -600,7 +533,7 @@ export default {
this.$refs.ref_transfer.initForm(row);
},
//
async handleChangeRecord(row) {
async handleChangeRecord (row) {
this.changeRecordShow = true;
await nextTick(200);
@ -608,37 +541,37 @@ export default {
this.$refs.ref_changerecord.initForm(row);
},
diaClose() {
diaClose () {
this.tranferShow = false;
this.changeRecordShow = false;
},
transferClose() {
transferClose () {
this.tranferShow = false;
this.getTableData();
},
handleDiyClose() {
handleDiyClose () {
this.diyDialog = false;
},
handleOpenSearch() {
handleOpenSearch () {
if (!this.openSearch) this.activeNames = [this.searchList[0].itemGroupId];
this.openSearch = !this.openSearch;
},
async diyExport() {
async diyExport () {
await this.getExportList();
},
computedWidth(label, type) {
computedWidth (label, type) {
let wd = "";
if (type == "input" || type == "select") wd = 40 * label.length;
else if (type == "radio") wd = 20 * label.length;
console.log("type-----wd", wd);
return wd > 80 ? wd : 80;
},
filterEdit(id) {
filterEdit (id) {
const { user } = this.$store.state;
return id === user.agencyId;
},
selectionChange(selection) {
selectionChange (selection) {
this.selection = selection;
if (selection.length === this.tableData.length) {
@ -652,7 +585,7 @@ export default {
this.isIndeterminate = false;
}
},
handleSelectAll(selectAllFlag) {
handleSelectAll (selectAllFlag) {
// if (this.tableData.length == 0) {
// this.selAllFlag = false
// return
@ -667,7 +600,7 @@ export default {
});
}
},
selectAll(selection) {
selectAll (selection) {
this.selection = selection;
if (selection.length > 0) {
@ -676,7 +609,7 @@ export default {
this.selAllFlag = false;
}
},
deleteBatch() {
deleteBatch () {
if (this.selection.length > 0) {
this.$confirm("删除之后无法恢复,确认删除?", "提示", {
confirmButtonText: "确定",
@ -698,17 +631,17 @@ export default {
this.$message.warning("请先选择要删除的居民");
}
},
handleSizeChange(val) {
handleSizeChange (val) {
console.log(`每页 ${val}`);
this.pageSize = val;
this.getTableData();
},
handleCurrentChange(val) {
handleCurrentChange (val) {
console.log(`当前页: ${val}`);
this.currentPage = val;
this.getTableData();
},
handleFilterSpan(row, item) {
handleFilterSpan (row, item) {
let _val = "";
if (item.itemType === "radio" && item.options.length > 0) {
item.options.forEach((n) => {
@ -719,7 +652,7 @@ export default {
return _val || row[item.columnName];
},
handleSearchFrom() {
handleSearchFrom () {
let arr = [];
this.searchList.forEach((item) => {
const arr1 =
@ -734,13 +667,13 @@ export default {
this.conditions = arr;
this.getTableData();
},
handleSearch(val) {
handleSearch (val) {
console.log("searchhh--", val);
this.currentPage = 1;
this.conditions = val;
this.getTableData();
},
resetSearchForm(formName) {
resetSearchForm (formName) {
// for(const n in this.form) {
// this.form[n] = ''
// }
@ -753,7 +686,7 @@ export default {
this.conditions = [];
this.getTableData();
},
async handleExportModule() {
async handleExportModule () {
let url = "/epmetuser/icresiuser/import/download-template";
let params = {};
@ -791,7 +724,7 @@ export default {
});
},
//
download(data, fileName) {
download (data, fileName) {
console.log("data", data);
if (!data) {
return;
@ -815,7 +748,7 @@ export default {
window.URL.revokeObjectURL(url);
}
},
async handleExport() {
async handleExport () {
this.exportBtn = true;
this.exportBtnTitle = "正在导出...";
let params = {
@ -856,18 +789,18 @@ export default {
this.exportBtn = false;
},
//
handleExcelSuccess(res, file) {
handleExcelSuccess (res, file) {
if (res.code === 0 && res.msg === "success") {
console.log("resss---ppp", res);
} else {
this.$message.error(res.msg);
}
},
handleProgress(event, file, fileList) {
handleProgress (event, file, fileList) {
console.log("percentage", file.percentage);
},
beforeExcelUpload(file) {
beforeExcelUpload (file) {
console.log("file", file);
const isType = file.type === "application/vnd.ms-excel";
const isTypeComputer =
@ -884,7 +817,7 @@ export default {
}
return fileType && isLt1M;
},
async uploadHttpRequest(file) {
async uploadHttpRequest (file) {
this.importLoading = true;
this.importBtnTitle = "正在上传中...";
this.$message({
@ -943,10 +876,10 @@ export default {
this.importBtnTitle = "导入";
this.$refs.upload.clearFiles();
},
handleClick(tab, event) {
handleClick (tab, event) {
console.log(tab, event);
},
async handleLook(row) {
async handleLook (row) {
this.lookInfo.userId = row.icResiUserId;
this.lookInfo.gridName = row.GRID_ID;
this.showedPeopleMoreInfo = true;
@ -955,22 +888,23 @@ export default {
// await this.getFormList('edit')
// this.getrowInfo(row.icResiUserId)
},
handleCancleLook() {
handleCancleLook () {
this.lookInfo.userId = "";
this.lookInfo.gridName = "";
this.showedPeopleMoreInfo = false;
},
async handleEdit(row) {
async handleEdit (row) {
this.disabled = false;
this.editAgencyId = row.ORG_ID;
this.editUserId = row.icResiUserId
await this.getFormList("edit");
await this.getrowInfo(row.icResiUserId);
},
async handleAdd() {
async handleAdd () {
await this.getFormList();
this.dialogVisible = true;
},
async handleChangeGroup(val) {
async handleChangeGroup (val) {
console.log("changeguoprrrrr----", val);
let { childGroup, value, partyInfo } = val;
@ -1008,7 +942,7 @@ export default {
}
this.tabsList = [...list];
},
formetForm() {
formetForm () {
const _baseForm = this.$refs.baseForm.handleForm();
let arr = [];
if (_baseForm.length === 0) return false;
@ -1064,15 +998,15 @@ export default {
console.log("finalArr", finalArr);
return finalArr;
},
async handleEditSUbmit() {
async handleEditSUbmit () {
const arr = await this.formetForm();
if (arr) this.submitEdit(arr);
},
async handleSUbmit() {
async handleSUbmit () {
const arr = await this.formetForm();
if (arr) this.submitAdd(arr);
},
handleDel(row) {
handleDel (row) {
let params = {
formCode: "resi_base_info",
userIds: [row.icResiUserId],
@ -1095,24 +1029,24 @@ export default {
return this.$message.error("网络错误");
});
},
handleFormatUrl(url) {
handleFormatUrl (url) {
return url.includes("?");
},
handlerEditCancle() {
handlerEditCancle () {
this.$refs.baseForm.resetForm();
this.tabsList.forEach((item) => {
this.$refs["group" + item.groupId][0].resetForm();
});
this.dialogEditVisible = false;
},
handlerCancle() {
handlerCancle () {
this.$refs.baseForm.resetForm();
this.tabsList.forEach((item) => {
this.$refs["group" + item.groupId][0].resetForm();
});
this.dialogVisible = false;
},
async submitAdd(arr) {
async submitAdd (arr) {
this.btnLoading = true;
await this.$http
.post("/epmetuser/icresiuser/add", arr)
@ -1135,7 +1069,7 @@ export default {
});
this.btnLoading = false;
},
async submitEdit(arr) {
async submitEdit (arr) {
this.btnLoading = true;
await this.$http
.post("/epmetuser/icresiuser/edit", arr)
@ -1158,7 +1092,7 @@ export default {
});
this.btnLoading = false;
},
async getTableHeader() {
async getTableHeader () {
await this.$http
.post("/oper/customize/icform/tableheaders", {
formCode: "resi_base_info",
@ -1174,7 +1108,7 @@ export default {
return this.$message.error("网络错误");
});
},
async getTableData() {
async getTableData () {
this.tableLoading = true;
let params = {
formCode: "resi_base_info",
@ -1207,7 +1141,7 @@ export default {
});
this.tableLoading = false;
},
getrowInfo(id) {
getrowInfo (id) {
let params = {
formCode: "resi_base_info",
icResiUserId: id,
@ -1283,7 +1217,7 @@ export default {
return this.$message.error("网络错误");
});
},
async getOptionsList(url) {
async getOptionsList (url) {
let options = [];
// console.log('getOptionsList----', url)
await this.$http
@ -1300,7 +1234,7 @@ export default {
});
return options;
},
async getSearchList() {
async getSearchList () {
// /oper/customize/icform/conditionlist
await this.$http
.post("/oper/customize/icform/conditionlist-bygroup", {
@ -1341,7 +1275,7 @@ export default {
return this.$message.error("网络错误");
});
},
getTreeData(data) {
getTreeData (data) {
if (!Array.isArray(data)) return [];
let arr = data.map((item) => {
let _item = {};
@ -1356,7 +1290,7 @@ export default {
});
return arr;
},
async getFormList(type) {
async getFormList (type) {
await this.$http
.post("/oper/customize/icform/getcustomerform", {
formCode: "resi_base_info",
@ -1400,7 +1334,7 @@ export default {
return this.$message.error("网络错误");
});
},
async getExportList(type) {
async getExportList (type) {
const url = "/oper/customize//icformitemgroup/list";
let params = {
formCode: "resi_base_info",
@ -1424,7 +1358,7 @@ export default {
this.$message.error(msg);
}
},
async getExportChildList(groupId) {
async getExportChildList (groupId) {
const url = `/oper/customize/icformitem/getItemList/${groupId}`;
let params = {};
@ -1436,7 +1370,7 @@ export default {
this.$message.error(msg);
}
},
async deleteresiBatch() {
async deleteresiBatch () {
if (this.selection.length === 0)
return this.$message.error("请选择之后进行操作");
let userIds = this.selection.map((item) => item.icResiUserId);

Loading…
Cancel
Save