credit.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. <template>
  2. <!-- 学分登记 -->
  3. <div class="credit">
  4. <div class="pAHeader">
  5. <div class="pAHeader1">学分登记</div>
  6. </div>
  7. <hr>
  8. <!-- 搜索框开始 -->
  9. <div class="selects">
  10. <div class="selectsBlock">
  11. <span class="selectLabel">项目筛选</span>
  12. <el-select v-model="pavalues.value" @change="getData" placeholder="我的项目">
  13. <el-option label="所有项目" :value="0"></el-option>
  14. <el-option
  15. v-for="item in options"
  16. :key="item.courseId"
  17. :label="item.title"
  18. :value="item.courseId">
  19. </el-option>
  20. </el-select>
  21. </div>
  22. <div class="selectsBlock">
  23. <span class="selectLabel">部门</span>
  24. <el-select v-model="pavalues.value1" @change="getData" placeholder="请选择">
  25. <el-option label="所有部门" :value="0"></el-option>
  26. <el-option
  27. v-for="item in options1"
  28. :key="item.id"
  29. :label="item.name"
  30. :value="item.id">
  31. </el-option>
  32. </el-select>
  33. </div>
  34. <div class="selectsBlock">
  35. <span class="selectLabel">分类</span>
  36. <el-select v-model="pavalues.value2" @change="getData" placeholder="请选择">
  37. <el-option label="所有分类" :value="0"></el-option>
  38. <el-option
  39. v-for="item in options2"
  40. :key="item.id"
  41. :label="item.name"
  42. :value="item.id">
  43. </el-option>
  44. </el-select>
  45. </div>
  46. <div class="selectsBlock">
  47. <span class="selectLabel">负责人</span>
  48. <el-select v-model="pavalues.value3" @change="getData" placeholder="请选择">
  49. <el-option label="所有负责人" value=""></el-option>
  50. <el-option
  51. v-for="item in options3"
  52. :key="item.pro_leader"
  53. :label="item.pro_leader"
  54. :value="item.pro_leader">
  55. </el-option>
  56. </el-select>
  57. </div>
  58. </div>
  59. <!-- 搜索框结束 -->
  60. <!-- 表格开始 -->
  61. <div>
  62. <el-table
  63. :data="tableData"
  64. tooltip-effect="dark"
  65. stripe
  66. class="fontSize"
  67. :header-cell-style="{ background: '#f2f2f2',color:'#000' }"
  68. >
  69. <!-- <el-table-column
  70. type="selection"
  71. min-width="20%">
  72. </el-table-column> -->
  73. <el-table-column
  74. prop="title"
  75. label="项目名称"
  76. align="center"
  77. min-width="20%">
  78. </el-table-column>
  79. <el-table-column
  80. prop="pro_leader"
  81. label="项目负责人"
  82. align="center"
  83. min-width="20%">
  84. </el-table-column>
  85. <el-table-column
  86. prop="course_student.length"
  87. label="小组成员"
  88. align="center"
  89. min-width="15%">
  90. </el-table-column>
  91. <el-table-column
  92. prop="endProjectTime"
  93. label="结题时间"
  94. align="center"
  95. min-width="20%">
  96. </el-table-column>
  97. <el-table-column
  98. prop="operation"
  99. min-width="25%"
  100. align="center"
  101. label="操作"
  102. >
  103. <template #default="scope">
  104. <div class="operations">
  105. <el-button type="primary" class="bt1" size="mini" @click="queryScore(scope.row)">查看学分</el-button>
  106. <el-button type="primary" class="bt1" size="mini" @click="edit(scope.row.courseId)">修改</el-button>
  107. </div>
  108. </template>
  109. </el-table-column>
  110. </el-table>
  111. <!-- 查看学分弹窗START -->
  112. <el-dialog
  113. title="查看学分"
  114. :visible.sync="queryScoreDialog"
  115. width="800px"
  116. class="MAputIn AddMember">
  117. <div class="addDialogLogo">LOGO</div>
  118. <!-- <div class="deleteContent">是否删除“{{ delTeacherTable.Name}}”指导老师?</div> -->
  119. <el-table
  120. :data="ScoreData"
  121. tooltip-effect="dark"
  122. stripe
  123. class="fontSize core_dialogue"
  124. style="height:65%;overflow: auto;"
  125. :header-cell-style="{ background: '#f2f2f2',color:'#000' }"
  126. >
  127. <el-table-column
  128. prop="name"
  129. label="成员名称"
  130. align="center"
  131. min-width="20%">
  132. </el-table-column>
  133. <el-table-column
  134. prop="class"
  135. label="班级"
  136. align="center"
  137. min-width="20%">
  138. </el-table-column>
  139. <el-table-column
  140. prop="phone"
  141. label="联系电话"
  142. align="center"
  143. min-width="25%">
  144. </el-table-column>
  145. <el-table-column
  146. prop="score"
  147. label="学分"
  148. align="center"
  149. min-width="20%">
  150. </el-table-column>
  151. </el-table>
  152. <span slot="footer" class="dialog-footer">
  153. <el-button type="primary" @click="queryScoreDialog = false" class="btn5" size="small">确认</el-button>
  154. </span>
  155. </el-dialog>
  156. <!-- 查看学分弹窗END -->
  157. <el-pagination
  158. @current-change="CurrentChange"
  159. :page-size="Page.lim"
  160. layout=" prev, pager, next"
  161. background
  162. class="paginations"
  163. :total="Page.total">
  164. </el-pagination>
  165. </div>
  166. <!-- 表格结束 -->
  167. </div>
  168. </template>
  169. <script>
  170. export default {
  171. data() {
  172. return {
  173. options:[],
  174. options1:[],
  175. options2:[],
  176. options3:[],
  177. options4:[],
  178. tableData:[],
  179. ScoreData:[],
  180. queryScoreDialog:false,
  181. pavalues:{
  182. value:0,
  183. value1:0,
  184. value2:0,
  185. value3:'',
  186. value4:'',
  187. },
  188. Page:{
  189. nowPage:1,
  190. total:10,
  191. lim:10
  192. },
  193. }
  194. },
  195. methods:{
  196. edit(Id){
  197. this.$router.push(`/credit1?Id=${Id}`)
  198. },
  199. handleSelectionChange(val) {
  200. this.multipleSelection = val;
  201. },
  202. getData(){
  203. this.ajax.get(this.$store.state.api+"/GetProjectIsEndProject",{
  204. uid:this.$store.state.userInfo.userid,
  205. pid:this.pavalues.value,
  206. cid:this.pavalues.value1,
  207. tid:this.pavalues.value2,
  208. leader:this.pavalues.value3,
  209. page:this.Page.nowPage,
  210. lim:this.Page.lim,
  211. }).then(res=>{
  212. let data = res.data[0];
  213. console.log(res);
  214. data.forEach(item=>item["course_student"] = JSON.parse(item['course_student']));
  215. this.options = res.data[1]
  216. this.options1 = res.data[2]
  217. this.options2 = res.data[3]
  218. this.options3 = res.data[4]
  219. this.Page.total = res.data[5][0]['total']
  220. this.tableData = data;
  221. }).catch(err=>{
  222. console.log(err)
  223. })
  224. },
  225. CurrentChange(nowPage){
  226. this.Page.nowPage = nowPage;
  227. this.getData();
  228. },
  229. queryScore(row){
  230. this.ScoreData = row['course_student'];
  231. this.queryScoreDialog = true;
  232. }
  233. },
  234. mounted(){
  235. this.getData()
  236. }
  237. }
  238. </script>
  239. <style lang="less">
  240. .credit{
  241. width: 100%;
  242. height: 100%;
  243. position: relative;
  244. }
  245. .pagination{
  246. position: absolute;
  247. // float: right;
  248. bottom: 0;
  249. right: 0;
  250. margin: 20px 35px 10px;
  251. }
  252. .MAputIn{ //提交对话框样式
  253. .deleteContent{
  254. width: 100%;
  255. text-align: center;
  256. font-size: 25px;
  257. color: #000;
  258. }
  259. .addDialogLogo{
  260. width: 60px;
  261. height: 30px;
  262. display: flex;
  263. justify-content: center;
  264. line-height: 30px;
  265. border-radius: 5px;
  266. background: #f2f2f2;
  267. position: absolute;
  268. left: 20px; top: 15px;
  269. }
  270. .el-dialog__title{
  271. display: flex;
  272. justify-content: center;
  273. color:rgb(246, 247, 246);
  274. font-size: 18px;
  275. position: relative;
  276. top: -2px;
  277. }
  278. .dialog-footer{
  279. display: flex;
  280. justify-content: center;
  281. .btn5{
  282. // background: #0e72e6;
  283. height: 40px;
  284. width: 200px;
  285. font-size: 16px;
  286. }
  287. }
  288. }
  289. </style>