b53fbd07c68aa2b7faa093b646f270cc851e49dc.svn-base 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  1. <template>
  2. <div class="app-container">
  3. <!-- <h1>牧场</h1> -->
  4. <div class="search">
  5. <el-date-picker v-model="table.getdataListParm.parammaps.date" :clearable="false" type="date" placeholder="选择日期" />
  6. <el-select v-model="table.getdataListParm.parammaps.lpplantype" placeholder="设备类型" class="filter-item" style="width: 120px;" clearable>
  7. <el-option v-for="item in equipmentTypeList" :key="item.id" :label="item.name" :value="item.id" />
  8. </el-select>
  9. <el-button class="successBorder" @click="handleSearch">查询</el-button>
  10. <el-button class="successBorder" @click="handleRefresh">重置</el-button>
  11. </div>
  12. <el-row :gutter="20">
  13. <el-col :span="8">
  14. <h4>设备列表</h4>
  15. <div class="table">
  16. <el-table
  17. :key="table.tableKey"
  18. v-loading="table.listLoading"
  19. element-loading-text="给我一点时间"
  20. :data="table.list"
  21. border
  22. fit
  23. highlight-current-row
  24. style="width: 100%;"
  25. :row-style="rowStyle"
  26. :cell-style="cellStyle"
  27. class="elTable table-fixed"
  28. :height="table1Height"
  29. @row-click="rowClick1"
  30. >
  31. <el-table-column label="设备类型" min-width="90px" align="center" prop="field1" />
  32. <el-table-column label="设备名称" min-width="80px" align="center" prop="field2" />
  33. <el-table-column label="GPS设备名称" min-width="90px" align="center" prop="field3" />
  34. <el-table-column label="总时长(分钟)" min-width="100px" align="center" prop="field4" />
  35. </el-table>
  36. </div>
  37. <h4>设备详情</h4>
  38. <div class="table">
  39. <el-table
  40. :key="table2.tableKey"
  41. v-loading="table2.listLoading"
  42. element-loading-text="给我一点时间"
  43. :data="table2.list"
  44. border
  45. fit
  46. highlight-current-row
  47. style="width: 100%;"
  48. :row-style="rowStyle"
  49. :cell-style="cellStyle"
  50. class="elTable table-fixed"
  51. :height="table1Height"
  52. @row-click="rowClick2"
  53. >
  54. <el-table-column label="设备名称" min-width="90px" align="center" prop="field1" />
  55. <el-table-column label="开始时间" min-width="80px" align="center" prop="field2" />
  56. <el-table-column label="结束时间" min-width="90px" align="center" prop="field3" />
  57. <el-table-column label="时长(分钟)" min-width="100px" align="center" prop="field4" />
  58. </el-table>
  59. </div>
  60. </el-col>
  61. <el-col :span="16" class="map">
  62. <h4>设备轨迹图</h4>
  63. <div v-if="isShow" style="text-align: center;line-height: 400px;">设备轨迹图加载失败,请刷新加载设备轨迹图</div>
  64. <div v-else id="yzMap" style="min-height: 400px;" />
  65. </el-col>
  66. </el-row>
  67. </div>
  68. </template>
  69. <script>
  70. import MapInit from '@/components/show/MapInit.js'
  71. import { GetDataByName } from '@/api/common'
  72. import Cookies from 'js-cookie'
  73. import { parseTime } from '@/utils/index.js'
  74. export default {
  75. name: 'EquipmentRunningTrack',
  76. data() {
  77. return {
  78. equipmentTypeList: [{ id: 0, name: '自走式TMR' }, { id: 1, name: '撒料设备TMR' }, { id: 2, name: '铲车' }, { id: 3, name: '推料车' }, { id: 4, name: '推粪车' }],
  79. // TMR设备列表
  80. table: {
  81. getdataListParm: {
  82. name: 'getprocessAnalysis',
  83. page: 1,
  84. offset: 1,
  85. pagecount: '',
  86. returntype: 'Map',
  87. parammaps: {
  88. pastureid: Cookies.get('pastureid'),
  89. date: parseTime(new Date(), '{y}-{m}-{d}'),
  90. iscompleted: '',
  91. tmrtname: '',
  92. lpplantype: ''
  93. }
  94. },
  95. tableKey: 0,
  96. list: [],
  97. total: 0,
  98. listLoading: true
  99. },
  100. table2: {
  101. getdataListParm: {
  102. name: 'getprocessAnalysisStr',
  103. page: 1,
  104. offset: 1,
  105. pagecount: 1,
  106. returntype: 'Map',
  107. parammaps: {
  108. pastureid: Cookies.get('pastureid'),
  109. id: ''
  110. }
  111. },
  112. tableKey: 0,
  113. list: [],
  114. total: 0,
  115. listLoading: true
  116. },
  117. table3: {
  118. getdataListParm: {
  119. name: 'getprocessAnalysisStr',
  120. page: 1,
  121. offset: 1,
  122. pagecount: 1,
  123. returntype: 'Map',
  124. parammaps: {
  125. pastureid: Cookies.get('pastureid'),
  126. id: ''
  127. }
  128. },
  129. tableKey: 0,
  130. // initializationMap: [116.40769, 39.91945],
  131. // startLngLatMap: [116.380967, 39.953285],
  132. // endLngLatMap: [116.424374, 39.914668],
  133. initializationMap: '',
  134. startLngLatMap: '',
  135. endLngLatMap: '',
  136. pointsList: [],
  137. total: 0,
  138. listLoading: true
  139. },
  140. table1Height: (document.documentElement.clientHeight - 85 - 250) / 2,
  141. rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
  142. cellStyle: { padding: 0 + 'px' },
  143. map: '', drivingRoute: '',
  144. zoom: 16.5,
  145. startIcon: 'http://lbs.tianditu.gov.cn/images/bus/start.png', // 起点图标
  146. endIcon: 'http://lbs.tianditu.gov.cn/images/bus/end.png', // 终点图标
  147. line: null,
  148. points: [],
  149. isShow: false
  150. }
  151. },
  152. created() {
  153. this.getList()
  154. console.log(document.documentElement.clientHeight - 85 - 250)
  155. },
  156. methods: {
  157. getList() {
  158. this.table.listLoading = true
  159. GetDataByName(this.table.getdataListParm).then(response => {
  160. console.log('TMR设备列表table数据', response.data.list)
  161. // if (response.data.list !== null) {
  162. // this.table.list = response.data.list
  163. // } else {
  164. // this.table.list = []
  165. // }
  166. this.table.list = [
  167. { 'field1': '自走式TMR', 'field2': '1', 'field3': '自走式GPS', 'field4': '100', 'id': '1' },
  168. { 'field1': '铲车', 'field2': '1号铲车', 'field3': '铲车GPS', 'field4': '60', 'id': '2' }
  169. ]
  170. this.table2.getdataListParm.parammaps.id = this.table.list[0].id
  171. this.getList2()
  172. setTimeout(() => {
  173. this.table.listLoading = false
  174. }, 100)
  175. })
  176. },
  177. handleSearch() {
  178. this.table.getdataListParm.offset = 1
  179. this.getList()
  180. },
  181. handleRefresh() {
  182. console.log('点击了重置')
  183. this.table.getdataListParm.offset = 1
  184. this.getList()
  185. },
  186. rowClick1(row, column, event) {
  187. if (row.id == '1') {
  188. this.table2.getdataListParm.parammaps.id = '1'
  189. } else {
  190. this.table2.getdataListParm.parammaps.id = '2'
  191. }
  192. this.getList2()
  193. },
  194. getList2() {
  195. this.table2.listLoading = false
  196. GetDataByName(this.table2.getdataListParm).then(response => {
  197. console.log('过程详情table数据', response.data.list)
  198. // if (response.data.list !== null) {
  199. // this.table2.list = response.data.list
  200. // } else {
  201. // this.table2.list = []
  202. // }
  203. if (this.table2.getdataListParm.parammaps.id == '1') {
  204. this.table2.list = [
  205. { 'field1': '1', 'field2': '05:29:43', 'field3': '05:37:47', 'field4': '8', 'id': '1' },
  206. { 'field1': '1', 'field2': '05:37:50', 'field3': '05:40:33', 'field4': '2.6', 'id': '2' }
  207. ]
  208. } else {
  209. this.table2.list = [
  210. { 'field1': '1号铲车', 'field2': '09:01:28', 'field3': '09:04:42', 'field4': '3.2', 'id': '3' }
  211. ]
  212. }
  213. this.table3.getdataListParm.parammaps.id = this.table2.list[0].id
  214. this.getList3()
  215. setTimeout(() => {
  216. this.table2.listLoading = false
  217. }, 100)
  218. })
  219. },
  220. rowClick2(row, column, event) {
  221. if (row.id == '1') {
  222. this.table3.getdataListParm.parammaps.id = '1'
  223. } else if (row.id == '2') {
  224. this.table3.getdataListParm.parammaps.id = '2'
  225. } else {
  226. this.table3.getdataListParm.parammaps.id = '3'
  227. }
  228. if (this.table3.getdataListParm.parammaps.id == '1') {
  229. this.table3.initializationMap = [117.88, 33.82]
  230. this.table3.pointsList = [
  231. { 'longitude': 117.8826770, 'latitude': 33.8208131 },
  232. { 'longitude': 117.8826372, 'latitude': 33.8213032 },
  233. { 'longitude': 117.8826971, 'latitude': 33.8217033 },
  234. { 'longitude': 117.8827081, 'latitude': 33.8220751 },
  235. { 'longitude': 117.8829982, 'latitude': 33.8220152 },
  236. { 'longitude': 117.8831583, 'latitude': 33.8220853 },
  237. { 'longitude': 117.8833981, 'latitude': 33.8221151 },
  238. { 'longitude': 117.8835982, 'latitude': 33.8219852 },
  239. { 'longitude': 117.8839703, 'latitude': 33.8220433 },
  240. { 'longitude': 117.8838709, 'latitude': 33.8222431 },
  241. { 'longitude': 117.8840024, 'latitude': 33.8225752 },
  242. { 'longitude': 117.8837024, 'latitude': 33.8226553 },
  243. { 'longitude': 117.8833024, 'latitude': 33.8225956 },
  244. { 'longitude': 117.8830024, 'latitude': 33.8226556 },
  245. { 'longitude': 117.8827133, 'latitude': 33.8226505 },
  246. { 'longitude': 117.8826033, 'latitude': 33.8218505 },
  247. { 'longitude': 117.8825471, 'latitude': 33.8208586 }
  248. ]
  249. // this.table3.startLngLatMap = [117.892022, 33.824756]
  250. // this.table3.endLngLatMap = [117.891159, 33.826252]
  251. } else if (this.table3.getdataListParm.parammaps.id == '2') {
  252. this.table3.initializationMap = [117.88, 33.82]
  253. this.table3.pointsList = [
  254. { 'longitude': 117.8826684, 'latitude': 33.8220995 },
  255. { 'longitude': 117.8823899, 'latitude': 33.8222107 },
  256. { 'longitude': 117.882071, 'latitude': 33.822077 },
  257. { 'longitude': 117.8819408, 'latitude': 33.8221457 },
  258. { 'longitude': 117.881294, 'latitude': 33.8222307 },
  259. { 'longitude': 117.881294, 'latitude': 33.8226243 },
  260. { 'longitude': 117.8814287, 'latitude': 33.8232728 },
  261. { 'longitude': 117.8816937, 'latitude': 33.8231791 },
  262. { 'longitude': 117.8819363, 'latitude': 33.8232328 },
  263. { 'longitude': 117.8822417, 'latitude': 33.8232791 },
  264. { 'longitude': 117.882592, 'latitude': 33.8231304 },
  265. { 'longitude': 117.8827448, 'latitude': 33.8227855 },
  266. { 'longitude': 117.8826549, 'latitude': 33.8224481 },
  267. { 'longitude': 117.8826819, 'latitude': 33.822092 }
  268. ]
  269. } else {
  270. this.table3.initializationMap = [117.88, 33.82]
  271. this.table3.pointsList = [
  272. { 'longitude': 117.8828031, 'latitude': 33.823599 },
  273. { 'longitude': 117.8830906, 'latitude': 33.8236015 },
  274. { 'longitude': 117.8832433, 'latitude': 33.8235127 },
  275. { 'longitude': 117.8834544, 'latitude': 33.8235777 },
  276. { 'longitude': 117.8836161, 'latitude': 33.823509 },
  277. { 'longitude': 117.8838079, 'latitude': 33.8235015 },
  278. { 'longitude': 117.8840159, 'latitude': 33.823554 },
  279. { 'longitude': 117.8840248, 'latitude': 33.8232528 },
  280. { 'longitude': 117.8838048, 'latitude': 33.8233503 },
  281. { 'longitude': 117.8835532, 'latitude': 33.8233128 },
  282. { 'longitude': 117.8833511, 'latitude': 33.8233703 },
  283. { 'longitude': 117.8831162, 'latitude': 33.8233639 },
  284. { 'longitude': 117.8828225, 'latitude': 33.8234215 },
  285. { 'longitude': 117.8825822, 'latitude': 33.8234577 },
  286. { 'longitude': 117.8825022, 'latitude': 33.8234077 },
  287. { 'longitude': 117.8821698, 'latitude': 33.8234015 },
  288. { 'longitude': 117.881797, 'latitude': 33.8235052 },
  289. { 'longitude': 117.8815096, 'latitude': 33.8234865 },
  290. { 'longitude': 117.8813659, 'latitude': 33.8235952 },
  291. { 'longitude': 117.8813614, 'latitude': 33.8237577 },
  292. { 'longitude': 117.8816353, 'latitude': 33.8237002 },
  293. { 'longitude': 117.8820108, 'latitude': 33.8236552 },
  294. { 'longitude': 117.8821708, 'latitude': 33.8237152 },
  295. { 'longitude': 117.8822708, 'latitude': 33.8236152 },
  296. { 'longitude': 117.8824708, 'latitude': 33.8236152 },
  297. { 'longitude': 117.8825531, 'latitude': 33.8235588 },
  298. { 'longitude': 117.8828031, 'latitude': 33.8236088 }
  299. ]
  300. // this.table3.startLngLatMap = [117.754060, 33.505650]
  301. // this.table3.endLngLatMap = [117.728130, 33.603550]
  302. }
  303. // this.getList3()
  304. MapInit.init().then(
  305. T => {
  306. this.isShow = false
  307. this.T = T
  308. this.map = new T.Map('yzMap', config) // /初始化地图对象
  309. const ctrl = new T.Control.MapType()
  310. this.map.addControl(ctrl)
  311. this.map.centerAndZoom(new T.LngLat(this.table3.initializationMap[0], this.table3.initializationMap[1]), this.zoom) // 初始化
  312. var config = {
  313. policy: 0, // 驾车策略
  314. onSearchComplete: this.searchResult // 检索完成后的回调函数
  315. }
  316. console.log(this.map, '=========this.map')
  317. // var map = this.map
  318. // this.map.disableDrag()
  319. // setTimeout(() => {
  320. // alert('可以拖拽地图了')
  321. // this.map.enableDrag()
  322. // }, 2000)
  323. this.map.setMapType(TMAP_HYBRID_MAP)
  324. this.points = []
  325. for (let i = 0; i < this.table3.pointsList.length; i++) {
  326. this.points.push(new T.LngLat(this.table3.pointsList[i].longitude, this.table3.pointsList[i].latitude))
  327. }
  328. // 创建线对象
  329. this.line = new T.Polyline(this.points, {
  330. color: 'red'
  331. })
  332. // 向地图上添加线
  333. this.map.addOverLay(this.line)
  334. // this.drivingRoute = new T.DrivingRoute(this.map, config)
  335. // this.searchDrivingRoute()
  336. // this.map.enableInertia()
  337. }).catch(error => {
  338. console.log(error, '666')
  339. this.isShow = true
  340. })
  341. },
  342. getList3() {
  343. this.table3.listLoading = false
  344. GetDataByName(this.table3.getdataListParm).then(response => {
  345. // if (response.data.list !== null) {
  346. // this.table2.list = response.data.list
  347. // } else {
  348. // this.table2.list = []
  349. // }
  350. if (this.table3.getdataListParm.parammaps.id == '1') {
  351. this.table3.initializationMap = [117.88199, 33.82250]
  352. this.table3.pointsList = [
  353. { 'longitude': 117.8826770, 'latitude': 33.8208131 },
  354. { 'longitude': 117.8826372, 'latitude': 33.8213032 },
  355. { 'longitude': 117.8826971, 'latitude': 33.8217033 },
  356. { 'longitude': 117.8827081, 'latitude': 33.8220751 },
  357. { 'longitude': 117.8829982, 'latitude': 33.8220152 },
  358. { 'longitude': 117.8831583, 'latitude': 33.8220853 },
  359. { 'longitude': 117.8833981, 'latitude': 33.8221151 },
  360. { 'longitude': 117.8835982, 'latitude': 33.8219852 },
  361. { 'longitude': 117.8839703, 'latitude': 33.8220433 },
  362. { 'longitude': 117.8838709, 'latitude': 33.8222431 },
  363. { 'longitude': 117.8840024, 'latitude': 33.8225752 },
  364. { 'longitude': 117.8837024, 'latitude': 33.8226553 },
  365. { 'longitude': 117.8833024, 'latitude': 33.8225956 },
  366. { 'longitude': 117.8830024, 'latitude': 33.8226556 },
  367. { 'longitude': 117.8827133, 'latitude': 33.8226505 },
  368. { 'longitude': 117.8826033, 'latitude': 33.8218505 },
  369. { 'longitude': 117.8825471, 'latitude': 33.8208586 }
  370. ]
  371. // this.table3.startLngLatMap = [117.892022, 33.824756]
  372. // this.table3.endLngLatMap = [117.891159, 33.826252]
  373. } else if (this.table3.getdataListParm.parammaps.id == '2') {
  374. this.table3.initializationMap = [117.88, 33.82]
  375. this.table3.pointsList = [
  376. { 'longitude': 117.8826684, 'latitude': 33.8220995 },
  377. { 'longitude': 117.8823899, 'latitude': 33.8222107 },
  378. { 'longitude': 117.882071, 'latitude': 33.822077 },
  379. { 'longitude': 117.8819408, 'latitude': 33.8221457 },
  380. { 'longitude': 117.881294, 'latitude': 33.8222307 },
  381. { 'longitude': 117.881294, 'latitude': 33.8226243 },
  382. { 'longitude': 117.8814287, 'latitude': 33.8232728 },
  383. { 'longitude': 117.8816937, 'latitude': 33.8231791 },
  384. { 'longitude': 117.8819363, 'latitude': 33.8232328 },
  385. { 'longitude': 117.8822417, 'latitude': 33.8232791 },
  386. { 'longitude': 117.882592, 'latitude': 33.8231304 },
  387. { 'longitude': 117.8827448, 'latitude': 33.8227855 },
  388. { 'longitude': 117.8826549, 'latitude': 33.8224481 },
  389. { 'longitude': 117.8826819, 'latitude': 33.822092 }
  390. ]
  391. } else {
  392. this.table3.initializationMap = [117.88, 33.82]
  393. this.table3.pointsList = [
  394. { 'longitude': 117.8828031, 'latitude': 33.823599 },
  395. { 'longitude': 117.8830906, 'latitude': 33.8236015 },
  396. { 'longitude': 117.8832433, 'latitude': 33.8235127 },
  397. { 'longitude': 117.8834544, 'latitude': 33.8235777 },
  398. { 'longitude': 117.8836161, 'latitude': 33.823509 },
  399. { 'longitude': 117.8838079, 'latitude': 33.8235015 },
  400. { 'longitude': 117.8840159, 'latitude': 33.823554 },
  401. { 'longitude': 117.8840248, 'latitude': 33.8232528 },
  402. { 'longitude': 117.8838048, 'latitude': 33.8233503 },
  403. { 'longitude': 117.8835532, 'latitude': 33.8233128 },
  404. { 'longitude': 117.8833511, 'latitude': 33.8233703 },
  405. { 'longitude': 117.8831162, 'latitude': 33.8233639 },
  406. { 'longitude': 117.8828225, 'latitude': 33.8234215 },
  407. { 'longitude': 117.8825822, 'latitude': 33.8234577 },
  408. { 'longitude': 117.8825022, 'latitude': 33.8234077 },
  409. { 'longitude': 117.8821698, 'latitude': 33.8234015 },
  410. { 'longitude': 117.881797, 'latitude': 33.8235052 },
  411. { 'longitude': 117.8815096, 'latitude': 33.8234865 },
  412. { 'longitude': 117.8813659, 'latitude': 33.8235952 },
  413. { 'longitude': 117.8813614, 'latitude': 33.8237577 },
  414. { 'longitude': 117.8816353, 'latitude': 33.8237002 },
  415. { 'longitude': 117.8820108, 'latitude': 33.8236552 },
  416. { 'longitude': 117.8821708, 'latitude': 33.8237152 },
  417. { 'longitude': 117.8822708, 'latitude': 33.8236152 },
  418. { 'longitude': 117.8824708, 'latitude': 33.8236152 },
  419. { 'longitude': 117.8825531, 'latitude': 33.8235588 },
  420. { 'longitude': 117.8828031, 'latitude': 33.8236088 }
  421. ]
  422. // this.table3.startLngLatMap = [117.754060, 33.505650]
  423. // this.table3.endLngLatMap = [117.728130, 33.603550]
  424. }
  425. this.roadMap()
  426. // setTimeout(() => {
  427. // this.table3.listLoading = false
  428. // }, 100)
  429. })
  430. },
  431. roadMap() {
  432. MapInit.init().then(
  433. T => {
  434. this.isShow = false
  435. this.T = T
  436. this.map = new T.Map('yzMap', config) // /初始化地图对象
  437. const ctrl = new T.Control.MapType()
  438. this.map.addControl(ctrl)
  439. this.map.centerAndZoom(new T.LngLat(this.table3.initializationMap[0], this.table3.initializationMap[1]), this.zoom) // 初始化
  440. var config = {
  441. policy: 0, // 驾车策略
  442. onSearchComplete: this.searchResult // 检索完成后的回调函数
  443. }
  444. // var map = this.map
  445. this.map.disableDrag()
  446. // setTimeout(() => {
  447. // alert('可以拖拽地图了')
  448. // this.map.enableDrag()
  449. // }, 2000)
  450. this.map.setMapType(TMAP_HYBRID_MAP)
  451. this.points = []
  452. for (let i = 0; i < this.table3.pointsList.length; i++) {
  453. this.points.push(new T.LngLat(this.table3.pointsList[i].longitude, this.table3.pointsList[i].latitude))
  454. }
  455. // 创建线对象
  456. this.line = new T.Polyline(this.points, {
  457. color: 'red'
  458. })
  459. // 向地图上添加线
  460. this.map.addOverLay(this.line)
  461. // this.drivingRoute = new T.DrivingRoute(this.map, config)
  462. // this.searchDrivingRoute()
  463. // this.map.enableInertia()
  464. // console.log(JSON.stringify(this.map), '=========this.map')
  465. }).catch(error => {
  466. console.log(error, '666')
  467. this.isShow = true
  468. })
  469. },
  470. getDistance(points) {
  471. var r = 0
  472. for (var k = 0; k < points.length - 1; k++) {
  473. r += points[k].distanceTo(points[k + 1])
  474. }
  475. return r
  476. }
  477. // searchDrivingRoute() {
  478. // this.map.clearOverLays()
  479. // // var startLngLat = new T.LngLat(this.table3.startLngLatMap[0], this.table3.startLngLatMap[1])
  480. // // var endLngLat = new T.LngLat(this.table3.endLngLatMap[0], this.table3.endLngLatMap[1])
  481. // var startLngLat = new T.LngLat(this.table3.pointsList[0].longitude, this.table3.pointsList[0].latitude)
  482. // var endLngLat = new T.LngLat(this.table3.pointsList[this.table3.pointsList.length - 1].longitude, this.table3.pointsList[this.table3.pointsList.length - 1].latitude)
  483. // // 驾车路线搜索
  484. // this.drivingRoute.search(startLngLat, endLngLat)
  485. // },
  486. // createRoute(lnglats, lineColor) {
  487. // var _CarTrack = new T.CarTrack(this.map, {
  488. // interval: 20,
  489. // speed: 10,
  490. // dynamicLine: false,
  491. // Datas: lnglats,
  492. // polylinestyle: { color: '#2C64A7', width: 5, opacity: 0.9 }
  493. // })
  494. // _CarTrack.start()
  495. // },
  496. // createStartMarker(result) {
  497. // var startMarker = new T.Marker(result.getStart(), {
  498. // icon: new T.Icon({
  499. // iconUrl: this.startIcon,
  500. // iconSize: new T.Point(44, 34),
  501. // iconAnchor: new T.Point(12, 31)
  502. // })
  503. // })
  504. // this.map.addOverLay(startMarker)
  505. // var endMarker = new T.Marker(result.getEnd(), {
  506. // icon: new T.Icon({
  507. // iconUrl: this.endIcon,
  508. // iconSize: new T.Point(44, 34),
  509. // iconAnchor: new T.Point(12, 31)
  510. // })
  511. // })
  512. // this.map.addOverLay(endMarker)
  513. // },
  514. // searchResult(result) {
  515. // // 添加起始点
  516. // this.createStartMarker(result)
  517. // var obj = result
  518. // // 获取方案个数
  519. // var routes = result.getNumPlans()
  520. // for (var i = 0; i < routes; i++) {
  521. // // 获得单条驾车方案结果对象
  522. // var plan = result.getPlan(i)
  523. // console.log(plan, 'plan')
  524. // var that = this
  525. // that.createRoute(plan.getPath())
  526. // }
  527. // }
  528. }
  529. }
  530. </script>
  531. <style lang="scss" scoped>
  532. .search{padding-top:10px;clear: both;}
  533. .table{margin-top:10px;}
  534. .detail{
  535. height:84px;border: 1px solid #EBEEF5;padding-left:10px;font:16px/32px '';color:#333;
  536. .detail-t{margin-top: 10px;}
  537. .detail-b{margin-bottom: 10px;}
  538. }
  539. .map{position: relative;min-height: 480px;}
  540. #yzMap {
  541. width: 95%;
  542. height: 100%;
  543. position: absolute;
  544. }
  545. </style>