|
@@ -114,13 +114,16 @@ app.controller('placeCtrl', ["$rootScope", "$scope", "$http", "$state", "$timeou
|
114
|
114
|
$scope.cancel = function () {
|
115
|
115
|
$modalInstance.dismiss('cancel');
|
116
|
116
|
};
|
|
117
|
+ $scope.check = {
|
|
118
|
+ areaName: data.area,
|
|
119
|
+ areaAlias: data.alias ? data.alias.split(',') : []
|
|
120
|
+ }
|
117
|
121
|
$scope.outhospital = scope.outhospital;
|
118
|
|
- $scope.areaName = data.area;
|
119
|
122
|
$scope.search = {hospital:{id:data.branch,hosName:data.branchName}};
|
120
|
|
- $scope.ok = function (areaName) {
|
|
123
|
+ $scope.ok = function (check) {
|
121
|
124
|
// if (areaName != data.area) {
|
122
|
|
- if ($scope.areaName && $scope.search.hospital.id) {
|
123
|
|
- $modalInstance.close({areaName:areaName,hospital:$scope.search.hospital});
|
|
125
|
+ if ($scope.check.areaName && $scope.search.hospital.id) {
|
|
126
|
+ $modalInstance.close({areaName:check.areaName,hospital:$scope.search.hospital,areaAlias:check.areaAlias});
|
124
|
127
|
} else {
|
125
|
128
|
SweetAlert.swal({
|
126
|
129
|
title: "修改失败!",
|
|
@@ -147,7 +150,8 @@ app.controller('placeCtrl', ["$rootScope", "$scope", "$http", "$state", "$timeou
|
147
|
150
|
"deleteFlag": 0,
|
148
|
151
|
"area": selectedItem.areaName,
|
149
|
152
|
branch: selectedItem.hospital.id,
|
150
|
|
- branchName: selectedItem.hospital.hosName
|
|
153
|
+ branchName: selectedItem.hospital.hosName,
|
|
154
|
+ alias: String(selectedItem.areaAlias)
|
151
|
155
|
}
|
152
|
156
|
}
|
153
|
157
|
api_user_data.updData('area', fildata).then(function (response) {
|
|
@@ -177,15 +181,18 @@ app.controller('placeCtrl', ["$rootScope", "$scope", "$http", "$state", "$timeou
|
177
|
181
|
templateUrl: 'assets/views/system/tpl/area.html',
|
178
|
182
|
controller: function ($scope, scope, $modalInstance, api_user_data) {
|
179
|
183
|
$scope.title = "新增区域";
|
180
|
|
- $scope.areaName = "";
|
|
184
|
+ $scope.check = {
|
|
185
|
+ areaName: "",
|
|
186
|
+ areaAlias: []
|
|
187
|
+ }
|
181
|
188
|
$scope.search = {hospital:{}};
|
182
|
189
|
$scope.outhospital = scope.outhospital;
|
183
|
190
|
$scope.cancel = function () {
|
184
|
191
|
$modalInstance.dismiss('cancel');
|
185
|
192
|
};
|
186
|
|
- $scope.ok = function (areaName) {
|
187
|
|
- if ($scope.areaName&&$scope.search.hospital.id) {
|
188
|
|
- $modalInstance.close({areaName:areaName,hospital:$scope.search.hospital});
|
|
193
|
+ $scope.ok = function (check) {
|
|
194
|
+ if ($scope.check.areaName&&$scope.search.hospital.id) {
|
|
195
|
+ $modalInstance.close({areaName:check.areaName,hospital:$scope.search.hospital,areaAlias:check.areaAlias});
|
189
|
196
|
} else {
|
190
|
197
|
SweetAlert.swal({
|
191
|
198
|
title: "新增失败!",
|
|
@@ -207,7 +214,8 @@ app.controller('placeCtrl', ["$rootScope", "$scope", "$http", "$state", "$timeou
|
207
|
214
|
"area": {
|
208
|
215
|
"area": selectedItem.areaName,
|
209
|
216
|
branch: selectedItem.hospital.id,
|
210
|
|
- branchName: selectedItem.hospital.hosName
|
|
217
|
+ branchName: selectedItem.hospital.hosName,
|
|
218
|
+ alias: String(selectedItem.areaAlias)
|
211
|
219
|
}
|
212
|
220
|
}
|
213
|
221
|
api_user_data.addData('area', fildata).then(function (response) {
|
|
@@ -288,7 +296,8 @@ app.controller('placeCtrl', ["$rootScope", "$scope", "$http", "$state", "$timeou
|
288
|
296
|
$scope.title = "修改地点";
|
289
|
297
|
$scope.check = {
|
290
|
298
|
area: data.area,
|
291
|
|
- place: data.place
|
|
299
|
+ place: data.place,
|
|
300
|
+ placeAlias: data.alias ? data.alias.split(',') : [],
|
292
|
301
|
}
|
293
|
302
|
$scope.outarea = scope.outarea;
|
294
|
303
|
$scope.cancel = function () {
|
|
@@ -321,6 +330,7 @@ app.controller('placeCtrl', ["$rootScope", "$scope", "$http", "$state", "$timeou
|
321
|
330
|
var fildata = {
|
322
|
331
|
"place": {
|
323
|
332
|
"place": check.place,
|
|
333
|
+ alias: String(check.placeAlias),
|
324
|
334
|
"area": {
|
325
|
335
|
"id": check.area.id
|
326
|
336
|
},
|
|
@@ -356,9 +366,9 @@ app.controller('placeCtrl', ["$rootScope", "$scope", "$http", "$state", "$timeou
|
356
|
366
|
controller: function ($scope, scope, $modalInstance, api_user_data) {
|
357
|
367
|
$scope.title = "新增地点";
|
358
|
368
|
if (area !== undefined) {
|
359
|
|
- $scope.check = { area: area }
|
|
369
|
+ $scope.check = { area: area, placeAlias: [] }
|
360
|
370
|
} else {
|
361
|
|
- $scope.check = {}
|
|
371
|
+ $scope.check = {placeAlias: []}
|
362
|
372
|
}
|
363
|
373
|
$scope.outarea = scope.outarea;
|
364
|
374
|
$scope.cancel = function () {
|
|
@@ -387,7 +397,8 @@ app.controller('placeCtrl', ["$rootScope", "$scope", "$http", "$state", "$timeou
|
387
|
397
|
if (check) {
|
388
|
398
|
var fildata = {
|
389
|
399
|
"place": {
|
390
|
|
- "place": check.place
|
|
400
|
+ "place": check.place,
|
|
401
|
+ "alias": String(check.placeAlias),
|
391
|
402
|
}
|
392
|
403
|
}
|
393
|
404
|
if (check.area) {
|