index.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954
  1. <template>
  2. <div class="portrait">
  3. <div class="p_left">
  4. <div class="p_l_top">
  5. <div class="teachingActivity" v-loading="cardNumLoading">
  6. <img :src="require('../../../../assets/icon/testPerson/bg1.png')" alt="">
  7. <div>
  8. <span>教学活动</span>
  9. <el-tooltip
  10. class="item"
  11. effect="light"
  12. content="教学活动"
  13. placement="top"
  14. >
  15. <svg
  16. width="16"
  17. height="16"
  18. viewBox="0 0 16 16"
  19. fill="none"
  20. xmlns="http://www.w3.org/2000/svg"
  21. >
  22. <path
  23. d="M7.50562 11.9998V6.5H8.50562V11.9998H7.50562Z"
  24. fill="black"
  25. fill-opacity="0.4"
  26. />
  27. <path
  28. d="M8.59985 4H7.3999V5.19995H8.59985V4Z"
  29. fill="black"
  30. fill-opacity="0.4"
  31. />
  32. <path
  33. d="M1 8C1 11.866 4.13403 15 8 15C11.866 15 15 11.866 15 8C15 4.13403 11.866 1 8 1C4.13403 1 1 4.13403 1 8ZM2 8C2 4.68628 4.68628 2 8 2C11.3137 2 14 4.68628 14 8C14 11.3137 11.3137 14 8 14C4.68628 14 2 11.3137 2 8Z"
  34. fill="black"
  35. fill-opacity="0.4"
  36. />
  37. </svg>
  38. </el-tooltip>
  39. </div>
  40. <span style="color: #3681FC;">{{ teachingActivityNum }}</span>
  41. </div>
  42. <div class="teachingAndResearchActivities" v-loading="cardNumLoading">
  43. <img :src="require('../../../../assets/icon/testPerson/bg2.png')" alt="">
  44. <div>
  45. <span>教研活动</span>
  46. <el-tooltip
  47. class="item"
  48. effect="light"
  49. content="教研活动"
  50. placement="top"
  51. >
  52. <svg
  53. width="16"
  54. height="16"
  55. viewBox="0 0 16 16"
  56. fill="none"
  57. xmlns="http://www.w3.org/2000/svg"
  58. >
  59. <path
  60. d="M7.50562 11.9998V6.5H8.50562V11.9998H7.50562Z"
  61. fill="black"
  62. fill-opacity="0.4"
  63. />
  64. <path
  65. d="M8.59985 4H7.3999V5.19995H8.59985V4Z"
  66. fill="black"
  67. fill-opacity="0.4"
  68. />
  69. <path
  70. d="M1 8C1 11.866 4.13403 15 8 15C11.866 15 15 11.866 15 8C15 4.13403 11.866 1 8 1C4.13403 1 1 4.13403 1 8ZM2 8C2 4.68628 4.68628 2 8 2C11.3137 2 14 4.68628 14 8C14 11.3137 11.3137 14 8 14C4.68628 14 2 11.3137 2 8Z"
  71. fill="black"
  72. fill-opacity="0.4"
  73. />
  74. </svg>
  75. </el-tooltip>
  76. </div>
  77. <span style="color: #F2873B;">{{
  78. teachingAndResearchActivitiesNum
  79. }}</span>
  80. </div>
  81. <div
  82. class="trainingActivity"
  83. v-show="oid == '4c686762-1d0a-11ed-8c78-005056b86db5'"
  84. v-loading="cardNumLoading"
  85. >
  86. <img :src="require('../../../../assets/icon/testPerson/bg3.png')" alt="">
  87. <div>
  88. <span>培训活动</span>
  89. <el-tooltip
  90. class="item"
  91. effect="light"
  92. content="培训活动"
  93. placement="top"
  94. >
  95. <svg
  96. width="16"
  97. height="16"
  98. viewBox="0 0 16 16"
  99. fill="none"
  100. xmlns="http://www.w3.org/2000/svg"
  101. >
  102. <path
  103. d="M7.50562 11.9998V6.5H8.50562V11.9998H7.50562Z"
  104. fill="black"
  105. fill-opacity="0.4"
  106. />
  107. <path
  108. d="M8.59985 4H7.3999V5.19995H8.59985V4Z"
  109. fill="black"
  110. fill-opacity="0.4"
  111. />
  112. <path
  113. d="M1 8C1 11.866 4.13403 15 8 15C11.866 15 15 11.866 15 8C15 4.13403 11.866 1 8 1C4.13403 1 1 4.13403 1 8ZM2 8C2 4.68628 4.68628 2 8 2C11.3137 2 14 4.68628 14 8C14 11.3137 11.3137 14 8 14C4.68628 14 2 11.3137 2 8Z"
  114. fill="black"
  115. fill-opacity="0.4"
  116. />
  117. </svg>
  118. </el-tooltip>
  119. </div>
  120. <span style="color: #31B476;">{{ teachingActivityNum }}</span>
  121. </div>
  122. </div>
  123. <div class="p_l_bottom">
  124. <div class="p_title">
  125. <span>教研活动</span>
  126. </div>
  127. <div class="p_eCharts" v-loading="eChartsLoading">
  128. <eChartView
  129. :data="teachingAndResearchActivitiesECharts"
  130. v-if="!eChartsLoading"
  131. />
  132. </div>
  133. </div>
  134. </div>
  135. <div
  136. class="p_center"
  137. v-if="ExamineBase.length > 0"
  138. v-loading="annualAssessmentLoading"
  139. >
  140. <div class="p_title">
  141. <span>年度考核</span>
  142. <div>
  143. <el-button-group>
  144. <el-button
  145. v-if="bArray.length"
  146. @click="changeAnnualAssessmentStatus(2)"
  147. :type="annualAssessmentStatus === 2 ? 'primary' : ''"
  148. >专任教师</el-button
  149. >
  150. <el-button
  151. v-if="aArray.length"
  152. @click="changeAnnualAssessmentStatus(1)"
  153. :type="annualAssessmentStatus === 1 ? 'primary' : ''"
  154. >班主任</el-button
  155. >
  156. </el-button-group>
  157. </div>
  158. </div>
  159. <div class="p_eCharts" v-if="!annualAssessmentLoading">
  160. <eChartView
  161. ref="annualAssessmentEChartsRef"
  162. :data="annualAssessmentECharts"
  163. />
  164. </div>
  165. </div>
  166. <div class="p_center" v-else>
  167. <img :src="require('../../../../assets/icon/testPerson/bg4.png')" alt="">
  168. </div>
  169. <div class="p_right">
  170. <div class="p_r_top">
  171. <div class="p_title">
  172. <span>教学活动</span>
  173. </div>
  174. <div class="p_eCharts" v-loading="eChartsLoading">
  175. <eChartView :data="teachingActivityECharts" v-if="!eChartsLoading" />
  176. </div>
  177. </div>
  178. <div class="p_r_bottom">
  179. <div class="p_title">
  180. <span>跨学科情况</span>
  181. </div>
  182. <div class="p_eCharts" v-loading="eChartsLoading">
  183. <chordDiagramView
  184. :data="interdisciplinarySituationECharts"
  185. v-if="!eChartsLoading"
  186. />
  187. </div>
  188. </div>
  189. </div>
  190. </div>
  191. </template>
  192. <script>
  193. import eChartView from "./eChartView.vue";
  194. import chordDiagramView from "./chordDiagramView.vue";
  195. var OpenCC = require("opencc-js");
  196. let converter = OpenCC.Converter({
  197. from: "hk",
  198. to: "cn"
  199. });
  200. export default {
  201. components: {
  202. eChartView,
  203. chordDiagramView
  204. },
  205. props: {
  206. ExamineBase: {
  207. type: Array,
  208. default: () => []
  209. }
  210. },
  211. data() {
  212. return {
  213. teachingActivityNum: 0,
  214. teachingAndResearchActivitiesNum: 0,
  215. trainingActivityNum: 0,
  216. cardNumLoading: true,
  217. eChartsLoading: true,
  218. annualAssessmentStatus: 2, //2专任教师 1班主任
  219. teachingAndResearchActivitiesEChartsLoading: true,
  220. teachingAndResearchActivitiesECharts: {
  221. tooltip: {
  222. trigger: "axis",
  223. axisPointer: { type: "shadow" }
  224. },
  225. legend: {
  226. data: ["我发布的", "我收到的"],
  227. bottom: 0,
  228. orient: "horizontal",
  229. left: "center"
  230. },
  231. grid: {
  232. left: "3%",
  233. right: "4%",
  234. bottom: "10%",
  235. containLabel: true
  236. },
  237. xAxis: [
  238. {
  239. type: "category",
  240. data: ["评论次数", "评课次数", "字数", "语音数"]
  241. }
  242. ],
  243. yAxis: [
  244. {
  245. type: "value"
  246. }
  247. ],
  248. series: []
  249. },
  250. annualAssessmentLoading: true,
  251. annualAssessmentECharts: {
  252. legend: {
  253. data: ["自评得分率", "认定得分率", "全体教师平均得分率"],
  254. bottom: 0
  255. },
  256. radar: {
  257. // shape: 'circle',
  258. indicator: []
  259. },
  260. series: [
  261. {
  262. name: "",
  263. type: "radar",
  264. data: []
  265. }
  266. ]
  267. },
  268. teachingActivityECharts: {
  269. tooltip: {
  270. trigger: "item"
  271. },
  272. // legend: {
  273. // orient: "vertical",
  274. // right: "5%",
  275. // top: "center",
  276. // itemGap: 20
  277. // },
  278. series: [
  279. {
  280. name: "",
  281. type: "pie",
  282. radius: ["40%", "70%"],
  283. avoidLabelOverlap: false,
  284. label: {
  285. show: true,
  286. position: "outside",
  287. formatter: "{b}: {c}"
  288. },
  289. emphasis: {
  290. label: {
  291. show: true,
  292. fontSize: "20",
  293. fontWeight: "bold"
  294. }
  295. },
  296. labelLine: {
  297. show: true,
  298. length: 15,
  299. length2: 10
  300. },
  301. data: []
  302. }
  303. ]
  304. },
  305. interdisciplinarySituationECharts: {
  306. title: {
  307. text: null
  308. },
  309. chart: {
  310. backgroundColor: "rgba(0,0,0,0)"
  311. },
  312. credits: {
  313. enabled: false //不显示LOGO
  314. },
  315. tooltip: {
  316. formatter: function() {
  317. // 自定义弹窗内容的回调函数
  318. var point = this.point;
  319. if (point.from) {
  320. var tooltipText =
  321. "<b>" +
  322. point.from +
  323. "</b> - <b>" +
  324. point.to +
  325. "</b>: " +
  326. point.weight;
  327. return tooltipText;
  328. } else {
  329. var tooltipText = "<b>" + point.name + "</b>: " + point.sum;
  330. return tooltipText;
  331. }
  332. }
  333. },
  334. series: [
  335. {
  336. keys: ["from", "to", "weight"],
  337. data: [],
  338. type: "dependencywheel",
  339. name: "",
  340. dataLabels: {
  341. color: "#333",
  342. textPath: {
  343. enabled: true,
  344. attributes: {
  345. dy: 5
  346. }
  347. },
  348. distance: 10
  349. },
  350. size: "95%"
  351. }
  352. ]
  353. },
  354. userid: this.$route.query.userid,
  355. oid: this.$route.query.oid,
  356. org: this.$route.query.org,
  357. teacherName: "",
  358. aArray: [],
  359. bArray: [],
  360. timeSort:[],
  361. selectTime:"",
  362. };
  363. },
  364. methods: {
  365. // 获取页面基础ui信息
  366. getPageBase2(type) {
  367. let params = {
  368. typ: type,
  369. org: this.org,
  370. oid: this.oid
  371. };
  372. this.ajax
  373. .get(this.$store.state.api + "selectTestExamineBase", params)
  374. .then(res => {
  375. if(type == 1){
  376. this.aArray = res.data[0];
  377. }else {
  378. this.bArray = res.data[0];
  379. if(!this.bArray.length){
  380. this.changeAnnualAssessmentStatus(1)
  381. }
  382. }
  383. this.timeSort = res.data[0].map(item => {return {label:item.timeName,id:item.time,time:item.timeName.split('~')[0]}});
  384. if(this.timeSort.length>0){
  385. this.selectTime = this.timeSort[0].id;
  386. }
  387. })
  388. .catch(error => {
  389. console.log(error);
  390. });
  391. },
  392. changeAnnualAssessmentStatus(status) {
  393. if (this.annualAssessmentLoading) return;
  394. this.annualAssessmentStatus = status;
  395. this.getAnnualAssessmentEChartsData();
  396. },
  397. getAnnualAssessmentEChartsData() {
  398. this.annualAssessmentLoading = true;
  399. let params = [
  400. {
  401. oid: this.oid,
  402. org: this.org,
  403. type: this.annualAssessmentStatus,
  404. tname: this.teacherName
  405. }
  406. ];
  407. // console.log(params);
  408. this.ajax
  409. .post(this.$store.state.api + "selectTestExaminePersonData2", params)
  410. .then(res => {
  411. let data = res.data[0];
  412. if(this.selectTime){
  413. data = data.filter(item => item.time == this.selectTime);
  414. }
  415. console.log("👉xxx",data)
  416. data.forEach(e => {
  417. e.json = JSON.parse(e.json);
  418. });
  419. data.forEach(e => {
  420. e.evaSca = 0;
  421. e.cogSco = 0;
  422. e.step = 0;
  423. e.allStep = 0;
  424. e.json.forEach(i => {
  425. i.evaScore = 0; // 自评
  426. i.cogScore = 0; //考核
  427. i.score = 0; //考核
  428. i.children.forEach(k => {
  429. e.evaSca = e.evaSca + k.sco1 * 1;
  430. e.cogSco = e.cogSco + k.sco2 * 1;
  431. i.evaScore = i.evaScore + k.sco1 * 1;
  432. i.cogScore = i.cogScore + k.sco2 * 1;
  433. i.score = i.score + k.score * 1;
  434. e.allStep++;
  435. if (!!k.sco2 * 1) {
  436. e.step++;
  437. }
  438. });
  439. });
  440. });
  441. data.forEach(e => {
  442. if (e.step == e.allStep) {
  443. e.state = "已完成";
  444. } else {
  445. e.state = "未完成";
  446. }
  447. if (!e.tea) {
  448. e.tea = "";
  449. }
  450. e.evaSca = e.evaSca.toFixed(0);
  451. e.cogSco = e.cogSco.toFixed(0);
  452. });
  453. let _data = [];
  454. let zongJson = {};
  455. // zongJson.count = data.length
  456. data.forEach((e, index) => {
  457. _data[index] = {};
  458. _data[index].username = e.username;
  459. _data[index].evaSca = e.evaSca;
  460. _data[index].cogSco = e.cogSco;
  461. _data[index].json = [];
  462. e.json.forEach((i, iindex) => {
  463. if (
  464. converter(i.name) == converter("科组评价") ||
  465. converter(i.name) == converter("行政巡查")
  466. ) {
  467. return;
  468. }
  469. _data[index].json[iindex] = {};
  470. _data[index].json[iindex].name = i.name;
  471. console.log(i)
  472. let _evaScore = parseInt(
  473. (i.evaScore * (100 / i.score)).toFixed(0)
  474. );
  475. let _cogScore = parseInt(
  476. (i.cogScore * (100 / i.score)).toFixed(0)
  477. );
  478. // let _ideScore = parseInt(
  479. // (i.score * (100 / i.score)).toFixed(0)
  480. // );
  481. _data[index].json[iindex].evaScore = _evaScore; // 自评
  482. _data[index].json[iindex].cogScore = _cogScore; // 考核
  483. zongJson[i.name] ? "" : (zongJson[i.name] = {});
  484. zongJson[i.name].evaScore // 全体教师自评平均得分
  485. ? (zongJson[i.name].evaScore += _evaScore)
  486. : (zongJson[i.name].evaScore = _evaScore);
  487. zongJson[i.name].cogScore // 全体教师考核平均得分
  488. ? (zongJson[i.name].cogScore += _cogScore)
  489. : (zongJson[i.name].cogScore = _cogScore);
  490. if(e.userid == this.userid){
  491. zongJson[i.name].selfEvaScore = _evaScore;
  492. zongJson[i.name].selfCogScore = _cogScore;
  493. }
  494. });
  495. });
  496. let zongArray = Object.keys(zongJson);
  497. for (var i = 0; i < zongArray.length; i++) {
  498. zongJson[zongArray[i]].evaScore = (
  499. zongJson[zongArray[i]].evaScore / data.length
  500. ).toFixed(0);
  501. zongJson[zongArray[i]].cogScore = (
  502. zongJson[zongArray[i]].cogScore / data.length
  503. ).toFixed(0);
  504. }
  505. this.annualAssessmentECharts.radar.indicator = Object.keys(
  506. zongJson
  507. ).map(item => {
  508. return { name: item, max: 100 };
  509. });
  510. let _eChartsData = [
  511. {
  512. value: [],
  513. name: "自评得分率",
  514. label: {
  515. show: true,
  516. formatter: `{c}`,
  517. fontSize: 12
  518. }
  519. },
  520. {
  521. value: [],
  522. name: "认定得分率",
  523. label: {
  524. show: true,
  525. formatter: `{c}`,
  526. fontSize: 12
  527. }
  528. },
  529. {
  530. value: [],
  531. name: "全体教师平均得分率",
  532. label: {
  533. show: true,
  534. formatter: `{c}`,
  535. fontSize: 12
  536. }
  537. }
  538. ];
  539. zongArray.forEach(i => {
  540. if(zongJson[i].selfEvaScore || zongJson[i].selfEvaScore === 0){
  541. _eChartsData[0].value.push(zongJson[i].selfEvaScore);
  542. }else{
  543. _eChartsData[0].value.push(0);
  544. }
  545. if(zongJson[i].selfCogScore || zongJson[i].selfCogScore === 0){
  546. _eChartsData[2].value.push(zongJson[i].selfCogScore);
  547. }else{
  548. _eChartsData[2].value.push(0);
  549. }
  550. if(zongJson[i].cogScore || zongJson[i].cogScore === 0){
  551. _eChartsData[1].value.push(zongJson[i].cogScore)
  552. }else{
  553. _eChartsData[1].value.push(0);
  554. }
  555. // _eChartsData[0].value.push(zongJson[i].selfScore);
  556. // _eChartsData[1].value.push(zongJson[i].evaScore);
  557. // _eChartsData[2].value.push(zongJson[i].cogScore);
  558. });
  559. console.log(data)
  560. console.log(zongJson)
  561. console.log(_eChartsData)
  562. this.annualAssessmentECharts.series[0].data = _eChartsData;
  563. // this.$refs.annualAssessmentEChartsRef.setChart();
  564. this.annualAssessmentLoading = false;
  565. })
  566. .catch(error => {
  567. this.annualAssessmentLoading = false;
  568. console.log(error);
  569. });
  570. },
  571. getCardData() {
  572. this.cardNumLoading = true;
  573. let params = {
  574. uid: this.userid,
  575. oid: this.oid,
  576. org: this.org
  577. };
  578. this.ajax
  579. .get(this.$store.state.api + "selectTestUserY", params)
  580. .then(res => {
  581. (this.teachingActivityNum = res.data[4].length),
  582. (this.teachingAndResearchActivitiesNum = res.data[5].length);
  583. this.trainingActivityNum = res.data[3].length;
  584. this.cardNumLoading = false;
  585. })
  586. .catch(err => {
  587. this.cardNumLoading = false;
  588. console.error(err);
  589. });
  590. },
  591. getData() {
  592. this.eChartsLoading = true;
  593. let params = {
  594. uid: this.userid
  595. };
  596. this.ajax
  597. .get(this.$store.state.api + "selectPortraitData", params)
  598. .then(res => {
  599. let array1 = res.data[0];
  600. let array2 = res.data[1];
  601. let array3 = res.data[2];
  602. let typeList = res.data[3];
  603. let countCourse1 = [];
  604. let wordCount1 = 0;
  605. let audioCount1 = 0;
  606. let courseArray1 = {};
  607. let countCourse2 = [];
  608. let wordCount2 = 0;
  609. let audioCount2 = 0;
  610. let courseArray2 = {};
  611. // 我发布的
  612. array1.forEach(element => {
  613. if (!courseArray1[element.courseId]) {
  614. courseArray1[element.courseId] = {
  615. bool: false,
  616. title: element.title,
  617. type: element.type2,
  618. name: element.creator,
  619. array: []
  620. };
  621. }
  622. courseArray1[element.courseId].array.push(element);
  623. if (countCourse1.indexOf(element.courseId) == -1) {
  624. countCourse1.push(element.courseId);
  625. }
  626. if (element.type == 1) {
  627. wordCount1 += element.content.replace(/<[^>]+>/g, "").length;
  628. }
  629. if (element.type == 2) {
  630. audioCount1++;
  631. }
  632. });
  633. //我收到的
  634. array2.forEach(element => {
  635. if (!courseArray2[element.courseId]) {
  636. courseArray2[element.courseId] = {
  637. bool: false,
  638. title: element.title,
  639. type: element.type2,
  640. name: element.creator,
  641. array: []
  642. };
  643. }
  644. courseArray2[element.courseId].array.push(element);
  645. if (countCourse2.indexOf(element.courseId) == -1) {
  646. countCourse2.push(element.courseId);
  647. }
  648. if (element.type == 1) {
  649. wordCount2 += element.content.replace(/<[^>]+>/g, "").length;
  650. }
  651. if (element.type == 2) {
  652. audioCount2++;
  653. }
  654. });
  655. //2 1 3 4
  656. let _eChartsData = [
  657. {
  658. name: "我发布的",
  659. type: "bar",
  660. data: [
  661. array1.length,
  662. countCourse1.length,
  663. wordCount1,
  664. audioCount1
  665. ],
  666. itemStyle: {
  667. color: "#5470c6"
  668. }
  669. },
  670. {
  671. name: "我收到的",
  672. type: "bar",
  673. data: [
  674. array2.length,
  675. countCourse2.length,
  676. wordCount2,
  677. audioCount2
  678. ],
  679. itemStyle: {
  680. color: "#91cc75"
  681. }
  682. }
  683. ];
  684. let _eChartsData2 = [];
  685. let _eChartsData3 = [];
  686. typeList.forEach(item => {
  687. _eChartsData2.push({ value: 0, name: item.name, id: item.id });
  688. });
  689. array3.forEach(item => {
  690. let type = item.type.split(",");
  691. type.sort((a,b)=>a-b);
  692. type.forEach(i => {
  693. let _findIndex = _eChartsData2.findIndex(j => j.id == i);
  694. if (_findIndex != -1) {
  695. _eChartsData2[_findIndex].value += 1;
  696. }
  697. });
  698. });
  699. let resultSubject = [];
  700. for (let i = 0; i < typeList.length - 1; i++) {
  701. for (let j = i + 1; j < typeList.length; j++) {
  702. resultSubject.push({
  703. id: [typeList[i].id, typeList[j].id],
  704. name: [typeList[i].name, typeList[j].name],
  705. count: 0,
  706. });
  707. }
  708. }
  709. for (var i = 0; i < array3.length; i++) {
  710. let array = array3[i].type.split(",");
  711. for (var j = 0; j < resultSubject.length; j++) {
  712. if (this.checkArrayInclusion(resultSubject[j].id, array)) {
  713. resultSubject[j].count++;
  714. }
  715. }
  716. }
  717. let resultSubject2 = [];
  718. for (var i = 0; i < resultSubject.length; i++) {
  719. let el = resultSubject[i];
  720. if (el.count > 0) {
  721. resultSubject2.push([el.name[0], el.name[1], el.count]);
  722. }
  723. }
  724. _eChartsData3 = resultSubject.filter(i=>i.count!==0).map(i=>([i.name[0],i.name[1],i.count]));
  725. console.log(_eChartsData3)
  726. _eChartsData2 = _eChartsData2.filter(i => i.value != 0);
  727. this.teachingActivityECharts.series[0].data = _eChartsData2;
  728. this.teachingAndResearchActivitiesECharts.series = _eChartsData;
  729. this.interdisciplinarySituationECharts.series[0].data = _eChartsData3;
  730. this.eChartsLoading = false;
  731. })
  732. .catch(err => {
  733. this.eChartsLoading = false;
  734. console.error(err);
  735. });
  736. },
  737. checkArrayInclusion(arr1, arr2) {
  738. return arr1.every((item) => arr2.includes(item));
  739. },
  740. },
  741. mounted() {
  742. this.getPageBase2(1)
  743. this.getPageBase2(2)
  744. this.getAnnualAssessmentEChartsData();
  745. this.getData();
  746. this.getCardData();
  747. }
  748. };
  749. </script>
  750. <style scoped>
  751. .portrait {
  752. width: 100%;
  753. height: calc(100% - 20px);
  754. margin: 10px 0;
  755. display: flex;
  756. overflow: auto;
  757. }
  758. .portrait > div {
  759. margin: 0 10px;
  760. /* background-color: #fff; */
  761. border-radius: 5px;
  762. box-sizing: border-box;
  763. display: flex;
  764. flex-direction: column;
  765. }
  766. .p_left {
  767. width: 28.5%;
  768. display: flex;
  769. flex-direction: column;
  770. background-color: none;
  771. }
  772. .p_l_top {
  773. flex: 1;
  774. display: flex;
  775. flex-direction: column;
  776. position: relative;
  777. }
  778. .p_l_top > div {
  779. flex: 1;
  780. border-radius: 5px;
  781. /* margin: 10px 0; */
  782. background-color: #fff;
  783. display: flex;
  784. flex-direction: column;
  785. justify-content: center;
  786. box-sizing: border-box;
  787. padding: 0 30px;
  788. position: relative;
  789. overflow: hidden;
  790. }
  791. .p_l_top >div> img{
  792. position: absolute;
  793. top: 0;
  794. left: 0;
  795. width: 100%;
  796. height: 100%;
  797. z-index: 1;
  798. object-fit: fill;
  799. }
  800. .p_l_top > div > div {
  801. display: flex;
  802. align-items: center;
  803. margin-bottom: 20px;
  804. z-index: 2;
  805. }
  806. .p_l_top > div > div > span {
  807. font-size: 22px;
  808. /* font-weight: bold; */
  809. }
  810. .p_l_top > div > div > svg {
  811. width: 20px;
  812. height: 20px;
  813. margin-left: 10px;
  814. cursor: pointer;
  815. }
  816. .p_l_top > div > span {
  817. font-size: 2.6em;
  818. font-weight: bold;
  819. z-index: 2;
  820. }
  821. .p_l_top > div:not(:first-child):not(:last-child) {
  822. margin: 20px 0;
  823. }
  824. .teachingActivity {
  825. background: linear-gradient(
  826. 290deg,
  827. rgba(231, 238, 254, 0.1) 0%,
  828. #e7eefe 100%
  829. );
  830. }
  831. .teachingAndResearchActivities {
  832. background: linear-gradient(
  833. 290deg,
  834. rgba(243, 254, 231, 0.1) 0%,
  835. #fef2e7 100%
  836. );
  837. }
  838. .trainingActivity {
  839. background: linear-gradient(
  840. 290deg,
  841. rgba(231, 254, 251, 0.1) 0%,
  842. #e7feef 100%
  843. );
  844. }
  845. .p_l_bottom {
  846. flex: 1;
  847. margin-top: 20px;
  848. border-radius: 5px;
  849. background-color: #fff;
  850. border: 1px solid rgba(255, 255, 255, 0.55);
  851. box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
  852. padding: 20px;
  853. display: flex;
  854. flex-direction: column;
  855. }
  856. .p_center {
  857. width: calc(100% - 57%);
  858. background-color: #fff;
  859. border: 1px solid rgba(255, 255, 255, 0.55);
  860. box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
  861. padding: 20px;
  862. }
  863. .p_center>img{
  864. width: 100%;
  865. height: auto;
  866. margin: auto;
  867. transform: scaleX(-1);
  868. }
  869. .p_right {
  870. width: 28.5%;
  871. display: flex;
  872. flex-direction: column;
  873. }
  874. .p_r_top {
  875. flex: 1;
  876. background-color: #fff;
  877. border: 1px solid rgba(255, 255, 255, 0.55);
  878. box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
  879. padding: 20px;
  880. border-radius: 5px;
  881. display: flex;
  882. flex-direction: column;
  883. }
  884. .p_r_bottom {
  885. flex: 1;
  886. background-color: #fff;
  887. border: 1px solid rgba(255, 255, 255, 0.55);
  888. box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
  889. padding: 20px;
  890. margin-top: 20px;
  891. border-radius: 5px;
  892. display: flex;
  893. flex-direction: column;
  894. }
  895. .p_title {
  896. display: flex;
  897. align-items: center;
  898. justify-content: space-between;
  899. }
  900. .p_title > span {
  901. font-size: 28px;
  902. }
  903. .p_eCharts {
  904. width: 100%;
  905. flex: 1;
  906. margin-top: 10px;
  907. }
  908. </style>