Преглед на файлове

1.1 数据探查配置基本完成

allen преди 3 години
родител
ревизия
80d5bbaac2

+ 1 - 1
src/router/index.js

@@ -72,7 +72,7 @@ const mainRoutes = {
     { path: '/train-compare', component: _import('modules/alg/train-compare'), name: 'traincompare', meta: { title: '训练任务tensorboard图像对比', isTab: false } },
     // 数据探测路由
     { path: '/snoop-measure', component: _import('modules/snoop/measure'), name: 'measure', meta: { title: '创建度量标准', isTab: false } },
-    { path: '/snoop-job', component: _import('modules/snoop/job'), name: 'job', meta: { title: '创建调度任务', isTab: false } }
+    { path: '/snoop-job', component: _import('modules/snoop/job'), name: 'job', meta: { title: '创建调度任务', isTab: false } },
     { path: '/visi-previewcsv', component: _import('modules/visi/previewcsv'), name: 'previewcsv', meta: { title: '预览csv', isTab: false } }
   ],
   beforeEnter (to, from, next) {

+ 20 - 19
src/views/modules/snoop/home.vue

@@ -140,6 +140,9 @@ import jobWatch from './jobWatch'
 import jobLog from './jobLog'
 // import jobResultVisi from './jobResult_visi'
 import jobResultVisiEchars from './jobResult_visi_echars'
+import { MessageBox } from 'element-ui'
+import { Message } from 'element-ui'
+
 export default {
   // import引入的组件需要注入到对象中才能使用
   data () {
@@ -237,7 +240,7 @@ export default {
       }).then((datas) => {
         if (datas && datas.status === 200) {
           var res = datas.data.reverse()
-          console.log(res)
+          // console.log(res)
           res.map((info) => {
             var measure = {
               'measureID': info['id'],
@@ -362,7 +365,7 @@ export default {
       })
     },
     jobResumeHandle (info) {
-      this.$confirm(
+      MessageBox.confirm(
         `确定对[任务名=${info.jobName}]进行[恢复]操作?`,
         '提示',
         {
@@ -378,7 +381,7 @@ export default {
           method: 'put'
         }).then((data) => {
           if (data && data.status === 200) {
-            this.$message({
+            Message({
               message: '操作成功',
               type: 'success',
               duration: 1500,
@@ -396,7 +399,7 @@ export default {
         })
     },
     jobPauseHandle (info) {
-      this.$confirm(
+      MessageBox.confirm(
         `确定对[任务名=${info.jobName}]进行[暂停]操作?`,
         '提示',
         {
@@ -412,7 +415,7 @@ export default {
           method: 'put'
         }).then((data) => {
           if (data && data.status === 200) {
-            this.$message({
+            Message({
               message: '操作成功',
               type: 'success',
               duration: 1500,
@@ -430,7 +433,7 @@ export default {
         })
     },
     jobDeleteHandle (info) {
-      this.$confirm(
+      MessageBox.confirm(
         `确定对[任务名=${info.jobName}]进行 [删除] 操作?`,
         '提示',
         {
@@ -447,7 +450,7 @@ export default {
         }).then((data) => {
           // console.log(data)
           if (!data.data) {
-            this.$message({
+            Message({
               message: '操作成功',
               type: 'success',
               duration: 1500,
@@ -456,7 +459,7 @@ export default {
               }
             })
           } else {
-            this.$message.error(info.jobName + '删除失败')
+            MessageBox.error(info.jobName + '删除失败')
             this.getJobList()
           }
         })
@@ -466,7 +469,7 @@ export default {
     },
     // ********** 删除
     measureDeleteHandle (info) {
-      this.$confirm(
+      MessageBox.confirm(
         `确定对[${info.measureName}]进行[删除]操作? 删除后,对应job也会被删除`,
         '提示',
         {
@@ -482,7 +485,7 @@ export default {
           }).then(({data}) => {
             this.measDataListLoading = true
             if (!data.data) {
-              this.$message({
+              Message({
                 message: '操作成功',
                 type: 'success',
                 duration: 1500
@@ -491,7 +494,7 @@ export default {
               this.getMeasureList()
               this.pageIndex = 1
             } else {
-              this.$message.error(data.msg)
+              Message.error(data.msg)
             }
           })
         })
@@ -505,7 +508,7 @@ export default {
         for (var index in this.dataListSelections) {
           allMeasureName.push(this.dataListSelections[index].measureName)
         }
-        await this.$confirm(
+        await MessageBox.confirm(
           `确定对[${allMeasureName}]进行[删除]操作? 删除后,对应job也会被删除`,
           '提示',
           {
@@ -523,14 +526,13 @@ export default {
               method: 'delete'
             }).then((data) => {
               if (data.data) {
-                console.log(111)
                 failure.push(this.dataListSelections[index])
               }
             })
           }
 
           if (failure.length === 0) {
-            this.$message({
+            MessageBox({
               message: '操作成功',
               type: 'success',
               duration: 1500
@@ -540,7 +542,7 @@ export default {
             failure.forEach(x => {
               msg = msg + ' ' + x.measureName
             })
-            this.$message.error(msg)
+            MessageBox.error(msg)
           }
           setTimeout(() => {
             this.measDataListLoading = false
@@ -554,7 +556,7 @@ export default {
         for (var jobindex in this.dataListSelections) {
           allJobName.push(this.dataListSelections[jobindex].jobName)
         }
-        await this.$confirm(
+        await MessageBox.confirm(
           `确定对[${allJobName}]进行[删除]操作? `,
           '提示',
           {
@@ -572,14 +574,13 @@ export default {
               method: 'delete'
             }).then((data) => {
               if (data.data) {
-                console.log(111)
                 failure.push(this.dataListSelections[index])
               }
             })
           }
 
           if (failure.length === 0) {
-            this.$message({
+            MessageBox({
               message: '操作成功',
               type: 'success',
               duration: 1500
@@ -589,7 +590,7 @@ export default {
             failure.forEach(x => {
               msg = msg + ' ' + x.jobName
             })
-            this.$message.error(msg)
+            MessageBox.error(msg)
           }
           setTimeout(() => {
             this.jobDataListLoading = false

+ 4 - 2
src/views/modules/snoop/job.vue

@@ -49,6 +49,8 @@
 
 <script>
 import mycron from '../visi/quartz/mycron'
+import { MessageBox } from 'element-ui'
+import { Message } from "element-ui"
 export default {
   components: {mycron},
   name: 'job',
@@ -177,12 +179,12 @@ export default {
 
           setTimeout(() => {
             if (submit) {
-              this.$message({
+              Message({
                 message: '调度任务   ' + this.jobcForm.name + '   创建成功',
                 type: 'success'
               })
             } else {
-              this.$message({
+              Message({
                 message: '调度任务   ' + this.jobcForm.name + '   创建失败',
                 type: 'error'
               })

+ 1 - 1
src/views/modules/snoop/jobLog.vue

@@ -126,7 +126,7 @@ export default {
         })
       }).then((data) => {
         if (data && data.status === 200) {
-          console.log(data.data)
+          // console.log(data.data)
           this.dataList = data.data
         }
         this.$nextTick(() => {

+ 1 - 1
src/views/modules/snoop/jobResult_visi_echars.vue

@@ -175,7 +175,7 @@ export default {
     // 折线图
     initChartLine (cloum) {
       let datas = this.visiDataMap[cloum]
-      console.log(datas)
+      // console.log(datas)
       if (datas && cloum !== '-1') {
         let xdata = []
         let ydata = []

+ 33 - 21
src/views/modules/snoop/measure.vue

@@ -240,6 +240,8 @@
 // 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
 // 例如:import 《组件名称》 from '《组件路径》';
 import showRules from './showRules'
+import { MessageBox } from 'element-ui'
+import { Message } from "element-ui"
 
 export default {
   created () {
@@ -470,7 +472,7 @@ export default {
       }
     },
     treeNodeClick (data, node) {
-      this.tableData=[]
+      this.tableData = []
       if (data.limit === 'children') {
         // node.data.icon = 'iconfont icon-xitong4'
         this.chooseEqpment = data
@@ -497,7 +499,7 @@ export default {
               this.tableData.push(table)
             }
           } else {
-            this.$message({
+            Message({
               message: '获取   ' + this.chooseEqpment.name + '   列数据失败',
               type: 'error'
             })
@@ -605,12 +607,12 @@ export default {
       var submit = this.finallySubmit()
       setTimeout(() => {
         if (submit) {
-          this.$message({
+          Message({
             message: '度量标准   ' + this.datacForm.name + '   创建成功',
             type: 'success'
           })
         } else {
-          this.$message({
+          Message({
             message: '度量标准   ' + this.datacForm.name + '   创建失败',
             type: 'error'
           })
@@ -770,7 +772,7 @@ export default {
         method: 'post'
       }).then(({data}) => {
         if (!(data && data.code === 0)) {
-          this.$message.error(data.msg)
+          Message.error(data.msg)
         } else {
           const coalContent = data.info
           for (let sign = 0; sign < coalContent.length; sign++) {
@@ -801,7 +803,7 @@ export default {
       }).then(systemRespond => {
         let systemAll = []
         if (systemRespond.data.length <= 0) {
-          this.$message.error(systemRespond.msg)
+          Message.error(systemRespond.msg)
         } else {
           const systemContent = systemRespond.data
           for (let i = 0; i < systemContent.length; i++) {
@@ -819,19 +821,19 @@ export default {
         return resolve(systemAll)
       })
     },
-    getSubSystem (systemid, resolve) {
-      const systemData = {
-        systemid: systemid
-      }
+    getSubSystem (resolve) {
+      // const systemData = {
+      //   systemid: systemid
+      // }
       this.$http({
         url: this.$http.adornUrl('/dataset/tree/getsubSystem'),
-        method: 'post',
-        data: this.$http.adornData(systemData, false)
+        method: 'post'
+        // data: this.$http.adornData(systemData, false)
       }).then(subrespond => {
         let subSystemAll = []
         let subSystemContent = subrespond.data
         if (subSystemContent.length === 0) {
-          this.$message.error(subrespond.msg)
+          Message.error(subrespond.msg)
         } else {
           for (let j = 0; j < subSystemContent.length; j++) {
             var subSystem = {
@@ -859,7 +861,7 @@ export default {
         let equipmentAll = []
         const eqpSystemContent = eqprespond.data
         if (eqpSystemContent.length === 0) {
-          this.$message.error(eqprespond.msg)
+          Message.error(eqprespond.msg)
         } else {
           for (let k = 0; k < eqpSystemContent.length; k++) {
             var equipment = {
@@ -888,7 +890,7 @@ export default {
         let subEquimentAll = []
         const subEqpSystemContent = subEqpRespond.data
         if (subEqpSystemContent.length === 0) {
-          this.$message.error(subEqpRespond.msg)
+          Message.error(subEqpRespond.msg)
         } else {
           for (let m = 0; m < subEqpSystemContent.length; m++) {
             var subEquiment = {
@@ -905,15 +907,25 @@ export default {
         return resolve(subEquimentAll)
       })
     },
-    // 左侧树的懒加载
+    // 左侧树的懒加载 五层结构
+    // loadTreeNode (node, resolve) {
+    //   if (node.level === 0) {
+    //     this.getCoal(resolve)
+    //   } else if (node.level === 1) {
+    //     this.getSystem(node.data.coalid, resolve)
+    //   } else if (node.level === 2) {
+    //     this.getSubSystem(node.data.systemid, resolve)
+    //   } else if (node.level === 3) {
+    //     this.getEquipment(node.data.subSustemid, resolve)
+    //   } else {
+    //     this.getSubEquipment(node.data.equipmentid, resolve)
+    //   }
+    // }
+    // 左侧树的懒加载 三层结构
     loadTreeNode (node, resolve) {
       if (node.level === 0) {
-        this.getCoal(resolve)
+        this.getSubSystem(resolve)
       } else if (node.level === 1) {
-        this.getSystem(node.data.coalid, resolve)
-      } else if (node.level === 2) {
-        this.getSubSystem(node.data.systemid, resolve)
-      } else if (node.level === 3) {
         this.getEquipment(node.data.subSustemid, resolve)
       } else {
         this.getSubEquipment(node.data.equipmentid, resolve)

+ 1 - 1
src/views/modules/snoop/showRules.vue

@@ -554,7 +554,7 @@ h5 {
 
 .table-style1 {
   margin-left: 10px;
-  margin-top: -10px;
+  /*margin-top: -10px;*/
   word-break: break-word
 }
 

+ 2 - 1
src/views/new-menue.vue

@@ -282,7 +282,8 @@ export default {
 .site-navbar__brand {
     display: table-cell;
     vertical-align: middle;
-    width: 230px;
+    /*width: 230px;*/
+  width: 200px;
     height: 60px;
     margin: 0;
     line-height: 60px;

+ 1 - 1
static/config/index.js

@@ -5,7 +5,7 @@
   window.SITE_CONFIG = {};
 
   // api接口请求地址
-  window.SITE_CONFIG['baseUrl'] = 'http://150.158.138.99:8082/renren-fast';
+  window.SITE_CONFIG['baseUrl'] = 'http://127.0.0.1:8082/renren-fast';
 
   // cdn地址 = 域名 + 版本号
   window.SITE_CONFIG['domain']  = './'; // 域名