Browse Source

房屋管理接口调整

feature
jiangyy 3 years ago
parent
commit
66fabdd10f
  1. 16
      src/views/modules/base/community/buildTable.vue
  2. 4
      src/views/modules/base/community/community.vue
  3. 263
      src/views/modules/base/community/communityDetail copy.vue
  4. 575
      src/views/modules/base/community/communityForm copy.vue
  5. 13
      src/views/modules/base/community/communityForm.vue
  6. 14
      src/views/modules/base/community/communityTable.vue
  7. 303
      src/views/modules/base/community/roomDetail copy.vue
  8. 473
      src/views/modules/base/community/roomForm copy.vue
  9. 2
      src/views/modules/base/community/roomForm.vue
  10. 14
      src/views/modules/base/community/roomTable.vue
  11. 2
      src/views/modules/communityService/dqfwzx/cpts/edit.vue
  12. 2
      src/views/modules/communityService/dqfwzx/cpts/order.vue
  13. 258
      src/views/modules/communityService/shzz/cpts/edit.vue
  14. 2
      src/views/modules/communityService/sqzzz/cpts/edit.vue

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

@ -336,11 +336,11 @@ export default {
BuildDetail
},
async mounted () {
this.displayedBaobiaoBtn = await this.$refs.baobiao.existsTemplate({
elseParams: {
categoryKeys: ['house_info'], categoryKey: 'house_info',
}
});
// this.displayedBaobiaoBtn = await this.$refs.baobiao.existsTemplate({
// elseParams: {
// categoryKeys: ['house_info'], categoryKey: 'house_info',
// }
// });
},
computed: {
tableHeight () {
@ -404,7 +404,7 @@ export default {
type: 'building',
}
let url = '/gov/org/house/update-sort'
let url = '/actual/base/communityHouse/updateHouseSort'
const { data, code, msg } = await requestPost(url, params)
@ -449,7 +449,7 @@ export default {
console.log(this.agencyObj)
const url = "/gov/org/building/buildinglist"
const url = "/actual/base/communityBuilding/listBuildings"
let params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
@ -649,7 +649,7 @@ export default {
}
},
async detail (row) {
const url = "/gov/org/houseInformation/getBuildingDetail/" + row.buildingId
const url = "/actual/base/communityBuilding/getBuildingDetail/" + row.buildingId
const { data, code, msg } = await requestPost(url)

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

@ -446,7 +446,7 @@ export default {
this.selAgencyId = this.selAgencyId ? this.selAgencyId : user.agencyId
}
const url = "/gov/org/icneighborhood/neighborhood-options";
const url = "/actual/base/communityQuarters/listQuartersOptions";
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page"
let params = {
gridId: this.selGridId,
@ -576,7 +576,7 @@ export default {
}
},
async loadTree (isRefresh) {
const url = "/gov/org/building/treelist"
const url = "/actual/base/communityBuilding/listBuildingTree"
let params = {}
const { data, code, msg } = await requestPost(url, params)

263
src/views/modules/base/community/communityDetail copy.vue

@ -1,263 +0,0 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<div v-if="initLoading"
class="m-detail-main">
<div class="m-info">
<div class="m-info-prop">
<span class="u-info-title-2">所属组织</span>
<span>{{ dataForm.agencyName }}</span>
</div>
<div class="m-info-prop">
<span class="u-info-title-2">所属网格</span>
<span>{{ dataForm.gridName?dataForm.gridName:'--' }}</span>
</div>
<div class="m-info-prop">
<span class="u-info-title-2">小区名称</span>
<span>{{ dataForm.neighborHoodName}}</span>
</div>
<div class="m-info-prop">
<span class="u-info-title-2">小区编码</span>
<span>{{ dataForm.coding?dataForm.coding:'--'}}</span>
</div>
<div v-if="dataForm.qrcodeUrl"
style="display: flex;flex-direction: column;">
<img style="margin-left: 70px;width: 200px;"
:src="dataForm.qrcodeUrl">
<a style="margin-left: 80px"
:href="dataForm.qrcodeUrl"
target="_blank">下载</a>
</div>
<div class="m-info-prop">
<span class="u-info-title-2">关联物业</span>
<span>{{ dataForm.propertyShow?dataForm.propertyShow:'--'}}</span>
</div>
<div class="m-info-prop">
<span class="u-info-title-2">实有楼栋</span>
<span>{{dataForm.realBuilding?dataForm.realBuilding:0 }}</span>
</div>
<div class="m-info-prop">
<span class="u-info-title-2">详细地址</span>
<span>{{ dataForm.address }}</span>
</div>
<div class="m-info-prop">
<span class="u-info-title-2">地图位置</span>
<div class="div_map">
<div id="app_detail_community"></div>
</div>
</div>
</div>
</div>
</div>
<div class="div-btn">
<el-button size="small"
@click="handleCancle"> </el-button>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import daiMap from "@/utils/dai-map";
var map
var search
var markers
var infoWindowList
let loading //
export default {
data () {
return {
btnDisable: false,
initLoading: false,
dataForm: {
neighborHoodName: '', // 50
agencyId: '', // ID
agencyName: '',
gridId: '', //ID
propertyId: '', //
address: '', //
remark: '', //500
location: '', //
longitude: '', //
latitude: '', //
realBuilding: 0,
coding: '',
sysCoding: ''
},
}
},
components: {},
mounted () {
},
methods: {
handleCancle () {
this.diaDestroy()
this.$emit('diaDetailClose')
},
diaDestroy () {
if (map) {
// map.destroy()
}
},
async initForm (row) {
this.dataForm = JSON.parse(JSON.stringify(row))
let propertyShowList = []
this.dataForm.propertyList.forEach(element => {
propertyShowList.push(element.name)
});
this.dataForm.propertyShow = propertyShowList.join(',')
this.initLoading = true
let { latitude, longitude } = this.$store.state.user;
console.log('lat' + latitude + ',lon' + longitude)
if (this.dataForm.latitude && this.dataForm.longitude) {
latitude = this.dataForm.latitude
longitude = this.dataForm.longitude
}
if (!latitude || latitude == "" || latitude == "0") {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
this.$nextTick(() => {
if (!map) {
this.initMap(latitude, longitude)
} else {
map.setCenter(latitude, longitude);
map.setMarker(latitude, longitude);
}
})
},
// init
initMap (latitude, longitude) {
map = new daiMap(
document.getElementById("app_detail_community"),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45, //
}
);
// //
// map.on("dragend", (e) => {
// this.handleMoveCenter(e);
// });
map.setCenter(latitude, longitude);
map.setMarker(latitude, longitude);
},
resetData () {
this.dataForm = {
neighborHoodName: '', // 50
agencyId: '', // ID
agencyName: '',
gridId: '', //ID
propertyId: '', //
address: '', //
remark: '', //500
location: '', //
longitude: '', //
latitude: '', //
realBuilding: 0,
coding: '',
sysCoding: ''
}
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule () {
return {
neighborHoodName: [
{ required: true, message: '小区名称不能为空', trigger: 'blur' },
{
min: 1,
max: 50,
message: '小区名称长度在 1 到 50个字符',
trigger: 'blur'
}
],
agencyId: [
{ required: true, message: '所属组织不能为空', trigger: 'blur' }
],
gridId: [
{ required: true, message: '所属网格不能为空', trigger: 'blur' }
],
coding: [
{ required: true, message: '小区编码不能为空', trigger: 'blur' }
],
address: [
{ required: true, message: '详细地址不能为空', trigger: 'blur' }
],
longitude: [
{ required: true, message: '坐标不能为空', trigger: 'blur' }
]
}
},
propertyRule () {
name: [
{ required: true, message: '物业名称不能为空', trigger: 'blur' }
// { min: 1, max: 50, message: ' 1 50', trigger: 'blur' }
]
}
},
props: {}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/management/detail-main.scss";
</style>

575
src/views/modules/base/community/communityForm copy.vue

@ -1,575 +0,0 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<div v-show="!propertyFormShow">
<el-form ref="ref_form"
:inline="true"
:model="dataForm"
:rules="dataRule"
:disabled="formType === 'detail'"
class="form">
<el-form-item label="所属组织"
label-width="150px"
style="display: block">
<span>{{ dataForm.agencyName }}</span>
</el-form-item>
<el-form-item label="所属网格"
prop="gridId"
label-width="150px"
style="display: block">
<el-select class="item_width_1"
v-model="dataForm.gridId"
placeholder="请选择"
clearable>
<el-option v-for="item in gridList"
:key="item.gridId"
:label="item.gridName"
:value="item.gridId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="小区名称"
prop="neighborHoodName"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入小区名称"
v-model="dataForm.neighborHoodName">
</el-input>
</el-form-item>
<el-form-item label="小区编码"
prop="coding"
label-width="150px"
style="display: block">
<el-input class="item_width_2"
maxlength="50"
placeholder="请输入楼栋编码"
v-model="dataForm.coding">
</el-input>
<el-button style="margin-left: 10px"
type="primary"
size="small"
@click="handleCode">生成</el-button>
</el-form-item>
<div v-if="dataForm.qrcodeUrl"
style="display: flex;flex-direction: column;">
<img style="margin-left: 70px;width: 200px;"
:src="dataForm.qrcodeUrl">
<a style="margin-left: 80px"
:href="dataForm.qrcodeUrl"
target="_blank">下载</a>
</div>
<el-form-item label="关联物业"
prop="propertyId"
label-width="150px"
style="display: block">
<el-select class="item_width_2"
v-model="dataForm.propertyId"
placeholder="请选择"
filterable
clearable>
<el-option v-for="item in propertyList"
:key="item.propertyId"
:label="item.propertyName"
:value="item.propertyId">
</el-option>
</el-select>
<el-button style="margin-left: 10px"
type="primary"
size="small"
@click="handleAddProperty">添加物业</el-button>
</el-form-item>
<el-form-item label="实有楼栋"
style="display: block"
prop="realBuilding"
label-width="150px">
<el-input-number class="item_width_4"
v-model="dataForm.realBuilding"
:min="0"
:max="9999"
label="总户数"></el-input-number>
</el-form-item>
<el-form-item label="地图位置"
prop="longitude"
label-width="150px"
style="display: block">
<div style="width: 500px">
<el-select v-model="searchValue"
filterable
style="width: 500px"
remote
:reserve-keyword="true"
placeholder="请输入关键词"
:remote-method="remoteMethod"
:loading="loading">
<el-option v-for="(item,index) in searchOptions"
@click.native="handleClickKey(index)"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<div id="app_community"
class="div_map"></div>
</div>
</el-form-item>
<el-form-item label="详细地址"
prop="address"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入详细地址"
v-model="dataForm.address">
</el-input>
</el-form-item>
<el-form-item label="备注"
prop="remark"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
type="textarea"
maxlength="500"
show-word-limit
:rows="3"
placeholder="请输入备注,不超过500字"
v-model="dataForm.remark"></el-input>
</el-form-item>
</el-form>
</div>
<div v-show="propertyFormShow">
<el-form :inline="false"
:model="propertyForm"
:rules="propertyRule"
class="form">
<el-form-item label="物业名称"
prop="name"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="10"
placeholder="请输入小区名称"
v-model="propertyForm.name">
</el-input>
</el-form-item>
</el-form>
</div>
</div>
<div class="div_btn">
<el-button size="small"
@click="handleCancle"> </el-button>
<el-button size="small"
v-if="formType != 'detail'"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import daiMap from "@/utils/dai-map";
var map
var search
var markers
var infoWindowList
let loading //
export default {
data () {
return {
formType: 'add', // addeditdetail
searchOptions: [],
searchValue: '',
resultList: [],
loading: false,
gridList: [],
propertyList: [],
btnDisable: false,
neighborHoodId: '', //ID
dataForm: {
neighborHoodName: '', // 50
agencyId: '', // ID
agencyName: '',
gridId: '', //ID
propertyId: '', //
address: '', //
remark: '', //500
location: '', //
longitude: '', //
latitude: '', //
realBuilding: 0,
coding: '',
sysCoding: ''
},
propertyFormShow: false,
propertyForm: {
name: ''
},
keyWords: '',
agencyObj: {}
}
},
components: {},
mounted () {
},
methods: {
async initForm (type, row, agencyObj) {
this.$refs.ref_form.resetFields();
this.agencyObj = agencyObj
let { latitude, longitude } = this.$store.state.user;
this.formType = type
if (row) {
this.dataForm = JSON.parse(JSON.stringify(row))
this.dataForm.neighborHoodId = this.dataForm.id
this.neighborHoodId = this.dataForm.neighborHoodId
} else {
this.dataForm.latitude = latitude
this.dataForm.longitude = longitude
}
if (!map) {
this.initMap(this.dataForm.latitude, this.dataForm.longitude);
} else {
map.setCenter(this.dataForm.latitude, this.dataForm.longitude);
map.setMarker(this.dataForm.latitude, this.dataForm.longitude);
}
await this.loadAgency()
await this.loadGrid()
await this.loadProperty()
},
// init
initMap (latitude, longitude) {
map = new daiMap(
document.getElementById("app_community"),
{ latitude, longitude },
{
zoom: 16.2, //
pitch: 43.5, //
rotation: 45, //
}
);
//
map.on("dragend", (e) => {
this.handleMoveCenter(e);
});
map.setCenter(latitude, longitude);
map.setMarker(latitude, longitude);
},
async handleMoveCenter () {
//
const { lat, lng } = map.getCenter();
this.dataForm.latitude = lat;
this.dataForm.longitude = lng;
map.setMarker(lat, lng);
let { msg, data } = await map.getAddress(lat, lng);
if (msg == "success") {
this.dataForm.address = data.address
this.searchValue = data.address
this.searchOptions = []
}
},
async remoteMethod (query) {
if (query !== '') {
this.loading = true;
const { msg, data } = await map.searchNearby(query);
this.loading = false;
this.resultList = []
if (msg == "success" && data.resultList && data.resultList.length > 0) {
if (data.resultList && data.resultList.length > 0) {
this.resultList = data.resultList
this.searchOptions = this.resultList.map(item => {
return { value: `${item.hotPointID}`, label: `${item.address + item.name}` };
});
}
} else {
this.searchOptions = [
{
value: '0',
label: '未检索到结果'
}
]
}
} else {
this.searchOptions = [];
}
},
handleClickKey (index) {
let selPosition = this.resultList[index]
let lonlat = selPosition.lonlat.split(" ")
map.setCenter(lonlat[1], lonlat[0]);
map.setMarker(lonlat[1], lonlat[0]);
this.dataForm.latitude = lonlat[1];
this.dataForm.longitude = lonlat[0];
this.dataForm.address = selPosition.address + selPosition.name
},
async handleCode () {
if (!this.dataForm.gridId) return this.$message.error('请选择网格')
const { data, code, msg } = await requestPost(
"/gov/org/houseInformation/getNeighborHoodCoding/" + this.dataForm.gridId);
if (msg == "success" && code == 0) {
this.dataForm.coding = data.coding
this.dataForm.sysCoding = data.sysCoding
}
},
//
async loadAgency () {
const url = '/epmetuser/customerstaff/staffbasicinfo'
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.dataForm.agencyId = data.agencyId
this.dataForm.agencyName = data.agencyName
} else {
this.$message.error(msg)
}
},
//
async loadGrid () {
const url = '/gov/org/grid/allgridsnopermission '
// const url = "https://epmet-dev.elinkservice.cn:7082/api/apimock-v2/95518686fa128a53f64c678906848062/gov/org/grid/allgrids"
let params = {
agencyId: this.dataForm.agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.gridList = data
} else {
this.$message.error(msg)
}
},
//
async loadProperty () {
const url = '/gov/org/propertymanagement/list'
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/propertymanagement/list"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.propertyList = data
} else {
this.$message.error(msg)
}
},
handleAddProperty () {
this.propertyForm.name = ''
this.propertyFormShow = true
},
async handleComfirm () {
if (this.propertyFormShow) {
this.addProperty()
} else {
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'
// url = "http://yapi.elinkservice.cn/mock/245/gov/org/neighborhood/neighborhoodadd"
} else {
url = '/gov/org/neighborhood/neighborhoodupdate'
this.dataForm.neighborHoodId = this.neighborHoodId
}
const { data, code, msg } = await requestPost(url, this.dataForm)
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功'
})
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 = {
name: this.propertyForm.name
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功'
})
this.dataForm.propertyId = data.propertyId
this.propertyForm.name = ''
this.propertyFormShow = false
this.loadProperty()
} else {
this.$message.error(msg)
}
},
handleCancle () {
if (this.propertyFormShow) {
this.propertyForm.name = ''
this.propertyFormShow = false
} else {
this.resetData()
this.$emit('dialogCancle')
}
},
resetData () {
this.searchValue = ''
this.searchOptions = []
this.resultList = []
this.neighborHoodId = '' //ID
this.dataForm = {
neighborHoodName: '', // 50
agencyId: '', // ID
agencyName: '',
gridId: '', //ID
propertyId: '', //
address: '', //
remark: '', //500
location: '', //
longitude: '', //
latitude: '', //
realBuilding: 0,
coding: '',
sysCoding: ''
}
this.propertyFormShow = false
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule () {
return {
neighborHoodName: [
{ required: true, message: '小区名称不能为空', trigger: 'blur' },
{
min: 1,
max: 50,
message: '小区名称长度在 1 到 50个字符',
trigger: 'blur'
}
],
agencyId: [
{ required: true, message: '所属组织不能为空', trigger: 'blur' }
],
gridId: [
{ required: true, message: '所属网格不能为空', trigger: 'blur' }
],
coding: [
{ required: true, message: '小区编码不能为空', trigger: 'blur' }
],
address: [
{ required: true, message: '详细地址不能为空', trigger: 'blur' }
],
longitude: [
{ required: true, message: '坐标不能为空', trigger: 'blur' }
]
}
},
propertyRule () {
name: [
{ required: true, message: '物业名称不能为空', trigger: 'blur' }
// { min: 1, max: 50, message: ' 1 50', trigger: 'blur' }
]
}
},
props: {}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManageForm.scss";
</style>

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

@ -393,8 +393,7 @@ export default {
},
//
async loadProperty () {
const url = '/gov/org/propertymanagement/list'
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/propertymanagement/list"
const url = '/actual/base/communityPropertyManagement/listPropertyManagements'
let params = {}
const { data, code, msg } = await requestPost(url, params)
@ -438,10 +437,10 @@ export default {
let url = ''
if (this.formType === 'add') {
url = '/gov/org/neighborhood/neighborhoodadd'
// url = "http://yapi.elinkservice.cn/mock/245/gov/org/neighborhood/neighborhoodadd"
url = '/actual/base/communityQuarters/saveCommunityQuarters'
} else {
url = '/gov/org/neighborhood/neighborhoodupdate'
url = '/actual/base/communityQuarters/updateCommunityQuarters'
this.dataForm.neighborHoodId = this.neighborHoodId
}
@ -470,8 +469,8 @@ export default {
})
return false
}
const url = '/gov/org/propertymanagement/add'
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/propertymanagement/add"
const url = '/actual/base/communityPropertyManagement/savePropertyManagement'
let params = {
name: this.propertyForm.name
}

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

@ -387,11 +387,11 @@ export default {
},
async mounted () {
this.customerId = localStorage.getItem('customerId')
this.displayedBaobiaoBtn = await this.$refs.baobiao.existsTemplate({
elseParams: {
categoryKeys: ['house_info'], categoryKey: 'house_info',
}
});
// this.displayedBaobiaoBtn = await this.$refs.baobiao.existsTemplate({
// elseParams: {
// categoryKeys: ['house_info'], categoryKey: 'house_info',
// }
// });
},
computed: {
tableHeight () {
@ -452,7 +452,7 @@ export default {
}
}
const url = "/gov/org/neighborhood/neighborhoodlist"
const url = "/actual/base/communityQuarters/listQuarters"
let params = {
pageSize: this.pageSize,
@ -522,7 +522,7 @@ export default {
})
},
async detail (row) {
const url = "/gov/org/houseInformation/neighborhoodDetail/" + row.neighborHoodId
const url = "/actual/base/communityQuarters/getQuartersDetail/" + row.neighborHoodId
const { data, code, msg } = await requestPost(url)

303
src/views/modules/base/community/roomDetail copy.vue

@ -1,303 +0,0 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<div class="div_tuomin">
<el-button v-if="view_real_data"
size="mini"
class="diy-button--search"
@click="handleTuomin">显示脱敏信息</el-button>
</div>
<div v-if="initLoading"
class="m-detail-main">
<div class="m-info">
<div class="m-info-prop">
<span class="u-info-title-2">所属楼栋</span>
<span>{{ agencyObj.neighborHoodName }}-{{agencyObj.label}}</span>
</div>
<div class="m-info-prop">
<span class="u-info-title-2">单元号</span>
<span>{{ dataForm.unitName?dataForm.unitName:'--' }}</span>
</div>
<div class="m-info-prop">
<span class="u-info-title-2">门牌号</span>
<span>{{ dataForm.doorName}}</span>
</div>
<div class="m-info-prop">
<span class="u-info-title-2">房屋编码</span>
<span>{{ dataForm.coding?dataForm.coding:'--'}}</span>
</div>
<div v-if="dataForm.houseQrcodeUrl"
style="display: flex;flex-direction: column;">
<img style="margin-left: 70px;width: 200px;"
:src="dataForm.houseQrcodeUrl">
<a style="margin-left: 80px"
:href="dataForm.houseQrcodeUrl"
target="_blank">下载</a>
</div>
<div class="m-info-prop">
<span class="u-info-title-2">房屋类型</span>
<span>{{dataForm.houseTypeName?dataForm.houseTypeName:'--' }}</span>
</div>
<div class="m-info-prop">
<span class="u-info-title-2">房屋用途</span>
<span>{{dataForm.purposeName?dataForm.purposeName:'--' }}</span>
</div>
<div class="m-info-prop">
<span class="u-info-title-2">房屋状态</span>
<span>{{dataForm.rentName?dataForm.rentName:'--' }}</span>
</div>
<div class="m-info-prop">
<span class="u-info-title-2">房主姓名</span>
<span>{{dataForm.ownerName?dataForm.ownerName:'--' }}</span>
</div>
<div class="m-info-prop">
<span class="u-info-title-2">联系方式</span>
<span>{{dataForm.showOwnerPhone?dataForm.showOwnerPhone:'--' }}</span>
</div>
<div class="m-info-prop">
<span class="u-info-title-2">房主身份证</span>
<span>{{dataForm.showOwnerIdCard?dataForm.showOwnerIdCard:'--' }}</span>
</div>
<div class="m-info-prop">
<span class="u-info-title-2">备注</span>
<span>{{dataForm.remark?dataForm.remark:'--' }}</span>
</div>
</div>
</div>
</div>
<div class="div-btn">
<el-button size="small"
@click="handleCancle"> </el-button>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost, requestGet } from '@/js/dai/request'
let loading //
export default {
data () {
return {
formType: 'add', // addeditdetail
btnDisable: false,
initLoading: false,
unitList: [],
houseId: '', //ID
houseType: '1',
purpose: '1',
rentFlag: 0,
dataForm: {
neighborHoodId: '', // ID
buildingId: '',//ID
buildingUnitId: '',//ID
doorName: '',//
houseType: '',//
purpose: '',//
rentFlag: 0,//10 12 0
ownerPhone: '', //
ownerName: '', //
ownerIdCard: '', //
remark: '',
// realPerson: 0,
coding: '',
sysCoding: ''
},
keyWords: '',
agencyObj: {},
}
},
components: {},
mounted () {
},
methods: {
handleCancle () {
// this.diaDestroy()
this.$emit('diaDetailClose')
},
diaDestroy () {
if (map) {
map.destroy()
}
},
async initForm (row, agencyObj) {
// this.dataForm = JSON.parse(JSON.stringify(row))
this.agencyObj = agencyObj
this.houseId = row.houseId
await this.loadHouseInfo()
this.initLoading = true
// this.$refs.ref_form.resetFields();
// this.agencyObj = agencyObj
// this.formType = type
// console.log('agencyObj-----', agencyObj)
// if (row) {
// this.houseId = row.houseId
// await this.loadHouseInfo()
// } else {
// this.dataForm.neighborHoodId = this.agencyObj.neighborHoodId
// this.dataForm.buildingId = this.agencyObj.id
// }
// await this.loadUnitList()
},
async handleTuomin () {
const url = "/data/aggregator/epmetuser/detailByType";
const { data, code, msg } = await requestPost(url, {
id: this.houseId,
type: "checkHouse",
});
if (code === 0) {
this.$set(this.dataForm, 'showOwnerPhone', data.mobile)
this.$set(this.dataForm, 'showOwnerIdCard', data.idCard)
} else {
this.$message.error(msg);
}
},
async loadHouseInfo () {
const url = "/gov/org/ichouse/" + this.houseId
const { data, code, msg } = await requestGet(url)
if (code === 0) {
// debugger
this.dataForm = { ...data }
this.houseType = this.dataForm.houseType
this.purpose = this.dataForm.purpose
this.rentFlag = parseInt(this.dataForm.rentFlag)
} else {
this.$message.error(msg)
}
},
resetData () {
this.houseId = '' //ID
this.houseType = '1'
this.purpose = '1'
this.rentFlag = 0
this.dataForm = {
neighborHoodId: '', // ID
buildingId: '',//ID
buildingUnitId: '',//ID
doorName: '',//
houseType: '1',//
purpose: '1',//
rentFlag: 0,//10
ownerPhone: '', //
ownerName: '', //
ownerIdCard: '', //
remark: '', //
coding: '',
sysCoding: ''
}
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule () {
return {
buildingUnitId: [
{ required: true, message: '所属单元不能为空', trigger: 'blur' },
],
doorName: [
{ required: true, message: '门牌号不能为空', trigger: 'blur' }
],
coding: [
{ required: true, message: '房屋编码不能为空', trigger: 'blur' }
],
houseType: [
{ required: true, message: '房屋类型不能为空', trigger: 'blur' }
],
purpose: [
{ required: true, message: '房屋用途不能为空', trigger: 'blur' }
],
rentFlag: [
{ required: true, message: '是否出租不能为空', trigger: 'blur' }
],
ownerPhone: [
{ required: false }
],
ownerName: [
{ required: false }
],
ownerIdCard: [
{ required: false }
],
remark: [
{ required: false }
],
}
},
},
props: {
view_real_data: {//
type: Boolean,
default: false,
}
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/management/detail-main.scss";
.div_tuomin {
position: absolute;
top: 0;
right: 40px;
z-index: 1000;
}
</style>

473
src/views/modules/base/community/roomForm copy.vue

@ -1,473 +0,0 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<el-form ref="ref_form"
:inline="false"
:model="dataForm"
:rules="dataRule"
:disabled="formType === 'detail'"
class="form">
<el-form-item label="所属楼栋"
label-width="150px"
style="display: block">
<span>{{ agencyObj.neighborHoodName }}-{{agencyObj.label}}</span>
</el-form-item>
<el-form-item label="单元号"
prop="buildingUnitId"
label-width="150px"
style="display: block">
<el-select class="item_width_1"
v-model="dataForm.buildingUnitId"
placeholder="请选择"
clearable>
<el-option v-for="item in unitList"
:key="item.id"
:label="item.unitName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="门牌号"
prop="doorName"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
placeholder="请输入门牌号"
v-model="dataForm.doorName">
</el-input>
</el-form-item>
<el-form-item v-if="formType != 'detail'"
label="房屋编码"
prop="coding"
label-width="150px"
style="display: block">
<el-input class="item_width_2"
maxlength="50"
placeholder="请输入楼栋编码"
v-model="dataForm.coding">
</el-input>
<el-button style="margin-left: 10px"
type="primary"
size="small"
@click="handleCode">生成</el-button>
</el-form-item>
<div v-if="formType === 'detail'">
<el-form-item label="房屋编码"
prop="houseCode"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="30"
v-model="dataForm.houseCode">
</el-input>
</el-form-item>
<div v-if="dataForm.houseQrcodeUrl"
style="display: flex;flex-direction: column;">
<img style="margin-left: 70px;width: 200px;"
:src="dataForm.houseQrcodeUrl">
<a style="margin-left: 80px"
:href="dataForm.houseQrcodeUrl"
target="_blank">下载</a>
</div>
</div>
<!-- <el-form-item label="居住人数"
style="display: block"
prop="realPerson"
label-width="150px">
<el-input-number class="item_width_4"
v-model="dataForm.realPerson"
:min="0"
:max="9999"
label="居住人数"></el-input-number>
</el-form-item> -->
<el-form-item label="房屋类型"
prop="houseType"
label-width="150px"
style="display: block">
<el-radio-group v-model="houseType">
<el-radio :label="'1'">楼房</el-radio>
<el-radio :label="'2'">平房</el-radio>
<el-radio :label="'3'">别墅</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="房屋用途"
prop="purpose"
label-width="150px"
style="display: block">
<el-radio-group v-model="purpose">
<el-radio :label="'1'">住宅</el-radio>
<el-radio :label="'2'">商业</el-radio>
<el-radio :label="'3'">办公</el-radio>
<el-radio :label="'4'">工业</el-radio>
<el-radio :label="'5'">仓储</el-radio>
<el-radio :label="'6'">商住混用</el-radio>
<el-radio :label="'7'">其他</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="房屋状态"
prop="rentFlag"
label-width="150px"
style="display: block">
<el-radio-group v-model="rentFlag">
<el-radio :label="1">出租</el-radio>
<el-radio :label="2">闲置</el-radio>
<el-radio :label="0">自住</el-radio>
<el-radio :label="3">未出售</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="房主姓名"
prop="ownerName"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="30"
placeholder="请输入房主姓名"
v-model="dataForm.ownerName">
</el-input>
</el-form-item>
<el-form-item label="联系方式"
prop="ownerPhone"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
type='number'
placeholder="请输入联系方式"
v-model="dataForm.ownerPhone">
</el-input>
</el-form-item>
<el-form-item label="房主身份证"
prop="ownerIdCard"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
placeholder="请输入房主身份证"
v-model="dataForm.ownerIdCard">
</el-input>
</el-form-item>
<el-form-item label="备注"
prop="remark"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="30"
placeholder="请输入备注"
v-model="dataForm.remark">
</el-input>
</el-form-item>
</el-form>
</div>
<div class="div_btn">
<el-button size="small"
@click="handleCancle"> </el-button>
<el-button size="small"
v-if="formType != 'detail'"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost, requestGet } from '@/js/dai/request'
let loading //
export default {
data () {
return {
formType: 'add', // addeditdetail
btnDisable: false,
unitList: [],
houseId: '', //ID
houseType: '1',
purpose: '1',
rentFlag: 0,
dataForm: {
neighborHoodId: '', // ID
buildingId: '',//ID
buildingUnitId: '',//ID
doorName: '',//
houseType: '',//
purpose: '',//
rentFlag: 0,//10 12 0
ownerPhone: '', //
ownerName: '', //
ownerIdCard: '', //
remark: '',
// realPerson: 0,
coding: '',
sysCoding: ''
},
keyWords: '',
agencyObj: {},
}
},
components: {},
mounted () {
},
methods: {
async initForm (type, row, agencyObj) {
this.$refs.ref_form.resetFields();
this.agencyObj = agencyObj
this.formType = type
console.log('agencyObj-----', agencyObj)
if (row) {
this.houseId = row.houseId
await this.loadHouseInfo()
// this.dataForm = JSON.parse(JSON.stringify(row))
// this.houseId = this.dataForm.houseId
// this.dataForm.buildingUnitId = this.dataForm.unitNumKey
// this.dataForm = { ... this.dataForm }
// this.houseType = this.dataForm.houseTypeKey
// this.purpose = this.dataForm.purposeKey
// this.rentFlag = parseInt(this.dataForm.rentFlagKey)
} else {
this.dataForm.neighborHoodId = this.agencyObj.neighborHoodId
this.dataForm.buildingId = this.agencyObj.id
}
await this.loadUnitList()
},
async loadHouseInfo () {
const url = "/gov/org/ichouse/" + this.houseId
const { data, code, msg } = await requestGet(url)
if (code === 0) {
// debugger
this.dataForm = { ...data }
this.houseType = this.dataForm.houseType
this.purpose = this.dataForm.purpose
this.rentFlag = parseInt(this.dataForm.rentFlag)
} else {
this.$message.error(msg)
}
},
//
async loadUnitList () {
const url = '/gov/org/building/buildingunitlist'
let params = {
buildingId: this.dataForm.buildingId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.unitList = data
} else {
this.$message.error(msg)
}
},
async handleCode () {
if (!this.dataForm.buildingUnitId) return this.$message.error('请选择单元')
const { data, code, msg } = await requestPost(
"/gov/org/houseInformation/getHouseCoding/" + this.dataForm.buildingUnitId);
if (msg == "success" && code == 0) {
this.dataForm.coding = data.coding
this.dataForm.sysCoding = data.sysCoding
}
},
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 (this.dataForm.ownerIdCard && 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 (this.dataForm.ownerPhone && regPhone.test(this.dataForm.ownerPhone) === false) {
this.btnDisable = false
this.$message({
type: 'warning',
message: '请输入正确的手机号码'
})
return false;
}
let url = ''
if (this.formType === 'add') {
url = '/gov/org/house/houseadd'
} else {
url = '/gov/org/house/houseupdate'
this.dataForm.houseId = this.houseId
}
const { data, code, msg } = await requestPost(url, this.dataForm)
this.btnDisable = false
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功'
})
this.resetData()
this.$emit('dialogOk')
} else {
this.$message.error(msg)
}
},
handleCancle () {
this.resetData()
this.$emit('dialogCancle')
},
resetData () {
this.houseId = '' //ID
this.houseType = '1'
this.purpose = '1'
this.rentFlag = 0
this.dataForm = {
neighborHoodId: '', // ID
buildingId: '',//ID
buildingUnitId: '',//ID
doorName: '',//
houseType: '1',//
purpose: '1',//
rentFlag: 0,//10
ownerPhone: '', //
ownerName: '', //
ownerIdCard: '', //
remark: '', //
coding: '',
sysCoding: ''
}
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule () {
return {
buildingUnitId: [
{ required: true, message: '所属单元不能为空', trigger: 'blur' },
],
doorName: [
{ required: true, message: '门牌号不能为空', trigger: 'blur' }
],
coding: [
{ required: true, message: '房屋编码不能为空', trigger: 'blur' }
],
houseType: [
{ required: true, message: '房屋类型不能为空', trigger: 'blur' }
],
purpose: [
{ required: true, message: '房屋用途不能为空', trigger: 'blur' }
],
rentFlag: [
{ required: true, message: '是否出租不能为空', trigger: 'blur' }
],
ownerPhone: [
{ required: false }
],
ownerName: [
{ required: false }
],
ownerIdCard: [
{ required: false }
],
remark: [
{ required: false }
],
}
},
},
props: {
view_real_data: {//
type: Boolean,
default: false,
}
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManageForm.scss";
.div_tuomin {
position: absolute;
top: 0;
right: 40px;
}
</style>

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

@ -290,7 +290,7 @@ export default {
//
async loadUnitList () {
const url = '/gov/org/building/buildingunitlist'
const url = '/actual/base/communityBuildingUnit/listBuildingUnits'
let params = {
buildingId: this.dataForm.buildingId

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

@ -367,12 +367,12 @@ export default {
async mounted () {
this.updateBtnAuths();
this.displayedBaobiaoBtn = await this.$refs.baobiao.existsTemplate({
elseParams: {
categoryKeys: ["house_info"],
categoryKey: "house_info",
},
});
// this.displayedBaobiaoBtn = await this.$refs.baobiao.existsTemplate({
// elseParams: {
// categoryKeys: ["house_info"],
// categoryKey: "house_info",
// },
// });
},
computed: {
tableHeight () {
@ -449,7 +449,7 @@ export default {
type: "house",
};
let url = "/gov/org/house/update-sort";
let url = "/actual/base/communityHouse/updateHouseSort";
const { data, code, msg } = await requestPost(url, params);

2
src/views/modules/communityService/dqfwzx/cpts/edit.vue

@ -506,7 +506,7 @@ export default {
let url = "";
if (this.formType === "add") {
url = "/gov/org/icpartyservicecenter/addpartyservicecenter";
// url = "http://yapi.elinkservice.cn/mock/245/gov/org/neighborhood/neighborhoodadd"
} else {
url = "/gov/org/icpartyservicecenter/editpartyservicecenter";

2
src/views/modules/communityService/dqfwzx/cpts/order.vue

@ -340,7 +340,7 @@ export default {
let url = "";
if (this.formType === "add") {
url = "/gov/org/icpartyservicecenter/appointment";
// url = "http://yapi.elinkservice.cn/mock/245/gov/org/neighborhood/neighborhoodadd"
}
const { data, code, msg } = await requestPost(url, {

258
src/views/modules/communityService/shzz/cpts/edit.vue

@ -1,88 +1,70 @@
<template>
<div>
<div>
<el-form
ref="ref_form"
:inline="true"
:model="dataForm"
:rules="dataRule"
:disabled="formType === 'detail'"
class="form"
>
<el-form-item
label="头像"
label-width="150px"
prop="imageList"
style="display: block"
>
<el-form ref="ref_form"
:inline="true"
:model="dataForm"
:rules="dataRule"
:disabled="formType === 'detail'"
class="form">
<el-form-item label="头像"
label-width="150px"
prop="imageList"
style="display: block">
<div class="imsg-list">
<div
v-for="(item, index) in dataForm.imageList"
:key="index"
class="imgs-item"
>
<el-image
style="width: 100px; height: 100px"
:src="item"
fit="fill"
:preview-src-list="dataForm.imageList"
></el-image>
<i class="el-icon-delete" @click="handleDelimg(item, index)"></i>
<div v-for="(item, index) in dataForm.imageList"
:key="index"
class="imgs-item">
<el-image style="width: 100px; height: 100px"
:src="item"
fit="fill"
:preview-src-list="dataForm.imageList"></el-image>
<i class="el-icon-delete"
@click="handleDelimg(item, index)"></i>
</div>
<el-upload
:headers="$getElUploadHeaders()"
class="avatar-uploader"
v-if="dataForm.imageList.length < 1 && !disabled"
:action="uploadUlr"
:data="{ customerId: customerId }"
:show-file-list="false"
:disabled="disabled"
:on-progress="handleProgress"
:on-success="handleImgSuccess"
:before-upload="beforeImgUpload"
accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP"
>
<el-progress
v-if="uploading"
:width="100"
type="circle"
:percentage="unloadPencent"
></el-progress>
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
<el-upload :headers="$getElUploadHeaders()"
class="avatar-uploader"
v-if="dataForm.imageList.length < 1 && !disabled"
:action="uploadUlr"
:data="{ customerId: customerId }"
:show-file-list="false"
:disabled="disabled"
:on-progress="handleProgress"
:on-success="handleImgSuccess"
:before-upload="beforeImgUpload"
accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP">
<el-progress v-if="uploading"
:width="100"
type="circle"
:percentage="unloadPencent"></el-progress>
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</div>
</el-form-item>
<el-form-item
label="组织名称 "
prop="societyName"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入组织名称 "
v-model="dataForm.societyName"
>
<el-form-item label="组织名称 "
prop="societyName"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入组织名称 "
v-model="dataForm.societyName">
</el-input>
</el-form-item>
<el-form-item
label="服务内容"
prop="serviceMatters"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
type="textarea"
maxlength="1000"
show-word-limit
:rows="3"
placeholder="请输入服务内容,不超过1000字"
v-model="dataForm.serviceMatters"
></el-input>
<el-form-item label="服务内容"
prop="serviceMatters"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
type="textarea"
maxlength="1000"
show-word-limit
:rows="3"
placeholder="请输入服务内容,不超过1000字"
v-model="dataForm.serviceMatters"></el-input>
</el-form-item>
<!-- <el-form-item
@ -101,35 +83,27 @@
</el-input>
</el-form-item>-->
<el-form-item
label="服务电话 "
prop="mobile"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入服务电话 "
v-model="dataForm.mobile"
>
<el-form-item label="服务电话 "
prop="mobile"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入服务电话 "
v-model="dataForm.mobile">
</el-input>
</el-form-item>
<el-form-item
label="服务时间 "
prop="serviceTimeStr"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入服务时间 "
v-model="dataForm.serviceTimeStr"
>
<el-form-item label="服务时间 "
prop="serviceTimeStr"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入服务时间 "
v-model="dataForm.serviceTimeStr">
</el-input>
<!-- <el-date-picker
v-model="dataForm.serviceTime"
@ -142,25 +116,19 @@
</el-date-picker>-->
</el-form-item>
<el-form-item
label="绑定管理员"
prop="adminStaffId"
label-width="150px"
style="display: block"
>
<el-select
class="item_width_1"
v-model="dataForm.adminStaffId"
placeholder="请选择"
clearable
filterable
>
<el-option
v-for="item in staffList"
:key="item.staffId"
:label="item.staffName"
:value="item.staffId"
>
<el-form-item label="绑定管理员"
prop="adminStaffId"
label-width="150px"
style="display: block">
<el-select class="item_width_1"
v-model="dataForm.adminStaffId"
placeholder="请选择"
clearable
filterable>
<el-option v-for="item in staffList"
:key="item.staffId"
:label="item.staffName"
:value="item.staffId">
</el-option>
</el-select>
</el-form-item>
@ -211,12 +179,10 @@
</div>
<div class="div_btn">
<el-button @click="handleCancle"> </el-button>
<el-button
v-if="formType != 'detail'"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"
>
<el-button v-if="formType != 'detail'"
type="primary"
:disabled="btnDisable"
@click="handleComfirm">
</el-button>
</div>
</div>
@ -234,7 +200,7 @@ var infoWindowList;
let loading; //
export default {
data() {
data () {
return {
uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadqrcodeV2",
btnLoading: false,
@ -269,7 +235,7 @@ export default {
},
components: {},
computed: {
dataRule() {
dataRule () {
return {
societyName: [
{ required: true, message: "组织名称 不能为空", trigger: "blur" },
@ -314,7 +280,7 @@ export default {
},
},
async mounted() {
async mounted () {
//this.initMap();
await this.loadAgency();
@ -323,7 +289,7 @@ export default {
methods: {
// init
initMap() {
initMap () {
//
var center = new window.TMap.LatLng(36.0722275, 120.38945519);
// map TMap.Map()
@ -349,7 +315,7 @@ export default {
this.handleMoveCenter();
},
setMarker(lat, lng) {
setMarker (lat, lng) {
markers.setGeometries([]);
markers.add([
{
@ -363,7 +329,7 @@ export default {
]);
},
handleSearchMap() {
handleSearchMap () {
infoWindowList.forEach((infoWindow) => {
infoWindow.close();
});
@ -392,7 +358,7 @@ export default {
}
});
},
beforeImgUpload(file) {
beforeImgUpload (file) {
const isPNG = file.type === "image/png" || file.type === "image/jpeg";
const isLt1M = file.size / 1024 / 1024 < 10;
@ -404,11 +370,11 @@ export default {
}
return isPNG && isLt1M;
},
handleProgress(event, file, fileList) {
handleProgress (event, file, fileList) {
this.uploading = true;
this.unloadPencent = Number(file.percentage.toFixed(0));
},
handleImgSuccess(res, file) {
handleImgSuccess (res, file) {
if (res.code === 0 && res.msg === "success") {
this.uploading = false;
this.unloadPencent = 0;
@ -417,10 +383,10 @@ export default {
this.$message.error(res.msg);
}
},
handleDelimg(item, index) {
handleDelimg (item, index) {
this.dataForm.imageList.splice(index, 1);
},
handleMoveCenter() {
handleMoveCenter () {
//
const center = map.getCenter();
const lat = center.getLat();
@ -430,7 +396,7 @@ export default {
this.setMarker(lat, lng);
},
async initForm(type, row) {
async initForm (type, row) {
this.$refs.ref_form.resetFields();
this.formType = type;
@ -448,7 +414,7 @@ export default {
},
//
async loadAgency() {
async loadAgency () {
const url = "/epmetuser/customerstaff/staffbasicinfo";
let params = {};
const { data, code, msg } = await requestPost(url, params);
@ -460,7 +426,7 @@ export default {
}
},
//
async loadStaff() {
async loadStaff () {
const url = "/data/aggregator/org/currentOrgStafflist";
let params = {
@ -484,7 +450,7 @@ export default {
}
},
async handleComfirm() {
async handleComfirm () {
this.btnDisable = true;
setTimeout(() => {
this.btnDisable = false;
@ -499,11 +465,11 @@ export default {
});
},
async submit() {
async submit () {
let url = "";
if (this.formType === "add") {
url = "/heart/societyorg/add";
// url = "http://yapi.elinkservice.cn/mock/245/gov/org/neighborhood/neighborhoodadd"
} else {
url = "/heart/societyorg/edit";
@ -526,11 +492,11 @@ export default {
}
},
handleCancle() {
handleCancle () {
this.resetData();
this.$emit("dialogCancle");
},
resetData() {
resetData () {
this.societyId = ""; //ID
this.$refs.ref_form.resetFields();
this.propertyFormShow = false;
@ -551,7 +517,7 @@ export default {
};*/
},
//
startLoading() {
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
@ -559,7 +525,7 @@ export default {
});
},
//
endLoading() {
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();

2
src/views/modules/communityService/sqzzz/cpts/edit.vue

@ -486,7 +486,7 @@ export default {
let url = "";
if (this.formType === "add") {
url = "/heart/iccommunityselforganization/addcommunityselforganization";
// url = "http://yapi.elinkservice.cn/mock/245/gov/org/neighborhood/neighborhoodadd"
} else {
url =
"/heart/iccommunityselforganization/editcommunityselforganization";

Loading…
Cancel
Save