AuditCourseOutlineDialog.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. <template>
  2. <el-dialog
  3. class="page-dialog"
  4. :visible.sync="modalIsShow"
  5. :title="title"
  6. fullscreen
  7. append-to-body
  8. :close-on-click-modal="false"
  9. :close-on-press-escape="false"
  10. @open="visibleChange"
  11. @close="dialogClose"
  12. >
  13. <div class="part-page">
  14. <h1>{{ reportTitle }}</h1>
  15. <!-- 课程基本信息 -->
  16. <div v-if="courseBasicInfo" class="page-part">
  17. <h3>课程基本信息</h3>
  18. <el-form label-width="100px">
  19. <el-row>
  20. <el-col :span="12">
  21. <el-form-item prop="courseCode" label="课程编码:">
  22. <el-input
  23. v-model.trim="courseBasicInfo.courseCode"
  24. placeholder="请输入课程编码"
  25. clearable
  26. ></el-input>
  27. </el-form-item>
  28. </el-col>
  29. <el-col :span="12">
  30. <el-form-item prop="courseName" label="课程名称:">
  31. <el-input
  32. v-model.trim="courseBasicInfo.courseName"
  33. placeholder="请输入课程名称"
  34. clearable
  35. ></el-input>
  36. </el-form-item>
  37. </el-col>
  38. </el-row>
  39. <el-row>
  40. <el-col :span="12">
  41. <el-form-item prop="semester" label="授课学期:">
  42. <el-input
  43. v-model.trim="courseBasicInfo.semester"
  44. placeholder="请输入授课学期"
  45. clearable
  46. ></el-input>
  47. </el-form-item>
  48. </el-col>
  49. <el-col :span="12">
  50. <el-form-item prop="professional" label="适用专业:">
  51. <el-input
  52. v-model.trim="courseBasicInfo.professional"
  53. placeholder="请输入适用专业"
  54. clearable
  55. ></el-input>
  56. </el-form-item>
  57. </el-col>
  58. </el-row>
  59. <el-row>
  60. <el-col :span="12">
  61. <el-form-item prop="period" label="学时:">
  62. <el-input-number
  63. v-model="courseBasicInfo.period"
  64. placeholder="请输入学时"
  65. :min="0"
  66. :max="999"
  67. :controls="false"
  68. ></el-input-number>
  69. </el-form-item>
  70. </el-col>
  71. <el-col :span="12">
  72. <el-form-item prop="credit" label="学分:">
  73. <el-input-number
  74. v-model="courseBasicInfo.credit"
  75. placeholder="请录入学分"
  76. size="small"
  77. :min="0"
  78. :max="999"
  79. :controls="false"
  80. ></el-input-number>
  81. </el-form-item>
  82. </el-col>
  83. </el-row>
  84. <el-row>
  85. <el-col :span="12">
  86. <el-form-item prop="clazz" label="授课班级:">
  87. <el-input
  88. v-model.trim="courseBasicInfo.clazz"
  89. placeholder="请输入授课班级"
  90. clearable
  91. ></el-input>
  92. </el-form-item>
  93. </el-col>
  94. <el-col :span="12">
  95. <el-form-item prop="teacher" label="授课教师:">
  96. <el-input
  97. v-model.trim="courseBasicInfo.teacher"
  98. placeholder="请输入授课教师"
  99. clearable
  100. ></el-input>
  101. </el-form-item>
  102. </el-col>
  103. </el-row>
  104. </el-form>
  105. </div>
  106. <!-- 课程目标情况 -->
  107. <div v-if="courseTargetInfo" class="page-part">
  108. <h3>课程目标情况</h3>
  109. <table class="table">
  110. <tr>
  111. <th rowspan="2"></th>
  112. <th colspan="3">过程性评价</th>
  113. <th colspan="3">终结性评价</th>
  114. </tr>
  115. <tr>
  116. <th>形式与内容</th>
  117. <th>观测点</th>
  118. <th>分值</th>
  119. <th>形式与内容</th>
  120. <th>观测点</th>
  121. <th>分值</th>
  122. </tr>
  123. <template v-for="(item, index) in courseEvaluateList">
  124. <tr
  125. v-for="(evaluate, eindex) in item.procedureEvaluateList"
  126. :key="`${index}-${eindex}`"
  127. >
  128. <td
  129. v-if="eindex === 0"
  130. :rowspan="item.procedureEvaluateList.length"
  131. >
  132. {{ item.name }}
  133. </td>
  134. <td>{{ evaluate.content }}</td>
  135. <td>{{ evaluate.point }}</td>
  136. <td>{{ evaluate.score }}</td>
  137. <template v-if="eindex === 0">
  138. <td :rowspan="item.procedureEvaluateList.length">
  139. {{ item.finalityEvaluateList[0]?.content }}
  140. </td>
  141. <td :rowspan="item.procedureEvaluateList.length">
  142. {{ item.finalityEvaluateList[0]?.point }}
  143. </td>
  144. <td :rowspan="item.procedureEvaluateList.length">
  145. {{ item.finalityEvaluateList[0]?.score }}
  146. </td>
  147. </template>
  148. </tr>
  149. </template>
  150. <tr>
  151. <td>总目标分值</td>
  152. <td colspan="3">{{ courseTargetInfo.proceduralTotalScore }}</td>
  153. <td colspan="3">{{ courseTargetInfo.finalityTotalScore }}</td>
  154. </tr>
  155. <tr>
  156. <td colspan="7">
  157. <el-row>
  158. <el-col :span="12">
  159. <span>课程负责人:</span>
  160. <el-input
  161. v-model="courseTargetInfo.courseManager"
  162. placeholder="请输入"
  163. clearable
  164. ></el-input>
  165. </el-col>
  166. <el-col :span="12">
  167. <span>填写日期:</span>
  168. <el-date-picker
  169. v-model="courseTargetInfo.date"
  170. type="date"
  171. value-format="timestamp"
  172. >
  173. </el-date-picker>
  174. </el-col>
  175. </el-row>
  176. </td>
  177. </tr>
  178. </table>
  179. </div>
  180. <!-- 合理性评价 -->
  181. <div v-if="rationalityEvaluation" class="page-part">
  182. <h3>合理性评价 <span class="tips">(请在对应结论处打√)</span></h3>
  183. <table class="table">
  184. <tr>
  185. <th></th>
  186. <th>评价内容</th>
  187. <th>合理</th>
  188. <th>较合理</th>
  189. <th>不合理</th>
  190. </tr>
  191. <tr
  192. v-for="(
  193. item, index
  194. ) in rationalityEvaluation.rationalityEvaluationDetailList"
  195. :key="index"
  196. >
  197. <td>{{ item.index || "" }}</td>
  198. <td>{{ item.content }}</td>
  199. <td>
  200. <el-checkbox
  201. v-model="item.reasonable"
  202. @change="() => evaluationChange(item, 'reasonable')"
  203. ></el-checkbox>
  204. </td>
  205. <td>
  206. <el-checkbox
  207. v-model="item.middle"
  208. @change="() => evaluationChange(item, 'reasonable')"
  209. ></el-checkbox>
  210. </td>
  211. <td>
  212. <el-checkbox
  213. v-model="item.unreasonable"
  214. @change="() => evaluationChange(item, 'reasonable')"
  215. ></el-checkbox>
  216. </td>
  217. </tr>
  218. <tr>
  219. <td colspan="5">存在的问题及建议:</td>
  220. </tr>
  221. <tr>
  222. <td colspan="5"></td>
  223. </tr>
  224. <tr>
  225. <td colspan="5">
  226. <el-row>
  227. <el-col :span="12">
  228. <span>课程负责人:</span>
  229. <el-input
  230. v-model="courseTargetInfo.courseManager"
  231. placeholder="请输入"
  232. clearable
  233. ></el-input>
  234. </el-col>
  235. <el-col :span="12">
  236. <span>填写日期:</span>
  237. <el-date-picker
  238. v-model="courseTargetInfo.date"
  239. type="date"
  240. value-format="timestamp"
  241. >
  242. </el-date-picker>
  243. </el-col>
  244. </el-row>
  245. </td>
  246. </tr>
  247. <tr>
  248. <td colspan="5">
  249. <el-row>
  250. <el-col :span="12">
  251. <span>课程负责人:</span>
  252. <el-input
  253. v-model="courseTargetInfo.courseManager"
  254. placeholder="请输入"
  255. clearable
  256. ></el-input>
  257. </el-col>
  258. <el-col :span="12">
  259. <span>填写日期:</span>
  260. <el-date-picker
  261. v-model="courseTargetInfo.date"
  262. type="date"
  263. value-format="timestamp"
  264. >
  265. </el-date-picker>
  266. </el-col>
  267. </el-row>
  268. </td>
  269. </tr>
  270. </table>
  271. </div>
  272. </div>
  273. <div slot="footer"></div>
  274. </el-dialog>
  275. </template>
  276. <script>
  277. import {
  278. courseOutlineAuditReport,
  279. courseOutlineAuditRationalityReport,
  280. // courseOutlineAuditSave,
  281. } from "../../api";
  282. export default {
  283. name: "audit-course-outline-dialog",
  284. props: {
  285. rowData: {
  286. type: Object,
  287. default() {
  288. return {};
  289. },
  290. },
  291. },
  292. data() {
  293. return {
  294. modalIsShow: false,
  295. loading: false,
  296. courseBasicInfo: null,
  297. courseTargetInfo: null,
  298. rationalityEvaluation: null,
  299. audit: this.checkPrivilege("link", "audit"),
  300. auditRationality: this.checkPrivilege("link", "auditRationality"),
  301. };
  302. },
  303. computed: {
  304. reportTitle() {
  305. return this.auditRationality
  306. ? "课程目标达成情况评价依据合理性审核表"
  307. : "课程目标达成情况评价依据审核表";
  308. },
  309. title() {
  310. return `${this.rowData.outlineName} ${this.reportTitle}`;
  311. },
  312. },
  313. methods: {
  314. visibleChange() {
  315. this.initData();
  316. },
  317. async initData() {
  318. const func = this.auditRationality
  319. ? courseOutlineAuditRationalityReport
  320. : courseOutlineAuditReport;
  321. const res = await func(this.rowData.id);
  322. const { courseBasicInfo, courseTargetInfo, rationalityEvaluation } =
  323. res || {};
  324. this.courseBasicInfo = courseBasicInfo;
  325. this.courseTargetInfo = courseTargetInfo;
  326. this.rationalityEvaluation = rationalityEvaluation;
  327. },
  328. evaluationChange(evaluate, type) {
  329. if (!evaluate[type]) return;
  330. const keys = ["reasonable", "middle", "unreasonable"];
  331. keys
  332. .filter((k) => k !== type)
  333. .forEach((k) => {
  334. evaluate[k] = false;
  335. });
  336. },
  337. cancel() {
  338. this.modalIsShow = false;
  339. },
  340. open() {
  341. this.modalIsShow = true;
  342. },
  343. dialogClose() {
  344. this.courseBasicInfo = null;
  345. this.courseTargetInfo = null;
  346. this.rationalityEvaluation = null;
  347. },
  348. },
  349. };
  350. </script>