monthly-task.component.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <div class="list-template">
  2. <div class="list-template__content">
  3. <div class="list-template__top" nz-row>
  4. <div nz-col nzXl='18' class="list-template__searchBox">
  5. <div class="list-template__searchItem">
  6. <span class="label">任务标题</span>:
  7. <input nz-input class="formItem" [(ngModel)]="taskTitle" placeholder="请输入任务标题" nzSize="default" />
  8. </div>
  9. <div class="list-template__searchItem">
  10. <span class="label">责任人:</span>
  11. <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
  12. (nzOnSearch)="changeUser($event)" nzAllowClear nzPlaceHolder="请选择执行人员" [(ngModel)]="liableUser">
  13. <ng-container *ngFor="let option of dutyUser">
  14. <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
  15. </ng-container>
  16. <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
  17. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  18. </nz-option>
  19. </nz-select>
  20. </div>
  21. <div class="list-template__searchItem">
  22. <span class="label">优先级:</span>
  23. <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择优先级" [(ngModel)]="priority">
  24. <ng-container *ngFor="let option of priorityData">
  25. <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
  26. </ng-container>
  27. </nz-select>
  28. </div>
  29. <div class="list-template__searchItem">
  30. <span class="label width-105">开始时间区间:</span>
  31. <nz-range-picker nzShowTime [(ngModel)]="dateRange" (ngModelChange)="changeDate($event)"></nz-range-picker>
  32. </div>
  33. </div>
  34. <div nz-col nzXl='6' class="list-template__btns">
  35. <button nz-button class="btn default" (click)='search()'>搜索</button>
  36. <button nz-button class="btn ml8 default" (click)='reset()'>重置</button>
  37. <button nz-button *ngIf="coopBtns.add" class="btn ml8 default" (click)="showModal()">新增</button>
  38. </div>
  39. </div>
  40. <div class="list-template__bottom">
  41. <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
  42. [nzLoading]="loading1">
  43. <thead>
  44. <tr class="thead">
  45. <th>任务标题</th>
  46. <th>任务描述</th>
  47. <th>优先级</th>
  48. <th>责任人</th>
  49. <th>开始时间</th>
  50. <th>结束时间</th>
  51. <th>状态</th>
  52. <th nzWidth="250px">操作</th>
  53. </tr>
  54. </thead>
  55. <tbody>
  56. <tr *ngFor="let data of listOfData;let index=index;">
  57. <td>{{ data.taskTitle||'-' }}</td>
  58. <td>{{ data.taskDescribe||'-' }}</td>
  59. <td>{{ data.priority && data.priority.name||'-'}}</td>
  60. <td>{{ data.liableUserDTO && data.liableUserDTO.name||'-' }}</td>
  61. <td>{{ data.startTime | date:'yyyy-MM-dd HH:mm:ss' }}</td>
  62. <td>{{ data.endTime | date:'yyyy-MM-dd HH:mm:ss' }}</td>
  63. <td>{{ data.state && data.state.name||'-'}}</td>
  64. <td>
  65. <div class="coop">
  66. <span *ngIf="coopBtns.edit && data.state.value==1" (click)="edit(data)">编辑</span>
  67. <span *ngIf="coopBtns.del && data.state.value==1" (click)="del(data)">删除</span>
  68. <span *ngIf="coopBtns.allocation && data.state.value==1" (click)="allocation(data)">分配任务</span>
  69. <span *ngIf="coopBtns.accomplish && data.state.value==1" (click)="accomplish(data)">任务完成</span>
  70. </div>
  71. </td>
  72. </tr>
  73. </tbody>
  74. </nz-table>
  75. <div class="list-template__pagination">
  76. <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
  77. (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
  78. </nz-pagination>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. <!-- 新增/编辑模态框 -->
  84. <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
  85. <div class="modalBody">
  86. <div class="title">{{add?"新增":"编辑"}}<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
  87. </div>
  88. <div class="content">
  89. <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
  90. <nz-form-item>
  91. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="taskTitle">任务标题</nz-form-label>
  92. <nz-form-control nzErrorTip="请选择任务标题!">
  93. <nz-input-group>
  94. <input nz-input class="formItem" formControlName="taskTitle" placeholder="请输入任务标题" nzSize="default" />
  95. </nz-input-group>
  96. </nz-form-control>
  97. </nz-form-item>
  98. <nz-form-item>
  99. <nz-form-label class="margin-label" [nzSm]="6" [nzXs]="24" nzRequired nzFor="taskDescribe">任务描述</nz-form-label>
  100. <nz-form-control nzErrorTip="请选择任务描述!">
  101. <nz-input-group>
  102. <textarea formControlName="taskDescribe" nz-input rows="3" placeholder="请输入任务描述"></textarea>
  103. </nz-input-group>
  104. </nz-form-control>
  105. </nz-form-item>
  106. <nz-form-item>
  107. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="priority">优先级</nz-form-label>
  108. <nz-form-control nzErrorTip="请选择优先级!">
  109. <nz-input-group>
  110. <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择优先级" formControlName="priority">
  111. <ng-container *ngFor="let option of priorityData">
  112. <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
  113. </ng-container>
  114. </nz-select>
  115. </nz-input-group>
  116. </nz-form-control>
  117. </nz-form-item>
  118. <nz-form-item>
  119. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="liableUser">责任人</nz-form-label>
  120. <nz-form-control nzErrorTip="请选择责任人!">
  121. <nz-input-group>
  122. <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
  123. (nzOnSearch)="changeUser($event)" nzAllowClear nzPlaceHolder="请选择责任人" formControlName="liableUser">
  124. <ng-container *ngFor="let option of dutyUser">
  125. <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
  126. </ng-container>
  127. <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
  128. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  129. </nz-option>
  130. </nz-select>
  131. </nz-input-group>
  132. </nz-form-control>
  133. </nz-form-item>
  134. <div class="df">
  135. <nz-form-item>
  136. <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="startTime">开始时间</nz-form-label>
  137. <nz-form-control nzErrorTip="请选择开始时间!">
  138. <nz-input-group>
  139. <nz-date-picker
  140. nzShowTime
  141. nzFormat="yyyy-MM-dd HH:mm:ss"
  142. nzPlaceHolder="请选择开始时间"
  143. formControlName="startTime"
  144. (ngModelChange)="onStartChange($event)"
  145. ></nz-date-picker>
  146. </nz-input-group>
  147. </nz-form-control>
  148. </nz-form-item>
  149. <nz-form-item>
  150. <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="endTime">结束时间</nz-form-label>
  151. <nz-form-control nzErrorTip="请选择结束时间!">
  152. <nz-input-group>
  153. <nz-date-picker
  154. nzShowTime
  155. nzFormat="yyyy-MM-dd HH:mm:ss"
  156. nzPlaceHolder="请选择结束时间"
  157. formControlName="endTime"
  158. (ngModelChange)="onEndChange($event)"
  159. ></nz-date-picker>
  160. </nz-input-group>
  161. </nz-form-control>
  162. </nz-form-item>
  163. </div>
  164. </form>
  165. </div>
  166. <div class="display_flex justify-content_flex-center">
  167. <button nzType="primary" nz-button (click)="submitForm()" [nzLoading]="btnLoading">确认</button>
  168. <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
  169. </div>
  170. </div>
  171. </div>
  172. <!-- 分配任务 -->
  173. <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="allocationModal">
  174. <div class="modalBody">
  175. <div class="title">分配任务<i class="icon_transport transport-guanbi" (click)="hideAllocationModal()"></i>
  176. </div>
  177. <div class="content">
  178. <form nz-form [formGroup]="validateAllocationForm" class="addForm" (ngSubmit)="submitAllocationForm()">
  179. <nz-form-item>
  180. <nz-form-label class="margin-label" [nzSm]="6" [nzXs]="24" nzRequired nzFor="taskContent">任务内容</nz-form-label>
  181. <nz-form-control nzErrorTip="请选择任务内容!">
  182. <nz-input-group>
  183. <textarea formControlName="taskContent" nz-input rows="3" placeholder="请输入任务内容"></textarea>
  184. </nz-input-group>
  185. </nz-form-control>
  186. </nz-form-item>
  187. <nz-form-item>
  188. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="executor">执行人</nz-form-label>
  189. <nz-form-control nzErrorTip="请选择执行人!">
  190. <nz-input-group>
  191. <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
  192. (nzOnSearch)="changeUser($event)" nzAllowClear nzPlaceHolder="请选择执行人" formControlName="executor">
  193. <ng-container *ngFor="let option of dutyUser">
  194. <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
  195. </ng-container>
  196. <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
  197. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  198. </nz-option>
  199. </nz-select>
  200. </nz-input-group>
  201. </nz-form-control>
  202. </nz-form-item>
  203. <nz-form-item>
  204. <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="estimatedCompletionTime">预计完成时间</nz-form-label>
  205. <nz-form-control nzErrorTip="请选择预计完成时间!">
  206. <nz-input-group>
  207. <nz-date-picker
  208. class="width-100"
  209. nzShowTime
  210. nzFormat="yyyy-MM-dd HH:mm:ss"
  211. nzPlaceHolder="请选择预计完成时间"
  212. formControlName="estimatedCompletionTime"
  213. (ngModelChange)="onAllocationChange($event)"
  214. ></nz-date-picker>
  215. </nz-input-group>
  216. </nz-form-control>
  217. </nz-form-item>
  218. </form>
  219. </div>
  220. <div class="display_flex justify-content_flex-center">
  221. <button nzType="primary" nz-button (click)="submitAllocationForm()" [nzLoading]="btnLoading">确认</button>
  222. <button class="btn cancel" nz-button nzType="default" (click)="hideAllocationModal()">取消</button>
  223. </div>
  224. </div>
  225. </div>
  226. <!-- 任务完成 -->
  227. <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="accomplishModal">
  228. <div class="modalBody">
  229. <div class="title">任务完成<i class="icon_transport transport-guanbi"></i>
  230. </div>
  231. <div class="content padding-bottom">
  232. <span class="label"><span class="sign">*</span> 月度任务总结:</span>
  233. <textarea [(ngModel)]="taskConclusion" nz-input rows="3" placeholder="请输入任务内容"></textarea>
  234. </div>
  235. <div class="display_flex justify-content_flex-center">
  236. <button nzType="primary" nz-button (click)="submitAccomplishForm()" [nzLoading]="btnLoading">确认</button>
  237. <button class="btn cancel" nz-button nzType="default" (click)="hideAccomplishModal()">取消</button>
  238. </div>
  239. </div>
  240. </div>
  241. <!-- 删除模态框 -->
  242. <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
  243. (confirmDelEvent)="confirmDel()" (cancelDelEvent)="cancelDel()" content="您确认要删除吗?" confirmTxt="是" cancelTxt="否">
  244. </app-dialog-delete>
  245. <!-- 操作成功/失败提示框 -->
  246. <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  247. [info]="promptInfo"></app-prompt-modal>
  248. <!-- 查看详情 -->
  249. <router-outlet (deactivate)="getList()"></router-outlet>