Browse Source

历史合约功能修改

cxmo 1 year ago
parent
commit
93542c85fe

+ 0 - 14
src/views/positionAnalysis_manage/components/indexContent.vue

@@ -4,13 +4,6 @@
             <span style="margin-right:20px">{{num}}品种</span>
             <span>{{time}}</span>
         </div>
-        <div style="margin:30px 0" v-if="$route.path==='/positionAnalysisList'">
-            <el-switch
-                v-model="selfIsHistory"
-                size="large"
-                active-text="历史合约"
-            />
-        </div>
         <div class="list-wrap">
             <div class="item" v-for="item in clist" :key="item.ClassifyName">
                 <div class="label">{{item.ClassifyName}}</div>
@@ -73,15 +66,8 @@ export default {
       return resArr
     }
   },
-  watch:{
-    selfIsHistory(newVal){
-        this.$emit('changeHistory',newVal)
-    }
-  },
   data() {
     return {
-        selfIsHistory:false
-
     }
   },
 

+ 13 - 1
src/views/positionAnalysis_manage/list.vue

@@ -17,10 +17,16 @@
                   :exchange="item.Exchange"
                   :now="item.CurrDate"
                   :isHistory="isHistory"
-                  @changeHistory="(newVal)=>{isHistory = newVal}"
                 />
             </el-tab-pane>
         </el-tabs>
+        <div class="switch-wrap">
+            <el-switch
+                v-model="isHistory"
+                size="large"
+                active-text="历史合约"
+            />
+        </div>
     </div>
 </template>
 
@@ -62,6 +68,7 @@ export default {
 
 <style lang="scss" scoped>
 .position-analysis-index-page{
+    position: relative;
     min-height: 60vh;
     padding: 20px;
     background: #fff;
@@ -76,6 +83,11 @@ export default {
             font-size: 16px;
         }
     }
+    .switch-wrap{
+        position:absolute;
+        right:20px;
+        top:20px;
+    }
 }
 </style>
 <style lang="scss">