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

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

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

Loading…
Cancel
Save