Browse Source

修复了合并dev分支冲突

shibei_master
dai 4 years ago
parent
commit
81d4175b47
  1. BIN
      src/assets/img/shuju/people/close.png
  2. BIN
      src/assets/img/shuju/people/huzhu-home.png
  3. BIN
      src/assets/img/shuju/people/huzhu-kuang-you.png
  4. BIN
      src/assets/img/shuju/people/huzhu-kuang-zuo.png
  5. BIN
      src/assets/img/shuju/people/huzhu-line/you1.png
  6. BIN
      src/assets/img/shuju/people/huzhu-line/you2.png
  7. BIN
      src/assets/img/shuju/people/huzhu-line/you3.png
  8. BIN
      src/assets/img/shuju/people/huzhu-line/zuo1.png
  9. BIN
      src/assets/img/shuju/people/huzhu-line/zuo2.png
  10. BIN
      src/assets/img/shuju/people/huzhu-line/zuo3.png
  11. BIN
      src/assets/img/shuju/people/huzhu.png
  12. 61
      src/assets/scss/buttonstyle.scss
  13. 104
      src/assets/scss/common.scss
  14. 241
      src/assets/scss/people.scss
  15. 22
      src/assets/scss/shuju-card.scss
  16. 1
      src/utils/request.js
  17. 57
      src/views/components/editResi.vue
  18. 44
      src/views/components/resiForm.vue
  19. 313
      src/views/components/resiSearch.vue
  20. 88
      src/views/modules/base/community/buildForm.vue
  21. 62
      src/views/modules/base/community/buildTable.vue
  22. 150
      src/views/modules/base/community/community.vue
  23. 55
      src/views/modules/base/community/communityForm.vue
  24. 58
      src/views/modules/base/community/communityTable.vue
  25. 81
      src/views/modules/base/community/roomForm.vue
  26. 50
      src/views/modules/base/community/roomTable.vue
  27. 535
      src/views/modules/base/resi.vue
  28. 145
      src/views/modules/visual/basicinfo/people.vue
  29. 20
      src/views/modules/visual/cpts/card.vue
  30. 60
      src/views/modules/workSys/mapConfig.vue

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 924 B

BIN
src/assets/img/shuju/people/huzhu-home.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
src/assets/img/shuju/people/huzhu-kuang-you.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
src/assets/img/shuju/people/huzhu-kuang-zuo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
src/assets/img/shuju/people/huzhu-line/you1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
src/assets/img/shuju/people/huzhu-line/you2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
src/assets/img/shuju/people/huzhu-line/you3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
src/assets/img/shuju/people/huzhu-line/zuo1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
src/assets/img/shuju/people/huzhu-line/zuo2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
src/assets/img/shuju/people/huzhu-line/zuo3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

61
src/assets/scss/buttonstyle.scss

@ -0,0 +1,61 @@
.el-button--green {
color: #fff;
background-color: #22c1c3;
border-color: #22c1c3;
}
.el-button--green:hover {
color: #fff;
background-color: #05b1b4;
border-color: #05b1b4;
}
.el-button--green:focus {
color: #fff;
background-color: #22c1c3;
border-color: #22c1c3;
}
.el-button--yellow:hover {
color: #fff;
background-color: #fa9200;
border-color: #fa9200;
}
.el-button--yellow:focus {
color: #fff;
background-color: #feb349;
border-color: #feb349;
}
.el-button--yellow {
color: #fff;
background-color: #feb349;
border-color: #feb349;
}
.el-button--blue:focus {
color: #fff;
background-color: #2195fe;
border-color: #2195fe;
}
.el-button--blue:hover {
color: #fff;
background-color: #0083fd;
border-color: #0083fd;
}
.el-button--blue {
color: #fff;
background-color: #2195fe;
border-color: #2195fe;
}
.el-button--red:focus {
color: #fff;
background-color: #fe6252;
border-color: #fe6252;
}
.el-button--red:hover {
color: #fff;
background-color: #fd341e;
border-color: #fd341e;
}
.el-button--red {
color: #fff;
background-color: #fe6252;
border-color: #fe6252;
}

104
src/assets/scss/common.scss

