trading-center-single.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657
  1. <template>
  2. <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
  3. <cwg-header :title="t('Custom.Settings.Title')">
  4. <template #right>
  5. <view class="time-header">
  6. <text>{{ t('Documentary.console.item2') }}:</text>
  7. <text class="time-value" @click="toReload">{{ time }}</text>
  8. <cwg-icon name="crm-refresh" @click="toReload" style="margin-left: 6px; cursor: pointer;" />
  9. </view>
  10. </template>
  11. </cwg-header>
  12. <view class="info-card">
  13. <cwg-asset-tabs :tabs="tabs" v-model="activeTab" />
  14. <!-- Tab 1: 个人指标 -->
  15. <view v-if="activeTab === '1'" class="tab-content">
  16. <!-- 个人名片和品种摘要 -->
  17. <view class="section-row">
  18. <view class="section-col">
  19. <view class="fllow-title">
  20. <view class="title">
  21. <text>{{ t('TradingCenter.item12') }}</text>
  22. </view>
  23. </view>
  24. <view class="fllow-info-list">
  25. <cwg-label-line-value :label="t('TradingCenter.item13')" :value="DailyIndex1.nickname || '--'" />
  26. <cwg-label-line-value :label="t('TradingCenter.item14')" :value="DailyIndex1.personalSignature || '--'" />
  27. <cwg-label-line-value :label="t('TradingCenter.item11')"
  28. :value="getAccountTypeText(DailyIndex.groupType)" />
  29. <cwg-label-line-value :label="t('TradingCenter.item15')" :value="DailyIndex1.addTime || '--'" />
  30. </view>
  31. </view>
  32. <view class="section-col">
  33. <view class="fllow-title">
  34. <view class="title">
  35. <text>{{ t('TradingCenter.item16') }}</text>
  36. </view>
  37. </view>
  38. <view class="chart-container">
  39. <cwg-charts type="pie" :chartData="symbolSummaryData" :opts="pieOpts" />
  40. </view>
  41. </view>
  42. </view>
  43. <!-- 数据指标部分 -->
  44. <view class="section-row">
  45. <!-- 历史表现 -->
  46. <view class="section-col">
  47. <view class="fllow-title">
  48. <view class="title">
  49. <text>{{ t('TradingCenter.item17') }}</text>
  50. </view>
  51. </view>
  52. <view class="fllow-info-grid">
  53. <cwg-label-line-value :label="t('TradingCenter.item18')"
  54. :value="formatCurrency(DailyIndex.pl, DailyIndex.currency, DailyIndex.groupType)" />
  55. <cwg-label-line-value :label="t('TradingCenter.item21')"
  56. :value="formatCurrency(DailyIndex.loss, DailyIndex.currency, DailyIndex.groupType)" />
  57. <cwg-label-line-value :label="t('TradingCenter.item19')" :value="DailyIndex.plRate || '0'" />
  58. <cwg-label-line-value :label="t('TradingCenter.item7')" :value="DailyIndex.maxDdRate || '0'" />
  59. <cwg-label-line-value :label="t('TradingCenter.item20')"
  60. :value="formatCurrency(DailyIndex.profit, DailyIndex.currency, DailyIndex.groupType)" />
  61. </view>
  62. </view>
  63. <!-- 交易规模与效率 -->
  64. <view class="section-col">
  65. <view class="fllow-title">
  66. <view class="title">
  67. <text>{{ t('TradingCenter.item22') }}</text>
  68. </view>
  69. </view>
  70. <view class="fllow-info-grid">
  71. <cwg-label-line-value :label="t('TradingCenter.item23')" :value="DailyIndex.trades || '0'" />
  72. <cwg-label-line-value :label="t('TradingCenter.item29')" :value="DailyIndex.avgHoldVolume || '0'" />
  73. <cwg-label-line-value :label="t('TradingCenter.item24')" :value="DailyIndex.volume || '0'" />
  74. <cwg-label-line-value :label="t('TradingCenter.item39')" :value="DailyIndex.maxHoldVolume || '0'" />
  75. <cwg-label-line-value :label="t('TradingCenter.item25')" :value="DailyIndex.tradesWin || '0'" />
  76. <cwg-label-line-value :label="t('TradingCenter.item30')" :value="DailyIndex.avgDailyTrades || '0'" />
  77. <cwg-label-line-value :label="t('TradingCenter.item26')" :value="DailyIndex.tradesLoss || '0'" />
  78. <cwg-label-line-value :label="t('TradingCenter.item31')" :value="DailyIndex.tradesSl || '0'" />
  79. <cwg-label-line-value :label="t('TradingCenter.item27')" :value="DailyIndex.avgHoldVolume || '0'" />
  80. <cwg-label-line-value :label="t('TradingCenter.item32')" :value="DailyIndex.slRate || '0'" />
  81. <cwg-label-line-value :label="t('TradingCenter.item28')" :value="DailyIndex.avgHoldTime || '--'" />
  82. <cwg-label-line-value :label="t('TradingCenter.item6')" :value="DailyIndex.winRate || '0'" />
  83. </view>
  84. </view>
  85. </view>
  86. <view class="section-row">
  87. <!-- 资金流向 -->
  88. <view class="section-col">
  89. <view class="fllow-title">
  90. <view class="title">
  91. <text>{{ t('TradingCenter.item33') }}</text>
  92. </view>
  93. </view>
  94. <view class="fllow-info-grid">
  95. <cwg-label-line-value :label="t('TradingCenter.item34')"
  96. :value="formatCurrency(DailyIndex.deposit, DailyIndex.currency, DailyIndex.groupType)" />
  97. <cwg-label-line-value :label="t('TradingCenter.item36')"
  98. :value="formatCurrency(DailyIndex.credit, DailyIndex.currency, DailyIndex.groupType)" />
  99. <cwg-label-line-value :label="t('TradingCenter.item35')"
  100. :value="formatCurrency(DailyIndex.withdraw, DailyIndex.currency, DailyIndex.groupType)" />
  101. </view>
  102. </view>
  103. <!-- 订阅与跟单 -->
  104. <view class="section-col">
  105. <view class="fllow-title">
  106. <view class="title">
  107. <text>{{ t('TradingCenter.item40') }}</text>
  108. </view>
  109. </view>
  110. <view class="fllow-info-grid">
  111. <cwg-label-line-value :label="t('TradingCenter.item37')" :value="DailyIndex.follows || '0'" />
  112. <cwg-label-line-value :label="t('TradingCenter.item38')"
  113. :value="formatCurrency(DailyIndex.followsPl, DailyIndex.currency, DailyIndex.groupType)" />
  114. </view>
  115. </view>
  116. </view>
  117. <!-- 排名曲线和净值曲线 -->
  118. <view class="section-row">
  119. <!-- 排名曲线 -->
  120. <view class="section-col">
  121. <view class="fllow-title">
  122. <view class="title">
  123. <text>{{ t('TradingCenter.item41') }}</text>
  124. </view>
  125. </view>
  126. <view class="chart-container">
  127. <cwg-charts type="line" :chartData="rankingChartData" :opts="rankingChartOpts" />
  128. </view>
  129. </view>
  130. <!-- 净值曲线 -->
  131. <view class="section-col">
  132. <view class="fllow-title">
  133. <view class="title">
  134. <text>{{ t('Documentary.tradingCenter.item140') }}</text>
  135. </view>
  136. </view>
  137. <view class="chart-container">
  138. <cwg-charts type="line" :chartData="equityChartData" />
  139. </view>
  140. </view>
  141. </view>
  142. </view>
  143. <!-- Tab 2: 交易订单 -->
  144. <view v-if="activeTab === '2'" class="tab-content">
  145. <cwg-complex-search :fields="tab2FilterFields" v-model="tab2SearchParams" @search="handleTab2Search"
  146. @reset="handleTab2Reset" />
  147. <cwg-tabel ref="table2Ref" :columns="tab2Columns" :immediate="true" :queryParams="tab2QueryParams"
  148. :api="tab2Api" :show-operation="false" :showSummary="true" :summaryMethod="getSummaries1">
  149. <template #openClosePrice="{ row }">
  150. <view class="sp-div-tab">{{ formatNumber(row.openPrice) }}</view>
  151. <view class="sp-div-tab-b">{{ formatNumber(row.closePrice) }}</view>
  152. </template>
  153. <template #openCloseTime="{ row }">
  154. <view class="sp-div-tab">{{ row.openTime || '--' }}</view>
  155. <view class="sp-div-tab-b">{{ row.closeTime || '--' }}</view>
  156. </template>
  157. <template #tpSl="{ row }">
  158. <view class="sp-div-tab">{{ formatNumber(row.tp) }}</view>
  159. <view class="sp-div-tab-b">{{ formatNumber(row.sl) }}</view>
  160. </template>
  161. </cwg-tabel>
  162. </view>
  163. <!-- Tab 3: 订阅总览 -->
  164. <view v-if="activeTab === '3'" class="tab-content">
  165. <view class="summary-top">
  166. <view class="search-operation-l">
  167. <text>{{ t('Documentary.tradingCenter.item123') }}</text>
  168. : {{ tableSumData.profit || '0' }}
  169. </view>
  170. <view class="search-operation-r">
  171. <text>{{ t('Documentary.tradingCenter.item124') }}</text>
  172. : {{ tableSumData.volume || '0' }}
  173. </view>
  174. </view>
  175. <cwg-complex-search :fields="tab3FilterFields" v-model="tab3SearchParams" @search="handleTab3Search"
  176. @reset="handleTab3Reset" />
  177. <cwg-tabel ref="table3Ref" :columns="tab3Columns" :immediate="true" :queryParams="tab3QueryParams"
  178. :api="tab3Api" :show-operation="false" />
  179. </view>
  180. </view>
  181. </cwg-page-wrapper>
  182. </template>
  183. <script setup lang="ts">
  184. import { computed, ref, onMounted, onUnmounted, nextTick, watch } from 'vue'
  185. import { useI18n } from 'vue-i18n'
  186. import { documentaryApi } from '@/service/documentary'
  187. import { onLoad, onShow } from '@dcloudio/uni-app'
  188. const { t } = useI18n()
  189. // --- Params ---
  190. const myLogin = ref('')
  191. const myRanking = ref('')
  192. const myId = ref('')
  193. onLoad((options: any) => {
  194. myLogin.value = options.dealLogin || options.login || ''
  195. myRanking.value = options.ranking || ''
  196. myId.value = options.id || ''
  197. activeTab.value = '1'
  198. getDate()
  199. getPersonalIndicators()
  200. })
  201. // --- Time fetching ---
  202. const time = ref('')
  203. const getLocalTime = () => {
  204. let timezone = 2
  205. let offset_GMT = new Date().getTimezoneOffset()
  206. let nowDate = new Date().getTime()
  207. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
  208. let year = now.getFullYear()
  209. let month = String(now.getMonth() + 1).padStart(2, '0')
  210. let day = String(now.getDate()).padStart(2, '0')
  211. let hh = String(now.getHours()).padStart(2, '0')
  212. let mm = String(now.getMinutes()).padStart(2, '0')
  213. time.value = `${year}/${month}/${day} ${hh}:${mm}`
  214. }
  215. const getDate = async () => {
  216. try {
  217. let res = await documentaryApi.followDealSignalRefreshDate()
  218. if (res.code === 200 && res.data) {
  219. time.value = res.data
  220. } else {
  221. getLocalTime()
  222. }
  223. } catch (error) {
  224. getLocalTime()
  225. }
  226. }
  227. const toReload = () => {
  228. getDate()
  229. if (activeTab.value === '1') {
  230. getPersonalIndicators()
  231. } else if (activeTab.value === '2') {
  232. table2Ref.value?.refreshTable()
  233. } else if (activeTab.value === '3') {
  234. table3Ref.value?.refreshTable()
  235. }
  236. }
  237. onMounted(() => {
  238. })
  239. onUnmounted(() => {
  240. })
  241. // --- Tabs ---
  242. const activeTab = ref('1')
  243. const tabs = computed(() => [
  244. { text: t('Documentary.tradingCenter.item60'), value: '1' },
  245. { text: t('Documentary.tradingCenter.item58'), value: '2' },
  246. { text: t('Documentary.tradingCenter.item59'), value: '3' },
  247. ])
  248. // --- Tab 1 Data ---
  249. const DailyIndex = ref<any>({})
  250. const DailyIndex1 = ref<any>({})
  251. const symbolSummaryData = ref<any>({ series: [] })
  252. const pieOpts = ref({
  253. color: ['#5470C6', '#91CC75', '#EE6666', '#FAC858', '#73C0DE', '#3BA272'],
  254. padding: [5, 5, 5, 5],
  255. legend: {
  256. show: true,
  257. position: 'left',
  258. },
  259. })
  260. const rankingChartData = ref<any>({ categories: [], series: [] })
  261. const rankingChartOpts = ref({
  262. yAxis: {
  263. data: [{
  264. axisLine: false,
  265. inverse: false,
  266. }],
  267. },
  268. })
  269. const equityChartData = ref<any>({ categories: [], series: [] })
  270. const getAccountTypeText = (type: number) => {
  271. const map: Record<number, string> = {
  272. 1: 'AccountType.ClassicAccount',
  273. 2: 'AccountType.SeniorAccount',
  274. 5: 'AccountType.SpeedAccount',
  275. 6: 'AccountType.SpeedAccount',
  276. 7: 'AccountType.StandardAccount',
  277. 8: 'AccountType.CentAccount',
  278. }
  279. return type && map[type] ? t(map[type]) : '--'
  280. }
  281. const formatCurrency = (val: any, currency?: string, groupType?: number) => {
  282. if (!val) return '0'
  283. let symbol = '$'
  284. if (currency === 'GBP') symbol = '£'
  285. else if (currency === 'EUR') symbol = '€'
  286. else if (currency === 'USC' || groupType == 8) symbol = '¢'
  287. return `${symbol}${val}`
  288. }
  289. const getPersonalIndicators = async () => {
  290. if (myId.value) {
  291. let res = await documentaryApi.followDealSignalSearchSingle({ id: myId.value })
  292. if (res.code === 200 && res.data) {
  293. DailyIndex.value = res.data
  294. DailyIndex1.value = res.data
  295. if (res.data.login) {
  296. myLogin.value = res.data.login
  297. }
  298. if (res.data.symbolSummary) {
  299. drawSymbolSummary(res.data.symbolSummary)
  300. }
  301. getChart4()
  302. getChart5()
  303. }
  304. } else {
  305. // Fallback
  306. documentaryApi.followDailyIndex({ login: myLogin.value }).then(res => {
  307. if (res.code === 200) DailyIndex.value = res.data || {}
  308. })
  309. documentaryApi.followDealCard({ login: myLogin.value }).then(res => {
  310. if (res.code === 200) DailyIndex1.value = res.data || {}
  311. })
  312. documentaryApi.followDailyChartSymbol({ login: myLogin.value }).then(res => {
  313. if (res.code === 200 && res.data && res.data[0] && res.data[0].volumes) {
  314. drawSymbolSummary(res.data[0].volumes)
  315. }
  316. })
  317. getChart4()
  318. getChart5()
  319. }
  320. }
  321. const drawSymbolSummary = (data: any[]) => {
  322. let pieData = data.map(item => {
  323. let name = item.symbol || item.name || ''
  324. if (!name && item.symbolType) {
  325. const types = ['', t('Documentary.Report.item11'), t('Documentary.Report.item12'), t('Documentary.Report.item13'), t('Documentary.Report.item14'), t('Documentary.Report.item15'), t('Documentary.Report.item16')]
  326. name = types[item.symbolType] || ''
  327. }
  328. let value = item.volume !== undefined ? item.volume : (item.value !== undefined ? item.value : (item.amount || 0))
  329. return { name, value }
  330. })
  331. symbolSummaryData.value = {
  332. series: [{ data: pieData }],
  333. }
  334. }
  335. const getChart4 = async () => {
  336. let res = await documentaryApi.getEquityChart({ login: myLogin.value })
  337. if (res.code === 200 && res.data) {
  338. let categories = []
  339. let seriesData = []
  340. res.data.forEach((item: any) => {
  341. categories.push(item.date.split(' ')[0])
  342. seriesData.push(item.amount !== null ? item.amount : item.doubleAmount)
  343. })
  344. equityChartData.value = {
  345. categories,
  346. series: [{ name: t('Documentary.tradingCenter.item140'), data: seriesData }],
  347. }
  348. }
  349. }
  350. const getChart5 = async () => {
  351. let res = await documentaryApi.getRankingChart({ login: myLogin.value })
  352. if (res.code === 200 && res.data) {
  353. let categories = []
  354. let seriesData = []
  355. res.data.forEach((item: any) => {
  356. categories.push(item.date.split(' ')[0])
  357. seriesData.push(item.amount !== null ? item.amount : item.doubleAmount)
  358. })
  359. rankingChartData.value = {
  360. categories,
  361. series: [{ name: t('TradingCenter.item41'), data: seriesData }],
  362. }
  363. }
  364. }
  365. // --- Formatters ---
  366. const formatNumber = (value: any) => {
  367. if (value == '***') return '***'
  368. if (isNaN(value)) return '0'
  369. let valStr = String(value)
  370. const parts = valStr.split('.')
  371. parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',')
  372. return parts.join('.')
  373. }
  374. // --- Tab 2 ---
  375. const table2Ref = ref(null)
  376. const combined = ref<any>({})
  377. const tab2SearchParams = ref({
  378. tab4Type: 1,
  379. date: [],
  380. })
  381. const tab2FilterFields = computed(() => [
  382. {
  383. key: 'tab4Type', type: 'select', label: t('Documentary.tradingCenter.item114'), options: [
  384. { value: 1, text: t('Documentary.tradingCenter.item114') },
  385. // { value: 2, text: t('Documentary.tradingCenter.item115') }
  386. ],
  387. },
  388. { key: 'date', type: 'daterange', label: t('placeholder.choose') },
  389. ])
  390. const tab2QueryParams = computed(() => {
  391. return { ...tab2SearchParams.value, login: myLogin.value }
  392. })
  393. const tab2Columns = computed(() => [
  394. { prop: 'order', label: t('Label.OrderNumber'), align: 'center' },
  395. { prop: 'platform', label: t('Label.Platform'), align: 'center' },
  396. { prop: 'cmd', label: t('Label.Type'), align: 'center' },
  397. { prop: 'symbol', label: t('Label.Varieties'), align: 'center' },
  398. {
  399. prop: 'openClosePrice',
  400. label: t('Label.OpenPrice') + '/' + t('Label.ClosePrice'),
  401. align: 'center',
  402. slot: 'openClosePrice',
  403. },
  404. {
  405. prop: 'openCloseTime',
  406. label: t('Label.OpenTime') + '/' + t('Label.CloseTime'),
  407. align: 'center',
  408. slot: 'openCloseTime',
  409. },
  410. { prop: 'tpSl', label: t('Label.EP') + '/' + t('Label.EL'), align: 'center', slot: 'tpSl' },
  411. {
  412. prop: 'volume',
  413. label: t('Documentary.tradingCenter.item99'),
  414. align: 'center',
  415. formatter: ({ row }: any) => formatNumber(row.volume || '0'),
  416. },
  417. {
  418. prop: 'storage',
  419. label: t('Label.StorageFee'),
  420. align: 'center',
  421. formatter: ({ row }: any) => formatNumber(row.storage || '0'),
  422. },
  423. {
  424. prop: 'profit',
  425. label: t('Label.ProfitLoss'),
  426. align: 'center',
  427. formatter: ({ row }: any) => formatNumber(row.profit || '0'),
  428. },
  429. {
  430. prop: 'totalProfit',
  431. label: t('Label.TotalProfitLoss'),
  432. align: 'center',
  433. formatter: ({ row }: any) => formatNumber(row.totalProfit || '0'),
  434. },
  435. ])
  436. const tab2Api = async (params: any) => {
  437. let res = await documentaryApi.followOrderRecordList(params)
  438. if (res.code === 200 || res.code === 0 || res.code === 10000) {
  439. combined.value = res.sum || {}
  440. }
  441. return res
  442. }
  443. const getSummaries1 = ({ columns }: any) => {
  444. let sums = Array(columns.length).fill('')
  445. if (Object.keys(combined.value).length > 0) {
  446. sums[0] = t('Label.Total')
  447. const volIdx = columns.findIndex((c: any) => c.prop === 'volume')
  448. const proIdx = columns.findIndex((c: any) => c.prop === 'profit')
  449. const totIdx = columns.findIndex((c: any) => c.prop === 'totalProfit')
  450. if (volIdx > -1) sums[volIdx] = combined.value.volume ? formatNumber(combined.value.volume) : 0
  451. if (proIdx > -1) sums[proIdx] = combined.value.profit ? formatNumber(combined.value.profit) : 0
  452. if (totIdx > -1) sums[totIdx] = combined.value.totalProfit ? formatNumber(combined.value.totalProfit) : 0
  453. }
  454. return sums
  455. }
  456. const handleTab2Search = (params: any) => {
  457. tab2SearchParams.value = params
  458. nextTick(() => {
  459. table2Ref.value?.refreshTable()
  460. })
  461. }
  462. const handleTab2Reset = (params: any) => {
  463. tab2SearchParams.value = params
  464. nextTick(() => {
  465. table2Ref.value?.refreshTable()
  466. })
  467. }
  468. // --- Tab 3 ---
  469. const table3Ref = ref(null)
  470. const tableSumData = ref<any>({})
  471. const tab3SearchParams = ref({
  472. platform: 'MT4',
  473. date: [],
  474. })
  475. const tab3FilterFields = computed(() => [
  476. {
  477. key: 'platform', type: 'select', label: t('Label.Platform'), options: [
  478. { value: 'MT4', text: 'MT4' },
  479. { value: 'MT5', text: 'MT5' },
  480. ],
  481. },
  482. { key: 'date', type: 'daterange', label: t('placeholder.choose') },
  483. ])
  484. const tab3QueryParams = computed(() => {
  485. return { ...tab3SearchParams.value, login: myLogin.value }
  486. })
  487. const tab3Columns = computed(() => [
  488. { prop: 'followLogin', label: t('Documentary.tradingCenter.item102'), align: 'center' },
  489. { prop: 'platform', label: t('Label.Platform'), align: 'center' },
  490. { prop: 'startTime', label: t('Documentary.tradingCenter.item103'), align: 'center' },
  491. { prop: 'endTime', label: t('Documentary.tradingCenter.item104'), align: 'center' },
  492. {
  493. prop: 'profit',
  494. label: t('Documentary.tradingCenter.item105'),
  495. align: 'center',
  496. formatter: ({ row }: any) => formatNumber(row.profit || '0'),
  497. },
  498. {
  499. prop: 'volume',
  500. label: t('Documentary.tradingCenter.item99'),
  501. align: 'center',
  502. formatter: ({ row }: any) => formatNumber(row.volume || '0'),
  503. },
  504. ])
  505. const tab3Api = async (params: any) => {
  506. let res = await documentaryApi.followDealSubscribeSummary(params)
  507. if (res.code === 200 || res.code === 0 || res.code === 10000) {
  508. tableSumData.value = res.sum || {}
  509. }
  510. return res
  511. }
  512. const handleTab3Search = (params: any) => {
  513. tab3SearchParams.value = params
  514. nextTick(() => {
  515. table3Ref.value?.refreshTable()
  516. })
  517. }
  518. const handleTab3Reset = (params: any) => {
  519. tab3SearchParams.value = params
  520. nextTick(() => {
  521. table3Ref.value?.refreshTable()
  522. })
  523. }
  524. </script>
  525. <style scoped lang="scss">
  526. @import "@/uni.scss";
  527. .time-header {
  528. display: flex;
  529. align-items: center;
  530. font-size: 14px;
  531. font-weight: 500;
  532. color: var(--bs-heading-color);
  533. .time-value {
  534. margin-left: 6px;
  535. color: var(--bs-heading-color);
  536. }
  537. }
  538. .info-card {
  539. padding: 16px;
  540. background: var(--bs-body-bg);
  541. border-radius: 8px;
  542. }
  543. .tab-content {
  544. margin-top: 16px;
  545. }
  546. .section-row {
  547. display: flex;
  548. flex-wrap: wrap;
  549. gap: 20px;
  550. margin-bottom: 20px;
  551. }
  552. .section-col {
  553. flex: 1;
  554. min-width: 300px;
  555. border: 1px solid #f0f0f0;
  556. border-radius: 8px;
  557. padding: 16px;
  558. box-sizing: border-box;
  559. }
  560. .fllow-title {
  561. display: flex;
  562. justify-content: space-between;
  563. border-bottom: 1px solid #eee;
  564. padding-bottom: 10px;
  565. margin-bottom: 10px;
  566. .title {
  567. font-weight: bold;
  568. color: var(--bs-heading-color);
  569. padding-left: 8px;
  570. border-left: 4px solid #eb3f57;
  571. font-size: 16px;
  572. }
  573. }
  574. .fllow-info-list {
  575. display: flex;
  576. flex-direction: column;
  577. gap: 8px;
  578. }
  579. .fllow-info-grid {
  580. display: grid;
  581. grid-template-columns: 1fr 1fr;
  582. gap: 8px 20px;
  583. }
  584. .chart-container {
  585. width: 100%;
  586. height: 250px;
  587. }
  588. .sp-div-tab {
  589. border-bottom: 1px dashed #eee;
  590. padding-bottom: 4px;
  591. margin-bottom: 4px;
  592. }
  593. .sp-div-tab-b {
  594. padding-top: 4px;
  595. }
  596. .summary-top {
  597. display: flex;
  598. gap: 20px;
  599. margin-bottom: 16px;
  600. font-size: 14px;
  601. font-weight: bold;
  602. color: var(--bs-heading-color);
  603. }
  604. </style>