瀏覽代碼

1026 界面优化 去除多余的0

allen 2 年之前
父節點
當前提交
e2747d96b6

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

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

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

@@ -16,6 +16,7 @@
         prop="id"
         prop="id"
         header-align="center"
         header-align="center"
         align="center"
         align="center"
+        width="200"
         label="日志ID">
         label="日志ID">
       </el-table-column>
       </el-table-column>
 <!--      <el-table-column-->
 <!--      <el-table-column-->
@@ -94,7 +95,7 @@ export default {
       // console.log('@', value)
       // console.log('@', value)
       var date = new Date(value)
       var date = new Date(value)
       let years = date.getFullYear()
       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 day = (date.getDate() >= 10) ? date.getDate() : '0' + date.getDate()
       let hours = (date.getHours() >= 10) ? date.getHours() : '0' + date.getHours()
       let hours = (date.getHours() >= 10) ? date.getHours() : '0' + date.getHours()
       let minutes = (date.getMinutes() >= 10) ? date.getMinutes() : '0' + date.getMinutes()
       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)
       // console.log('@', value)
       var date = new Date(value)
       var date = new Date(value)
       let years = date.getFullYear()
       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 day = (date.getDate() >= 10) ? date.getDate() : '0' + date.getDate()
       let hours = (date.getHours() >= 10) ? date.getHours() : '0' + date.getHours()
       let hours = (date.getHours() >= 10) ? date.getHours() : '0' + date.getHours()
       let minutes = (date.getMinutes() >= 10) ? date.getMinutes() : '0' + date.getMinutes()
       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>
 <template>
-  <div>
     <el-dialog
     <el-dialog
       :close-on-click-modal="false"
       :close-on-click-modal="false"
       v-if="visible"
       v-if="visible"
       :visible.sync="visible"
       :visible.sync="visible"
       width="75%"
       width="75%"
+
       destroy-on-close>
       destroy-on-close>
       <div  v-loading="dataListLoading" >
       <div  v-loading="dataListLoading" >
 
 
@@ -33,9 +33,7 @@
           </el-col>
           </el-col>
         </el-row>
         </el-row>
       </div>
       </div>
-
     </el-dialog>
     </el-dialog>
-  </div>
 </template>
 </template>
 
 
 <script>
 <script>