@ -4,8 +4,8 @@
box-sizing: border-box;
}
body {
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial,
sans-serif;
font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
font-size: $--font-size-base;
line-height: $base--line-height;
color: $--color-text-primary;
@ -35,7 +35,7 @@ img {
}
.clearfix:before,
.clearfix:after {
content: " ";
content: ' ';
display: table;
}
.clearfix:after {
@ -144,8 +144,8 @@ img {
background-color: transparent;
}
&-add {
> span > *[class*="el-icon-"],
> span > *[class*="icon"] {
> span > *[class*='el-icon-'],
> span > *[class*='icon'] {
vertical-align: middle;
font-size: 18px;
margin-right: 5px;
@ -383,7 +383,7 @@ img {
&::after {
position: absolute;
content: "";
content: '';
right: 0;
top: 0;
bottom: 0;
@ -448,8 +448,8 @@ img {
}
}
&__search {
> *[class*="el-icon-"],
> *[class*="icon"] {
> *[class*='el-icon-'],
> *[class*='icon'] {
display: inline-block;
vertical-align: middle;
}
@ -572,7 +572,9 @@ img {
min-height: calc(#{$content--fill-height} - 2px);
}
> .aui-card--fill > .el-card__header + .el-card__body {
min-height: calc(#{$content--fill-height} - #{$content--card-header-height} - 2px);
min-height: calc(
#{$content--fill-height} - #{$content--card-header-height} - 2px
);
}
&--tabs {
padding: $content--tabs-header-height 0 0;
@ -644,7 +646,7 @@ img {
position: absolute;
bottom: 0;
left: 0;
content: "";
content: '';
width: 100%;
height: 2px;
background-color: $--color-primary;
@ -677,10 +679,15 @@ img {
min-height: calc(#{$content--fill-height-tabs} - 2px);
}
> .aui-card--fill > .el-card__header + .el-card__body {
min-height: calc(#{$content--fill-height-tabs} - #{$content--card-header-height} - 2px);
min-height: calc(
#{$content--fill-height-tabs} - #{$content--card-header-height} -
2px
);
}
&.is-iframe {
height: calc(#{$content--fill-height-tabs} + #{$content--padding * 2});
height: calc(
#{$content--fill-height-tabs} + #{$content--padding * 2}
);
margin: -$content--padding;
min-height: auto;
> .aui-card--fill {
@ -699,7 +706,10 @@ img {
background-color: #fff;
}
> .aui-card--fill > .el-card__header + .el-card__body {
height: calc(#{$content--fill-height-tabs} - #{$content--card-header-height} - 2px);
height: calc(
#{$content--fill-height-tabs} - #{$content--card-header-height} -
2px
);
}
}
}
@ -729,7 +739,7 @@ img {
/* Page
------------------------------ */
*[class*="aui-page__"] {
*[class*='aui-page__'] {
padding-top: 0;
.aui-content {
min-height: auto;
@ -741,7 +751,71 @@ img {
min-height: calc(100vh - #{$content--padding * 2} - 2px);
}
> .aui-card--fill > .el-card__header + .el-card__body {
min-height: calc(100vh - #{$content--padding * 2} - #{$content--card-header-height} - 2px);
min-height: calc(
100vh - #{$content--padding * 2} - #{$content--card-header-height} - 2px
);
}
}
}
.el-button--green {
color: #fff;
background-color: #22c1c3;
border-color: #22c1c3;
}
.el-button--green:hover {
color: #fff;
background-color: #05b1b4;
border-color: #05b1b4;
}
.el-button--green:focus {
color: #fff;
background-color: #22c1c3;
border-color: #22c1c3;
}
.el-button--yellow:hover {
color: #fff;
background-color: #fa9200;
border-color: #fa9200;
}
.el-button--yellow:focus {
color: #fff;
background-color: #feb349;
border-color: #feb349;
}
.el-button--yellow {
color: #fff;
background-color: #feb349;
border-color: #feb349;
}
.el-button--blue:focus {
color: #fff;
background-color: #2195fe;
border-color: #2195fe;
}
.el-button--blue:hover {
color: #fff;
background-color: #0083fd;
border-color: #0083fd;
}
.el-button--blue {
color: #fff;
background-color: #2195fe;
border-color: #2195fe;
}
.el-button--red:focus {
color: #fff;
background-color: #fe6252;
border-color: #fe6252;
}
.el-button--red:hover {
color: #fff;
background-color: #fd341e;
border-color: #fd341e;
}
.el-button--red {
color: #fff;
background-color: #fe6252;
border-color: #fe6252;
}

241
src/assets/scss/people.scss

@ -1,6 +1,19 @@
@import "c/config";
@import "c/function";
.g-cpt {
display: flex;
flex-wrap: wrap;
justify-content: center;
// justify-content: space-around;
// .g-l {
// margin-right: auto;
// }
// .g-r {
// margin-left: auto;
// }
}
.m-people {
position: relative;
width: 850px;
@ -37,6 +50,7 @@
font-weight: 500;
color: #ffffff;
text-align: center;
cursor: pointer;
}
.ren {
@ -130,3 +144,230 @@
}
}
}
.m-pop {
@include shield;
background-color: rgba(#000, 0.9);
overflow-y: scroll;
.wrap {
position: relative;
margin: 120px auto;
width: 1000px;
.title {
padding: 10px;
font-size: 22px;
font-family: PingFang SC;
font-weight: 800;
color: #ffffff;
display: flex;
align-items: center;
img {
display: block;
margin-right: 5px;
}
span {
display: block;
}
}
.btn-close {
position: absolute;
top: -15px;
right: -15px;
cursor: pointer;
}
.list {
display: flex;
flex-wrap: wrap;
padding: 10px 30px;
.item {
position: relative;
box-sizing: border-box;
padding-left: 15px;
width: 33%;
color: #fff;
font-size: 18px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
line-height: 24px;
margin: 20px 0;
&::before {
position: absolute;
left: 0;
top: 0;
bottom: 0;
margin: auto 0;
content: "";
display: block;
width: 7px;
height: 7px;
background: #0c81fe;
border-radius: 3px;
}
}
}
.line {
margin: 20px auto;
width: 900px;
height: 1px;
border: 1px dashed #1257c9;
}
}
}
.m-relation {
position: relative;
margin-top: 20px;
width: 850px;
.title {
padding: 10px;
font-size: 22px;
font-family: PingFang SC;
font-weight: 800;
color: #ffffff;
display: flex;
align-items: center;
img {
display: block;
margin-right: 5px;
}
span {
display: block;
}
}
.info {
position: relative;
width: 410px;
height: 312px;
margin: 0 auto;
.huzhu {
position: relative;
.huzhu-bg {
display: block;
}
.huzhu-ico {
position: absolute;
display: block;
top: 90px;
left: 0;
right: 0;
margin: 0 auto;
}
.huzhu-name {
position: absolute;
display: block;
top: 170px;
width: 100%;
font-size: 24px;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 30px;
text-align: center;
}
> p {
position: absolute;
top: 200px;
font-size: 16px;
width: 100%;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
text-align: center;
}
}
.rel {
position: absolute;
width: 128px;
height: 38px;
.rel-line {
position: absolute;
z-index: 1;
}
.rel-text {
@include toe;
position: absolute;
z-index: 2;
top: 0;
left: 0;
width: 100%;
line-height: 38px;
text-align: center;
color: #fff;
font-size: 18px;
font-family: PingFang SC;
font-weight: 500;
.rel-name {
font-size: 14px;
}
}
&.z-zuo-2 {
top: 138px;
left: -33px - 128px;
.rel-line {
left: 127px;
top: -28px;
}
}
&.z-you-2 {
top: 138px;
right: -33px - 128px;
.rel-line {
right: 127px;
top: -28px;
}
}
&.z-zuo-1 {
top: 43px;
left: -33px - 128px;
.rel-line {
left: 131px;
}
}
&.z-you-1 {
top: 43px;
right: -33px - 128px;
.rel-line {
right: 131px;
}
}
&.z-zuo-3 {
bottom: 41px;
left: -33px - 128px;
.rel-line {
left: 131px;
bottom: -2px;
}
}
&.z-you-3 {
bottom: 41px;
right: -33px - 128px;
.rel-line {
right: 131px;
bottom: -2px;
}
}
}
}
}

22
src/assets/scss/shuju-card.scss

@ -9,54 +9,54 @@
height: 100%;
padding: 22px;
.corner {
.card-corner {
position: absolute;
display: block;
&.corner-1 {
&.card-corner-1 {
top: 0;
left: 0;
}
&.corner-2 {
&.card-corner-2 {
top: 0;
right: 0;
}
&.corner-3 {
&.card-corner-3 {
bottom: 0;
right: 0;
}
&.corner-4 {
&.card-corner-4 {
bottom: 0;
left: 0;
}
}
.line {
.card-line {
position: absolute;
display: block;
background-repeat: repeat;
&.line-t {
&.card-line-t {
background-image: url(../img/shuju/card/line-t.png);
left: 22px;
right: 240px;
top: 0;
height: 22px;
}
&.line-r {
&.card-line-r {
background-image: url(../img/shuju/card/line-r.png);
top: 22px;
bottom: 22px;
right: 0;
width: 22px;
}
&.line-b {
&.card-line-b {
background-image: url(../img/shuju/card/line-b.png);
left: 22px;
right: 240px;
bottom: 0;
height: 22px;
}
&.line-l {
&.card-line-l {
background-image: url(../img/shuju/card/line-l.png);
top: 22px;
bottom: 22px;
@ -65,7 +65,7 @@
}
}
.cnt {
.card-cnt {
min-height: 200px;
background-image: url(../img/shuju/card/bg.png);
background-repeat: repeat;

1
src/utils/request.js

@ -60,6 +60,7 @@ http.interceptors.response.use(response => {
}else {
router.replace({ name: 'login' })
}
return Promise.reject(response.data.msg)
}
return response

57
src/views/components/editResi.vue

@ -18,7 +18,7 @@
<!-- <div class="resi-cell"> -->
<!-- <div class="resi-cell-label">{{n.label}}</div> -->
<div class="resi-cell-value">
<el-select v-model="form.GRID_ID" :disabled="disabled" placeholder="请选择网格" size="small"
<el-select v-model.trim="form.GRID_ID" :disabled="disabled" placeholder="请选择网格" size="small"
clearable class="resi-cell-select"
>
<el-option
@ -35,7 +35,7 @@
<el-col :span="18">
<el-form-item :prop="form.VILLAGE_ID" label="所属小区">
<div class="resi-cell-value">
<el-select v-model="form.VILLAGE_ID" :disabled="disabled" placeholder="请选择小区" size="small"
<el-select v-model.trim="form.VILLAGE_ID" :disabled="disabled" placeholder="请选择小区" size="small"
clearable class="resi-cell-select"
>
<el-option
@ -45,7 +45,7 @@
:value="item.value">
</el-option>
</el-select>
<el-select v-model="form.BUILD_ID" :disabled="disabled" placeholder="请选择楼号" size="small"
<el-select v-model.trim="form.BUILD_ID" :disabled="disabled" placeholder="请选择楼号" size="small"
clearable class="resi-cell-select" @change="handleChangeB"
>
<el-option
@ -55,7 +55,7 @@
:value="item.value">
</el-option>
</el-select>
<el-select v-model="form.UNIT_ID" :disabled="disabled" placeholder="请选择单元" size="small"
<el-select v-model.trim="form.UNIT_ID" :disabled="disabled" placeholder="请选择单元" size="small"
clearable class="resi-cell-select" @change="handleChangeD"
>
<el-option
@ -65,7 +65,7 @@
:value="item.value">
</el-option>
</el-select>
<el-select v-model="form.HOME_ID" :disabled="disabled" placeholder="请选择房号" size="small"
<el-select v-model.trim="form.HOME_ID" :disabled="disabled" placeholder="请选择房号" size="small"
clearable class="resi-cell-select"
>
<el-option
@ -81,7 +81,7 @@
<!-- <el-col :span="6">
<el-form-item :prop="form.BUILD_ID" label="所属楼宇">
<div class="resi-cell-value">
<el-select v-model="form.BUILD_ID" :disabled="disabled" placeholder="请选择楼号" size="small"
<el-select v-model.trim="form.BUILD_ID" :disabled="disabled" placeholder="请选择楼号" size="small"
clearable class="resi-cell-select"
>
<el-option
@ -97,7 +97,7 @@
<el-col :span="6">
<el-form-item :prop="form.HOME_ID" label="所属家庭">
<div class="resi-cell-value">
<el-select v-model="form.HOME_ID" :disabled="disabled" placeholder="请选择" size="small"
<el-select v-model.trim="form.HOME_ID" :disabled="disabled" placeholder="请选择" size="small"
clearable class="resi-cell-select"
>
<el-option
@ -122,7 +122,7 @@
<template v-if="n.itemType === 'input' || n.itemType === 'textarea'">
<el-input
v-if="n.validType"
v-model="form[n.columnName]"
v-model.trim="form[n.columnName]"
:disabled="disabled"
class="resi-cell-input"
size="small"
@ -132,7 +132,7 @@
</el-input>
<el-input
v-else
v-model="form[n.columnName]"
v-model.trim="form[n.columnName]"
:disabled="disabled"
class="resi-cell-input"
size="small"
@ -143,7 +143,7 @@
</template>
<!-- <template v-if="n.itemType === 'textarea'">
<el-input
v-model="form[n.columnName]"
v-model.trim="form[n.columnName]"
class="resi-cell-textarea"
size="small"
type="textarea"
@ -154,7 +154,7 @@
</template> -->
<el-date-picker
v-else-if="n.itemType === 'datepicker'"
v-model="form[n.columnName]"
v-model.trim="form[n.columnName]"
:disabled="disabled"
class="resi-cell-input"
type="date"
@ -166,7 +166,7 @@
</el-date-picker>
<el-date-picker
v-else-if="n.itemType === 'daterange'"
v-model="form[n.columnName]"
v-model.trim="form[n.columnName]"
:disabled="disabled"
type="daterange"
align="right"
@ -175,17 +175,18 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions">
:picker-options="pickerOptions"
>
</el-date-picker>
<el-time-picker
v-else-if="n.itemType === 'timepicker'"
v-model="form[n.columnName]"
v-model.trim="form[n.columnName]"
:disabled="disabled"
placeholder="任意时间点">
</el-time-picker>
<el-time-picker
v-else-if="n.itemType === 'timerange'"
v-model="form[n.columnName]"
v-model.trim="form[n.columnName]"
:disabled="disabled"
is-range
range-separator="至"
@ -193,7 +194,7 @@
end-placeholder="结束时间"
placeholder="选择时间范围">
</el-time-picker>
<el-select v-else-if="n.itemType === 'select'" v-model="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">
@ -210,7 +211,7 @@
clearable></el-cascader> -->
<el-cascader
v-else-if="n.itemType === 'cascader'"
v-model="form[n.columnName]"
v-model.trim="form[n.columnName]"
:options="n.options"
:props="{ checkStrictly: true }"
:disabled="disabled"
@ -219,14 +220,14 @@
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="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>
<!-- <el-radio v-model="form[n.columnName]" label="1">备选项</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="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 label="n.la"></el-checkbox> -->
</el-checkbox-group>
@ -485,11 +486,25 @@ export default {
this.formList.forEach(async item => {
if (item.optionSourceType === 'remote') {
await this.getOptionsLists(item.optionSourceValue).then(res => {
item.options = 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
},

44
src/views/components/resiForm.vue

@ -17,7 +17,7 @@
<!-- <div class="resi-cell"> -->
<!-- <div class="resi-cell-label">{{n.label}}</div> -->
<div class="resi-cell-value">
<el-select v-model="form.GRID_ID" placeholder="请选择网格" size="small"
<el-select v-model.trim="form.GRID_ID" placeholder="请选择网格" size="small"
clearable class="resi-cell-select" @change="handleChangeGrid"
>
<el-option
@ -36,7 +36,7 @@
<div class="resi-cell-value">
<el-col :span="4">
<el-form-item prop="VILLAGE_ID">
<el-select v-model="form.VILLAGE_ID" placeholder="请选择小区" size="small"
<el-select v-model.trim="form.VILLAGE_ID" placeholder="请选择小区" size="small"
clearable class="resi-cell-select" @change="handleChangeV"
>
<el-option
@ -50,7 +50,7 @@
</el-col>
<el-col :span="4">
<el-form-item prop="BUILD_ID">
<el-select v-model="form.BUILD_ID" placeholder="请选择楼号" size="small"
<el-select v-model.trim="form.BUILD_ID" placeholder="请选择楼号" size="small"
clearable class="resi-cell-select" @change="handleChangeB"
>
<el-option
@ -64,7 +64,7 @@
</el-col>
<el-col :span="4">
<el-form-item prop="UNIT_ID">
<el-select v-model="form.UNIT_ID" placeholder="请选择单元" size="small"
<el-select v-model.trim="form.UNIT_ID" placeholder="请选择单元" size="small"
clearable class="resi-cell-select" @change="handleChangeD"
>
<el-option
@ -78,7 +78,7 @@
</el-col>
<el-col :span="4">
<el-form-item prop="HOME_ID">
<el-select v-model="form.HOME_ID" placeholder="请选择房号" size="small"
<el-select v-model.trim="form.HOME_ID" placeholder="请选择房号" size="small"
clearable class="resi-cell-select"
>
<el-option
@ -96,7 +96,7 @@
<!-- <el-col :span="6">
<el-form-item :prop="form.BUILD_ID" label="所属楼宇">
<div class="resi-cell-value">
<el-select v-model="form.BUILD_ID" placeholder="请选择楼号" size="small"
<el-select v-model.trim="form.BUILD_ID" placeholder="请选择楼号" size="small"
clearable class="resi-cell-select" @change="handleChangeB"
>
<el-option
@ -112,7 +112,7 @@
<el-col :span="6">
<el-form-item :prop="form.HOME_ID" label="所属家庭">
<div class="resi-cell-value">
<el-select v-model="form.HOME_ID" placeholder="请选择" size="small"
<el-select v-model.trim="form.HOME_ID" placeholder="请选择" size="small"
clearable class="resi-cell-select resi-cell-select-small"
>
<el-option
@ -122,7 +122,7 @@
:value="item.value">
</el-option>
</el-select>
<el-select v-model="form.HOME_ID" placeholder="请选择" size="small"
<el-select v-model.trim="form.HOME_ID" placeholder="请选择" size="small"
clearable class="resi-cell-select-small"
>
<el-option
@ -147,7 +147,7 @@
<template v-if="n.itemType === 'input' || n.itemType === 'textarea'">
<el-input
v-if="n.validType"
v-model="form[n.columnName]"
v-model.trim="form[n.columnName]"
class="resi-cell-input"
size="small"
clearable
@ -156,7 +156,7 @@
</el-input>
<el-input
v-else
v-model="form[n.columnName]"
v-model.trim="form[n.columnName]"
class="resi-cell-input"
size="small"
clearable
@ -166,7 +166,7 @@
</template>
<!-- <template v-if="n.itemType === 'textarea'">
<el-input
v-model="form[n.columnName]"
v-model.trim="form[n.columnName]"
class="resi-cell-textarea"
size="small"
type="textarea"
@ -177,7 +177,7 @@
</template> -->
<el-date-picker
v-else-if="n.itemType === 'datepicker'"
v-model="form[n.columnName]"
v-model.trim="form[n.columnName]"
class="resi-cell-input"
type="date"
size="small"
@ -188,23 +188,25 @@
</el-date-picker>
<el-date-picker
v-else-if="n.itemType === 'daterange'"
v-model="form[n.columnName]"
v-model.trim="form[n.columnName]"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions">
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
>
</el-date-picker>
<el-time-picker
v-else-if="n.itemType === 'timepicker'"
v-model="form[n.columnName]"
v-model.trim="form[n.columnName]"
placeholder="任意时间点">
</el-time-picker>
<el-time-picker
v-else-if="n.itemType === 'timerange'"
v-model="form[n.columnName]"
v-model.trim="form[n.columnName]"
is-range
class="resi-cell-range"
range-separator="至"
@ -212,7 +214,7 @@
end-placeholder="结束时间"
placeholder="选择时间范围">
</el-time-picker>
<el-select v-else-if="n.itemType === 'select'" v-model="form[n.columnName]"
<el-select v-else-if="n.itemType === 'select'" v-model.trim="form[n.columnName]"
:multiple="n.multiSelect"
placeholder="请选择" size="small" clearable class="resi-cell-select">
<el-option
@ -228,7 +230,7 @@
clearable></el-cascader> -->
<el-cascader
v-else-if="n.itemType === 'cascader'"
v-model="form[n.columnName]"
v-model.trim="form[n.columnName]"
:options="n.options"
:props="{ checkStrictly: true }"
clearable
@ -236,14 +238,14 @@
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="form[n.columnName]"
<el-radio v-for="ns in n.options" :key="ns.value" v-model.trim="form[n.columnName]"
:label="ns.value">
{{ ns.label }}
</el-radio>
<!-- <el-radio v-model="form[n.columnName]" label="1">备选项</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="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">{{ns.label}}</el-checkbox>
<!-- <el-checkbox label="n.la"></el-checkbox> -->
</el-checkbox-group>

313
src/views/components/resiSearch.vue

@ -7,13 +7,20 @@
<div class="resi-cell">
<div class="resi-cell-label">所属网格</div>
<div class="resi-cell-value">
<el-select v-model="form.GRID_ID" placeholder="请选择" size="small" clearable class="resi-cell-select"
@change="handleChangeGrid">
<el-select
v-model.trim="form.GRID_ID"
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">
:value="item.value"
>
</el-option>
</el-select>
</div>
@ -23,116 +30,169 @@
<div class="resi-cell">
<div class="resi-cell-label">所属小区</div>
<div class="resi-cell-value">
<el-select v-model="form.VILLAGE_ID" placeholder="请选择小区" size="small"
clearable class="resi-cell-select"
@clear="handleClearVillage" @change="handleChangeV">
<el-select
v-model.trim="form.VILLAGE_ID"
placeholder="请选择小区"
size="small"
clearable
class="resi-cell-select"
@clear="handleClearVillage"
@change="handleChangeV"
>
<el-option
v-for="item in optionsV"
:key="item.value"
:label="item.label"
:value="item.value">
:value="item.value"
>
</el-option>
</el-select>
<el-select v-model="form.BUILD_ID" placeholder="楼号" size="small" clearable
class="resi-cell-select" :disabled="changeVDisabled" @clear="handleClearBuild" @change="handleChangeB">
<el-select
v-model.trim="form.BUILD_ID"
placeholder="楼号"
size="small"
clearable
class="resi-cell-select"
:disabled="changeVDisabled"
@clear="handleClearBuild"
@change="handleChangeB"
>
<el-option
v-for="item in optionsB"
:key="item.value"
:label="item.label"
:value="item.value">
:value="item.value"
>
</el-option>
</el-select>
<el-select v-model="form.UNIT_ID" :disabled="changeBDisabled" placeholder="单元" size="small" clearable class="resi-cell-select" @click="handleClearDan" @change="handleChangeD">
<!-- <el-select
v-model.trim="form.UNIT_ID"
:disabled="changeBDisabled"
placeholder="单元"
size="small"
clearable
class="resi-cell-select"
@click="handleClearDan"
@change="handleChangeD"
>
<el-option
v-for="item in optionsD"
:key="item.value"
:label="item.label"
:value="item.value">
:value="item.value"
>
</el-option>
</el-select>
<el-select v-model="form.HOME_ID" :disabled="changeDDisabled" placeholder="楼号" size="small" clearable class="resi-cell-select">
<el-select
v-model.trim="form.HOME_ID"
:disabled="changeDDisabled"
placeholder="楼号"
size="small"
clearable
class="resi-cell-select"
>
<el-option
v-for="item in optionsH"
:key="item.value"
:label="item.label"
:value="item.value">
:value="item.value"
>
</el-option>
</el-select>
</el-select> -->
</div>
</div>
</el-col>
</el-row>
<el-row v-for="(item, index) in sliceList(formList, 4)" :key="index" class="resi-row">
<el-row
v-for="(item, index) in sliceList(formList, 4)"
:key="index"
class="resi-row"
>
<el-col v-for="n in item" :key="n.id" :span="6">
<div class="resi-cell">
<div class="resi-cell-label">{{n.label}}</div>
<div class="resi-cell-value" :class="n.itemType === 'radio' && 'resi-cell-value-radio'">
<div class="resi-cell-label">{{ n.label }}</div>
<div
class="resi-cell-value"
:class="n.itemType === 'radio' && 'resi-cell-value-radio'"
>
<el-input
v-if="n.itemType === 'input' || n.itemType === 'textarea'"
v-model="form[n.columnName]"
v-model.trim="form[n.columnName]"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入内容"
>
>
</el-input>
<template v-else-if="n.itemType === 'datepicker'">
<el-date-picker
v-if="n.queryType === 'daterange'"
v-model="form[n.columnName]"
v-model.trim="form[n.columnName]"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
class="resi-cell-input"
class="resi-cell--daterange"
size="small"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
:picker-options="pickerOptions"
>
</el-date-picker>
<el-date-picker
v-else
v-model="form[n.columnName]"
v-model.trim="form[n.columnName]"
class="resi-cell-input"
type="date"
size="small"
clearable
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="选择日期">
placeholder="选择日期"
>
</el-date-picker>
</template>
<el-select v-else-if="n.itemType === 'select' || n.itemType === 'radio'" v-model="form[n.columnName]" placeholder="请选择" size="small" clearable class="resi-cell-select">
<el-select
v-else-if="n.itemType === 'select' || n.itemType === 'radio'"
v-model.trim="form[n.columnName]"
placeholder="请选择"
size="small"
clearable
class="resi-cell-select"
>
<el-option
v-for="item in n.options"
:key="item.value"
:label="item.label"
:value="item.value">
:value="item.value"
>
</el-option>
</el-select>
<el-cascader
v-else-if="n.itemType === 'cascader'"
v-model="form[n.columnName]"
v-model.trim="form[n.columnName]"
:options="n.options"
:props="{ checkStrictly: true }"
clearable
size="small"
class="resi-cell-select">
class="resi-cell-select"
>
</el-cascader>
</div>
</div>
</el-col>
</el-row>
</el-row>
<el-row 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="mini" @click="handleSearch">查询</el-button>
<el-col :span="24">
<el-button type="primary" size="mini" @click="handleSearch"
>查询</el-button
>
</el-col>
</el-row>
<div class="resi-down" @click="handleOpenSearch">
@ -152,7 +212,7 @@ export default {
default: () => []
}
},
data () {
data() {
let initForm = (arr) => {
let _form = {}
// console.log('formInfo', obj)
@ -160,13 +220,13 @@ export default {
// _form = { ...obj }
// return _form
// }
arr.forEach(item => {
arr.forEach((item) => {
_form[item.columnName] = ''
})
return _form
}
let form = initForm(this.formList)
let tempFormList = [ ...this.formList ]
let tempFormList = [...this.formList]
let constForm = {
...form,
GRID_ID: '',
@ -183,22 +243,6 @@ export default {
optionsH: [],
optionsD: [],
optionsG: [],
options: [{
value: '选项1',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}],
value: '',
fixedList: [],
fixedForm: {
@ -218,38 +262,41 @@ export default {
HOME_ID: ''
},
tempFormList,
checkList: ['选中且禁用', '复选框 A'],
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])
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 () {
sliceList() {
return function (data, count) {
if (data !== undefined) {
let index = 0
@ -265,19 +312,19 @@ export default {
}
}
},
changeVDisabled () {
changeVDisabled() {
return !this.form.VILLAGE_ID
},
changeBDisabled () {
changeBDisabled() {
return !this.form.BUILD_ID
},
changeDDisabled () {
changeDDisabled() {
return !this.form.UNIT_ID
}
},
watch: {
form: {
handler (val, val2) {
handler(val, val2) {
// console.log('valpppp----', val, val2)
for (let n in val) {
if (this.constForm[n] !== val[n]) {
@ -290,55 +337,64 @@ export default {
deep: true
}
},
created () {
created() {
// this.initForm()
// console.log('formcccc---', this.form)
this.getGridList()
this.getValiheList()
},
methods: {
initForm () {
this.formList.forEach(item => {
initForm() {
this.formList.forEach((item) => {
this.$set(this.form, item.columnName, '')
})
console.log('formcccc---', this.form)
},
handleClearVillage () {
handleClearVillage() {
this.form.BUILD_ID = ''
this.form.HOME_ID = ''
},
handleClearBuild () {
handleClearBuild() {
this.form.BUILD_ID = ''
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
},
handleClearDan () {
handleClearDan() {
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
},
handleSearch () {
handleSearch() {
// console.log('formmmmm---', this.form)
const itemTypes = ['cascader', 'daterange', 'timerange']
let arr = this.tempFormList.filter(n => n.isChange).map(item => {
return {
queryType: item.queryType,
tableName: item.tableName,
columnName: item.columnName,
// columnValue: []
columnValue: (itemTypes.includes(item.queryType) || itemTypes.includes(item.itemType)) ? this.form[item.columnName] : [this.form[item.columnName]]
}
})
let arr1 = this.fixedList.filter(n => n.columnValue.length > 0).map(item => {
return {
...item
}
})
let arr3 = [ ...arr1, ...arr ]
const itemTypes = ['daterange', 'timerange']
let arr = this.tempFormList
.filter((n) => n.isChange)
.map((item) => {
return {
queryType: item.queryType,
tableName: item.tableName,
columnName: item.columnName,
// columnValue: []
columnValue:
itemTypes.includes(item.queryType) ||
itemTypes.includes(item.itemType)
? this.form[item.columnName]
: [this.form[item.columnName].toString()]
}
})
let arr1 = this.fixedList
.filter((n) => n.columnValue.length > 0)
.map((item) => {
return {
...item
}
})
let arr3 = [...arr1, ...arr]
this.$emit('search', arr3)
},
handleOpenSearch () {
handleOpenSearch() {
this.openSearch = !this.openSearch
},
handleChangeGrid (val) {
handleChangeGrid(val) {
console.log('val', val)
this.form.VILLAGE_ID = ''
this.form.BUILD_ID = ''
@ -346,26 +402,26 @@ export default {
this.form.HOME_ID = ''
this.getValiheList()
},
handleChangeV (val) {
handleChangeV(val) {
console.log('val', val)
this.form.BUILD_ID = ''
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
this.getBuildList()
},
handleChangeB (val) {
handleChangeB(val) {
console.log('val', val)
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
this.getUniList()
},
handleChangeD (val) {
handleChangeD(val) {
console.log('val', val)
this.form.HOME_ID = ''
this.getHouseList()
},
// form
handleChangeForm (val) {
handleChangeForm(val) {
for (let n in this.fixedForm) {
if (n === val) {
if (this.fixedList.length > 0) {
@ -395,11 +451,11 @@ export default {
}
}
console.log('fixedList----999', this.fixedList)
this.tempFormList.forEach(item => {
this.tempFormList.forEach((item) => {
if (item.columnName === val) item.isChange = true
})
},
getGridList () {
getGridList() {
const { user } = this.$store.state
this.$http
.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId })
@ -415,10 +471,13 @@ export default {
return this.$message.error('网络错误')
})
},
getValiheList () {
getValiheList() {
const { user } = this.$store.state
this.$http
.post('/gov/org/icneighborhood/neighborhoodoption', { gridId: this.form.GRID_ID, agencyId: user.agencyId })
.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)
@ -431,9 +490,11 @@ export default {
return this.$message.error('网络错误')
})
},
getBuildList () {
getBuildList() {
this.$http
.post('/gov/org/icbuilding/buildingoption', { neighborHoodId: this.form.VILLAGE_ID })
.post('/gov/org/icbuilding/buildingoption', {
neighborHoodId: this.form.VILLAGE_ID
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
@ -446,9 +507,11 @@ export default {
return this.$message.error('网络错误')
})
},
getUniList () {
getUniList() {
this.$http
.post('/gov/org/icbuildingunit/unitoption', { buildingId: this.form.BUILD_ID })
.post('/gov/org/icbuildingunit/unitoption', {
buildingId: this.form.BUILD_ID
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
@ -461,7 +524,7 @@ export default {
return this.$message.error('网络错误')
})
},
getHouseList () {
getHouseList() {
this.$http
.post('/gov/org/ichouse/houseoption', { unitId: this.form.UNIT_ID })
.then(({ data: res }) => {
@ -475,7 +538,7 @@ export default {
.catch(() => {
return this.$message.error('网络错误')
})
},
}
}
}
</script>
@ -497,7 +560,7 @@ export default {
box-sizing: border-box;
margin-left: -23rpx;
cursor: pointer;
background: #FFFFFF;
background: #ffffff;
border-radius: 0 0 10px 10px;
img {
display: block;
@ -506,11 +569,11 @@ export default {
.resi-row-box {
height: 104px;
overflow: hidden;
transition: height .5s;
transition: height 0.5s;
}
.resi-row-more {
height: max-content;
transition: height .5s;
transition: height 0.5s;
}
.resi-row {
margin-bottom: 20px;
@ -525,6 +588,7 @@ export default {
display: flex;
align-items: center;
.resi-cell-label {
flex-shrink: 0;
width: 70px;
box-sizing: border-box;
margin-right: 15px;
@ -539,6 +603,9 @@ export default {
.resi-cell-input {
width: 180px;
}
.resi-cell--daterange {
width: 100%;
}
.resi-cell-select {
width: 180px;
box-sizing: border-box;

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

@ -2,7 +2,8 @@
<div>
<div>
<el-form :inline="true"
<el-form ref="ref_form"
:inline="true"
:model="dataForm"
:rules="dataRule"
:disabled="formType === 'detail'"
@ -18,8 +19,7 @@
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="50"
show-word-limit
maxlength="10"
placeholder="请输入楼栋名称"
v-model="dataForm.buildingName">
</el-input>
@ -35,30 +35,38 @@
<el-radio :label="'3'">别墅</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="排序"
<!-- <el-form-item label="排序"
prop="sort"
style="display: block"
label-width="150px">
<el-input-number v-model="dataForm.sort"
<el-input-number class="item_width_1"
v-model="dataForm.sort"
label="排序"></el-input-number>
</el-form-item>
</el-form-item> -->
<el-form-item label="单元数"
style="display: block"
prop="totalUnitNum"
label-width="150px">
<el-input-number v-model="dataForm.totalUnitNum"
<el-input-number class="item_width_1"
v-model="dataForm.totalUnitNum"
:min="1"
label="单元数"></el-input-number>
</el-form-item>
<el-form-item label="层数"
style="display: block"
prop="totalFloorNum"
label-width="150px">
<el-input-number v-model="dataForm.totalFloorNum"
<el-input-number class="item_width_1"
v-model="dataForm.totalFloorNum"
:min="1"
label="层数"></el-input-number>
</el-form-item>
<el-form-item label="户数"
style="display: block"
prop="totalHouseNum"
label-width="150px">
<el-input-number v-model="dataForm.totalHouseNum"
<el-input-number class="item_width_1"
v-model="dataForm.totalHouseNum"
:min="1"
label="户数"></el-input-number>
</el-form-item>
@ -67,7 +75,7 @@
prop="longitude"
label-width="150px"
style="display: block">
<el-input class="item_width_3"
<el-input class="item_width_4"
maxlength="50"
placeholder="请输入关键字"
v-model="keyWords">
@ -100,6 +108,7 @@
<el-button @click="handleCancle"> </el-button>
<el-button v-if="formType != 'detail'"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
</div>
</div>
@ -118,7 +127,7 @@ export default {
data () {
return {
formType: 'add', // addeditdetail
btnDisable: false,
buildingId: '', //ID
buildType: "1",
dataForm: {
@ -127,7 +136,7 @@ export default {
gridId: '', //ID
neighborHoodId: '',//id
buildingName: '',//
sort: 0,//
// sort: 0,//
totalUnitNum: 0,//
totalFloorNum: 0,//
totalHouseNum: 0,//
@ -159,15 +168,32 @@ export default {
this.formType = type
if (row) {
this.buildingId = row.buildingId
this.dataForm = row
this.buildType = row.buildingTypeKey
this.dataForm = JSON.parse(JSON.stringify(row))
this.buildingId = this.dataForm.buildingId
this.buildType = this.dataForm.buildingTypeKey
}
console.log(row)
},
async handleComfirm () {
this.btnDisable = true
setTimeout(() => {
this.btnDisable = false
}, 10000)
this.dataForm.type = this.buildType
this.$refs['ref_form'].validate((valid, messageObj) => {
if (!valid) {
this.btnDisable = false
app.util.validateRule(messageObj)
} else {
this.addBuild()
}
})
},
async addBuild () {
let url = ''
if (this.formType === 'add') {
url = '/gov/org/building/buildingadd'
@ -176,7 +202,6 @@ export default {
this.dataForm.buildingId = this.buildingId
}
this.dataForm.type = this.buildType
const { data, code, msg } = await requestPost(url, this.dataForm)
@ -186,8 +211,11 @@ export default {
message: '操作成功'
})
this.resetData()
this.btnDisable = false
this.$emit('dialogOk')
} else {
this.btnDisable = false
this.$message.error(msg)
}
@ -277,18 +305,20 @@ export default {
this.setMarker(lat, lng)
},
resetData () {
this.keyWords = ''
this.buildingId = '' //ID
this.buildType = '1'
this.dataForm = {
agencyId: '', // ID
agencyName: '',
gridId: '', //ID
neighborHoodId: '',//id
buildingName: '',//
sort: 0,//
// sort: 0,//
totalUnitNum: 0,//
totalFloorNum: 0,//
totalHouseNum: 0,//
type: '1',//
type: '',//
location: '', //
longitude: '', //
latitude: '' //
@ -322,16 +352,21 @@ export default {
trigger: 'blur'
}
],
agencyId: [
{ required: true, message: '所属组织不能为空', trigger: 'blur' }
type: [
{ required: true, message: '楼栋类型不能为空', trigger: 'blur' }
],
gridId: [
{ required: true, message: '所属网格不能为空', trigger: 'blur' }
totalUnitNum: [
{ required: true, message: '单元数不能为空', trigger: 'blur' }
],
totalFloorNum: [
{ required: true, message: '层数不能为空', trigger: 'blur' }
],
totalHouseNum: [
{ required: true, message: '户数不能为空', trigger: 'blur' }
],
longitude: [
{ required: true, message: '坐标不能为空', trigger: 'blur' }
]
],
}
},
@ -350,6 +385,9 @@ export default {
margin-left: 10px;
width: 200px;
}
.item_width_4 {
width: 200px;
}
.div_map {
margin-top: 10px;

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

@ -54,25 +54,27 @@
:http-request="uploadFile">
<el-button style="margin-left:10px"
size="small"
type="red">导入小区数据</el-button>
type="red">导入楼宇数据</el-button>
</el-upload>
</div>
<div class="div_table">
<el-table :data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
style="width: 100%">
<el-table-column prop="buildingName"
label="楼栋名称"
width="180">
min-width="180">
</el-table-column>
<el-table-column prop="neighborHoodName"
label="所属小区"
width="160">
min-width="160">
</el-table-column>
<el-table-column prop="buildingType"
label="楼栋类型"
width="140">
min-width="140">
</el-table-column>
<el-table-column prop="totalUnitNum"
label="单元数">
@ -86,12 +88,15 @@
<el-table-column label="操作"
fixed="right"
width="140"
width="170"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<el-button type="text"
style="color:#feb349;text-decoration: underline;"
size="small"
@click="handleToNextLevel(scope.row)">进入</el-button>
<el-button type="text"
style="color:#1C6AFD;text-decoration: underline;"
size="small"
@ -112,9 +117,9 @@
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 30, 50]"
:page-sizes="[10, 20, 50]"
:page-size="pageSize"
layout="sizes, prev, pager, next"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
@ -150,8 +155,9 @@ export default {
return {
loading: false,
total: 0,
pageSize: 20,
pageSize: 10,
pageNo: 0,
tableLoading: true,
agencyObj: {},//
ownerName: '',
@ -171,9 +177,12 @@ export default {
console.log('building11111111111111111111111111')
},
computed: {
rowHeight () {
return (this.clientHeight - 200) + 'px'
tableHeight () {
return (this.clientHeight - 220)
},
...mapGetters(['clientHeight'])
},
methods: {
@ -183,6 +192,7 @@ export default {
},
async loadTable (fromTree, treeObj) {
this.tableLoading = true
if (fromTree) {
this.agencyObj = treeObj
}
@ -204,9 +214,11 @@ export default {
} else {
this.$message.error(msg)
}
this.tableLoading = false
},
diaClose () {
this.$refs.ref_form.resetData()
this.formShow = false
},
@ -233,6 +245,9 @@ export default {
this.$refs.ref_form.initForm('edit', row, this.agencyObj)
})
},
handleToNextLevel (row) {
this.$emit('toNextLevel', row, 'building')
},
addFormCancle () {
this.formShow = false
@ -398,6 +413,10 @@ export default {
const { data, code, msg } = await requestPost(url, fileFormData)
if (code === 0) {
this.$message({
type: "success",
message: "导入成功"
});
this.$emit('refreshTree')
this.loadTable()
} else {
@ -445,26 +464,7 @@ export default {
}
</script>
<style lang="scss" scoped >
.el-button--green {
color: #fff;
background-color: #22c1c3;
border-color: #22c1c3;
}
.el-button--yellow {
color: #fff;
background-color: #feb349;
border-color: #feb349;
}
.el-button--blue {
color: #fff;
background-color: #2195fe;
border-color: #2195fe;
}
.el-button--red {
color: #fff;
background-color: #fe6252;
border-color: #fe6252;
}
@import "@/assets/scss/buttonstyle.scss";
.div_search {
display: flex;

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

@ -1,53 +1,45 @@
<template>
<div>
<el-row class="row"
:gutter="10">
<el-col :span="5">
<el-card>
<div :style="{height:rowHeight}"
class="div_tree">
<el-input placeholder="输入关键字进行过滤"
v-model="filterText">
</el-input>
<el-tree ref="ref_tree"
class="filter-tree"
:data="treeData"
:props="defaultProps"
:highlight-current="true"
node-key="id"
:expand-on-click-node="false"
default-expand-all
:filter-node-method="filterNode"
@node-click="handleNodeClick">
</el-tree>
</div>
</el-card>
</el-col>
<el-col :span="19">
<el-card>
<div :style="{height:rowHeight}">
<build-table v-if="selTreeObj.level==='neighbourHood'"
ref="ref_neighTable"
@refreshTree="refreshTree"></build-table>
<room-table v-else-if="selTreeObj.level==='building'"
ref="ref_buildingTable"
@refreshTree="refreshTree"></room-table>
<community-table v-else
ref="ref_communityTable"
@refreshTree="refreshTree"></community-table>
</div>
</el-card>
</el-col>
</el-row>
<div class="div_main">
<div :style="{height:rowHeight}"
class="div_tree">
<el-input placeholder="输入关键字进行过滤"
v-model="filterText">
</el-input>
<el-scrollbar :style="{height:treeHeight}"
class="scrollar">
<el-tree ref="ref_tree"
v-loading="treeLoading"
class="filter_tree"
:data="treeData"
:props="defaultProps"
:highlight-current="true"
node-key="id"
:expand-on-click-node="false"
default-expand-all
:filter-node-method="filterNode"
@node-click="handleNodeClick">
</el-tree>
</el-scrollbar>
</div>
<div :style="{height:rowHeight}"
class="div_table">
<build-table v-if="selTreeObj.level==='neighbourHood'"
ref="ref_neighTable"
@toNextLevel="toNextLevel"
@refreshTree="refreshTree"></build-table>
<room-table v-else-if="selTreeObj.level==='building'"
ref="ref_buildingTable"
@refreshTree="refreshTree"></room-table>
<community-table v-else
@toNextLevel="toNextLevel"
ref="ref_communityTable"
@refreshTree="refreshTree"></community-table>
</div>
</div>
</template>
@ -66,6 +58,7 @@ export default {
data () {
return {
filterText: '',
treeLoading: true,
treeData: [],
defaultProps: {
children: 'children',
@ -82,6 +75,7 @@ export default {
CDialog
},
async mounted () {
this.treeLoading = true
await this.loadOrgData()
await this.loadTree()
await this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj)
@ -91,11 +85,15 @@ export default {
this.$refs.ref_tree.setCurrentKey(this.treeData[0].id);
});
}
this.treeLoading = false
},
computed: {
rowHeight () {
return (this.clientHeight - 180) + 'px'
return (this.clientHeight - 140) + 'px'
},
treeHeight () {
return (this.clientHeight - 200) + 'px'
},
...mapGetters(['clientHeight'])
},
@ -147,7 +145,6 @@ export default {
},
handleNodeClick (obj) {
this.getTreeObj(obj)
this.$nextTick(() => {
@ -166,12 +163,30 @@ export default {
//
async refreshTree () {
this.treeLoading = true
await this.loadTree(this.selTreeObj.id)
this.$nextTick(() => {
// ref_tree ref value node-key
this.$refs.ref_tree.setCurrentKey(this.selTreeObj.id);
});
this.treeLoading = false
},
//
toNextLevel (row, level) {
if (level === 'community') {
this.selTreeObj = this.$refs.ref_tree.getNode(row.neighborHoodId).data
} else {
this.selTreeObj = this.$refs.ref_tree.getNode(row.buildingId).data
}
this.handleNodeClick(this.selTreeObj)
this.$nextTick(() => {
// ref_tree ref value node-key
this.$refs.ref_tree.setCurrentKey(this.selTreeObj.id);
});
},
//
@ -241,8 +256,30 @@ export default {
}
</script>
<style lang="scss" scoped >
.div_main {
display: flex;
}
.scrollar {
margin-top: 10px;
}
.div_tree {
overflow-y: auto;
flex: 0 0 400px;
background-color: #ffffff;
border-radius: 5px;
padding: 10px;
overflow-y: hidden;
}
.filter_tree {
overflow-x: auto;
}
.div_table {
margin-left: 15px;
width: calc(100vw - 680px);
background-color: #ffffff;
border-radius: 5px;
padding: 10px;
}
.div_btn {
@ -258,4 +295,11 @@ export default {
.aui-content > .el-tabs > .el-tabs__content {
padding: 0px;
}
.el-scrollbar__wrap {
overflow-x: hidden !important;
}
.el-tree-node:focus > .el-tree-node__content {
/* background-color: #ccc !important; */
color: #2195fe;
}
</style>

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

@ -2,7 +2,8 @@
<div>
<div>
<div v-show="!propertyFormShow">
<el-form :inline="true"
<el-form ref="ref_form"
:inline="true"
:model="dataForm"
:rules="dataRule"
:disabled="formType === 'detail'"
@ -47,6 +48,7 @@
<el-select class="item_width_2"
v-model="dataForm.propertyId"
placeholder="请选择"
filterable
clearable>
<el-option v-for="item in propertyList"
:key="item.propertyId"
@ -87,7 +89,7 @@
prop="longitude"
label-width="150px"
style="display: block">
<el-input class="item_width_3"
<el-input class="item_width_4"
maxlength="50"
placeholder="请输入关键字"
v-model="keyWords">
@ -126,8 +128,7 @@
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="50"
show-word-limit
maxlength="10"
placeholder="请输入小区名称"
v-model="propertyForm.name">
</el-input>
@ -139,6 +140,7 @@
<el-button @click="handleCancle"> </el-button>
<el-button v-if="formType != 'detail'"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
</div>
</div>
@ -160,6 +162,7 @@ export default {
gridList: [],
propertyList: [],
btnDisable: false,
neighborHoodId: '', //ID
dataForm: {
@ -277,10 +280,11 @@ export default {
this.formType = type
if (row) {
this.neighborHoodId = row.neighborHoodId
this.dataForm = row
this.dataForm = JSON.parse(JSON.stringify(row))
this.neighborHoodId = this.dataForm.neighborHoodId
}
console.log(row)
await this.loadAgency()
await this.loadGrid()
@ -333,19 +337,35 @@ export default {
},
handleAddProperty () {
this.propertyForm.name = ''
this.propertyFormShow = true
},
async handleComfirm () {
if (this.propertyFormShow) {
this.addProperty()
} else {
this.addCommunity()
this.btnDisable = true
setTimeout(() => {
this.btnDisable = false
}, 10000)
this.$refs['ref_form'].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj)
this.btnDisable = false
} else {
this.addCommunity()
}
})
}
},
async addCommunity () {
let url = ''
if (this.formType === 'add') {
url = '/gov/org/neighborhood/neighborhoodadd'
@ -365,11 +385,21 @@ export default {
})
this.resetData()
this.$emit('dialogOk')
this.btnDisable = false
} else {
this.btnDisable = false
this.$message.error(msg)
}
},
async addProperty () {
if (!this.propertyForm.name || this.propertyForm.name === '') {
this.$message({
type: 'error',
message: '物业名称不能为空'
})
return false
}
const url = '/gov/org/propertymanagement/add'
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/propertymanagement/add"
let params = {
@ -381,8 +411,9 @@ export default {
if (code === 0) {
this.$message({
type: 'success',
message: '添加物业成功'
message: '操作成功'
})
this.dataForm.propertyId = data.propertyId
this.propertyForm.name = ''
this.propertyFormShow = false
this.loadProperty()
@ -400,6 +431,7 @@ export default {
}
},
resetData () {
this.keyWords = ''
this.neighborHoodId = '' //ID
this.dataForm = {
neighborHoodName: '', // 50
@ -477,6 +509,9 @@ export default {
margin-left: 10px;
width: 200px;
}
.item_width_4 {
width: 200px;
}
.div_map {
margin-top: 10px;

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

@ -63,6 +63,8 @@
<div class="div_table">
<el-table :data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
style="width: 100%">
<el-table-column prop="neighborHoodName"
label="小区名称"
@ -84,16 +86,16 @@
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="140"
width="170"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<!-- <el-button type="text"
style="color:#00A7A9;text-decoration: underline;"
<el-button type="text"
style="color:#feb349;text-decoration: underline;"
size="small"
@click="handleToBuild(scope.row)">进入</el-button> -->
@click="handleToNextLevel(scope.row)">进入</el-button>
<el-button type="text"
style="color:#1C6AFD;text-decoration: underline;"
size="small"
@ -114,9 +116,9 @@
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 30, 50]"
:page-sizes="[10, 20, 50]"
:page-size="pageSize"
layout="sizes, prev, pager, next"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
@ -152,8 +154,9 @@ export default {
return {
loading: false,
total: 0,
pageSize: 20,
pageSize: 10,
pageNo: 0,
tableLoading: true,
agencyObj: {},//
ownerName: '',
@ -177,6 +180,11 @@ export default {
},
computed: {
tableHeight () {
return (this.clientHeight - 320)
},
rowHeight () {
return (this.clientHeight - 200) + 'px'
},
@ -188,6 +196,7 @@ export default {
this.loadTable()
},
async loadTable (fromTree, treeObj) {
this.tableLoading = true
if (fromTree) {
this.agencyObj = treeObj
}
@ -211,9 +220,11 @@ export default {
} else {
this.$message.error(msg)
}
this.tableLoading = false
},
diaClose () {
this.$refs.ref_form.resetData()
this.formShow = false
},
@ -241,6 +252,10 @@ export default {
})
},
handleToNextLevel (row) {
this.$emit('toNextLevel', row, 'community')
},
addFormCancle () {
this.formShow = false
},
@ -400,13 +415,13 @@ export default {
var url = '/gov/org/neighborhood/import'
let fileFormData = new FormData();
fileFormData.append('file', this.files);//filenamefiletest.zip
// let params = {
// file: this.files
// }
const { data, code, msg } = await requestPost(url, fileFormData)
if (code === 0) {
this.$message({
type: "success",
message: "导入成功"
});
this.$emit('refreshTree')
this.loadTable()
} else {
@ -453,26 +468,7 @@ export default {
}
</script>
<style lang="scss" scoped >
.el-button--green {
color: #fff;
background-color: #22c1c3;
border-color: #22c1c3;
}
.el-button--yellow {
color: #fff;
background-color: #feb349;
border-color: #feb349;
}
.el-button--blue {
color: #fff;
background-color: #2195fe;
border-color: #2195fe;
}
.el-button--red {
color: #fff;
background-color: #fe6252;
border-color: #fe6252;
}
@import "@/assets/scss/buttonstyle.scss";
.div_search {
display: flex;

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

@ -1,7 +1,8 @@
<template>
<div>
<div>
<el-form :inline="false"
<el-form ref="ref_form"
:inline="false"
:model="dataForm"
:rules="dataRule"
:disabled="formType === 'detail'"
@ -103,7 +104,6 @@
label-width="150px"
style="display: block">
<el-input class="item_width_1"
type='number'
placeholder="请输入房主身份证"
v-model="dataForm.ownerIdCard">
</el-input>
@ -115,6 +115,7 @@
<el-button @click="handleCancle"> </el-button>
<el-button v-if="formType != 'detail'"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
</div>
</div>
@ -130,13 +131,13 @@ export default {
data () {
return {
formType: 'add', // addeditdetail
btnDisable: false,
unitList: [],
houseId: '', //ID
houseType: '1',
purpose: '1',
rentFlag: false,
rentFlag: 0,
dataForm: {
neighborHoodId: '', // ID
buildingId: '',//ID
@ -169,20 +170,20 @@ export default {
this.formType = type
if (row) {
this.houseId = row.houseId
this.dataForm = row
this.dataForm = JSON.parse(JSON.stringify(row))
this.houseId = this.dataForm.houseId
this.dataForm.buildingUnitId = row.unitNumKey
this.houseType = row.houseTypeKey
this.purpose = row.purposeKey
if (row.rentFlagKey) {
this.dataForm.buildingUnitId = this.dataForm.unitNumKey
this.houseType = this.dataForm.houseTypeKey
this.purpose = this.dataForm.purposeKey
if (this.dataForm.rentFlagKey) {
this.rentFlag = 1
} else {
this.rentFlag = 0
}
}
console.log(row)
await this.loadUnitList()
@ -206,6 +207,45 @@ export default {
},
async handleComfirm () {
this.btnDisable = true
setTimeout(() => {
this.btnDisable = false
}, 10000)
this.dataForm.houseType = this.houseType
this.dataForm.purpose = this.purpose
this.dataForm.rentFlag = this.rentFlag
this.$refs['ref_form'].validate((valid, messageObj) => {
if (!valid) {
this.btnDisable = false
app.util.validateRule(messageObj)
} else {
this.addRoom()
}
})
},
async addRoom () {
const regCard = /(^\d{15}$)|(^\d{17}(\d|X)$)/; //1518151817X
if (regCard.test(this.dataForm.ownerIdCard) === false) {
this.btnDisable = false
this.$message({
type: 'warning',
message: '请输入正确的身份证号码'
})
return false;
}
const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //
if (regPhone.test(this.dataForm.ownerPhone) === false) {
this.btnDisable = false
this.$message({
type: 'warning',
message: '请输入正确的手机号码'
})
return false;
}
let url = ''
if (this.formType === 'add') {
@ -215,12 +255,8 @@ export default {
this.dataForm.houseId = this.houseId
}
this.dataForm.houseType = this.houseType
this.dataForm.purpose = this.purpose
this.dataForm.rentFlag = this.rentFlag
const { data, code, msg } = await requestPost(url, this.dataForm)
this.btnDisable = false
if (code === 0) {
this.$message({
type: 'success',
@ -228,7 +264,9 @@ export default {
})
this.resetData()
this.$emit('dialogOk')
} else {
this.$message.error(msg)
}
@ -242,14 +280,17 @@ export default {
resetData () {
this.houseId = '' //ID
this.houseType = '1'
this.purpose = '1'
this.rentFlag = 0
this.dataForm = {
neighborHoodId: '', // ID
buildingId: '',//ID
buildingUnitId: 0,//ID
doorName: 0,//
buildingUnitId: '',//ID
doorName: '',//
houseType: '1',//
purpose: '1',//
rentFlag: '1',//10
rentFlag: 0,//10
ownerPhone: '', //
ownerName: '', //
ownerIdCard: '' //
@ -277,14 +318,12 @@ export default {
buildingUnitId: [
{ required: true, message: '所属单元不能为空', trigger: 'blur' },
],
doorName: [
{ required: true, message: '门牌号不能为空', trigger: 'blur' }
],
houseType: [
{ required: true, message: '房屋类型不能为空', trigger: 'blur' }
],
purpose: [
{ required: true, message: '房屋用途不能为空', trigger: 'blur' }
],

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

@ -54,12 +54,13 @@
:http-request="uploadFile">
<el-button style="margin-left:10px"
size="small"
type="red">导入小区数据</el-button>
type="red">导入房屋数据</el-button>
</el-upload>
</div>
<div class="div_table">
<el-table :data="tableData"
v-loading="tableLoading"
border
style="width: 100%">
<el-table-column prop="houseName"
@ -80,10 +81,10 @@
label="门牌号">
</el-table-column>
<el-table-column prop="houseType"
label="房屋类型">
label="类型">
</el-table-column>
<el-table-column prop="purpose"
label="房屋用途">
label="用途">
</el-table-column>
<el-table-column prop="rentFlag"
label="是否出租">
@ -92,10 +93,12 @@
label="房主姓名">
</el-table-column>
<el-table-column prop="ownerPhone"
label="房主电话">
label="房主电话"
width="110">
</el-table-column>
<el-table-column prop="ownerIdCard"
label="身份证">
label="身份证"
width="160">
</el-table-column>
<el-table-column label="操作"
fixed="right"
@ -125,9 +128,9 @@
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 30, 50]"
:page-sizes="[10, 20, 50]"
:page-size="pageSize"
layout="sizes, prev, pager, next"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
@ -162,9 +165,9 @@ export default {
return {
loading: false,
total: 0,
pageSize: 20,
pageSize: 10,
pageNo: 0,
tableLoading: true,
agencyObj: {},//
ownerName: '',
@ -198,6 +201,7 @@ export default {
},
async loadTable (fromTree, treeObj) {
this.tableLoading = true
if (fromTree) {
this.agencyObj = treeObj
}
@ -219,9 +223,11 @@ export default {
} else {
this.$message.error(msg)
}
this.tableLoading = false
},
diaClose () {
this.$refs.ref_form.resetData()
this.formShow = false
},
@ -411,7 +417,10 @@ export default {
const { data, code, msg } = await requestPost(url, fileFormData)
if (code === 0) {
this.$message({
type: "success",
message: "导入成功"
});
this.$emit('refreshTree')
this.loadTable()
} else {
@ -458,26 +467,7 @@ export default {
}
</script>
<style lang="scss" scoped >
.el-button--green {
color: #fff;
background-color: #22c1c3;
border-color: #22c1c3;
}
.el-button--yellow {
color: #fff;
background-color: #feb349;
border-color: #feb349;
}
.el-button--blue {
color: #fff;
background-color: #2195fe;
border-color: #2195fe;
}
.el-button--red {
color: #fff;
background-color: #fe6252;
border-color: #fe6252;
}
@import "@/assets/scss/buttonstyle.scss";
.div_search {
display: flex;

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

@ -1,24 +1,41 @@
<template>
<div v-if="pageLoading">
<resi-search v-if="searchList.length > 0" ref="resiSearch" :form-list="searchList" @search="handleSearch" />
<resi-search
v-if="searchList.length > 0"
ref="resiSearch"
:form-list="searchList"
@search="handleSearch"
/>
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button type="success" size="small" @click="handleAdd">新增</el-button>
<el-button type="warning" size="small" @click="handleExport">导出</el-button>
<!-- <el-button type="primary" size="small">下载人口模板</el-button> -->
<!-- <el-button type="danger" size="small">导入人口数据</el-button> -->
<el-upload
ref="upload"
class="upload-demo"
action="uploadUlr"
:limit="1"
:with-credentials="true"
:show-file-list="false"
:auto-upload="true"
:on-progress="handleProgress"
:on-success="handleExcelSuccess"
:before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest"
>
<el-button type="danger" size="small" :loading="importLoading">{{importBtnTitle}}</el-button>
</el-upload>
</div>
<el-table
:data="tableData"
v-loading="tableLoading"
border
style="width: 100%"
class="resi-table">
<el-table-column
type="index"
align="center"
width="50">
class="resi-table"
>
<el-table-column type="index" align="center" width="50">
</el-table-column>
<el-table-column
v-for="item in tableHeader"
@ -26,28 +43,64 @@
:prop="item.columnName"
:label="item.label"
align="center"
:width="item.itemType === 'radio' ? 80 : 180">
:width="item.itemType === 'radio' ? 80 : 180"
>
<template slot-scope="scope">
<span>{{ handleFilterSpan(scope.row, item)}}</span>
<span>{{ handleFilterSpan(scope.row, item) }}</span>
</template>
</el-table-column>
<el-table-column
fixed="right"
label="操作"
align="center"
width="120">
<el-table-column fixed="right" label="操作" align="center" width="120">
<template slot-scope="scope">
<el-button @click="handleLook(scope.row)" type="text" size="small" class="btn-color-look">查看</el-button>
<el-button
@click="handleLook(scope.row)"
type="text"
size="small"
class="btn-color-look"
>查看</el-button
>
<template v-if="filterEdit(scope.row.ORG_ID)">
<el-button @click="handleEdit(scope.row)" type="text" size="small" class="btn-color-edit">编辑</el-button>
<el-button
@click="handleEdit(scope.row)"
type="text"
size="small"
class="btn-color-edit"
>编辑</el-button
>
<!-- <el-popover placement="top" width="160" trigger="manual">
<p>删除之后无法回复确认删除</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="rowVisible = false"
>取消</el-button
>
<el-button
type="primary"
size="mini"
@click="handleDel(scope.row)"
>确定</el-button
>
</div>
<el-button
slot="reference"
type="text"
size="small"
class="btn-color-del"
@click="rowVisible = true"
>删除</el-button
>
</el-popover> -->
<el-popconfirm
title="删除之后无法回复,确认删除?"
@onConfirm="handleDel(scope.row)"
@confirm="handleDel(scope.row)"
>
<el-button slot="reference" type="text" size="small" class="btn-color-del">删除</el-button>
<el-button
slot="reference"
type="text"
size="small"
class="btn-color-del"
>删除</el-button
>
</el-popconfirm>
</template>
</template>
</el-table-column>
</el-table>
@ -59,63 +112,112 @@
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next"
:total="total">
:total="total"
>
</el-pagination>
</div>
</el-card>
<el-dialog
title="新增"
:title="formName"
:visible.sync="dialogVisible"
width="80%"
append-to-body
:close-on-click-modal="false"
:before-close="handlerCancle">
<resi-form v-if="dialogVisible" ref="baseForm" :fixed="true" :form-list="formList" @changegroup="handleChangeGroup" />
<div v-if="dialogVisible" class="resi-other">
:before-close="handlerCancle"
>
<resi-form
v-if="dialogVisible"
ref="baseForm"
:fixed="true"
:form-list="formList"
@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" :key="item.columnName"
:label="item.label" :name="'group' + item.groupId">
<resi-form :ref="'group' + item.groupId" :columns="3" :support-add="item.supportAdd"
:form-id="item.columnName" :form-list=" item.itemList" />
<el-tab-pane
v-for="item in tabsList"
:key="item.columnName"
:label="item.label"
:name="'group' + item.groupId"
>
<resi-form
:ref="'group' + item.groupId"
:columns="3"
:support-add="item.supportAdd"
:form-id="item.columnName"
:form-list="item.itemList"
/>
</el-tab-pane>
</el-tabs>
</div>
</div>
<div class="resi-btns">
<el-button size="small" @click="handlerCancle">取消</el-button>
<el-button type="primary" size="small" :loading="btnLoading" @click="handleSUbmit">提交</el-button>
<el-button
type="primary"
size="small"
:loading="btnLoading"
@click="handleSUbmit"
>提交</el-button
>
</div>
</el-dialog>
<el-dialog
title="编辑"
<el-dialog
:title="formName"
:visible.sync="dialogEditVisible"
width="80%"
append-to-body
:close-on-click-modal="false"
:before-close="handlerEditCancle">
<edit-resi v-if="dialogEditVisible" ref="baseForm" :disabled="disabled" :form-info="editForm" :fixed="true" :form-list="formList" @changegroup="handleChangeGroup" />
<div v-if="dialogEditVisible" class="resi-other">
:before-close="handlerEditCancle"
>
<edit-resi
v-if="dialogEditVisible"
ref="baseForm"
:disabled="disabled"
:form-info="editForm"
:fixed="true"
:form-list="formList"
@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" :key="item.columnName"
:label="item.label" :name="'group' + item.groupId">
<edit-resi :ref="'group' + item.groupId" :columns="3" :support-add="item.supportAdd"
:form-id="item.columnName" :muti-list="item.mutiList" :form-list=" item.itemList" :disabled="disabled" />
<el-tab-pane
v-for="item in tabsList"
:key="item.columnName"
:label="item.label"
:name="'group' + item.groupId"
>
<edit-resi
:ref="'group' + item.groupId"
:columns="3"
:support-add="item.supportAdd"
:form-id="item.columnName"
:muti-list="item.mutiList"
:form-list="item.itemList"
:disabled="disabled"
/>
</el-tab-pane>
</el-tabs>
</div>
</div>
<div class="resi-btns">
<el-button size="small" @click="handlerEditCancle">取消</el-button>
<el-button v-if="!disabled" type="primary" size="small" :loading="btnLoading" @click="handleEditSUbmit">提交</el-button>
<el-button
v-if="!disabled"
type="primary"
size="small"
:loading="btnLoading"
@click="handleEditSUbmit"
>提交</el-button
>
</div>
</el-dialog>
</div>
</template>
@ -123,20 +225,25 @@
import resiSearch from '../../components/resiSearch.vue'
import resiForm from '../../components/resiForm.vue'
import editResi from '../../components/editResi.vue'
import axios from 'axios'
export default {
components: {
resiSearch,
resiForm,
editResi
},
data () {
data() {
return {
importBtnTitle: '导入人员数据',
importLoading: false,
rowVisible: false,
tableLoading: false,
btnLoading: false,
disabled: false,
pageLoading: false,
dialogEditVisible: false,
dialogVisible: false,
uploadUlr: window.SITE_CONFIG['apiURL'] + '/epmetuser/icresiuser/importExcel',
currentPage: 1,
pageSize: 20,
total: null,
@ -150,15 +257,14 @@ export default {
BUILD_ID: '',
HOME_ID: ''
},
editTableName: {
},
editTableName: {},
formName: '',
formList: [],
tableHeader: [],
tabsList: []
}
},
async created () {
async created() {
await this.getSearchList()
// await this.getFormList()
await this.getTableHeader()
@ -167,38 +273,38 @@ export default {
console.log('storeoooo----0000', this.$store)
},
methods: {
filterEdit (id) {
filterEdit(id) {
const { user } = this.$store.state
return id === user.agencyId
},
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 => {
item.options.forEach((n) => {
if (n.value === row[item.columnName]) _val = n.label
})
}
return _val || row[item.columnName]
},
handleSearch (val) {
handleSearch(val) {
console.log('searchhh--', val)
this.currentPage = 1
this.conditions = val
this.getTableData()
},
//
download (data, fileName) {
console.log('data',data)
download(data, fileName) {
console.log('data', data)
if (!data) {
return
}
@ -206,77 +312,134 @@ export default {
var csvData = new Blob([data])
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveOrOpenBlob(csvData, fileName);
window.navigator.msSaveOrOpenBlob(csvData, fileName)
}
// for Non-IE (chrome, firefox etc.)
else {
var a = document.createElement('a');
document.body.appendChild(a);
a.style = 'display: none';
var url = window.URL.createObjectURL(csvData);
a.href = url;
a.download = fileName;
a.click();
a.remove();
window.URL.revokeObjectURL(url);
var a = document.createElement('a')
document.body.appendChild(a)
a.style = 'display: none'
var url = window.URL.createObjectURL(csvData)
a.href = url
a.download = fileName
a.click()
a.remove()
window.URL.revokeObjectURL(url)
}
},
handleExport () {
handleExport() {
let params = {
formCode: 'resi_base_info',
conditions: this.conditions
}
// .post('epmetuser/icresiuser/exportExcel', params)
this.$http({
url: 'epmetuser/icresiuser/exportExcel',
// .post('epmetuser/icresiuser/exportExcel', params)
axios({
url: window.SITE_CONFIG['apiURL'] + '/epmetuser/icresiuser/exportExcel',
// url: 'epmetuser/icresiuser/exportExcel',
method: 'post',
data: params,
header: {
headers: { 'Content-Type': 'application/x-download' }
},
responseType: 'blob'
}).then(({ data: res }) => {
// var headerData = res.headers
// this.download(res, '.xlsx')
console.log('res',res)
const fileName = '人员数据.xlsx'
let blob = new Blob([res], {type: 'application/vnd.ms-excel'})
var url = window.URL.createObjectURL(blob);
var aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob
// window.location.href = res.data
})
.then(res => {
console.log('resllll', res)
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
console.log('filename', fileName)
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
var url = window.URL.createObjectURL(blob)
var aLink = document.createElement('a')
aLink.style.display = 'none'
aLink.href = url
aLink.setAttribute('download', fileName)
document.body.appendChild(aLink)
aLink.click()
document.body.removeChild(aLink) //
window.URL.revokeObjectURL(url) //blob
})
.catch(err => {
.catch((err) => {
console.log('获取导出情失败', err)
return this.$message.error('网络错误')
})
},
handleClick (tab, event) {
//
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) {
console.log('percentage', file.percentage)
},
beforeExcelUpload (file) {
console.log('file', file)
const isType = file.type === 'application/vnd.ms-excel'
const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
const fileType = isType || isTypeComputer
const isLt1M = (file.size / 1024 / 1024) < 10
if(!fileType) {
this.$message.error('上传文件只能是xls/xlsx格式!')
}
if (!isLt1M) {
this.$message.error('上传图片大小不能超过 10MB!')
}
return fileType && isLt1M
},
uploadHttpRequest(file) {
this.importLoading = true
this.importBtnTitle = '正在上传中...'
const formData = new FormData() //FormDataappend('key', value)
formData.append('file', file.file) //
axios({
url: window.SITE_CONFIG['apiURL'] + '/epmetuser/icresiuser/importExcel',
method: 'post',
data: formData,
responseType: 'blob'
})
.then((res) => {
this.importLoading = false
this.importBtnTitle = '导入人员数据'
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
console.log('filename', fileName)
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
var url = window.URL.createObjectURL(blob)
var aLink = document.createElement('a')
aLink.style.display = 'none'
aLink.href = url
aLink.setAttribute('download', fileName)
document.body.appendChild(aLink)
aLink.click()
document.body.removeChild(aLink) //
window.URL.revokeObjectURL(url) //blob
})
.catch( err => {
console.log('失败', err)
param.onError() //
})
},
handleClick(tab, event) {
console.log(tab, event)
},
async handleLook (row) {
async handleLook(row) {
this.disabled = true
await this.getFormList()
this.getrowInfo(row.icResiUserId)
},
async handleEdit (row) {
async handleEdit(row) {
this.disabled = false
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 } = val
let hasT = false
@ -291,9 +454,9 @@ export default {
if (value === 1 || value === '1') {
// console.log('changegroup----999', value)
if (!hasT) {
childGroup.itemList.forEach(async item => {
childGroup.itemList.forEach(async (item) => {
if (item.optionSourceType === 'remote') {
await this.getOptionsList(item.optionSourceValue).then(res => {
await this.getOptionsList(item.optionSourceValue).then((res) => {
item.options = res
})
// console.log('')
@ -306,17 +469,19 @@ export default {
if (hasT) this.tabsList.splice(i, 1)
}
},
formetForm () {
formetForm() {
const _baseForm = this.$refs.baseForm.handleForm()
let arr = []
if (_baseForm.length === 0) return false
arr.push([ ..._baseForm ])
this.tabsList.forEach(item => {
arr.push([ ...this.$refs['group' + item.groupId][0].handleForm() ])
arr.push([..._baseForm])
this.tabsList.forEach((item) => {
arr.push([...this.$refs['group' + item.groupId][0].handleForm()])
})
let arr2 = arr.reduce(function (a, b) {
return a.concat(b)
})
let arr2 = arr.reduce(function (a, b) { return a.concat(b) })
let noChange = true
arr2.forEach(item => {
arr2.forEach((item) => {
if (item.list.length !== 0) noChange = false
})
console.log('arr2', arr2)
@ -344,11 +509,12 @@ export default {
})
console.log('res', res)
// listlist
res.forEach(item => {
res.forEach((item) => {
let _form = {}
item.list.length > 0 && item.list.forEach(n => {
_form = { ..._form, ...n }
})
item.list.length > 0 &&
item.list.forEach((n) => {
_form = { ..._form, ...n }
})
if (item.list.length > 0) {
finalArr.push({
tableName: item.tableName,
@ -359,51 +525,55 @@ 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',
icResiUserId: row.icResiUserId
}
console.log('row1', row)
this.$http
.post('/epmetuser/icresiuser/delete', params)
.then(({ data: res }) => {
console.log('row2', row)
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('row3', row)
this.$message.success('删除成功')
this.getTableData()
}
})
.catch(() => {
.catch((err) => {
console.log('row4', err)
return this.$message.error('网络错误')
})
},
handleFormatUrl (url) {
handleFormatUrl(url) {
return url.includes('?')
},
handlerEditCancle () {
handlerEditCancle() {
this.$refs.baseForm.resetForm()
this.tabsList.forEach(item => {
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.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)
@ -414,7 +584,7 @@ export default {
this.$message.success('提交成功')
// this.$refs[formName].resetFields();
this.$refs.baseForm.resetForm()
this.tabsList.forEach(item => {
this.tabsList.forEach((item) => {
this.$refs['group' + item.groupId][0].resetForm()
})
this.getTableData()
@ -424,9 +594,9 @@ export default {
.catch(() => {
return this.$message.error('网络错误')
})
this.btnLoading = false
this.btnLoading = false
},
async submitEdit (arr) {
async submitEdit(arr) {
this.btnLoading = true
await this.$http
.post('/epmetuser/icresiuser/edit', arr)
@ -438,7 +608,7 @@ export default {
this.$message.success('提交成功')
// this.$refs[formName].resetFields();
this.$refs.baseForm.resetForm()
this.tabsList.forEach(item => {
this.tabsList.forEach((item) => {
this.$refs['group' + item.groupId][0].resetForm()
})
this.getTableData()
@ -448,11 +618,13 @@ export default {
.catch(() => {
return this.$message.error('网络错误')
})
this.btnLoading = false
this.btnLoading = false
},
getTableHeader () {
getTableHeader() {
this.$http
.post('/oper/customize/icform/tableheaders', { formCode: 'resi_base_info' })
.post('/oper/customize/icform/tableheaders', {
formCode: 'resi_base_info'
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
@ -464,7 +636,7 @@ export default {
return this.$message.error('网络错误')
})
},
async getTableData () {
async getTableData() {
this.tableLoading = true
let params = {
formCode: 'resi_base_info',
@ -485,9 +657,9 @@ export default {
.catch(() => {
return this.$message.error('网络错误')
})
this.tableLoading = false
this.tableLoading = false
},
getrowInfo (id) {
getrowInfo(id) {
let params = {
formCode: 'resi_base_info',
icResiUserId: id
@ -505,18 +677,23 @@ export default {
for (let n in list) {
this.editForm[n] = list[n]
}
this.formList.forEach(item => {
if (item.childGroup && info[item.childGroup.tableName]) {
// let _info = info[item.childGroup.tableName]
// item.childGroup.itemList.forEach(n => {
// n.columnValue = _info[0][n.columnName]
// })
this.tabsList.push(item.childGroup)
}
this.formList.forEach((item) => {
item.columnValue = list[item.columnName]
item.ID = list.ID
if (
item.columnValue == '1' &&
item.itemType === 'radio' &&
item.childGroup
) {
this.tabsList.push(item.childGroup)
}
// if (item.childGroup && info[item.childGroup.tableName]) {
// }
})
this.tabsList.forEach(item => {
this.tabsList.forEach((item) => {
let _info = info[item.tableName]
if (item.supportAdd) {
// console.log('tabsList---333', item.label)
@ -527,7 +704,7 @@ export default {
// console.log('mutiList----555' + index, mutiList, _list)
mutiList.splice(index, 0, {
row: index,
itemList: _list.map(m => {
itemList: _list.map((m) => {
// console.log('itemList---item' + index, m)
return {
...m,
@ -542,7 +719,7 @@ export default {
item.mutiList = mutiList
} else {
if (_info) {
item.itemList.forEach(n => {
item.itemList.forEach((n) => {
n.ID = _info[0].ID
n.columnValue = _info[0][n.columnName]
})
@ -558,7 +735,7 @@ export default {
return this.$message.error('网络错误')
})
},
async getOptionsList (url) {
async getOptionsList(url) {
let options = []
// console.log('getOptionsList----', url)
await this.$http
@ -575,18 +752,21 @@ export default {
})
return options
},
getSearchList () {
getSearchList() {
this.$http
.post('/oper/customize/icform/conditionlist', { formCode: 'resi_base_info', dynamic: true })
.post('/oper/customize/icform/conditionlist', {
formCode: 'resi_base_info',
dynamic: true
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
// console.log('', res.data)
this.searchList = res.data
res.data.forEach(item => {
res.data.forEach((item) => {
if (item.optionSourceType === 'remote') {
this.getOptionsList(item.optionSourceValue).then(res => {
this.getOptionsList(item.optionSourceValue).then((res) => {
item.options = res
})
// console.log('')
@ -598,35 +778,56 @@ export default {
return this.$message.error('网络错误')
})
},
async getFormList (type) {
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
},
async getFormList(type) {
await this.$http
.post('/oper/customize/icform/getcustomerform', { formCode: 'resi_base_info', dynamic: true })
.post('/oper/customize/icform/getcustomerform', {
formCode: 'resi_base_info',
dynamic: true
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取详情成功getFormList')
let { itemList, groupList } = res.data
let { itemList, groupList, formName } = res.data
this.formName = formName
this.activeName = 'group' + res.data.groupList[0].groupId
if (type !== 'edit') {
itemList.forEach(async item => {
itemList.forEach(async (item) => {
if (item.optionSourceType === 'remote') {
await this.getOptionsList(item.optionSourceValue).then(res => {
item.options = res
})
await this.getOptionsList(item.optionSourceValue).then(
(res) => {
item.options = this.getTreeData(res)
}
)
}
})
groupList.forEach(item => {
item.itemList.forEach(async n => {
n.tableName = item.tableName
if (n.optionSourceType === 'remote') {
await this.getOptionsList(n.optionSourceValue).then(res => {
n.options = res
})
}
})
})
}
groupList.forEach((item) => {
item.itemList.forEach(async (n) => {
n.tableName = item.tableName
if (n.optionSourceType === 'remote' && type !== 'edit') {
await this.getOptionsList(n.optionSourceValue).then((res) => {
n.options = this.getTreeData(res)
})
}
})
})
// }
this.formList = itemList
this.tabsList = groupList
}
@ -651,20 +852,21 @@ export default {
font-weight: 500;
color: #666666;
line-height: 20px;
background: #EBECF1;
background: #ebecf1;
border-radius: 2px;
}
.el-tabs__nav-wrap::after, .el-tabs__active-bar {
.el-tabs__nav-wrap::after,
.el-tabs__active-bar {
display: none;
}
.el-tabs__nav-next, .el-tabs__nav-prev {
.el-tabs__nav-next,
.el-tabs__nav-prev {
line-height: 20px;
}
}
.resi-table {
.el-button--text {
text-decoration: underline;
text-decoration: underline;
}
.btn-color-del {
margin-left: 10px;
@ -681,7 +883,11 @@ export default {
margin-top: 20px;
}
.resi-row-btn {
display: flex;
margin-bottom: 13px;
.el-button {
margin-left: 10px;
}
}
.resi-other {
width: 100%;
@ -710,5 +916,4 @@ export default {
margin-top: 20px;
text-align: center;
}
</style>

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

@ -7,7 +7,7 @@
<img src="@/assets/img/shuju/title-tip.png" />
<span>人员情况</span>
</div>
<div class="more">查看更多</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-prop z-1">
@ -72,6 +72,128 @@
</div>
</cpt-card>
</div>
<div class="m-pop" v-if="showedMoreInfo">
<div class="wrap">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>更多信息</span>
</div>
<div class="btn-close" @click="showedMoreInfo=false">
<img src="@/assets/img/shuju/people/close.png" />
</div>
<div class="list">
<div class="item">所属网格商区社区第一网格</div>
<div class="item">所属网格商区社区第一网格</div>
<div class="item">所属网格商区社区第一网格</div>
<div class="item">所属网格商区社区第一网格</div>
<div class="item">所属网格商区社区第一网格</div>
</div>
<div class="line"></div>
<div class="list">
<div class="item">所属网格商区社区第一网格</div>
<div class="item">所属网格商区社区第一网格</div>
<div class="item">所属网格商区社区第一网格</div>
<div class="item">所属网格商区社区第一网格</div>
<div class="item">所属网格商区社区第一网格</div>
</div>
<div class="line"></div>
<div class="list">
<div class="item">所属网格商区社区第一网格</div>
<div class="item">所属网格商区社区第一网格</div>
<div class="item">所属网格商区社区第一网格</div>
<div class="item">所属网格商区社区第一网格</div>
<div class="item">所属网格商区社区第一网格</div>
</div>
<div class="line"></div>
<div class="list">
<div class="item">所属网格商区社区第一网格</div>
<div class="item">所属网格商区社区第一网格</div>
<div class="item">所属网格商区社区第一网格</div>
<div class="item">所属网格商区社区第一网格</div>
<div class="item">所属网格商区社区第一网格</div>
</div>
</cpt-card>
</div>
</div>
<div class="m-relation">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>家庭关系</span>
</div>
<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>
<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-text">
<span class="rel-call">妻子</span>
<span class="rel-name">西门吹雪</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-text">
<span class="rel-call">妻子</span>
<span class="rel-name">西门吹雪</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-text">
<span class="rel-call">妻子</span>
<span class="rel-name">西门吹雪</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-text">
<span class="rel-call">妻子</span>
<span class="rel-name">西门吹雪</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-text">
<span class="rel-call">妻子</span>
<span class="rel-name">西门吹雪</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-text">
<span class="rel-call">妻子</span>
<span class="rel-name">西门吹雪</span>
</div>
</div>
</div>
</cpt-card>
</div>
</div>
<div class="g-r"></div>
</div>
@ -86,26 +208,7 @@ export default {
name: 'HomeMap',
data () {
return {
centerPoint: [],//
zoom: 14,//14
minZoom: 1,//
orgData: {},//
orgId: '',
orgLevel: '',
subAgencyArray: [],//
selPolygonId: '',//id
selPolygon: {},
//
name: "",
//
runNum: 0,
runAgency: [],
showedMoreInfo: false
}
},

20
src/views/modules/visual/cpts/card.vue

@ -1,15 +1,15 @@
<template>
<div class="m-card">
<div class="wrap">
<img src="@/assets/img/shuju/card/l-t.png" class="corner corner-1" />
<img src="@/assets/img/shuju/card/r-t.png" class="corner corner-2" />
<img src="@/assets/img/shuju/card/r-b.png" class="corner corner-3" />
<img src="@/assets/img/shuju/card/l-b.png" class="corner corner-4" />
<div class="line line-t"></div>
<div class="line line-l"></div>
<div class="line line-r"></div>
<div class="line line-b"></div>
<div class="cnt">
<div class="card-wrap">
<img src="@/assets/img/shuju/card/l-t.png" class="card-corner card-corner-1" />
<img src="@/assets/img/shuju/card/r-t.png" class="card-corner card-corner-2" />
<img src="@/assets/img/shuju/card/r-b.png" class="card-corner card-corner-3" />
<img src="@/assets/img/shuju/card/l-b.png" class="card-corner card-corner-4" />
<div class="card-line card-line-t"></div>
<div class="card-line card-line-l"></div>
<div class="card-line card-line-r"></div>
<div class="card-line card-line-b"></div>
<div class="card-cnt">
<slot></slot>
</div>
</div>

60
src/views/modules/workSys/mapConfig.vue

@ -22,11 +22,11 @@
type="primary"
icon="el-icon-edit"
@click="handleEditPolygon">{{method==='mEditPolygon'?'取消绘制':'重新绘制'}}</el-button>
<el-button v-if="showBtn&&hasPolygon"
<!-- <el-button v-if="showBtn&&hasPolygon"
style="margin-left:10px"
type="primary"
icon="el-icon-delete"
@click="handleDelPolygon">删除区域</el-button>
@click="handleDelPolygon">删除区域</el-button> -->
</div>
<div class="div_back">
@ -47,9 +47,6 @@
<script>
import 'ol/ol.css'
import { Map, View } from 'ol'
import { ZoomSlider, Zoom } from 'ol/control.js';
import ImageLayer from 'ol/layer/Image.js';
import Static from 'ol/source/ImageStatic.js';
import TileLayer from 'ol/layer/Tile.js';
import XYZ from 'ol/source/XYZ.js';
import VectorLayer from 'ol/layer/Vector.js';
@ -64,7 +61,6 @@ import Draw from 'ol/interaction/Draw.js';
import { mapGetters } from "vuex";
import { Loading } from 'element-ui'; //Loading
import { requestPost } from "@/js/dai/request";
import { transform } from 'ol/proj'
import { altKeyOnly, click, pointerMove } from 'ol/events/condition';
@ -192,7 +188,7 @@ const vueGis = {
},
//
// isRefreshView:
async refreshMap (isRefreshView) {
//
await this.loadOrgData()
@ -326,20 +322,24 @@ const vueGis = {
//feature
selectFeature (e) {
console.log(e)
this.selAgencyId = e.selected[0].id_
this.subAgencyArray.forEach((element, index) => {
if (element.id === e.selected[0].id_) {
this.selAgencyIndex = index
this.orgChange(index)
}
// console.log(e)
if (this.method === undefined || this.method === '') {
this.selAgencyId = e.selected[0].id_
this.subAgencyArray.forEach((element, index) => {
if (element.id === e.selected[0].id_) {
this.selAgencyIndex = index
this.orgChange(index)
}
});
}
});
},
//
toSubAgency (e) {
console.log(e)
if (this.method != 'mAddPolygon' && this.level != 'neighborHood') {
//
this.subAgencyArray.forEach(item => {
@ -580,6 +580,7 @@ const vueGis = {
type: "Polygon"
});
map.addInteraction(draw);
draw.on('drawend', feature => {
this.polygonCoor = feature.feature.values_.geometry.flatCoordinates
@ -590,10 +591,28 @@ const vueGis = {
if (this.polygonCoor.length > 0) {
coorString = coorString.substring(0, coorString.length - 1)
}
console.log(coorString)
if (this.method === 'mEditPolygon') {
this.$confirm("是否确认覆盖原有区域?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.addPolygon(coorString)
})
.catch(err => {
this.loadPolygon(this.subAgencyArray)
});
} else {
this.addPolygon(coorString)
}
this.method = ""
map.removeInteraction(draw);
this.addPolygon(coorString)
});
},
@ -625,6 +644,7 @@ const vueGis = {
},
//
async delPolygon () {
const url = "/gov/org/agency/mapdelarea"
@ -735,9 +755,9 @@ export default vueGis;
.div_map {
width: 100%;
}
</style>
</style>
<style>
.ol-overlaycontainer-stopevent {
display: none;
}
</style>
</style>

Loading…
Cancel
Save