Bladeren bron

Merge branch 'develop' into lmm

seimin 9 maanden geleden
bovenliggende
commit
7901aa2670
17 gewijzigde bestanden met toevoegingen van 127 en 68 verwijderingen
  1. 2 2
      src/app/components/configurationCenter/configuration-callcenter/configuration-callcenter.component.html
  2. 1 0
      src/app/components/configurationCenter/configuration-callcenter/configuration-callcenter.component.ts
  3. 2 2
      src/app/components/configurationCenter/configuration-deptUser/configuration-deptUser.component.html
  4. 16 11
      src/app/components/configurationCenter/configuration-deptUser/configuration-deptUser.component.ts
  5. 5 3
      src/app/components/configurationCenter/configuration-dictionary/configuration-dictionary.component.ts
  6. 1 1
      src/app/components/configurationCenter/configuration-manHour/configuration-manHour.component.html
  7. 18 3
      src/app/components/configurationCenter/configuration-manHour/configuration-manHour.component.ts
  8. 3 3
      src/app/components/configurationCenter/configuration-priority/configuration-priority.component.html
  9. 1 0
      src/app/components/configurationCenter/configuration-priority/configuration-priority.component.ts
  10. 7 3
      src/app/share/wang-editor/wang-editor.component.ts
  11. 27 5
      src/app/views/classes-management/classes-management.component.html
  12. 6 0
      src/app/views/classes-management/classes-management.component.ts
  13. 5 5
      src/app/views/repository-manage-add/repository-manage-add.component.html
  14. 1 1
      src/app/views/repository-manage-add/repository-manage-add.component.less
  15. 19 18
      src/app/views/repository-manage-add/repository-manage-add.component.ts
  16. 4 4
      src/app/views/repository-manage/repository-manage.component.html
  17. 9 7
      src/app/views/repository-manage/repository-manage.component.ts

+ 2 - 2
src/app/components/configurationCenter/configuration-callcenter/configuration-callcenter.component.html

@@ -8,7 +8,7 @@
8 8
             节假日班次:
9 9
             <nz-select class="select" [nzDropdownMatchSelectWidth]="false" nzAllowClear [(ngModel)]="dataInfo.holidayClassId"
10 10
               nzPlaceHolder="请选择节假日班次" nzServerSearch>
11
-              <ng-container *ngFor="let data of classList1">
11
+              <ng-container *ngFor="let data of classList2">
12 12
                 <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
13 13
               </ng-container>
14 14
               <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
@@ -20,7 +20,7 @@
20 20
             工作日班次:
21 21
             <nz-select class="select" [nzDropdownMatchSelectWidth]="false" nzAllowClear [(ngModel)]="dataInfo.workdayClassId"
22 22
               nzPlaceHolder="请选择工作日班次" nzServerSearch>
23
-              <ng-container *ngFor="let data of classList2">
23
+              <ng-container *ngFor="let data of classList1">
24 24
                 <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
25 25
               </ng-container>
26 26
               <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>

+ 1 - 0
src/app/components/configurationCenter/configuration-callcenter/configuration-callcenter.component.ts

@@ -62,6 +62,7 @@ export class ConfigurationCallcenterComponent implements OnInit {
62 62
       sum: 9999,
63 63
       scheduleClass: {
64 64
         hospital: { id: this.currentHospital.id },
65
+        bindCall: 1,
65 66
         type,
66 67
       },
67 68
     };

+ 2 - 2
src/app/components/configurationCenter/configuration-deptUser/configuration-deptUser.component.html

@@ -105,7 +105,7 @@
105 105
            <nz-form-label nzRequired nzFor="handleGroup" [nzSpan]="6">处理组</nz-form-label>
106 106
            <nz-form-control nzErrorTip="请选择处理组!" [nzSpan]="18">
107 107
              <nz-input-group>
108
-           		<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择处理组" formControlName="handleGroup">
108
+           		<nz-select class="formItem" (ngModelChange)="changeGroup($event)" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择处理组" formControlName="handleGroup">
109 109
            		  <ng-container *ngFor="let option of allUserGroup">
