Commit d6ddfcc4eee95a0370c49b3b5a886a5b7542d2e8

Authored by wesley88
1 parent 65cbd405

1

admin-web-master/public/index.html
@@ -8,10 +8,10 @@ @@ -8,10 +8,10 @@
8 <!-- <title><%= htmlWebpackPlugin.options.title %></title> --> 8 <!-- <title><%= htmlWebpackPlugin.options.title %></title> -->
9 <title>招商服务系统</title> 9 <title>招商服务系统</title>
10 <!-- 删除: <script src="https://map.qq.com/api/js?v=2.exp&key=YOUR_API_KEY&callback=initMap"></script> --> 10 <!-- 删除: <script src="https://map.qq.com/api/js?v=2.exp&key=YOUR_API_KEY&callback=initMap"></script> -->
11 - <script src="https://map.qq.com/api/js?v=2.exp&key=7K5BZ-5MUCL-5Z4PX-ML3QG-YAGZE-TNBLG"></script>  
12 - <script src="https://map.qq.com/api/gljs?v=1.exp&key=7K5BZ-5MUCL-5Z4PX-ML3QG-YAGZE-TNBLG"></script>  
13 - <script charset="utf-8" src="https://map.qq.com/api/gljs?libraries=tools&v=1.exp&key=7K5BZ-5MUCL-5Z4PX-ML3QG-YAGZE-TNBLG"></script>  
14 - <!-- <script charset="utf-8" src="https://map.qq.com/api/gljs?v=1.exp&key=7K5BZ-5MUCL-5Z4PX-ML3QG-YAGZE-TNBLG&libraries=geometry"></script> --> 11 + <script src="https://map.qq.com/api/js?v=2.exp&key=PGRBZ-Z3FRJ-DTYFB-XNX4X-DC6HZ-MCFYU"></script>
  12 + <script src="https://map.qq.com/api/gljs?v=1.exp&key=PGRBZ-Z3FRJ-DTYFB-XNX4X-DC6HZ-MCFYU"></script>
  13 + <script charset="utf-8" src="https://map.qq.com/api/gljs?libraries=tools&v=1.exp&key=PGRBZ-Z3FRJ-DTYFB-XNX4X-DC6HZ-MCFYU"></script>
  14 + <!-- <script charset="utf-8" src="https://map.qq.com/api/gljs?v=1.exp&key=PGRBZ-Z3FRJ-DTYFB-XNX4X-DC6HZ-MCFYU&libraries=geometry"></script> -->
