SAchooseattention.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. <template>
  2. <Row class="attention_box">
  3. <Col span="24">
  4. <Sider ref="side1" v-model="isCollapsed">
  5. <Menu active-name="1-1" theme="dark" width="100%">
  6. <MenuItem name="1-1">
  7. <Icon type="ios-home-outline"/>
  8. <span>{{$t('saindex.index')}}</span>
  9. </MenuItem>
  10. <MenuItem name="1-2">
  11. <Icon type="ios-clipboard-outline"/>
  12. <span>{{$t('saindex.grade')}}</span>
  13. </MenuItem>
  14. <MenuItem name="1-3">
  15. <Icon type="md-checkmark-circle-outline"/>
  16. <span>{{$t('saindex.droppoint')}}</span>
  17. </MenuItem>
  18. <MenuItem name="1-4">
  19. <Icon type="ios-create-outline"/>
  20. <span>{{$t('saindex.examination')}}</span>
  21. </MenuItem>
  22. <MenuItem name="1-5">
  23. <Icon type="ios-medal-outline"/>
  24. <span>{{$t('saindex.knowledge')}}</span>
  25. </MenuItem>
  26. </Menu>
  27. </Sider>
  28. </Col>
  29. <Col span="24" class="choose">
  30. <div class="select">
  31. <p class="choose_box_tilte" v-if="this.now_url == '/saindex'">{{$t('sasidebar.class')}}</p>
  32. <Cascader :data="selectgrade" v-model="grade" placeholder="请选择年级" @on-change="listchange" v-if="this.now_url != '/teach'"></Cascader>
  33. <p class="choose_box_tilte">{{$t('sasidebar.term')}}</p>
  34. <Cascader :data="selectterm" v-model="semester" placeholder="请选择年级" @on-change="listterm"></Cascader>
  35. <p class="choose_box_tilte" v-if="this.now_url == '/teach'">{{$t('sasidebar.compare')}}</p>
  36. <Select v-model="model1" style="width:200px" placeholder="请选择比较的数据" v-if="this.now_url == '/teach'" @on-change="datacompare">
  37. <Option v-for="item in selectcontrast" :value="item.value" :key="item.value">{{ item.label }}</Option>
  38. </Select>
  39. </div>
  40. </Col>
  41. </Row>
  42. </template>
  43. <script>
  44. export default {
  45. name: "ChooseAttention",
  46. data() {
  47. return {
  48. isCollapsed: false,
  49. value1: [],
  50. grade: [],
  51. semester: [],
  52. cityList: [],
  53. model1:[],
  54. now_url:this.$route.path,
  55. }
  56. },
  57. created() {
  58. this.init();
  59. this.inits();
  60. this.contrast();
  61. },
  62. computed: {
  63. // 命令发布监听
  64. selectgrade() {
  65. return this.$store.state.selectgrade
  66. },
  67. selectterm(){
  68. return this.$store.state.selectterm
  69. },
  70. selectcontrast() {
  71. return this.$store.state.selectcontrast
  72. },
  73. },
  74. methods: {
  75. //获取关注年级数据
  76. init(){
  77. this.$api.FindGrade({})
  78. .then((response) => {
  79. //console.log(response.result.data, 11111);
  80. this.$store.state.selectgrade = response.result.data;
  81. //console.log(this.$store.state.selectgrade, 888855)
  82. })
  83. },
  84. //获取关注学年期
  85. inits() {
  86. if (this.now_url == '/saindex') {
  87. this.$api.FindTerm({})
  88. .then((response) => {
  89. //console.log(response.result.data,11111);
  90. this.$store.state.selectterm = response.result.data
  91. })
  92. } else if (this.now_url == '/teach') {
  93. this.$api.FindTeachTerm({})
  94. .then((response) => {
  95. this.$store.state.selectterm = response.result.data;
  96. })
  97. } else if (this.now_url == '/total') {
  98. this.$api.FindTeachTerm({})
  99. .then((response) => {
  100. this.$store.state.selectterm = response.result.data;
  101. })
  102. }
  103. },
  104. //获取数据比较
  105. contrast(){
  106. this.$api.FindTeachContrast({})
  107. .then((response) => {
  108. this.$store.state.selectcontrast=response.result.data
  109. })
  110. },
  111. //获取关注年级值
  112. listchange(value, selectedData) {
  113. let xueduan = value[0];
  114. let nianjinum = value[1];
  115. if (xueduan == 'gaozhong' && nianjinum != 1) {
  116. this.$store.state.wenli_show = true;
  117. } else {
  118. this.$store.state.wenli_show = false;
  119. }
  120. //console.log(value,33333);
  121. this.$api.FindSelectGrade({})
  122. .then((response) => {
  123. //console.log(response.result.data, 789789789);
  124. //获取新的年级选择
  125. this.$store.state.selectgrade = response.result.data.selectgrade
  126. //获取新的学年期
  127. this.$store.state.selectterm = response.result.data.term
  128. //获取新的考试次数情况
  129. this.$store.state.selectexam = response.result.data.exam[0].data;
  130. //获取新的基础信息
  131. this.$store.state.basicsdata = response.result.data.base;
  132. //获取新的各校成绩排名
  133. this.$store.state.zhuxhuang = response.result.data.barecharts;
  134. //获取新的各项科目表现
  135. this.$store.state.leida = response.result.data.leida;
  136. //获取新的科目表现对比
  137. this.$store.state.pie = response.result.data.pie
  138. //获取新的考试类型
  139. this.$store.state.examtype = response.result.data.examtype;
  140. //获取新的各校历次总分统计图
  141. this.$store.state.linechart = response.result.data.linechart;
  142. })
  143. },
  144. //获取关注学年期
  145. listterm(value, selectedData) {
  146. if (this.now_url == '/saindex') {
  147. this.$api.FindSelectTerm({})
  148. .then((response) => {
  149. //console.log(response.result.data);
  150. //获取新的关注年级
  151. this.$store.state.selectgrade = response.result.data.selectgrade
  152. //获取新的学年期
  153. this.$store.state.selectterm = response.result.data.term
  154. //获取新的考试次数情况
  155. this.$store.state.selectexam = response.result.data.exam[0].data;
  156. //获取新的基础信息
  157. this.$store.state.basicsdata = response.result.data.base;
  158. //获取新的各校成绩排名
  159. this.$store.state.zhuxhuang = response.result.data.barecharts;
  160. //获取新的各项科目表现
  161. this.$store.state.leida = response.result.data.leida;
  162. //获取新的科目表现对比
  163. this.$store.state.pie = response.result.data.pie
  164. //获取新的考试类型
  165. this.$store.state.examtype = response.result.data.examtype;
  166. //获取新的各校历次总分统计图
  167. this.$store.state.linechart = response.result.data.linechart;
  168. })
  169. } else if (this.now_url =='/teach') {
  170. this.$api.FindDynamicTerm({})
  171. .then((response) => {
  172. //console.log(response.result.data,33333)
  173. //获取新的学年期
  174. this.$store.state.selectterm = response.result.data.term;
  175. //获取新的数据对比
  176. this.$store.state.selectcontrast = response.result.data.selectcontrast;
  177. //获取新的考试次数情况
  178. this.$store.state.selectexam = response.result.data.exam[0].data;
  179. //获取新的基础信息
  180. this.$store.state.basicsdata = response.result.data.base;
  181. //获取各班平均分数排名
  182. this.$store.state.barline = response.result.data.barecharts;
  183. //获取及格率比较
  184. this.$store.state.annulus = response.result.data.annulus;
  185. //获取PR百分等级
  186. this.$store.state.accuracyPR = response.result.data.accuracyPR;
  187. //获取历次总分统计图
  188. this.$store.state.linechart = response.result.data.linechart;
  189. })
  190. }
  191. },
  192. //动态数据比较
  193. datacompare(value, selectedData) {
  194. this.$api.FindDatacompare({})
  195. .then((response) => {
  196. //获取新的学年期
  197. this.$store.state.selectterm = response.result.data.term;
  198. //获取新的数据对比
  199. this.$store.state.selectcontrast = response.result.data.selectcontrast;
  200. //获取新的考试次数情况
  201. this.$store.state.selectexam = response.result.data.exam[0].data;
  202. //获取新的基础信息
  203. this.$store.state.basicsdata = response.result.data.base;
  204. //获取各班平均分数排名
  205. this.$store.state.barline = response.result.data.barecharts;
  206. //获取及格率比较
  207. this.$store.state.annulus = response.result.data.annulus;
  208. //获取PR百分等级
  209. this.$store.state.accuracyPR = response.result.data.accuracyPR;
  210. //获取历次总分统计图
  211. this.$store.state.linechart = response.result.data.linechart;
  212. })
  213. }
  214. },
  215. }
  216. </script>
  217. <style scoped>
  218. .ivu-select-selection {
  219. background-color: #cfd4da !important;
  220. }
  221. .ivu-input {
  222. font-size: 14px !important;
  223. background-color: #cfd4da;
  224. color: #4d5760 !important;
  225. border: 1px solid #cfd4da;
  226. }
  227. .ivu-input-wrapper {
  228. color: #000 !important;
  229. }
  230. .ivu-input:hover {
  231. border: 1px solid #fff;
  232. }
  233. .ivu-select {
  234. width: 100% !important;
  235. }
  236. </style>
  237. <style scoped>
  238. </style>