|
@@ -1,55 +1,82 @@
|
|
|
<script setup lang="ts">
|
|
|
-// import geoblock from './home/geoblock.vue'
|
|
|
+import _request from '../utils/request';
|
|
|
+
|
|
|
import bar from './txwx/bar.vue'
|
|
|
import lines from './txwx/lines.vue'
|
|
|
+
|
|
|
import geo from '~/assets/img/home/geo.png'
|
|
|
import under from '~/assets/img/home/under.webp'
|
|
|
import stu from '~/assets/img/home/stu.webp'
|
|
|
|
|
|
-const b1data = $ref([
|
|
|
- { title: '教师数量', num: '4366', unit: '人' },
|
|
|
- { title: '学生数量', num: '111', unit: '人' },
|
|
|
- { title: '学校数量', num: '111', unit: '人' },
|
|
|
- { title: '名师总数', num: '11', unit: '所' },
|
|
|
- { title: '上传资源总数', num: '111', unit: '人' },
|
|
|
- { title: '教师直播次数', num: '111', unit: '次' },
|
|
|
-])
|
|
|
-
|
|
|
-const b3data = $ref([
|
|
|
- ['桐乡市第十中学', '第一名', '2345人', '1.5W'],
|
|
|
- ['桐乡市第十中学', '第一名', '2345人', '1.5W'],
|
|
|
- ['桐乡市第十中学', '第一名', '2345人', '1.5W'],
|
|
|
- ['桐乡市第十中学桐乡市第十中学桐乡市第十中学桐乡市第十中学', '第一名', '2345人', '1.5W'],
|
|
|
- ['桐乡市第十中学', '第一名', '2345人', '1.5W'],
|
|
|
-])
|
|
|
-
|
|
|
-const b4data = $ref([
|
|
|
- ['张大大', '桐乡市第十中学', '第一名', '1.5W'],
|
|
|
- ['张大大', '桐乡市第十中学', '第一名', '1.5W'],
|
|
|
- ['张大大', '桐乡市第十中学', '第一名', '1.5W'],
|
|
|
-])
|
|
|
-// const b5data = $ref([
|
|
|
+
|
|
|
+
|
|
|
+// const b1data = $ref([
|
|
|
+// { title: '教师数量', num: '4366', unit: '人' },
|
|
|
+// { title: '学生数量', num: '111', unit: '人' },
|
|
|
+// { title: '学校数量', num: '111', unit: '人' },
|
|
|
+// { title: '名师总数', num: '11', unit: '所' },
|
|
|
+// { title: '上传资源总数', num: '111', unit: '人' },
|
|
|
+// { title: '教师直播次数', num: '111', unit: '次' },
|
|
|
+// ])
|
|
|
+
|
|
|
+// const b3data = $ref([
|
|
|
+// ['桐乡市第十中学', '第一名', '2345人', '1.5W'],
|
|
|
+// ['桐乡市第十中学', '第一名', '2345人', '1.5W'],
|
|
|
+// ['桐乡市第十中学', '第一名', '2345人', '1.5W'],
|
|
|
+// ['桐乡市第十中学桐乡市第十中学桐乡市第十中学桐乡市第十中学', '第一名', '2345人', '1.5W'],
|
|
|
+// ['桐乡市第十中学', '第一名', '2345人', '1.5W'],
|
|
|
+// ])
|
|
|
+
|
|
|
+// const b4data = $ref([
|
|
|
// ['张大大', '桐乡市第十中学', '第一名', '1.5W'],
|
|
|
// ['张大大', '桐乡市第十中学', '第一名', '1.5W'],
|
|
|
// ['张大大', '桐乡市第十中学', '第一名', '1.5W'],
|
|
|
// ])
|
|
|
-// const b6data = $ref([
|
|
|
+
|
|
|
+// const b7data = $ref([
|
|
|
// ['张大大', '桐乡市第十中学', '第一名', '1.5W'],
|
|
|
// ['张大大', '桐乡市第十中学', '第一名', '1.5W'],
|
|
|
// ['张大大', '桐乡市第十中学', '第一名', '1.5W'],
|
|
|
// ])
|
|
|
-const b7data = $ref([
|
|
|
- ['张大大', '桐乡市第十中学', '第一名', '1.5W'],
|
|
|
- ['张大大', '桐乡市第十中学', '第一名', '1.5W'],
|
|
|
- ['张大大', '桐乡市第十中学', '第一名', '1.5W'],
|
|
|
-])
|
|
|
-const b8data = $ref([
|
|
|
- ['张大大', '桐乡市第十中学', '第一名', '1.5W'],
|
|
|
- ['张大大', '桐乡市第十中学', '第一名', '1.5W'],
|
|
|
- ['张大大', '桐乡市第十中学', '第一名', '1.5W'],
|
|
|
-])
|
|
|
+// const b8data = $ref([
|
|
|
+// ['张大大', '桐乡市第十中学', '第一名', '1.5W'],
|
|
|
+// ['张大大', '桐乡市第十中学', '第一名', '1.5W'],
|
|
|
+// ['张大大', '桐乡市第十中学', '第一名', '1.5W'],
|
|
|
+// ])
|
|
|
+
|
|
|
|
|
|
+const b1data = ref("");
|
|
|
+const b3data = ref("");
|
|
|
+const b4data = ref("");
|
|
|
+const b7data = ref("");
|
|
|
+const b8data = ref("");
|
|
|
+const barEchartsData = ref('');
|
|
|
+const lineEchartsData = ref('');
|
|
|
+const initData = () => {
|
|
|
+ _request({
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/x-www-form-urlencoded',
|
|
|
+ },
|
|
|
+ baseURL:window.GLOBAL_CONFIG.txwxapi,
|
|
|
+ url: "/openapi/chart/index_data.php",
|
|
|
+ data:{},
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code == '1') {
|
|
|
+ console.log(res, "67567");
|
|
|
+ b1data.value = res.data.b1data;
|
|
|
+ b3data.value = res.data.b3data;
|
|
|
+ b4data.value = res.data.b4data;
|
|
|
+ b7data.value = res.data.b7data;
|
|
|
+ b8data.value = res.data.b8data;
|
|
|
+ barEchartsData.value = res.data.barEchartsData;
|
|
|
+ lineEchartsData.value = res.data.lineEchartsData;
|
|
|
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(error=>{console.log(error)})
|
|
|
+}
|
|
|
+ initData();
|
|
|
|
|
|
|
|
|
const router = useRouter()
|
|
@@ -125,7 +152,7 @@ function go(name: string) {
|
|
|
</div>
|
|
|
|
|
|
<div class="w-full h-400px">
|
|
|
- <bar />
|
|
|
+ <bar v-if="barEchartsData" :echarts-data="barEchartsData" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="border border-hex-0A337E bg-block p-3 h-full" style="width:33%;">
|
|
@@ -134,7 +161,7 @@ function go(name: string) {
|
|
|
<img class="h-7px" :src="under">
|
|
|
</div>
|
|
|
<div class="w-full h-400px">
|
|
|
- <lines />
|
|
|
+ <lines v-if="lineEchartsData" :echarts-data="lineEchartsData" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class=" h-full flex flex-col justify-between" style="width:33%;">
|