Browse Source

1026 界面优化 去除多余的0

allen 2 years ago
parent
commit
e2747d96b6

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

@@ -202,7 +202,7 @@ export default {
     timeFormater (value) {
       var date = new Date(value)
       let years = date.getFullYear()
-      let month = (date.getMonth() + 1) > 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1)
+      let month = (date.getMonth() + 1) >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1)
       let day = (date.getDate() >= 10) ? date.getDate() : '0' + date.getDate()
       let hours = (date.getHours() >= 10) ? date.getHours() : '0' + date.getHours()
       let minutes = (date.getMinutes() >= 10) ? date.getMinutes() : '0' + date.getMinutes()

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

@@ -16,6 +16,7 @@
         prop="id"
         header-align="center"
         align="center"
+        width="200"
         label="日志ID">
       </el-table-column>
 <!--      <el-table-column-->
@@ -94,7 +95,7 @@ export default {
       // console.log('@', value)
       var date = new Date(value)
       let years = date.getFullYear()
-      let month = (date.getMonth() + 1) > 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1)
+      let month = (date.getMonth() + 1) >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1)
       let day = (date.getDate() >= 10) ? date.getDate() : '0' + date.getDate()
       let hours = (date.getHours() >= 10) ? date.getHours() : '0' + date.getHours()
       let minutes = (date.getMinutes() >= 10) ? date.getMinutes() : '0' + date.getMinutes()

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

@@ -64,7 +64,7 @@ export default {
       // console.log('@', value)
       var date = new Date(value)
       let years = date.getFullYear()
-      let month = (date.getMonth() + 1) > 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1)
+      let month = (date.getMonth() + 1) >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1)
       let day = (date.getDate() >= 10) ? date.getDate() : '0' + date.getDate()
       let hours = (date.getHours() >= 10) ? date.getHours() : '0' + date.getHours()
       let minutes = (date.getMinutes() >= 10) ? date.getMinutes() : '0' + date.getMinutes()

+ 6 - 7
src/views/modules/snoop/jobResult_visi_echars.vue

@@ -1,10 +1,10 @@
 <template>
-  <div>
     <el-dialog
       :close-on-click-modal="false"
       v-if="visible"
       :visible.sync="visible"
       width="75%"
+
       destroy-on-close>
       <div  v-loading="dataListLoading" >
 
@@ -33,9 +33,7 @@
           </el-col>
         </el-row>
       </div>
-
     </el-dialog>
-  </div>
 </template>
 
 <script>
