1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
| <template>
| <view class="content">
| <u-top-tips ref="uTips"></u-top-tips>
| <!-- <u-button type="info" @click="acc">测试</u-button> -->
| <web-view :src="urls" @message="message"></web-view>
| </view>
| </template>
|
| <script>
| export default {
| data() {
| return {
| urls: '',
| // dataList: [],
| fn: null,
| rid: ''
| }
| },
| methods: {
| message(event) {
| console.log(event.detail.data);
| }
| },
| computed: {
| isOnTaskValue() {
| if (this.$store.state.changes) {
| return this.$store.state.isOnTaskValue;
| } else {
| return this.$store.state.isOnTaskValue;
| }
| }
| },
| watch: {
| isOnTaskValue: {
| handler(newName, oldName) {
| // console.log("map", this.isOnTaskValue);
| for (let k in this.isOnTaskValue) {
| if (this.isOnTaskValue[k].id == this.rid) {
| if (this.fn) {
| this.fn(this.isOnTaskValue[k].intlat);
| }
| }
| }
| },
| deep: true
| }
| },
| mounted() {},
| onReady() {
| let that = this;
| window['hBackMsg'] = (val) => {
| // console.log(val)
| let d = {
| rid: val.data.id,
| serid: val.data.serid,
| type: val.type,
| that: that,
| fn: () => {
| // that.getGrabOrders(that.current); //重获取数据
| if (val.fn) {
| // console.log(111)
| val.fn("success");
| }
| }
| }
| that.$store.commit('useWebScoketApi', d);
| }
| window['setIntLat'] = (val) => {
| // console.log(fn);
| that.fn = val.fn || '';
| that.rid = val.rid || '';
| }
| window['showTip '] = (val) => {
| that.$refs.uTips.show({
| title: val,
| type: "warning",
| duration: '2300'
| })
| }
| },
| onLoad: function(options) {
| var data = [];
| if (options.data == undefined) {
| data = JSON.stringify({
| appenUrl: "http://192.168.0.108:83/",
| butCT: "begin",
| buttype: 0,
| captain: "我",
| city: "南昌市",
| content: "测试",
| district: "西湖区",
| id: 37,
| integral: "222",
| iscation: "1",
| jnum: 3,
| line: "LINESTRING(115.8995839881188 28.687205773173343,115.89391916267935 28.678966027079593,115.90404718391959 28.673644524394046,115.91211526863638 28.681369286356936)",
| num: 1,
| nums: 0,
| province: "江西省",
| publisher: "管理",
| raddress: null,
| rname: "测试1",
| rtype: "0",
| serid: "1123598821738675201,",
| team: "你,他,它",
| time: "2022-02-18 14:15:52",
| type: "2",
| url: "http://223.82.109.183:2081/zhba/upload/20220218/67f0c8bf3e7b5024c64133691f265072.ico",
| })
|
| } else {
| data = options.data;
| }
| // console.log(data);
| // return
| // console.log(options.html)
| // var a = options.html != undefined ? options.html : "xcxMapJQ/xcxmap.html";
| // console.log(a)
| // let a = "grabOrdersMap/xcxmap.html";
| // this.urls = "http://223.82.109.183:2082/" + a + "?data=" + data;
| let name = 2; //1是本地 2是服务器
| // let name = 1;
| let b = this.$store.state.piAPI;
| if (b == '/api') {
| name = 1;
| }
| // "E:\liumy\qfqk\qfqks\qfqk-android\leafletMapOur\grabOrdersMap\xcxmap.html"
| let a = name == 1 ? "http://127.0.0.1:8848/qfqk-android/leafletMapOur/" : b.slice(0, b.indexOf('api'));
| // this.urls = a + "grabOrdersMap/xcxmap.html?data=" + data;
| // a = a.slice(0, a.indexOf('api'));
| this.urls = a + "grabOrdersMap/xcxmap.html?data=" + data;
| // http://127.0.0.1:8848/qfqk-android/grabOrdersMap/xcxmap.html
| // this.dataList = data;
| // console.log(this.urls);
| },
| beforeDestroy() {
| this.$store.commit("changegotuGrabOrders");
| }
| }
| </script>
|
| <style>
| .content {
| flex: 1;
| height: 100%;
| }
| </style>
|
|