PrintPlanDetail.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. <template>
  2. <div>
  3. <el-dialog
  4. class="print-plan-detail page-dialog"
  5. :visible.sync="modalIsShow"
  6. :title="title"
  7. :close-on-click-modal="false"
  8. :close-on-press-escape="false"
  9. append-to-body
  10. fullscreen
  11. @open="visibleChange"
  12. >
  13. <div class="part-box part-box-filter part-box-flex">
  14. <el-form
  15. ref="FilterForm"
  16. label-position="left"
  17. label-width="85px"
  18. inline
  19. >
  20. <el-form-item label="课程(代码):" label-width="110px">
  21. <course-select
  22. v-model.trim="filter.courseCode"
  23. :semester-id="filter.semesterId"
  24. :exam-id="filter.examId"
  25. :print-plan-id="filter.printPlanIdList"
  26. placeholder="课程(代码)"
  27. clearable
  28. ></course-select>
  29. </el-form-item>
  30. <el-form-item label="试卷编号:">
  31. <paper-number-select
  32. ref="PaperNumberSelect"
  33. v-model="filter.paperNumber"
  34. :print-plan-id="filter.printPlanIdList"
  35. :exam-id="filter.examId"
  36. :course-code="filter.courseCode"
  37. placeholder="试卷编号"
  38. clearable
  39. ></paper-number-select>
  40. </el-form-item>
  41. <el-form-item label="命题老师:">
  42. <el-input
  43. v-model="filter.userName"
  44. placeholder="命题老师"
  45. clearable
  46. ></el-input>
  47. </el-form-item>
  48. <el-form-item label-width="0px">
  49. <el-button type="primary" @click="search">查询</el-button>
  50. </el-form-item>
  51. </el-form>
  52. </div>
  53. <div class="part-box part-box-pad box-justify">
  54. <p>
  55. <span class="mr-4">
  56. 该印刷计划共计:
  57. <i class="color-primary">{{ totalInfo.courseTotal }}</i>
  58. 门课程
  59. </span>
  60. <span class="mr-4">
  61. <i class="color-primary">{{ totalInfo.taskTotal }}</i> 个命题任务
  62. </span>
  63. <span class="mr-4">
  64. <i class="color-primary">{{ totalInfo.subjectTotal }}</i>
  65. 科次(考生人数)
  66. </span>
  67. </p>
  68. <p>
  69. <el-button type="primary" @click="toBatchLink">批量关联</el-button>
  70. </p>
  71. </div>
  72. <div class="part-box part-box-pad">
  73. <el-table ref="TableList" :data="dataList">
  74. <el-table-column
  75. type="index"
  76. label="序号"
  77. width="70"
  78. :index="indexMethod"
  79. ></el-table-column>
  80. <el-table-column
  81. prop="semesterName"
  82. label="学期"
  83. min-width="160"
  84. ></el-table-column>
  85. <el-table-column
  86. prop="examName"
  87. label="考试"
  88. min-width="160"
  89. ></el-table-column>
  90. <el-table-column
  91. prop="courseName"
  92. label="课程(代码)"
  93. min-width="200"
  94. >
  95. <span slot-scope="scope"
  96. >{{ scope.row.courseName }}({{ scope.row.courseCode }})</span
  97. >
  98. </el-table-column>
  99. <el-table-column
  100. prop="paperNumber"
  101. label="试卷编号"
  102. min-width="160"
  103. ></el-table-column>
  104. <el-table-column prop="userName" label="命题老师" min-width="100">
  105. </el-table-column>
  106. <el-table-column
  107. prop="exposedPaperType"
  108. label="已曝光类型"
  109. width="100"
  110. >
  111. <span slot-scope="scope">{{
  112. scope.row.exposedPaperType | defaultFieldFilter
  113. }}</span>
  114. </el-table-column>
  115. <el-table-column
  116. prop="unexposedPaperType"
  117. label="未曝光类型"
  118. width="100"
  119. >
  120. <span slot-scope="scope">{{
  121. scope.row.unexposedPaperType | defaultFieldFilter
  122. }}</span>
  123. </el-table-column>
  124. <el-table-column prop="relatePaperType" label="关联卷型" width="100">
  125. <span slot-scope="scope">{{
  126. scope.row.relatePaperType | defaultFieldFilter
  127. }}</span>
  128. </el-table-column>
  129. <el-table-column prop="totalSubjects" label="科次" width="80">
  130. </el-table-column>
  131. <el-table-column
  132. class-name="action-column"
  133. label="操作"
  134. width="100"
  135. fixed="right"
  136. >
  137. <template slot-scope="scope">
  138. <el-button
  139. class="btn-primary"
  140. type="text"
  141. @click="toEdit(scope.row)"
  142. >关联试卷</el-button
  143. >
  144. </template>
  145. </el-table-column>
  146. </el-table>
  147. </div>
  148. <div class="tips-info">
  149. <p>说明:批量关联操作,只能关联所有命题任务共有的卷型</p>
  150. </div>
  151. </el-dialog>
  152. <!-- ModifyPlanPaper -->
  153. <modify-plan-paper
  154. :instance="curRow"
  155. @modified="getList"
  156. ref="ModifyPlanPaper"
  157. ></modify-plan-paper>
  158. <!-- PrintPlanBatchLinkPaper -->
  159. <print-plan-batch-link-paper
  160. ref="PrintPlanBatchLinkPaper"
  161. :filter-data="filterData"
  162. @modified="getList"
  163. ></print-plan-batch-link-paper>
  164. </div>
  165. </template>
  166. <script>
  167. import { planLinkPaperListPage, planLinkPaperTotal } from "../api";
  168. import ModifyPlanPaper from "./ModifyPlanPaper";
  169. import PrintPlanBatchLinkPaper from "./PrintPlanBatchLinkPaper.vue";
  170. export default {
  171. name: "print-plan-detail",
  172. components: { ModifyPlanPaper, PrintPlanBatchLinkPaper },
  173. props: {
  174. plan: {
  175. type: Object,
  176. default() {
  177. return {};
  178. },
  179. },
  180. },
  181. computed: {
  182. title() {
  183. return `印刷计划详情-${this.plan.name}`;
  184. },
  185. },
  186. data() {
  187. return {
  188. modalIsShow: false,
  189. filter: {
  190. semesterId: "",
  191. examId: "",
  192. printPlanIdList: [],
  193. courseCode: "",
  194. paperNumber: "",
  195. userName: "",
  196. },
  197. filterData: {},
  198. dataList: [],
  199. curRow: {},
  200. totalInfo: {},
  201. };
  202. },
  203. methods: {
  204. visibleChange() {
  205. this.filter = {
  206. semesterId: this.plan.semesterId,
  207. examId: this.plan.examId,
  208. printPlanIdList: [this.plan.id],
  209. courseCode: "",
  210. paperNumber: "",
  211. userName: "",
  212. };
  213. this.dataList = [];
  214. this.totalInfo = {};
  215. this.search();
  216. },
  217. cancel() {
  218. this.modalIsShow = false;
  219. },
  220. open() {
  221. this.modalIsShow = true;
  222. },
  223. async getTotal() {
  224. const data = await planLinkPaperTotal(this.filter);
  225. this.totalInfo = data || {};
  226. },
  227. async getList() {
  228. const datas = {
  229. ...this.filter,
  230. };
  231. const data = await planLinkPaperListPage(datas);
  232. this.dataList = data;
  233. this.filterData = { ...this.filter };
  234. },
  235. toPage(page) {
  236. this.current = page;
  237. this.getList();
  238. },
  239. search() {
  240. this.toPage(1);
  241. this.getTotal();
  242. },
  243. toEdit(row) {
  244. this.curRow = row;
  245. this.$refs.ModifyPlanPaper.open();
  246. },
  247. toBatchLink() {
  248. this.$refs.PrintPlanBatchLinkPaper.open();
  249. },
  250. },
  251. };
  252. </script>