|
@@ -208,6 +208,8 @@ export class TaskTypeManagementComponent implements OnInit {
|
208
|
208
|
departmentTypeIds; //固定科室选择字段
|
209
|
209
|
departmentStrategy: any = {
|
210
|
210
|
id: null,
|
|
211
|
+ idv: null,
|
|
212
|
+ value: null,
|
211
|
213
|
}; //默认科室字段
|
212
|
214
|
checkoutMethod = {
|
213
|
215
|
//检验方式字段
|
|
@@ -784,7 +786,12 @@ export class TaskTypeManagementComponent implements OnInit {
|
784
|
786
|
}
|
785
|
787
|
this.carryingCourses = data.carryingCourses;
|
786
|
788
|
this.ysgcData(this.carryingCourses[this.indexs]);
|
787
|
|
- this.depa(this.carryingCourses[this.indexs].departmentStrategy.id);
|
|
789
|
+ this.depa(
|
|
790
|
+ this.carryingCourses[this.indexs].departmentStrategy,
|
|
791
|
+ this.carryingCourses[this.indexs].departmentStrategy.id +
|
|
792
|
+ "__" +
|
|
793
|
+ this.carryingCourses[this.indexs].departmentStrategy.value
|
|
794
|
+ );
|
788
|
795
|
}
|
789
|
796
|
}
|
790
|
797
|
// 获取科室类型
|
|
@@ -976,8 +983,9 @@ export class TaskTypeManagementComponent implements OnInit {
|
976
|
983
|
}
|
977
|
984
|
this.taskData.taskType["specialCloseButton"] = this.specialCloseButton;
|
978
|
985
|
if (this.departmentStrategy.id) {
|
979
|
|
- this.taskData.taskType.carryingCourses[this.indexs].departmentStrategy =
|
980
|
|
- this.departmentStrategy;
|
|
986
|
+ this.taskData.taskType.carryingCourses[this.indexs].departmentStrategy = {
|
|
987
|
+ id: this.departmentStrategy.id,
|
|
988
|
+ };
|
981
|
989
|
}
|
982
|
990
|
if (!this.departments || !this.departments.length) {
|
983
|
991
|
if (this.departmentIds) {
|
|
@@ -1692,16 +1700,22 @@ export class TaskTypeManagementComponent implements OnInit {
|
1692
|
1700
|
this.getDepartment();
|
1693
|
1701
|
this.getcheckout();
|
1694
|
1702
|
this.ysgcData(this.carryingCourses[this.indexs]);
|
1695
|
|
- this.depa(this.carryingCourses[this.indexs].departmentStrategy.id);
|
|
1703
|
+ this.depa(
|
|
1704
|
+ this.carryingCourses[this.indexs].departmentStrategy,
|
|
1705
|
+ this.carryingCourses[this.indexs].departmentStrategy.id +
|
|
1706
|
+ "__" +
|
|
1707
|
+ this.carryingCourses[this.indexs].departmentStrategy.value
|
|
1708
|
+ );
|
1696
|
1709
|
}
|
1697
|
1710
|
//处理运送过程字段
|
1698
|
1711
|
ysgcData(data) {
|
1699
|
1712
|
console.log(data, "---运送过程自动建单字段(包含各个班次的信息)-----");
|
1700
|
1713
|
console.log(this.indexs, "----索引(起点科室,终点科室对应数组的索引)----");
|
1701
|
1714
|
if (data.departmentStrategy) {
|
1702
|
|
- this.departmentStrategy.id = data.departmentStrategy.id + "";
|
|
1715
|
+ this.departmentStrategy.idv =
|
|
1716
|
+ data.departmentStrategy.id + "__" + data.departmentStrategy.value;
|
1703
|
1717
|
} else {
|
1704
|
|
- this.departmentStrategy.id = null;
|
|
1718
|
+ this.departmentStrategy.idv = null;
|
1705
|
1719
|
}
|
1706
|
1720
|
if (data.checkoutMethod) {
|
1707
|
1721
|
this.checkoutMethod.id = data.checkoutMethod.id + "";
|
|
@@ -1905,14 +1919,17 @@ export class TaskTypeManagementComponent implements OnInit {
|
1905
|
1919
|
this.dept_types = true;
|
1906
|
1920
|
}
|
1907
|
1921
|
//默认科室选择
|
1908
|
|
- depa(data, doing?): void {
|
1909
|
|
- var obj = null;
|
1910
|
|
- if (this.departmentData) {
|
1911
|
|
- obj = this.departmentData.filter((v) => v.id == data)[0];
|
1912
|
|
- }
|
1913
|
|
- console.log(obj, "-----------------------1111");
|
1914
|
|
- if (obj) {
|
1915
|
|
- if (obj.value == "2") {
|
|
1922
|
+ depa(data, e, doing?): void {
|
|
1923
|
+ console.log(e, "-----------------------1111");
|
|
1924
|
+ let arr = e.split("__");
|
|
1925
|
+ if (doing === "clear") {
|
|
1926
|
+ data.idv = e;
|
|
1927
|
+ data.id = arr[0] - 0;
|
|
1928
|
+ data.value = arr[1] - 0;
|
|
1929
|
+ }
|
|
1930
|
+ let value = arr[1];
|
|
1931
|
+ if (value) {
|
|
1932
|
+ if (value == "2") {
|
1916
|
1933
|
this.depaShow = true;
|
1917
|
1934
|
if (doing === "clear") {
|
1918
|
1935
|
//固定科室
|
|
@@ -1925,7 +1942,7 @@ export class TaskTypeManagementComponent implements OnInit {
|
1925
|
1942
|
}
|
1926
|
1943
|
this.depaShow1 = false;
|
1927
|
1944
|
this.depaShow4 = false;
|
1928
|
|
- } else if (obj.value == "5") {
|
|
1945
|
+ } else if (value == "5") {
|
1929
|
1946
|
//固定科室类型
|
1930
|
1947
|
this.depaShow4 = true;
|
1931
|
1948
|
if (doing === "clear") {
|
|
@@ -1939,7 +1956,7 @@ export class TaskTypeManagementComponent implements OnInit {
|
1939
|
1956
|
}
|
1940
|
1957
|
this.depaShow = false;
|
1941
|
1958
|
this.depaShow1 = false;
|
1942
|
|
- } else if (obj.value == "3") {
|
|
1959
|
+ } else if (value == "3") {
|
1943
|
1960
|
this.depaShow1 = true;
|
1944
|
1961
|
if (doing === "clear") {
|
1945
|
1962
|
//固定科室范围
|