|
@@ -42,6 +42,13 @@ app.controller('placeCtrl', ["$rootScope", "$scope", "$http", "$state", "$timeou
|
42
|
42
|
}
|
43
|
43
|
$scope.freshenHospital();
|
44
|
44
|
$scope.freshenarea = function () {
|
|
45
|
+ var fildata1 = fildata = {
|
|
46
|
+ "idx": 0,
|
|
47
|
+ "sum": 1000,
|
|
48
|
+ "area":{
|
|
49
|
+ hidden: 1,//展示全部
|
|
50
|
+ }
|
|
51
|
+ };
|
45
|
52
|
api_user_data.fetchDataList('area', fildata).then(function (response) {
|
46
|
53
|
if (response) {
|
47
|
54
|
if (response.status = 200) {
|
|
@@ -116,14 +123,15 @@ app.controller('placeCtrl', ["$rootScope", "$scope", "$http", "$state", "$timeou
|
116
|
123
|
};
|
117
|
124
|
$scope.check = {
|
118
|
125
|
areaName: data.area,
|
119
|
|
- areaAlias: data.alias ? data.alias.split(',') : []
|
|
126
|
+ areaAlias: data.alias ? data.alias.split(',') : [],
|
|
127
|
+ hidden: data.hidden || 0
|
120
|
128
|
}
|
121
|
129
|
$scope.outhospital = scope.outhospital;
|
122
|
130
|
$scope.search = {hospital:{id:data.branch,hosName:data.branchName}};
|
123
|
131
|
$scope.ok = function (check) {
|
124
|
132
|
// if (areaName != data.area) {
|
125
|
133
|
if ($scope.check.areaName && $scope.search.hospital.id) {
|
126
|
|
- $modalInstance.close({areaName:check.areaName,hospital:$scope.search.hospital,areaAlias:check.areaAlias});
|
|
134
|
+ $modalInstance.close({areaName:check.areaName,hospital:$scope.search.hospital,areaAlias:check.areaAlias,hidden:check.hidden});
|
127
|
135
|
} else {
|
128
|
136
|
SweetAlert.swal({
|
129
|
137
|
title: "修改失败!",
|
|
@@ -151,7 +159,8 @@ app.controller('placeCtrl', ["$rootScope", "$scope", "$http", "$state", "$timeou
|
151
|
159
|
"area": selectedItem.areaName,
|
152
|
160
|
branch: selectedItem.hospital.id,
|
153
|
161
|
branchName: selectedItem.hospital.hosName,
|
154
|
|
- alias: String(selectedItem.areaAlias)
|
|
162
|
+ alias: String(selectedItem.areaAlias),
|
|
163
|
+ hidden: selectedItem.hidden
|
155
|
164
|
}
|
156
|
165
|
}
|
157
|
166
|
api_user_data.updData('area', fildata).then(function (response) {
|
|
@@ -183,7 +192,8 @@ app.controller('placeCtrl', ["$rootScope", "$scope", "$http", "$state", "$timeou
|
183
|
192
|
$scope.title = "新增区域";
|
184
|
193
|
$scope.check = {
|
185
|
194
|
areaName: "",
|
186
|
|
- areaAlias: []
|
|
195
|
+ areaAlias: [],
|
|
196
|
+ hidden: 0
|
187
|
197
|
}
|
188
|
198
|
$scope.search = {hospital:{}};
|
189
|
199
|
$scope.outhospital = scope.outhospital;
|
|
@@ -192,7 +202,7 @@ app.controller('placeCtrl', ["$rootScope", "$scope", "$http", "$state", "$timeou
|
192
|
202
|
};
|
193
|
203
|
$scope.ok = function (check) {
|
194
|
204
|
if ($scope.check.areaName&&$scope.search.hospital.id) {
|
195
|
|
- $modalInstance.close({areaName:check.areaName,hospital:$scope.search.hospital,areaAlias:check.areaAlias});
|
|
205
|
+ $modalInstance.close({areaName:check.areaName,hospital:$scope.search.hospital,areaAlias:check.areaAlias,hidden:check.hidden});
|
196
|
206
|
} else {
|
197
|
207
|
SweetAlert.swal({
|
198
|
208
|
title: "新增失败!",
|
|
@@ -215,7 +225,8 @@ app.controller('placeCtrl', ["$rootScope", "$scope", "$http", "$state", "$timeou
|
215
|
225
|
"area": selectedItem.areaName,
|
216
|
226
|
branch: selectedItem.hospital.id,
|
217
|
227
|
branchName: selectedItem.hospital.hosName,
|
218
|
|
- alias: String(selectedItem.areaAlias)
|
|
228
|
+ alias: String(selectedItem.areaAlias),
|
|
229
|
+ hidden: selectedItem.hidden
|
219
|
230
|
}
|
220
|
231
|
}
|
221
|
232
|
api_user_data.addData('area', fildata).then(function (response) {
|