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. 28
      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. 30
      src/views/modules/workSys/mapConfig.vue
  7. 53
      src/views/modules/workSys/resiCate.vue

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

@ -51,17 +51,25 @@
.div_search { .div_search {
width: 100%; width: 100%;
height: 56px; height: 56px;
background: #011168;
border-radius: 4px;
text-align: center; 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; display: flex;
justify-content: flex-end; justify-content: space-between;
.div_search_left {
display: flex;
justify-content: flex-start;
.icon { .icon {
display: flex; display: flex;
align-items: center; align-items: center;
margin-left: 29px; margin-left: 29px;
margin-top: 16px;
> img { > img {
width: 24px; width: 24px;
@ -69,6 +77,12 @@
} }
} }
> span {
line-height: 56px;
margin-left: 10px;
}
}
.btn { .btn {
text-align: center; text-align: center;
flex: 0 0 113px; flex: 0 0 113px;
@ -83,6 +97,10 @@
} }
} }
.div_search:hover {
cursor: pointer;
}
.div_info { .div_info {
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;

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

@ -168,13 +168,16 @@ export default {
this.dataForm.gridId = agencyObj.gridId this.dataForm.gridId = agencyObj.gridId
this.dataForm.neighborHoodId = agencyObj.id this.dataForm.neighborHoodId = agencyObj.id
map.setCenter(new TMap.LatLng(agencyObj.latitude, agencyObj.longitude))
this.formType = type this.formType = type
if (row) { if (row) {
this.dataForm = JSON.parse(JSON.stringify(row)) this.dataForm = JSON.parse(JSON.stringify(row))
this.buildingId = this.dataForm.buildingId this.buildingId = this.dataForm.buildingId
this.buildType = this.dataForm.buildingTypeKey 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) { async initForm (type, row, agencyObj) {
this.$refs.ref_form.resetFields(); this.$refs.ref_form.resetFields();
this.agencyObj = agencyObj this.agencyObj = agencyObj
// debugger
map.setCenter(new TMap.LatLng(agencyObj.latitude, agencyObj.longitude))
this.formType = type this.formType = type
if (row) { if (row) {
this.dataForm = JSON.parse(JSON.stringify(row)) this.dataForm = JSON.parse(JSON.stringify(row))
this.neighborHoodId = this.dataForm.neighborHoodId 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" <el-select v-model="selBuildingId"
:popper-append-to-body="false" :popper-append-to-body="false"
placeholder="请选择"> placeholder="请选择">
<el-option v-for="item in buildingArray" <el-option v-for="(item,index) in buildingArray"
:key="item.buildingId" :key="item.buildingId"
:label="item.buildingName" :label="item.buildingName"
:value="item.buildingId" :value="item.buildingId"
@click="handleClickBuilding(index)"> @click.native="handleClickBuilding(index)">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
@ -393,10 +393,14 @@ export default {
}, },
// //
handleClickBuilding (index) { async handleClickBuilding (index) {
this.selBuildingId = this.buildingArray[index].buildingId this.selBuildingId = this.buildingArray[index].buildingId
this.selBuildingName = this.buildingArray[index].buildingName this.selBuildingName = this.buildingArray[index].buildingName
await this.loadRoom()
this.roomLoaded = true
this.$emit('refreshInfoList', this.selBuildingId, 'building') this.$emit('refreshInfoList', this.selBuildingId, 'building')
}, },
// //

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

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

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

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

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

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

Loading…
Cancel
Save