|
@@ -2167,22 +2167,54 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2167
|
2167
|
templateUrl: 'assets/views/incident/tpl/toAssign.tpl.html',
|
2168
|
2168
|
controller: function ($scope, $modalInstance, api_bpm_domain, modelData, currentUserId, Alert, api_user_data) {
|
2169
|
2169
|
console.log(model,loginUser);
|
|
2170
|
+ //获取组下面的用户
|
|
2171
|
+ $scope.getUsers = function(groupId){
|
|
2172
|
+ var postData = {};
|
|
2173
|
+ if(groupId){
|
|
2174
|
+ postData = {
|
|
2175
|
+ "idx": 0,
|
|
2176
|
+ "sum": 100,
|
|
2177
|
+ user: {
|
|
2178
|
+ groupdata:{id:groupId},
|
|
2179
|
+ roledata: { rolecode: "first-line support" },
|
|
2180
|
+ roledata2: { rolecode: "second-line support" },
|
|
2181
|
+ selectType: "1"
|
|
2182
|
+ }
|
|
2183
|
+ }
|
|
2184
|
+ }else{
|
|
2185
|
+ postData = {
|
|
2186
|
+ "idx": 0,
|
|
2187
|
+ "sum": 100,
|
|
2188
|
+ user: {
|
|
2189
|
+ roledata: { rolecode: "first-line support" },
|
|
2190
|
+ roledata2: { rolecode: "second-line support" },
|
|
2191
|
+ selectType: "1"
|
|
2192
|
+ }
|
|
2193
|
+ }
|
|
2194
|
+ }
|
|
2195
|
+ api_user_data.fetchDataList('user', postData).then(function (data) {
|
|
2196
|
+ $scope.user = data.list;
|
|
2197
|
+ })
|
|
2198
|
+ }
|
2170
|
2199
|
$scope.assignUser = null;
|
2171
|
2200
|
$scope.user = [];
|
2172
|
|
- api_user_data.fetchDataList('user', {
|
|
2201
|
+ $scope.group = [];
|
|
2202
|
+ $scope.getUsers();
|
|
2203
|
+ api_user_data.fetchDataList('group', {
|
2173
|
2204
|
"idx": 0,
|
2174
|
2205
|
"sum": 100,
|
2175
|
|
- user: {
|
2176
|
|
- roledata: { rolecode: "first-line support" },
|
2177
|
|
- roledata2: { rolecode: "second-line support" },
|
2178
|
|
- selectType: "1"
|
2179
|
|
- }
|
|
2206
|
+ group: {}
|
2180
|
2207
|
}).then(function (data) {
|
2181
|
|
- $scope.user = data.list;
|
|
2208
|
+ $scope.group = data.list;
|
2182
|
2209
|
})
|
2183
|
2210
|
$scope.onChangeRotateUser = function(item){
|
2184
|
2211
|
$scope.assignUser = item.id;
|
2185
|
2212
|
}
|
|
2213
|
+ $scope.onChangeRotateGroup = function(item){
|
|
2214
|
+ $scope.assignGroup = item.id;
|
|
2215
|
+ $scope.getUsers(item.id)
|
|
2216
|
+ }
|
|
2217
|
+
|
2186
|
2218
|
$scope.ok = function () {
|
2187
|
2219
|
if (!$scope.assignUser){
|
2188
|
2220
|
Alert.swal({
|