Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/master'

Reiskuchen 5 anni fa
parent
commit
d01eb61931

+ 12 - 81
cloud-model/src/main/java/com/hssx/cloudmodel/controller/MouldFileController.java

@@ -25,6 +25,8 @@ import javax.servlet.http.HttpServletResponse;
 import java.io.*;
 import java.net.URLEncoder;
 import java.util.Map;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
 
 /**
  * <p>
@@ -40,6 +42,8 @@ public class MouldFileController {
 
     @Value("${upload.path}")
     private String path;
+    @Value("${download.path}")
+    private String downloadPath;
     @Autowired
     private MouldFileService mouldFileService;
     @Autowired
@@ -147,94 +151,21 @@ public class MouldFileController {
     }
     /**
      * 文档勾选批量下载
-     * 参数: mouldId 模具id
+     * 参数: ids 模具ids 如“1,2,3”
      *
      * @return
      */
     @ApiOperation("文档勾选批量下载")
-    @RequestMapping("/downloadfileList")
+    @RequestMapping(value = "/downloadfileList",method = RequestMethod.POST)
     @ResponseBody
-    public HttpRespMsg downloadfileList(UserVO userVO){
+    public HttpRespMsg downloadfileList(UserVO userVO,HttpServletRequest request, HttpServletResponse response){
         HttpRespMsg msg = new HttpRespMsg();
-        msg = mouldFileService.dowloadFileList(userVO);
+        try {
+            msg = mouldFileService.dowloadFileList(userVO,request,response,downloadPath);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
         return msg;
     }
-
-//    @RequestMapping(value = "xxx/xxx",method = RequestMethod.POST)
-//    @ResponseBody
-//    public Map<String,Object> feedBackDirectMultiDownload(HttpServletRequest request, HttpServletResponse response) throws IOException {
-//        //压缩文件初始设置
-//        String path="压缩文件想要放置的路径";
-//        base_name = "zip文件名";
-//        fileZip = base_name + ".zip"; // 拼接zip文件
-//        filePath = path+"\\" + fileZip;//之后用来生成zip文件
-//
-//        //filePathArr为根据前台传过来的信息,通过数据库查询所得出的pdf文件路径集合(具体到后缀),此处省略
-//        files = new File[fileNameArr.size()];//
-//        for(int i=0;i<fileNameArr.size();i++){
-//            files[i]=new File(fileNameArr.get(i).get("filePath"));//获取所有需要下载的pdf
-//        }
-//
-//        // 创建临时压缩文件
-//        try {
-//            BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));
-//            ZipOutputStream zos = new ZipOutputStream(bos);
-//            ZipEntry ze = null;
-//            for (int i = 0; i < files.length; i++) {//将所有需要下载的pdf文件都写入临时zip文件
-//                BufferedInputStream bis = new BufferedInputStream(new FileInputStream(files[i]));
-//                ze = new ZipEntry(files[i].getName());
-//                zos.putNextEntry(ze);
-//                int s = -1;
-//                while ((s = bis.read()) != -1) {
-//                    zos.write(s);
-//                }
-//                bis.close();
-//            }
-//            zos.flush();
-//            zos.close();
-//        } catch (IOException e) {
-//            e.printStackTrace();
-//        }
-//        //以上,临时压缩文件创建完成
-//
-//        //进行浏览器下载
-//        //获得浏览器代理信息
-//        final String userAgent = request.getHeader("USER-AGENT");
-//        //判断浏览器代理并分别设置响应给浏览器的编码格式
-//        String finalFileName = null;
-//        if(StringUtils.contains(userAgent, "MSIE")||StringUtils.contains(userAgent,"Trident")){//IE浏览器
-//            finalFileName = URLEncoder.encode(fileZip,"UTF8");
-//            System.out.println("IE浏览器");
-//        }else if(StringUtils.contains(userAgent, "Mozilla")){//google,火狐浏览器
-//            finalFileName = new String(fileZip.getBytes(), "ISO8859-1");
-//        }else{
-//            finalFileName = URLEncoder.encode(fileZip,"UTF8");//其他浏览器
-//        }
-//        response.setContentType("application/x-download");//告知浏览器下载文件,而不是直接打开,浏览器默认为打开
-//        response.setHeader("Content-Disposition" ,"attachment;filename=\"" +finalFileName+ "\"");//下载文件的名称
-//
-//        ServletOutputStream servletOutputStream=response.getOutputStream();
-//        DataOutputStream temps = new DataOutputStream(
-//                servletOutputStream);
-//
-//        DataInputStream in = new DataInputStream(
-//                new FileInputStream(filePath));//浏览器下载文件的路径
-//        byte[] b = new byte[2048];
-//        File reportZip=new File(filePath);//之后用来删除临时压缩文件
-//        try {
-//            while ((in.read(b)) != -1) {
-//                temps.write(b);
-//            }
-//            temps.flush();
-//        } catch (Exception e) {
-//            e.printStackTrace();
-//        }finally{
-//            if(temps!=null) temps.close();
-//            if(in!=null) in.close();
-//            if(reportZip!=null) reportZip.delete();//删除服务器本地产生的临时压缩文件
-//            servletOutputStream.close();
-//        }
-//        return null;
-//    }
 }
 

+ 1 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/entity/vo/UserVO.java

@@ -23,6 +23,7 @@ public class UserVO extends User {
     private Integer isManager = 0;
     private String powers;
     private Integer mouldId;//模具id
+    private String ids;//模具ids
     /**
      * 图档类型0-2D,1-3D
      */

+ 2 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/mapper/MouldFileMapper.java

@@ -19,4 +19,6 @@ import java.util.List;
 public interface MouldFileMapper extends BaseMapper<MouldFile> {
 
     List<MouldFileVO> getFileListByProjectId(@Param("userVO") UserVO userVO,@Param("list")List<Integer> proIds);
+
+    MouldFileVO getFileListByMouldId(@Param("id")Integer id);
 }

+ 5 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/service/MouldFileService.java

@@ -8,6 +8,10 @@ import com.hssx.cloudmodel.util.HttpRespMsg;
 import com.hssx.cloudmodel.util.PageUtil;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
 /**
  * <p>
  *  服务类
@@ -25,5 +29,5 @@ public interface MouldFileService extends IService<MouldFile> {
     HttpRespMsg delFile(MouldFile mouldFile);
     HttpRespMsg getListByUserAndProjectId(UserVO userVO, PageUtil page);
 
-    HttpRespMsg dowloadFileList(UserVO userVO);
+    HttpRespMsg dowloadFileList(UserVO userVO, HttpServletRequest request, HttpServletResponse response,String downloadPath) throws IOException;
 }

+ 10 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/CompanyServiceImpl.java

@@ -41,6 +41,8 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
     MouldMapper mouldMapper;
     @Resource
     ProjectUserMapper projectUserMapper;
+    @Resource
+    ProjectApproveMapper projectApproveMapper;
 
     @Override
     public HttpRespMsg addAndUpdateRole(CompanyVO companyVO, Integer flag) {
@@ -165,7 +167,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
             }
             companyVOS = companyMapper.getListMould(mouldIds);
         } else {
-            //此时是项目经理创建其他用户
+            //此时是项目经理
             QueryWrapper<Project> qw = new QueryWrapper<>();
             qw.eq("manager_id", currentUser.getId());
             List<Integer> set = new ArrayList<>();
@@ -183,6 +185,13 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
                     set.add(projectUser.getProjectId());
                 }
             }
+            //充当审批人员参与的项目
+            List<ProjectApprove> projectss = projectApproveMapper.selectList(new QueryWrapper<ProjectApprove>().eq("approver_id", userVO.getId()));
+            if (projectss.size() > 0) {
+                for (ProjectApprove projectUser : projectss) {
+                    set.add(projectUser.getProjectId());
+                }
+            }
             List<Mould> moulds = mouldMapper.selectList(new QueryWrapper<Mould>().in("project_id",set));
             List<Integer> mouldIds = new ArrayList<>();
             for (Mould mould : moulds) {

+ 91 - 4
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldFileServiceImpl.java

@@ -12,16 +12,21 @@ import com.hssx.cloudmodel.service.MouldFileService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.hssx.cloudmodel.util.FileUtil;
 import com.hssx.cloudmodel.util.HttpRespMsg;
+import com.hssx.cloudmodel.util.ListUtil;
 import com.hssx.cloudmodel.util.PageUtil;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.*;
+import java.net.URLEncoder;
 import java.util.*;
+import java.util.zip.ZipEntry;
 import java.util.zip.ZipOutputStream;
 
 /**
@@ -300,7 +305,89 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
     }
 
     @Override
-    public HttpRespMsg dowloadFileList(UserVO userVO) {
+    public HttpRespMsg dowloadFileList(UserVO userVO, HttpServletRequest request, HttpServletResponse response,String downloadPath) throws IOException {
+        HttpRespMsg msg = new HttpRespMsg();
+        if(null != userVO.getIds()){
+            List<Integer> ids = ListUtil.convertIntegerIdsArrayToList(userVO.getIds());
+            for (Integer id : ids) {
+                Mould mould = mouldMapper.selectById(id);
+                List<MouldFile> mouldFiles = mouldFileMapper.selectList(new QueryWrapper<MouldFile>().eq("model_id", id).eq("state",3));
+                feedBackDirectMultiDownload(request,response,downloadPath,mould,mouldFiles);
+            }
+        }
+        return msg;
+    }
+
+    public Map<String,Object> feedBackDirectMultiDownload(HttpServletRequest request, HttpServletResponse response,String downloadPath,Mould vo,List<MouldFile> mouldFiles) throws IOException {
+        //压缩文件初始设置
+        String path= downloadPath;
+        String base_name = vo.getModelNo()+vo.getModelName();
+        String fileZip = base_name + ".zip"; // 拼接zip文件
+        String filePath = path+"\\" + fileZip;//之后用来生成zip文件
+
+        //mouldFiles为根据前台传过来的信息,通过数据库查询所得出的pdf文件路径集合(具体到后缀),此处省略
+        File[] files = new File[mouldFiles.size()];//
+        for(int i=0;i<mouldFiles.size();i++){
+            files[i]=new File(mouldFiles.get(i).getFileUrl());//获取所有需要下载的pdf
+        }
+
+        // 创建临时压缩文件
+        try {
+            BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));
+            ZipOutputStream zos = new ZipOutputStream(bos);
+            ZipEntry ze = null;
+            for (int i = 0; i < files.length; i++) {//将所有需要下载的pdf文件都写入临时zip文件
+                BufferedInputStream bis = new BufferedInputStream(new FileInputStream(files[i]));
+                ze = new ZipEntry(files[i].getName());
+                zos.putNextEntry(ze);
+                int s = -1;
+                while ((s = bis.read()) != -1) {
+                    zos.write(s);
+                }
+                bis.close();
+            }
+            zos.flush();
+            zos.close();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        //以上,临时压缩文件创建完成
+        //进行浏览器下载
+        //获得浏览器代理信息
+        final String userAgent = request.getHeader("USER-AGENT");
+        //判断浏览器代理并分别设置响应给浏览器的编码格式
+        String finalFileName = null;
+        if(StringUtils.contains(userAgent, "MSIE")||StringUtils.contains(userAgent,"Trident")){//IE浏览器
+            finalFileName = URLEncoder.encode(fileZip,"UTF8");
+            System.out.println("IE浏览器");
+        }else if(StringUtils.contains(userAgent, "Mozilla")){//google,火狐浏览器
+            finalFileName = new String(fileZip.getBytes(), "ISO8859-1");
+        }else{
+            finalFileName = URLEncoder.encode(fileZip,"UTF8");//其他浏览器
+        }
+        response.setContentType("application/x-download");//告知浏览器下载文件,而不是直接打开,浏览器默认为打开
+        response.setHeader("Content-Disposition" ,"attachment;filename=\"" +finalFileName+ "\"");//下载文件的名称
+
+        ServletOutputStream servletOutputStream=response.getOutputStream();
+        DataOutputStream temps = new DataOutputStream(
+                servletOutputStream);
+
+        DataInputStream in = new DataInputStream(new FileInputStream(filePath));//浏览器下载文件的路径
+        byte[] b = new byte[2048];
+        File reportZip=new File(filePath);//之后用来删除临时压缩文件
+        try {
+            while ((in.read(b)) != -1) {
+                temps.write(b);
+            }
+            temps.flush();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }finally{
+            if(temps!=null) temps.close();
+            if(in!=null) in.close();
+            if(reportZip!=null) reportZip.delete();//删除服务器本地产生的临时压缩文件
+            servletOutputStream.close();
+        }
         return null;
     }
 }

+ 3 - 0
cloud-model/src/main/resources/application.properties

@@ -35,6 +35,9 @@ spring.thymeleaf.prefix=classpath:/static/
 ######################################################################################################
 # 文件上传路径
 upload.path=D:/mould/upload/
+######################################################################################################
+# 文件上传路径
+download.path=D:/mould/download/
 #######################################################################################################
 # 配置上传文件的大小设置
 # Single file max size  即单个文件大小

+ 91 - 0
cloud-model/src/main/resources/mapper/MouldFileMapper.xml

@@ -45,6 +45,26 @@
                     select="queryMaintainFilesByMouldId" column="id">
         </collection>
     </resultMap>
+    <resultMap id="BaseResultMapApprovedVO" type="com.hssx.cloudmodel.entity.vo.MouldFileVO">
+        <id column="id" property="id" />
+        <result column="model_no" property="modelNo"/>
+        <result column="model_name" property="modelName"/>
+        <collection property="mould2DFiles" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.MouldFile"
+                    select="queryApprovedMould2DFilesByMouldId" column="id">
+        </collection>
+        <collection property="mould3DFiles" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.MouldFile"
+                    select="queryApprovedMould3DFilesByMouldId" column="id">
+        </collection>
+        <collection property="sparepart2DFiles" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.MouldFile"
+                    select="queryApprovedSparepart2DFilesByMouldId" column="id">
+        </collection>
+        <collection property="sparepart3DFiles" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.MouldFile"
+                    select="queryApprovedSparepart3DFilesByMouldId" column="id">
+        </collection>
+        <collection property="maintainFiles" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.MouldFile"
+                    select="queryApprovedMaintainFilesByMouldId" column="id">
+        </collection>
+    </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
@@ -66,6 +86,15 @@
             </if>
         </where>
     </select>
+    <select id="getFileListByMouldId" resultMap="BaseResultMapApprovedVO">
+        select
+            id,model_no,model_name
+        from
+            tb_mould
+        <where>
+            id  = #{id}
+        </where>
+    </select>
     <select id="querySparepart3DFilesByMouldId" resultMap="BaseResultMap">
         select
             id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
@@ -80,6 +109,22 @@
         and
             dwg_type = 1
     </select>
+    <select id="queryApprovedSparepart3DFilesByMouldId" resultMap="BaseResultMap">
+        select
+            id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
+            project_id, file_url, file_name, blong_type, content, state,
+            file_type, file_size, dwg_type
+        from
+            tb_mould_file
+        where
+            model_id = #{id}
+        and
+            blong_type = 1
+        and
+            dwg_type = 1
+        and
+            state = 3
+    </select>
     <select id="querySparepart2DFilesByMouldId" resultMap="BaseResultMap">
         select
             id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
@@ -94,6 +139,22 @@
         and
             dwg_type = 0
     </select>
+    <select id="queryApprovedSparepart2DFilesByMouldId" resultMap="BaseResultMap">
+        select
+            id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
+            project_id, file_url, file_name, blong_type, content, state,
+            file_type, file_size, dwg_type
+        from
+            tb_mould_file
+        where
+            model_id = #{id}
+        and
+            blong_type = 1
+        and
+            dwg_type = 0
+        and
+            state = 3
+    </select>
     <select id="queryMould3DFilesByMouldId" resultMap="BaseResultMap">
         select
             id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
@@ -108,6 +169,22 @@
         and
             dwg_type = 1
     </select>
+    <select id="queryApprovedMould3DFilesByMouldId" resultMap="BaseResultMap">
+        select
+            id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
+            project_id, file_url, file_name, blong_type, content, state,
+            file_type, file_size, dwg_type
+        from
+            tb_mould_file
+        where
+            model_id = #{id}
+        and
+            blong_type = 0
+        and
+            dwg_type = 1
+        and
+            state = 3
+    </select>
     <select id="queryMould2DFilesByMouldId" resultMap="BaseResultMap">
         select
             id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
@@ -134,4 +211,18 @@
         and
             blong_type = 3
     </select>
+    <select id="queryApprovedMaintainFilesByMouldId" resultMap="BaseResultMap">
+        select
+            id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
+            project_id, file_url, file_name, blong_type, content, state,
+            file_type, file_size
+        from
+            tb_mould_file
+        where
+            model_id = #{id}
+        and
+            blong_type = 3
+        and
+            state = 3
+    </select>
 </mapper>

+ 27 - 1
ys_vue/index.html

@@ -49,6 +49,31 @@
                 line-height: 20px;
                 background-color: #fff;
             }
+
+            div.info-item {
+                width: 300px;
+                height: 30px;
+                line-height: 30px;
+                padding:0 8px;
+            }
+
+            div.info-item a {
+                color: #20a0ff;
+                cursor: pointer;
+            }
+
+            span.info-state {
+                float:right;
+            }
+
+            span.info-ball {
+                display: inline-block;
+                width:10px;
+                height:10px;
+                border-radius: 50%;
+                margin-right: 10px;
+                line-height: 30px;
+            }
             
             .customWidth {
                 width: 675px!important;
@@ -82,7 +107,8 @@
             /*取消消息列表弹出框的内边距*/
             .popover-self {
                 padding: 0 !important;
-            }    </style>
+            }    
+        </style>
     </head>
     <body>
         <div id="app"></div>

+ 3 - 0
ys_vue/src/port.js

@@ -11,6 +11,9 @@ export default {
     pwd: {
         resetPwd: '/user/updatePassword'
     },
+    map: {
+        mapList: '/company/getCoutomCompanyAndMouldsByUser' //生产方公司和公司下所属的模具
+    },
     project: {
         userList: '/user/list',  //用户列表
         addUser: '/user/add',  //添加或修改用户

+ 86 - 57
ys_vue/src/views/map/map.vue

@@ -12,70 +12,99 @@
 			}
 		},
 		methods: {
-            
-        },
-        mounted() {
-            let height = window.innerHeight;
-            height = height - 100;
-            this.$el.style.height = height + "px";
+            getMap() {
+                var _this = this
+                this.http.post( this.port.map.mapList, {},
+                res => {
+                    if (res.code == "ok") {
+                        var list = res.data;
 
-            var map = new AMap.Map('container', {
-                resizeEnable: true,   
-                zoom: 5
-            });
-            map.clearMap();  
-            var markers = [] , 
-                infoWindow , 
-                data=[{"fLong":'112.00003','fLati':'30.2345'},{"fLong":'115.00003','fLati':'18.2345'},{"fLong":'114.00003','fLati':'38.2345'},{"fLong":'116.00003','fLati':'38.2345'}];
+                        var map = new AMap.Map('container', {
+                            resizeEnable: true,   
+                            zoom: 5
+                        });
+                        map.clearMap();  
+                        var markers = [] , 
+                            infoWindow , 
+                            data = list;
 
-            var marker;
-            for(var i in data){
-                var jfong=[ data[i].fLong , data[i].fLati ];
-				marker = new AMap.Marker({
-                    position: jfong,
-                    zIndex: 101,
-                    map:map
-				});	
-                marker.setMap(map);	
-                marker.orderON=data[i].orderON;
-                marker.tranOFID=data[i].tranOFID;
-                marker.fhadd=data[i].fhadd;
-                marker.sAdd=data[i].sAdd;
-                marker.status=data[i].status;			
-			    marker.on('click', function(data){
-                    var MyComponent = Vue.extend({
-                        template: "<div class='window'>" +
-                            "<div class='info-top'><div>方恒假日酒店<span>价格:318</span></div><i class='el-icon-close' @click='closeInfoWindow()'></i></div>" +
-                            "<div class='info-middle'>" + 
-                                "地址:北京市朝阳区阜通东大街6号院3号楼东北8.3公里<br>" +
-                                "电话:010-64733333<br>" +
-                                "经度:" + data.lnglat.lng + "<br>" +
-                                "纬度:" + data.lnglat.lat + "<br>" +
-                                "<a href='https://ditu.amap.com/detail/B000A8URXB?citycode=110105'>详细信息</a>" +
-                            "</div>" +
-                        "</div>",
-                        methods:{
-                            closeInfoWindow:function() {
-                                map.clearInfoWindow();
-                            }
+                        var marker;
+                        for(var i in data){
+                            var jfong=[ data[i].ylng , data[i].xlat];
+                            marker = new AMap.Marker({
+                                position: jfong,
+                                zIndex: 101,
+                                map:map
+                            });	
+                            marker.setMap(map);	
+                            marker.msg = data[i];
+                            marker.on('click', function(data){
+                                console.log(data)
+                                var str = "<div class='window'>" +
+                                    "<div class='info-top'><div>"+ data.target.msg.companyName +"</div><i class='el-icon-close' @click='closeInfoWindow()'></i></div>" +
+                                    "<div class='info-middle'>";
+                                    for(var i in data.target.msg.list){
+                                        str += "<div class='info-item'><a @click='jumpToMold("+ data.target.msg.list[i].id +")'>" + data.target.msg.list[i].modelName + "(" + data.target.msg.list[i].modelNo + ")</a>"
+                                            if(data.target.msg.list[i].state=='0'){
+                                                str += "<span class='info-state'><span class='info-ball' style='background:#CD2626;'></span>静止</span>"
+                                            } else {
+                                                str += "<span class='info-state'><span class='info-ball' style='background:#00CD66;'></span>运行</span>"
+                                            }
+                                        str += "</div>"
+                                    }
+                                    str += "</div>" +
+                                "</div>"
+
+                                var MyComponent = Vue.extend({
+                                    template: str ,
+                                    methods:{
+                                        closeInfoWindow:function() {
+                                            map.clearInfoWindow();
+                                        },
+                                        jumpToMold:function(id) {
+                                            _this.$router.push("/moldList/" + id);
+                                        }
+                                    }
+                                });
+                                var component= new MyComponent().$mount();
+                                infoWindow.setContent(component.$el);
+                                infoWindow.open(map, data.lnglat);
+                            });
                         }
+
+                        infoWindow = new AMap.InfoWindow({
+                            isCustom:	true,
+                            draggable: true,  //是否可拖动
+                            showShadow: true,
+                            autoMove: true,
+                            offset: new AMap.Pixel(0, -31),
+                            content:""
+                        });
+
+                        marker.setMap(map);
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
                     });
-                    var component= new MyComponent().$mount();
-                    infoWindow.setContent(component.$el);
-                    infoWindow.open(map, data.lnglat);
                 });
             }
+        },
+        mounted() {
+            this.getMap();
 
-            infoWindow = new AMap.InfoWindow({
-                isCustom:	true,
-                draggable: true,  //是否可拖动
-                showShadow: true,
-                autoMove: true,
-                offset: new AMap.Pixel(0, -31),
-                content:""
-            });
-
-            marker.setMap(map);
+            this.$el.style.height = (window.innerHeight - 100) + "px";
+            const that = this;
+            window.onresize = function temp() {
+                this.$el.style.height = (window.innerHeight - 100) + "px";
+            };
         }
 	}
 

File diff suppressed because it is too large
+ 824 - 856
ys_vue/src/views/mold/moldDetail.vue


+ 2 - 3
ys_vue/src/views/mold/moldList.vue

@@ -180,8 +180,7 @@
                         message: error,
                         type: "error"
                     });
-                }
-            );
+                });
             },
             //分页
             handleCurrentChange(val) {
@@ -238,7 +237,7 @@
 
             //详情
             toDetail(row) {
-            this.$router.push("/moldList/" + row.id);
+                this.$router.push("/moldList/" + row.id);
             },
 
             //添加界面

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

@@ -96,8 +96,8 @@
                 <el-table-column type="index" width="40"></el-table-column>
                 <el-table-column prop="content" label="操作" width="120" sortable></el-table-column>
                 <el-table-column prop="fileName" label="操作文档名称" sortable></el-table-column>
-                <el-table-column prop="operator" label="操作人" width="120" sortable></el-table-column>
-                <el-table-column prop="indate" label="操作时间" width="200" sortable></el-table-column>
+                <el-table-column prop="operator" label="操作人" width="120" align="center" sortable></el-table-column>
+                <el-table-column prop="indate" label="操作时间" width="200" align="center" sortable></el-table-column>
             </el-table>
         </el-col>