|
@@ -2159,6 +2159,87 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2159
|
2159
|
}
|
2160
|
2160
|
});
|
2161
|
2161
|
}
|
|
2162
|
+ // 指派弹窗baba
|
|
2163
|
+ $scope.toAssign = function (model) {
|
|
2164
|
+ console.log(model)
|
|
2165
|
+ var modalInstance = $modal.open({
|
|
2166
|
+ templateUrl: 'assets/views/incident/tpl/toAssign.tpl.html',
|
|
2167
|
+ controller: function ($scope, $modalInstance, api_bpm_domain, modelData, currentUserId, Alert, api_user_data) {
|
|
2168
|
+ console.log(model,loginUser);
|
|
2169
|
+ $scope.assignUser = null;
|
|
2170
|
+ $scope.user = [];
|
|
2171
|
+ api_user_data.fetchDataList('user', {
|
|
2172
|
+ "idx": 0,
|
|
2173
|
+ "sum": 100,
|
|
2174
|
+ user: {
|
|
2175
|
+ roledata: { rolecode: "first-line support" },
|
|
2176
|
+ roledata2: { rolecode: "second-line support" },
|
|
2177
|
+ selectType: "1"
|
|
2178
|
+ }
|
|
2179
|
+ }).then(function (data) {
|
|
2180
|
+ $scope.user = data.list;
|
|
2181
|
+ })
|
|
2182
|
+ $scope.onChangeRotateUser = function(item){
|
|
2183
|
+ $scope.assignUser = item.id;
|
|
2184
|
+ }
|
|
2185
|
+ $scope.ok = function () {
|
|
2186
|
+ if (!$scope.assignUser){
|
|
2187
|
+ Alert.swal({
|
|
2188
|
+ title: "操作失败",
|
|
2189
|
+ text: "请选择转派对象信息!",
|
|
2190
|
+ type: "error"
|
|
2191
|
+ });
|
|
2192
|
+ return;
|
|
2193
|
+ }
|
|
2194
|
+ api_bpm_domain.delegateTask(model.taskId, {assginee:$scope.assignUser}).then(function (response) {
|
|
2195
|
+ console.log(response)
|
|
2196
|
+ if (response.status == 200) {
|
|
2197
|
+ Alert.swal({
|
|
2198
|
+ title: "操作成功!",
|
|
2199
|
+ confirmButtonColor: "#007AFF",
|
|
2200
|
+ type: "success"
|
|
2201
|
+ });
|
|
2202
|
+ $modalInstance.close('success');
|
|
2203
|
+ } else {
|
|
2204
|
+ Alert.swal({
|
|
2205
|
+ title: "操作失败",
|
|
2206
|
+ text: "操作失败, 请稍后再试!",
|
|
2207
|
+ type: "error"
|
|
2208
|
+ });
|
|
2209
|
+ }
|
|
2210
|
+ });
|
|
2211
|
+ }
|
|
2212
|
+
|
|
2213
|
+ $scope.cancel = function () {
|
|
2214
|
+ $modalInstance.dismiss('cancel');
|
|
2215
|
+ }
|
|
2216
|
+ },
|
|
2217
|
+ size: 'sm',
|
|
2218
|
+ resolve: {
|
|
2219
|
+ api_bpm: function () {
|
|
2220
|
+ return api_bpm;
|
|
2221
|
+ },
|
|
2222
|
+ modelData: function () {
|
|
2223
|
+ return model;
|
|
2224
|
+ },
|
|
2225
|
+ currentUserId: function () {
|
|
2226
|
+ return loginUser.id;
|
|
2227
|
+ },
|
|
2228
|
+ Alert: function () {
|
|
2229
|
+ return SweetAlert;
|
|
2230
|
+ },
|
|
2231
|
+ api_user_data: function () {
|
|
2232
|
+ return api_user_data;
|
|
2233
|
+ }
|
|
2234
|
+ }
|
|
2235
|
+ });
|
|
2236
|
+ modalInstance.result.then(function (selectedItem) {
|
|
2237
|
+ if (selectedItem == 'success') {
|
|
2238
|
+ defaultFilterData.assignee = loginUser.id;
|
|
2239
|
+ $scope.refreshData('expand-right', defaultFilterData);
|
|
2240
|
+ }
|
|
2241
|
+ });
|
|
2242
|
+ }
|
2162
|
2243
|
// 协同弹窗
|
2163
|
2244
|
$scope.cooperate = function (model) {
|
2164
|
2245
|
console.log(model)
|
|
@@ -2544,10 +2625,17 @@ app.controller('IncidentOperCtrl', ['$rootScope', '$http', '$scope', '$modal', '
|
2544
|
2625
|
// console.log('$rootScope.user3='+JSON.stringify($scope.item));
|
2545
|
2626
|
// console.log($scope.item)
|
2546
|
2627
|
var loginUser = $rootScope.user;
|
|
2628
|
+ console.log(loginUser.role)
|
2547
|
2629
|
$scope.chuli = false;
|
2548
|
2630
|
$scope.qiangdan = false;
|
2549
|
2631
|
$scope.dayin = false;
|
2550
|
2632
|
$scope.huifang = false;
|
|
2633
|
+ $scope.assign = false;
|
|
2634
|
+ if(loginUser.role.length){
|
|
2635
|
+ $scope.assign = loginUser.role.some(function(v){
|
|
2636
|
+ return v.rolecode === "incident-category-manager"||v.rolecode === 'incident manager';
|
|
2637
|
+ })
|
|
2638
|
+ }
|
2551
|
2639
|
for (var i = 0; i < loginUser.menu.length; i++) {
|
2552
|
2640
|
if (loginUser.menu[i].link == "shijianliebiao_chuli") {
|
2553
|
2641
|
$scope.chuli = true
|
|
@@ -2685,6 +2773,11 @@ app.controller('IncidentOperCtrl', ['$rootScope', '$http', '$scope', '$modal', '
|
2685
|
2773
|
$scope.colobject.grid.appScope.rotate($scope.item);
|
2686
|
2774
|
// $scope.doEdit($scope.item.id);
|
2687
|
2775
|
}
|
|
2776
|
+ // 指派
|
|
2777
|
+ $scope.toAssign = function () { //print
|
|
2778
|
+ $scope.colobject.grid.appScope.toAssign($scope.item);
|
|
2779
|
+ // $scope.doEdit($scope.item.id);
|
|
2780
|
+ }
|
2688
|
2781
|
// 协同
|
2689
|
2782
|
$scope.cooperate = function () { //print
|
2690
|
2783
|
$scope.colobject.grid.appScope.cooperate($scope.item);
|
|
@@ -2763,6 +2856,7 @@ app.directive('incidentoperator', function () {
|
2763
|
2856
|
// '<a ng-click="jry_evaluate()" ng-show="jry_evaluateShow()" class="luyinfont" >评价</a>' +
|
2764
|
2857
|
// '<a ng-click="record()" ng-show="{{item.listen}}" class="luyinfont" >录音</a>' +
|
2765
|
2858
|
// '<a ng-click="rotate()" ng-show="{{item.state.id==4}}" class="rotate" >转派</a>' +
|
|
2859
|
+ '<a ng-click="toAssign()" ng-show="{{(item.state.id==1543||item.state.id==1544)&&assign&&item.assignee}}" class="assign" >指派</a>' +
|
2766
|
2860
|
// '<a ng-click="upgrade()" ng-show="{{up&&item.state.id==4&&item.currentRole!=' + "'incident manager'" + '}}" class="upgrade" >升级</a>' +
|
2767
|
2861
|
// '<a ng-click="problem()" ng-show="{{item.state.id==5&&item.currentRole!=' + "'incident manager'" + '}}" class="upgrade" >问题升级</a>' +
|
2768
|
2862
|
// '<a ng-click="configuration()" ng-show="{{item.state.id==5}}" class="bianjifont">变更升级</a>' +
|