|  | @@ -14,6 +14,8 @@ import * as echarts from 'echarts';
 | 
	
		
			
				|  |  |  import { IStudentAttendance } from '../type';
 | 
	
		
			
				|  |  |  import { useRouter } from 'vue-router';
 | 
	
		
			
				|  |  |  import icon_4 from '../image/icon_4.png';
 | 
	
		
			
				|  |  | +import { browser } from '@/helpers/utils';
 | 
	
		
			
				|  |  | +import { postMessage } from '@/helpers/native-message';
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  type EChartsOption = echarts.EChartsOption;
 | 
	
		
			
				|  |  |  const colors = [
 | 
	
	
		
			
				|  | @@ -69,7 +71,7 @@ export default defineComponent({
 | 
	
		
			
				|  |  |    emits: ['change'],
 | 
	
		
			
				|  |  |    setup(props, { emit }) {
 | 
	
		
			
				|  |  |      const firstInit = ref(false);
 | 
	
		
			
				|  |  | -    const echratsRef = ref()
 | 
	
		
			
				|  |  | +    const echratsRef = ref();
 | 
	
		
			
				|  |  |      const router = useRouter();
 | 
	
		
			
				|  |  |      const { data } = toRefs(props);
 | 
	
		
			
				|  |  |      watch(
 | 
	
	
		
			
				|  | @@ -83,7 +85,7 @@ export default defineComponent({
 | 
	
		
			
				|  |  |      );
 | 
	
		
			
				|  |  |      let myChart: echarts.ECharts;
 | 
	
		
			
				|  |  |      const handleInit = () => {
 | 
	
		
			
				|  |  | -      if (!data.value.attendanceRate) return
 | 
	
		
			
				|  |  | +      if (!data.value.attendanceRate) return;
 | 
	
		
			
				|  |  |        if (myChart) {
 | 
	
		
			
				|  |  |          myChart.dispose();
 | 
	
		
			
				|  |  |        }
 | 
	
	
		
			
				|  | @@ -142,6 +144,24 @@ export default defineComponent({
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        option && myChart.setOption(option);
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    const gotoStudnetManage = () => {
 | 
	
		
			
				|  |  | +      if (browser().isApp) {
 | 
	
		
			
				|  |  | +        const url = `${location.origin}${location.pathname}student-manage`;
 | 
	
		
			
				|  |  | +        postMessage({
 | 
	
		
			
				|  |  | +          api: 'openWebView',
 | 
	
		
			
				|  |  | +          content: {
 | 
	
		
			
				|  |  | +            url,
 | 
	
		
			
				|  |  | +            orientation: 1,
 | 
	
		
			
				|  |  | +            isHideTitle: false
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +      } else {
 | 
	
		
			
				|  |  | +        router.push({
 | 
	
		
			
				|  |  | +          path: '/student-manage'
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  |      return () => (
 | 
	
		
			
				|  |  |        <div class={styles.item}>
 | 
	
		
			
				|  |  |          <div class={styles.top}>
 | 
	
	
		
			
				|  | @@ -152,22 +172,15 @@ export default defineComponent({
 | 
	
		
			
				|  |  |          <div class={styles.tabsContainer}>
 | 
	
		
			
				|  |  |            <Tabs
 | 
	
		
			
				|  |  |              shrink
 | 
	
		
			
				|  |  | -            active={"本周"}
 | 
	
		
			
				|  |  | +            active={'week'}
 | 
	
		
			
				|  |  |              onChange={value => {
 | 
	
		
			
				|  |  | -              console.log(value, 123);
 | 
	
		
			
				|  |  |                emit('change', value);
 | 
	
		
			
				|  |  |              }}>
 | 
	
		
			
				|  |  |              <Tab name="week" title="本周"></Tab>
 | 
	
		
			
				|  |  |              <Tab name="month" title="本月"></Tab>
 | 
	
		
			
				|  |  |              <Tab name="term" title="本学期"></Tab>
 | 
	
		
			
				|  |  |            </Tabs>
 | 
	
		
			
				|  |  | -          <div
 | 
	
		
			
				|  |  | -            class={styles.tagRight}
 | 
	
		
			
				|  |  | -            onClick={() => {
 | 
	
		
			
				|  |  | -              router.push({
 | 
	
		
			
				|  |  | -                path: '/student-manage'
 | 
	
		
			
				|  |  | -              });
 | 
	
		
			
				|  |  | -            }}>
 | 
	
		
			
				|  |  | +          <div class={styles.tagRight} onClick={() => gotoStudnetManage()}>
 | 
	
		
			
				|  |  |              学员信息 <Icon name="arrow" color="rgba(216,216,216,1)" />
 | 
	
		
			
				|  |  |            </div>
 | 
	
		
			
				|  |  |          </div>
 |