{"ast":null,"code":"import \"core-js/modules/es.array.push.js\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport PerpetualEntrustList from \"../perpetual-entrust-list/index.vue\";\nimport PerpetualPositionList from \"../perpetual-position-list/index.vue\";\nimport futrueHoldList from \"@/page/deliveryContract/hold.vue\";\nimport futrueHistroyPosition from \"@/page/deliveryContract/position.vue\";\nexport default {\n name: \"perpetualOrder\",\n data() {\n return {\n type: \"1\" // 1:永续持有,2:永续当前,3:交割持有,4:交割历史\n };\n },\n props: {\n topIndex: {\n type: [Number, String],\n default: 1\n },\n symbol: {\n type: String,\n default: \"\"\n },\n orderCur: {\n //\n type: Array,\n default() {\n return [];\n }\n },\n orderHold: {\n type: Array,\n default() {\n return [];\n }\n },\n futrueHold: {\n type: Array,\n default() {\n return [];\n }\n },\n futrueHistroy: {\n type: Array,\n default() {\n return [];\n }\n },\n price: {\n type: [Number, String],\n default: \"0.00\"\n }\n },\n watch: {\n topIndex(val) {\n if (val / 1 === 1) {\n this.type = \"1\";\n this.tabClick(\"1\");\n } else {\n this.type = \"3\";\n this.tabClick(\"3\");\n }\n }\n },\n mounted() {\n if (this.topIndex == 1) {\n this.type = \"1\";\n this.tabClick(\"1\");\n } else {\n this.type = \"3\";\n this.tabClick(\"3\");\n }\n },\n activated() {\n if (this.topIndex == 1) {\n this.type = \"1\";\n this.tabClick(\"1\");\n } else {\n this.type = \"3\";\n this.tabClick(\"3\");\n }\n },\n methods: {\n tabClick(type) {\n this.type = type;\n if (type == \"1\") {\n // && !this.orderCur.length\n //this.$emit('tab', 'fetchOrderListCur')\n this.$emit(\"tab\", \"fetchOrderListHold\");\n }\n if (type === \"2\") {\n // && !this.orderHold.length\n //this.$emit('tab', 'fetchOrderListHold')\n this.$emit(\"tab\", \"fetchOrderListCur\");\n }\n if (type === \"3\") {\n this.$emit(\"tab\", \"fetchFutrueHoldList\");\n }\n if (type === \"4\") {\n this.$emit(\"tab\", \"fetchFutrueHistory\");\n }\n // this.$emit(type)\n },\n goHistory() {\n const url = this.topIndex / 1 === 1 ? \"perpetualHistory\" : \"deliveryContractHistory\";\n this.$router.push({\n path: `/${url}?symbol=${this.symbol}`\n });\n }\n },\n components: {\n PerpetualEntrustList,\n PerpetualPositionList,\n futrueHistroyPosition,\n futrueHoldList\n }\n};","map":{"version":3,"names":["PerpetualEntrustList","PerpetualPositionList","futrueHoldList","futrueHistroyPosition","name","data","type","props","topIndex","Number","String","default","symbol","orderCur","Array","orderHold","futrueHold","futrueHistroy","price","watch","val","tabClick","mounted","activated","methods","$emit","goHistory","url","$router","push","path","components"],"sources":["src/components/perpetual-order/index.vue"],"sourcesContent":["<template>\n <!-- 永续合约订单列表页 -->\n <div>\n <div class=\"items-center mt-18 box-show\">\n <div class=\"flex justify-between border-b-color\">\n <div class=\"flex pb-10\">\n <template v-if=\"topIndex / 1 === 1\">\n <!-- <div class=\"w-280 flex flex-col items-center textColor1\" @click=\"tabClick('1')\" :class=\"type=='1'?'active-line':''\">{{ $t('当前委托') }}</div>\n <div class=\"w-280 flex flex-col items-center ml-30 textColor1\" @click=\"tabClick('2')\" :class=\"type=='2'?'active-line':''\">{{ $t('持有仓位') }}</div> -->\n <div\n class=\"px-10 py-10 flex items-center\"\n @click=\"tabClick('1')\"\n :class=\"type == '1' ? 'active-line' : 'newcolor1'\"\n >\n {{ $t(\"持有仓位\")\n }}<span v-if=\"type == '1'\">({{ orderHold.length }})</span>\n </div>\n <div\n class=\"px-10 ml-50 py-10 flex items-center\"\n @click=\"tabClick('2')\"\n :class=\"type == '2' ? 'active-line' : 'newcolor1'\"\n >\n {{ $t(\"当前委托\") }}\n </div>\n </template>\n <template v-else>\n <div\n class=\"px-10 py-10 flex items-center text-grey\"\n @click=\"tabClick('3')\"\n :class=\"type == '3' ? 'active-line' : ''\"\n >\n {{ $t(\"持有仓位\")\n }}<span v-if=\"type == '2'\">({{ orderCur.length }})111</span>\n </div>\n <div\n class=\"px-10 ml-50 py-10 flex items-center text-grey\"\n @click=\"tabClick('4')\"\n :class=\"type == '4' ? 'active-line' : ''\"\n >\n {{ $t(\"历史仓位\") }}\n </div>\n </template>\n </div>\n <img\n src=\"../../assets/image/public/record.png\"\n alt=\"record-img\"\n class=\"w-32 h-35 pr-30 py-15\"\n @click=\"goHistory\"\n />\n </div>\n <!-- 永续-->\n <template v-if=\"topIndex / 1 === 1\">\n <!-- 委托列表 -->\n <div v-if=\"type == '1'\">\n <!-- <PerpetualEntrustList :list-data=\"orderCur\" @recall=\"$emit('recall', $event)\"></PerpetualEntrustList> -->\n <PerpetualPositionList\n :list-data=\"orderHold\"\n @sell=\"$emit('recall', $event)\"\n ></PerpetualPositionList>\n </div>\n <!-- 持有仓位列表 -->\n <div v-if=\"type == '2'\">\n <!-- <PerpetualPositionList :list-data=\"orderHold\" @sell=\"$emit('recall', $event)\"></PerpetualPositionList> -->\n <PerpetualEntrustList\n :list-data=\"orderCur\"\n @recall=\"$emit('recall', $event)\"\n ></PerpetualEntrustList>\n </div>\n </template>\n <!-- 交割-->\n <template v-else>\n <div v-if=\"type == '3'\">\n <futrue-hold-list :price=\"price\" :list-data=\"futrueHold\" />\n </div>\n <div v-if=\"type == '4'\">\n <futrue-histroy-position :list-data=\"futrueHistroy\" />\n </div>\n </template>\n </div>\n </div>\n</template>\n\n<script>\nimport PerpetualEntrustList from \"../perpetual-entrust-list/index.vue\";\nimport PerpetualPositionList from \"../perpetual-position-list/index.vue\";\nimport futrueHoldList from \"@/page/deliveryContract/hold.vue\";\nimport futrueHistroyPosition from \"@/page/deliveryContract/position.vue\";\n\nexport default {\n name: \"perpetualOrder\",\n data() {\n return {\n type: \"1\", // 1:永续持有,2:永续当前,3:交割持有,4:交割历史\n };\n },\n props: {\n topIndex: {\n type: [Number, String],\n default: 1,\n },\n symbol: {\n type: String,\n default: \"\",\n },\n orderCur: {\n //\n type: Array,\n default() {\n return [];\n },\n },\n orderHold: {\n type: Array,\n default() {\n return [];\n },\n },\n futrueHold: {\n type: Array,\n default() {\n return [];\n },\n },\n futrueHistroy: {\n type: Array,\n default() {\n return [];\n },\n },\n price: {\n type: [Number, String],\n default: \"0.00\",\n },\n },\n watch: {\n topIndex(val) {\n if (val / 1 === 1) {\n this.type = \"1\";\n this.tabClick(\"1\");\n } else {\n this.type = \"3\";\n this.tabClick(\"3\");\n }\n },\n },\n mounted() {\n if (this.topIndex == 1) {\n this.type = \"1\";\n this.tabClick(\"1\");\n } else {\n this.type = \"3\";\n this.tabClick(\"3\");\n }\n },\n activated() {\n if (this.topIndex == 1) {\n this.type = \"1\";\n this.tabClick(\"1\");\n } else {\n this.type = \"3\";\n this.tabClick(\"3\");\n }\n },\n methods: {\n tabClick(type) {\n this.type = type;\n if (type == \"1\") {\n // && !this.orderCur.length\n //this.$emit('tab', 'fetchOrderListCur')\n this.$emit(\"tab\", \"fetchOrderListHold\");\n }\n if (type === \"2\") {\n // && !this.orderHold.length\n //this.$emit('tab', 'fetchOrderListHold')\n this.$emit(\"tab\", \"fetchOrderListCur\");\n }\n if (type === \"3\") {\n this.$emit(\"tab\", \"fetchFutrueHoldList\");\n }\n if (type === \"4\") {\n this.$emit(\"tab\", \"fetchFutrueHistory\");\n }\n // this.$emit(type)\n },\n goHistory() {\n const url =\n this.topIndex / 1 === 1\n ? \"perpetualHistory\"\n : \"deliveryContractHistory\";\n this.$router.push({\n path: `/${url}?symbol=${this.symbol}`,\n });\n },\n },\n components: {\n PerpetualEntrustList,\n PerpetualPositionList,\n futrueHistroyPosition,\n futrueHoldList,\n },\n};\n</script>\n\n<style lang=\"scss\" scoped>\n.all-cancel-btn {\n background-color: #eaebef;\n}\n\n.cancel-btn {\n background-color: #eaebef;\n}\n\n.active-line {\n position: relative;\n // padding: 15px 0;\n color: #fff;\n\n @include themify() {\n background-color: themed(\"color_main\");\n }\n}\n\n// .active-line::after{\n// content: '';\n// position: absolute;\n// left: 0px;\n// bottom: 0;\n// right: 0;\n// width: 280px;\n// height: 4px;\n// @include themify() {\n// background-color: themed(\"color_main\");\n// }\n// }\n.textColor1 {\n color: #fff;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmFA,OAAAA,oBAAA;AACA,OAAAC,qBAAA;AACA,OAAAC,cAAA;AACA,OAAAC,qBAAA;AAEA;EACAC,IAAA;EACAC,KAAA;IACA;MACAC,IAAA;IACA;EACA;EACAC,KAAA;IACAC,QAAA;MACAF,IAAA,GAAAG,MAAA,EAAAC,MAAA;MACAC,OAAA;IACA;IACAC,MAAA;MACAN,IAAA,EAAAI,MAAA;MACAC,OAAA;IACA;IACAE,QAAA;MACA;MACAP,IAAA,EAAAQ,KAAA;MACAH,QAAA;QACA;MACA;IACA;IACAI,SAAA;MACAT,IAAA,EAAAQ,KAAA;MACAH,QAAA;QACA;MACA;IACA;IACAK,UAAA;MACAV,IAAA,EAAAQ,KAAA;MACAH,QAAA;QACA;MACA;IACA;IACAM,aAAA;MACAX,IAAA,EAAAQ,KAAA;MACAH,QAAA;QACA;MACA;IACA;IACAO,KAAA;MACAZ,IAAA,GAAAG,MAAA,EAAAC,MAAA;MACAC,OAAA;IACA;EACA;EACAQ,KAAA;IACAX,SAAAY,GAAA;MACA,IAAAA,GAAA;QACA,KAAAd,IAAA;QACA,KAAAe,QAAA;MACA;QACA,KAAAf,IAAA;QACA,KAAAe,QAAA;MACA;IACA;EACA;EACAC,QAAA;IACA,SAAAd,QAAA;MACA,KAAAF,IAAA;MACA,KAAAe,QAAA;IACA;MACA,KAAAf,IAAA;MACA,KAAAe,QAAA;IACA;EACA;EACAE,UAAA;IACA,SAAAf,QAAA;MACA,KAAAF,IAAA;MACA,KAAAe,QAAA;IACA;MACA,KAAAf,IAAA;MACA,KAAAe,QAAA;IACA;EACA;EACAG,OAAA;IACAH,SAAAf,IAAA;MACA,KAAAA,IAAA,GAAAA,IAAA;MACA,IAAAA,IAAA;QACA;QACA;QACA,KAAAmB,KAAA;MACA;MACA,IAAAnB,IAAA;QACA;QACA;QACA,KAAAmB,KAAA;MACA;MACA,IAAAnB,IAAA;QACA,KAAAmB,KAAA;MACA;MACA,IAAAnB,IAAA;QACA,KAAAmB,KAAA;MACA;MACA;IACA;IACAC,UAAA;MACA,MAAAC,GAAA,GACA,KAAAnB,QAAA,aACA,qBACA;MACA,KAAAoB,OAAA,CAAAC,IAAA;QACAC,IAAA,MAAAH,GAAA,gBAAAf,MAAA;MACA;IACA;EACA;EACAmB,UAAA;IACA/B,oBAAA;IACAC,qBAAA;IACAE,qBAAA;IACAD;EACA;AACA","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|