basic-in.component.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. <div class="entry">
  2. <form
  3. nz-form
  4. [formGroup]="validateForm"
  5. class="login-form"
  6. (ngSubmit)="submitForm()"
  7. >
  8. <nz-form-item style="margin-bottom: 16px">
  9. <nz-form-label
  10. [nzSm]="8"
  11. [nzNoColon]="true"
  12. [nzXs]="8"
  13. nzRequired
  14. nzFor="user"
  15. >申报教材名称</nz-form-label
  16. >
  17. <nz-form-control nzErrorTip="请输入申报教材名称" [nzSm]="12" [nzXs]="12">
  18. <nz-input-group>
  19. <input
  20. type="text"
  21. nz-input
  22. formControlName="title"
  23. placeholder="请输入申报教材名称"
  24. />
  25. </nz-input-group>
  26. </nz-form-control>
  27. </nz-form-item>
  28. <nz-form-item style="margin-bottom: 16px">
  29. <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
  30. >教材所属学科专业类</nz-form-label
  31. >
  32. <nz-form-control
  33. nzErrorTip="输入教材所属学科专业类"
  34. [nzSm]="12"
  35. [nzXs]="12"
  36. >
  37. <nz-input-group>
  38. <nz-select
  39. nzShowSearch
  40. nzAllowClear
  41. nzPlaceHolder="填写 4 位专业代码选择"
  42. formControlName="discipline"
  43. (ngModelChange)="changeCode()"
  44. (nzOnSearch)="getCode($event)"
  45. >
  46. @for(major of selectList02; track major.code;let index = $index){
  47. <nz-option
  48. nzCustomContent
  49. [nzValue]="major.code"
  50. [nzLabel]="major?.code + ' ' + major?.name"
  51. >
  52. <div>{{ major.name }}</div>
  53. <div style="font-size: 12px; color: gray">{{ major.code }}</div>
  54. </nz-option>
  55. }
  56. </nz-select>
  57. </nz-input-group>
  58. </nz-form-control>
  59. </nz-form-item>
  60. <nz-form-item style="margin-bottom: 16px">
  61. <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>
  62. 教材应用对象及所属学科专业类
  63. <span
  64. nz-popover
  65. nzPopoverPlacement="top"
  66. nzPopoverContent="如为面向所有学生的通识类教材,选0000"
  67. class="exclamation-circle"
  68. nz-icon
  69. nzType="exclamation-circle"
  70. nzTheme="outline"
  71. ></span>
  72. </nz-form-label>
  73. <nz-form-control
  74. nzErrorTip="输入所属本科专业类代码(四位)搜索所属学科"
  75. [nzSm]="12"
  76. [nzXs]="12"
  77. >
  78. <nz-input-group>
  79. <nz-select
  80. nzShowSearch
  81. nzAllowClear
  82. nzPlaceHolder="填写 4 位专业代码选择"
  83. formControlName="majorPoniter"
  84. (ngModelChange)="changeCode()"
  85. (nzOnSearch)="getCode($event)"
  86. >
  87. @for(major of selectList; track major.code;let index = $index){
  88. <nz-option
  89. nzCustomContent
  90. [nzValue]="major.code"
  91. [nzLabel]="major?.code + ' ' + major?.name"
  92. >
  93. <div>{{ major.name }}</div>
  94. <div style="font-size: 12px; color: gray">{{ major.code }}</div>
  95. </nz-option>
  96. }
  97. </nz-select>
  98. <!-- <nz-select [nzOptionOverflowSize]="nzOptionOverflowSize" nzShowSearch nzAllowClear nzPlaceHolder="输入所属本科专业类代码(四位)搜索所属学科" formControlName="majorPoniter">
  99. @for(major of selectList; track major.code;let index = $index){
  100. <nz-option nzCustomContent [nzValue]="major.code +'/'+ major.name" [nzLabel]="major.name+'-'+major.code">
  101. <div>{{ major.name }}</div>
  102. <div style="font-size: 12px;color: gray;">{{ major.code }}</div>
  103. </nz-option>
  104. }
  105. </nz-select> -->
  106. </nz-input-group>
  107. </nz-form-control>
  108. </nz-form-item>
  109. <nz-form-item style="margin-bottom: 16px">
  110. <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
  111. >是否重点立项教材</nz-form-label
  112. >
  113. <nz-form-control nzErrorTip="请输入完成项" [nzSm]="12" [nzXs]="12">
  114. <nz-input-group>
  115. <nz-select
  116. nzShowSearch
  117. nzAllowClear
  118. nzPlaceHolder="请输入是否重点立项教材"
  119. formControlName="approval"
  120. >
  121. @for (item of options; track item.code) {
  122. <nz-option
  123. nzCustomContent
  124. [nzValue]="item.name"
  125. [nzLabel]="item.name"
  126. >{{ item.name }}</nz-option
  127. >
  128. }
  129. <!-- <nz-option nzCustomContent [nzValue]="'基础学科“101计划”核心教材'" [nzLabel]="'基础学科“101计划”核心教材'">基础学科“101计划”核心教材</nz-option>
  130. <nz-option nzCustomContent [nzValue]="'战略性新兴领域教材'" [nzLabel]="'战略性新兴领域教材'">战略性新兴领域教材</nz-option>
  131. <nz-option nzCustomContent [nzValue]="'“四新”重点建设教材'" [nzLabel]="'“四新”重点建设教材'">“四新”重点建设教材</nz-option>
  132. <nz-option nzCustomContent [nzValue]="'否'" [nzLabel]="'否'">否</nz-option> -->
  133. </nz-select>
  134. </nz-input-group>
  135. </nz-form-control>
  136. </nz-form-item>
  137. @if (validateForm.value.approval && validateForm.value.approval != '否') {
  138. <nz-form-item style="margin-bottom: 16px">
  139. <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
  140. >教材获批截图</nz-form-label
  141. >
  142. <nz-form-control nzErrorTip="请上传教材获批截图" [nzSm]="12" [nzXs]="12">
  143. <!-- @if (validateForm.value.approvedImgUrl) {
  144. <a
  145. style="color: #3e49b3; font-size: 14px"
  146. (click)="openFile(validateForm.value.approvedImgUrl)"
  147. >
  148. <span nz-icon nzType="file" nzTheme="outline"></span>
  149. 教材获批截图
  150. </a>
  151. } -->
  152. <nz-input-group>
  153. <app-comp-upload
  154. [files]="
  155. validateForm.value.approvedImgUrl
  156. ? [
  157. {
  158. url: validateForm.value.approvedImgUrl,
  159. name: '教材获批截图'
  160. }
  161. ]
  162. : []
  163. "
  164. [type]="'pdf'"
  165. (change)="upload($event, 'approvedImgUrl')"
  166. title="上传教材获批截图"
  167. ></app-comp-upload>
  168. </nz-input-group>
  169. <p style="color: gray">支持上传 PDF 格式,文件大小不超过 2M</p>
  170. </nz-form-control>
  171. </nz-form-item>
  172. }
  173. <nz-form-item style="margin-bottom: 16px">
  174. <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>
  175. 申报类型
  176. <span
  177. nz-popover
  178. nzPopoverPlacement="top"
  179. [nzPopoverContent]="typeTemplate"
  180. class="exclamation-circle"
  181. nz-icon
  182. nzType="exclamation-circle"
  183. nzTheme="outline"
  184. ></span>
  185. </nz-form-label>
  186. <ng-template #typeTemplate>
  187. <div class="template">
  188. 本次评选不受理系列教材申报。如《某教材—理论篇》《某教材—实践篇》或《某某教材—听说》《某某教材—读写》均属于系列教材。系列教材建议申报其中最优的一册。全册教材指相同书名的上下册、1—n
  189. 册,如《某教材(上)》《某教材(下)》或《某某教材(第 1
  190. 册)》《某某教材(第 2 册)》《某某教材(第 3
  191. 册)》。全册教材可按“单本”申报,也可按“全册”申报,
  192. 如按“全册”申报只占用一个名额。
  193. </div>
  194. </ng-template>
  195. <nz-form-control nzErrorTip="请输入申报类型" [nzSm]="12" [nzXs]="12">
  196. <nz-input-group>
  197. <!-- <input
  198. type="text"
  199. nz-input
  200. formControlName="type"
  201. placeholder="请输入申报类型"
  202. /> -->
  203. <nz-radio-group
  204. style="display: flex; flex-direction: column"
  205. formControlName="type"
  206. >
  207. <label (click)="checkSingle()" nz-radio nzValue="单本">单本</label>
  208. <div class="basic-row">
  209. <label (click)="checkAll()" nz-radio nzValue="全册">全册</label>
  210. <!-- @if (validateForm.value.type =='全册') {
  211. <nz-input-group
  212. style="flex: 1; margin-left: 20px"
  213. [nzSuffix]="suffixTemplateInfo"
  214. >
  215. <input
  216. min="2"
  217. type="number"
  218. [ngModelOptions]="{ standalone: true }"
  219. [(ngModel)]="typeNumber"
  220. (ngModelChange)="typeNumberChange()"
  221. nz-input
  222. placeholder="输入册数"
  223. />
  224. </nz-input-group>
  225. <ng-template #suffixTemplateInfo> 册 </ng-template>
  226. } -->
  227. </div>
  228. </nz-radio-group>
  229. </nz-input-group>
  230. </nz-form-control>
  231. </nz-form-item>
  232. @if(!loading){
  233. <!-- @if(validateForm.value.type=='全册'){
  234. <mat-accordion class="example-headers-align" multi>
  235. @for (item of eduTextbookVolumeList; track $index) {
  236. <mat-expansion-panel>
  237. <mat-expansion-panel-header>
  238. <mat-panel-title>
  239. <b>分册{{ $index + 1 }}</b>
  240. <span
  241. (click)="deleteVolume($index)"
  242. style="margin-left: 20px"
  243. nz-icon
  244. nzType="delete"
  245. ></span>
  246. </mat-panel-title>
  247. </mat-expansion-panel-header>
  248. <app-one
  249. #children
  250. [eduTextbookId]="eduTextbookId"
  251. [eduTextbookVolumeId]="item?.id"
  252. ></app-one>
  253. </mat-expansion-panel>
  254. }
  255. </mat-accordion>
  256. } @else {
  257. @if (singleId) {
  258. <app-one
  259. #children
  260. [eduTextbookId]="eduTextbookId"
  261. [eduTextbookVolumeId]="singleId"
  262. ></app-one>
  263. }
  264. @if(!singleId){
  265. <app-one
  266. #children
  267. [eduTextbookId]="eduTextbookId"
  268. eduTextbookVolumeId=""
  269. ></app-one>
  270. }
  271. } } -->
  272. @if (validateForm.value.type =='全册') {
  273. <nz-collapse [nzBordered]="false">
  274. @for (panel of eduTextbookVolumeList; track panel) {
  275. <nz-collapse-panel
  276. #p
  277. [nzHeader]="title"
  278. [nzActive]="false"
  279. nzExpandedIcon="caret-right"
  280. [nzExtra]="extraTpl"
  281. style="
  282. background: #f7f7f7;
  283. border-radius: 4px;
  284. margin-bottom: 24px;
  285. border: 0px;
  286. "
  287. >
  288. <ng-template #title>
  289. <span class="panel-title">{{ "分册" + ($index + 1) }}</span>
  290. </ng-template>
  291. <ng-template #extraTpl>
  292. <span
  293. nz-icon
  294. nzType="delete"
  295. (click)="deleteVolume($index, children)"
  296. ></span>
  297. </ng-template>
  298. <div class="">
  299. <app-one
  300. #children
  301. [eduTextbookId]="eduTextbookId"
  302. [eduTextbookVolumeId]="panel?.id"
  303. ></app-one>
  304. </div>
  305. <ng-template #expandedIcon let-active>
  306. {{ active }}
  307. <span
  308. nz-icon
  309. nzType="caret-right"
  310. class="ant-collapse-arrow"
  311. [nzRotate]="p.nzActive ? 90 : -90"
  312. ></span>
  313. </ng-template>
  314. </nz-collapse-panel>
  315. }
  316. </nz-collapse>
  317. }@else { @if (singleId) {
  318. <app-one
  319. #children
  320. [eduTextbookId]="eduTextbookId"
  321. [eduTextbookVolumeId]="singleId"
  322. ></app-one>
  323. } @if(!singleId){
  324. <app-one
  325. #children
  326. [eduTextbookId]="eduTextbookId"
  327. eduTextbookVolumeId=""
  328. ></app-one>
  329. } } } @if (validateForm.value.type == '全册' &&
  330. this.eduTextbookVolumeList.length < 12 ) {
  331. <div class="add-bar" (click)="addVolume()">新增分页</div>
  332. }
  333. </form>
  334. </div>
  335. <div class="footer">
  336. <button
  337. nz-button
  338. nzType="default"
  339. style="margin-right: 20px"
  340. (click)="submitForm('save')"
  341. >
  342. 保存本页
  343. </button>
  344. <button
  345. nz-button
  346. nzType="primary"
  347. style="background: #3e49b3; border: 1px #3e49b3"
  348. (click)="submitForm('next')"
  349. >
  350. 下一页
  351. </button>
  352. </div>
  353. <div class="loading" [hidden]="!saveLoading">
  354. <nz-spin nzSimple [nzSize]="'large'"></nz-spin>
  355. </div>