Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop
Conflicts:
src/components/BaseNav/PublicBounced/common/echarts/EChartsDate.vue
src/components/BaseNav/PublicBounced/common/echarts/EChartsHour.vue
| | |
| | | <script> |
| | | |
| | | import '@/utils/dragBoxes' |
| | | import PublicTabs from '@components/BaseNav/PublicBounced/GasComponents/PublicTabs' |
| | | import PublicTable from '@components/BaseNav/PublicBounced/GasComponents/PublicTable' |
| | | import PublicVideo from '@components/BaseNav/PublicBounced/GasComponents/PublicVideo' |
| | | import PublicChart from './GasComponents/PublicChart' |
| | | import PublicTabs from '@components/BaseNav/PublicBounced/common/PublicTabs' |
| | | import PublicTable from '@components/BaseNav/PublicBounced/common/PublicTable' |
| | | import PublicVideo from '@components/BaseNav/PublicBounced/common/PublicVideo' |
| | | import PublicChart from './common/PublicChart' |
| | | |
| | | export default { |
| | | name: 'PublicBounced', |
File was renamed from src/components/BaseNav/PublicBounced/GasComponents/PublicChart.vue |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import EChartsHour from './EChartsHour' |
| | | import EChartsDate from './EChartsDate' |
| | | import ECharts from './Echarts' |
| | | import EChartsHour from './echarts/EChartsHour' |
| | | import EChartsDate from './echarts/EChartsDate' |
| | | import ECharts from './echarts/Echarts' |
| | | // import EChartsDate from './EChartsDate' |
| | | import EChartsHourWasteWater from './EChartsHourWasteWater' |
| | | import EChartsTable from '@components/BaseNav/PublicBounced/GasComponents/EChartsTable' |
| | | import EChartsHourWasteWater from './echarts/EChartsHourWasteWater' |
| | | import EChartsTable from '@components/BaseNav/PublicBounced/common/echarts/EChartsTable' |
| | | |
| | | export default { |
| | | name: 'PublicChart', |
File was renamed from src/components/BaseNav/PublicBounced/GasComponents/EChartsDate.vue |
| | |
| | | <div class="detailbtn" @click="onSubmit">查询</div> |
| | | <div class="detailbtn" @click="dialogVisible = true" >明细表</div> |
| | | </div> |
| | | <div style="width:6rem;height:2rem;" id="echarts" ref="main"> |
| | | <div style="width:5rem;height:1.5rem;" id="echarts" ref="main"> |
| | | </div> |
| | | </div> |
| | | <!-- 明细弹框 --> |
| | |
| | | this.onSubmit() |
| | | // this.CreateChart(this.JsonDayCharts.id, this.JsonDayCharts.title, this.JsonDayCharts.legend, this.JsonDayCharts.xdata, this.JsonDayCharts.ydatas, this.JsonDayCharts.yname, this.JsonDayCharts.id, this.JsonDayCharts.datatype) |
| | | }, |
| | | updated () { |
| | | this.onSubmit() |
| | | }, |
| | | methods: { |
| | | onSubmit () { |
| | | console.log('submit!') |
File was renamed from src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue |
| | |
| | | <div class="pickerData"> |
| | | <span> 开始时间:</span> |
| | | <span class="pickerTable"> |
| | | <el-date-picker type="datetime" v-model="formInline.timeStart"> |
| | | </el-date-picker> |
| | | <el-date-picker type="datetime" v-model="formInline.timeStart"></el-date-picker> |
| | | </span> |
| | | </div> |
| | | <div class="pickerData"> |
| | | <span >结束时间:</span> |
| | | <span class="pickerTable"> |
| | | <el-date-picker |
| | | type="datetime" |
| | | v-model="formInline.timeEnd" |
| | | > |
| | | </el-date-picker> |
| | | <el-date-picker type="datetime" v-model="formInline.timeEnd" ></el-date-picker> |
| | | </span> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="detailbtn" @click="onSubmit">查询</div> |
| | | <div class="detailbtn" @click="dialogVisible = true" >明细表</div> |
| | | </div> |
| | | <!-- <div style="width: 5rem;height: 2rem">--> |
| | | <!-- <div style="width:100%;height:100%;" id="echarts" ref="main">–>--> |
| | | <!-- </div>--> |
| | | <div style="width:720px;height:252px;" id="echarts" ref="main"> |
| | | </div> |
| | | <div style="width:5rem;height:1.5rem;" id="echarts" ref="main"></div> |
| | | </div> |
| | | <!-- 明细弹框 --> |
| | | <el-dialog :visible.sync="dialogVisible" |
| | | :append-to-body="true" |
| | | :title="this.$attrs.value==='feiqi'?this.$attrs.getWasteGasDetails[0].OnLineMonEmissPointName:this.$attrs.getWasteWaterMonitoringDetails[0].OnLineMonEmissPointName" |
| | | width="68%" |
| | | center |
| | | v-dialogDrag |
| | |
| | | } |
| | | }, |
| | | created () { |
| | | // console.log(dayjs().format('YYYY-MM-DD HH:mm:ss')) |
| | | // this.$nextTick(() => { |
| | | // this.CreateChart(this.JsonCtarts.id, this.JsonCtarts.title, this.JsonCtarts.legend, this.JsonCtarts.xdata, this.JsonCtarts.ydatas, this.JsonCtarts.yname, this.JsonCtarts.id, this.JsonCtarts.datatype) |
| | | // } |
| | |
| | | this.onSubmit() |
| | | // this.CreateChart(this.JsonCtarts.id, this.JsonCtarts.title, this.JsonCtarts.legend, this.JsonCtarts.xdata, this.JsonCtarts.ydatas, this.JsonCtarts.yname, this.JsonCtarts.id, this.JsonCtarts.datatype) |
| | | }, |
| | | updated () { |
| | | this.onSubmit() |
| | | }, |
| | | methods: { |
| | | onSubmit () { |
| | | this.CreateChart() |
File was renamed from src/components/BaseNav/PublicBounced/GasComponents/EChartsHourWasteWater.vue |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import PublicDetailedList from '@components/BaseNav/PublicBounced/GasComponents/PublicDetailedList' |
| | | import PublicDetailedList from '@components/BaseNav/PublicBounced/common/echarts/PublicDetailedList' |
| | | |
| | | export default { |
| | | name: 'ECharts', |
| | |
| | | init (layerConfig) { |
| | | // 1. 遍历layer config |
| | | if (layerConfig) { |
| | | for (var i = 0, l = layerConfig.length; i < l; i++) { |
| | | for (var i = 0; i < layerConfig.length; i++) { |
| | | var config = layerConfig[i] |
| | | var layers = config.layers |
| | | var childLayer = config.childLayer |
| | |
| | | |
| | | } |
| | | |
| | | flyByLayerId (layerId, bound) { |
| | | for (var k in this.layers) { |
| | | var layerGroup = this.layers[k] |
| | | var layers = layerGroup.getLayers() |
| | | if (layers) { |
| | | for (var m = 0; m < layers.length; m++) { |
| | | var layer = layers[m] |
| | | console.log(layer.toGeoJSON()) |
| | | /* var feature = layer.feature |
| | | if (feature.id === layerId) { |
| | | this.map.flyToBounds(bound) |
| | | return layer |
| | | } */ |
| | | } |
| | | } |
| | | } |
| | | return null |
| | | } |
| | | |
| | | /** |
| | | * todo 这里无效,貌似是因为geojson加载到地图也是个layergroup |
| | | * |
| | |
| | | <div class="search-panel "> |
| | | <el-form ref="form" :model="form" label-width="90px" class="search-form"> |
| | | <el-form-item label="设施类型:" size="mini" class="search-panel-item"> |
| | | <el-select style="width: 100%" v-model="form.pipelineType" @change="handlePipelineType" |
| | | :popper-class="'select-down'"> |
| | | <el-select style="width: 100%" v-model="form.pipelineType" @change="handlePipelineType" :popper-class="'select-down'"> |
| | | <el-option |
| | | v-for="item in pipelineTypeOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | v-for="item in items" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item :label="form.pipelineType+':'" size="mini"> |
| | | <el-select style="width: 100%" v-model="form.dataType" @change="handleDataType" |
| | | :popper-class="'select-down'"> |
| | | <el-select style="width: 100%" v-model="form.dataType" @change="handleDataType" :popper-class="'select-down'"> |
| | | <el-option |
| | | v-for="item in dataTypeOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | v-for="item in subItems" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { PipelineTypeOptions } from '@/conf/layers/LayerSewers' |
| | | import { LayerPipeLines } from '@src/conf/layers/LayerPipeLines' |
| | | import { LayerFsss } from '@src/conf/layers/LayerFsss' |
| | | import { LayerHbss } from '@src/conf/layers/LayerHbss' |
| | | import { LayerPk } from '@src/conf/layers/LayerPk' |
| | | import { LayerArea } from '@src/conf/layers/LayerArea' |
| | | |
| | | import WfsHelper from '@components/helpers/WfsHelper' |
| | | import AjaxUtils from '@utils/AjaxUtils' |
| | |
| | | activeName: 'first', |
| | | gdVisible: true, |
| | | list: [], |
| | | labelList: PipelineTypeOptions[0].labelList, |
| | | items: [LayerPipeLines, LayerFsss, LayerHbss, LayerPk, LayerArea], |
| | | subItems: LayerPipeLines.layers, |
| | | total: 0, |
| | | pipelineTypeOptions: PipelineTypeOptions, |
| | | dataTypeOptions: PipelineTypeOptions[0].options, |
| | | form: { |
| | | pipelineType: PipelineTypeOptions[0].label, |
| | | dataType: PipelineTypeOptions[0].options[0].label, |
| | | query: PipelineTypeOptions[0].options[0], |
| | | keyword: '研究院01路YS000001' |
| | | // , |
| | | // size: 10, |
| | | // current: 1 |
| | | pipelineType: '管网', |
| | | dataType: '', |
| | | keyword: '' |
| | | }, |
| | | // pageSize: 10, |
| | | // current: 1, |
| | |
| | | console.log(tab, event) |
| | | }, |
| | | handlePipelineType (val) { |
| | | this.pipelineTypeOptions.forEach((itm) => { |
| | | if (val === itm.value) { |
| | | this.dataTypeOptions = itm.options |
| | | this.form.pipelineType = itm.label |
| | | this.form.labelList = itm.labelList |
| | | for (var i = 0; i < this.items.length; i++) { |
| | | const item = this.items[i] |
| | | if (val === item.name) { |
| | | this.subItems = item.layers |
| | | return |
| | | } |
| | | }) |
| | | this.form.dataType = this.dataTypeOptions[0].label |
| | | this.form.key = this.dataTypeOptions[0].key |
| | | }, |
| | | handleDataType (val) { |
| | | this.dataTypeOptions.forEach((itm) => { |
| | | if (val === itm.value) { |
| | | this.form.query = itm |
| | | } |
| | | }) |
| | | }, |
| | | async handleSearch () { |
| | | const param = { |
| | | pipelineType: this.form.pipelineType, |
| | | dataType: this.form.dataType |
| | | } |
| | | console.log(param) |
| | | var wfsHelper = new WfsHelper() |
| | | wfsHelper.addTypeName(this.form.query.layerName) |
| | | wfsHelper.addLike(this.form.query.key, this.form.keyword) |
| | | // todo 现在管网还没区分开类型,后面改 |
| | | wfsHelper.addTypeName('管网') |
| | | wfsHelper.addLike('name', this.form.keyword) |
| | | // const _this = this |
| | | const res = await AjaxUtils.GetDataAsynByUrl(wfsHelper.getUrl(), {}) |
| | | if (res instanceof Object && Object.prototype.hasOwnProperty.call(res, 'features')) { |
| | |
| | | } |
| | | }, |
| | | handleLocation (val) { |
| | | console.log(val) |
| | | const bound = this.L.geoJSON([val], {}).getBounds() |
| | | var layer = window.serviceLayerHelper.getByLayerId(val.id) |
| | | layer && layer.openPopup() |
| | | this.$store.state.map.map.flyToBounds(bound) |
| | | // var layer = window.layerFactory.flyByLayerId(val.id, bound) |
| | | window.map.flyToBounds(bound) |
| | | // layer && layer.openPopup() |
| | | } |
| | | } |
| | | } |
| | |
| | | const mapOptions = { |
| | | crs: L.CRS.EPSG4326, |
| | | minZoom: 3, |
| | | maxZoom: 18, |
| | | maxZoom: 17, |
| | | // center: [26, 104], |
| | | center: [38.828558921813965, 117.41676807403564], |
| | | // center: [29.454345703125, 113.40362548828125], |