index.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <template>
  2. <div class="testExamine" :style="{padding: gotype ? '0 90px' : '10px'}">
  3. <backPage style="padding: 40px 0 0;" v-if="gotype" :tit="gotype == '/topTalent' ? '人才评估' : '考核审核'"></backPage>
  4. <div class="testTit">
  5. <div class="teaLis">
  6. <div
  7. class="teal"
  8. v-if="bArray.length"
  9. @click="cutPage(2)"
  10. :class="[pType == 2 ? 'Tbor' : '']"
  11. >
  12. {{ editname ? '人才标准' : '专任教师' }}
  13. </div>
  14. <div
  15. class="teal"
  16. v-if="aArray.length"
  17. @click="cutPage(1)"
  18. :class="[pType == 1 ? 'Tbor' : '']"
  19. >
  20. 班主任
  21. </div>
  22. </div>
  23. <div class="operate">
  24. <el-input
  25. v-if="cutTable == 1"
  26. v-model="teacherName"
  27. @change="selectTeaName"
  28. :placeholder="`请输入${editname ? '' : '教师'}姓名`"
  29. ></el-input>
  30. <div style="margin: 0 20px;" v-if="timeListA.length>1 && pType == 1">
  31. <el-select v-model="timeA" placeholder="请选择">
  32. <el-option
  33. v-for="item in timeListA"
  34. :key="item.value"
  35. :label="item.label"
  36. :value="item.value"
  37. >
  38. </el-option>
  39. </el-select>
  40. </div>
  41. <div style="margin: 0 20px;" v-if="timeListB.length>0 && pType == 2">
  42. <el-select v-model="timeB" placeholder="请选择">
  43. <el-option
  44. v-for="item in timeListB"
  45. :key="item.value"
  46. :label="item.label"
  47. :value="item.value"
  48. >
  49. </el-option>
  50. </el-select>
  51. </div>
  52. <div style="margin: 0 20px;">
  53. <el-select v-model="cutTable" placeholder="请选择">
  54. <el-option
  55. v-for="item in cutTabOpts"
  56. :key="item.value"
  57. :label="item.label"
  58. :value="item.value"
  59. >
  60. </el-option>
  61. </el-select>
  62. </div>
  63. <div
  64. v-if="cutTable == 1 && false"
  65. class="remindBtn"
  66. style="margin-right: 20px;"
  67. @click="excelBtn"
  68. >
  69. 导出
  70. </div>
  71. <div v-if="cutTable == 1" class="remindBtn" @click="personBtn">
  72. 提醒
  73. </div>
  74. </div>
  75. </div>
  76. <div class="testCon">
  77. <targetPage :pType="pType" :timeA="timeA" :timeB="timeB" v-if="cutTable == 0"></targetPage>
  78. <personPage
  79. :editname="editname"
  80. ref="child"
  81. :pType="pType"
  82. :teacherName="teacherName"
  83. :timeA="timeA"
  84. :timeB="timeB"
  85. v-if="cutTable == 1"
  86. ></personPage>
  87. </div>
  88. </div>
  89. </template>
  90. <script>
  91. import personPage from "./conpoments/personPage.vue";
  92. import targetPage from "./conpoments/targetPage";
  93. import backPage from "../../liyuan/components/backPage.vue";
  94. export default {
  95. components: {
  96. personPage,
  97. targetPage,
  98. backPage
  99. },
  100. data() {
  101. return {
  102. gotype:(window.topU && window.topU.gotype) ? window.topU.gotype : '',
  103. aArray: [],
  104. bArray: [],
  105. timeListA:[],
  106. timeListB:[],
  107. timeA:"",
  108. timeB:"",
  109. oid: this.$route.query.oid,
  110. org: this.$route.query.org,
  111. editname: this.$route.query.editName,
  112. pType: 2,
  113. cutTable: 1,
  114. teacherName: "",
  115. cutTabOpts: [
  116. {
  117. value: 0,
  118. label: "按指标"
  119. },
  120. {
  121. value: 1,
  122. label: "按人员"
  123. }
  124. ]
  125. };
  126. },
  127. mounted () {
  128. this.getPageBase2(1)
  129. this.getPageBase2(2)
  130. },
  131. methods: {
  132. getPageBase2(type) {
  133. let params = {
  134. typ: type,
  135. org: this.org,
  136. oid: this.oid,
  137. time:""
  138. };
  139. this.ajax
  140. .get(this.$store.state.api + "selectTestExamineBase2", params)
  141. .then(res => {
  142. console.log('1111111111111111111111', res.data);
  143. if(type == 1){
  144. this.aArray = res.data[0];
  145. this.timeListA = this.aArray.map(i=>{return {value:i.time,label:i.timeLabel}})
  146. if(this.timeListA.length>0)this.timeA = this.timeListA[0].value;
  147. }else {
  148. this.bArray = res.data[0];
  149. this.timeListB = this.bArray.map(i=>{return {value:i.time,label:i.timeLabel}})
  150. if(this.timeListB.length>0)this.timeB = this.timeListB[0].value;
  151. if(!this.bArray.length){
  152. this.pType = 1
  153. }
  154. }
  155. })
  156. .catch(error => {
  157. console.log(error);
  158. });
  159. },
  160. cutPage(e) {
  161. this.pType = e;
  162. },
  163. selectTeaName() {
  164. this.$refs.child.getData();
  165. },
  166. excelBtn() {
  167. this.$refs.child.getExcel();
  168. },
  169. personBtn() {
  170. this.$refs.child.remindExamine();
  171. }
  172. }
  173. };
  174. </script>
  175. <style scoped>
  176. .testExamine {
  177. width: 100%;
  178. /* min-width: calc(150px * 10); */
  179. min-height: 100%;
  180. padding: 10px;
  181. overflow: auto;
  182. box-sizing: border-box;
  183. background-color: #fff;
  184. }
  185. .testExamine > .testTit {
  186. height: 70px;
  187. display: flex;
  188. box-sizing: border-box;
  189. padding: 0 20px;
  190. justify-content: space-between;
  191. align-items: center;
  192. }
  193. .teaLis {
  194. display: flex;
  195. }
  196. .teal {
  197. padding: 10px 20px;
  198. cursor: pointer;
  199. }
  200. .Tbor {
  201. border-bottom: 2px rgba(54, 129, 252, 1) solid;
  202. font-weight: 600;
  203. }
  204. .testCon {
  205. box-sizing: border-box;
  206. padding: 20px;
  207. }
  208. .operate {
  209. display: flex;
  210. }
  211. .operate >>> .el-input {
  212. width: 200px !important;
  213. }
  214. .operate > .remindBtn {
  215. background: #409eff;
  216. padding: 10px 15px;
  217. box-sizing: border-box;
  218. width: 90px;
  219. text-align: center;
  220. border-radius: 4px;
  221. cursor: pointer;
  222. color: #fff;
  223. }
  224. </style>