sunyadv 5 anos atrás
pai
commit
9bb304fb49

+ 1 - 1
ys_vue/src/http.js

@@ -66,7 +66,7 @@ export default {
      * @param response 请求成功时的回调函数
      * @param exception 异常的回调函数
      */
-    get (url, response, exception) {
+    get (url , response, exception) {
         var user = sessionStorage.getItem('user') , token = "";
         if(user != null){
             token = JSON.parse(user).headImgurl

+ 2 - 0
ys_vue/src/port.js

@@ -64,6 +64,8 @@ export default {
         importPart: '/part/importAppLogin',//零件的excel导入
         partUpload: '/mouldfile/uploadPartFileList', //零件文档的批量上传
 
+        download: '/mouldfile/download',
+
         moldMaintain: '/mouldmaintain/maintain', //维护
         moldMaintainList: '/mouldmaintain/list', //获取列表
         moldMaintainListGet: '/mould/maintainMouldList', //主页获取保养模具列表

+ 25 - 14
ys_vue/src/views/map/map.vue

@@ -110,7 +110,8 @@
             //新地图
             var map = new AMap.Map('container', {
                 zoom: 4,
-                mapStyle: "amap://styles/grey",
+                //mapStyle: "amap://styles/grey",
+                mapStyle: "amap://styles/8016abec658e1132508723183f848f14",
                 features: ['bg']
             });
 
@@ -188,7 +189,7 @@
                      * 绘制一个蓝底白字的label替代聚合标注
                      */
                     drawMyLabel: function(feature, dataItems) {
-                        if(dataItems.length != 0){
+                        //if(dataItems.length != 0){
                             var pixelRatio = this.getPixelRatio(); //高清下存在比例放大
 
                             var containerPos = map.lngLatToContainer(feature.properties.centroid || feature.properties.center);
@@ -201,29 +202,38 @@
 
                             labelCtx.save();
 
-                            labelCtx.font = 12 * pixelRatio + 'px 微软雅黑';
+                            labelCtx.font = 15 * pixelRatio + 'px 微软雅黑';
 
-                            var text = feature.properties.name + '\n' + dataItems.length + '';
+                            var text = feature.properties.name ;//+ '\n' + dataItems.length;
 
                             var textMetrics = labelCtx.measureText(text);
 
                             var halfTxtWidth = textMetrics.width / 2;
 
-                            labelCtx.fillStyle = 'rgba(3 , 94 , 255 , 0.5)';//'#3366cc';
+                            labelCtx.beginPath();
+                            // labelCtx.fillStyle = 'rgba(3 , 94 , 255 , 0.5)';//'#3366cc';
+                            labelCtx.fillStyle = 'rgba(12 , 239 , 231 , 0.8)';//'#3366cc';
                             //绘制一个蓝色背景
-                            labelCtx.fillRect(centerX - halfTxtWidth - 3 * pixelRatio,
-                                centerY - 11 * pixelRatio,
-                                textMetrics.width + 6 * pixelRatio,
-                                22 * pixelRatio);
-
+                            labelCtx.strokeStyle= "rgba(12 , 239 , 231 , 0.5)"
+                            labelCtx.fillStyle = 'rgba(12 , 239 , 231 , 0.5)';
+                            labelCtx.arc(centerX , centerY,
+                                (textMetrics.width + 6 * pixelRatio) / 2,
+                                0*Math.PI,2*Math.PI,false);
+                            labelCtx.closePath();
+                            labelCtx.fill();
+                            // labelCtx.fillRect(centerX - halfTxtWidth - 3 * pixelRatio,
+                            //     centerY - 11 * pixelRatio,
+                            //     textMetrics.width + 6 * pixelRatio,
+                            //     22 * pixelRatio);
 
                             labelCtx.fillStyle = '#ffffff';
                             labelCtx.textBaseline = 'middle';
-                            labelCtx.stroke();
+                            //labelCtx.stroke();
                             labelCtx.fillText(text, centerX - halfTxtWidth, centerY);
-
+                            labelCtx.fillText(dataItems.length , centerX - 4, centerY + 15);
+                            labelCtx.stroke();
                             labelCtx.restore();
-                        }
+                        //}
                     }
                 });
 
@@ -247,7 +257,8 @@
                         featureClickToShowSub: true,
                         featureStyle: {
                             lineWidth: 2, //描边线宽
-                            strokeStyle: 'rgba(31, 119, 180, 0.8)', //描边色
+                            // strokeStyle: 'rgba(0, 119, 180, 0.5)', //描边色
+                            strokeStyle: 'rgba(75, 143, 239, 0.5)', //描边色
                             //鼠标Hover后的样式
                             hoverOptions: {
                                 fillStyle: 'rgba(255,255,255,0.2)'

+ 8 - 0
ys_vue/src/views/mold/moldDetail.vue

@@ -1049,6 +1049,14 @@
                     id: id
                 },
                 res => {
+                    // const elink = document.createElement('a')
+                    // elink.download = row.fileName
+                    // elink.style.display = 'none'
+                    // const blob = new Blob([res])
+                    // elink.href = URL.createObjectURL(blob)
+                    // document.body.appendChild(elink)
+                    // elink.click()
+                    // document.body.removeChild(elink)
                     this.getOperationRecord(this.activePage);
                 },
                 error => {

+ 10 - 10
ys_vue/src/views/project/projectDetail.vue

@@ -104,11 +104,11 @@
                                 <el-table-column prop="indate" label="上传时间" width="200" align="center" sortable></el-table-column>
                                 <el-table-column label="操作" width="220" align="center" sortable>
                                     <template slot-scope="scope" v-if="download == 1">
-                                        <!-- <a :href="scope.row.url" :download="scope.row.fileName"> -->
+                                        <a :href="scope.row.url" :download="scope.row.fileName">
                                             <el-button size="small" @click="dowloadFile(scope.row)">
                                                 下载
                                             </el-button>
-                                        <!-- </a> -->
+                                        </a>
                                         <el-button size="small" type="danger" @click="fileDel(scope.row.id)" v-if="scope.row.uploaderId == user.id">删除</el-button>
                                     </template>
                                     <template slot-scope="scope" v-else>
@@ -914,14 +914,14 @@
                 this.http.post(this.port.project.dowloadFile, {
                     id: row.id
                 } , res => {
-                    const elink = document.createElement('a')
-                    elink.download = row.fileName
-                    elink.style.display = 'none'
-                    const blob = new Blob([res])
-                    elink.href = URL.createObjectURL(blob)
-                    document.body.appendChild(elink)
-                    elink.click()
-                    document.body.removeChild(elink)
+                    // const elink = document.createElement('a')
+                    // elink.download = row.fileName
+                    // elink.style.display = 'none'
+                    // const blob = new Blob([res])
+                    // elink.href = URL.createObjectURL(blob)
+                    // document.body.appendChild(elink)
+                    // elink.click()
+                    // document.body.removeChild(elink)
                     this.getOperList();
                 }, error => {
                 })