quick-combination.component.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. <div class="list-template">
  2. <div class="list-template__content">
  3. <div class="list-template__top" nz-row>
  4. <div nz-col nzXl="15" class="list-template__btns justify-content_flex-start">
  5. <h2 class="qName">方案名称:{{queryParamsName}}</h2>
  6. <button class="btn default mr8" nzType="primary" nz-button (click)="takeEffect()">生效</button>
  7. <button class="btn default mr8" nz-button (click)="goToOther()">切换</button>
  8. <button class="btn default" nz-button (click)="goToWorkAssignment()">返回</button>
  9. </div>
  10. <div nz-col nzXl="9" class="list-template__btns">
  11. <button class="btn default" nzType="primary" nz-button (click)="addModal()">新增快捷组合</button>
  12. <button [disabled]="!checkedDepIds.length||!listOfData.length" class="btn default ml8" nzType="primary"
  13. nz-button (click)="showDelModal($event,checkedDepIds,'是否确定批量删除选中的快捷组合?','删除','del')">批量删除</button>
  14. </div>
  15. </div>
  16. <div class="list-template__top" nz-row>
  17. <div nz-col nzXl='15' class="list-template__searchBox">
  18. <div class="list-template__searchItem">
  19. <span class="label label--big">快捷组合名称:</span>
  20. <input nz-input class="formItem" placeholder="请输入关键字" [(ngModel)]="searchCriteria.name" />
  21. </div>
  22. <div class="list-template__searchItem">
  23. <span class="label">工作模式:</span>
  24. <nz-select [nzDropdownMatchSelectWidth]="false" class="formItem" nzShowSearch nzPlaceHolder="请选择工作模式"
  25. [(ngModel)]="searchCriteria.workModel">
  26. <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of allWorkModel"></nz-option>
  27. </nz-select>
  28. </div>
  29. </div>
  30. <div nz-col nzXl="9" class="list-template__btns">
  31. <button class="btn default" nzType="primary" nz-button (click)="reset()">重置</button>
  32. <button class="btn default ml8" nzType="primary" nz-button (click)="getList(1)">搜索</button>
  33. </div>
  34. </div>
  35. <div class="list-template__bottom">
  36. <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
  37. [nzLoading]="loading1">
  38. <thead>
  39. <tr class="thead">
  40. <th nzWidth="5%" nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked"
  41. (nzCheckedChange)="checkAll($event)"></th>
  42. <th [nzWidth]="queryParamsType==1?'10%':'19%'">名称</th>
  43. <th [nzWidth]="queryParamsType==1?'10%':'19%'">班次</th>
  44. <th nzWidth="8%">任务类型</th>
  45. <th nzWidth="16%">工作模式</th>
  46. <th nzWidth="10%" *ngIf="queryParamsType==1">科室</th>
  47. <th nzWidth="8%" *ngIf="queryParamsType==1">分配人员/组</th>
  48. <th nzWidth="8%" *ngIf="queryParamsType==2">分配组</th>
  49. <th nzWidth="33%">操作</th>
  50. </tr>
  51. </thead>
  52. <tbody>
  53. <tr *ngFor="let data of listOfData;let i = index" (click)="selectedListData(data.id)">
  54. <td nzShowCheckbox [(nzChecked)]="mapOfCheckedId[data.id]" (nzCheckedChange)="refreshStatus()"></td>
  55. <td>{{data.configName||'-'}}</td>
  56. <td>
  57. {{data.classes?data.classes.name:'-'}}
  58. </td>
  59. <td>
  60. <div class="orderPlanTimeShow1" nz-tooltip nzTooltipTitle="{{data.taskTypesName?data.taskTypesName.join('、'):''}}">
  61. {{data.taskTypesName?data.taskTypesName.join('、'):''}}</div>
  62. </td>
  63. <td>
  64. {{data.ruleTypeName||'-'}}
  65. </td>
  66. <td *ngIf="queryParamsType==1">
  67. <div class="orderPlanTimeShow3" nz-tooltip nzTooltipTitle="{{data.departmentDTOSName?data.departmentDTOSName.join('、'):''}}">
  68. {{data.departmentDTOSName?data.departmentDTOSName.join('、'):''}}</div>
  69. </td>
  70. <td *ngIf="queryParamsType==1">
  71. <div class="orderPlanTimeShow2" nz-tooltip nzTooltipTitle="{{data.allName?data.allName.join('、'):''}}">
  72. {{data.allName?data.allName.join('、'):''}}</div>
  73. </td>
  74. <td *ngIf="queryParamsType==2">
  75. <div class="orderPlanTimeShow2" nz-tooltip nzTooltipTitle="{{data.allName?data.allName.join('、'):''}}">
  76. {{data.allName?data.allName.join('、'):''}}</div>
  77. </td>
  78. <td>
  79. <div class="coop">
  80. <span (click)="addPersonModal($event,data)" *ngIf="data.ruleType == 3&&queryParamsType==1">分配人员</span>
  81. <span (click)="addGroupsModal($event,data)"
  82. *ngIf="(data.ruleType == 2||data.ruleType == 4)&&queryParamsType==1">分配分组</span>
  83. <span (click)="copy($event,data)">复制</span>
  84. <span (click)="edit($event,data)">修改</span>
  85. <span (click)="showDelModal($event,data.id,'是否确定删除【'+data.configName+'】快捷组合?','删除','del')">删除</span>
  86. </div>
  87. </td>
  88. </tr>
  89. </tbody>
  90. </nz-table>
  91. <div class="list-template__pagination">
  92. <nz-pagination nzShowSizeChanger [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize"
  93. (nzPageIndexChange)="getList(0)" (nzPageSizeChange)="getList(0)">
  94. </nz-pagination>
  95. </div>
  96. </div>
  97. </div>
  98. <!-- 新增/编辑模态框 -->
  99. <div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="modal">
  100. <div class="modalBody">
  101. <div class="title">{{add?"新增":"编辑"}}快捷组合<i class="icon_transport transport-guanbi" (click)="hideAddModal()"></i>
  102. </div>
  103. <div class="content">
  104. <form nz-form [formGroup]="validateForm" class="addForm">
  105. <nz-form-item>
  106. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="quickCombinationName">快捷组合名称</nz-form-label>
  107. <nz-form-control nzErrorTip="请输入快捷组合名称!">
  108. <nz-input-group>
  109. <input nz-input formControlName="quickCombinationName" placeholder="请输入快捷组合名称" />
  110. </nz-input-group>
  111. </nz-form-control>
  112. </nz-form-item>
  113. <nz-form-item>
  114. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="quickCombinationClass">班次</nz-form-label>
  115. <nz-form-control nzErrorTip="请输入班次!">
  116. <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="quickCombinationClass" nzShowSearch
  117. nzPlaceHolder="请输入班次" nzServerSearch (nzOpenChange)="getClassList($event)"
  118. (ngModelChange)="selectClass($event)">
  119. <ng-container *ngFor="let data of classList">
  120. <nz-option *ngIf="!cLoading" nzLabel="{{data.name}}" nzValue="{{data.id}}"></nz-option>
  121. </ng-container>
  122. <nz-option *ngIf="cLoading" nzDisabled nzCustomContent>
  123. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  124. </nz-option>
  125. </nz-select>
  126. </nz-form-control>
  127. </nz-form-item>
  128. <nz-form-item>
  129. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="quickCombinationType">任务类型</nz-form-label>
  130. <nz-form-control nzErrorTip="请输入任务类型!">
  131. <nz-select [nzMode]="'multiple'" [nzDropdownMatchSelectWidth]="false"
  132. formControlName="quickCombinationType" nzShowSearch nzAllowClear nzPlaceHolder="请输入任务类型" nzServerSearch
  133. (nzOnSearch)="searchTaskList($event)" (nzOpenChange)="searchTaskList1($event)"
  134. (ngModelChange)="selectTaskList($event)">
  135. <ng-container *ngFor="let data of taskList">
  136. <nz-option *ngIf="!tLoading" nzLabel="{{data.taskName}}" nzValue="{{data.id}}"
  137. [nzDisabled]="data.showFlag === 0"></nz-option>
  138. </ng-container>
  139. <nz-option *ngIf="tLoading" nzDisabled nzCustomContent>
  140. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  141. </nz-option>
  142. </nz-select>
  143. </nz-form-control>
  144. </nz-form-item>
  145. <nz-form-item>
  146. <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="quickCombinationModel">工作模式</nz-form-label>
  147. <nz-form-control nzErrorTip="请输入工作模式!">
  148. <nz-radio-group [(ngModel)]="quickCombinationModel" formControlName="quickCombinationModel"
  149. [nzDisabled]="!taskListFlag" (ngModelChange)="radioIt()">
  150. <label nz-radio nzValue="1">自由抢单</label>
  151. <label nz-radio nzValue="2" *ngIf="queryParamsType==1">指定分组</label>
  152. <label nz-radio nzValue="3">科室绑定人员</label>
  153. <label nz-radio nzValue="4" *ngIf="queryParamsType==1">科室绑定分组</label>
  154. <label nz-radio nzValue="5" *ngIf="queryParamsType==2">科室绑定分组</label>
  155. <label nz-radio nzValue="6" *ngIf="queryParamsType==2">绑定分组</label>
  156. </nz-radio-group>
  157. </nz-form-control>
  158. </nz-form-item>
  159. <nz-form-item *ngIf="queryParamsType==1"
  160. [hidden]="quickCombinationModel == 1||quickCombinationModel==2||quickCombinationModel===''">
  161. <nz-form-label [nzSm]="6" [nzXs]="24" [nzRequired]="requireDept" nzFor="quickCombinationDept">选择科室
  162. </nz-form-label>
  163. <nz-form-control nzErrorTip="请选择科室!">
  164. <nz-select [nzMode]="'multiple'" [nzDropdownMatchSelectWidth]="false"
  165. formControlName="quickCombinationDept" nzShowSearch nzAllowClear nzPlaceHolder="请选择科室" nzServerSearch
  166. (nzOnSearch)="searchDeptList($event)" (nzOpenChange)="getDeptList($event)"
  167. (ngModelChange)="selectDeptList($event)">
  168. <ng-container *ngFor="let data of deptList">
  169. <nz-option *ngIf="!dLoading" nzLabel="{{data.dept}}" nzValue="{{data.id}}"></nz-option>
  170. </ng-container>
  171. <nz-option *ngIf="dLoading" nzDisabled nzCustomContent>
  172. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  173. </nz-option>
  174. </nz-select>
  175. </nz-form-control>
  176. </nz-form-item>
  177. <nz-form-item [hidden]="
  178. (queryParamsType==1&&(quickCombinationModel != 2||quickCombinationModel===''))||
  179. (queryParamsType==2&&((quickCombinationModel != 5 && quickCombinationModel != 6)||quickCombinationModel===''))">
  180. <nz-form-label [nzSm]="6" [nzXs]="24" [nzRequired]="requireGroup" nzFor="quickCombinationGroup">选择分组
  181. </nz-form-label>
  182. <nz-form-control nzErrorTip="请选择分组!">
  183. <nz-select [nzMode]="quickCombinationModel == 6?'default':'multiple'" [nzDropdownMatchSelectWidth]="false"
  184. formControlName="quickCombinationGroup" nzShowSearch nzAllowClear nzPlaceHolder="请选择分组" nzServerSearch
  185. (nzOnSearch)="searchGroupList($event)" (nzOpenChange)="getGroupList($event)"
  186. (ngModelChange)="selectGroupList($event)">
  187. <ng-container *ngFor="let data of groupList">
  188. <nz-option *ngIf="!gLoading" nzLabel="{{data.groupName}}" nzValue="{{data.id}}"></nz-option>
  189. </ng-container>
  190. <nz-option *ngIf="gLoading" nzDisabled nzCustomContent>
  191. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  192. </nz-option>
  193. </nz-select>
  194. </nz-form-control>
  195. </nz-form-item>
  196. <nz-form-item [hidden]="!(queryParamsType == 1 && quickCombinationModel == 1)">
  197. <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="quickCombinationDispatchMethod">派单方式</nz-form-label>
  198. <nz-form-control nzErrorTip="请选择派单方式!">
  199. <nz-radio-group formControlName="quickCombinationDispatchMethod" (ngModelChange)="radioDispatchMethod($event)">
  200. <label nz-radio [nzValue]="item.value" *ngFor="let item of dispatchMethods">{{item.name}}</label>
  201. </nz-radio-group>
  202. </nz-form-control>
  203. </nz-form-item>
  204. <nz-form-item [hidden]="!(queryParamsType == 1 && quickCombinationModel == 1 && validateForm.value.quickCombinationDispatchMethod == 2)">
  205. <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="quickCombinationDispatchType">自动派单类型</nz-form-label>
  206. <nz-form-control nzErrorTip="请选择自动派单类型!">
  207. <nz-radio-group formControlName="quickCombinationDispatchType" (ngModelChange)="radioDispatchType($event)">
  208. <label nz-radio [nzValue]="item.value" *ngFor="let item of dispatchTypes">{{item.name}}</label>
  209. </nz-radio-group>
  210. </nz-form-control>
  211. </nz-form-item>
  212. <nz-form-item [hidden]="!(queryParamsType == 1 && quickCombinationModel == 1 && validateForm.value.quickCombinationDispatchMethod == 2 && validateForm.value.quickCombinationDispatchType == 1)">
  213. <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="quickCombinationDispatchWeight">最高权重</nz-form-label>
  214. <nz-form-control nzErrorTip="请选择最高权重!">
  215. <nz-input-group>
  216. <input nz-input type="number" formControlName="quickCombinationDispatchWeight" placeholder="请输入最高权重" />
  217. </nz-input-group>
  218. </nz-form-control>
  219. </nz-form-item>
  220. </form>
  221. </div>
  222. <div class=" display_flex justify-content_flex-center">
  223. <button nzType="primary" nz-button (click)="submitForm()" [nzLoading]="btnLoading">保存</button>
  224. <button class="btn cancel" nz-button nzType="default" (click)="hideAddModal()">取消</button>
  225. </div>
  226. </div>
  227. </div>
  228. <!-- 分配人员模态框 -->
  229. <div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="personModal">
  230. <div class="modalBody">
  231. <div class="title">分配人员<i class="icon_transport transport-guanbi" (click)="hidePersonModal()"></i>
  232. </div>
  233. <div class="content">
  234. <form nz-form [formGroup]="validatePersonForm" class="addForm" (ngSubmit)="submitPersonForm()">
  235. <nz-form-item>
  236. <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="quickCombinationPerson">人员选择</nz-form-label>
  237. <nz-form-control [nzSm]="24" [nzXs]="24" nzErrorTip="请选择人员!">
  238. <nz-select [nzDropdownMatchSelectWidth]="false"
  239. formControlName="quickCombinationPerson" nzShowSearch nzAllowClear nzPlaceHolder="请选择人员" nzServerSearch
  240. (nzOnSearch)="searchPersonList($event)" (nzOpenChange)="getPersonList($event)">
  241. <ng-container *ngFor="let data of personList">
  242. <nz-option *ngIf="!pLoading" nzLabel="{{data.name}}" nzValue="{{data.id}}"></nz-option>
  243. </ng-container>
  244. <nz-option *ngIf="pLoading" nzDisabled nzCustomContent>
  245. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  246. </nz-option>
  247. </nz-select>
  248. </nz-form-control>
  249. </nz-form-item>
  250. </form>
  251. </div>
  252. <div class=" display_flex justify-content_flex-center">
  253. <button nzType="primary" nz-button (click)="submitPersonForm()" [nzLoading]="btnLoading">确定</button>
  254. <button class="btn cancel" nz-button nzType="default" (click)="hidePersonModal()">取消</button>
  255. </div>
  256. </div>
  257. </div>
  258. <!-- 分配分组模态框 -->
  259. <div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="groupsModal">
  260. <div class="modalBody">
  261. <div class="title">分配分组<i class="icon_transport transport-guanbi" (click)="hideGroupsModal()"></i>
  262. </div>
  263. <div class="content">
  264. <form nz-form [formGroup]="validateGroupForm" class="addForm" (ngSubmit)="submitGroupsForm()">
  265. <nz-form-item>
  266. <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="quickCombinationGroups">分组选择</nz-form-label>
  267. <nz-form-control [nzSm]="24" [nzXs]="24" nzErrorTip="请选择分组!">
  268. <nz-select [nzMode]="'multiple'" [nzDropdownMatchSelectWidth]="false"
  269. formControlName="quickCombinationGroups" nzShowSearch nzAllowClear nzPlaceHolder="请选择分组" nzServerSearch
  270. (nzOnSearch)="searchGroupsList($event)" (nzOpenChange)="getGroupsList($event)">
  271. <ng-container *ngFor="let data of groupsList">
  272. <nz-option *ngIf="!gpLoading" nzLabel="{{data.groupName}}" nzValue="{{data.id}}"></nz-option>
  273. </ng-container>
  274. <nz-option *ngIf="gpLoading" nzDisabled nzCustomContent>
  275. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  276. </nz-option>
  277. </nz-select>
  278. </nz-form-control>
  279. </nz-form-item>
  280. </form>
  281. </div>
  282. <div class=" display_flex justify-content_flex-center">
  283. <button nzType="primary" nz-button (click)="submitGroupsForm()" [nzLoading]="btnLoading">确定</button>
  284. <button class="btn cancel" nz-button nzType="default" (click)="hideGroupsModal()">取消</button>
  285. </div>
  286. </div>
  287. </div>
  288. <!-- 删除模态框 -->
  289. <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
  290. (confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
  291. </div>
  292. <!-- 提示模态框 -->
  293. <div class="save display_flex justify-content_flex-center align-items_center" *ngIf="tipModal">
  294. <div class="modalBody">
  295. <div class="title">提示<i class="icon_transport transport-guanbi" (click)="hideTipModal()"></i></div>
  296. <div class="content">
  297. <div class="icon"><i class="icon_transport transport-wenhao"></i></div>
  298. <div class="defeat" style="font-size: 16px;">是否确定离开该界面,如果未点击生效,数据可能会遗失?</div>
  299. </div>
  300. <div class="display_flex justify-content_flex-center">
  301. <button nz-button nzType="primary" (click)="confirmTip()">确认</button>
  302. <button class="btn cancel " nz-button nzType="default" (click)="hideTipModal()">关闭</button>
  303. </div>
  304. </div>
  305. </div>
  306. <!-- 操作成功/失败提示框 -->
  307. <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  308. [info]="promptInfo" [loading]="showLoading">
  309. </app-prompt-modal>
  310. <!-- 查看详情 -->
  311. <router-outlet></router-outlet>
  312. <!-- 遮罩 -->
  313. <app-mask *ngIf="maskFlag"></app-mask>