1 |
- {"version":3,"sources":["webpack:///src/pages/Common/HomeCompents/map.vue","webpack:///./src/pages/Common/HomeCompents/map.vue?95ee","webpack:///./src/pages/Common/HomeCompents/map.vue"],"names":["map","data","dian1","x","y","dian2","dian3","dian4","dianD","sum","sum2","data2","last","last2","created","watch","props","mounted","this","begin","methods","_this","i","t1","setInterval","Math","floor","random","hua","t2","hua2","setTimeout","clearInterval","Draw","Draw2","lastx","lasty","ifdian","ctx","document","getElementById","getContext","beginPath","strokeStyle","lineWidth","lineJoin","moveTo","lineTo","closePath","stroke","HomeCompents_map","render","$createElement","_self","_c","_m","staticRenderFns","_h","staticClass","attrs","id","width","height","_v","Component","__webpack_require__","normalizeComponent","ssrContext","__webpack_exports__"],"mappings":"yIAUAA,GACAC,KADA,WAEA,OACAC,OACAC,EAAA,GACAC,EAAA,IAEAC,OACAF,EAAA,IACAC,EAAA,IAEAE,OACAH,EAAA,IACAC,EAAA,KAEAG,OACAJ,EAAA,IACAC,EAAA,KAEAI,OACAL,EAAA,GACAC,EAAA,IAEAK,IAAA,EACAC,KAAA,EACAT,MACAE,EAAA,GACAC,EAAA,IAEAO,OACAR,EAAA,GACAC,EAAA,IAEAQ,MACAT,EAAA,GACAC,EAAA,IAEAS,OACAV,EAAA,GACAC,EAAA,MAIAU,QA3CA,aA8CAC,SAEAC,SAGAC,QAnDA,WAoDAC,KAAAC,SAGAC,SACAD,MADA,WACA,IAAAE,EAAAH,KACAI,EAAA,EACAC,EAAAC,YAAA,YACAF,GAAA,IACA,MACAA,GAAA,IAEAD,EAAApB,KAAAE,EAAAsB,KAAAC,MAAA,EAAAD,KAAAE,UAAA,EAAAL,EACAD,EAAApB,KAAAG,EAAAqB,KAAAC,MAAA,EAAAD,KAAAE,UAAA,EAAAL,EACAD,EAAAO,OACA,KACAC,EAAAL,YAAA,WACAH,EAAAV,MAAAR,EAAAsB,KAAAC,MAAA,IAAAD,KAAAE,UAAA,EACAN,EAAAV,MAAAP,EAAAqB,KAAAC,MAAA,I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YAAA,OACAL,EAAAM,UAAA,EACAN,EAAAO,SAAA,QAGAR,GACAnB,KAAAR,KAAA,EACAQ,KAAAL,MAAAV,EAAAgC,EACAjB,KAAAL,MAAAT,EAAAgC,EACA,GAAAC,EACAC,EAAAQ,OAAA5B,KAAAhB,MAAAC,EAAAe,KAAAhB,MAAAE,GACA,GAAAiC,EACAC,EAAAQ,OAAA5B,KAAAb,MAAAF,EAAAe,KAAAb,MAAAD,GACA,GAAAiC,EACAC,EAAAQ,OAAA5B,KAAAZ,MAAAH,EAAAe,KAAAZ,MAAAF,GACA,GAAAiC,GACAC,EAAAQ,OAAA5B,KAAAX,MAAAJ,EAAAe,KAAAX,MAAAH,KAGAkC,EAAAQ,OAAA5B,KAAAL,MAAAV,EAAAe,KAAAL,MAAAT,GACAc,KAAAL,MAAAV,EAAAgC,EACAjB,KAAAL,MAAAT,EAAAgC,GAEAE,EAAAS,OAAAZ,EAAAC,GACAE,EAAAU,YACAV,EAAAW,YC5JeC,GADEC,OAFjB,WAA0BjC,KAAakC,eAAblC,KAAuCmC,MAAAC,GAAwB,OAA/DpC,KAA+DqC,GAAA,IAExEC,iBADjB,WAAoC,IAAaC,EAAbvC,KAAakC,eAA0BE,EAAvCpC,KAAuCmC,MAAAC,IAAAG,EAAwB,OAAAH,EAAA,OAAiBI,YAAA,SAAmBJ,EAAA,UAAeK,OAAOC,GAAA,WAAAC,MAAA,SAAAC,OAAA,WAAzH5C,KAA4K6C,GAAA,KAAAT,EAAA,UAA2BK,OAAOC,GAAA,YAAAC,MAAA,SAAAC,OAAA,gBCElP,IAcAE,EAdyBC,EAAQ,OAcjCC,CACElE,EACAkD,GATF,EAVA,SAAAiB,GACEF,EAAQ,SAaV,kBAEA,MAUeG,EAAA,QAAAJ,EAAiB","file":"static/js/15.1204cc1b9b130b094be7.js","sourcesContent":["<!-- 设置车辆 -->\r\n<template>\r\n <div class=\"main\">\r\n <canvas id=\"mycanvas\" width=\"1000px\" height=\"500Px\"></canvas>\r\n <canvas id=\"mycanvas2\" width=\"1000px\" height=\"500Px\"></canvas>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { mapGetters } from \"vuex\";\r\nexport default {\r\n data() {\r\n return {\r\n dian1:{\r\n x:10,\r\n y:10\r\n },\r\n dian2:{\r\n x:400,\r\n y:10\r\n },\r\n dian3:{\r\n x:400,\r\n y:400\r\n },\r\n dian4:{\r\n x:100,\r\n y:400\r\n },\r\n dianD:{\r\n x:'',\r\n y:''\r\n },\r\n sum:0,\r\n sum2:0,\r\n data:{\r\n x:'',\r\n y:''\r\n },\r\n data2:{\r\n x:'',\r\n y:''\r\n },\r\n last:{\r\n x:'',\r\n y:''\r\n },\r\n last2:{\r\n x:'',\r\n y:''\r\n }\r\n }\r\n },\r\n created(){\r\n\r\n },\r\n watch: {\r\n },\r\n props: {\r\n\r\n },\r\n mounted() {\r\n this.begin()\r\n\r\n },\r\n methods: {\r\n begin(){\r\n var i=0;\r\n var t1=setInterval(() => {\r\n i+=20\r\n if(i>500){\r\n i-=20\r\n }\r\n this.data.x=Math.floor(Math.random() * (10 - 1)) + 1+i\r\n this.data.y=Math.floor(Math.random() * (10 - 1)) + 1+i\r\n this.hua()\r\n }, 100);\r\n var t2=setInterval(() => {\r\n this.data2.x=Math.floor(Math.random() * (400 - 1)) + 1\r\n this.data2.y=Math.floor(Math.random() * (400 - 1)) + 1\r\n this.hua2()\r\n }, 1000);\r\n setTimeout(()=>{\r\n clearInterval(t1)\r\n clearInterval(t2)\r\n },5000)\r\n },\r\n hua(){\r\n if(this.sum==0){\r\n this.Draw(this.data.x,this.data.y,1)\r\n }else{\r\n this.Draw(this.data.x,this.data.y)\r\n }\r\n },\r\n hua2(){\r\n if(this.sum2==0){\r\n this.Draw2(this.data2.x,this.data.y,2)\r\n }else{\r\n this.Draw2(this.data2.x,this.data.y)\r\n }\r\n },\r\n Draw(lastx, lasty,ifdian) {\r\n const ctx=document.getElementById('mycanvas').getContext('2d');\r\n ctx.beginPath();\r\n ctx.strokeStyle = '#2DAFF5';\r\n ctx.lineWidth = 2;\r\n ctx.lineJoin = \"round\";\r\n var beginx=0;\r\n var beginy=0;\r\n if(ifdian){\r\n this.sum=1;\r\n this.last.x=lastx;\r\n this.last.y=lasty;\r\n if(ifdian==1){\r\n ctx.moveTo(this.dian1.x, this.dian1.y);\r\n }else if(ifdian==2){\r\n ctx.moveTo(this.dian2.x, this.dian2.y);\r\n }else if(ifdian==3){\r\n ctx.moveTo(this.dian3.x, this.dian3.y);\r\n }else if(ifdian==4){\r\n ctx.moveTo(this.dian4.x, this.dian4.y);\r\n }\r\n }else{\r\n ctx.moveTo(this.last.x, this.last.y);\r\n this.last.x=lastx;\r\n this.last.y=lasty;\r\n }\r\n ctx.lineTo(lastx, lasty);\r\n ctx.closePath();\r\n ctx.stroke();\r\n },\r\n Draw2(lastx, lasty,ifdian) {\r\n const ctx=document.getElementById('mycanvas2').getContext('2d');\r\n ctx.beginPath();\r\n ctx.strokeStyle = 'pink';\r\n ctx.lineWidth = 2;\r\n ctx.lineJoin = \"round\";\r\n var beginx=0;\r\n var beginy=0;\r\n if(ifdian){\r\n this.sum2=1;\r\n this.last2.x=lastx;\r\n this.last2.y=lasty;\r\n if(ifdian==1){\r\n ctx.moveTo(this.dian1.x, this.dian1.y);\r\n }else if(ifdian==2){\r\n ctx.moveTo(this.dian2.x, this.dian2.y);\r\n }else if(ifdian==3){\r\n ctx.moveTo(this.dian3.x, this.dian3.y);\r\n }else if(ifdian==4){\r\n ctx.moveTo(this.dian4.x, this.dian4.y);\r\n }\r\n }else{\r\n ctx.moveTo(this.last2.x, this.last2.y);\r\n this.last2.x=lastx;\r\n this.last2.y=lasty;\r\n }\r\n ctx.lineTo(lastx, lasty);\r\n ctx.closePath();\r\n ctx.stroke();\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style scoped lang=\"less\">\r\n#mycanvas,#mycanvas2{\r\n width: 600px;\r\n height: 500px;\r\n position: absolute;\r\n // background-color: palegoldenrod;\r\n}\r\n</style>\r\n\n\n\n// WEBPACK FOOTER //\n// src/pages/Common/HomeCompents/map.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"main\"},[_c('canvas',{attrs:{\"id\":\"mycanvas\",\"width\":\"1000px\",\"height\":\"500Px\"}}),_vm._v(\" \"),_c('canvas',{attrs:{\"id\":\"mycanvas2\",\"width\":\"1000px\",\"height\":\"500Px\"}})])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-965da8a4\",\"hasScoped\":true,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/pages/Common/HomeCompents/map.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../../../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true,\\\"publicPath\\\":\\\"../../\\\"}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-965da8a4\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!less-loader?{\\\"sourceMap\\\":true}!../../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./map.vue\")\n}\nvar normalizeComponent = require(\"!../../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../../../node_modules/vue-loader/lib/selector?type=script&index=0!./map.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../../node_modules/vue-loader/lib/selector?type=script&index=0!./map.vue\"\n/* template */\nimport __vue_template__ from \"!!../../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-965da8a4\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../../node_modules/vue-loader/lib/selector?type=template&index=0!./map.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-965da8a4\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/pages/Common/HomeCompents/map.vue\n// module id = null\n// module chunks = "],"sourceRoot":""}
|