Browse Source

Merge branch 'master' of http://47.100.37.243:10080/ZHOU/yunsu

# Conflicts:
#	cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldFileServiceImpl.java
sunyadv 5 years ago
parent
commit
8494c8726f

+ 58 - 56
ys_vue/src/views/map/map.vue

@@ -19,68 +19,70 @@
                     if (res.code == "ok") {
                         var list = res.data;
 
-                        var map = new AMap.Map('container', {
-                            resizeEnable: true,   
-                            zoom: 5
-                        });
-                        map.clearMap();  
-                        var markers = [] , 
-                            infoWindow , 
-                            data = list;
+                        if(list != null && list.length > 0){
+                            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].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){
-                                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:#999999;'></span>静止</span>"
-                                            } else {
-                                                str += "<span class='info-state'><span class='info-ball' style='background:#00CD66;'></span>运行</span>"
-                                            }
-                                        str += "</div>"
-                                    }
-                                    str += "</div>" +
-                                "</div>"
+                            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){
+                                    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:#999999;'></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 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);
                                 });
-                                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:""
-                        });
+                            infoWindow = new AMap.InfoWindow({
+                                isCustom:	true,
+                                draggable: true,  //是否可拖动
+                                showShadow: true,
+                                autoMove: true,
+                                offset: new AMap.Pixel(0, -31),
+                                content:""
+                            });
 
-                        marker.setMap(map);
+                            marker.setMap(map);
+                        }
                     } else {
                         this.$message({
                             message: res.msg,

+ 10 - 1
ys_vue/src/views/mold/moldDetail.vue

@@ -61,7 +61,7 @@
             </el-col>
             <el-col :span="12" class="detail">
                 所属项目:
-                <span class="info">{{moldDetail.projectName}}</span>
+                <span class="info belongPro" @click="toPro(moldDetail.projectId)">{{moldDetail.projectName}}</span>
             </el-col>
             <el-col :span="24" class="detail">
                 生产方:
@@ -638,6 +638,10 @@
                 this.$router.push("/detection");
             },
 
+            toPro(id) {
+                this.$router.push('/project/' + id);
+            },
+
             //标签页面切换时
             handleClick(tab, event) {
                 this.activeTab = tab.name;
@@ -1283,6 +1287,11 @@
         color: grey;
     }
 
+    .belongPro {
+        cursor: pointer;
+        color:#20a0ff;
+    }
+
     .main {
         padding-left: 10px;
     }

+ 1 - 0
ys_vue/src/views/project/competence.vue

@@ -164,6 +164,7 @@
 			getPowerList() {
 				this.listLoading = true;
                 this.http.post(this.port.project.powerList, {
+                    projectId: this.filters.projectId,
                     keyName: this.filters.keyName,
                     pageNum: this.page,
                     pageSize: this.size

+ 11 - 3
ys_vue/src/views/project/projectDetail.vue

@@ -67,7 +67,7 @@
             <el-col :span="24" class="title">项目文档
                 <!-- update == 1 -->
                 <el-upload v-if="user.id == proDetail.managerId" class="upload-demo" action="customize" :http-request="uploadFile" :show-file-list="false" multiple :limit="5" style="float:right;">
-                    <el-button size="small" type="primary">点击上传</el-button>
+                    <el-button size="small" type="primary" :loading="upLoading">点击上传</el-button>
                 </el-upload>
             </el-col>
             <el-col :span="24">
@@ -193,6 +193,7 @@
                 },
 
                 listLoading: false,
+                upLoading: false,
                 oplistLoading: false,
                 activePage: 0,
 
@@ -241,7 +242,8 @@
         methods: {
             //返回
             backToList() {
-                this.$router.push("/project");
+                this.$router.go(-1);
+                // this.$router.push("/project");
             },
             toMold(id) {
                 this.$router.push('/moldList/' + id);
@@ -347,8 +349,11 @@
                         var list = res.data , assets = [] , produce = [];
                         for(var i in list) {
                             if(list[i].companyId == this.user.companyId){
+                                console.log(list[i])
                                 if(list[i].id != this.user.id){
-                                    assets.push(list[i])
+                                    if(list[i].id != this.proDetail.managerId){
+                                        assets.push(list[i])
+                                    }
                                 }
                             } else {
                                 produce.push(list[i])
@@ -592,11 +597,13 @@
             },
             //上传
             uploadFile(params) {
+                this.upLoading = true;
                 var fileObj = params.file;
                 var form = new FormData();
                 form.append("projectId", this.proDetail.id);
                 form.append("file", fileObj);
                 this.http.uploadFile(this.port.project.uploadFile, form , res => {
+                    this.upLoading = false;
                     if (res.code == "ok") {
                         this.$message({
                             message: '上传成功',
@@ -611,6 +618,7 @@
                         });
                     }
                 }, error => {
+                    this.upLoading = false;
                     this.$message({
                         message: error,
                         type: 'error'