ZhouRuiTing пре 5 година
родитељ
комит
1c98f73f12

+ 2 - 2
cloud-model/src/main/resources/application.properties

@@ -14,9 +14,9 @@ spring.thymeleaf.jackson.date-format=yyyy-MM-dd HH:mm:ss
 # Êý¾ÝÔ´ÅäÖÃ
 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
 #spring.datasource.url=jdbc:mysql://118.190.47.230:3306/cloud_model?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
-spring.datasource.url=jdbc:mysql://118.190.47.230:3306/cloud_mould?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+spring.datasource.url=jdbc:mysql://47.100.37.243:7644/cloud_model?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
 spring.datasource.username=root
-spring.datasource.password=p011430seya1026
+spring.datasource.password=Hssx2018.!
 #spring.datasource.druid.test-on-borrow=true
 #spring.datasource.druid.test-while-idle=true
 # ####################################################################################################

+ 1 - 1
ys_int/config/index.js

@@ -29,7 +29,7 @@ module.exports = {
     assetsPublicPath: '/',
     proxyTable: {
         '/api': {    
-            target: 'http://'+ ip +':8099',  // 接口域名 开发
+            target: 'http://'+ ip +':9099',  // 接口域名 开发
             secure: true,  // 如果是https接口,需要配置这个参数
             changeOrigin: true,  //是否跨域
             pathRewrite: { // 如果接口本身没有api的路径,那么这里将发送到后端的请求重写为没有api的路径

+ 4 - 1
ys_int/src/i18n/lang/en.js

@@ -39,6 +39,7 @@ const lang = {
 		success7: "Approval Success",
 		success8: "Application Success",
 		success9: "Update Success",
+        success10: "Clear Success",
     },
     msg: {
         changeLanguage: "Whether to change the language?",
@@ -373,7 +374,9 @@ const lang = {
         proAddress: "Producer Address",
         inputProAddress: "Please enter the producer address",
         delPro: "Are you sure to delete the producer?",
-		// 云模盒管理
+        // 云模盒管理
+        clearData: "Clear Data",
+        isClearData: "Whether to clear data?",
 		addYM: "Add Equipment",
 		editYM: "Edit Equipment",
 		chooseComp: "Please select a company",

+ 5 - 2
ys_int/src/i18n/lang/zh.js

@@ -38,7 +38,8 @@ const lang = {
 		fail: "复制失败",
 		success7: "审批成功",
 		success8: "申请成功",
-		success9: "更新成功",
+        success9: "更新成功",
+        success10: "清除成功",
     },
     msg: {
         changeLanguage: "是否切换语言?",
@@ -374,7 +375,9 @@ const lang = {
         proAddress: "生产方地址",
         inputProAddress: "请输入生产方地址",
         delPro: "确认删除该生产方吗?",
-		// 云模盒管理
+        // 云模盒管理
+        clearData: "清除数据",
+        isClearData: "是否清除数据?",
 		addYM: "新建云模盒",
 		editYM: "编辑云模盒",
 		chooseComp: "请选择公司",		

+ 2 - 0
ys_int/src/port.js

@@ -114,6 +114,8 @@ export default {
         openingAndClosingTimesChart: '/mouldhistory/openingAndClosingTimesChart', //获取云模盒的每日开合次数图表 (时间/次数)
         openingAndClosingTimesChartCycle: '/mouldhistory/openingAndClosingTimesChartCycle', //获取云模盒的每日开合次数周期 (时间/次数)
         exportExcel: '/mouldhistory/exportExcel', // 导出excel
+
+        clearData: '/mouldhistory/clearData',       //清除数据
     },
     file: {
         view: '/pdffile/getPdfFile' // 文件预览

+ 34 - 0
ys_int/src/views/base/allocation.vue

@@ -35,6 +35,9 @@
                 <el-form-item style="float:right;">
 					<el-button type="primary" @click="showChangeIp()">{{$t('runTest.changeIp')}}</el-button>
 				</el-form-item>
+                <el-form-item style="float: right;">
+                    <el-button type="primary" @click="clearData">{{$t('basic.clearData')}}</el-button>
+                </el-form-item>
                 <!-- <el-form-item style="float: right;">
                     <el-button type="primary" @click="issued">{{$t('base.issued')}}</el-button>
                 </el-form-item> -->
@@ -717,6 +720,37 @@
                 }).catch(() => {
 
                 });
+            },
+
+            //清除数据
+            clearData() {
+                var _this = this;
+                this.$confirm(this.$t('basic.isClearData'), this.$t('el.messagebox.title'), {
+                    confirmButtonText: this.$t('el.messagebox.confirm'),
+                    cancelButtonText: this.$t('el.messagebox.cancel'),
+                    type: 'warning'
+                }).then(() => {
+                    this.http.post( this.port.base.clearData , {},
+                    res => {
+                        if (res.code == "ok") {
+                            this.$message({
+                                type: 'success',
+                                message: this.$t('prompt.success10')
+                            });
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },
+                    error => {
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                    });
+                }).catch(() => {});
             }
         },
         created() {

+ 111 - 3
ys_int/src/views/detection/maintenance.vue

@@ -73,6 +73,14 @@
                         <el-date-picker v-model="openCycle" style="float:right;width:125px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" 
                         @change='changeOpen(2)' size="mini" :clearable="false" type="date" :placeholder="$t('el.datepicker.selectDate')"></el-date-picker>
                     </div> -->
+                    <div id="btnCharts">
+                        <el-checkbox-group v-model="checkList" @change="changeCheck">
+                            <el-checkbox :label="$t('runTest.maxOpenCycle')"></el-checkbox>
+                            <el-checkbox :label="$t('runTest.minOpenCycle')"></el-checkbox>
+                            <el-checkbox :label="$t('runTest.avgOpenCycle')"></el-checkbox>
+                            <el-checkbox :label="$t('runTest.theoryCycle')"></el-checkbox>
+                        </el-checkbox-group>
+                    </div>
                     <div id="myChart2" :style="{ height: '400px'}"></div>
                 </el-col>
             </el-col>
@@ -271,6 +279,10 @@
                 exportFormVisible: false,
                 exportTime: [],
                 exportType: '开合次数数据',
+
+                checkList: [this.$t('runTest.maxOpenCycle'),this.$t('runTest.minOpenCycle'),this.$t('runTest.avgOpenCycle'),this.$t('runTest.theoryCycle')],
+                option: null,
+
             };
         },
         methods: {
@@ -555,7 +567,8 @@
                             legend: {
                                 data:[this.$t('runTest.maxOpenCycle'),this.$t('runTest.minOpenCycle'),this.$t('runTest.avgOpenCycle'),this.$t('runTest.theoryCycle')],//,this.$t('runTest.openNum')
                                 x: '30%',
-                                y: '-4'
+                                y: '-4',
+                                show: false
                             },
                             toolbox: {
                                 right: '20',
@@ -567,7 +580,7 @@
                                 {
                                     left: '0%',
                                     right: '55%',
-                                    top: '15%',
+                                    top: '10%',
                                     bottom: '15%',
                                     containLabel: true
                                 },
@@ -575,7 +588,7 @@
                                     gridindex: 1,
                                     left: '48%',
                                     right: '3%',
-                                    top: '15%',
+                                    top: '10%',
                                     bottom: '15%',
                                     containLabel: true
                                 }
@@ -725,6 +738,16 @@
                             ]
                         };
                         // this.drawEchart(2,JSON.stringify(option));
+                        var selectOption = {} , array = [];
+                        for(var i in option.legend.data) {
+                            if(this.checkList.indexOf(option.legend.data[i]) == -1) {
+                                selectOption[option.legend.data[i]] = false;
+                            } else {
+                                selectOption[option.legend.data[i]] = true;
+                            }
+                        }
+                        option.legend.selected = selectOption;
+                        this.option = option;
                         myChart.setOption(option);
                     } else {
                         this.$message({
@@ -740,6 +763,19 @@
                     });
                 });
             },
+
+            changeCheck() {
+                var selectOption = {};
+                for(var i in this.option.legend.data) {
+                    if(this.checkList.indexOf(this.option.legend.data[i]) == -1) {
+                        selectOption[this.option.legend.data[i]] = false;
+                    } else {
+                        selectOption[this.option.legend.data[i]] = true;
+                    }
+                }
+                this.option.legend.selected = selectOption;
+                this.echarts2.setOption(this.option);
+            },
             
             drawEchart(type,option) {
             },
@@ -841,4 +877,76 @@
         font-size: 18px;
         color: #333;
     }
