|
@@ -39,6 +39,7 @@ import { IDataProps, ILunarItem, IParams, ISeasonDataItemProps } from '@/types';
|
|
|
import Highcharts from 'highcharts';
|
|
|
import { defaultOpts, seasonOptions } from '@/utils/chartOptions';
|
|
|
import moment from 'moment';
|
|
|
+import { getTerminal } from '@/utils/utils';
|
|
|
|
|
|
export default defineComponent({
|
|
|
components: {
|
|
@@ -51,6 +52,9 @@ export default defineComponent({
|
|
|
|
|
|
const haveData = ref(true);
|
|
|
|
|
|
+
|
|
|
+ const needReload = ref(true);
|
|
|
+
|
|
|
const code = ref(route.query.code);
|
|
|
const isShare = ref(route.query.fromType === 'share');
|
|
|
|
|
@@ -105,9 +109,11 @@ export default defineComponent({
|
|
|
dealSourceHandle();
|
|
|
setOptions();
|
|
|
type === 'refresh' && ElMessage.success('刷新成功');
|
|
|
+ if(type === 'reload') needReload.value = false;
|
|
|
}catch (e) {
|
|
|
loading.value = false;
|
|
|
haveData.value = false;
|
|
|
+ needReload.value = false;
|
|
|
}
|
|
|
|
|
|
};
|
|
@@ -258,7 +264,15 @@ export default defineComponent({
|
|
|
let seasonYdata = [],
|
|
|
seasonData = [],
|
|
|
chart = {
|
|
|
- spacing: [5, 8, 2, 8]
|
|
|
+ spacing: [5, 8, 2, 8],
|
|
|
+ events: {
|
|
|
+ render: function(ctx: any) {
|
|
|
+ console.log(ctx)
|
|
|
+ if( needReload.value && getTerminal() === 'ios') {
|
|
|
+ getChartInfo('reload');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
/* 公历数据处理 处理数据列 y轴 */
|