Browse Source

Merge branch 'dev-shuju' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev-shuju

shibei_master
13176889840 4 years ago
parent
commit
a3f835c90a
  1. BIN
      src/assets/img/shuju/people/ren.png
  2. 26
      src/assets/scss/people.scss
  3. 88
      src/views/modules/base/community/buildForm.vue
  4. 7
      src/views/modules/base/community/buildTable.vue
  5. 6
      src/views/modules/base/community/community.vue
  6. 55
      src/views/modules/base/community/communityForm.vue
  7. 19
      src/views/modules/base/community/communityTable.vue
  8. 20
      src/views/modules/base/community/roomForm.vue
  9. 3
      src/views/modules/base/community/roomTable.vue
  10. 816
      src/views/modules/visual/basicinfo/cpts/people-more.vue
  11. 324
      src/views/modules/visual/basicinfo/people.vue

BIN
src/assets/img/shuju/people/ren.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 301 KiB

After

Width:  |  Height:  |  Size: 308 KiB

26
src/assets/scss/people.scss

@ -58,8 +58,34 @@
margin-top: 0;
padding-bottom: 15px;
.ren-name {
position: absolute;
left: 0;
right: 0;
top: -10px;
width: 400px;
margin: 0 auto;
font-size: 24px;
line-height: 40px;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
> span {
@include toe;
display: block;
text-align: center;
}
> img {
display: block;
margin: 3px auto;
}
}
.pic-ren {
margin: 0 auto;
display: block;
pointer-events: none;
}
.ren-prop {

88
src/views/modules/base/community/buildForm.vue

@ -58,7 +58,7 @@
label-width="150px">
<el-input-number class="item_width_1"
v-model="dataForm.totalFloorNum"
:min="1"
:min="0"
label="层数"></el-input-number>
</el-form-item>
<el-form-item label="户数"
@ -67,7 +67,7 @@
label-width="150px">
<el-input-number class="item_width_1"
v-model="dataForm.totalHouseNum"
:min="1"
:min="0"
label="户数"></el-input-number>
</el-form-item>
@ -75,31 +75,35 @@
prop="longitude"
label-width="150px"
style="display: block">
<el-input class="item_width_4"
maxlength="50"
placeholder="请输入关键字"
v-model="keyWords">
</el-input>
<el-button style="margin-left: 10px"
type="primary"
size="small"
@click="handleSearchMap">查询</el-button>
<div id="app"
class="div_map"></div>
<div style="margin-top: 10px">
<span>经度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="dataForm.longitude">
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input class="item_width_3"
<div style="width:500px">
<el-input class="item_width_4"
maxlength="50"
placeholder="请输入纬度"
v-model="dataForm.latitude">
placeholder="请输入关键字"
v-model="keyWords">
</el-input>
<el-button style="margin-left: 10px"
type="primary"
size="small"
@click="handleSearchMap">查询</el-button>
<div id="app"
class="div_map"></div>
<div style="margin-top: 10px">
<span>经度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="dataForm.longitude">
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="dataForm.latitude">
</el-input>
</div>
</div>
</el-form-item>
</el-form>
@ -137,7 +141,7 @@ export default {
neighborHoodId: '',//id
buildingName: '',//
// sort: 0,//
totalUnitNum: 0,//
totalUnitNum: 1,//
totalFloorNum: 0,//
totalHouseNum: 0,//
type: '',//
@ -158,7 +162,7 @@ export default {
methods: {
async initForm (type, row, agencyObj) {
this.$refs.ref_form.resetFields();
this.agencyObj = agencyObj
this.dataForm.agencyId = agencyObj.agencyId
this.dataForm.gridId = agencyObj.gridId
@ -315,7 +319,7 @@ export default {
neighborHoodId: '',//id
buildingName: '',//
// sort: 0,//
totalUnitNum: 0,//
totalUnitNum: 1,//
totalFloorNum: 0,//
totalHouseNum: 0,//
type: '',//
@ -347,8 +351,8 @@ export default {
{ required: true, message: '楼栋名称不能为空', trigger: 'blur' },
{
min: 1,
max: 50,
message: '小区名称长度在 1 到 50个字符',
max: 10,
message: '小区名称长度在 1 到 10个字符',
trigger: 'blur'
}
],
@ -358,15 +362,15 @@ export default {
totalUnitNum: [
{ required: true, message: '单元数不能为空', trigger: 'blur' }
],
totalFloorNum: [
{ required: true, message: '层数不能为空', trigger: 'blur' }
],
totalHouseNum: [
{ required: true, message: '户数不能为空', trigger: 'blur' }
],
longitude: [
{ required: true, message: '坐标不能为空', trigger: 'blur' }
],
// totalFloorNum: [
// { required: true, message: '', trigger: 'blur' }
// ],
// totalHouseNum: [
// { required: true, message: '', trigger: 'blur' }
// ],
// longitude: [
// { required: true, message: '', trigger: 'blur' }
// ],
}
},
@ -374,7 +378,7 @@ export default {
props: {}
}
</script>
<style scoped>
<style lang="scss" scoped>
.item_width_1 {
width: 500px;
}
@ -408,3 +412,9 @@ export default {
margin-top: 30px;
}
</style>
<style>
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

7
src/views/modules/base/community/buildTable.vue

@ -60,6 +60,7 @@
<div class="div_table">
<el-table :data="tableData"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
border
:height="tableHeight"
v-loading="tableLoading"
@ -88,15 +89,15 @@
<el-table-column label="操作"
fixed="right"
width="170"
width="140"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<el-button type="text"
<!-- <el-button type="text"
style="color:#feb349;text-decoration: underline;"
size="small"
@click="handleToNextLevel(scope.row)">进入</el-button>
@click="handleToNextLevel(scope.row)">进入</el-button> -->
<el-button type="text"
style="color:#1C6AFD;text-decoration: underline;"
size="small"

6
src/views/modules/base/community/community.vue

@ -90,7 +90,7 @@ export default {
},
computed: {
rowHeight () {
return (this.clientHeight - 140) + 'px'
return (this.clientHeight - 120) + 'px'
},
treeHeight () {
return (this.clientHeight - 200) + 'px'
@ -264,7 +264,7 @@ export default {
}
.div_tree {
flex: 0 0 400px;
flex: 0 0 280px;
background-color: #ffffff;
border-radius: 5px;
padding: 10px;
@ -276,7 +276,7 @@ export default {
.div_table {
margin-left: 15px;
width: calc(100vw - 680px);
width: calc(100vw - 550px);
background-color: #ffffff;
border-radius: 5px;
padding: 10px;

55
src/views/modules/base/community/communityForm.vue

@ -89,30 +89,32 @@
prop="longitude"
label-width="150px"
style="display: block">
<el-input class="item_width_4"
maxlength="50"
placeholder="请输入关键字"
v-model="keyWords">
</el-input>
<el-button style="margin-left: 10px"
type="primary"
size="small"
@click="handleSearchMap">查询</el-button>
<div id="app"
class="div_map"></div>
<div style="margin-top: 10px">
<span>经度</span>
<el-input class="item_width_3"
<div style="width:500px">
<el-input class="item_width_4"
maxlength="50"
placeholder="请输入经度"
v-model="dataForm.longitude">
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="dataForm.latitude">
placeholder="请输入关键字"
v-model="keyWords">
</el-input>
<el-button style="margin-left: 10px"
type="primary"
size="small"
@click="handleSearchMap">查询</el-button>
<div id="app"
class="div_map"></div>
<div style="margin-top: 10px">
<span>经度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="dataForm.longitude">
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="dataForm.latitude">
</el-input>
</div>
</div>
</el-form-item>
</el-form>
@ -273,7 +275,7 @@ export default {
},
async initForm (type, row, agencyObj) {
this.$refs.ref_form.resetFields();
this.agencyObj = agencyObj
// debugger
map.setCenter(new TMap.LatLng(agencyObj.latitude, agencyObj.longitude))
@ -445,6 +447,7 @@ export default {
longitude: '', //
latitude: '' //
}
this.propertyFormShow = false
},
//
startLoading () {
@ -532,3 +535,9 @@ export default {
margin-top: 30px;
}
</style>
<style>
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

19
src/views/modules/base/community/communityTable.vue

@ -65,37 +65,40 @@
border
:height="tableHeight"
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%">
<el-table-column prop="neighborHoodName"
label="小区名称"
width="180">
min-width="100">
</el-table-column>
<el-table-column prop="agencyName"
label="所属组织"
width="160">
min-width="100">
</el-table-column>
<el-table-column prop="gridName"
label="所属网格"
width="140">
min-width="120">
</el-table-column>
<el-table-column prop="address"
label="详细地址">
label="详细地址"
min-width="180">
</el-table-column>
<el-table-column prop="remark"
label="备注">
label="备注"
min-width="50">
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="170"
width="140"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<el-button type="text"
<!-- <el-button type="text"
style="color:#feb349;text-decoration: underline;"
size="small"
@click="handleToNextLevel(scope.row)">进入</el-button>
@click="handleToNextLevel(scope.row)">进入</el-button> -->
<el-button type="text"
style="color:#1C6AFD;text-decoration: underline;"
size="small"

20
src/views/modules/base/community/roomForm.vue

@ -74,8 +74,8 @@
style="display: block">
<el-radio-group v-model="rentFlag">
<el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
@ -137,7 +137,7 @@ export default {
houseId: '', //ID
houseType: '1',
purpose: '1',
rentFlag: 0,
rentFlag: 1,
dataForm: {
neighborHoodId: '', // ID
buildingId: '',//ID
@ -145,7 +145,7 @@ export default {
doorName: '',//
houseType: '',//
purpose: '',//
rentFlag: 0,//10
rentFlag: 1,//10
ownerPhone: '', //
ownerName: '', //
ownerIdCard: '' //
@ -163,7 +163,7 @@ export default {
methods: {
async initForm (type, row, agencyObj) {
this.$refs.ref_form.resetFields();
this.agencyObj = agencyObj
this.dataForm.neighborHoodId = agencyObj.communityId
this.dataForm.buildingId = agencyObj.id
@ -282,7 +282,7 @@ export default {
this.houseId = '' //ID
this.houseType = '1'
this.purpose = '1'
this.rentFlag = 0
this.rentFlag = 1
this.dataForm = {
neighborHoodId: '', // ID
buildingId: '',//ID
@ -290,11 +290,12 @@ export default {
doorName: '',//
houseType: '1',//
purpose: '1',//
rentFlag: 0,//10
rentFlag: 1,//10
ownerPhone: '', //
ownerName: '', //
ownerIdCard: '' //
}
},
//
startLoading () {
@ -346,7 +347,7 @@ export default {
props: {}
}
</script>
<style scoped>
<style lang="scss" scoped>
.item_width_1 {
width: 500px;
}
@ -373,3 +374,8 @@ export default {
margin-top: 30px;
}
</style>
<style>
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

3
src/views/modules/base/community/roomTable.vue

@ -60,6 +60,7 @@
<div class="div_table">
<el-table :data="tableData"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
v-loading="tableLoading"
border
style="width: 100%">
@ -98,7 +99,7 @@
</el-table-column>
<el-table-column prop="ownerIdCard"
label="身份证"
width="160">
width="170">
</el-table-column>
<el-table-column label="操作"
fixed="right"

816
src/views/modules/visual/basicinfo/cpts/people-more.vue

@ -0,0 +1,816 @@
<template>
<div :id="formId" class="resi-container">
<el-form :ref="formId" class="resi-form" :model="form" :rules="rules" :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-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" />
</template>
<template v-else>
<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="form.GRID_ID" label="所属网格" required>
<!-- <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"
>
<el-option
v-for="item in optionsG"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<!-- </div> -->
</el-form-item>
</el-col>
<el-col :span="18">
<el-form-item :prop="form.VILLAGE_ID" label="所属小区" required>
<div class="resi-cell-value">
<el-select v-model.trim="form.VILLAGE_ID" :disabled="disabled" placeholder="请选择小区" size="small"
clearable class="resi-cell-select"
>
<el-option
v-for="item in optionsV"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model.trim="form.BUILD_ID" :disabled="disabled" placeholder="请选择楼号" size="small"
clearable 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">
</el-option>
</el-select>
<el-select v-model.trim="form.UNIT_ID" :disabled="disabled" placeholder="请选择单元" size="small"
clearable 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">
</el-option>
</el-select>
<el-select v-model.trim="form.HOME_ID" :disabled="disabled" placeholder="请选择房号" size="small"
clearable class="resi-cell-select resi-cell-select-middle"
>
<el-option
v-for="item in optionsH"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</el-form-item>
</el-col>
<!-- <el-col :span="6">
<el-form-item :prop="form.BUILD_ID" label="所属楼宇">
<div class="resi-cell-value">
<el-select v-model.trim="form.BUILD_ID" :disabled="disabled" placeholder="请选择楼号" size="small"
clearable class="resi-cell-select"
>
<el-option
v-for="item in optionsB"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :prop="form.HOME_ID" label="所属家庭">
<div class="resi-cell-value">
<el-select v-model.trim="form.HOME_ID" :disabled="disabled" placeholder="请选择" size="small"
clearable class="resi-cell-select"
>
<el-option
v-for="item in optionsH"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</el-form-item>
</el-col> -->
</el-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)"
:style="n.itemType === 'divider' && 'display: none;'">
<el-form-item :prop="n.columnName" :label="n.label" :required="Boolean(n.required)">
<!-- <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"
v-model.trim="form[n.columnName]"
:disabled="disabled"
class="resi-cell-input"
size="small"
clearable
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'">
<el-input
v-model.trim="form[n.columnName]"
class="resi-cell-textarea"
size="small"
type="textarea"
clearable
placeholder="请输入内容"
>
</el-input>
</template> -->
<el-date-picker
v-else-if="n.itemType === 'datepicker'"
v-model.trim="form[n.columnName]"
:disabled="disabled"
class="resi-cell-input"
type="date"
size="small"
clearable
placeholder="选择日期"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd">
</el-date-picker>
<el-date-picker
v-else-if="n.itemType === 'daterange'"
v-model.trim="form[n.columnName]"
:disabled="disabled"
type="daterange"
align="right"
unlink-panels
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
<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'"
v-model.trim="form[n.columnName]"
:disabled="disabled"
is-range
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围">
</el-time-picker>
<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"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<!-- <el-cascader
:options="options"
:props="{ checkStrictly: true }"
clearable></el-cascader> -->
<el-cascader
v-else-if="n.itemType === 'cascader'"
v-model.trim="form[n.columnName]"
:options="n.options"
:props="{ checkStrictly: true }"
:disabled="disabled"
clearable
size="small"
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"
:label="ns.value">
{{ ns.label }}
</el-radio>
<!-- <el-radio v-model.trim="form[n.columnName]" label="1">备选项</el-radio> -->
</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 label="n.la"></el-checkbox> -->
</el-checkbox-group>
</template>
</div>
<!-- </div> -->
</el-form-item>
</el-col>
</el-row>
</template>
</el-form>
</div>
</template>
<script>
import { isCard, isMobile } from '@/utils/validate'
export default {
name: 'editForm',
props: {
fixed: {
type: Boolean,
default: false
},
labelWidth: {
type: String,
default: '100px'
},
formId: {
type: String,
default: 'resiForm'
},
formList: {
type: Array,
default: function () {
return []
}
},
formInfo: {
type: Object,
default: function () {
return {}
}
},
mutiList: {
type: Array,
default: function () {
return []
}
},
//
columns: {
type: Number,
default: 4
},
supportAdd: { //
type: Boolean,
default: false
},
disabled: { //
type: Boolean,
default: false
}
},
data () {
// let form = {}
// let rules = {}
let checkMObile = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入手机号'))
} else {
if (!isMobile(value)) {
callback(new Error('手机号格式不正确'))
}
callback()
}
}
let checkIdCard = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入身份证'))
} else {
if (!isCard(value)) {
callback(new Error('身份证号格式不正确'))
}
callback()
}
}
let initForm = (obj, arr) => {
let _form = {}
// console.log('formInfo', obj)
if (Object.keys(obj).length > 0) {
_form = { ...obj }
// return _form
}
const itemTypes = ['cascader', 'daterange', 'timerange']
arr.forEach(item => {
if (item.multiSelect || itemTypes.includes(item.itemType)) {
if (item.columnValue && item.columnValue.indexOf(',') > -1) _form[item.columnName] = item.columnValue.split(',')
else _form[item.columnName] = (item.columnValue && [item.columnValue]) || []
} else _form[item.columnName] = item.columnValue || ''
})
// console.log('_from0000---', arr)
return _form
}
let initRules = (arr) => {
let rules = {}
arr.forEach(item => {
if (item.required) {
if (item.validType === 'mobile') {
rules[item.columnName] = [
{ validator: checkMObile, trigger: 'blur' }
]
} else if (item.validType === 'id_card') {
rules[item.columnName] = [
{ validator: checkIdCard, trigger: 'blur' }
]
} else {
rules[item.columnName] = [
{ required: true, message: `请输入${item.label}`, trigger: 'blur' }
]
}
}
})
return rules
}
let form = initForm(this.formInfo, this.formList)
let rules = initRules(this.formList)
let tempFormList = [ ...this.formList ]
let constForm = {
...form
}
return {
openSearch: false,
fixedForm: {
GRID_ID: '',
VILLAGE_ID: '',
BUILD_ID: '',
UNIT_ID: '',
HOME_ID: ''
},
fixedList: {},
form: {
...form
},
constForm,
tempFormList,
addCount: 0,
addList: [],
rules,
value: '',
optionsV: [],
optionsB: [],
optionsH: [],
optionsG: [],
optionsD: [],
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick (picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit('pick', [start, end])
}
}, {
text: '最近一个月',
onClick (picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
picker.$emit('pick', [start, end])
}
}, {
text: '最近三个月',
onClick (picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
picker.$emit('pick', [start, end])
}
}]
}
}
},
computed: {
sliceList () {
return function (data, count) {
if (data !== undefined) {
let index = 0
let arrTemp = []
let arrTemp1 = []
let arr1 = []
let arr2 = []
let _i = 0
let _index = 0
for (let i = 0; i < data.length; i++) {
if (data[i].itemType === 'divider' || data[i].itemType === 'checkbox') {
_i = i + 1
}
}
arr1 = data.slice(0, _i)
arr2 = data.slice(_i, data.length)
for (let i = 0; i < arr1.length; i++) {
index = parseInt(i / count)
if (arrTemp.length <= index) {
arrTemp.push([])
}
arrTemp[index].push(arr1[i])
}
for (let i = 0; i < arr2.length; i++) {
_index = parseInt(i / count)
if (arrTemp1.length <= _index) {
arrTemp1.push([])
}
arrTemp1[_index].push(arr2[i])
}
arrTemp = arrTemp.concat(arrTemp1)
return arrTemp
}
}
}
},
watch: {
form: {
handler (val, val2) {
console.log('valpppp----', val, val2)
for (let n in val) {
if (this.constForm[n] !== val[n]) {
this.handleChangeForm(n)
console.log('nnnnnn', n)
this.handleChangeGroup(n, val[n])
}
}
this.constForm = { ...val }
},
deep: true
}
},
created () {
this.initForm()
// console.log('formInfo---ggg', this.form)
if (this.supportAdd) {
this.addList = [...this.mutiList]
// console.log('addList----111', this.addList)
}
if (this.fixed) {
this.getGridList()
this.getValiheList()
this.getBuildList()
this.getUniList()
this.getHouseList()
}
},
methods: {
initForm () {
this.formList.forEach(async item => {
if (item.optionSourceType === 'remote') {
await this.getOptionsLists(item.optionSourceValue).then(res => {
item.options = this.getTreeData(res)
})
}
})
},
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 }
}
return _item
})
return arr
},
handleOpenSearch () {
this.openSearch = !this.openSearch
},
handleAddRow () {
this.addList.push({
row: this.addList.length,
itemList: this.formList
})
},
//
handleFiexedForm (val) {
let item = {
[val]: this.fixedForm[val]
}
this.fixedList.push(item)
this.$set(this.fixedList, val, this.fixedForm[val])
},
//
handleChangeGroup (columnName, value) {
this.tempFormList.forEach(item => {
if (item.columnName === columnName && item.itemType === 'radio' && item.childGroup) {
console.log('columnName', item.columnName, columnName)
this.$emit('changegroup', { value, childGroup: item.childGroup })
}
})
},
// form
handleChangeForm (val) {
if (this.fixed) {
for (let n in this.fixedForm) {
if (n === val) {
this.$set(this.fixedList, val, this.form[val])
}
}
}
this.tempFormList.forEach(item => {
if (item.columnName === val) item.isChange = true
})
},
handleChange () {
// this.handleForm()
},
handleChangeGrid (val) {
console.log('val', val)
this.form.VILLAGE_ID = ''
this.form.BUILD_ID = ''
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
this.getValiheList()
this.getBuildList()
this.getUniList()
this.getHouseList()
},
handleChangeV (val) {
console.log('val', val)
this.form.BUILD_ID = ''
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
this.getBuildList()
this.getUniList()
this.getHouseList()
},
handleChangeB (val) {
console.log('val', val)
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
this.getUniList()
this.getHouseList()
},
handleChangeD () {
this.form.HOME_ID = ''
this.getHouseList()
},
handlerMuscForm () {
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() ])
})
if (arr.length === 0) return arr
let arr2 = arr.reduce(function (a, b) { return a.concat(b) })
let hash = {}
let i = 0
let res = []
// let finalArr = []
arr2.forEach((item) => {
let name = item.tableName
if (hash[name]) {
res[hash[name] - 1].list.push(...item.list)
} else {
hash[name] = ++i
res.push({
list: [...item.list],
supportAdd: this.supportAdd,
tableName: name
})
}
})
return res
},
resetForm () {
this.$refs[this.formId].resetFields()
},
handleForm () {
let newForm = []
this.$refs[this.formId].validate((valid) => {
if (valid) {
var hash = {}
var i = 0
var res = []
let ID = this.tempFormList[0].ID
this.tempFormList.forEach(function (item) {
var name = item.tableName
hash[name] ? res[hash[name] - 1].list.push(item) : hash[name] = ++i && res.push({
list: [item],
ID: item.ID,
tableName: name
})
})
// console.log('resssssss', res)
const itemTypes = ['cascader', 'daterange', 'timerange']
res.forEach(item => {
let _form = {}
item.list.filter(n => n.isChange).forEach(r => {
_form[r.columnName] = r.multiSelect || itemTypes.includes(r.itemType) ? this.form[r.columnName].toString() : this.form[r.columnName]
if (r.ID) {
_form.ID = r.ID
}
// return _form
})
if (this.fixed) {
for (let n in this.fixedList) {
_form[n] = this.fixedList[n]
}
if (Object.keys(_form).length > 0) {
if (!_form.AGENCY_ID) _form.AGENCY_ID = this.$store.state.user.agencyId
}
if (!_form.ID) _form.ID = ID
}
console.log('objeckeyssss', Object.keys(_form), _form)
newForm.push({
tableName: item.tableName,
supportAdd: this.supportAdd,
ID: item.ID,
list: Object.keys(_form).length > 0 ? [{ ..._form }] : []
})
})
console.log('newFormhhhhh', newForm)
return newForm
} else {
console.log('error submit!!')
return false
}
})
if (this.supportAdd) newForm = this.handlerMuscForm()
return newForm
},
async getOptionsLists (url) {
let options = []
// console.log('getOptionsList----', url)
await this.$http
.post(url, { formCode: 'resi_base_info' })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
options = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
return options
},
getGridList () {
const { user } = this.$store.state
this.$http
.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsG = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
getValiheList () {
const { user } = this.$store.state
this.$http
.post('/gov/org/icneighborhood/neighborhoodoption', { gridId: this.form.GRID_ID, agencyId: user.agencyId })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsV = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
getBuildList () {
this.$http
.post('/gov/org/icbuilding/buildingoption', { neighborHoodId: this.form.VILLAGE_ID })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsB = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
getUniList () {
this.$http
.post('/gov/org/icbuildingunit/unitoption', { buildingId: this.form.BUILD_ID })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsD = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
getHouseList () {
this.$http
.post('/gov/org/ichouse/houseoption', { unitId: this.form.UNIT_ID })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsH = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
}
}
}
</script>
<style lang="scss" scoped>
.resi-form {
:deep .el-date-editor.el-input, .el-date-editor.el-input__inner {
width: 100% !important;
}
}
.resi-cell-value .resi-cell-input {
max-width: 180px;
}
</style>
<style lang="scss" scoped>
.resi-form .resi-row {
margin-bottom: 0;
}
// .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-value .resi-cell-textarea {
width: 300px;
}
.resi-cell-select {
width: 180px;
box-sizing: border-box;
margin-right: 10px;
&-middle {
width: 130px;
}
&-small {
width: 88px;
}
}
.resi-cell-select:last-child {
margin-right: 0;
}
// }
</style>

324
src/views/modules/visual/basicinfo/people.vue

@ -7,16 +7,22 @@
<img src="@/assets/img/shuju/title-tip.png" />
<span>人员情况</span>
</div>
<div class="more" @click="showedMoreInfo=true">查看更多</div>
<div class="more" @click="showedMoreInfo = true">查看更多</div>
<div class="ren">
<img class="pic-ren" src="@/assets/img/shuju/people/ren.png" />
<div class="ren-name">
<span>{{ info.name }}</span>
<img src="@/assets/img/shuju/people/arrow.png" />
</div>
<div class="ren-prop z-1">
<img src="@/assets/img/shuju/people/ren-prop-1.png" />
<span>所属网格</span>
<div class="ren-cnt">
<h5>所属网格</h5>
<p>惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺</p>
<p>
{{ info.gridName }}
</p>
</div>
</div>
@ -26,7 +32,9 @@
<div class="ren-cnt">
<h5>人员类别</h5>
<p>惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺</p>
<p>
{{ info.personCategory.join("、") }}
</p>
</div>
</div>
@ -36,7 +44,9 @@
<div class="ren-cnt">
<h5>工作单位</h5>
<p>惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺</p>
<p>
{{ info.workUnit }}
</p>
</div>
</div>
@ -46,7 +56,9 @@
<div class="ren-cnt">
<h5>志愿者类别</h5>
<p>惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺</p>
<p>
{{ info.volunteerCategory.join("、") }}
</p>
</div>
</div>
@ -56,7 +68,9 @@
<div class="ren-cnt">
<h5>房屋信息</h5>
<p>惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺</p>
<p>
{{ info.houseInfo.join("、") }}
</p>
</div>
</div>
@ -66,7 +80,7 @@
<div class="ren-cnt">
<h5>经济状况</h5>
<p>惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺惺惺惜惺惺</p>
<p>月薪{{ info.financialSituation.monthlyIncome }}</p>
</div>
</div>
</div>
@ -81,10 +95,20 @@
<span>更多信息</span>
</div>
<div class="btn-close" @click="showedMoreInfo=false">
<div class="btn-close" @click="showedMoreInfo = false">
<img src="@/assets/img/shuju/people/close.png" />
</div>
<edit-resi
v-if="dialogEditVisible"
ref="baseForm"
:disabled="disabled"
:form-info="editForm"
:fixed="true"
:form-list="formList"
@changegroup="handleChangeGroup"
/>
<div class="list">
<div class="item">所属网格商区社区第一网格</div>
<div class="item">所属网格商区社区第一网格</div>
@ -135,60 +159,112 @@
<div class="info">
<div class="huzhu">
<img class="huzhu-bg" src="@/assets/img/shuju/people/huzhu.png" />
<img class="huzhu-ico" src="@/assets/img/shuju/people/huzhu-home.png" />
<div class="huzhu-name">爱新觉罗玄烨</div>
<img
class="huzhu-ico"
src="@/assets/img/shuju/people/huzhu-home.png"
/>
<div class="huzhu-name">{{ houseInfo.ownerName }}</div>
<p>户主</p>
</div>
<div class="rel z-zuo-2">
<img class="rel-bg" src="@/assets/img/shuju/people/huzhu-kuang-zuo.png" />
<img class="rel-line" src="@/assets/img/shuju/people/huzhu-line/zuo2.png" />
<div class="rel z-zuo-2" v-if="houseInfo.list[0]">
<img
class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png"
/>
<img
class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo2.png"
/>
<div class="rel-text">
<span class="rel-call">妻子</span>
<span class="rel-name">西门吹雪</span>
<span class="rel-call">{{ houseInfo.list[0].relation }}</span>
<span class="rel-name"
>{{ houseInfo.list[0].userName }}</span
>
</div>
</div>
<div class="rel z-you-2">
<img class="rel-bg" src="@/assets/img/shuju/people/huzhu-kuang-you.png" />
<img class="rel-line" src="@/assets/img/shuju/people/huzhu-line/you2.png" />
<div class="rel z-you-2" v-if="houseInfo.list[1]">
<img
class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png"
/>
<img
class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you2.png"
/>
<div class="rel-text">
<span class="rel-call">妻子</span>
<span class="rel-name">西门吹雪</span>
<span class="rel-call">{{ houseInfo.list[1].relation }}</span>
<span class="rel-name"
>{{ houseInfo.list[1].userName }}</span
>
</div>
</div>
<div class="rel z-zuo-1">
<img class="rel-bg" src="@/assets/img/shuju/people/huzhu-kuang-zuo.png" />
<img class="rel-line" src="@/assets/img/shuju/people/huzhu-line/zuo1.png" />
<div class="rel z-zuo-1" v-if="houseInfo.list[2]">
<img
class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png"
/>
<img
class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo1.png"
/>
<div class="rel-text">
<span class="rel-call">妻子</span>
<span class="rel-name">西门吹雪</span>
<span class="rel-call">{{ houseInfo.list[2].relation }}</span>
<span class="rel-name"
>{{ houseInfo.list[2].userName }}</span
>
</div>
</div>
<div class="rel z-you-1">
<img class="rel-bg" src="@/assets/img/shuju/people/huzhu-kuang-you.png" />
<img class="rel-line" src="@/assets/img/shuju/people/huzhu-line/you1.png" />
<div class="rel z-you-1" v-if="houseInfo.list[3]">
<img
class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png"
/>
<img
class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you1.png"
/>
<div class="rel-text">
<span class="rel-call">妻子</span>
<span class="rel-name">西门吹雪</span>
<span class="rel-call">{{ houseInfo.list[3].relation }}</span>
<span class="rel-name"
>{{ houseInfo.list[3].userName }}</span
>
</div>
</div>
<div class="rel z-zuo-3">
<img class="rel-bg" src="@/assets/img/shuju/people/huzhu-kuang-zuo.png" />
<img class="rel-line" src="@/assets/img/shuju/people/huzhu-line/zuo3.png" />
<div class="rel z-zuo-3" v-if="houseInfo.list[4]">
<img
class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png"
/>
<img
class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo3.png"
/>
<div class="rel-text">
<span class="rel-call">妻子</span>
<span class="rel-name">西门吹雪</span>
<span class="rel-call">{{ houseInfo.list[4].relation }}</span>
<span class="rel-name"
>{{ houseInfo.list[4].userName }}</span
>
</div>
</div>
<div class="rel z-you-3">
<img class="rel-bg" src="@/assets/img/shuju/people/huzhu-kuang-you.png" />
<img class="rel-line" src="@/assets/img/shuju/people/huzhu-line/you3.png" />
<div class="rel z-you-3" v-if="houseInfo.list[5]">
<img
class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png"
/>
<img
class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you3.png"
/>
<div class="rel-text">
<span class="rel-call">妻子</span>
<span class="rel-name">西门吹雪</span>
<span class="rel-call">{{ houseInfo.list[5].relation }}</span>
<span class="rel-name"
>{{ houseInfo.list[5].userName }}</span
>
</div>
</div>
</div>
@ -200,145 +276,103 @@
</template>
<script>
import { Loading } from 'element-ui'; //Loading
import { Loading } from "element-ui"; //Loading
import { requestPost } from "@/js/dai/request";
import cptCard from "@/views/modules/visual/cpts/card";
export default {
name: 'HomeMap',
data () {
name: "HomeMap",
data() {
return {
showedMoreInfo: false
}
showedMoreInfo: false,
info: {
financialSituation: { monthlyIncome: "", retirementAmount: "" },
gridName: "",
houseInfo: [],
name: "",
personCategory: [],
volunteerCategory: [],
workUnit: "",
},
houseInfo: {
ownerName: "",
list: [
{
userId: "",
userName: "",
isSelf: "",
relation: "",
},
],
},
};
},
props: {
vueFlag: {
props: {
userId: {
type: String,
default: "alarm"
}
default: "",
},
},
computed: {
mapHeight () {
computed: {},
return this.clientHeight - 120;
components: {
cptCard,
},
watch: {
userId() {
this.getApiData();
},
// zoom: {
// get () {
// //zoom
// if (this.clientHeight < 900) {
// return 2.3
// } else {
// return 2.8
// }
// },
// set (value) {
// }
// },
},
components: {
cptCard
},
async mounted () {
async mounted() {
this.getApiData();
},
methods: {
handleSearch () {
handleSearch() {},
getApiData() {
this.getInfo();
this.getHouseInfo();
},
//
async loadOrgData () {
const url = "/gov/org/agency/maporg"
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/agency/maporg"
async getInfo() {
const url = "/epmetuser/icresiuser/persondata";
let params = {
orgId: this.orgId,
level: this.orgLevel
}
userId: this.userId,
};
const { data, code, msg } = await requestPost(url, params)
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.orgData = data
this.runAgency.push(data)
if (data.children && data.children.length > 0) {
this.subAgencyArray = data.children
}
this.info = { ...this.info, ...data };
} else {
this.$message.error(msg)
this.$message.error(msg);
}
},
//
loadPolygon (subAgencyArray) {
polygonSource.clear()//
let featureData = []//
if (subAgencyArray && subAgencyArray.length > 0) {//
let oneData = {}
subAgencyArray.forEach(agencyItem => {
if (agencyItem.coordinates && agencyItem.coordinates !== '') {//
oneData = {
type: 'Feature',
id: agencyItem.id,
properties: {
id: agencyItem.id,
level: agencyItem.level,
name: agencyItem.name
},
geometry: {
type: 'Polygon',
coordinates: [],
},
}
let coorArray = agencyItem.coordinates.split(',')//
let itemArray = []//[lon,lat]
let polygonArray = []//[[lon,lat],[lon,lat],[lon,lat]]
coorArray.forEach((item, index) => {
itemArray.push(item)
if (index % 2 == 0) {//
} else {//
polygonArray.push(itemArray)
itemArray = []
}
});
oneData.geometry.coordinates.push(polygonArray)
featureData.push(oneData)
}
});
}
//
async getHouseInfo() {
const url = "/epmetuser/icresiuser/ownerrelation";
let params = {
userId: this.userId,
};
if (featureData && featureData.length > 0) {
var geojsonObject = {
'type': 'FeatureCollection',
'features': featureData
};
let feature = (new GeoJSON()).readFeatures(geojsonObject)
polygonSource.addFeatures(feature)
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.houseInfo = { ...this.houseInfo, ...data };
} else {
this.$message.error(msg);
}
},
}
},
};
</script>
<style lang="scss" src="@/assets/scss/people.scss" scoped></style>
Loading…
Cancel
Save