Browse Source

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

shibei_master
dai 4 years ago
parent
commit
fa54ba91df
  1. 40
      src/assets/scss/modules/visual/basicInfoMain.scss
  2. 7
      src/views/modules/base/community/buildForm.vue
  3. 8
      src/views/modules/base/community/communityForm.vue
  4. 10
      src/views/modules/visual/basicinfo/basicInfoCommunity.vue
  5. 60
      src/views/modules/visual/basicinfo/basicInfoMain.vue
  6. 46
      src/views/modules/workSys/mapConfig.vue
  7. 103
      src/views/modules/workSys/resiCate.vue

40
src/assets/scss/modules/visual/basicInfoMain.scss

@ -51,21 +51,35 @@
.div_search {
width: 100%;
height: 56px;
background: #011168;
border-radius: 4px;
text-align: center;
background-color: #011168;
border-radius: 4px 0 0 4px;
border: none;
box-shadow: 0 0 10px inset #1a5afd;
font-size: 18px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
opacity: 0.7;
display: flex;
justify-content: flex-end;
.icon {
justify-content: space-between;
.div_search_left {
display: flex;
align-items: center;
margin-left: 29px;
margin-top: 16px;
justify-content: flex-start;
.icon {
display: flex;
align-items: center;
margin-left: 29px;
> img {
width: 24px;
height: 24px;
}
}
> img {
width: 24px;
height: 24px;
> span {
line-height: 56px;
margin-left: 10px;
}
}
@ -83,6 +97,10 @@
}
}
.div_search:hover {
cursor: pointer;
}
.div_info {
box-sizing: border-box;
width: 100%;

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

@ -168,13 +168,16 @@ export default {
this.dataForm.gridId = agencyObj.gridId
this.dataForm.neighborHoodId = agencyObj.id
map.setCenter(new TMap.LatLng(agencyObj.latitude, agencyObj.longitude))
this.formType = type
if (row) {
this.dataForm = JSON.parse(JSON.stringify(row))
this.buildingId = this.dataForm.buildingId
this.buildType = this.dataForm.buildingTypeKey
map.setCenter(new TMap.LatLng(this.dataForm.latitude, this.dataForm.longitude))
this.setMarker(this.dataForm.latitude, this.dataForm.longitude)
} else {
map.setCenter(new TMap.LatLng(agencyObj.latitude, agencyObj.longitude))
}

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

@ -277,14 +277,16 @@ export default {
async initForm (type, row, agencyObj) {
this.$refs.ref_form.resetFields();
this.agencyObj = agencyObj
// debugger
map.setCenter(new TMap.LatLng(agencyObj.latitude, agencyObj.longitude))
this.formType = type
if (row) {
this.dataForm = JSON.parse(JSON.stringify(row))
this.neighborHoodId = this.dataForm.neighborHoodId
map.setCenter(new TMap.LatLng(this.dataForm.latitude, this.dataForm.longitude))
this.setMarker(this.dataForm.latitude, this.dataForm.longitude)
} else {
map.setCenter(new TMap.LatLng(agencyObj.latitude, agencyObj.longitude))
}

10
src/views/modules/visual/basicinfo/basicInfoCommunity.vue

@ -11,11 +11,11 @@
<el-select v-model="selBuildingId"
:popper-append-to-body="false"
placeholder="请选择">
<el-option v-for="item in buildingArray"
<el-option v-for="(item,index) in buildingArray"
:key="item.buildingId"
:label="item.buildingName"
:value="item.buildingId"
@click="handleClickBuilding(index)">
@click.native="handleClickBuilding(index)">
</el-option>
</el-select>
</div>
@ -393,10 +393,14 @@ export default {
},
//
handleClickBuilding (index) {
async handleClickBuilding (index) {
this.selBuildingId = this.buildingArray[index].buildingId
this.selBuildingName = this.buildingArray[index].buildingName
await this.loadRoom()
this.roomLoaded = true
this.$emit('refreshInfoList', this.selBuildingId, 'building')
},
//

60
src/views/modules/visual/basicinfo/basicInfoMain.vue

@ -38,20 +38,18 @@
</div>
<div class="div_data">
<div class="div_search">
<el-input size="mini"
@focus="handleSearch"
WarningColor='warning'
placeholder="请输入姓名">
<div @click="handleSearch"
class="div_search">
<div class="div_search_left">
<i slot="prefix"
class="icon">
<img src="../../../../assets/img/modules/visual/sousuo.png"
alt />
</i>
</el-input>
<span>请输入姓名</span>
</div>
<div class="btn"
@click="handleSearch">搜索</div>
<div class="btn">搜索</div>
</div>
@ -291,11 +289,12 @@ const vueGis = {
// type:polygon / search people
async toSubAgency (type, e, searchName) {
//neighborHood
console.log(e)
this.runNum++
this.runAgencyArray.push(this.orgData)
//neighborHood
if (type === 'people') {
this.orgLevel = 'people'
this.selUserId = e
this.orgId = ''
@ -307,6 +306,8 @@ const vueGis = {
this.searchName = searchName
} else if (type === 'search') {
this.orgLevel = 'search'
this.orgId = ''
this.orgData = {
@ -320,7 +321,8 @@ const vueGis = {
} else {
this.subAgencyArray.forEach(item => {
if (item.id === e.selected[0].id_) {
if (item.id === e.selected[0].values_.id) {
this.orgId = item.id
this.orgLevel = item.level
this.orgData = item
@ -338,6 +340,7 @@ const vueGis = {
} else {
this.refreshMap(true)
}
}
@ -365,7 +368,6 @@ const vueGis = {
//
handleClickAgency (index) {
const cutNum = this.runAgencyArray.length - index//
this.runNum = this.runNum - cutNum
this.orgData = this.runAgencyArray[index]
@ -379,10 +381,8 @@ const vueGis = {
if (this.orgLevel === 'people') {
} else if (this.orgLevel === 'search') {
this.$nextTick(() => {
this.$refs.ref_search.loadByName(this.searchName);
});
@ -430,7 +430,8 @@ const vueGis = {
//
loadPolygon (subAgencyArray) {
polygonSource.clear()//
polygonSource.clear()//
iconSource.clear()//
let featureData = []//
if (subAgencyArray && subAgencyArray.length > 0) {//
@ -473,9 +474,7 @@ const vueGis = {
oneData.geometry.coordinates.push(polygonArray)
featureData.push(oneData)
}
});
}
if (featureData && featureData.length > 0) {
@ -489,6 +488,7 @@ const vueGis = {
let iconFeatures = [];
feature.forEach(oneIcon => {
var extent = boundingExtent(oneIcon.getGeometry().getCoordinates()[0]); //[minx,miny,maxx,maxy]
// var center = getCenter(extent); //
//
@ -497,19 +497,17 @@ const vueGis = {
let oneArray = [x, y]
this.iconCoordinators.push(oneArray)
// debugger
//
let oneCctv = new Feature({
geometry: new Point([x, y]),
id: oneIcon.id,
id: oneIcon.id_,
properties: {
type: "icon",
id: oneIcon.id
id: oneIcon.id_
}
});
console.log(oneIcon.values_)
let iconStyle = new Style({
image: new Icon({
// anchor: [0.5, 0.5],
@ -525,9 +523,7 @@ const vueGis = {
iconFeatures.push(oneCctv);
});
console.log(iconFeatures)
iconSource.clear(); //cctyv
iconSource.addFeatures(iconFeatures);
}
@ -591,7 +587,7 @@ const vueGis = {
})
map.on('singleclick', function (e) {
console.log(e.coordinate)
// console.log(e.coordinate)
// console.log(transform(e.coordinate, 'EPSG:3857', 'EPSG:4326'));
})
@ -745,19 +741,7 @@ export default vueGis;
.ol-overlaycontainer-stopevent {
display: none;
}
.el-input__inner[WarningColor="warning"] {
background-color: #011168;
border-radius: 4px 0 0 4px;
height: 56px;
border: none;
box-shadow: 0 0 10px inset #1a5afd;
padding-left: 70px;
font-size: 18px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
opacity: 0.7;
}
.el-scrollbar__wrap {
overflow-x: hidden !important;
}

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

@ -4,7 +4,7 @@
<div class="div_search">
<el-select v-model="selAgencyId"
placeholder="无下级组织">
placeholder="请选择或点击区域选择">
<el-option @click.native="orgChange(index)"
v-for="(item,index) in subAgencyArray"
:key="item.id"
@ -12,7 +12,7 @@
:value="item.id">
</el-option>
</el-select>
<div v-if="subAgencyArray.length>0">
<div v-if="selAgencyId && subAgencyArray.length>0">
<el-button v-if="showBtn&&!hasPolygon"
style="margin-left:10px"
type="primary"
@ -198,7 +198,7 @@ const vueGis = {
await this.loadOrgData()
//
await this.loadPolygon(this.subAgencyArray)
this.loadPolygon(this.subAgencyArray)
//
if (isRefreshView) {
@ -210,7 +210,7 @@ const vueGis = {
//
handleBack () {
this.selAgencyId = ''
this.runNum--
this.runAgency.pop()
if (this.runNum === 0) {
@ -241,14 +241,15 @@ const vueGis = {
this.subAgencyArray = []
if (this.runNum === 0) {//
this.subAgencyArray.push(data)
this.selAgencyId = data.id
// this.selAgencyId = data.id
} else {
if (data.children && data.children.length > 0) {
this.subAgencyArray = data.children
this.selAgencyId = this.subAgencyArray[0].id
// this.selAgencyId = this.subAgencyArray[0].id
} else {
this.subAgencyArray = []
this.selAgencyId = ''
// this.selAgencyId = ''
}
}
@ -300,9 +301,7 @@ const vueGis = {
oneData.geometry.coordinates.push(polygonArray)
featureData.push(oneData)
}
});
}
if (featureData && featureData.length > 0) {
@ -320,23 +319,26 @@ const vueGis = {
//feature
selectFeature (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)
}
if (e.selected.length > 0) {
console.log("selectFeature22222222222222222222222")
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) {
if (this.method != 'mAddPolygon' && this.level != 'neighborHood') {
this.selAgencyId = ''
//
this.subAgencyArray.forEach(item => {
if (item.id === e.selected[0].id_) {
@ -359,10 +361,12 @@ const vueGis = {
//
highlightPolygon () {
let features = polygonSource.getFeatures()
features.forEach(element => {
if (element.id_ === this.selAgencyId) {
selectedFeatures.push(element)
}
});
@ -383,11 +387,11 @@ const vueGis = {
//
setZoom (agencyLevel) {
if (agencyLevel === 'district') {
this.zoom = 14
this.zoom = 13
} else if (agencyLevel === 'street') {
this.zoom = 15
this.zoom = 14
} else if (agencyLevel === 'community') {
this.zoom = 16
this.zoom = 15
}
},

103
src/views/modules/workSys/resiCate.vue

@ -2,35 +2,43 @@
<div v-if="pageLoading" class="resi-container">
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-select
v-model="value"
placeholder="请选择"
size="small"
clearable
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-select
v-model="value"
placeholder="请选择"
size="small"
clearable
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-button type="primary" size="mini" @click="handleSearch">查询</el-button>
<el-form :inline="true" :model="form" class="demo-form-inline">
<el-form-item label="是否预警">
<el-select
v-model="isWarn"
placeholder="请选择"
size="small"
clearable
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="预警类型">
<el-select
v-model="level"
placeholder="请选择"
size="small"
clearable
>
<el-option
v-for="item in optionsType"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
</div>
<el-table
:data="tableData"
@ -150,10 +158,10 @@
<el-switch v-model="form.warn"></el-switch>
</el-form-item>
<el-form-item label="黄色预警">
<el-input-number v-model="form.level1" :min="0" size="small" label="描述文字"></el-input-number> /楼宇
<el-input-number v-model="form.level1" :min="0" size="small" label="描述文字" @change="handleLevelChange"></el-input-number> /楼宇
</el-form-item>
<el-form-item label="红色预警">
<el-input-number v-model="form.level2" :min="0" size="small" label="描述文字"></el-input-number> /
<el-input-number v-model="form.level2" :min="form.level1" size="small" label="描述文字" ></el-input-number> /
</el-form-item>
</el-form>
<div class="resi-btns">
@ -188,13 +196,23 @@ export default {
total: null,
conditions: [],
tableData: [],
value: '',
isWarn: null,
level: null,
options: [
{
label: '是',
value: 1
},{
label: '否',
value: 0
}
],
optionsType: [
{
label: '黄色预警',
value: 1
},{
label: '红色预警',
value: 2
}
],
@ -246,8 +264,9 @@ export default {
managementIcon: '',
houseShowIcon: '',
warn: '',
level1: '',
level2: ''
level1: 0,
level2: 0,
level3: 0
},
rules: {
managementIcon: [{ required: true, message: '管理平台图标不能为空', trigger: 'blur' }],
@ -311,6 +330,9 @@ export default {
this.conditions = val
this.getTableData()
},
handleLevelChange(val) {
if (val > this.form.level2) this.form.level2 = val
},
handlerCancle() {
this.dialogVisible = false
@ -362,12 +384,21 @@ export default {
},
async handleEdit(row) {
this.form = { ...row }
this.form = {
...row,
warn: row.warn == '1' ? true : false,
level1: row.level1 || 0,
level2: row.level2 || 0,
level3: row.level3 || 0
}
this.dialogVisible = true
},
async handleSUbmit() {
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
if (this.form.warn) {
if (!this.form.level1) return this.$message.error('黄色预警不能为0')
}
this.btnLoading = true
const _form = {
...this.form,
@ -458,6 +489,8 @@ export default {
this.tableLoading = true
let params = {
// formCode: 'resi_base_info',
isWarn: this.isWarn,
level: this.level,
pageNo: this.currentPage,
pageSize: this.pageSize
}

Loading…
Cancel
Save