configuration-specimen.component.ts 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695
  1. import { Component, OnInit } from "@angular/core";
  2. import { MainService } from "../../../services/main.service";
  3. import { ToolService } from 'src/app/services/tool.service';
  4. import { NzMessageService } from 'ng-zorro-antd';
  5. import { Subject, forkJoin } from 'rxjs';
  6. import { debounceTime } from 'rxjs/operators';
  7. @Component({
  8. selector: "app-configuration-specimen",
  9. templateUrl: "./configuration-specimen.component.html",
  10. styleUrls: ["./configuration-specimen.component.less"],
  11. })
  12. export class ConfigurationSpecimenComponent implements OnInit {
  13. loading:boolean = false; //页面加载的loading
  14. btnLoading:boolean = false; //提交按钮的loading
  15. tabModalName:string = 'characteristics'; //当前选中的tab
  16. hosId = this.tool.getCurrentHospital().id; //当前院区
  17. // tab类型
  18. dictionaryKeyList:any[] = [
  19. {
  20. name:'检验标本',key:'examine'
  21. },
  22. {
  23. name:'病理标本',key:'pathology'
  24. },
  25. {
  26. name:'标本打包',key:'specimenPackage'
  27. }
  28. ];
  29. spePackageUnionReceive:any = undefined;//是否联合标本收取
  30. spePackageModel:any = undefined;//工单模式
  31. drugsCreateSign:any = [{ label:'是否开启', value: 0 }];//支持建单并签到
  32. drugsReceiveSign:any = [{ label:'是否开启', value: 0 }];//支持接单并签到
  33. drugsStartCheck:any = [{ label:'是否开启', value: 0 }];//起点科室支持核对
  34. drugsStartCheckScanIds:any = [];//起点核对方式
  35. drugsStartManual:any = undefined;//起点科室手动填写
  36. drugsEndCheck:any = [{ label:'是否开启', value: 1 }];//终点科室支持核对
  37. drugsEndCheckScanIds:any = [];//终点核对方式
  38. drugsEndManual:any = undefined;//终点科室手动填写
  39. spePackageAutoPack:any = [{ label:'是否开启', value: 0 }];//自动打包
  40. spePackageUrgents:any[] = [{label: '急标', value: 1}, {label: '普标', value: 0}];//自动关联急标普标急标
  41. spePackageTubeIds:any[] = [];// 自动关联试管类型
  42. spePackageTubeList:any[] = [];// 自动关联试管类型列表
  43. spePackageInventoryTypes:any[] = [{label: '患者', value: 1, disabled: true, checked: true}, {label: '试管', value: 2}];//清点方式
  44. spePackageCreateOrder:any = [{ label:'是否开启', value: 0 }];//生成配送工单
  45. spePackageCodeSize:any = undefined;//条码打印尺寸
  46. // 是否允许转派
  47. handoverOrder:any[] = [
  48. {label:'是否开启',value: 0}
  49. ];
  50. // 工单模式
  51. spePackageModelList:any[] = [
  52. { label: '一单一包', value: 1 },
  53. ];
  54. // 手动填写
  55. drugsManualList:any[] = [];
  56. // 是否支持根据手术新建申请单
  57. autoCreate:any[] = [
  58. {label:'是否开启',value: 0}
  59. ];
  60. // 是否是否支持门诊新增申请单
  61. outpatientCreatePathologyForm:any[] = [
  62. {label:'是否开启',value: 0}
  63. ];
  64. outpatientPathologyLabelSize:any; //门诊病理标签样式
  65. surgeryPathologyLabelSize:any //手术病理标签样式
  66. // 门诊支持离体并固定
  67. outpatientInVitroFixation:any[] = [
  68. {label:'是否开启',value: 0}
  69. ];
  70. // 扫描时指定科室不提醒勾选项
  71. deptNotAlert:any[] = [
  72. {label:'是否开启',value: 0}
  73. ];
  74. // 收取时需扫描二维码
  75. arriveScanCode:any[] = [
  76. {label:'是否开启',value: 0}
  77. ];
  78. // 必须扫描动态二维码
  79. arriveScanDynamicCode:any[] = [
  80. {label:'是否开启',value: 0}
  81. ];
  82. // 必须扫描动态二维码
  83. enterDynamicDigitalKey:any[] = [
  84. {label:'是否开启',value: 0}
  85. ];
  86. // 退回标本是否填写交接人
  87. returnSpecimenWhetherHandover:any[] = [
  88. {label:'是否开启',value: 0}
  89. ];
  90. // 显示接单签到按钮
  91. bigScanShowSignBtn:any[] = [
  92. {label:'是否开启',value: 0}
  93. ];
  94. // 支持待到达非本人
  95. bigScanArriveNotOwner:any[] = [
  96. {label:'是否开启',value: 0}
  97. ];
  98. // 显示建单并签到按钮
  99. bigScanShowCreateBtn:any[] = [
  100. {label:'是否开启',value: 0}
  101. ];
  102. // 默认扫描标本进入标本扫描页
  103. defaultScanSpe:any[] = [
  104. {label:'是否开启',value: 0}
  105. ];
  106. // 是否开通收取限制
  107. speCollectLimit:any[] = [
  108. {label:'是否开启',value: 0}
  109. ];
  110. // 是否支持非起点科室收取
  111. speCollectSupportNotStartDept:any[] = [
  112. {label:'是否开启',value: 0}
  113. ];
  114. // 限制标本状态收取
  115. speCollectLimitState:any = [];
  116. // 限制终点科室收取
  117. speCollectLimitEndDept:any = [];
  118. // 限制普通或紧急收取
  119. speCollectLimitUrgent:any = [];
  120. // 是否限制重复收取标本
  121. speCollectLimitRepeat:any[]= [
  122. {label:'是否开启',value: 0}
  123. ];
  124. // 是否限制试管类型收取标本
  125. speCollectLimitTubeType:any[];
  126. // 是否开始收取前进入配置页
  127. speStartCollectShowConfig:any[] = [
  128. {label:'是否开启',value: 0}
  129. ];
  130. // 速冻标本数量控制
  131. pathologyFrozenSpecimenNum:any = '0';
  132. // 提示语
  133. prompt:any;
  134. //申请单条码设置
  135. pathologyBarCode:any;
  136. // 配置
  137. configs:any = {};
  138. // 任务类型
  139. tasktype:any = {};
  140. specimenStateData:any = [];
  141. endDeptData:any = [];
  142. repetitionData:any = [];
  143. astrictData:any = [
  144. {name:'普通',id:'0'},
  145. {name:'紧急',id:'1'},
  146. ]
  147. searchTimerSubject = new Subject();
  148. constructor(private mainService: MainService,private tool: ToolService,private msg: NzMessageService) {}
  149. ngOnInit():void {
  150. // todo
  151. this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
  152. let fun = v[0];
  153. fun.call(this, v[1]);
  154. });
  155. this.getDeptDic();
  156. this.getDeptList();
  157. this.getTaskType();
  158. }
  159. // 获取科室类型
  160. deptItem:any;
  161. getDeptDic(e:string = ''){
  162. this.mainService.getDictionary("list", "speState").subscribe((res) => {
  163. this.specimenStateData = res
  164. })
  165. this.mainService.getDictionary("list", "specimen_tube_type").subscribe((res) => {
  166. this.repetitionData = res
  167. })
  168. this.mainService.getDictionary("list", "dept_type").subscribe((res2) => {
  169. this.deptItem = res2.find(i=>i.name=='检验科室')
  170. let data1 = {
  171. idx: 0,
  172. sum: 9999,
  173. department: {
  174. hospital: { id: this.hosId || "" },
  175. type: { id: this.deptItem.id || "" },
  176. dept: e,
  177. },
  178. };
  179. this.mainService
  180. .getFetchDataList("data", "department", data1)
  181. .subscribe((res) => {
  182. this.endDeptData = res.list;
  183. });
  184. })
  185. }
  186. getEndDeptData(e){
  187. let data1 = {
  188. idx: 0,
  189. sum: 9999,
  190. department: {
  191. hospital: { id: this.hosId || "" },
  192. type: { id: this.deptItem.id || "" },
  193. dept: e,
  194. },
  195. };
  196. this.mainService
  197. .getFetchDataList("data", "department", data1)
  198. .subscribe((res) => {
  199. this.isLoading = false;
  200. this.endDeptData = res.list;
  201. });
  202. }
  203. // 搜索起点科室
  204. changeEndDept(e){
  205. this.searchTimer(this.getEndDeptData, e);
  206. }
  207. // 点击数据字典key
  208. activeDictionaryKey:any = 'examine';
  209. clickDictionaryKey(item){
  210. this.activeDictionaryKey = item.key;
  211. this.tabModal('characteristics');
  212. if(item.key=='examine'){
  213. this.getDeptList();
  214. this.getTaskType();
  215. }else if(item.key=='pathology'){
  216. this.getLabelDic()
  217. this.getTaskTypesId()
  218. }else if(item.key=='specimenPackage'){
  219. this.getDeptList();
  220. this.loading = true;
  221. let drugs_bag_check_scan_type$ = this.mainService.getDictionary('list', 'drugs_bag_check_scan_type', true);
  222. let drugs_bag_manual_type$ = this.mainService.getDictionary('list', 'drugs_bag_manual_type', true);
  223. let specimen_tube_type$ = this.mainService.getDictionary('list', 'specimen_tube_type', true);
  224. forkJoin(drugs_bag_check_scan_type$, drugs_bag_manual_type$, specimen_tube_type$).subscribe((data:any[]) => {
  225. let drugs_bag_check_scan_type = data[0] || [];
  226. let drugs_bag_manual_type = data[1] || [];
  227. let specimen_tube_type = data[2] || [];
  228. this.drugsStartCheckScanIds = drugs_bag_check_scan_type.map(v => ({ label:v.name, value: v.id }));
  229. this.drugsEndCheckScanIds = drugs_bag_check_scan_type.map(v => ({ label:v.name, value: v.id }));
  230. this.drugsManualList = drugs_bag_manual_type.map(v => ({ label:v.name, value: v.id }));
  231. this.spePackageTubeList = specimen_tube_type.map(v => ({ label:v.name, value: v.id }));
  232. this.getTaskTypeByOrdinary('specimenPackage')
  233. })
  234. }
  235. }
  236. changeSpeCollect(e){
  237. if(!e[0].checked){
  238. }
  239. }
  240. // 扫描时指定科室不提醒勾选项
  241. changeDeptNotAlert(e){
  242. console.log(e);
  243. if(!e[0].checked){
  244. this.deptNotAlertIds = [];
  245. }
  246. }
  247. // 收取时需扫描二维码
  248. changeArriveScanCode(e){
  249. console.log(e);
  250. if(!e[0].checked){
  251. this.arriveScanDynamicCode[0].checked = false;
  252. this.enterDynamicDigitalKey[0].checked = false;
  253. }
  254. }
  255. // 用户输入搜索
  256. isLoading: boolean = false;
  257. deptNotAlertIds:any[] = [];
  258. spePackageDeptIds:any[] = [];
  259. deptList:any[] = [];
  260. changeDept(e) {
  261. this.searchTimer(this.getDeptList, e);
  262. }
  263. // 边输入边搜索节流阀
  264. searchTimer(fun, e) {
  265. this.isLoading = true;
  266. this.searchTimerSubject.next([fun, e]);
  267. }
  268. openDeptList(flag){
  269. if(flag){
  270. this.getDeptList();
  271. }
  272. }
  273. //获取科室列表
  274. getDeptList(e:string = '') {
  275. let postData:any = {
  276. idx: 0,
  277. sum: 20,
  278. department: {
  279. searchType: 1,// 简单查询
  280. hospital: { id: this.hosId },
  281. dept: e,
  282. }
  283. };
  284. this.isLoading = true;
  285. this.mainService.getFetchDataList("simple/data", "department", postData)
  286. .subscribe((result) => {
  287. this.isLoading = false;
  288. if (result.status == 200) {
  289. this.deptList = result.list || [];
  290. }
  291. });
  292. }
  293. // 切换tab
  294. tabModal(tabModalName:string){
  295. this.tabModalName = tabModalName;
  296. }
  297. //病理标本保存
  298. submitPathologyForm(){
  299. let postData:any = {
  300. id: this.configs.id,
  301. taskType: this.taskTypeData.id,
  302. hosId: this.hosId,
  303. autoCreate: this.autoCreate[0].checked ? 1 : 0,
  304. outpatientCreatePathologyForm: this.outpatientCreatePathologyForm[0].checked ? 1 : 0,
  305. outpatientInVitroFixation: this.outpatientInVitroFixation[0].checked ? 1 : 0,
  306. pathologyBarCode : this.pathologyBarCode,
  307. pathologyFrozenSpecimenNum : this.pathologyFrozenSpecimenNum,
  308. prompt : this.prompt?this.prompt:undefined,
  309. outpatientPathologyLabelSize:{
  310. id:this.outpatientPathologyLabelSize
  311. },
  312. surgeryPathologyLabelSize:{
  313. id:this.surgeryPathologyLabelSize
  314. },
  315. };
  316. this.btnLoading = true;
  317. this.mainService
  318. .simplePost("addData", "taskTypeConfig", postData)
  319. .subscribe((result) => {
  320. this.btnLoading = false;
  321. if (result.status == 200) {
  322. this.getConfig();
  323. }
  324. });
  325. }
  326. // 检验标本保存
  327. submitForm() {
  328. if(!this.tasktype.id){
  329. this.msg.create("warning", "请先配置患者陪检任务类型!");
  330. return;
  331. }
  332. if(this.deptNotAlert[0].checked && !this.deptNotAlertIds.length){
  333. this.msg.create("warning", "请选择科室!");
  334. return;
  335. }
  336. let postData:any = {
  337. id: this.configs.id,
  338. taskType: this.tasktype.id,
  339. hosId: this.hosId,
  340. deptNotAlert: this.deptNotAlert[0].checked ? 1 : 0,
  341. arriveScanCode: this.arriveScanCode[0].checked ? 1 : 0,
  342. arriveScanDynamicCode: this.arriveScanDynamicCode[0].checked ? 1 : 0,
  343. enterDynamicDigitalKey: this.enterDynamicDigitalKey[0].checked ? 1 : 0,
  344. returnSpecimenWhetherHandover: this.returnSpecimenWhetherHandover[0].checked ? 1 : 0,
  345. bigScanShowSignBtn: this.bigScanShowSignBtn[0].checked ? 1 : 0,
  346. bigScanArriveNotOwner: this.bigScanArriveNotOwner[0].checked ? 1 : 0,
  347. bigScanShowCreateBtn: this.bigScanShowCreateBtn[0].checked ? 1 : 0,
  348. defaultScanSpe: this.defaultScanSpe[0].checked ? 1 : 0,
  349. deptNotAlertIds: this.deptNotAlertIds && this.deptNotAlertIds.length>0 ? this.deptNotAlertIds.toString() : undefined,
  350. speCollectLimit: this.speCollectLimit[0].checked ? 1 : 0,
  351. speCollectSupportNotStartDept: null,
  352. speCollectLimitRepeat: null,
  353. speCollectLimitTubeType: null,
  354. speStartCollectShowConfig: null,
  355. speCollectLimitState: null,
  356. speCollectLimitEndDept: null,
  357. speCollectLimitUrgent: null,
  358. handoverOrder: this.handoverOrder[0].checked ? 1 : 0,
  359. };
  360. if(this.speCollectLimit[0].checked){
  361. postData.speCollectSupportNotStartDept = this.speCollectSupportNotStartDept[0].checked ? 1 : 0;
  362. postData.speCollectLimitRepeat = this.speCollectLimitRepeat[0].checked ? 1 : 0;
  363. postData.speCollectLimitTubeType = this.speCollectLimitTubeType && this.speCollectLimitTubeType.length>0 ? this.speCollectLimitTubeType.toString() : undefined;
  364. postData.speStartCollectShowConfig = this.speStartCollectShowConfig[0].checked ? 1 : 0;
  365. postData.speCollectLimitState = this.speCollectLimitState && this.speCollectLimitState.length>0 ? this.speCollectLimitState.toString() : undefined;
  366. postData.speCollectLimitEndDept = this.speCollectLimitEndDept && this.speCollectLimitEndDept.length>0 ? this.speCollectLimitEndDept.toString() : undefined;
  367. postData.speCollectLimitUrgent = this.speCollectLimitUrgent && this.speCollectLimitUrgent.length>0 ? this.speCollectLimitUrgent.toString() : undefined;
  368. }else{
  369. postData.speCollectSupportNotStartDept = undefined;
  370. postData.speCollectLimitRepeat = undefined;
  371. postData.speCollectLimitTubeType = undefined;
  372. postData.speStartCollectShowConfig = undefined;
  373. postData.speCollectLimitState = undefined;
  374. postData.speCollectLimitEndDept = undefined;
  375. postData.speCollectLimitUrgent = undefined;
  376. }
  377. this.btnLoading = true;
  378. this.mainService
  379. .simplePost("addData", "taskTypeConfig", postData)
  380. .subscribe((result) => {
  381. this.btnLoading = false;
  382. if (result.status == 200) {
  383. this.getConfig();
  384. }
  385. });
  386. }
  387. // 标本打包保存
  388. submitSpecimenPackageForm() {
  389. if(!this.tasktype.id){
  390. this.msg.create("warning", "请先配置关联任务类型!");
  391. return;
  392. }
  393. if(!this.spePackageModel){
  394. this.msg.create("warning", "请选择工单模式!");
  395. return;
  396. }
  397. if(this.drugsStartCheck[0].checked && !this.drugsStartCheckScanIds.filter(v => v.checked).length){
  398. this.msg.create("warning", "请选择起点科室的核对方式!");
  399. return;
  400. }
  401. if(this.drugsEndCheck[0].checked && !this.drugsEndCheckScanIds.filter(v => v.checked).length){
  402. this.msg.create("warning", "请选择终点科室的核对方式!");
  403. return;
  404. }
  405. let postData:any = {
  406. id: this.configs.id,
  407. taskType: this.tasktype.id,
  408. hosId: this.hosId,
  409. spePackageUnionReceive: this.spePackageUnionReceive,
  410. spePackageModel: this.spePackageModel || undefined,
  411. drugsCreateSign: this.drugsCreateSign[0].checked ? 1 : 0,
  412. drugsReceiveSign: this.drugsReceiveSign[0].checked ? 1 : 0,
  413. drugsStartCheck: this.drugsStartCheck[0].checked ? 1 : 0,
  414. drugsStartCheckScanIds: this.drugsStartCheckScanIds.filter(v => v.checked).map(v => v.value).toString() || undefined,
  415. drugsStartManual: this.drugsStartManual ? { id: this.drugsStartManual } : undefined,
  416. drugsEndCheck: this.drugsEndCheck[0].checked ? 1 : 0,
  417. drugsEndCheckScanIds: this.drugsEndCheckScanIds.filter(v => v.checked).map(v => v.value).toString() || undefined,
  418. drugsEndManual: this.drugsEndManual ? { id: this.drugsEndManual } : undefined,
  419. spePackageAutoPack: this.spePackageAutoPack[0].checked ? 1 : 0,
  420. spePackageUrgents: this.spePackageUrgents.filter(v => v.checked).map(v => v.value).toString() || undefined,
  421. spePackageDeptIds: this.spePackageDeptIds.length ? this.spePackageDeptIds.toString() : undefined,
  422. spePackageTubeIds: this.spePackageTubeIds.length ? this.spePackageTubeIds.toString() : undefined,
  423. spePackageInventoryTypes: this.spePackageInventoryTypes.filter(v => v.checked).map(v => v.value).toString() || undefined,
  424. spePackageCreateOrder: this.spePackageCreateOrder[0].checked ? 1 : 0,
  425. spePackageCodeSize: this.spePackageCodeSize || undefined,
  426. };
  427. this.btnLoading = true;
  428. this.mainService
  429. .simplePost("addData", "taskTypeConfig", postData)
  430. .subscribe((result) => {
  431. this.btnLoading = false;
  432. if (result.status == 200) {
  433. this.getConfig();
  434. }
  435. });
  436. }
  437. // 获取标本字典
  438. labelData:any = [];
  439. getLabelDic(){
  440. this.mainService.getDictionary("list", "pathology_label_size").subscribe((data) => {
  441. this.labelData = data
  442. });
  443. }
  444. // 获取任务类型(病理标本)
  445. taskTypeData:any;
  446. getTaskTypesId() {
  447. this.mainService.getDictionary("list", "ordinary_field").subscribe((data) => {
  448. this.taskTypeData = data.find(i=>i.value=='pathology')
  449. this.getConfig();
  450. });
  451. }
  452. //获取任务类型
  453. getTaskType() {
  454. this.loading = true;
  455. let postData = {
  456. idx: 0,
  457. sum: 10,
  458. taskType: {
  459. simpleQuery: true,
  460. hosId: {
  461. id: this.hosId
  462. },
  463. associationType: {
  464. key:"association_types",
  465. value: 'specimen'
  466. }
  467. }
  468. };
  469. this.mainService
  470. .getFetchDataList("simple/data", "taskType", postData)
  471. .subscribe((result) => {
  472. this.loading = false;
  473. if (result.status == 200) {
  474. this.tasktype = result.list[0] || {};
  475. this.getConfig();
  476. }
  477. });
  478. }
  479. //获取任务类型
  480. getTaskTypeByOrdinary(key) {
  481. this.loading = true;
  482. let postData = {
  483. idx: 0,
  484. sum: 10,
  485. taskType: {
  486. simpleQuery: true,
  487. hosId: {
  488. id: this.hosId
  489. },
  490. ordinaryField: {
  491. key:"ordinary_field",
  492. value: key
  493. }
  494. }
  495. };
  496. this.mainService
  497. .getFetchDataList("simple/data", "taskType", postData)
  498. .subscribe((result) => {
  499. this.loading = false;
  500. if (result.status == 200) {
  501. this.tasktype = result.list[0] || {};
  502. this.getConfig();
  503. }
  504. });
  505. }
  506. // 获取配置
  507. getConfig() {
  508. this.loading = true;
  509. let postData = null;
  510. if(this.activeDictionaryKey=='examine'){
  511. postData = {
  512. idx: 0,
  513. sum: 10,
  514. taskTypeConfig: {
  515. taskTypeDTO: {
  516. hosId: {
  517. id: this.hosId
  518. },
  519. associationType: this.tasktype.associationType
  520. }
  521. }
  522. };
  523. }else if(this.activeDictionaryKey=='pathology'){
  524. postData = {
  525. idx: 0,
  526. sum: 10,
  527. taskTypeConfig: {
  528. hosId:this.hosId,
  529. taskType:this.taskTypeData.id
  530. }
  531. };
  532. }else if(this.activeDictionaryKey=='specimenPackage'){
  533. postData = {
  534. idx: 0,
  535. sum: 10,
  536. taskTypeConfig: {
  537. taskTypeDTO: {
  538. hosId: {
  539. id: this.hosId
  540. },
  541. ordinaryField: this.tasktype.ordinaryField
  542. }
  543. }
  544. };
  545. }
  546. this.mainService
  547. .getFetchDataList("simple/data", "taskTypeConfig", postData)
  548. .subscribe((result) => {
  549. this.loading = false;
  550. if (result.status == 200) {
  551. this.configs = result.list[0] || {};
  552. if(this.activeDictionaryKey=='examine'){
  553. // 检验标本
  554. this.deptNotAlert[0].checked = this.configs.deptNotAlert == 1;
  555. this.arriveScanCode[0].checked = this.configs.arriveScanCode == 1;
  556. this.arriveScanDynamicCode[0].checked = this.configs.arriveScanDynamicCode == 1;
  557. this.enterDynamicDigitalKey[0].checked = this.configs.enterDynamicDigitalKey == 1;
  558. this.returnSpecimenWhetherHandover[0].checked = this.configs.returnSpecimenWhetherHandover == 1;
  559. this.bigScanShowSignBtn[0].checked = this.configs.bigScanShowSignBtn == 1;
  560. this.bigScanArriveNotOwner[0].checked = this.configs.bigScanArriveNotOwner == 1;
  561. this.bigScanShowCreateBtn[0].checked = this.configs.bigScanShowCreateBtn == 1;
  562. this.defaultScanSpe[0].checked = this.configs.defaultScanSpe == 1;
  563. this.deptNotAlertIds = this.configs.deptNotAlertIds ? this.configs.deptNotAlertIds.split(',').map(v => +v) : [];
  564. this.deptList = this.configs.deptNotAlertList || [];
  565. this.speCollectLimit[0].checked = this.configs.speCollectLimit == 1;
  566. this.handoverOrder[0].checked = this.configs.handoverOrder == 1;
  567. if(this.configs.speCollectLimit == 1){
  568. this.speCollectSupportNotStartDept[0].checked = this.configs.speCollectSupportNotStartDept == 1;
  569. this.speCollectLimitRepeat[0].checked = this.configs.speCollectLimitRepeat == 1;
  570. this.speCollectLimitTubeType = this.configs.speCollectLimitTubeType ? this.configs.speCollectLimitTubeType.split(',').map(v => +v) : [];
  571. this.speStartCollectShowConfig[0].checked = this.configs.speStartCollectShowConfig == 1;
  572. this.speCollectLimitState = this.configs.speCollectLimitState ? this.configs.speCollectLimitState.split(',').map(v => +v) : [];
  573. this.speCollectLimitEndDept = this.configs.speCollectLimitEndDept ? this.configs.speCollectLimitEndDept.split(',').map(v => +v) : [];
  574. this.speCollectLimitUrgent = this.configs.speCollectLimitUrgent ? this.configs.speCollectLimitUrgent.split(',').map(v => v) : [];
  575. }
  576. }else if(this.activeDictionaryKey=='pathology'){
  577. // 病理标本
  578. this.autoCreate[0].checked = this.configs.autoCreate == 1;
  579. this.outpatientCreatePathologyForm[0].checked = this.configs.outpatientCreatePathologyForm == 1;
  580. this.outpatientInVitroFixation[0].checked = this.configs.outpatientInVitroFixation == 1;
  581. this.pathologyBarCode = this.configs.pathologyBarCode;
  582. this.pathologyFrozenSpecimenNum = this.configs.pathologyFrozenSpecimenNum;
  583. this.prompt = this.configs.prompt || '';
  584. this.outpatientPathologyLabelSize = this.configs.outpatientPathologyLabelSize.id; //门诊病理标签样式
  585. this.surgeryPathologyLabelSize = this.configs.surgeryPathologyLabelSize.id //手术病理标签样式
  586. }else if(this.activeDictionaryKey=='specimenPackage'){
  587. // 标本打包
  588. this.spePackageUnionReceive = this.configs.spePackageUnionReceive || 0;
  589. this.spePackageModel = this.configs.spePackageModel || undefined;
  590. this.drugsCreateSign[0].checked = this.configs.drugsCreateSign == 1;
  591. this.drugsReceiveSign[0].checked = this.configs.drugsReceiveSign == 1;
  592. this.drugsStartCheck[0].checked = this.configs.drugsStartCheck == 1;
  593. this.drugsStartCheckScanIds = this.drugsStartCheckScanIds.map(v => ({...v, checked: (this.configs.drugsStartCheckScanIds || '').split(',').includes(v.value.toString())}));
  594. this.drugsStartManual = this.configs.drugsStartManual ? this.configs.drugsStartManual.id : undefined;
  595. this.drugsEndCheck[0].checked = true;
  596. this.drugsEndCheckScanIds = this.drugsEndCheckScanIds.map(v => ({...v, checked: (this.configs.drugsEndCheckScanIds || '').split(',').includes(v.value.toString())}));
  597. this.drugsEndManual = this.configs.drugsEndManual ? this.configs.drugsEndManual.id : undefined;
  598. this.spePackageAutoPack[0].checked = this.configs.spePackageAutoPack == 1;
  599. this.spePackageUrgents = this.spePackageUrgents.map(v => ({...v, checked: (this.configs.spePackageUrgents || '').split(',').includes(v.value.toString())}));
  600. this.spePackageDeptIds = this.configs.spePackageDeptIds ? this.configs.spePackageDeptIds.split(',').map(v => +v) : [];
  601. this.deptList = this.configs.spePackageDeptList || [];
  602. this.spePackageTubeIds = this.configs.spePackageTubeIds ? this.configs.spePackageTubeIds.split(',').map(v => +v) : [];
  603. this.spePackageInventoryTypes = this.spePackageInventoryTypes.map(v => ({...v, checked: (this.configs.spePackageInventoryTypes || '').split(',').includes(v.value.toString())}));
  604. this.spePackageCreateOrder[0].checked = this.configs.spePackageCreateOrder == 1;
  605. this.spePackageCodeSize = this.configs.spePackageCodeSize || undefined;
  606. }
  607. }
  608. });
  609. }
  610. // 修改起点科室支持核对
  611. changeDrugsStartCheck(e){
  612. console.log(e);
  613. if(!e[0].checked){
  614. this.drugsStartCheckScanIds = this.drugsStartCheckScanIds.map(v => ({...v, checked: false}));
  615. this.drugsStartManual = undefined;
  616. }
  617. }
  618. // 修改终点科室支持核对
  619. changeDrugsEndCheck(e){
  620. console.log(e);
  621. if(!e[0].checked){
  622. this.drugsEndCheckScanIds = this.drugsEndCheckScanIds.map(v => ({...v, checked: false}));
  623. this.drugsEndManual = undefined;
  624. }
  625. }
  626. // 修改自动打包
  627. changeSpePackageAutoPack(e){
  628. console.log(e);
  629. if(!e[0].checked){
  630. this.spePackageUrgents = this.spePackageUrgents.map(v => ({...v, checked: false}));
  631. this.spePackageDeptIds = [];
  632. this.spePackageTubeIds = [];
  633. }
  634. }
  635. }