quick-combination.component.ts 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350
  1. import { Component, OnInit } from "@angular/core";
  2. import { ActivatedRoute, Router } from "@angular/router";
  3. import { FormBuilder, Validators, FormGroup } from "@angular/forms";
  4. import setSeconds from "date-fns/setSeconds";
  5. import setMinutes from "date-fns/setMinutes";
  6. import setHours from "date-fns/setHours";
  7. import { MainService } from "../../services/main.service";
  8. import { ToolService } from "../../services/tool.service";
  9. import { NzMessageService } from "ng-zorro-antd";
  10. @Component({
  11. selector: "app-quick-combination",
  12. templateUrl: "./quick-combination.component.html",
  13. styleUrls: ["./quick-combination.component.less"],
  14. })
  15. export class QuickCombinationComponent implements OnInit {
  16. constructor(
  17. private message: NzMessageService,
  18. private fb: FormBuilder,
  19. private mainService: MainService,
  20. private route: ActivatedRoute,
  21. private router: Router,
  22. private tool: ToolService
  23. ) {
  24. this.route.queryParams.subscribe((res) => {
  25. this.queryParamsId = res.id;
  26. this.queryParamsName = res.name;
  27. this.queryParamsType = res.type;
  28. if (this.queryParamsType == 2) {
  29. this.allWorkModel = [
  30. { id: 1, name: "自由抢单" },
  31. { id: 3, name: "科室绑定人员" },
  32. { id: 4, name: "科室绑定分组" },
  33. { id: 2, name: "绑定分组" },
  34. ];
  35. }
  36. });
  37. }
  38. searchCriteria = {
  39. //搜索条件
  40. name: "",
  41. workModel: null,
  42. };
  43. allWorkModel = [
  44. { id: 1, name: "自由抢单" },
  45. { id: 2, name: "指定分组" },
  46. { id: 3, name: "科室绑定人员" },
  47. { id: 4, name: "科室绑定分组" },
  48. ];
  49. quickCombinationModel;
  50. requireGroup = false;
  51. requireDept = false;
  52. queryParamsId = ""; //方案id
  53. queryParamsName = ""; //方案名称
  54. queryParamsType: any = ""; //方案类型,1是综合排班,2是自选排班
  55. userInfo: any = JSON.parse(localStorage.getItem("user")) || {}; //登录用户信息
  56. listOfData: any[] = []; //表格数据
  57. pageIndex: number = 1; //表格当前页码
  58. pageSize: number = 10; //表格每页展示条数
  59. listLength: number = 10; //表格总数据量
  60. tableHeight: number; //表格动态高
  61. modal: boolean = false; //新增/编辑模态框
  62. personModal: boolean = false; //定时启用设置日期模态框
  63. groupsModal: boolean = false; //定时启用设置日期模态框
  64. add: boolean; //true:新增;false:编辑
  65. validateForm: FormGroup; //新增/编辑表单
  66. validateDateForm: FormGroup; //定时启动设置日期表单
  67. validatePersonForm: FormGroup; //
  68. validateGroupForm: FormGroup; //
  69. coopId: number; //当前操作列id
  70. timeDefaultValue = setHours(setMinutes(setSeconds(new Date(), 0), 0), 0);
  71. btnLoading: boolean = false; //提交按钮loading状态
  72. currentHospital; //当前院区
  73. promptContent: string; //操作提示框提示信息
  74. ifSuccess: boolean; //操作成功/失败
  75. promptInfo: string; //操作结果提示信息
  76. promptModalShow: boolean; //操作提示框是否展示
  77. showLoading = false; //操作是否显示loading
  78. classList = []; //班次列表
  79. maskFlag: any = false;
  80. // -----------------------
  81. ngOnInit() {
  82. this.currentHospital = this.tool.getCurrentHospital();
  83. this.initForm();
  84. this.getList(1);
  85. }
  86. // 重置
  87. reset() {
  88. this.searchCriteria = {
  89. //搜索条件
  90. name: "",
  91. workModel: null,
  92. };
  93. this.getList(1);
  94. }
  95. //查询班次列表,flag是下拉框展开状态
  96. cLoading = false;
  97. getClassList(flag?, fedit?) {
  98. if (!flag) {
  99. return;
  100. }
  101. if (fedit) {
  102. this.maskFlag = this.message.loading("正在加载中..", {
  103. nzDuration: 0,
  104. }).messageId;
  105. }
  106. let hosIds = this.currentHospital.id;
  107. let postData = {
  108. idx: 0,
  109. sum: 9999,
  110. scheduleClass: { hospital: { id: hosIds } },
  111. };
  112. this.cLoading = true;
  113. this.mainService
  114. .getFetchDataList("configuration", "scheduleClass", postData)
  115. .subscribe((data) => {
  116. this.cLoading = false;
  117. if (data.status == 200) {
  118. this.classList = data.list;
  119. if (fedit) {
  120. this.searchTaskList(true, true);
  121. }
  122. }
  123. });
  124. }
  125. //选中班次
  126. currentClassId; //当前班次
  127. selectClass(id) {
  128. this.validateForm.controls.quickCombinationType.setValue(null); //任务类型
  129. this.quickCombinationModel = "";
  130. this.deptList = [];
  131. this.groupList = [];
  132. this.validateForm.controls.quickCombinationDept.setValue(null); //科室
  133. this.validateForm.controls.quickCombinationGroup.setValue(null); //分组
  134. this.currentClassId = id;
  135. this.taskListFlag = true;
  136. }
  137. //搜索任务类型列表
  138. taskList = []; //当前班次下的任务类型列表
  139. tLoading = false;
  140. taskListFlag = true; //是否可以选择所有的工作模式
  141. getTaskList(flag?, keyWords?, fedit?) {
  142. console.log(
  143. this.validateForm.value.quickCombinationType,
  144. this.taskListFlag
  145. );
  146. // 关闭下拉框的时候阻止
  147. if (!flag) {
  148. return;
  149. }
  150. // 之前没有选择任务类型
  151. if (
  152. (this.validateForm.value.quickCombinationType === null ||
  153. this.validateForm.value.quickCombinationType.length === 0) &&
  154. this.taskListFlag &&
  155. (fedit ? this.info.classes.id : this.currentClassId)
  156. ) {
  157. let postData = {
  158. classesId: fedit ? this.info.classes.id : this.currentClassId,
  159. };
  160. if (keyWords) {
  161. postData["keyWords"] = keyWords;
  162. }
  163. this.tLoading = true;
  164. this.mainService
  165. .coopConfig("getTaskTypeByClasses", postData)
  166. .subscribe((data) => {
  167. this.tLoading = false;
  168. if (data.state == 200) {
  169. console.log(this.currentClassId);
  170. if (this.currentClassId) {
  171. this.taskList = data.data;
  172. } else {
  173. this.taskList = [];
  174. }
  175. if (fedit) {
  176. let arr = [];
  177. this.info.taskTypes.forEach((item) => {
  178. let flag = this.taskList.some((v) => v.id == item.id);
  179. if (!flag) {
  180. arr.push(item);
  181. }
  182. });
  183. this.taskList = [...arr, ...this.taskList];
  184. console.log(this.taskList);
  185. this.validateForm.controls.quickCombinationClass.setValue(
  186. this.info.classes.id + ""
  187. ); //班次
  188. this.validateForm.controls.quickCombinationType.setValue(
  189. this.info.taskTypesId
  190. ); //任务类型
  191. if(this.queryParamsType == 1){
  192. this.quickCombinationModel = this.info.ruleType + "";
  193. }else if(this.queryParamsType == 2){
  194. if(this.info.ruleType == 2){
  195. this.quickCombinationModel = '6';
  196. }else if(this.info.ruleType == 4){
  197. this.quickCombinationModel = '5';
  198. }else{
  199. this.quickCombinationModel = this.info.ruleType + "";
  200. }
  201. }
  202. this.taskListFlag = false;
  203. if (!this.copyFlag) {
  204. if (this.info.ruleType == 2) {
  205. this.getGroupList(true, "", true);
  206. } else if (this.info.ruleType == 3 || this.info.ruleType == 4) {
  207. this.getDeptList(true, "", true);
  208. } else {
  209. this.message.remove(this.maskFlag);
  210. this.maskFlag = false;
  211. this.modal = true;
  212. }
  213. }
  214. }
  215. }
  216. this.message.remove(this.maskFlag);
  217. this.maskFlag = false;
  218. this.modal = true;
  219. });
  220. }
  221. }
  222. // 选择任务类型
  223. ids = [];
  224. selectTaskList(ids, keyWords?, fedit?) {
  225. console.log(fedit);
  226. if (ids === null) {
  227. return;
  228. }
  229. console.log(this.currentClassId);
  230. if (
  231. this.validateForm.value.quickCombinationType &&
  232. this.validateForm.value.quickCombinationType.length > 0
  233. ) {
  234. let postData = {
  235. classesId: fedit ? this.info.classes.id : this.currentClassId,
  236. taskTypeId: ids[0],
  237. workSchemeId: this.queryParamsId,
  238. };
  239. if (keyWords) {
  240. postData["keyWords"] = keyWords;
  241. }
  242. this.ids = ids;
  243. this.mainService
  244. .coopConfig("getTaskTypeByFirstType", postData)
  245. .subscribe((data) => {
  246. if (data.state == 200) {
  247. this.taskList = data.data;
  248. if (fedit) {
  249. let arr = [];
  250. this.info.taskTypes.forEach((item) => {
  251. let flag = this.taskList.some((v) => v.id == item.id);
  252. if (!flag) {
  253. arr.push(item);
  254. }
  255. });
  256. this.taskList = [...arr, ...this.taskList];
  257. this.validateForm.controls.quickCombinationClass.setValue(
  258. this.info.classes.id + ""
  259. ); //班次
  260. this.validateForm.controls.quickCombinationType.setValue(
  261. this.info.taskTypesId
  262. ); //任务类型
  263. this.quickCombinationModel = this.info.ruleType + "";
  264. this.taskListFlag = false;
  265. return;
  266. }
  267. if (data.data && data.data.length > 0) {
  268. let obj = data.data.find(
  269. (item) => item.ruleType != "0" && item.showFlag == 1
  270. );
  271. console.log(obj);
  272. if (obj) {
  273. if(this.queryParamsType == 1){
  274. this.quickCombinationModel = obj.ruleType + "";
  275. }else if(this.queryParamsType == 2){
  276. if(obj.ruleType == 2){
  277. this.quickCombinationModel = '6';
  278. }else if(obj.ruleType == 4){
  279. this.quickCombinationModel = '5';
  280. }else{
  281. this.quickCombinationModel = obj.ruleType + "";
  282. }
  283. }
  284. this.radioIt(1); //选择任务类型
  285. this.taskListFlag = false;
  286. } else {
  287. //都是置灰的或之前没设置过的
  288. this.taskListFlag = true;
  289. this.quickCombinationModel = "";
  290. }
  291. } else {
  292. //返回空
  293. this.taskListFlag = true;
  294. this.quickCombinationModel = "";
  295. }
  296. } else if (data.state == 201) {
  297. //201则是该班次该任务类型之前没有设置过,所以无法返回带置灰选项的列表
  298. this.taskListFlag = true;
  299. if (fedit) {
  300. this.getTaskList(true, "", true);
  301. } else {
  302. this.getTaskList(true);
  303. }
  304. this.quickCombinationModel = "";
  305. }
  306. });
  307. } else {
  308. this.taskListFlag = true;
  309. if (fedit) {
  310. this.getTaskList(true, "", true);
  311. } else {
  312. this.getTaskList(true);
  313. }
  314. this.quickCombinationModel = "";
  315. }
  316. }
  317. // 搜索任务类型列表
  318. searchTaskList(e, fedit?) {
  319. console.log(this.validateForm.value.quickCombinationType);
  320. if (
  321. this.validateForm.value.quickCombinationType &&
  322. this.validateForm.value.quickCombinationType.length === 0
  323. ) {
  324. if (fedit) {
  325. this.getTaskList(true, e, fedit);
  326. } else {
  327. this.getTaskList(true, e);
  328. }
  329. } else {
  330. if (fedit) {
  331. this.selectTaskList(this.ids, e, fedit);
  332. } else {
  333. this.selectTaskList(this.ids, e);
  334. }
  335. }
  336. }
  337. searchTaskList1(flag) {
  338. if (flag) {
  339. this.searchTaskList("");
  340. }
  341. }
  342. //对应ruleType与quickCombinationModel
  343. get quickCombinationModelComputed(){
  344. console.log(this.quickCombinationModel,'---------------------')
  345. if(this.quickCombinationModel == 5){//科室绑定分组
  346. return 4;
  347. }else if(this.quickCombinationModel == 6){//绑定分组
  348. return 2;
  349. }else{
  350. return this.quickCombinationModel;
  351. }
  352. }
  353. // 选中工作模式
  354. radioIt(flag?) {
  355. //undefined 打开复制弹窗,1 选择任务类型
  356. console.log(flag);
  357. if (!this.add) {
  358. // 回显储存的值
  359. console.log(this.info, this.quickCombinationModel);
  360. if (
  361. this.info.ruleType == this.quickCombinationModelComputed &&
  362. (this.quickCombinationModel == 2 || this.quickCombinationModel == 5 || this.quickCombinationModel == 6)
  363. ) {
  364. this.groupList = this.info.groups;
  365. if (!this.copyFlag) {
  366. if(this.quickCombinationModel == 6){
  367. this.validateForm.controls.quickCombinationGroup.setValue((this.info.groupsId?this.info.groupsId[0] + '':null));
  368. }else{
  369. this.validateForm.controls.quickCombinationGroup.setValue(
  370. this.info.groupsId
  371. );
  372. }
  373. } else {
  374. if (!flag) {
  375. this.validateForm.controls.quickCombinationGroup.setValue(null);
  376. } else {
  377. if(this.quickCombinationModel == 6){
  378. this.validateForm.controls.quickCombinationGroup.setValue((this.info.groupsId?this.info.groupsId[0] + '':null));
  379. }else{
  380. this.validateForm.controls.quickCombinationGroup.setValue(
  381. this.info.groupsId
  382. );
  383. }
  384. }
  385. }
  386. }
  387. if (
  388. (this.info.ruleType == 3 || this.info.ruleType == 4) &&
  389. (this.quickCombinationModel == 3 || this.quickCombinationModel == 4)
  390. ) {
  391. this.deptList = this.info.departmentDTOS;
  392. if (!this.copyFlag) {
  393. this.validateForm.controls.quickCombinationDept.setValue(
  394. this.info.departmentDTOSId
  395. );
  396. } else {
  397. if (!flag) {
  398. this.validateForm.controls.quickCombinationDept.setValue(null);
  399. } else {
  400. this.validateForm.controls.quickCombinationDept.setValue(
  401. this.info.departmentDTOSId
  402. );
  403. }
  404. }
  405. }
  406. }
  407. if (this.quickCombinationModel == 1) {
  408. this.requireGroup = false;
  409. this.requireDept = false;
  410. } else if (this.quickCombinationModel == 2) {
  411. this.requireGroup = false;
  412. this.requireDept = false;
  413. } else if (this.quickCombinationModel == 3) {
  414. if (this.queryParamsType == 1) {
  415. this.requireGroup = false;
  416. this.requireDept = true;
  417. } else if (this.queryParamsType == 2) {
  418. this.requireGroup = false;
  419. this.requireDept = false;
  420. }
  421. } else if (this.quickCombinationModel == 4) {
  422. this.requireGroup = false;
  423. this.requireDept = true;
  424. }else if (this.quickCombinationModel == 5) {
  425. this.requireGroup = false;
  426. this.requireDept = false;
  427. }else if (this.quickCombinationModel == 6) {
  428. this.requireGroup = false;
  429. this.requireDept = false;
  430. }
  431. if (!this.requireGroup) {
  432. this.validateForm.get("quickCombinationGroup")!.clearValidators();
  433. this.validateForm.get("quickCombinationGroup")!.markAsPristine();
  434. } else {
  435. this.validateForm
  436. .get("quickCombinationGroup")!
  437. .setValidators(Validators.required);
  438. this.validateForm.get("quickCombinationGroup")!.markAsDirty();
  439. }
  440. this.validateForm.get("quickCombinationGroup")!.updateValueAndValidity();
  441. // ------
  442. if (!this.requireDept) {
  443. this.validateForm.get("quickCombinationDept")!.clearValidators();
  444. this.validateForm.get("quickCombinationDept")!.markAsPristine();
  445. } else {
  446. this.validateForm
  447. .get("quickCombinationDept")!
  448. .setValidators(Validators.required);
  449. this.validateForm.get("quickCombinationDept")!.markAsDirty();
  450. }
  451. this.validateForm.get("quickCombinationDept")!.updateValueAndValidity();
  452. }
  453. deptList = []; //科室列表
  454. dLoading = false;
  455. dNum = 0;
  456. //获取科室列表
  457. getDeptList(flag?, search = "", fedit?) {
  458. if (!flag) {
  459. return;
  460. }
  461. let hosIds = this.currentHospital.id;
  462. let postData = {
  463. idx: 0,
  464. sum: 20,
  465. department: { hospital: { id: hosIds }, dept: search },
  466. };
  467. this.dLoading = true;
  468. this.dNum++;
  469. this.mainService
  470. .getFetchDataList("data", "department", postData)
  471. .subscribe((data) => {
  472. this.dNum--;
  473. if (this.dNum === 0) {
  474. this.dLoading = false;
  475. }
  476. if (data.status == 200) {
  477. this.deptList = data.list;
  478. if (fedit) {
  479. switch (this.info.ruleType) {
  480. case 1:
  481. this.validateForm.controls.quickCombinationDept.setValue(null);
  482. break;
  483. case 2:
  484. this.validateForm.controls.quickCombinationDept.setValue(null);
  485. break;
  486. case 3:
  487. let arr = [];
  488. let arrr = [];
  489. this.info.departmentDTOS.forEach((item) => {
  490. arr.push(item.id + "");
  491. });
  492. this.info.departmentDTOS.forEach((item) => {
  493. let flag = this.deptList.some((v) => v.id == item.id);
  494. if (!flag) {
  495. arrr.push(item);
  496. }
  497. });
  498. this.deptList = [...arrr, ...this.deptList];
  499. this.validateForm.controls.quickCombinationDept.setValue(arr);
  500. break;
  501. case 4:
  502. if(this.queryParamsType == 1){
  503. let arr1 = [];
  504. let arr11 = [];
  505. this.info.departmentDTOS.forEach((item) => {
  506. arr1.push(item.id + "");
  507. });
  508. this.info.departmentDTOS.forEach((item) => {
  509. let flag = this.deptList.some((v) => v.id == item.id);
  510. if (!flag) {
  511. arr11.push(item);
  512. }
  513. });
  514. this.deptList = [...arr11, ...this.deptList];
  515. this.validateForm.controls.quickCombinationDept.setValue(arr1);
  516. }else if(this.queryParamsType == 2){
  517. this.validateForm.controls.quickCombinationDept.setValue(null);
  518. }
  519. break;
  520. }
  521. }
  522. }
  523. this.message.remove(this.maskFlag);
  524. this.maskFlag = false;
  525. this.modal = true;
  526. });
  527. }
  528. // 搜索科室列表
  529. searchDeptList(e) {
  530. this.getDeptList(true, e);
  531. }
  532. // 选择科室
  533. selectDeptList(ids) {
  534. console.log(ids, this.info.departmentDTOSId);
  535. if (!this.add) {
  536. this.info.departmentDTOSId = ids;
  537. }
  538. }
  539. groupList = []; //分组列表
  540. gLoading = false;
  541. gNum = 0;
  542. //获取分组列表
  543. getGroupList(flag?, search = "", fedit?) {
  544. if (!flag) {
  545. return;
  546. }
  547. let hosIds = this.currentHospital.id;
  548. let postData = {
  549. idx: 0,
  550. sum: 20,
  551. group2: {
  552. groupName: search,
  553. scheduleClass: {
  554. id: fedit ? this.info.classes.id : this.currentClassId,
  555. },
  556. hospitals: hosIds,
  557. },
  558. };
  559. this.gLoading = true;
  560. this.gNum++;
  561. this.mainService
  562. .getFetchDataList("data", "group2", postData)
  563. .subscribe((data) => {
  564. this.gNum--;
  565. if (this.gNum === 0) {
  566. this.gLoading = false;
  567. }
  568. if (data.status == 200) {
  569. this.groupList = data.list;
  570. console.log(fedit, this.info);
  571. if (fedit) {
  572. switch (this.info.ruleType) {
  573. case 1:
  574. this.validateForm.controls.quickCombinationGroup.setValue(null);
  575. break;
  576. case 2:
  577. let arr = [];
  578. let arrr = [];
  579. this.info.groups.forEach((item) => {
  580. let flag = this.groupList.some((v) => v.id == item.id);
  581. arr.push(item.id + "");
  582. console.log(flag);
  583. if (!flag) {
  584. arrr.push(item);
  585. }
  586. });
  587. this.groupList = [...arrr, ...this.groupList];
  588. console.log(this.groupList, arrr, arr);
  589. if(this.queryParamsType == 1){
  590. this.validateForm.controls.quickCombinationGroup.setValue(arr);
  591. }else if(this.queryParamsType == 2){
  592. this.validateForm.controls.quickCombinationGroup.setValue(arr[0] + '');
  593. }
  594. break;
  595. case 3:
  596. this.validateForm.controls.quickCombinationGroup.setValue(null);
  597. break;
  598. case 4:
  599. if(this.queryParamsType == 1){
  600. this.validateForm.controls.quickCombinationGroup.setValue(null);
  601. }else if(this.queryParamsType == 2){
  602. let arr = [];
  603. let arrr = [];
  604. this.info.groups.forEach((item) => {
  605. let flag = this.groupList.some((v) => v.id == item.id);
  606. arr.push(item.id + "");
  607. console.log(flag);
  608. if (!flag) {
  609. arrr.push(item);
  610. }
  611. });
  612. this.groupList = [...arrr, ...this.groupList];
  613. console.log(this.groupList, arrr, arr);
  614. this.validateForm.controls.quickCombinationGroup.setValue(arr);
  615. }
  616. break;
  617. }
  618. }
  619. }
  620. this.message.remove(this.maskFlag);
  621. this.maskFlag = false;
  622. this.modal = true;
  623. });
  624. }
  625. // 搜索分组列表
  626. searchGroupList(e) {
  627. this.getGroupList(true, e);
  628. }
  629. // 选择分组
  630. selectGroupList(ids) {
  631. if (!this.add) {
  632. this.info.groupsId = ids !== null ? ids : [];
  633. }
  634. }
  635. // 切换
  636. goToOther() {
  637. this.router.navigateByUrl(
  638. `/main/jobAssignment?id=${this.queryParamsId}&name=${this.queryParamsName}`
  639. );
  640. }
  641. personList = []; //分配人员列表
  642. pLoading = false;
  643. pNum = 0;
  644. //获取分配人员列表
  645. getPersonList(flag?, search = "", edit?, info?) {
  646. if (!flag) {
  647. return;
  648. }
  649. let postData = {
  650. idx: 0,
  651. sum: 20,
  652. user: {
  653. usertype: { id: 106 },
  654. name: search,
  655. hospital: {
  656. id: this.currentHospital.id,
  657. },
  658. },
  659. };
  660. this.pLoading = true;
  661. this.pNum++;
  662. if (edit) {
  663. this.maskFlag = this.message.loading("正在加载中..", {
  664. nzDuration: 0,
  665. }).messageId;
  666. }
  667. this.mainService
  668. .getFetchDataList("data", "user", postData)
  669. .subscribe((data) => {
  670. this.pNum--;
  671. if (this.pNum === 0) {
  672. this.pLoading = false;
  673. if (edit) {
  674. this.message.remove(this.maskFlag);
  675. this.maskFlag = false;
  676. this.personModal = true;
  677. }
  678. }
  679. if (data.status == 200) {
  680. this.personList = data.list;
  681. if (edit) {
  682. let arr = [];
  683. let arrIds = [];
  684. info.users.forEach((item) => {
  685. let flag = this.personList.some((v) => v.id == item.id);
  686. if (!flag) {
  687. arr.push(item);
  688. }
  689. arrIds.push(item.id + "");
  690. });
  691. this.personList = [...arr, ...this.personList];
  692. this.validatePersonForm.controls.quickCombinationPerson.setValue(
  693. arrIds
  694. ); //人员
  695. }
  696. }
  697. });
  698. }
  699. // 搜索分配人员列表
  700. searchPersonList(e) {
  701. this.getPersonList(true, e);
  702. }
  703. groupsList = []; //分组列表
  704. gpLoading = false;
  705. gpNum = 0;
  706. //获取分配分组列表
  707. getGroupsList(flag?, search = "", edit?, info?) {
  708. if (!flag) {
  709. return;
  710. }
  711. let hosIds = this.currentHospital.id;
  712. let postData = {
  713. idx: 0,
  714. sum: 20,
  715. group2: {
  716. groupName: search,
  717. scheduleClass: {
  718. id: this.gpClassId,
  719. },
  720. hospitals: hosIds,
  721. },
  722. };
  723. this.gpLoading = true;
  724. if (edit) {
  725. this.maskFlag = this.message.loading("正在加载中..", {
  726. nzDuration: 0,
  727. }).messageId;
  728. }
  729. this.gpNum++;
  730. this.mainService
  731. .getFetchDataList("data", "group2", postData)
  732. .subscribe((data) => {
  733. this.gpNum--;
  734. if (this.gpNum === 0) {
  735. this.gpLoading = false;
  736. if (edit) {
  737. this.message.remove(this.maskFlag);
  738. this.maskFlag = false;
  739. this.groupsModal = true;
  740. }
  741. }
  742. if (data.status == 200) {
  743. this.groupsList = data.list;
  744. if (edit) {
  745. console.log(info);
  746. let arr = [];
  747. let arrIds = [];
  748. info.groups.forEach((item) => {
  749. let flag = this.groupsList.some((v) => v.id == item.id);
  750. if (!flag) {
  751. arr.push(item);
  752. }
  753. arrIds.push(item.id + "");
  754. });
  755. this.groupsList = [...arr, ...this.groupsList];
  756. this.validateGroupForm.controls.quickCombinationGroups.setValue(
  757. arrIds
  758. ); //分组
  759. }
  760. }
  761. });
  762. }
  763. // 搜索分配人员列表
  764. searchGroupsList(e) {
  765. this.getGroupsList(true, e);
  766. }
  767. // 表格数据
  768. loading1 = false;
  769. getList(type) {
  770. if (type == 1) {
  771. this.pageIndex = 1;
  772. }
  773. let data = {
  774. workAllocationQuickConfig: {
  775. workSchemeId: this.queryParamsId,
  776. hosId: this.currentHospital.id,
  777. },
  778. idx: this.pageIndex - 1,
  779. sum: this.pageSize,
  780. };
  781. if (this.searchCriteria.name) {
  782. data["workAllocationQuickConfig"]["configName"] =
  783. this.searchCriteria.name;
  784. }
  785. if (this.searchCriteria.workModel) {
  786. data["workAllocationQuickConfig"]["ruleType"] =
  787. this.searchCriteria.workModel;
  788. }
  789. this.loading1 = true;
  790. this.mainService
  791. .getFetchDataList("configuration", "workAllocationQuickConfig", data)
  792. .subscribe((data) => {
  793. this.loading1 = false;
  794. if (data.status == 200) {
  795. let arr = ["自由抢单", "指定分组", "科室绑定人员", "科室绑定分组"];
  796. this.listOfData = data.list;
  797. data.list.forEach((item) => {
  798. let arr1 = [];
  799. let arr2 = [];
  800. let arr3 = [];
  801. let arr4 = [];
  802. let arr5 = [];
  803. let arr6 = [];
  804. let arr7 = [];
  805. item.ruleTypeName = arr[item.ruleType - 1];
  806. item.taskTypes.forEach((v) => {
  807. arr1.push(v.taskName);
  808. arr2.push(v.id + "");
  809. });
  810. if (item.users) {
  811. item.users.forEach((v) => {
  812. arr3.push(v.name);
  813. arr6.push(v.id);
  814. });
  815. } else if (item.groups) {
  816. item.groups.forEach((v) => {
  817. arr3.push(v.groupName);
  818. arr4.push(v.id + "");
  819. });
  820. } else {
  821. arr3 = ["-"];
  822. }
  823. if (item.departmentDTOS) {
  824. item.departmentDTOS.forEach((v) => {
  825. arr5.push(v.id + "");
  826. arr7.push(v.dept);
  827. });
  828. } else {
  829. arr7 = ["-"];
  830. }
  831. item.taskTypesName = arr1;
  832. item.taskTypesId = arr2;
  833. item.allName = arr3;
  834. item.groupsId = arr4;
  835. item.departmentDTOSId = arr5;
  836. item.usersId = arr6;
  837. item.departmentDTOSName = arr7;
  838. });
  839. this.listLength = data.totalNum;
  840. }
  841. });
  842. }
  843. // 新增/编辑弹框
  844. addModal() {
  845. this.add = true; //新增
  846. this.modal = true;
  847. this.initForm();
  848. }
  849. //关闭新增/编辑弹框
  850. hideAddModal() {
  851. this.modal = false;
  852. this.copyFlag = false;
  853. this.initForm();
  854. }
  855. // 新增/编辑弹框
  856. ruleTypeCoopId;
  857. addPersonModal(e, data) {
  858. e.stopPropagation();
  859. this.coopId = data.id;
  860. this.ruleTypeCoopId = data.ruleType;
  861. this.initPersonForm();
  862. this.getPersonList(true, "", "edit", data);
  863. }
  864. //关闭
  865. hidePersonModal() {
  866. this.personModal = false;
  867. this.initPersonForm();
  868. }
  869. // 分配分组弹框
  870. gpClassId;
  871. addGroupsModal(e, data) {
  872. e.stopPropagation();
  873. console.log(data);
  874. this.gpClassId = data.classes.id;
  875. this.coopId = data.id;
  876. this.ruleTypeCoopId = data.ruleType;
  877. this.initGroupsForm();
  878. this.getGroupsList(true, "", "edit", data);
  879. }
  880. //关闭
  881. hideGroupsModal() {
  882. this.groupsModal = false;
  883. this.initGroupsForm();
  884. }
  885. // 初始化新增form表单
  886. initForm() {
  887. this.taskList = [];
  888. this.currentClassId = "";
  889. this.quickCombinationModel = "";
  890. this.taskListFlag = true;
  891. this.validateForm = this.fb.group({
  892. quickCombinationName: [null, [Validators.required]],
  893. quickCombinationClass: [null, [Validators.required]],
  894. quickCombinationType: [null, [Validators.required]],
  895. quickCombinationModel: [null, [Validators.required]],
  896. quickCombinationDept: this.requireGroup
  897. ? [null, [Validators.required]]
  898. : [null],
  899. quickCombinationGroup: this.requireDept
  900. ? [null, [Validators.required]]
  901. : [null],
  902. });
  903. }
  904. // 初始化新增form表单
  905. initPersonForm() {
  906. this.validatePersonForm = this.fb.group({
  907. quickCombinationPerson: [null, [Validators.required]],
  908. });
  909. }
  910. // 初始化新增form表单
  911. initGroupsForm() {
  912. this.validateGroupForm = this.fb.group({
  913. quickCombinationGroups: [null, [Validators.required]],
  914. });
  915. }
  916. //生效
  917. takeEffect() {
  918. let postData = { workSchemeId: this.queryParamsId };
  919. this.tLoading = true;
  920. this.showPromptModal("生效", false, "", true);
  921. this.mainService
  922. .coopConfig(
  923. this.queryParamsType == 1 ? "takeEffect" : "optionalTakeEffect",
  924. postData
  925. )
  926. .subscribe((data) => {
  927. if (data.state == 200) {
  928. this.ifSuccess = true;
  929. this.promptInfo = "";
  930. this.showLoading = false;
  931. } else if (data.state == 201 || data.state == 203) {
  932. this.promptInfo = data.msg;
  933. this.showLoading = false;
  934. } else {
  935. this.promptInfo = "";
  936. this.showLoading = false;
  937. }
  938. });
  939. }
  940. // 新增/编辑表单提交
  941. submitForm(): void {
  942. for (const i in this.validateForm.controls) {
  943. this.validateForm.controls[i].markAsDirty();
  944. this.validateForm.controls[i].updateValueAndValidity();
  945. }
  946. console.log(this.validateForm);
  947. this.btnLoading = true;
  948. if (this.validateForm.invalid) {
  949. this.btnLoading = false;
  950. return;
  951. }
  952. let data = {};
  953. let taskTypesIds = this.validateForm.value.quickCombinationType.map(
  954. (item) => {
  955. return {
  956. id: item,
  957. };
  958. }
  959. );
  960. data = {
  961. workAllocationQuickConfig: {
  962. hosId: this.currentHospital.id,
  963. configName: this.validateForm.value.quickCombinationName,
  964. classes: {
  965. id: this.validateForm.value.quickCombinationClass,
  966. },
  967. taskTypes: taskTypesIds,
  968. ruleType: this.quickCombinationModelComputed,
  969. workSchemeId: this.queryParamsId,
  970. },
  971. };
  972. //添加科室字段,绑定人字段
  973. if (
  974. this.validateForm.value.quickCombinationDept &&
  975. this.quickCombinationModel == 3 &&
  976. this.queryParamsType == 1
  977. ) {
  978. let departmentDTOS = this.validateForm.value.quickCombinationDept.map(
  979. (item) => {
  980. return {
  981. id: item,
  982. };
  983. }
  984. );
  985. let usersId = [];
  986. if (!this.add) {
  987. usersId = this.info.usersId.map((item) => {
  988. return {
  989. id: item,
  990. };
  991. });
  992. }
  993. data["workAllocationQuickConfig"]["departmentDTOS"] = departmentDTOS;
  994. if (!this.add) {
  995. if (this.info.ruleType != this.quickCombinationModel || this.copyFlag) {
  996. data["workAllocationQuickConfig"]["users"] = null;
  997. } else {
  998. data["workAllocationQuickConfig"]["users"] = usersId;
  999. }
  1000. }
  1001. }
  1002. //添加科室字段,绑定组字段
  1003. if (
  1004. this.validateForm.value.quickCombinationDept &&
  1005. this.quickCombinationModel == 4
  1006. ) {
  1007. let departmentDTOS = this.validateForm.value.quickCombinationDept.map(
  1008. (item) => {
  1009. return {
  1010. id: item,
  1011. };
  1012. }
  1013. );
  1014. let groupsId = [];
  1015. if (!this.add) {
  1016. groupsId = this.info.groupsId.map((item) => {
  1017. return {
  1018. id: item,
  1019. };
  1020. });
  1021. }
  1022. data["workAllocationQuickConfig"]["departmentDTOS"] = departmentDTOS;
  1023. if (!this.add) {
  1024. if (this.info.ruleType != this.quickCombinationModel || this.copyFlag) {
  1025. data["workAllocationQuickConfig"]["groups"] = null;
  1026. } else {
  1027. data["workAllocationQuickConfig"]["groups"] = groupsId;
  1028. }
  1029. }
  1030. }
  1031. //指定分组,添加分组字段
  1032. console.log(this.validateForm.value.quickCombinationGroup);
  1033. if (
  1034. this.validateForm.value.quickCombinationGroup &&
  1035. (this.quickCombinationModel == 2 || this.quickCombinationModel == 5 || this.quickCombinationModel == 6)
  1036. ) {
  1037. if(this.quickCombinationModel == 5){
  1038. let groups = this.validateForm.value.quickCombinationGroup.map((item) => {
  1039. return {
  1040. id: item,
  1041. };
  1042. });
  1043. if (groups.length > 0) {
  1044. if (this.copyFlag) {
  1045. data["workAllocationQuickConfig"]["groups"] = null;
  1046. } else {
  1047. data["workAllocationQuickConfig"]["groups"] = groups;
  1048. }
  1049. } else {
  1050. data["workAllocationQuickConfig"]["groups"] = null;
  1051. }
  1052. }else if(this.quickCombinationModel == 6){
  1053. if(this.validateForm.value.quickCombinationGroup){
  1054. let groups = [{id:this.validateForm.value.quickCombinationGroup}];
  1055. if (this.copyFlag) {
  1056. data["workAllocationQuickConfig"]["groups"] = null;
  1057. } else {
  1058. data["workAllocationQuickConfig"]["groups"] = groups;
  1059. }
  1060. }else{
  1061. data["workAllocationQuickConfig"]["groups"] = null;
  1062. }
  1063. }
  1064. }
  1065. if (!this.add && !this.copyFlag) {
  1066. //编辑
  1067. data["workAllocationQuickConfig"]["id"] = this.info.id;
  1068. }
  1069. this.mainService
  1070. .coopTypeConfig(
  1071. this.add || (!this.add && this.copyFlag) ? "addData" : "updData",
  1072. "workAllocationQuickConfig",
  1073. data
  1074. )
  1075. .subscribe((result) => {
  1076. this.btnLoading = false;
  1077. if (result.status == 200) {
  1078. console.log(this.copyFlag);
  1079. if (this.add) {
  1080. this.showPromptModal("新增", true, "");
  1081. this.listLength++;
  1082. } else if (this.copyFlag) {
  1083. this.showPromptModal("复制", true, "");
  1084. this.listLength++;
  1085. } else if (!this.copyFlag) {
  1086. //编辑
  1087. this.showPromptModal("编辑", true, "");
  1088. }
  1089. } else {
  1090. let msg = "";
  1091. if (this.add) {
  1092. msg = "新增";
  1093. } else if (!this.copyFlag) {
  1094. msg = "修改";
  1095. } else if (this.copyFlag) {
  1096. msg = "复制";
  1097. }
  1098. this.showPromptModal(msg, false, result.msg);
  1099. }
  1100. this.hideAddModal();
  1101. this.initForm();
  1102. });
  1103. }
  1104. // 分配人员提交
  1105. submitPersonForm(): void {
  1106. this.btnLoading = true;
  1107. for (const i in this.validatePersonForm.controls) {
  1108. this.validatePersonForm.controls[i].markAsDirty();
  1109. this.validatePersonForm.controls[i].updateValueAndValidity();
  1110. }
  1111. if (this.validatePersonForm.invalid) {
  1112. this.btnLoading = false;
  1113. return;
  1114. }
  1115. let usersIds = [];
  1116. if (this.validatePersonForm.value.quickCombinationPerson) {
  1117. usersIds = this.validatePersonForm.value.quickCombinationPerson.map(
  1118. (item) => {
  1119. return { id: item };
  1120. }
  1121. );
  1122. }
  1123. let data = {
  1124. workAllocationQuickConfig: {
  1125. hosId: this.currentHospital.id,
  1126. id: this.coopId,
  1127. users: usersIds,
  1128. ruleType: this.ruleTypeCoopId,
  1129. },
  1130. };
  1131. this.mainService
  1132. .coopTypeConfig("updData", "workAllocationQuickConfig", data)
  1133. .subscribe((data) => {
  1134. this.btnLoading = false;
  1135. this.hidePersonModal();
  1136. this.initPersonForm();
  1137. if (data.status == 200) {
  1138. this.showPromptModal("分配人员", true, "");
  1139. } else {
  1140. this.showPromptModal("分配人员", false, data.msg);
  1141. }
  1142. });
  1143. }
  1144. // 分配分组提交
  1145. submitGroupsForm(): void {
  1146. this.btnLoading = true;
  1147. for (const i in this.validateGroupForm.controls) {
  1148. this.validateGroupForm.controls[i].markAsDirty();
  1149. this.validateGroupForm.controls[i].updateValueAndValidity();
  1150. }
  1151. if (this.validateGroupForm.invalid) {
  1152. this.btnLoading = false;
  1153. return;
  1154. }
  1155. let groupIds = [];
  1156. if (this.validateGroupForm.value.quickCombinationGroups) {
  1157. groupIds = this.validateGroupForm.value.quickCombinationGroups.map(
  1158. (item) => {
  1159. return { id: item };
  1160. }
  1161. );
  1162. }
  1163. let data = {
  1164. workAllocationQuickConfig: {
  1165. hosId: this.currentHospital.id,
  1166. id: this.coopId,
  1167. groups: groupIds,
  1168. ruleType: this.ruleTypeCoopId,
  1169. },
  1170. };
  1171. this.mainService
  1172. .coopTypeConfig("updData", "workAllocationQuickConfig", data)
  1173. .subscribe((data) => {
  1174. this.btnLoading = false;
  1175. this.hideGroupsModal();
  1176. this.initGroupsForm();
  1177. if (data.status == 200) {
  1178. this.showPromptModal("分配分组", true, "");
  1179. } else {
  1180. this.showPromptModal("分配分组", false, data.msg);
  1181. }
  1182. });
  1183. }
  1184. // 复制
  1185. copyFlag = false;
  1186. copy(e, data) {
  1187. e.stopPropagation();
  1188. console.log(data);
  1189. this.add = false;
  1190. this.copyFlag = true;
  1191. this.coopId = data.id;
  1192. this.info = data;
  1193. this.ids = data.taskTypesId;
  1194. this.currentClassId = data.classes.id;
  1195. this.getClassList(true, true);
  1196. }
  1197. // 编辑
  1198. info; //编辑时候保存的信息
  1199. edit(e, data) {
  1200. e.stopPropagation();
  1201. console.log(data);
  1202. this.add = false;
  1203. this.coopId = data.id;
  1204. this.info = data;
  1205. this.validateForm.controls.quickCombinationName.setValue(data.configName); //快捷组合名称
  1206. this.ids = data.taskTypesId;
  1207. this.currentClassId = data.classes.id;
  1208. this.getClassList(true, true);
  1209. }
  1210. // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
  1211. // promptModalUrl = '';
  1212. showPromptModal(con, success, promptInfo?, loading?) {
  1213. this.promptModalShow = false;
  1214. this.promptContent = con;
  1215. this.ifSuccess = success;
  1216. this.promptInfo = promptInfo;
  1217. if (loading !== undefined) {
  1218. this.showLoading = loading;
  1219. } else {
  1220. this.showLoading = false;
  1221. this.getList(0);
  1222. }
  1223. // this.promptModalUrl = url;
  1224. setTimeout(() => {
  1225. this.promptModalShow = true;
  1226. }, 100);
  1227. }
  1228. // 选中表格中快捷建单
  1229. isAllDisplayDataChecked = false; //当前页是否全选
  1230. mapOfCheckedId = {};
  1231. checkedDepIds = []; //已选中快捷建单id
  1232. refreshStatus(): void {
  1233. this.isAllDisplayDataChecked = this.listOfData.every(
  1234. (item) => this.mapOfCheckedId[item.id]
  1235. );
  1236. let arr = [];
  1237. for (var k in this.mapOfCheckedId) {
  1238. if (this.mapOfCheckedId[k]) {
  1239. arr.push(Number(k));
  1240. }
  1241. }
  1242. this.checkedDepIds = arr;
  1243. console.log(this.checkedDepIds, this.isAllDisplayDataChecked);
  1244. }
  1245. // 整行选中或不选中
  1246. selectedListData(id) {
  1247. this.mapOfCheckedId[id] = !this.mapOfCheckedId[id];
  1248. this.refreshStatus();
  1249. }
  1250. // 全选
  1251. checkAll(value: boolean): void {
  1252. this.listOfData.forEach((item) => (this.mapOfCheckedId[item.id] = value));
  1253. this.refreshStatus();
  1254. }
  1255. // 删除轮巡计划
  1256. delModal: boolean = false; //删除模态框
  1257. tipsMsg1: string; //提示框信息
  1258. tipsMsg2: string; //操作后信息
  1259. confirmDelType: string; //确认的类型(启用/停用,删除)
  1260. confirmDelIsSwitch: boolean; //启用/停用
  1261. showDelModal(
  1262. e,
  1263. id: any,
  1264. tipsMsg1: string,
  1265. tipsMsg2: string,
  1266. type: string,
  1267. isSwitch?: boolean
  1268. ) {
  1269. e.stopPropagation();
  1270. this.confirmDelIsSwitch = isSwitch;
  1271. this.confirmDelType = type;
  1272. this.delModal = true;
  1273. this.coopId = id;
  1274. this.tipsMsg1 = tipsMsg1;
  1275. this.tipsMsg2 = tipsMsg2;
  1276. }
  1277. // 隐藏删除框
  1278. hideDelModal() {
  1279. this.delModal = false;
  1280. }
  1281. // 确认删除
  1282. confirmDel() {
  1283. this.btnLoading = true;
  1284. if (this.confirmDelType === "del") {
  1285. //删除
  1286. let arrData = [];
  1287. if (Array.isArray(this.coopId)) {
  1288. arrData = this.coopId;
  1289. } else {
  1290. arrData = [this.coopId];
  1291. }
  1292. this.mainService
  1293. .coopTypeConfig("rmvData", "workAllocationQuickConfig", arrData)
  1294. .subscribe((data) => {
  1295. this.btnLoading = false;
  1296. this.delModal = false;
  1297. if (data.status == 200) {
  1298. if (
  1299. this.listOfData.length == 1 &&
  1300. this.pageIndex == Math.ceil(this.listLength / this.pageSize)
  1301. ) {
  1302. this.listLength--;
  1303. if (this.listLength === 0) {
  1304. this.pageIndex = 1;
  1305. } else {
  1306. this.pageIndex = Math.ceil(this.listLength / this.pageSize);
  1307. }
  1308. }
  1309. this.showPromptModal(this.tipsMsg2, true, "");
  1310. this.isAllDisplayDataChecked = false;
  1311. this.checkedDepIds = [];
  1312. this.mapOfCheckedId = {};
  1313. } else {
  1314. this.showPromptModal(this.tipsMsg2, false, data.msg);
  1315. }
  1316. });
  1317. }
  1318. }
  1319. // ----------返回拦截------------
  1320. tipModal = false;
  1321. // tipMsg1 = '是否确定离开该界面,如果未点击生效,数据可能会遗失?';
  1322. // 隐藏模态框
  1323. hideTipModal() {
  1324. this.tipModal = false;
  1325. }
  1326. // 返回
  1327. goToWorkAssignment() {
  1328. this.tipModal = true;
  1329. }
  1330. // 模态框确认
  1331. confirmTip() {
  1332. this.tipModal = false;
  1333. this.router.navigateByUrl(`/main/workAssignment`);
  1334. }
  1335. }