110 110
            		    <nz-option *ngIf="!isDeptLoading" [nzLabel]="option.groupName" [nzValue]="option.id"></nz-option>
111 111
            		  </ng-container>
@@ -131,7 +131,7 @@
131 131
           <nz-form-label nzRequired nzFor="handleUser" [nzSpan]="6">处理人</nz-form-label>
132 132
           <nz-form-control nzErrorTip="请选择处理人!" [nzSpan]="18">
133 133
             <nz-input-group>
134
-          		<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" (nzOnSearch)="changeInp3($event)" nzServerSearch nzShowSearch nzPlaceHolder="请选择处理人" formControlName="handleUser">
134
+          		<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择处理人" formControlName="handleUser">
135 135
           		  <ng-container *ngFor="let option of userData">
136 136
           		    <nz-option *ngIf="!isDeptLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
137 137
           		  </ng-container>

+ 16 - 11
src/app/components/configurationCenter/configuration-deptUser/configuration-deptUser.component.ts

@@ -44,8 +44,8 @@ export class ConfigurationDeptUserComponent implements OnInit {
44 44
 			this.getDeparts(e);
45 45
 		});
46 46
 		this.searchParentUserSubject.pipe(debounceTime(500)).subscribe((e) => {
47
-			this.isDeptLoading = true;
48
-			this.getUser(e);
47
+			// this.isDeptLoading = true;
48
+			// this.getUser(e);
49 49
 		});
50 50
 		
51 51
     // 优先级
@@ -57,7 +57,7 @@ export class ConfigurationDeptUserComponent implements OnInit {
57 57
     this.getPriorityList();
58 58
 		this.getMalfunction()
59 59
 		this.getDeparts('')
60
-		this.getUser('');
60
+		// this.getUser('');
61 61
 		this.getGrop()
62 62
   }
63 63
 
@@ -90,9 +90,7 @@ export class ConfigurationDeptUserComponent implements OnInit {
90 90
 	  let data = {
91 91
 	    department: {
92 92
 	      dept,
93
-	      hospital: {
94
-	        id: this.hosId
95
-	      },
93
+				cascadeHosId: this.currentHospital.id,
96 94
 	    },
97 95
 	    idx: 0,
98 96
 	    sum: 20,
@@ -136,6 +134,12 @@ export class ConfigurationDeptUserComponent implements OnInit {
136 134
 		})
137 135
 	}
138 136
 	
137
+	// 选择处理组
138
+	changeGroup(e){
139
+		this.validatePriorityForm.controls.handleUser.setValue(null)
140
+		this.getUser(e)
141
+	}
142
+	
139 143
 	// 获取处理组
140 144
 	getGrop(){
141 145
 		let groupData = {
@@ -154,13 +158,14 @@ export class ConfigurationDeptUserComponent implements OnInit {
154 158
 	}
155 159
 	
156 160
 	// 获取处理人
157
-	getUser(name){
161
+	getUser(groupId){
158 162
 		let data = {
159 163
 			idx: 0,
160
-			sum: 20,
164
+			sum: 9999,
161 165
 			user: {
162
-				name:name,
166
+				// name:name,
163 167
 				hospital: { id: this.hosId || "" },
168
+				groupdata:{id:groupId || ""}
164 169
 			},
165 170
 		};
166 171
 		this.mainService
@@ -218,7 +223,7 @@ export class ConfigurationDeptUserComponent implements OnInit {
218 223
     console.log(this.validatePriorityForm.value);
219 224
     this.btnLoading = true;
220 225
     let postData:any = {};
221
-		let malfunction = this.validatePriorityForm.value.malfunction
226
+		let malfunction = this.validatePriorityForm.value.malfunction?this.validatePriorityForm.value.malfunction:[]
222 227
     if (this.add) {
223 228
       //增加
224 229
       postData = {
@@ -273,7 +278,7 @@ export class ConfigurationDeptUserComponent implements OnInit {
273 278
 			  malfunction: [this.validatePriorityForm.value.malfunction, []],//故障
274 279
 			  handleGroup: [this.validatePriorityForm.value.handleGroup, [Validators.required]],//处理组
275 280
 				binding:['0',[Validators.required]],//是否绑定人员
276
-			  handleUser: [this.validatePriorityForm.value.handleUser, []],//处理人
281
+			  handleUser: [null, []],//处理人
277 282
 			});
278 283
 		}
279 284
 	}

+ 5 - 3
src/app/components/configurationCenter/configuration-dictionary/configuration-dictionary.component.ts

@@ -175,6 +175,7 @@ export class ConfigurationDictionaryComponent implements OnInit {
175 175
           }
176 176
         }
177 177
       })
178
+      console.log(this.validateDictionaryForm.controls)
178 179
     })
