process-list.component.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  1. <nz-page-header>
  2. <nz-page-header-title
  3. >申报流程
  4. <br />
  5. <div class="subtitle">
  6. 统一管理各类教材推荐流程和限额,设置各个流程开始和结束时间、查看各流程工作进度
  7. </div>
  8. </nz-page-header-title>
  9. <nz-page-header-extra>
  10. <nz-space>
  11. <button
  12. style="background: #3e49b3; border: 1px #3e49b3"
  13. *nzSpaceItem
  14. nz-button
  15. nzType="primary"
  16. (click)="toUrl('/nav-admin/manage/process/create')"
  17. >
  18. 创建流程
  19. </button>
  20. </nz-space>
  21. </nz-page-header-extra>
  22. </nz-page-header>
  23. <div class="edit-content">
  24. <div class="tool">
  25. <div class="tool-left">
  26. <!-- <div class="search">
  27. <nz-input-group style="width: 210px" [nzPrefix]="prefixTemplateUser">
  28. <input
  29. type="text"
  30. nz-input
  31. placeholder="搜索"
  32. [(ngModel)]="searchValue"
  33. (ngModelChange)="onSearch($event)"
  34. />
  35. </nz-input-group>
  36. <ng-template #prefixTemplateUser
  37. ><span nz-icon nzType="search"></span
  38. ></ng-template>
  39. <button
  40. nz-button
  41. nzType="default"
  42. nz-dropdown
  43. [nzDropdownMenu]="menutep"
  44. [nzPlacement]="'bottomLeft'"
  45. style="margin-left: 10px"
  46. >
  47. <span nz-icon nzType="plus" nzTheme="outline"></span>新建
  48. </button>
  49. <nz-dropdown-menu #menutep="nzDropdownMenu">
  50. <ul nz-menu>
  51. <li nz-menu-item>
  52. <button
  53. nz-button
  54. nzType="link"
  55. (click)="showModalDepart('add')"
  56. style="color: #231c1f"
  57. >
  58. <span nz-icon nzType="plus" nzTheme="outline"></span>添加部门
  59. </button>
  60. </li>
  61. <li nz-menu-item>
  62. <button
  63. nz-button
  64. nzType="link"
  65. style="color: #231c1f"
  66. (click)="showModalOrganize()"
  67. >
  68. <span nz-icon nzType="merge" nzTheme="outline"></span>
  69. 新建组织
  70. </button>
  71. </li>
  72. </ul>
  73. </nz-dropdown-menu>
  74. </div> -->
  75. <div class="">
  76. <nz-input-group style="width: 280px" [nzPrefix]="prefixTemplateUser">
  77. <input
  78. type="text"
  79. nz-input
  80. placeholder="搜索流程名称 / 流程 code"
  81. [(ngModel)]="searchValuePro"
  82. (ngModelChange)="onSearchPro($event)"
  83. />
  84. </nz-input-group>
  85. <ng-template #prefixTemplateUser
  86. ><span nz-icon nzType="search"></span
  87. ></ng-template>
  88. </div>
  89. </div>
  90. <div class="tool-right"></div>
  91. </div>
  92. <div class="layout" #maxWidth>
  93. <div class="sider" #sider>
  94. <ul nz-menu>
  95. @for (item of nodes; track $index) {
  96. <li nz-menu-item (click)="changeDepart(item)">{{ item.title }}</li>
  97. }
  98. </ul>
  99. </div>
  100. <div class="breadcrumb">
  101. <nz-table
  102. #tableData
  103. [nzData]="eduProcessList"
  104. [nzTotal]="eduProcessLength"
  105. [nzPageSize]="pageSize"
  106. [nzPageIndex]="pageIndex"
  107. style="margin: 10px 0"
  108. [nzLoading]="loading"
  109. nzSize="middle"
  110. [nzNoResult]="emptyResult"
  111. nzTableLayout="fixed"
  112. [nzFrontPagination]="false"
  113. (nzPageIndexChange)="pageIndexChange($event)"
  114. >
  115. <thead>
  116. <tr>
  117. <th
  118. nzEllipsis
  119. nzWidth="50px"
  120. nzLeft
  121. [nzChecked]="checkedAll"
  122. [nzIndeterminate]="indeterminate"
  123. nzLabel="Select all"
  124. (nzCheckedChange)="onAllChecked($event)"
  125. ></th>
  126. <th nzWidth="120px" nzLeft>流程名称</th>
  127. <th nzEllipsis nzWidth="120px">流程code</th>
  128. <th nzEllipsis nzWidth="120px">流程描述</th>
  129. <th nzEllipsis nzWidth="80px">申报限额</th>
  130. <th nzEllipsis nzWidth="120px">流程联系人</th>
  131. <th nzEllipsis nzWidth="80px">流程状态</th>
  132. <th nzEllipsis nzWidth="50px" nzRight>操作</th>
  133. </tr>
  134. </thead>
  135. <tbody>
  136. @for (data of tableData.data; track data.id) {
  137. <tr>
  138. <td
  139. nzEllipsis
  140. nzLeft
  141. [nzChecked]="setOfCheckedId.has(data.id)"
  142. (nzCheckedChange)="onItemChecked(data.id, $event)"
  143. ></td>
  144. <td
  145. nzEllipsis
  146. (click)="
  147. toUrl('/nav-admin/manage/process/page', {
  148. id: data?.id
  149. })
  150. "
  151. class="activeTd"
  152. >
  153. {{ data?.get("name") || "-" }}
  154. </td>
  155. <td nzEllipsis>
  156. {{ data?.get("code") || "-" }}
  157. </td>
  158. <td nzEllipsis nz-popover [nzPopoverContent]="contentTemplate">
  159. {{ data?.get("desc") || "-" }}
  160. <ng-template #contentTemplate>
  161. <div style="max-width: 400px">
  162. {{ data?.get("desc") }}
  163. </div>
  164. </ng-template>
  165. </td>
  166. <td nzEllipsis>
  167. {{
  168. data?.get("num") || data?.get("num") == 0
  169. ? data?.get("num")
  170. : "-"
  171. }}
  172. </td>
  173. <td nzEllipsis>
  174. {{
  175. data?.get("profileSubmitted")?.get("user").get("name") || "-"
  176. }}
  177. </td>
  178. <td nzEllipsis>
  179. <nz-tag [nzColor]="statusMap[data.id].color">
  180. {{ statusMap[data.id].title }}</nz-tag
  181. >
  182. </td>
  183. <td nzEllipsis nzRight>
  184. <button
  185. nz-button
  186. nz-dropdown
  187. [nzDropdownMenu]="menu"
  188. [nzPlacement]="'bottomLeft'"
  189. >
  190. <span nz-icon nzType="ellipsis" nzTheme="outline"></span>
  191. </button>
  192. <nz-dropdown-menu #menu="nzDropdownMenu">
  193. <ul nz-menu>
  194. @if (statusMap[data.id].strat){
  195. <li nz-menu-item>
  196. <button
  197. nz-button
  198. nzType="link"
  199. style="color: #231c1f"
  200. (click)="onStatusChange(data, 'strat', true)"
  201. >
  202. <span
  203. nz-icon
  204. nzType="caret-right"
  205. nzTheme="outline"
  206. ></span
  207. >开始流程
  208. </button>
  209. </li>
  210. } @if (statusMap[data.id].stop){
  211. <li nz-menu-item>
  212. <button
  213. nz-button
  214. nzType="link"
  215. style="color: #231c1f"
  216. (click)="onStatusChange(data, 'stop', true)"
  217. >
  218. <span
  219. nz-icon
  220. nzType="pause-circle"
  221. nzTheme="outline"
  222. ></span
  223. >暂停流程
  224. </button>
  225. </li>
  226. }@if (statusMap[data.id].collect){
  227. <li nz-menu-item>
  228. <button
  229. nz-button
  230. nzType="link"
  231. style="color: #231c1f"
  232. (click)="openEditCollect(data)"
  233. >
  234. <span
  235. nz-icon
  236. nzType="plus-circle"
  237. nzTheme="outline"
  238. ></span
  239. >收集源文件
  240. </button>
  241. </li>
  242. } @if (statusMap[data.id].end){
  243. <li nz-menu-item>
  244. <button
  245. nz-button
  246. nzType="link"
  247. style="color: #231c1f"
  248. (click)="onStatusChange(data, 'end', true)"
  249. >
  250. <span nz-icon nzType="stop" nzTheme="outline"></span
  251. >结束流程
  252. </button>
  253. </li>
  254. } @if (statusMap[data.id].del){
  255. <li nz-menu-item>
  256. <button
  257. nz-button
  258. nzType="link"
  259. (click)="onStatusChange(data, 'del', true)"
  260. style="color: #231c1f"
  261. >
  262. <span nz-icon nzType="delete" nzTheme="outline"></span
  263. >删除流程
  264. </button>
  265. </li>
  266. }
  267. </ul>
  268. </nz-dropdown-menu>
  269. </td>
  270. </tr>
  271. }
  272. </tbody>
  273. </nz-table>
  274. <ng-template #emptyResult>
  275. <nz-empty nzNotFoundImage="/img/group-empty.png"></nz-empty>
  276. </ng-template>
  277. </div>
  278. </div>
  279. </div>
  280. <!-- 全选操作:批量操作 -->
  281. <div class="batch-toolbar-modal" *ngIf="setOfCheckedId?.size">
  282. <div class="batch-toolbar">
  283. <div class="styles_counter__18S08">
  284. <span>已选</span>
  285. <span class="styles_num__178Wa">{{ setOfCheckedId.size }}</span>
  286. </div>
  287. <!-- <div class="batch-toolbar-actions">
  288. <div class="ant-space ant-space-horizontal ant-space-align-center">
  289. <div class="ant-space-item" style="margin-right: 16px">
  290. <button nz-button nzType="text" (click)="statusSelected('del')">
  291. <span nz-icon nzType="delete"></span>
  292. 删除
  293. </button>
  294. </div>
  295. </div>
  296. </div> -->
  297. <div class="styles_cancel__AARoT">
  298. <button nz-button nzType="text" (click)="statusSelected('strat')">
  299. <span nz-icon nzType="caret-right" nzTheme="outline"></span>
  300. 批量开始
  301. </button>
  302. </div>
  303. <div class="styles_cancel__AARoT">
  304. <button nz-button nzType="text" (click)="statusSelected('stop')">
  305. <span nz-icon nzType="pause-circle" nzTheme="outline"></span>
  306. 批量暂停
  307. </button>
  308. </div>
  309. <div class="styles_cancel__AARoT">
  310. <button nz-button nzType="text" (click)="statusSelected('end')">
  311. <span nz-icon nzType="stop" nzTheme="outline"></span>
  312. 批量结束
  313. </button>
  314. </div>
  315. <div class="styles_cancel__AARoT">
  316. <button nz-button nzType="text" (click)="onAllChecked(false)">
  317. 取消选中
  318. </button>
  319. </div>
  320. </div>
  321. </div>
  322. <nz-modal
  323. [(nzVisible)]="isVisible"
  324. nzTitle="新建组织"
  325. (nzOnCancel)="handleCancel()"
  326. nzWidth="600px"
  327. nzCentered
  328. >
  329. <ng-container *nzModalContent>
  330. <div nz-row class="depart-modal">
  331. <div nz-col nzSpan="12">
  332. <div class="row">
  333. <div class="label">
  334. 组织名称 <span style="color: #e8353e">*</span>
  335. </div>
  336. <div class="value">
  337. <input
  338. nz-input
  339. placeholder="请输入组织名称"
  340. [(ngModel)]="branchObj.name"
  341. type="text"
  342. />
  343. </div>
  344. </div>
  345. <div class="row">
  346. <div class="label">code</div>
  347. <div class="value">
  348. <input
  349. nz-input
  350. placeholder="请输入code"
  351. [(ngModel)]="branchObj.code"
  352. type="text"
  353. />
  354. </div>
  355. </div>
  356. </div>
  357. <div nz-col nzSpan="12">
  358. <div class="row">
  359. <div class="label">组织描述</div>
  360. <div class="value">
  361. <textarea
  362. [nzAutosize]="{ minRows: 4, maxRows: 4 }"
  363. placeholder="请输入组织描述"
  364. nz-input
  365. [(ngModel)]="branchObj.desc"
  366. ></textarea>
  367. </div>
  368. </div>
  369. </div>
  370. </div>
  371. </ng-container>
  372. <div *nzModalFooter>
  373. <button nz-button nzType="default" (click)="handleCancel()">取消</button>
  374. <button
  375. nz-button
  376. nzType="primary"
  377. style="background: #3e49b3; border: 1px #3e49b3"
  378. (click)="handleOk()"
  379. >
  380. 确定
  381. </button>
  382. </div>
  383. </nz-modal>
  384. <nz-modal
  385. [(nzVisible)]="showModal"
  386. nzTitle="收集教材源文件"
  387. (nzOnCancel)="handleCancel()"
  388. nzWidth="600px"
  389. >
  390. <ng-container *nzModalContent>
  391. <div nz-row class="depart-modal">
  392. <div nz-col nzSpan="24">
  393. <div class="row">
  394. <div class="label">
  395. 开始时间 <span style="color: #e8353e">*</span>
  396. </div>
  397. <div class="value">
  398. <nz-date-picker
  399. nzFormat="yyyy-MM-dd HH:mm:ss"
  400. [(ngModel)]="collectStartData"
  401. [nzShowTime]="{ nzDefaultOpenValue: timeDefaultValue }"
  402. ></nz-date-picker>
  403. </div>
  404. </div>
  405. <div class="row">
  406. <div class="label">截止时间 <span style="color: #e8353e">*</span></div>
  407. <div class="value">
  408. <nz-date-picker
  409. nzFormat="yyyy-MM-dd HH:mm:ss"
  410. [(ngModel)]="collectEndData"
  411. [nzStatus]="collectEndData < collectStartData ? 'error' : ''"
  412. [nzShowTime]="{ nzDefaultOpenValue: timeDefaultValue }"
  413. ></nz-date-picker>
  414. </div>
  415. </div>
  416. <div class="row" style="align-items: start;">
  417. <div class="label">收集教材</div>
  418. <div class="value">
  419. @for (item of textBookList; track $index) {
  420. <span>{{item?.get('title')}}; </span>
  421. }
  422. </div>
  423. </div>
  424. </div>
  425. </div>
  426. </ng-container>
  427. <div *nzModalFooter>
  428. <button nz-button nzType="default" (click)="handleCancel()">取消</button>
  429. <button
  430. nz-button
  431. nzType="primary"
  432. [disabled]="!this.collectStartData || !this.collectEndData"
  433. (click)="editCollect()"
  434. >
  435. 收集
  436. </button>
  437. </div>
  438. </nz-modal>