textbook-pertain.component.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429
  1. <div class="entry">
  2. <form
  3. nz-form
  4. [formGroup]="validateForm"
  5. class="login-form"
  6. (ngSubmit)="submitForm()"
  7. >
  8. <div class="first-head">
  9. <div nz-row>
  10. <div nz-col nzSpan="12">
  11. <nz-form-item class="row" style="margin-bottom: 16px">
  12. <nz-form-label
  13. class="label"
  14. [nzNoColon]="true"
  15. [nzSm]="16"
  16. [nzXs]="16"
  17. nzRequired
  18. >适用专业代码(六位)及名称</nz-form-label
  19. >
  20. <nz-form-control
  21. class="val"
  22. nzErrorTip="适用专业代码(六位)及名称"
  23. style="width: 100%"
  24. >
  25. <nz-select
  26. style="width: 80%"
  27. nzShowSearch
  28. nzAllowClear
  29. nzPlaceHolder="填写 6 位专业代码选择"
  30. formControlName="major"
  31. (ngModelChange)="changeCode()"
  32. (nzOnSearch)="getCode($event)"
  33. >
  34. @for(major of selectList; track major?.code;let index = $index){
  35. <nz-option
  36. nzCustomContent
  37. [nzValue]="major?.code"
  38. [nzLabel]="major?.name + '-' + major?.code"
  39. >
  40. <div>{{ major?.name }}</div>
  41. <div style="font-size: 12px; color: gray">
  42. {{ major?.code }}
  43. </div>
  44. </nz-option>
  45. }
  46. </nz-select>
  47. </nz-form-control>
  48. </nz-form-item>
  49. <nz-form-item class="row" style="margin-bottom: 16px">
  50. <nz-form-label
  51. class="label"
  52. [nzNoColon]="true"
  53. [nzSm]="8"
  54. [nzXs]="8"
  55. nzRequired
  56. >课程学时</nz-form-label
  57. >
  58. <nz-form-control
  59. class="val"
  60. nzErrorTip="请填写课程学时"
  61. style="width: 100%"
  62. >
  63. <nz-input-group
  64. style="width: 80%"
  65. [nzSuffix]="suffixTemplateInfo"
  66. >
  67. <input
  68. type="number"
  69. formControlName="period"
  70. nz-input
  71. placeholder="填写学时数"
  72. />
  73. </nz-input-group>
  74. <ng-template #suffixTemplateInfo> 学时 </ng-template>
  75. </nz-form-control>
  76. </nz-form-item>
  77. </div>
  78. <div nz-col nzSpan="12">
  79. <nz-form-item class="row" style="margin-bottom: 16px">
  80. <nz-form-label
  81. class="label"
  82. [nzNoColon]="true"
  83. [nzSm]="6"
  84. [nzXs]="6"
  85. nzRequired
  86. >适用课程</nz-form-label
  87. >
  88. <nz-form-control
  89. class="val"
  90. nzErrorTip="请填写适用课程"
  91. style="width: 100%"
  92. >
  93. <input
  94. type="text"
  95. formControlName="lessons"
  96. nz-input
  97. placeholder="填写适用课程名称,多门课程名称使用“;”分隔"
  98. />
  99. </nz-form-control>
  100. </nz-form-item>
  101. <nz-form-item class="row" style="margin-bottom: 16px">
  102. <nz-form-label
  103. class="label"
  104. [nzNoColon]="true"
  105. [nzSm]="6"
  106. [nzXs]="6"
  107. nzRequired
  108. >适用课程性质</nz-form-label
  109. >
  110. <nz-form-control
  111. class="val"
  112. nzErrorTip="请选择适用课程性质"
  113. style="width: 100%"
  114. >
  115. <nz-checkbox-wrapper class="check">
  116. <div nz-row>
  117. @for (checkItem of checkOptionsOne; track $index) {
  118. <label
  119. [ngModelOptions]="{ standalone: true }"
  120. nz-checkbox
  121. [nzValue]="checkItem.value"
  122. [(ngModel)]="checkItem.checked"
  123. >{{ checkItem.value }}</label
  124. >
  125. }
  126. </div>
  127. </nz-checkbox-wrapper>
  128. <nz-radio-group
  129. class="check"
  130. [ngModelOptions]="{ standalone: true }"
  131. [(ngModel)]="checkTwo"
  132. (ngModelChange)="changeRadio()"
  133. >
  134. @for (checkItem of checkOptionsTwo; track $index) {
  135. <label nz-radio [nzValue]="checkItem.value">{{
  136. checkItem.label
  137. }}</label>
  138. }
  139. </nz-radio-group>
  140. <nz-checkbox-wrapper class="check">
  141. <div nz-row>
  142. @for (checkItem of checkOptionsThree; track $index) {
  143. <label
  144. [ngModelOptions]="{ standalone: true }"
  145. nz-checkbox
  146. [nzValue]="checkItem.value"
  147. [(ngModel)]="checkItem.checked"
  148. >{{ checkItem.value }}</label
  149. >
  150. } (如不涉及,此行可不选)
  151. </div>
  152. </nz-checkbox-wrapper>
  153. </nz-form-control>
  154. </nz-form-item>
  155. <!-- <nz-form-item class="row" style="margin-bottom: 16px">
  156. <nz-form-label class="label" [nzNoColon]="true" [nzSm]="6" [nzXs]="6" nzRequired>适用课程性质</nz-form-label>
  157. <nz-form-control class="val" nzErrorTip="请选择适用课程性质" style="width: 100%">
  158. <nz-checkbox-group [(ngModel)]="checkOptionsOne" formControlName="characteristic"></nz-checkbox-group>
  159. <nz-checkbox-group [(ngModel)]="checkOptionsOne" formControlName="characteristic"></nz-checkbox-group>
  160. </nz-form-control>
  161. </nz-form-item> -->
  162. </div>
  163. </div>
  164. </div>
  165. <!-- <div class="author-content">
  166. <div class="nav">作者信息</div>
  167. <nz-form-label class="title" [nzNoColon]="true" [nzSm]="24" [nzXs]="24" nzRequired>
  168. <span style="font-size: 16px">
  169. 作者(含主编,不超过 6 人,教材中明确出现姓名)
  170. </span>
  171. </nz-form-label>
  172. <nz-table #basicTable [nzData]="authorList" [nzScroll]="{ x: (maxWidth || '1200') + 'px' }">
  173. <thead>
  174. <tr>
  175. <th nzWidth="80px" nzLeft nzAlign="right">序号</th>
  176. <th nzWidth="160px" nzLeft>姓名</th>
  177. <th nzWidth="160px">单位</th>
  178. <th nzWidth="160px">出生年月</th>
  179. <th nzWidth="160px">国籍</th>
  180. <th nzWidth="160px">职务</th>
  181. <th nzWidth="160px">职称</th>
  182. <th nzWidth="300px">手机号码</th>
  183. <th nzWidth="160px">电子邮箱</th>
  184. <th nzWidth="160px">分工</th>
  185. <th nzWidth="100px" nzRight>操作</th>
  186. </tr>
  187. </thead>
  188. <tbody>
  189. @for (data of authorList; track data.mobile;let index = $index) {
  190. <tr>
  191. <td nzLeft nzAlign="right">{{ index + 1 }}</td>
  192. <td nzLeft>
  193. <input nz-input placeholder="请输入作者姓名" [ngModelOptions]="{ standalone: true }" [(ngModel)]="data.name"
  194. nzStatus="" />
  195. </td>
  196. <td>
  197. <input nz-input placeholder="请输入作者单位" [ngModelOptions]="{ standalone: true }" [(ngModel)]="data.unit"
  198. nzStatus="" />
  199. </td>
  200. <td>
  201. <nz-date-picker nzMode="month" [ngModelOptions]="{ standalone: true }"
  202. [(ngModel)]="data.birth"></nz-date-picker>
  203. </td>
  204. <td>
  205. <input nz-input placeholder="请输入作者国籍" [ngModelOptions]="{ standalone: true }"
  206. [(ngModel)]="data.nationality" nzStatus="" />
  207. </td>
  208. <td>
  209. <input nz-input placeholder="请输入作者职务" [ngModelOptions]="{ standalone: true }" [(ngModel)]="data.job"
  210. nzStatus="" />
  211. </td>
  212. <td>
  213. <input nz-input placeholder="请输入作者职称" [ngModelOptions]="{ standalone: true }" [(ngModel)]="data.title"
  214. nzStatus="" />
  215. </td>
  216. <td>
  217. <nz-input-group nzCompact>
  218. <nz-select style="width: 90px;" [ngModelOptions]="{ standalone: true }" [ngModel]="'+86'">
  219. <nz-option [nzLabel]="'+0000'" [nzValue]="'+0000'"></nz-option>
  220. <nz-option [nzLabel]="'+86'" [nzValue]="'+86'"></nz-option>
  221. </nz-select>
  222. <input type="number" nz-input placeholder="请输入作者手机号码" [ngModelOptions]="{ standalone: true }"
  223. [(ngModel)]="data.mobile" nzStatus="" style="width: 160px;"/>
  224. </nz-input-group>
  225. </td>
  226. <td>
  227. <input nz-input placeholder="请输入作者邮箱" [ngModelOptions]="{ standalone: true }" [(ngModel)]="data.email"
  228. nzStatus="" />
  229. </td>
  230. <td>
  231. <nz-select style="width: 80%" nzShowSearch nzAllowClear nzPlaceHolder="请选择分工"
  232. [ngModelOptions]="{ standalone: true }" [(ngModel)]="data.work">
  233. @for(work of workOptions; track work){
  234. <nz-option nzCustomContent [nzValue]="work" [nzLabel]="work">{{
  235. work
  236. }}</nz-option>
  237. }
  238. </nz-select>
  239. </td>
  240. <td nzRight>
  241. <a (click)="onPush('authorList', index)"><span nz-icon style="font-size: 20px; margin-right: 10px"
  242. nzType="plus-circle" nzTheme="outline"></span></a>
  243. <a (click)="onDel('authorList', index)"><span nz-icon style="font-size: 20px" nzType="delete"
  244. nzTheme="outline"></span></a>
  245. </td>
  246. </tr>
  247. }
  248. </tbody>
  249. </nz-table>
  250. </div>
  251. <div class="author-content">
  252. <div class="nav">第一主编(作者)情况</div>
  253. <nz-form-item class="row" style="margin-bottom: 16px">
  254. <nz-form-label class="title" [nzNoColon]="true" [nzSm]="24" [nzXs]="24" nzRequired>
  255. <span style="font-size: 16px"> 相关教学经历 </span>
  256. </nz-form-label>
  257. <nz-form-control class="val" nzErrorTip="请输入第一主编(作者)承担学校教学任务、开展教学研究情况、教材编写情况以及取得的教学成果" style="width: 100%">
  258. <nz-textarea-count [nzMaxCharacterCount]="500">
  259. <textarea rows="4" maxlength="500" formControlName="authorDetails" placeholder="请输入第一主编(作者)承担学校教学任务、开展教学研究情况、教材编写情况以及取得的教学成果"
  260. nz-input></textarea>
  261. </nz-textarea-count>
  262. </nz-form-control>
  263. </nz-form-item>
  264. </div>
  265. <div class="author-content">
  266. <nz-form-label class="title" [nzNoColon]="true" [nzSm]="24" [nzXs]="24" nzRequired>
  267. <span style="font-size: 16px">
  268. 相关科学研究项目、成果或论文专著(限5项)
  269. </span>
  270. </nz-form-label>
  271. <nz-table #basicTable [nzData]="achievementOptions" [nzScroll]="{ x: (maxWidth || '1200') + 'px' }">
  272. <thead>
  273. <tr>
  274. <th nzWidth="80px" nzLeft nzAlign="right">序号</th>
  275. <th nzWidth="220px" nzLeft>名称</th>
  276. <th nzWidth="180px">来源/出版单位</th>
  277. <th nzWidth="120px">时间</th>
  278. <th nzWidth="80px" nzRight>操作</th>
  279. </tr>
  280. </thead>
  281. <tbody>
  282. @for (data of achievementOptions; track data.name;let index = $index)
  283. {
  284. <tr>
  285. <td nzLeft nzAlign="right">{{ index + 1 }}</td>
  286. <td nzLeft>
  287. <input nz-input placeholder="请输入项目/成果/论文名称" [ngModelOptions]="{ standalone: true }"
  288. [(ngModel)]="data.name" nzStatus="" />
  289. </td>
  290. <td>
  291. <input nz-input placeholder="请输入单位名称" [ngModelOptions]="{ standalone: true }" [(ngModel)]="data.unit"
  292. nzStatus="" />
  293. </td>
  294. <td>
  295. <nz-date-picker nzMode="month" [ngModelOptions]="{ standalone: true }"
  296. [(ngModel)]="data.date"></nz-date-picker>
  297. </td>
  298. <td nzRight>
  299. <a (click)="onPush('achievementOptions', index)"><span nz-icon style="font-size: 20px; margin-right: 10px"
  300. nzType="plus-circle" nzTheme="outline"></span></a>
  301. <a (click)="onDel('achievementOptions', index)"><span nz-icon style="font-size: 20px" nzType="delete"
  302. nzTheme="outline"></span></a>
  303. </td>
  304. </tr>
  305. }
  306. </tbody>
  307. </nz-table>
  308. </div> -->
  309. <div class="black">
  310. <div class="nav">作者信息</div>
  311. @if (eduTextbook?.get('type')=='全册') {
  312. <nz-collapse [nzBordered]="false">
  313. @for (panel of eduTextbook?.get('childrens'); track panel) {
  314. <nz-collapse-panel
  315. #p
  316. [nzHeader]="title"
  317. [nzActive]="false"
  318. nzExpandedIcon="caret-right"
  319. style="
  320. background: #f7f7f7;
  321. border-radius: 4px;
  322. margin-bottom: 24px;
  323. border: 0px;
  324. "
  325. >
  326. <ng-template #title>
  327. <span class="panel-title">{{ "分册" + ($index + 1) }}</span>
  328. </ng-template>
  329. <div class="">
  330. <app-author
  331. #children
  332. [eduTextbook]="eduTextbook?.id"
  333. [eduTextbookVolume]="panel"
  334. ></app-author>
  335. </div>
  336. <ng-template #expandedIcon let-active>
  337. {{ active }}
  338. <span
  339. nz-icon
  340. nzType="caret-right"
  341. class="ant-collapse-arrow"
  342. [nzRotate]="p.nzActive ? 90 : -90"
  343. ></span>
  344. </ng-template>
  345. </nz-collapse-panel>
  346. }
  347. </nz-collapse>
  348. } @else {
  349. <app-author
  350. #children
  351. [eduTextbookVolume]="eduTextbook?.get('childrens')[0]"
  352. ></app-author>
  353. }
  354. <!-- <mat-accordion class="example-headers-align" multi>
  355. @if(eduTextbook?.get('type')=='全册'){ @for (item of
  356. eduTextbook?.get('childrens'); track $index) {
  357. <mat-expansion-panel>
  358. <mat-expansion-panel-header>
  359. <mat-panel-title>
  360. <b>分册{{ $index + 1 }}</b>
  361. </mat-panel-title>
  362. </mat-expansion-panel-header>
  363. <app-author
  364. #children
  365. [eduTextbook]="eduTextbook?.id"
  366. [eduTextbookVolume]="item"
  367. ></app-author>
  368. </mat-expansion-panel>
  369. } } @else {
  370. <app-author
  371. #children
  372. [eduTextbookVolume]="eduTextbook?.get('childrens')[0]"
  373. ></app-author>
  374. }
  375. </mat-accordion> -->
  376. </div>
  377. </form>
  378. </div>
  379. <div
  380. style="
  381. width: 100%;
  382. display: flex;
  383. justify-content: flex-end;
  384. padding: 30px 0 0;
  385. "
  386. >
  387. <!-- <a (click)="downloadFile()">
  388. <span nz-icon nzType="download" nzTheme="outline"></span>
  389. 下载本页所有附件模板
  390. </a> -->
  391. <div class="footer">
  392. <div>
  393. <button
  394. nz-button
  395. nzType="default"
  396. style="margin-right: 20px"
  397. (click)="submitForm('save')"
  398. >
  399. 保存本页
  400. </button>
  401. <button
  402. nz-button
  403. nzType="default"
  404. style="margin-right: 20px"
  405. (click)="submitForm('pre')"
  406. >
  407. 上一页
  408. </button>
  409. <button
  410. nz-button
  411. nzType="primary"
  412. style="background: #3e49b3; border: 1px #3e49b3"
  413. (click)="submitForm('next')"
  414. >
  415. 下一页
  416. </button>
  417. </div>
  418. </div>
  419. </div>
  420. <div class="loading" [hidden]="!loading">
  421. <nz-spin nzSimple [nzSize]="'large'"></nz-spin>
  422. </div>