179 180
   }
180 181
 
@@ -228,12 +229,13 @@ export class ConfigurationDictionaryComponent implements OnInit {
228 229
 
229 230
     //增加
230 231
     postData = [];
232
+    let rawValueObj = this.validateDictionaryForm.getRawValue();
231 233
     for (let i = 0; i < this.dictionaryList.length; i++) {
232 234
       postData.push({
233 235
         id: uuidValidate(this.dictionaryList[i].id) ? undefined : this.dictionaryList[i].id,
234
-        name: this.validateDictionaryForm.value['name_' + this.dictionaryList[i].id],
235
-        value: this.validateDictionaryForm.value['value_' + this.dictionaryList[i].id],
236
-        orders: this.validateDictionaryForm.value['orders_' + this.dictionaryList[i].id],
236
+        name: rawValueObj['name_' + this.dictionaryList[i].id],
237
+        value: rawValueObj['value_' + this.dictionaryList[i].id],
238
+        orders: rawValueObj['orders_' + this.dictionaryList[i].id],
237 239
         system: uuidValidate(this.dictionaryList[i].id) ? false : this.dictionaryList[i].system,
238 240
         key: this.activeDictionaryKey.key,
239 241
       })

+ 1 - 1
src/app/components/configurationCenter/configuration-manHour/configuration-manHour.component.html

@@ -104,5 +104,5 @@
104 104
 
105 105
 <!-- 删除模态框 -->
106 106
 <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading" 
107
-  (confirmDelEvent)="confirmDel()" (cancelDelEvent)="cancelDel()" content="确定要删除吗?" confirmTxt="是" cancelTxt="否">
107
+  (confirmDelEvent)="confirmDel()" (cancelDelEvent)="cancelDel()" [content]="delContent" confirmTxt="是" cancelTxt="否">
108 108
 </app-dialog-delete>

+ 18 - 3
src/app/components/configurationCenter/configuration-manHour/configuration-manHour.component.ts

@@ -95,9 +95,8 @@ export class ConfigurationManHourComponent implements OnInit {
95 95
   activeCategory1:any = {};
96 96
   activeCategory2:any = {};
97 97
   activeCategory3:any = {};
98
-	listType:any = 1;
99 98
   clickCategory(item, type:number){
100
-		this.listType = type
99
+		this.coopType = type
101 100
     switch(type){
102 101
       case 1:
103 102
         this.categoryList2 = [];
@@ -135,11 +134,21 @@ export class ConfigurationManHourComponent implements OnInit {
135 134
 	confirmDel() {
136 135
 	  let that = this;
137 136
 	  that.btnLoading = true;
137
+		let delId = null
138
+		console.log(222,this.coopType)
139
+		if(this.coopType==1){
140
+			delId = this.activeCategory1.id
141
+		}else{
142
+			delId = this.activeCategory2.id
143
+		}
138 144
 	  that.mainService
139
-	    .coopTypeConfig('rmvData', 'workHourManagement', [this['activeCategory' + this.listType].id])
145
+	    .coopTypeConfig('rmvData', 'workHourManagement', [delId])
140 146
 	    .subscribe((data) => {
141 147
 	      that.btnLoading = false;
142 148
 	      that.hideDelModal();
149
+				if(this.coopType==1){
150
+					this.categoryList2 = []
151
+				}
143 152
 	      if (data["status"] == 200) {
144 153
 	        that.showPromptModal("删除", true, "");
145 154
 	      } else {
@@ -198,7 +207,13 @@ export class ConfigurationManHourComponent implements OnInit {
198 207
 	
199 208
 	// 删除工时
200 209
 	delModal: boolean = false; //删除模态框
210
+	delContent: string = null; //删除模态框
201 211
 	delCategoryModal(type:number){
212
+		if(type==1){
213
+			this.delContent = '此操作会删除当前大类下的小类,确定要删除吗?'
214
+		}else{
215
+			this.delContent = '确定要删除吗?'
216
+		}
202 217
 		this.coopType = type;
203 218
 		this.delModal = true
204 219
 	}

+ 3 - 3
src/app/components/configurationCenter/configuration-priority/configuration-priority.component.html

@@ -96,7 +96,7 @@
96 96
           <nz-form-control [nzSpan]="18" nzErrorTip="请选择节假日班次!">
97 97
             <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="holidayClassId"
98 98
               nzPlaceHolder="请选择节假日班次" nzServerSearch>
99
-              <ng-container *ngFor="let data of classList1">
99
+              <ng-container *ngFor="let data of classList2">
100 100
                 <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
101 101
               </ng-container>
102 102
               <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
@@ -110,7 +110,7 @@
110 110
           <nz-form-control [nzSpan]="18" nzErrorTip="请选择工作日班次!">
111 111
             <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="workdayClassId"
112 112
               nzPlaceHolder="请选择工作日班次" nzServerSearch>
113
-              <ng-container *ngFor="let data of classList2">
113
+              <ng-container *ngFor="let data of classList1">
114 114
                 <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
115 115
               </ng-container>
116 116
               <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
@@ -126,4 +126,4 @@
126 126
       <button class="btn cancel" nz-button nzType="default" (click)="hidePriorityModal()">取消</button>
127 127
     </div>
128 128
   </div>
129
-</div>
129
+</div>

+ 1 - 0
src/app/components/configurationCenter/configuration-priority/configuration-priority.component.ts

@@ -178,6 +178,7 @@ export class ConfigurationPriorityComponent implements OnInit {
178 178
       sum: 9999,
179 179
       scheduleClass: {
180 180
         hospital: { id: this.currentHospital.id },
181
+        bindPriority: 1,
181 182
         type,
182 183
       },
183 184
     };

+ 7 - 3
src/app/share/wang-editor/wang-editor.component.ts

@@ -71,6 +71,8 @@ export class wangEditorComponent implements OnInit {
71 71
 					this.isLoading = false
72 72
 					let url = location.origin + '/file' + res.body.data.relativeFilePath
73 73
 					insertImgFn(url,url,url)
74
+				}else if(res.status==500 && res.body){
75
+					this.message.error(res.body.error)
74 76
 				}
75 77
 			});
76 78
 		}
@@ -94,6 +96,8 @@ export class wangEditorComponent implements OnInit {
94 96
 					this.isLoading = false
95 97
 					let url = location.origin + '/file' + res.body.data.relativeFilePath
96 98
 					insertVideoFn(url)
99
+				}else if(res.status==500 && res.body){
100
+					this.message.error(res.body.error)
97 101
 				}
98 102
 			});
99 103
 		}
@@ -117,19 +121,19 @@ export class wangEditorComponent implements OnInit {
117 121
 	      'italic',  // 斜体
118 122
 	      'underline',  // 下划线
119 123
 	      'head',  // 标题
124
+				'image',  // 插入图片
125
+				'video',  // 插入视频
120 126
 	      'fontName',  // 字体
121 127
 	      'fontSize',  // 字号
122 128
 	      'strikeThrough',  // 删除线
123 129
 	      'foreColor',  // 文字颜色
124 130
 	      'backColor',  // 背景颜色
125
-	      'link',  // 插入链接
131
+	      // 'link',  // 插入链接
126 132
 	      'list',  // 列表
127 133
 	      'justify',  // 对齐方式
128 134
 	      'quote',  // 引用
129 135
 	      // 'emoticon',  // 表情
130 136
 	      // 'table',  // 表格
131
-	      'image',  // 插入图片
132
-	      'video',  // 插入视频
133 137
 	      // 'code',  // 插入代码
134 138
 	      'undo',  // 撤销
135 139
 	      'redo'  // 重复

+ 27 - 5
src/app/views/classes-management/classes-management.component.html

@@ -12,17 +12,21 @@
12 12
         [nzLoading]="loading1">
13 13
         <thead>
14 14
           <tr class="thead">
15
-            <th nzWidth="20%">班次名称</th>
16
-            <th nzWidth="20%">班次描述</th>
17
-            <th nzWidth="20%">工作时间</th>
18
-            <th nzWidth="20%">工作日/节假日</th>
19
-            <th nzWidth="20%">操作</th>
15
+            <th nzWidth="14%">班次名称</th>
16
+            <th nzWidth="14%">班次描述</th>
17
+            <th nzWidth="14%">呼叫中心班次</th>
18
+            <th nzWidth="14%">优先级班次</th>
19
+            <th nzWidth="14%">工作时间</th>
20
+            <th nzWidth="14%">工作日/节假日</th>
21
+            <th nzWidth="16%">操作</th>
20 22
           </tr>
21 23
         </thead>
22 24
         <tbody>
23 25
           <tr *ngFor="let data of listOfData">
24 26
             <td>{{ data.name }}</td>
25 27
             <td>{{ (data.describe?data.describe:'-') }}</td>
28
+            <td>{{ data.bindCall == 1 ? '是' : '否' }}</td>
29
+            <td>{{ data.bindPriority == 1 ? '是' : '否' }}</td>
26 30
             <td>
27 31
               <div *ngIf="data.scheduleClassTimes">
28 32
                 <div *ngFor="let time of data.scheduleClassTimes">
@@ -77,6 +81,24 @@
77 81
           </nz-form-control>
78 82
         </nz-form-item>
79 83
         <nz-form-item>
84
+          <nz-form-label [nzSpan]="9" nzRequired nzFor="bindCall">呼叫中心班次</nz-form-label>
85
+          <nz-form-control [nzSpan]="15" nzErrorTip="请选择呼叫中心班次!">
86
+            <nz-radio-group formControlName="bindCall">
87
+              <label nz-radio [nzValue]="1">是</label>
88
+              <label nz-radio [nzValue]="0">否</label>
89
+            </nz-radio-group>
90
+          </nz-form-control>
91
+        </nz-form-item>
92
+        <nz-form-item>
93
+          <nz-form-label [nzSpan]="9" nzRequired nzFor="bindPriority">优先级班次</nz-form-label>
94
+          <nz-form-control [nzSpan]="15" nzErrorTip="请选择优先级班次!">
95
+            <nz-radio-group formControlName="bindPriority">
96
+              <label nz-radio [nzValue]="1">是</label>
97
+              <label nz-radio [nzValue]="0">否</label>
98
+            </nz-radio-group>
99
+          </nz-form-control>
100
+        </nz-form-item>
101
+        <nz-form-item>
80 102
           <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="datesType">适用日期类型</nz-form-label>
81 103
           <nz-form-control nzErrorTip="请选择适用日期类型!">
82 104
             <nz-checkbox-group formControlName="datesType" [(ngModel)]="oneOption"

+ 6 - 0
src/app/views/classes-management/classes-management.component.ts

@@ -101,6 +101,8 @@ export class ClassesManagementComponent implements OnInit {
101 101
     this.validateForm = this.fb.group({
102 102
       classesName: [null, [Validators.required]],
103 103
       description: [null, [Validators.required]],
104
+      bindCall: [0, [Validators.required]],
105
+      bindPriority: [0, [Validators.required]],
104 106
       datesType: [null, [this.dateValidator]],
105 107
       // 时间段1
106 108
       timerF1: [null, [Validators.required]],
@@ -189,6 +191,8 @@ export class ClassesManagementComponent implements OnInit {
189 191
       {
190 192
         name: that.validateForm.value.classesName,
191 193
         describe: that.validateForm.value.description,
194
+        bindCall: that.validateForm.value.bindCall,
195
+        bindPriority: that.validateForm.value.bindPriority,
192 196
         scheduleClassTimes: times,
193 197
         type: that.validateForm.value.datesType,
194 198
         hospital: { id: this.hospital },
@@ -258,6 +262,8 @@ export class ClassesManagementComponent implements OnInit {
258 262
     this.coopId = data.id;
259 263
     this.validateForm.controls.classesName.setValue(data.name);
260 264
     this.validateForm.controls.description.setValue(data.describe);
265
+    this.validateForm.controls.bindCall.setValue(data.bindCall);
266
+    this.validateForm.controls.bindPriority.setValue(data.bindPriority);
261 267
     if (data.type == 1) {
262 268
       this.oneOption[0]['checked'] = true;
263 269
     } else if (data.type == 2) {

+ 5 - 5
src/app/views/repository-manage-add/repository-manage-add.component.html

@@ -9,19 +9,19 @@
9 9
 				</nz-form-item>
10 10
 				
11 11
 				<nz-form-item class="form-item">
12
-				  <nz-form-label nzRequired nzFor="title" [nzSm]="4" [nzXs]="24">标题</nz-form-label>
13
-				  <nz-form-control nzErrorTip="请输入标题!" [nzSm]="20" [nzXs]="24">
12
+				  <nz-form-label nzRequired nzFor="title" [nzSm]="2" [nzXs]="24">标题</nz-form-label>
13
+				  <nz-form-control nzErrorTip="请输入标题!" [nzSm]="22" [nzXs]="24">
14 14
 						<input nz-input formControlName="title"  placeholder="请输入标题" nzSize="default" />
15 15
 				  </nz-form-control>
16 16
 				</nz-form-item>
17 17
 				
18 18
 				<nz-form-item class="form-item" *ngIf="add">
19
-				  <nz-form-label nzFor="content" [nzSm]="4" [nzXs]="24">内容</nz-form-label>
19
+				  <nz-form-label nzFor="content" [nzSm]="2" [nzXs]="24">内容</nz-form-label>
20 20
 					<app-wang-editor (changeContent)="changeContent($event)"></app-wang-editor>
21 21
 				</nz-form-item>
22 22
 				
23 23
 				<nz-form-item class="form-item" *ngIf="!add && isContentShow">
24
-				  <nz-form-label nzFor="content" [nzSm]="4" [nzXs]="24">内容</nz-form-label>
24
+				  <nz-form-label nzFor="content" [nzSm]="2" [nzXs]="24">内容</nz-form-label>
25 25
 					<app-wang-editor (changeContent)="changeContent($event)" [content]="detailContent"></app-wang-editor>
26 26
 				</nz-form-item>
27 27
 			</div>
@@ -39,7 +39,7 @@
39 39
 				
40 40
 				<nz-form-item class="form-item">
41 41
 				  <nz-form-label nzRequired nzFor="knowledgeClass" [nzSm]="6" [nzXs]="24">知识分类</nz-form-label>
42
-					<nz-form-control nzErrorTip="请选择!" [nzSm]="16" [nzXs]="24">
42
+					<nz-form-control nzErrorTip="请选择!" [nzSm]="24" [nzXs]="24">
43 43
 						<nz-radio-group formControlName="knowledgeClass" (ngModelChange)="radioChnage($event)">
44 44
 						  <label nz-radio [nzValue]="item.id" *ngFor="let item of dicData">{{item.name}}</label>
45 45
 						</nz-radio-group>

+ 1 - 1
src/app/views/repository-manage-add/repository-manage-add.component.less

@@ -84,7 +84,7 @@ h3{
84 84
 		}
85 85
 		.form-title-box{
86 86
 			display: flex;
87
-			margin-left: 94px;
87
+			margin-left: 13px;
88 88
 			.form-title{
89 89
 				color: #000;
90 90
 				margin-right: 40px;

+ 19 - 18
src/app/views/repository-manage-add/repository-manage-add.component.ts

@@ -170,6 +170,9 @@ export class RepositoryManageAddComponent implements OnInit {
170 170
 							token:i.token
171 171
 						}
172 172
 					})
173
+				}else{
174
+					this.fileAllData = []
175
+					this.fileData = []
173 176
 				}
174 177
 			});
175 178
 	}
@@ -395,21 +398,16 @@ export class RepositoryManageAddComponent implements OnInit {
395 398
 	// 上传图片
396 399
 	uploadFile(id){
397 400
 		let url = `/service/common/common/uploadAttachment/solution/${id}/${id}`
398
-		const formData = new FormData()
399 401
 		for(let i of this.fileData){//新上传的附件
402
+			const formData = new FormData()
400 403
 			let item = this.fileAllData.find(t=>t.id == i.uid) //之前的附件
401 404
 			if(!item){
402
-				if(i.originFileObj){
403
-					formData.append('file', i.originFileObj);
404
-					formData.append('filename', i.originFileObj.name);
405
-				}else{
406
-					formData.append('file', i as any);
407
-					formData.append('filename', i.name);
408
-				}
405
+				formData.append('file', i as any);
406
+				formData.append('filename', i.name);
409 407
 				
410 408
 				const req = new HttpRequest('POST', url, formData, {
411
-					reportProgress: true,
412
-					withCredentials: true
409
+					reportProgress: false,
410
+					withCredentials: false
413 411
 				});
414 412
 				this.http.request(req).subscribe((res) => {
415 413
 				    
@@ -448,22 +446,26 @@ export class RepositoryManageAddComponent implements OnInit {
448 446
   }
449 447
 	
450 448
 	beforeUpload = (file: UploadFile) => {
451
-		console.log(888,file)
452
-		let type = file.name.split('.')
453
-		const isPic = (type[1] === 'xlsx' || type[1] === 'pdf' || 
454
-		type[1] === 'xls' || type[1] === 'ppt' || type[1] === 'pptx' ||
455
-		type[1] === 'txt' || type[1] === 'doc' || type[1] === 'docx');
449
+		let index = file.name.lastIndexOf('.')
450
+		let type = file.name.slice(index + 1)
451
+		const isSize = file.size / 1024 / 1024 < 10;
452
+		const isPic = (type === 'xlsx' || type === 'pdf' || 
453
+		type === 'xls' || type === 'ppt' || type === 'pptx' ||
454
+		type === 'txt' || type === 'doc' || type === 'docx');
456 455
 		if (!isPic) {
457 456
 			this.message.error('只能上传PDF、word、ppt、excel、txt等文件类型格式!');
458 457
 			return false;
459 458
 		}
459
+		if (!isSize) {
460
+		  this.message.error('文件大小不能大于10MB!');
461
+		  return false;
462
+		}
460 463
 		this.fileData = this.fileData.concat(file);
461 464
 		return false;
462 465
 	};
463 466
 	
464 467
 	// 删除附件
465
-	removeFile = (file) =>  {
466
-		console.log(111,file)
468
+	removeFile = (file:any) =>  {
467 469
 		let item = this.fileAllData.find(i=>i.id == file.uid)
468 470
 		let index = this.fileData.findIndex(i=>i.uid == file.uid)
469 471
 		if(item){ //附件在数据库
@@ -475,7 +477,6 @@ export class RepositoryManageAddComponent implements OnInit {
475 477
 					} 
476 478
 				});
477 479
 		}else{//附件不在数据库
478
-			console.log(555, index)
479 480
 			if(index!=-1){
480 481
 				this.fileData.splice(index, 1)
481 482
 			}

+ 4 - 4
src/app/views/repository-manage/repository-manage.component.html

@@ -101,15 +101,15 @@
101 101
 						 </div>
102 102
 					 </div>
103 103
 				 </div>
104
-				 <div class="view-item right-box" *ngIf="lookData&&lookData.title"> 
104
+				 <div class="view-item right-box" *ngIf="solutionLogs"> 
105 105
 					 <nz-steps [nzCurrent]="stepLength" nzDirection="vertical" nzSize="small">
106
-						<ng-container *ngFor="let item of lookData.solutionLogs; let index = index">
106
+						<ng-container *ngFor="let item of solutionLogs; let index = index">
107 107
 						    <nz-step
108 108
 						      [nzDescription]="tpl"
109 109
 						    >
110 110
 						    </nz-step>
111 111
 						    <ng-template #tpl>
112
-									<div *ngIf="index==lookData.solutionLogs.length-1" class="step-size">
112
+									<div *ngIf="index==solutionLogs.length-1" class="step-size">
113 113
 										<div>
114 114
 											<span style="color: #49B856;">{{item.operationStatus.name}}</span>
115 115
 											&nbsp;&nbsp;&nbsp;
@@ -118,7 +118,7 @@
118 118
 										<div style="color:#333;">{{ item.time }}</div>
119 119
 										<div class="back-class" nz-tooltip [nzTooltipTitle]="item.rejectedReason" *ngIf="item.operationStatus.name=='审核驳回'">(驳回原因)</div>
120 120
 									</div>
121
-									<div *ngIf="index!=lookData.solutionLogs.length-1" class="step-size">
121
+									<div *ngIf="index!=solutionLogs.length-1" class="step-size">
122 122
 										<div>
123 123
 											<span>{{item.operationStatus.name}}</span>
124 124
 											&nbsp;&nbsp;&nbsp;

+ 9 - 7
src/app/views/repository-manage/repository-manage.component.ts

@@ -84,6 +84,7 @@ export class RepositoryManageComponent implements OnInit {
84 84
 	editModal:boolean = false; //编辑时弹框
85 85
 	isSpinning: boolean = false; //页面loading状态
86 86
 	detailData:any;
87
+	solutionLogs:any;
87 88
 	lookData:any;
88 89
 	versionsData: any = []; //审核版本数据
89 90
 	fileData: any = []; //上传的附件数据
@@ -184,7 +185,6 @@ export class RepositoryManageComponent implements OnInit {
184 185
 	versionsClick(data, index){
185 186
 		this.vIndex = index
186 187
 		this.lookData = data
187
-		this.stepLength = this.lookData.solutionLogs.length
188 188
 		let content = data.content
189 189
 		if(content){
190 190
 			this.richText = this.sanitizer.bypassSecurityTrustHtml(content);
@@ -300,8 +300,8 @@ export class RepositoryManageComponent implements OnInit {
300 300
 		this.modal = true
301 301
 		var that = this;
302 302
 		let query = {
303
-			idx: that.pageIndex - 1,
304
-			sum: that.pageSize,
303
+			idx: 0,
304
+			sum: 9999,
305 305
 			solution: {
306 306
 				hosId: this.hosId,
307 307
 				operationType:'lookOver',
@@ -329,7 +329,8 @@ export class RepositoryManageComponent implements OnInit {
329 329
 					}
330 330
 				}
331 331
 				this.lookData = data[0]
332
-				this.stepLength = this.lookData.solutionLogs.length
332
+				this.solutionLogs = data[0].solutionLogs
333
+				this.stepLength = this.solutionLogs.length
333 334
 				this.isSpinning = false
334 335
 			});
335 336
 	}
@@ -357,8 +358,8 @@ export class RepositoryManageComponent implements OnInit {
357 358
 		this.modal = true
358 359
 		var that = this;
359 360
 		let query = {
360
-			idx: that.pageIndex - 1,
361
-			sum: that.pageSize,
361
+			idx: 0,
362
+			sum: 9999,
362 363
 			solution: {
363 364
 				hosId: this.hosId,
364 365
 				operationType:'lookOver',
@@ -377,7 +378,8 @@ export class RepositoryManageComponent implements OnInit {
377 378
 					i.time = format(i.operationTime, 'yyyy-MM-dd HH:mm') 
378 379
 				}
379 380
 				this.lookData = data[0]
380
-				this.stepLength = this.lookData.solutionLogs.length
381
+				this.solutionLogs = data[0].solutionLogs
382
+				this.stepLength = this.solutionLogs.length
381 383
 				this.isSpinning = false
382 384
 			});
383 385