+
+    #btnCharts {
+        text-align: center;
+        margin: 5px 0 30px;
+    }
+</style>
+<style lang="scss">
+    #btnCharts {
+        .el-checkbox:nth-child(1) {
+            .el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner {
+                background-color: #F26F7C;
+                border-color: #F26F7C;
+            }
+            .el-checkbox__inner:hover {
+                border-color: #F26F7C;
+            }
+            .el-checkbox__label {
+                color: #F26F7C;
+            }
+            .el-checkbox__input.is-checked+.el-checkbox__label {
+                color: #F26F7C;
+            }
+        }
+
+        .el-checkbox:nth-child(2) {//95F8FB
+            .el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner {
+                background-color: #7FE0D9;
+                border-color: #7FE0D9;
+            }
+            .el-checkbox__inner:hover {
+                border-color: #7FE0D9;
+            }
+            .el-checkbox__label {
+                color: #7FE0D9;
+            }
+            .el-checkbox__input.is-checked+.el-checkbox__label {
+                color: #7FE0D9;
+            }
+        }
+
+        .el-checkbox:nth-child(3) {//C4E486
+            .el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner {
+                background-color: #C4E486;
+                border-color: #C4E486;
+            }
+            .el-checkbox__inner:hover {
+                border-color: #C4E486;
+            }
+            .el-checkbox__label {
+                color: #C4E486;
+            }
+            .el-checkbox__input.is-checked+.el-checkbox__label {
+                color: #C4E486;
+            }
+        }
+
+        .el-checkbox:nth-child(4) {//FFA44D
+            .el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner {
+                background-color: #FFA44D;
+                border-color: #FFA44D;
+            }
+            .el-checkbox__inner:hover {
+                border-color: #FFA44D;
+            }
+            .el-checkbox__label {
+                color: #FFA44D;
+            }
+            .el-checkbox__input.is-checked+.el-checkbox__label {
+                color: #FFA44D;
+            }
+        }
+    }
 </style>

