Forráskód Böngészése

修改显示样式

caojunjie 3 éve
szülő
commit
4b4df42bdb
1 módosított fájl, 8 hozzáadás és 3 törlés
  1. 8 3
      src/views/index.vue

+ 8 - 3
src/views/index.vue

@@ -97,8 +97,8 @@
           </ul>
           <div style="width: 100%;margin-top: 20px;">
             <div style="float: right;margin-right: 20px">
-              <el-button type="primary" :plain="choicePlain?false:true" size="mini" style="float: left;margin-left: 0;border-top-right-radius: 0;border-bottom-right-radius: 0" @click="choiceClick(0)">今日</el-button>
-              <el-button type="primary" :plain="!choicePlain?false:true" size="mini" style="float: left;margin-left: 0;border-top-left-radius: 0;border-bottom-left-radius: 0" @click="choiceClick(1)">本月</el-button>
+              <el-button type="primary" :plain="choicePlain?choicePlain == null?true:false:true" size="mini" style="float: left;margin-left: 0;border-top-right-radius: 0;border-bottom-right-radius: 0" @click="choiceClick(0)">今日</el-button>
+              <el-button type="primary" :plain="!choicePlain?choicePlain == null?true:false:true" size="mini" style="float: left;margin-left: 0;border-top-left-radius: 0;border-bottom-left-radius: 0" @click="choiceClick(1)">本月</el-button>
               <span style="display: block;float: left;padding-top: 0;margin-left: 5px">
                 <el-date-picker
                   v-model="choiceValue"
@@ -467,12 +467,17 @@ export default {
       if(type === 0){
         this.choicePlain = true
         data = [now.toLocaleDateString().replace(/\//g, '-')+ ' 00:00:00',now.toLocaleDateString().replace(/\//g, '-')+' 23:59:59']
+        this.choiceValue = data
       }else if (type === 1 || type === 3) {
         this.choicePlain = false
         data =[this.timestampToTime(timeStar).slice(0,10)+ ' 00:00:00',this.timestampToTime(timeEnd).slice(0,10)+' 23:59:59']
-        if(type === 3) this.choiceValue = [this.timestampToTime(timeStar).slice(0,10)+ ' 00:00:00',this.timestampToTime(timeEnd).slice(0,10)+' 23:59:59']
+        this.choiceValue = data
+        if(type === 3){
+          this.choiceValue = data
+        }
       }else if(type === 2){
         data = this.choiceValue
+        this.choicePlain = null
       }
       statistics({timeInterval:data,fMblno:this.fMblno}).then(res=>{
         this.statisList = res.data