浏览代码

调价优化

Joe 4 年之前
父节点
当前提交
02ae490910
共有 2 个文件被更改,包括 17 次插入9 次删除
  1. 9 3
      src/views/station/Station_Adjustment/index.vue
  2. 8 6
      src/views/station/Station_Adjustment/record.vue

+ 9 - 3
src/views/station/Station_Adjustment/index.vue

@@ -4,12 +4,12 @@
   <div v-else-if="pageStatus == 2">权限已下放到站点,请登录站点账号配置</div>
   <div v-else-if="pageStatus == 3">加载发生错误</div>
   <div class="tabZujian" v-else-if="pageStatus == 4">
-    <el-tabs v-model="activeName">
+    <el-tabs v-model="activeName"  @tab-click="handleClick">
       <el-tab-pane label="油品管理" name="adjust" key="adjust">
         <adjust />
       </el-tab-pane>
       <el-tab-pane label="调价记录" name="record" key="record">
-        <record />
+        <record  :getListChange="getListChange"/>
       </el-tab-pane>
     </el-tabs>
   </div>
@@ -26,7 +26,8 @@ export default {
   data() {
     return {
       activeName: "adjust",
-      pageStatus: 0
+      pageStatus: 0,
+      getListChange:true
     };
   },
   created() {
@@ -38,6 +39,11 @@ export default {
         this.pageStatus = res;
       });
     },
+    handleClick(tab) {
+      if(tab.name=="record"){
+        this.getListChange = !this.getListChange
+      }
+    }
   },
 };
 </script>

+ 8 - 6
src/views/station/Station_Adjustment/record.vue

@@ -17,13 +17,9 @@
         :formatter="statusFormat"
       />
       -->
-      <el-table-column
-        label="生效状态"
-        align="center"
-        prop="deviceStatus"
-      >
+      <el-table-column label="生效状态" align="center" prop="deviceStatus">
         <template slot-scope="scope">
-          {{scope.row.takeEffectStatus == "1" ? "立即生效":"定时生效"}}
+          {{ scope.row.takeEffectStatus == "1" ? "立即生效" : "定时生效" }}
         </template>
       </el-table-column>
 
@@ -65,6 +61,7 @@ import { stationinfo } from "@/api/station/gun";
 
 export default {
   name: "Adjust",
+  props: ["getListChange"],
   data() {
     return {
       // 总条数
@@ -95,6 +92,11 @@ export default {
       rules: {},
     };
   },
+  watch: {
+    getListChange(newVal, oldVal) {
+      this.getList();
+    },
+  },
   created() {
     this.getList();
     this.getDicts("take_effect_status").then((response) => {