@@ -162,7 +160,7 @@ export default {
       }
       }
     },
     },
     charDecisionTree (cloum) {
     charDecisionTree (cloum) {
-      console.log(cloum)
+      // console.log(cloum)
       if (cloum.search('top10') === -1 & cloum.search('top5') === -1) {
       if (cloum.search('top10') === -1 & cloum.search('top5') === -1) {
         this.showCiyun = false
         this.showCiyun = false
         this.$nextTick(() => {
         this.$nextTick(() => {
@@ -188,7 +186,8 @@ export default {
         })
         })
         var option = {
         var option = {
           title: {
           title: {
-            text: this.title + ':' + this.selectValue
+            // text: this.title + ':' + this.selectValue
+            text: this.selectValue
           },
           },
           tooltip: {
           tooltip: {
             trigger: 'axis'
             trigger: 'axis'
@@ -237,7 +236,7 @@ export default {
       if (datas && cloum !== '-1') {
       if (datas && cloum !== '-1') {
         var option = {
         var option = {
           title: {
           title: {
-            text: this.title + ':' + this.selectValue
+            text: this.selectValue
           },
           },
           tooltip: {
           tooltip: {
             show: true,
             show: true,
@@ -249,7 +248,7 @@ export default {
           series: [{
           series: [{
             type: 'wordCloud',
             type: 'wordCloud',
            // 用来调整词之间的距离
            // 用来调整词之间的距离
-            gridSize: 30,
+            gridSize: 25,
            // 用来调整字的大小范围
            // 用来调整字的大小范围
 
 
             sizeRange: [14, 60],
             sizeRange: [14, 60],

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

@@ -7,15 +7,13 @@
       <el-breadcrumb-item>创建度量标准</el-breadcrumb-item>
       <el-breadcrumb-item>创建度量标准</el-breadcrumb-item>
     </el-breadcrumb>
     </el-breadcrumb>
     <el-divider class="divi"></el-divider>
     <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-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-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>
     </el-steps>
-
-
     <div style=" margin: 10px 120px 0px 166px;height: 420px;">
     <div style=" margin: 10px 120px 0px 166px;height: 420px;">
       <el-row :gutter="50">
       <el-row :gutter="50">
         <div v-if="active == 0">
         <div v-if="active == 0">
@@ -144,7 +142,7 @@
                   <el-input v-model="datacForm.name"></el-input>
                   <el-input v-model="datacForm.name"></el-input>
                 </el-form-item>
                 </el-form-item>
                 <el-form-item label="度量描述 :">
                 <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>
                 </el-form-item>
 
 
                 <h5>数据源配置 : </h5>
                 <h5>数据源配置 : </h5>
@@ -231,7 +229,7 @@
         <el-button v-if="buttonFinish" type="primary" @click="submitForm()" >完成</el-button>
         <el-button v-if="buttonFinish" type="primary" @click="submitForm()" >完成</el-button>
       </el-form-item>
       </el-form-item>
     </el-form>
     </el-form>
-
+   </div>
     <show-rules v-if="isShowRulesDrog" ref="ShowRulesDrogref"></show-rules>
     <show-rules v-if="isShowRulesDrog" ref="ShowRulesDrogref"></show-rules>
   </div>
   </div>
 </template>
 </template>
@@ -253,6 +251,7 @@ export default {
   data () {
   data () {
     return {
     return {
       value: [],
       value: [],
+      loading: false,
       showTree: true,
       showTree: true,
       visible: false,
       visible: false,
       chooseEqpment: '',
       chooseEqpment: '',
@@ -262,6 +261,7 @@ export default {
       userID: this.$store.state.user.id, // 用户编号
       userID: this.$store.state.user.id, // 用户编号
       // userName: this.$store.state.user.name, // 用户编号
       // userName: this.$store.state.user.name, // 用户编号
       userName: 'test', // 用户编号
       userName: 'test', // 用户编号
+      submit: false,
       isShowRules: {
       isShowRules: {
         showRules: false
         showRules: false
       },
       },
@@ -555,6 +555,7 @@ export default {
     },
     },
     // 向后台提交数据
     // 向后台提交数据
     async finallySubmit () {
     async finallySubmit () {
+      this.loading = true
       this.newMeasure = {
       this.newMeasure = {
         'name': this.goal_info.config.name,
         'name': this.goal_info.config.name,
         'measure.type': 'griffin',
         'measure.type': 'griffin',
@@ -590,8 +591,8 @@ export default {
         }
         }
       }
       }
       this.getGrouprule()
       this.getGrouprule()
-      console.log(666)
-      console.log(this.newMeasure)
+      // console.log(666)
+      // console.log(this.newMeasure)
       await this.$http({
       await this.$http({
         url: this.$http.adornUrl('/v1/measures'),
         url: this.$http.adornUrl('/v1/measures'),
         method: 'post',
         method: 'post',
@@ -599,16 +600,17 @@ export default {
       }).then((datas) => {
       }).then((datas) => {
         console.log(datas)
         console.log(datas)
         if (datas.status === 201) {
         if (datas.status === 201) {
-          return true
+          this.submit = true
         } else {
         } else {
-          return false
+          this.submit = false
         }
         }
       })
       })
     },
     },
     submitForm () {
     submitForm () {
-      var submit = this.finallySubmit()
+      this.finallySubmit()
       setTimeout(() => {
       setTimeout(() => {
-        if (submit) {
+        this.loading = true
+        if (this.submit) {
           Message({
           Message({
             message: '度量标准   ' + this.datacForm.name + '   创建成功',
             message: '度量标准   ' + this.datacForm.name + '   创建成功',
             type: 'success'
             type: 'success'
@@ -619,8 +621,10 @@ export default {
             type: 'error'
             type: 'error'
           })
           })
         }
         }
+        this.loading = false
         this.$router.replace({path: '/snoop-home', query: {'status': '0'}})
         this.$router.replace({path: '/snoop-home', query: {'status': '0'}})
         this.$destroy()
         this.$destroy()
+
       }, 2 * 1000)
       }, 2 * 1000)
     },
     },
     getGrouprule () {
     getGrouprule () {

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

@@ -97,6 +97,15 @@
         </template>
         </template>
       </el-table-column>
       </el-table-column>
       <el-table-column prop="cronExpression" header-align="center" align="center" label="抽取周期">
       <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>
       <el-table-column prop="createTime" header-align="center" align="center" width="180" label="创建时间">
       <el-table-column prop="createTime" header-align="center" align="center" width="180" label="创建时间">
       </el-table-column>
       </el-table-column>