Commit 9798e061 by lichengming

修改了委托地区查询

parent 7260eb53
...@@ -20,5 +20,13 @@ export default { ...@@ -20,5 +20,13 @@ export default {
pageCustomer: data => pageCustomer: data =>
http http
.post('soil/v1/statistics/page_customer_entrust_statistics', data) .post('soil/v1/statistics/page_customer_entrust_statistics', data)
.then(res => res),
listCoordinateStatistics: data =>
http
.post('soil/v1/statistics/list_coordinate_statistics', data)
.then(res => res),
pageCustomerEntrustStatistics: data =>
http
.post('soil/v1/statistics/page_customer_entrust_statistics', data)
.then(res => res) .then(res => res)
} }
...@@ -22,31 +22,7 @@ ...@@ -22,31 +22,7 @@
<ClientLocationSearch ref="clientMap"></ClientLocationSearch> <ClientLocationSearch ref="clientMap"></ClientLocationSearch>
</Col> </Col>
<Col span="10"> <Col span="10">
<element-table <LocationWatch></LocationWatch>
id="table-year"
ref="pageTable"
:get-page="getPage"
hide-checkbox
>
<el-table-column fixed type="index" label="序号" width="100">
</el-table-column>
<el-table-column
v-for="item in pageColumns"
:key="item.key"
:prop="item.key"
:label="item.title"
:width="item.width"
:min-width="200"
:fixed="item.fixed?item.fixed:undefined"
>
<template slot-scope="scope">
<div v-if="item.detail">
<a @click.stop="_detailModal(scope.row)">{{ scope.row[item.key] }}</a>
</div>
<span v-else>{{ scope.row[item.key] }}</span>
</template>
</el-table-column>
</element-table>
</Col> </Col>
</Row> </Row>
</Col> </Col>
...@@ -58,8 +34,9 @@ ...@@ -58,8 +34,9 @@
<script> <script>
import ClientLocationSearch from './ClientLocationSearch' import ClientLocationSearch from './ClientLocationSearch'
import LocationWatch from './LocationWatch'
export default { export default {
components: { ClientLocationSearch }, components: { ClientLocationSearch, LocationWatch },
data() { data() {
return { return {
formObj: {}, formObj: {},
......
<template> <template>
<div style="position:relative;"> <div style="position:relative;">
<div style="margin-top: 6px ;position:relative; "> <div style="margin-top: 6px ;position:relative; ">
<Form id="edit-form11" label-width="50" inline > <Form id="edit-form11" :label-width="50" inline >
<label class="label-sign"></label> <label class="label-sign"></label>
<!-- <Form-item label="人员:" prop="username" >--> <!-- <Form-item label="人员:" prop="username" >-->
<!-- <Select v-model="formObj.username" @on-change="_chargerChange" :label-in-value="true" style="width: 100px" name="username"--> <!-- <Select v-model="formObj.username" @on-change="_chargerChange" :label-in-value="true" style="width: 100px" name="username"-->
...@@ -21,14 +21,19 @@ ...@@ -21,14 +21,19 @@
<!-- </Form-item>--> <!-- </Form-item>-->
</Form> </Form>
</div> </div>
<div id="map"></div> <div id="map" :style="contentStyleObj"></div>
</div> </div>
</template> </template>
<script> <script>
import { soilStatistics } from '../../../api'
export default { export default {
name: 'PeopleLocationSearchVue', name: 'PeopleLocationSearchVue',
data() { data() {
return { return {
contentStyleObj: {
height: ''
},
regdateBegin: '', regdateBegin: '',
regdateEnd: '', regdateEnd: '',
value: '', value: '',
...@@ -41,12 +46,18 @@ export default { ...@@ -41,12 +46,18 @@ export default {
locationList: [] locationList: []
} }
}, },
created() {
this.getHeight()
},
mounted() { mounted() {
// this._getLocationList() this._getLocationList()
// this._getUserList() // this._getUserList()
this.getMapInfo() // this.getMapInfo()
}, },
methods: { methods: {
getHeight() {
this.contentStyleObj.height = window.innerHeight - 100 + 'px'
},
_getUserList() { _getUserList() {
// 用户列表 // 用户列表
this.$store.dispatch('LmsStaffInfo/list', { status: 1 }).then(() => { this.$store.dispatch('LmsStaffInfo/list', { status: 1 }).then(() => {
...@@ -63,15 +74,20 @@ export default { ...@@ -63,15 +74,20 @@ export default {
}) })
}, },
_getLocationList() { _getLocationList: async function() {
this.$store const result = await soilStatistics.listCoordinateStatistics()
.dispatch('LmsStaffInfo/getLocationList', this.formObj) if (result) {
.then(() => { console.log(result)
this.locationList = this.$store.state.LmsStaffInfo.listLocation this.getMapInfo(result)
}
this.getMapInfo(this.locationList) // this.$store
// this.getMapInfoPoint(this.locationList); // .dispatch('LmsStaffInfo/getLocationList', this.formObj)
}) // .then(() => {
// this.locationList = this.$store.state.LmsStaffInfo.listLocation
//
// this.getMapInfo(this.locationList)
// // this.getMapInfoPoint(this.locationList);
// })
}, },
getMapInfo(data) { getMapInfo(data) {
...@@ -102,42 +118,44 @@ export default { ...@@ -102,42 +118,44 @@ export default {
} }
) )
console.log(myIcon) console.log(myIcon)
// for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
// const location = data[i] // const location = data[i]
// const objs = location.usersList // const objs = location.usersList
// const userName = location.username // const clientName = location.client
// const pois = []
// console.log('--objs-', objs) // eslint-disable-next-line no-undef
// pois[i] = new BMap.Point(data[i].longitude, data[i].latitude)
// const pois = [] console.log('--pois-', pois)
// for (let j = 0; j < objs.length; j++) { // for (let j = 0; j < objs.length; j++) {
// const obj = objs[j] // const obj = objs[j]
// // eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
// pois[j] = new BMap.Point(obj.longitude, obj.latitude) // pois[j] = new BMap.Point(obj.longitude, obj.latitude)
// // eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
// const marker = new BMap.Marker( const marker = new BMap.Marker(
// // eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
// new BMap.Point(obj.longitude, obj.latitude), new BMap.Point(data[i].longitude, data[i].latitude),
// { icon: myIcon } { icon: myIcon }
// ) // 创建标注 ) // 创建标注
// const content = const content =
// '人员:' + '委托单位:' +
// userName + data[i].client +
// ' </br> ' + '<br>' +
// '时间:' + '钻孔名称:' +
// this.$dateformat(obj.sendDate, 'yyyy-mm-dd HH:MM:ss') data[i].boreholeName +
// map.addOverlay(marker) // 将标注添加到地图中 '<br>' +
// addClickHandler(content, marker) '钻孔位置:' +
data[i].boreholeLocation
map.addOverlay(marker) // 将标注添加到地图中
addClickHandler(content, marker)
// } // }
// console.log('--pois-', pois) // eslint-disable-next-line no-undef
// // eslint-disable-next-line no-undef
// const polyline = new BMap.Polyline(pois, { // const polyline = new BMap.Polyline(pois, {
// strokeColor: 'blue', // strokeColor: 'blue',
// strokeWeight: 2, // strokeWeight: 2,
// strokeOpacity: 1 // strokeOpacity: 1
// }) // 创建折线 // }) // 创建折线
// map.addOverlay(polyline) // 增加折线 // map.addOverlay(polyline) // 增加折线
// } }
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
function addClickHandler(content, marker) { function addClickHandler(content, marker) {
marker.addEventListener('click', function(e) { marker.addEventListener('click', function(e) {
...@@ -180,9 +198,14 @@ export default { ...@@ -180,9 +198,14 @@ export default {
} }
</script> </script>
<style scoped> <style>
#map { #map {
height: 400px;
margin-top: -9px; margin-top: -9px;
} }
.BMap_cpyCtrl {
display: none !important;
}
.anchorBL {
display: none !important;
}
</style> </style>
<template>
<div>
<div class="layout-content-padding">
<div class="layout-content-main intra-line">
<Row>
<!-- 查询-->
<!-- 表格 -->
<Col span="24">
<element-table-height
ref="pageTable"
:table-height="tableHeight"
:get-page="getPage"
@on-result-change="_tableResultChange"
hide-checkbox
>
<el-table-column
:prop="item.key"
:label="item.title"
:width="item.width"
:min-width="200"
:fixed="item.fixed?item.fixed:undefined"
v-for="item in pageColumns"
:key="item.key"
show-overflow-tooltip sortable>
<template slot-scope="scope">
<span v-if="item.key === 'status'">
<!-- {{ scope.row[item.value] === PASS?'通过':'' }}-->
{{ scope.row.status.display }}
</span>
<span v-else-if="item.key==='ctime'">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</span>
<div v-else-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd HH:MM:ss'):''}}</div>
<span v-else>{{ scope.row[item.key] }}</span>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- label="操作"-->
<!-- align="center"-->
<!-- :width="$optColWidth(iconMsg)"-->
<!-- fixed="right" v-if="$optColWidth(iconMsg)>0?true:false">-->
<!-- <template slot-scope="scope">-->
<!-- <IconList :msg="type == 1?iconMsg1:iconMsg" @on-result-change="_iconClick" :rowData="scope.row"-->
<!-- :rowIndex="scope.$index"></IconList>-->
<!-- </template>-->
<!-- </el-table-column>-->
</element-table-height>
</Col>
</Row>
</div>
</div>
</div>
</template>
<script>
// eslint-disable-next-line no-unused-vars
import global from '../../../api/config'
import { soilStatistics } from '../../../api'
export default {
name: 'FormFiles',
components: {},
data() {
return {
getPage: {
records: []
// records: [
// {formName: '79874'}
// ]
},
detectionDate: '',
formObj: {
username: '',
sendDate: '',
sendDateBegin: '',
sendDateEnd: ''
},
startTime: '',
endTime: '',
pageColumns: [
{ title: '委托单位', key: 'client' },
{ title: '委托数量', key: 'quantity' }
],
selectIds: [],
selectData: [],
iconMsg: [
// { type: 'images', id: '', name: '预览' },
// { type: 'ios-download', id: '', name: '下载' },
// { type: 'ios-clock', id: '', name: '操作日志' },
]
}
},
computed: {
tableHeight: function() {
return this.$tableHeight('noSearch') + 60
}
},
mounted() {
this._page()
},
methods: {
_formSearch() {
this.$refs.pageTable._pageChange(1)
},
_search() {
this._page()
},
_page: async function() {
const result = await soilStatistics.pageCustomerEntrustStatistics(
this.$serializeFormSearch(this.formObj)
)
if (result) {
this.getPage.records = result
}
},
_tableResultChange(msg, data) {
switch (msg) {
case 'page':
this._page()
break
case 'iconClick':
this._iconClick(data.name, data.rowData)
break
default:
this._page()
}
},
_iconClick(res, data) {
switch (res) {
case '预览':
this._viewReport(data)
break
}
}
// 日期查询
// _dateChange(date) {
// // eslint-disable-next-line no-sequences
// ;(this.formObj.sendDateBegin = date[0]),
// (this.formObj.sendDateEnd = date[1])
// }
}
}
</script>
<style scoped>
</style>
...@@ -15,11 +15,13 @@ import FileManage from '../components/file/file-manage/FileManage' ...@@ -15,11 +15,13 @@ import FileManage from '../components/file/file-manage/FileManage'
import VXESettingCol from '../components/base/VXESettingCol' import VXESettingCol from '../components/base/VXESettingCol'
import ElTableNoPage from '../components/table/ElTableNoPage' import ElTableNoPage from '../components/table/ElTableNoPage'
import PhotoManage from '../components/file/photo-manage/PhotoManage' import PhotoManage from '../components/file/photo-manage/PhotoManage'
import elementTableHeight from '../components/table/elementTableHeight'
Vue.use(VXETable) Vue.use(VXETable)
Vue.component('btn-list', btnList) Vue.component('btn-list', btnList)
Vue.component('icon-list', iconList) Vue.component('icon-list', iconList)
Vue.component('element-table', elementTable) Vue.component('element-table', elementTable)
Vue.component('element-table-height', elementTableHeight)
Vue.component('modal-footer', modalFooter) Vue.component('modal-footer', modalFooter)
Vue.component('PTVXETable', PTVXETable) Vue.component('PTVXETable', PTVXETable)
Vue.component('PTVXETableData', PTVXETableData) Vue.component('PTVXETableData', PTVXETableData)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment