process-list.component.html 11 KB

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