@@ -162,7 +160,7 @@ export default {
       }
     },
     charDecisionTree (cloum) {
-      console.log(cloum)
+      // console.log(cloum)
       if (cloum.search('top10') === -1 & cloum.search('top5') === -1) {
         this.showCiyun = false
         this.$nextTick(() => {
@@ -188,7 +186,8 @@ export default {
         })
         var option = {
           title: {
-            text: this.title + ':' + this.selectValue
+            // text: this.title + ':' + this.selectValue
+            text: this.selectValue
           },
           tooltip: {
             trigger: 'axis'
@@ -237,7 +236,7 @@ export default {
       if (datas && cloum !== '-1') {
         var option = {
           title: {
-            text: this.title + ':' + this.selectValue
+            text: this.selectValue
           },
           tooltip: {
             show: true,
@@ -249,7 +248,7 @@ export default {
           series: [{
             type: 'wordCloud',
            // 用来调整词之间的距离
-            gridSize: 30,
+            gridSize: 25,
            // 用来调整字的大小范围
 
             sizeRange: [14, 60],

+ 15 - 11
src/views/modules/snoop/measure.vue

@@ -7,15 +7,13 @@
       <el-breadcrumb-item>创建度量标准</el-breadcrumb-item>
     </el-breadcrumb>
     <el-divider class="divi"></el-divider>
-
+   <div v-loading="loading">
     <el-steps :active="active" align-center finish-status="success" style="margin: 50px 20px 0px 10px;">
       <el-step title="选择目标" description="选择需要度量的目标数据集字段"></el-step>
       <el-step title="定义/选择模型" description="定义将应用于所选字段的语法检查逻辑"></el-step>
       <el-step title="分区配置" description="设置目标数据集的分区配置"></el-step>
       <el-step title="完成" description="设置模型的基本配置"></el-step>
     </el-steps>
-
-
     <div style=" margin: 10px 120px 0px 166px;height: 420px;">
       <el-row :gutter="50">
         <div v-if="active == 0">
@@ -144,7 +142,7 @@
                   <el-input v-model="datacForm.name"></el-input>
                 </el-form-item>
                 <el-form-item label="度量描述 :">
-                  <el-input v-model="datacForm.description"></el-input>
+                  <el-input v-model="datacForm.description" onkeyup="this.value=this.value.replace(/[\u4E00-\u9FA5]/g,'')"></el-input>
                 </el-form-item>
 
                 <h5>数据源配置 : </h5>
@@ -231,7 +229,7 @@
         <el-button v-if="buttonFinish" type="primary" @click="submitForm()" >完成</el-button>
       </el-form-item>
     </el-form>
-
+   </div>
     <show-rules v-if="isShowRulesDrog" ref="ShowRulesDrogref"></show-rules>
   </div>
 </template>
@@ -253,6 +251,7 @@ export default {
   data () {
     return {
       value: [],
+      loading: false,
       showTree: true,
       visible: false,
       chooseEqpment: '',
@@ -262,6 +261,7 @@ export default {
       userID: this.$store.state.user.id, // 用户编号
       // userName: this.$store.state.user.name, // 用户编号
       userName: 'test', // 用户编号
+      submit: false,
       isShowRules: {
         showRules: false
       },
@@ -555,6 +555,7 @@ export default {
     },
     // 向后台提交数据
     async finallySubmit () {
+      this.loading = true
       this.newMeasure = {
         'name': this.goal_info.config.name,
         'measure.type': 'griffin',
@@ -590,8 +591,8 @@ export default {
         }
       }
       this.getGrouprule()
-      console.log(666)
-      console.log(this.newMeasure)
+      // console.log(666)
+      // console.log(this.newMeasure)
       await this.$http({
         url: this.$http.adornUrl('/v1/measures'),
         method: 'post',
@@ -599,16 +600,17 @@ export default {
       }).then((datas) => {
         console.log(datas)
         if (datas.status === 201) {
-          return true
+          this.submit = true
         } else {
-          return false
+          this.submit = false
         }
       })
     },
     submitForm () {
-      var submit = this.finallySubmit()
+      this.finallySubmit()
       setTimeout(() => {
-        if (submit) {
+        this.loading = true
+        if (this.submit) {
           Message({
             message: '度量标准   ' + this.datacForm.name + '   创建成功',
             type: 'success'
@@ -619,8 +621,10 @@ export default {
             type: 'error'
           })
         }
+        this.loading = false
         this.$router.replace({path: '/snoop-home', query: {'status': '0'}})
         this.$destroy()
+
       }, 2 * 1000)
     },
     getGrouprule () {

+ 9 - 0
src/views/modules/visi/dataset.vue

@@ -97,6 +97,15 @@
         </template>
       </el-table-column>
       <el-table-column prop="cronExpression" header-align="center" align="center" label="抽取周期">
+        <template slot-scope="scope">
+          <el-popover
+            placement="top-start"
+            width="200"
+            trigger="hover"
+            :content=scope.row.cronExpressionCh>
+            <div class="color: rgb(0 0 0 / 65%);" slot="reference">{{scope.row.cronExpression}}</div>
+          </el-popover>
+        </template>
       </el-table-column>
       <el-table-column prop="createTime" header-align="center" align="center" width="180" label="创建时间">
       </el-table-column>