|
@@ -1087,7 +1087,7 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
1087
|
1087
|
var modalInstance = $modal.open({
|
1088
|
1088
|
backdrop: false,
|
1089
|
1089
|
templateUrl: 'assets/views/incident/tpl/doing.tpl.html',
|
1090
|
|
- controller: function ($scope,$rootScope, $modalInstance, api_bpm_domain, modelData, currentUserId, Alert, api_user_data,api_category) {
|
|
1090
|
+ controller: function ($scope,$rootScope, $modalInstance,FileUploader, api_bpm_domain, modelData, currentUserId, Alert, api_user_data,api_category) {
|
1091
|
1091
|
console.log(model,loginUser);
|
1092
|
1092
|
$scope.model = model;
|
1093
|
1093
|
|
|
@@ -1101,6 +1101,90 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
1101
|
1101
|
$scope.incidentClosecodeList = [];
|
1102
|
1102
|
$scope.synergeticList = [];
|
1103
|
1103
|
|
|
1104
|
+
|
|
1105
|
+ // 附件上传--start
|
|
1106
|
+ //附件上传数据
|
|
1107
|
+ let uploader = ($scope.uploader = new FileUploader({url: "/uploader"}));
|
|
1108
|
+
|
|
1109
|
+ // FILTERS
|
|
1110
|
+ uploader.filters.push({
|
|
1111
|
+ name: "customFilter",
|
|
1112
|
+ fn: function (item /*{File|FileLikeObject}*/, options) {
|
|
1113
|
+ return this.queue.length < 10;
|
|
1114
|
+ },
|
|
1115
|
+ });
|
|
1116
|
+
|
|
1117
|
+ $scope.dropfile = function (
|
|
1118
|
+ APIService,
|
|
1119
|
+ processInstanceId,
|
|
1120
|
+ taskId,
|
|
1121
|
+ userId
|
|
1122
|
+ ) {
|
|
1123
|
+ uploader.onBeforeUploadItem = function (item) {
|
|
1124
|
+ angular.extend(item.headers, $rootScope.getSession());
|
|
1125
|
+ item.url = APIService.addFile(
|
|
1126
|
+ processInstanceId,
|
|
1127
|
+ taskId,
|
|
1128
|
+ userId
|
|
1129
|
+ ).getRequestedUrl();
|
|
1130
|
+ item.formData.push({
|
|
1131
|
+ fileName: item.file.name,
|
|
1132
|
+ });
|
|
1133
|
+ console.info("onBeforeUploadItem", item);
|
|
1134
|
+ };
|
|
1135
|
+ uploader.uploadAll();
|
|
1136
|
+ };
|
|
1137
|
+
|
|
1138
|
+ // CALLBACKS
|
|
1139
|
+ uploader.onWhenAddingFileFailed = function (
|
|
1140
|
+ item /*{File|FileLikeObject}*/,
|
|
1141
|
+ filter,
|
|
1142
|
+ options
|
|
1143
|
+ ) {
|
|
1144
|
+ console.info("onWhenAddingFileFailed", item, filter, options);
|
|
1145
|
+ };
|
|
1146
|
+ uploader.onAfterAddingFile = function (fileItem) {
|
|
1147
|
+ console.info("onAfterAddingFile", fileItem);
|
|
1148
|
+ };
|
|
1149
|
+ uploader.onAfterAddingAll = function (addedFileItems) {
|
|
1150
|
+ console.info("onAfterAddingAll", addedFileItems);
|
|
1151
|
+ };
|
|
1152
|
+ uploader.onBeforeUploadItem = function (item) {
|
|
1153
|
+ console.info("onBeforeUploadItem", item);
|
|
1154
|
+ };
|
|
1155
|
+ uploader.onProgressItem = function (fileItem, progress) {
|
|
1156
|
+ console.info("onProgressItem", fileItem, progress);
|
|
1157
|
+ };
|
|
1158
|
+ uploader.onProgressAll = function (progress) {
|
|
1159
|
+ console.info("onProgressAll", progress);
|
|
1160
|
+ };
|
|
1161
|
+ uploader.onSuccessItem = function (
|
|
1162
|
+ fileItem,
|
|
1163
|
+ response,
|
|
1164
|
+ status,
|
|
1165
|
+ headers
|
|
1166
|
+ ) {
|
|
1167
|
+ console.info("onSuccessItem", fileItem, response, status, headers);
|
|
1168
|
+ };
|
|
1169
|
+ uploader.onErrorItem = function (fileItem, response, status, headers) {
|
|
1170
|
+ console.info("onErrorItem", fileItem, response, status, headers);
|
|
1171
|
+ };
|
|
1172
|
+ uploader.onCancelItem = function (fileItem, response, status, headers) {
|
|
1173
|
+ console.info("onCancelItem", fileItem, response, status, headers);
|
|
1174
|
+ };
|
|
1175
|
+ uploader.onCompleteItem = function (
|
|
1176
|
+ fileItem,
|
|
1177
|
+ response,
|
|
1178
|
+ status,
|
|
1179
|
+ headers
|
|
1180
|
+ ) {
|
|
1181
|
+ console.info("onCompleteItem", fileItem, response, status, headers);
|
|
1182
|
+ };
|
|
1183
|
+ uploader.onCompleteAll = function () {
|
|
1184
|
+ console.info("onCompleteAll");
|
|
1185
|
+ };
|
|
1186
|
+ // 附件上传--end
|
|
1187
|
+
|
1104
|
1188
|
// 获取处理方式
|
1105
|
1189
|
$scope.getIncidentHandleCategory = function(){
|
1106
|
1190
|
api_wechatfile.getDictionary({"key":"incident_handleCategory","type":"list"}).then(function (data) {
|