Parcourir la source

更新 tabs参数

wangzhihui il y a 4 ans
Parent
commit
74dc337cf1
1 fichiers modifiés avec 19 ajouts et 11 suppressions
  1. 19 11
      src/views/voyage/voyageList.vue

+ 19 - 11
src/views/voyage/voyageList.vue

@@ -3,40 +3,48 @@
     <div style="display: flex; justify-content: space-between">
     <div style="display: flex; justify-content: space-between">
       <div class="df aic">
       <div class="df aic">
         <div
         <div
-          @click="changeVoyageType(1)"
+          @click="changeVoyageType(0)"
           :class="
           :class="
-            currentbtn == 1
+            status == 0
               ? 'currentbtn radio-btns left-radius'
               ? 'currentbtn radio-btns left-radius'
               : 'radio-btns left-radius'
               : 'radio-btns left-radius'
           "
           "
+        >
+          全部航次
+        </div>
+        <div
+          style="border-left: none"
+          @click="changeVoyageType(1)"
+          :class="status == 1 ? 'currentbtn radio-btns' : 'radio-btns'"
         >
         >
           装货中
           装货中
         </div>
         </div>
+
         <div
         <div
           style="border-left: none"
           style="border-left: none"
           @click="changeVoyageType(2)"
           @click="changeVoyageType(2)"
-          :class="currentbtn == 2 ? 'currentbtn radio-btns' : 'radio-btns'"
+          :class="status == 2 ? 'currentbtn radio-btns' : 'radio-btns'"
         >
         >
           运输中
           运输中
         </div>
         </div>
         <div
         <div
           style="border-left: none"
           style="border-left: none"
           @click="changeVoyageType(3)"
           @click="changeVoyageType(3)"
-          :class="currentbtn == 3 ? 'currentbtn radio-btns' : 'radio-btns'"
+          :class="status == 3 ? 'currentbtn radio-btns' : 'radio-btns'"
         >
         >
           卸货中
           卸货中
         </div>
         </div>
         <div
         <div
           style="border-left: none"
           style="border-left: none"
           @click="changeVoyageType(4)"
           @click="changeVoyageType(4)"
-          :class="currentbtn == 4 ? 'currentbtn radio-btns' : 'radio-btns'"
+          :class="status == 4 ? 'currentbtn radio-btns' : 'radio-btns'"
         >
         >
           未签单
           未签单
         </div>
         </div>
         <div
         <div
           @click="changeVoyageType(5)"
           @click="changeVoyageType(5)"
           :class="
           :class="
-            currentbtn == 5
+            status == 5
               ? 'currentbtn radio-btns right-radius'
               ? 'currentbtn radio-btns right-radius'
               : 'radio-btns right-radius '
               : 'radio-btns right-radius '
           "
           "
@@ -227,12 +235,11 @@ import _ from "lodash";
 
 
 export default {
 export default {
   setup() {
   setup() {
-    let currentbtn = ref(true);
     let currentPage = ref(1);
     let currentPage = ref(1);
     let term = ref();
     let term = ref();
     let tableData = ref();
     let tableData = ref();
     let total = ref();
     let total = ref();
-    let status = ref(1);
+    let status = ref(0);
     async function getVoyageList() {
     async function getVoyageList() {
       tableData.value = [];
       tableData.value = [];
 
 
@@ -257,7 +264,6 @@ export default {
     function changeVoyageType(s) {
     function changeVoyageType(s) {
       term.value = "";
       term.value = "";
       currentPage.value = 1;
       currentPage.value = 1;
-      currentbtn.value = s;
       status.value = s;
       status.value = s;
       getVoyageList();
       getVoyageList();
     }
     }
@@ -418,7 +424,7 @@ export default {
       term,
       term,
       tableData,
       tableData,
       total,
       total,
-      currentbtn,
+      status,
       changeVoyageType,
       changeVoyageType,
       getVoyageList,
       getVoyageList,
       voyageDetail,
       voyageDetail,
@@ -509,7 +515,7 @@ export default {
 
 
 .radio-btns {
 .radio-btns {
   height: 38px;
   height: 38px;
-  width: 103px;
+  width: 70px;
   border: 1px solid #1486f9;
   border: 1px solid #1486f9;
   line-height: 38px;
   line-height: 38px;
   text-align: center;
   text-align: center;
@@ -523,11 +529,13 @@ export default {
 .left-radius {
 .left-radius {
   border-top-left-radius: 19px;
   border-top-left-radius: 19px;
   border-bottom-left-radius: 19px;
   border-bottom-left-radius: 19px;
+  width: 80px;
 }
 }
 
 
 .right-radius {
 .right-radius {
   border-top-right-radius: 19px;
   border-top-right-radius: 19px;
   border-bottom-right-radius: 19px;
   border-bottom-right-radius: 19px;
+  width: 80px;
 }
 }
 .currentbtn {
 .currentbtn {
   background: #1486f9;
   background: #1486f9;