15 </head> 15 </head>
16 <body> 16 <body>
17 <noscript> 17 <noscript>
admin-web-master/src/components/add/addht.vue
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 </el-row> 14 </el-row>
15 </el-form> 15 </el-form>
16 <TitleWithCircle title="合同信息" style="margin-bottom: 20px;" /> 16 <TitleWithCircle title="合同信息" style="margin-bottom: 20px;" />
17 - <mbadd v-if="isshow" ref="rulesallForm" :list1="list1" :isdel="isdel" /> 17 + <mbadd v-if="isshow" ref="rulesallForm" :list1="list1" :isdel="isdel" @changeContractType="changeContractType"/>
18 <div style="margin-top: 20px;margin-left: 65px;"> 18 <div style="margin-top: 20px;margin-left: 65px;">
19 <el-button @click="close()" class="buttonHover" style="color: #606266;border: 1px solid #DBDBDB;background-color: #fff;">取消</el-button> 19 <el-button @click="close()" class="buttonHover" style="color: #606266;border: 1px solid #DBDBDB;background-color: #fff;">取消</el-button>
20 <el-button @click="add()" style="background-color: #3F9B6A;color: #fff;">确定</el-button> 20 <el-button @click="add()" style="background-color: #3F9B6A;color: #fff;">确定</el-button>
@@ -65,6 +65,7 @@ import { @@ -65,6 +65,7 @@ import {
65 onmbinfo:{}, 65 onmbinfo:{},
66 mbData:[], 66 mbData:[],
67 list1: [], 67 list1: [],
  68 + list2:[],
68 rulesmbinfo:{ 69 rulesmbinfo:{
69 type: [{ 70 type: [{
70 required: true, 71 required: true,
@@ -113,11 +114,18 @@ import { @@ -113,11 +114,18 @@ import {
113 //模版信息 114 //模版信息
114 templateInformation:'', 115 templateInformation:'',
115 //模版url 116 //模版url
116 - templateInformationUrl:'' 117 + templateInformationUrl:'',
  118 +
  119 + //跳转链接
  120 + redirectUrl:'',
  121 + //封面图片
  122 + coverImage:'',
117 }, 123 },
118 templateAttachment:'', 124 templateAttachment:'',
119 AddData:[], 125 AddData:[],
120 - dpinfo:null 126 + dpinfo:null,
  127 + redirectUrl:'',
  128 + coverImage:'',
121 } 129 }
122 }, 130 },
123 props: { 131 props: {
@@ -184,8 +192,44 @@ import { @@ -184,8 +192,44 @@ import {
184 if(this.info.templateInformationUrl){ 192 if(this.info.templateInformationUrl){
185 this.templateAttachment = this.info.templateInformationUrl 193 this.templateAttachment = this.info.templateInformationUrl
186 } 194 }
  195 + if(this.info.redirectUrl){
  196 + this.redirectUrl = this.info.redirectUrl
  197 + }
  198 + if(this.info.coverImage){
  199 + this.coverImage = this.info.coverImage
  200 + }
187 }, 201 },
188 methods: { 202 methods: {
  203 + changeContractType(e) {
  204 + console.error(e)
  205 + this.isshow = false
  206 + if(e == '广告位合同') {
  207 + this.list1.push({
  208 + name: '跳转链接',
  209 + key: 'redirectUrl',
  210 + type: '单行文本',
  211 + isrequired: '是',
  212 + width: '100%(一行)',
  213 + length: '20',
  214 + value: this.redirectUrl ,
  215 + })
  216 + this.list1.push({
  217 + name: '封面图片',
  218 + key: 'coverImage',
  219 + type: '图片',
  220 + isrequired: '是',
  221 + width: '100%(一行)',
  222 + length: '',
  223 + value: this.coverImage,
  224 + })
  225 +
  226 + } else {
  227 + this.list1 = this.list2
  228 + }
  229 + setTimeout(() => {
  230 + this.isshow = true
  231 + }, 100)
  232 + },
189 async add1() { 233 async add1() {
190 // this.addinfo1() 234 // this.addinfo1()
191 // return 235 // return
@@ -208,6 +252,7 @@ import { @@ -208,6 +252,7 @@ import {
208 info1.shopNumber = 'sp' + element.value.id 252 info1.shopNumber = 'sp' + element.value.id
209 } else if (element.value.advertisingType) { 253 } else if (element.value.advertisingType) {
210 info1.shopNumber = 'gg' + element.value.id 254 info1.shopNumber = 'gg' + element.value.id
  255 + this.formInline.carouselId = element.value.carouselId
211 } else { 256 } else {
212 info1.shopNumber = 'cd' + element.value.id 257 info1.shopNumber = 'cd' + element.value.id
213 } 258 }
@@ -328,6 +373,7 @@ import { @@ -328,6 +373,7 @@ import {
328 info1.shopNumber = 'sp' + element.value.id 373 info1.shopNumber = 'sp' + element.value.id
329 } else if (element.value.advertisingType) { 374 } else if (element.value.advertisingType) {
330 info1.shopNumber = 'gg' + element.value.id 375 info1.shopNumber = 'gg' + element.value.id
  376 + this.formInline.carouselId = element.value.carouselId
331 } else { 377 } else {
332 info1.shopNumber = 'cd' + element.value.id 378 info1.shopNumber = 'cd' + element.value.id
333 } 379 }
@@ -356,6 +402,7 @@ import { @@ -356,6 +402,7 @@ import {
356 console.error(res) 402 console.error(res)
357 if(res.code == 200 && res.data) { 403 if(res.code == 200 && res.data) {
358 this.formInline.appendicesContract = res.data 404 this.formInline.appendicesContract = res.data
  405 +
359 contractinsertAdd({ 406 contractinsertAdd({
360 ...this.formInline, 407 ...this.formInline,
361 templateInformationUrl:this.templateAttachment, 408 templateInformationUrl:this.templateAttachment,
@@ -451,6 +498,7 @@ import { @@ -451,6 +498,7 @@ import {
451 } 498 }
452 } 499 }
453 } 500 }
  501 + this.list2 = this.list1
454 //延迟2秒 502 //延迟2秒
455 setTimeout(() => { 503 setTimeout(() => {
456 this.isshow = true 504 this.isshow = true
admin-web-master/src/components/add/addmap.vue
@@ -20,13 +20,15 @@ @@ -20,13 +20,15 @@
20 </el-form-item> 20 </el-form-item>
21 <el-form-item label="轮播顺序" prop="rotationOrder" > 21 <el-form-item label="轮播顺序" prop="rotationOrder" >
22 <el-select v-model="formInline.rotationOrder" placeholder="请选择" style="width: 100%;"> 22 <el-select v-model="formInline.rotationOrder" placeholder="请选择" style="width: 100%;">
23 - <!-- <el-option label="第一张" value="第一张"></el-option>  
24 - <el-option label="第二张" value="第二张"></el-option>  
25 - <el-option label="第三张" value="第三张"></el-option> -->  
26 <el-option v-for="(item,index) in rotationSequenceList" 23 <el-option v-for="(item,index) in rotationSequenceList"
27 :key="index" :label="item.label" :value="item.value"></el-option> 24 :key="index" :label="item.label" :value="item.value"></el-option>
28 </el-select> 25 </el-select>
29 </el-form-item> 26 </el-form-item>
  27 + <el-form-item label="轮播图" prop="carouselId" >
  28 + <el-select v-model="formInline.carouselId" placeholder="请选择" style="width: 100%;">
  29 + <el-option v-for="(item,index) in tableData" :key="index" :label="'第'+(index+1)+'张'" :value="item.id"></el-option>
  30 + </el-select>
  31 + </el-form-item>
30 <el-form-item label="广告尺寸" prop="dimensions" > 32 <el-form-item label="广告尺寸" prop="dimensions" >
31 <el-input v-model="formInline.dimensions" placeholder="宽:300px 长:400px" maxlength="20"></el-input> 33 <el-input v-model="formInline.dimensions" placeholder="宽:300px 长:400px" maxlength="20"></el-input>
32 </el-form-item> 34 </el-form-item>
@@ -152,6 +154,9 @@ @@ -152,6 +154,9 @@
152 parkTrails, 154 parkTrails,
153 gongyuan 155 gongyuan
154 } from '@/api/information.js'; 156 } from '@/api/information.js';
  157 + import {
  158 + bannerGet,
  159 + } from '@/api/banner';
155 export default { 160 export default {
156 components: { 161 components: {
157 upimg, 162 upimg,
@@ -230,6 +235,11 @@ @@ -230,6 +235,11 @@
230 message: '请选择轮播顺序', 235 message: '请选择轮播顺序',
231 trigger: ['change'] 236 trigger: ['change']
232 }], 237 }],
  238 + carouselId: [{
  239 + required: true,
  240 + message: '请选择轮播图',
  241 + trigger: ['change']
  242 + }],
233 locationDiagram: [{ 243 locationDiagram: [{
234 required: true, 244 required: true,
235 message: '请上传位置示意图', 245 message: '请上传位置示意图',
@@ -286,6 +296,7 @@ @@ -286,6 +296,7 @@
286 edit: true, 296 edit: true,
287 iShsow:true, 297 iShsow:true,
288 lvdaoList: [], 298 lvdaoList: [],
  299 + tableData:[]
289 }; 300 };
290 }, 301 },
291 computed: { 302 computed: {
@@ -311,6 +322,8 @@ @@ -311,6 +322,8 @@
311 } 322 }
312 }, 323 },
313 async created() { 324 async created() {
  325 + const res = await bannerGet({pageNumber: 1,pageSize: 20})
  326 + this.tableData = res.data.content
314 if (this.info && this.info.id) { 327 if (this.info && this.info.id) {
315 this.formInline = this.info 328 this.formInline = this.info
316 if (this.formInline.mapPunctuation) { 329 if (this.formInline.mapPunctuation) {
admin-web-master/src/components/buscha/busCha.vue
@@ -96,6 +96,14 @@ @@ -96,6 +96,14 @@
96 <el-form-item :label="item.name" prop="appendicesContract" v-if="item.type == '附件'"> 96 <el-form-item :label="item.name" prop="appendicesContract" v-if="item.type == '附件'">
97 <div class="duiqi greens" @click ="item.value?openfile(item.value):''">{{item.value?'查看详情':'暂无文件'}}</div> 97 <div class="duiqi greens" @click ="item.value?openfile(item.value):''">{{item.value?'查看详情':'暂无文件'}}</div>
98 </el-form-item> 98 </el-form-item>
  99 + <el-form-item :label="item.name" v-else-if="item.type == '图片'">
  100 + <div v-if="item.value">
  101 + <div style="display: flex;">
  102 + <allimg v-if="item1" :src="item1" fit="contain" v-for="item1 in item.value.split(',')" style="width: 112px;height: 112px;border: 1px dotted #dcdfe6;border-radius: 2px;overflow: hidden;margin: 0 10px 10px 0;"/>
  103 + </div>
  104 + </div>
  105 + <div class="duiqi" v-else>无</div>
  106 + </el-form-item>
99 <el-form-item :label="item.name" prop="paymentDay" v-else-if="item.type != '资源' && item.type != '商家'"> 107 <el-form-item :label="item.name" prop="paymentDay" v-else-if="item.type != '资源' && item.type != '商家'">
100 <div class="duiqi">{{item.value}}<span v-if="item.key == 'earnestMoney' || item.key == 'contractAmount'"> 元</span></div> 108 <div class="duiqi">{{item.value}}<span v-if="item.key == 'earnestMoney' || item.key == 'contractAmount'"> 元</span></div>
101 </el-form-item> 109 </el-form-item>
admin-web-master/src/components/chakan/oneht.vue
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 <TitleWithCircle title="合同信息" /> 6 <TitleWithCircle title="合同信息" />
7 <div style="padding: 20px;margin-top: 10px;"> 7 <div style="padding: 20px;margin-top: 10px;">
8 <el-form :model="newinfo" ref="ruleForm" label-width="140px" class="demo-ruleForm"> 8 <el-form :model="newinfo" ref="ruleForm" label-width="140px" class="demo-ruleForm">
9 - <el-row :gutter="20"> 9 + <!-- <el-row :gutter="20">
10 <el-col :span="9"> 10 <el-col :span="9">
11 <el-form-item label="合同类型" prop="contractType"> 11 <el-form-item label="合同类型" prop="contractType">
12 <div class="duiqi">{{newinfo.contractType}}</div> 12 <div class="duiqi">{{newinfo.contractType}}</div>
@@ -92,6 +92,27 @@ @@ -92,6 +92,27 @@
92 </el-row> 92 </el-row>
93 <el-form-item label="附件信息" prop="appendicesContract"> 93 <el-form-item label="附件信息" prop="appendicesContract">
94 <div class="duiqi greens" @click ="newinfo.appendicesContract?openfile(newinfo.appendicesContract):''">{{newinfo.appendicesContract?'查看详情':'暂无文件'}}</div> 94 <div class="duiqi greens" @click ="newinfo.appendicesContract?openfile(newinfo.appendicesContract):''">{{newinfo.appendicesContract?'查看详情':'暂无文件'}}</div>
  95 + </el-form-item> -->
  96 + <el-row :gutter="20">
  97 + <el-col :span="item.width == '50%(半行)'?12:item.width == '100%(一行)'?24:12" v-for="(item,index) in list1" >
  98 + <el-form-item :label="item.name" prop="appendicesContract" v-if="item.type == '附件'">
  99 + <div class="duiqi greens" @click ="item.value?openfile(item.value):''">{{item.value?'查看详情':'暂无文件'}}</div>
  100 + </el-form-item>
  101 + <el-form-item :label="item.name" v-else-if="item.type == '图片'">
  102 + <div v-if="item.value">
  103 + <div style="display: flex;">
  104 + <allimg v-if="item1" :src="item1" fit="contain" v-for="item1 in item.value.split(',')" style="width: 112px;height: 112px;border: 1px dotted #dcdfe6;border-radius: 2px;overflow: hidden;margin: 0 10px 10px 0;"/>
  105 + </div>
  106 + </div>
  107 + <div class="duiqi" v-else>无</div>
  108 + </el-form-item>
  109 + <el-form-item :label="item.name" prop="paymentDay" v-else-if="item.type != '资源' && item.type != '商家'">
  110 + <div class="duiqi">{{item.value}}<span v-if="item.key == 'earnestMoney' || item.key == 'contractAmount'"> 元</span></div>
  111 + </el-form-item>
  112 + </el-col>
  113 + </el-row>
  114 + <el-form-item label="附件信息" prop="appendicesContract">
  115 + <div class="duiqi greens" @click ="newinfo.appendicesContract?openfile(newinfo.appendicesContract):''">{{newinfo.appendicesContract?'查看详情':'暂无文件'}}</div>
95 </el-form-item> 116 </el-form-item>
96 </el-form> 117 </el-form>
97 </div> 118 </div>
@@ -145,13 +166,15 @@ @@ -145,13 +166,15 @@
145 </template> 166 </template>
146 167
147 <script> 168 <script>
  169 + import allimg from '@/components/chakan/allimg.vue';
148 import TitleWithCircle from '@/components/top/index'; 170 import TitleWithCircle from '@/components/top/index';
149 import { 171 import {
150 cerePlatformMerchantinfo 172 cerePlatformMerchantinfo
151 } from '@/api/newly.js' 173 } from '@/api/newly.js'
152 export default { 174 export default {
153 components: { 175 components: {
154 - TitleWithCircle 176 + TitleWithCircle,
  177 + allimg
155 }, 178 },
156 props: { 179 props: {
157 info: { 180 info: {
@@ -173,11 +196,12 @@ @@ -173,11 +196,12 @@
173 shopIds: [], 196 shopIds: [],
174 shop: {}, 197 shop: {},
175 newshop:{}, 198 newshop:{},
176 - newinfo:{} 199 + newinfo:{},
  200 + list1:[]
177 } 201 }
178 }, 202 },
179 created() { 203 created() {
180 - 204 +
181 }, 205 },
182 computed: { 206 computed: {
183 207
@@ -207,6 +231,8 @@ @@ -207,6 +231,8 @@
207 console.error(row) 231 console.error(row)
208 this.type = '2' 232 this.type = '2'
209 this.newinfo = row 233 this.newinfo = row
  234 + this.list1 = JSON.parse(this.newinfo.templateInformation)
  235 + console.log(this.list1)
210 cerePlatformMerchantinfo({id:row.relatedMerchants}).then(res => { 236 cerePlatformMerchantinfo({id:row.relatedMerchants}).then(res => {
211 console.error(res) 237 console.error(res)
212 this.newshop = res.data 238 this.newshop = res.data
admin-web-master/src/components/change/mbadd.vue
@@ -63,6 +63,11 @@ @@ -63,6 +63,11 @@
63 <upfile :accept="'.docx,.doc'" filePath="mb" :inputtype="item.name" :value="item.value" 63 <upfile :accept="'.docx,.doc'" filePath="mb" :inputtype="item.name" :value="item.value"
64 @changimg="e=>changimg(e,index,item.key)"></upfile> 64 @changimg="e=>changimg(e,index,item.key)"></upfile>
65 </el-form-item> 65 </el-form-item>
  66 +
  67 + <el-form-item :label="item.name" :prop="item.key" v-if="item.type == '图片'">
  68 + <upimg filePath="fm" :limit="1" :inputtype="item.key" :value="item.value" :cmpOption="{disabled:false,isSetCover:false}"
  69 + @changimg="e=>changimg(e,index,item.key)"></upimg>
  70 + </el-form-item>
66 <i v-if="iscopy && item.type != '资源'" class="el-icon-copy-document greens tableBtn iterem" 71 <i v-if="iscopy && item.type != '资源'" class="el-icon-copy-document greens tableBtn iterem"
67 @click.stop="copytit(item.name)"></i> 72 @click.stop="copytit(item.name)"></i>
68 <el-form-item label="绑定资源" :prop="item.key" v-if="item.type == '资源' " style="width: 100%;"> 73 <el-form-item label="绑定资源" :prop="item.key" v-if="item.type == '资源' " style="width: 100%;">
@@ -296,6 +301,11 @@ @@ -296,6 +301,11 @@
296 this.forminfo[onindex] = e 301 this.forminfo[onindex] = e
297 }, 302 },
298 changexl(e, onindex) { 303 changexl(e, onindex) {
  304 + if(onindex == 'contractType') {
  305 + // console.error(e)
  306 + // 触发父组件事件
  307 + this.$emit('changeContractType', e)
  308 + }
299 this.forminfo[onindex] = e 309 this.forminfo[onindex] = e
300 }, 310 },
301 async copytit(content) { 311 async copytit(content) {
admin-web-master/src/components/merchantInformation/index.vue
@@ -190,7 +190,7 @@ @@ -190,7 +190,7 @@
190 </el-table-column> 190 </el-table-column>
191 <el-table-column label="操作" fixed="right"> 191 <el-table-column label="操作" fixed="right">
192 <template slot-scope="scope"> 192 <template slot-scope="scope">
193 - <div @click="open1(scope.row,'1')" class="tableBtn greens">查看</div> 193 + <div @click="details(scope.row,'1')" class="tableBtn greens">查看</div>
194 </template> 194 </template>
195 </el-table-column> 195 </el-table-column>
196 </el-table> 196 </el-table>
@@ -228,7 +228,7 @@ @@ -228,7 +228,7 @@
228 </el-table-column> 228 </el-table-column>
229 <el-table-column label="操作" fixed="right"> 229 <el-table-column label="操作" fixed="right">
230 <template slot-scope="scope"> 230 <template slot-scope="scope">
231 - <div @click="open1(scope.row,'2')" class="tableBtn greens">查看</div> 231 + <div @click="details(scope.row,'1')" class="tableBtn greens">查看</div>
232 </template> 232 </template>
233 </el-table-column> 233 </el-table-column>
234 </el-table> 234 </el-table>
@@ -777,7 +777,7 @@ @@ -777,7 +777,7 @@
777 pagequeryzljf:{ 777 pagequeryzljf:{
778 pageNumber: 0, 778 pageNumber: 0,
779 pageSize: 10, 779 pageSize: 10,
780 - "relatedMerchants":"27" 780 + // "relatedMerchants":"27"
781 }, 781 },
782 datalistzljf:[], 782 datalistzljf:[],
783 783
@@ -806,7 +806,7 @@ @@ -806,7 +806,7 @@
806 pagequeryzl:{ 806 pagequeryzl:{
807 pageNumber: 0, 807 pageNumber: 0,
808 pageSize: 100, 808 pageSize: 100,
809 - relatedMerchants:'28' 809 + // relatedMerchants:'28'
810 }, 810 },
811 zlgglist:[], 811 zlgglist:[],
812 zlsplist:[], 812 zlsplist:[],
@@ -819,7 +819,15 @@ @@ -819,7 +819,15 @@
819 } 819 }
820 }, 820 },
821 created() { 821 created() {
  822 + this.pagequeryyx.phone = this.info.phone
  823 + this.pagequerytp.phone = this.info.phone
  824 + this.pagequerygg.phone = this.info.phone
  825 + this.pagequeryzl.relatedMerchants = this.info.id
  826 + this.pagequeryzljf.relatedMerchants = this.info.id
  827 + this.pagequerywyjf.paymentAccount= this.info.phone
  828 + this.pagequeryht.relatedMerchants = this.info.id
822 this.getAllyx() 829 this.getAllyx()
  830 +
823 this.getAlltp() 831 this.getAlltp()
824 this.getAllgg() 832 this.getAllgg()
825 this.getAllzljf() 833 this.getAllzljf()
admin-web-master/src/components/newmap/index copy.vue 0 → 100644
  1 +<template>
  2 + <div style="position: relative;width: 100%;">
  3 + <div id="mapContainer" class="map"></div>
  4 + <div class="search-box">
  5 + <input v-model="searchQuery" placeholder="输入地址进行搜索" />
  6 + <div style="box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);display: flex;align-items: center;background: #fff;padding: 0 20px;border-radius: 5px;overflow: hidden;margin-left: 10px;">
  7 + <i class="el-icon-delete" style="margin-right: 10px;color: #3F9B6A;"></i>
  8 + <button type="button" @click="searchLocation">清除</button>
  9 + </div>
  10 + </div>
  11 + <div v-if="searchResults.length > 0" class="search-results">
  12 + <ul>
  13 + <li v-for="(result, index) in searchResults" :key="index" @click="selectResult(result)">
  14 + {{ result.title }}
  15 + </li>
  16 + </ul>
  17 + </div>
  18 + </div>
  19 +</template>
  20 +<script>
  21 + export default {
  22 + name: 'TencentMap',
  23 + props: {
  24 + lat: {
  25 + type: Number,
  26 + default: 30.67
  27 + },
  28 + lng: {
  29 + type: Number,
  30 + default: 104.06
  31 + },
  32 + isonloed: {
  33 + type: Boolean,
  34 + default: false
  35 + },
  36 + isx: {
  37 + type: Boolean,
  38 + default: true
  39 + },
  40 + message: {
  41 + type: String,
  42 + default: ''
  43 + },
  44 + },
  45 + data() {
  46 + return {
  47 + map: null,
  48 + marker: null,
  49 + address: '',
  50 + searchQuery: '', // 搜索查询
  51 + searchResults: [], // 搜索结果列表
  52 +
  53 + };
  54 + },
  55 + mounted() {
  56 + // 初始化地图
  57 + this.initMap();
  58 + },
  59 + methods: {
  60 + // 选择某一条搜索结果
  61 + selectResult(result) {
  62 + const latLng = new qq.maps.LatLng(result.location.lat, result.location.lng);
  63 +
  64 + // 移动地图中心到选择的位置
  65 + this.map.setCenter(latLng);
  66 +
  67 + // 更新标记位置
  68 + this.marker.setPosition(latLng);
  69 +
  70 + // 获取地址信息
  71 + this.getAreaCode(result.location.lat, result.location.lng);
  72 +
  73 +
  74 + },
  75 + searchLocation() {
  76 + let that = this
  77 + if (!this.searchQuery) {
  78 + this.$message.error('请输入搜索地址');
  79 + return;
  80 + }
  81 +
  82 + // 使用腾讯地图的搜索服务
  83 + this.$jsonp("https://apis.map.qq.com/ws/place/v1/search", {
  84 + keyword: this.searchQuery,
  85 + key: 'PGRBZ-Z3FRJ-DTYFB-XNX4X-DC6HZ-MCFYU', // 使用你的腾讯地图API key
  86 + output: "jsonp",
  87 + boundary: 'nearby(' + that.lat + ',' + that.lng + ',1000,1)'
  88 + }).then((res) => {
  89 + console.error(res)
  90 + if (res.status === 0 && res.data.length > 0) {
  91 + this.searchResults = res.data; // 存储搜索结果
  92 + } else {
  93 + this.$message.error('未找到相关地址');
  94 + this.searchResults = []; // 清空搜索结果
  95 + }
  96 + }).catch(err => {
  97 + this.$message.error("搜索失败");
  98 + console.error(err);
  99 + });
  100 + },
  101 + initMap() {
  102 + if (this.isx) {
  103 +
  104 + } else {
  105 + this.lat = this.message.split(',')[0]
  106 + this.lng = this.message.split(',')[1]
  107 + }
  108 + // 将经纬度转换为腾讯地图的LatLng对象
  109 + const centerLatLng = new qq.maps.LatLng(this.lat, this.lng);
  110 +
  111 + // 创建地图实例
  112 + this.map = new qq.maps.Map(document.getElementById('mapContainer'), {
  113 + center: centerLatLng,
  114 + zoom: 13,
  115 + mapStyleId: 'style1'
  116 + });
  117 +
  118 + // 创建标记
  119 + if (this.isonloed) {
  120 + this.marker = new qq.maps.Marker({
  121 + position: centerLatLng,
  122 + map: this.map
  123 + });
  124 + } else {
  125 + this.marker = new qq.maps.Marker({
  126 + // position: centerLatLng,
  127 + map: this.map
  128 + });
  129 + }
  130 + if (this.isx) {
  131 + qq.maps.event.addListener(this.map, 'click', this.onMapClick);
  132 + } else {
  133 + const centerLatLng1 = new qq.maps.LatLng(this.message.split(',')[0], this.message.split(',')[1]);
  134 + console.error(this.message)
  135 + this.marker = new qq.maps.Marker({
  136 + position: centerLatLng1,
  137 + map: this.map
  138 + });
  139 + }
  140 +
  141 + // 添加点击事件监听器
  142 + // qq.maps.event.addListener(this.marker, 'click', this.onMarkerClick);
  143 +
  144 + // 添加地图点击事件监听器
  145 +
  146 +
  147 + // // 获取地址信息
  148 + // this.getAreaCode(this.lat, this.lng);
  149 + },
  150 + onMarkerClick() {
  151 + alert('您点击了标记点');
  152 + },
  153 + onMapClick(event) {
  154 + // 获取点击位置的经纬度
  155 + const newLatLng = event.latLng;
  156 +
  157 + // 更新标记位置
  158 + this.marker.setPosition(newLatLng);
  159 + this.getAreaCode(newLatLng.getLat(), newLatLng.getLng());
  160 + // 更新父组件中的经纬度
  161 +
  162 +
  163 + // 获取新的地址信息
  164 +
  165 + },
  166 + getAreaCode(lat, lng) {
  167 + this.searchQuery = ''
  168 + // 清空搜索结果
  169 + this.searchResults = [];
  170 + let that = this;
  171 + //这里可以直接this.$jsonp地址传入你的经纬度;
  172 + that.$jsonp("https://apis.map.qq.com/ws/geocoder/v1/?", {
  173 + location: `${lat},${lng}`, // 经纬度
  174 + key: 'PGRBZ-Z3FRJ-DTYFB-XNX4X-DC6HZ-MCFYU', //这里就是要开启那个service不然会报错让你开启
  175 + output: "jsonp", // output必须jsonp 不然会超时
  176 + }).then((res) => {
  177 + if (res.message == 'Success') {
  178 + console.log(res);
  179 + that.address = res.result.address
  180 + that.$emit('updatecenter', {
  181 + lat: lat,
  182 + lng: lng,
  183 + address: that.address
  184 + });
  185 + } else {
  186 + this.$message.error(res.message)
  187 +
  188 + }
  189 + }).catch(err => {
  190 + this.$message.error("获取城市编码失败")
  191 + console.error(err)
  192 + })
  193 + }
  194 + }
  195 + }
  196 +</script>
  197 +
  198 +<style scoped>
  199 + .map {
  200 + width: 100%;
  201 + height: 300px;
  202 + }
  203 +
  204 + .search-box {
  205 + position: absolute;
  206 + top: 10px;
  207 + left: 10px;
  208 + z-index: 99;
  209 + /* background: #fff; */
  210 + /* padding: 10px; */
  211 + /* border-radius: 5px; */
  212 + /* box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); */
  213 + /* width: 280px; */
  214 + display: flex;
  215 + justify-content: space-between;
  216 + }
  217 +
  218 + .search-box input {
  219 + /* padding: 5px; */
  220 + padding: 15px 8px;
  221 + margin-right: 5px;
  222 + font-size: 10px;
  223 + box-sizing: border-box;
  224 + border-radius: 5px;
  225 + border: 1px solid #eee;
  226 + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  227 + }
  228 +
  229 + .search-box button {
  230 + padding: 15px 0;
  231 + background-color: #fff;
  232 + /* color: #fff; */
  233 + border: none;
  234 + border-radius: 3px;
  235 + cursor: pointer;
  236 + height: 100%;
  237 + box-sizing: border-box;
  238 + font-size: 10px;
  239 + color: -internal-light-dark(black, white);
  240 + }
  241 +
  242 + .search-box button:hover {
  243 + background-color: #fff;
  244 + }
  245 +
  246 + .search-results {
  247 + position: absolute;
  248 + top: 60px;
  249 + left: 10px;
  250 + z-index: 999;
  251 + background: #fff;
  252 + padding: 10px;
  253 + border-radius: 5px;
  254 + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  255 + max-height: 200px;
  256 + overflow-y: auto;
  257 + width: 280px;
  258 +
  259 + }
  260 + .search-results::-webkit-scrollbar {
  261 + display: none; /* 隐藏滚动条 */
  262 + }
  263 + .search-results ul {
  264 + list-style: none;
  265 + padding: 0;
  266 + margin: 0;
  267 + }
  268 +
  269 + .search-results li {
  270 + padding: 5px;
  271 + cursor: pointer;
  272 + }
  273 +
  274 + .search-results li:hover {
  275 + background-color: #f0f0f0;
  276 + }
  277 +</style>
0 \ No newline at end of file 278 \ No newline at end of file
admin-web-master/src/components/newmap/index.vue
@@ -3,10 +3,7 @@ @@ -3,10 +3,7 @@
3 <div id="mapContainer" class="map"></div> 3 <div id="mapContainer" class="map"></div>
4 <div class="search-box"> 4 <div class="search-box">
5 <input v-model="searchQuery" placeholder="输入地址进行搜索" /> 5 <input v-model="searchQuery" placeholder="输入地址进行搜索" />
6 - <div style="box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);display: flex;align-items: center;background: #fff;padding: 0 20px;border-radius: 5px;overflow: hidden;margin-left: 10px;">  
7 - <i class="el-icon-delete" style="margin-right: 10px;color: #3F9B6A;"></i>  
8 - <button type="button" @click="searchLocation">清除</button>  
9 - </div> 6 + <button type="button" @click="searchLocation">搜索</button>
10 </div> 7 </div>
11 <div v-if="searchResults.length > 0" class="search-results"> 8 <div v-if="searchResults.length > 0" class="search-results">
12 <ul> 9 <ul>
@@ -112,7 +109,7 @@ @@ -112,7 +109,7 @@
112 this.map = new qq.maps.Map(document.getElementById('mapContainer'), { 109 this.map = new qq.maps.Map(document.getElementById('mapContainer'), {
113 center: centerLatLng, 110 center: centerLatLng,
114 zoom: 13, 111 zoom: 13,
115 - mapStyleId: 'style1' 112 + // mapStyleId: 'style1'
116 }); 113 });
117 114
118 // 创建标记 115 // 创建标记
@@ -205,42 +202,30 @@ @@ -205,42 +202,30 @@
205 position: absolute; 202 position: absolute;
206 top: 10px; 203 top: 10px;
207 left: 10px; 204 left: 10px;
208 - z-index: 99;  
209 - /* background: #fff; */  
210 - /* padding: 10px; */  
211 - /* border-radius: 5px; */  
212 - /* box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); */  
213 - /* width: 280px; */  
214 - display: flex;  
215 - justify-content: space-between; 205 + z-index: 1000;
  206 + background: #fff;
  207 + padding: 10px;
  208 + border-radius: 5px;
  209 + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  210 + width: 280px;
216 } 211 }
217 212
218 .search-box input { 213 .search-box input {
219 - /* padding: 5px; */  
220 - padding: 15px 8px; 214 + padding: 5px;
221 margin-right: 5px; 215 margin-right: 5px;
222 - font-size: 10px;  
223 - box-sizing: border-box;  
224 - border-radius: 5px;  
225 - border: 1px solid #eee;  
226 - box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);  
227 } 216 }
228 217
229 .search-box button { 218 .search-box button {
230 - padding: 15px 0;  
231 - background-color: #fff;  
232 - /* color: #fff; */ 219 + padding: 5px 10px;
  220 + background-color: #007bff;
  221 + color: #fff;
233 border: none; 222 border: none;
234 border-radius: 3px; 223 border-radius: 3px;
235 cursor: pointer; 224 cursor: pointer;
236 - height: 100%;  
237 - box-sizing: border-box;  
238 - font-size: 10px;  
239 - color: -internal-light-dark(black, white);  
240 } 225 }
241 226
242 .search-box button:hover { 227 .search-box button:hover {
243 - background-color: #fff; 228 + background-color: #0056b3;
244 } 229 }
245 230
246 .search-results { 231 .search-results {
admin-web-master/src/utils/request.js
@@ -17,12 +17,12 @@ let baseURL = &#39;&#39; @@ -17,12 +17,12 @@ let baseURL = &#39;&#39;
17 if(host === 'localhost:8080' || host === 'localhost:8081' || host === 'localhost:9528'|| host === '192.168.31.45:9528'|| host === 'localhost:9529' ) { 17 if(host === 'localhost:8080' || host === 'localhost:8081' || host === 'localhost:9528'|| host === '192.168.31.45:9528'|| host === 'localhost:9529' ) {
18 18
19 // baseURL = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/admin-server'; 19 // baseURL = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/admin-server';
20 - // baseURL = 'https://zhgw-uat.028wlkj.com/cdwlMall/meserver/admin-server'; 20 + baseURL = 'https://zhgw-uat.028wlkj.com/cdwlMall/meserver/admin-server';
21 21
22 // baseURL = process.env.VUE_APP_DOMAIN_PREFIX_1; 22 // baseURL = process.env.VUE_APP_DOMAIN_PREFIX_1;
23 23
24 24
25 - baseURL = 'http://128.10.249.39:9003'; 25 + // baseURL = 'http://128.10.249.39:9003';
26 26
27 27
28 } else { 28 } else {