+ 21 - 11
ys_int/src/views/map/map.vue

@@ -245,8 +245,8 @@
                             marker.content = str;
                             marker.id = data[i].id;
                             marker.on('click', jumpTo);
-                            // marker.on('mouseover', openInfo);
-                            // marker.on('mouseout', closeInfo);
+                            marker.on('mouseover', openInfo);
+                            marker.on('mouseout', closeInfo);
                         }
                     }
 
@@ -271,22 +271,15 @@
                         var data = res.data;
                         _this.moldList = data;
                         distCluster.setData(data);
-                        // pointSimplifierIns.setData(data);
                         setPoint(data);
                         _this.map.setZoomAndCenter(5, [105.205467, 34.907761]);
                     },
-                    error => {
-                        // _this.$message({
-                        //     message: error,
-                        //     type: "error"
-                        // });
-                    })
+                    error => {})
                 });
                 })
             },
 
             jumpTo(id) {
-                console.log(id)
             }
         },
         mounted() {
@@ -302,6 +295,17 @@
                 mapStyle: "amap://styles/8016abec658e1132508723183f848f14",
                 features: ['bg']
             });
+
+            that.map.plugin(["AMap.Scale"],function(){
+                var scale = new AMap.Scale();
+                that.map.addControl(scale);
+            });
+
+            that.map.plugin(["AMap.ToolBar"],function(){
+                var tool = new AMap.ToolBar();
+                that.map.addControl(tool);    
+            });
+            that.map.setDefaultCursor("pointer");
             that.setMap();
         },
 	}
@@ -311,6 +315,12 @@
 <style scoped lang="scss">
     #container {
         width: 100%; 
-        margin-top: 10px;
+        cursor: pointer!important;
     }  
 </style>
+<style>
+    .amap-ui-district-cluster-container {
+        cursor: pointer;
+    }
+</style>
+