Commit 8ff3197c authored by wangqinghua's avatar wangqinghua

知识库 update

parent 11057c2e
...@@ -25,17 +25,18 @@ ...@@ -25,17 +25,18 @@
<div nz-col nzSpan="8" class="text-right"> <div nz-col nzSpan="8" class="text-right">
</div> </div>
</div> </div>
<nz-table #basicTable [nzData]="dataSet"> <nz-table #basicTable [nzData]="dataSet" [nzLoading]="loading" [nzShowPagination]="true"
[nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount"
(nzPageIndexChange)="change($event)">
<thead> <thead>
<tr> <tr>
<th>文件名称</th> <th nzWidth="80%">文件名称</th>
<th>操作</th> <th>操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let data of basicTable.data"> <tr *ngFor="let data of basicTable.data">
<td>{{data.name}}</td> <td>{{data.name}}</td>
<td>{{data.comment}}</td>
<td class="handle main-color"> <td class="handle main-color">
<span (click)="download(data)">下载</span> <span (click)="download(data)">下载</span>
</td> </td>
...@@ -43,4 +44,4 @@ ...@@ -43,4 +44,4 @@
</tbody> </tbody>
</nz-table> </nz-table>
<!--导入文件--> <!--导入文件-->
<smart-upload #smartUpload></smart-upload> <smart-upload #smartUpload (done)="getList()"></smart-upload>
import {Component, OnInit, ViewChild} from '@angular/core'; import {Component, OnInit, ViewChild} from '@angular/core';
import {UploadComponent} from '../../work/modal/upload/upload.component'; import {UploadComponent} from '../../work/modal/upload/upload.component';
import {pageSize} from '../../app.constants';
import {WorkService} from '../../work/work.service';
import {NzMessageService} from 'ng-zorro-antd';
import {CommonService} from '../../shared/common/common.service';
@Component({ @Component({
selector: 'smart-common-problem', selector: 'smart-common-problem',
...@@ -10,11 +14,46 @@ export class CommonProblemComponent implements OnInit { ...@@ -10,11 +14,46 @@ export class CommonProblemComponent implements OnInit {
@ViewChild('smartUpload') smartUpload: UploadComponent; @ViewChild('smartUpload') smartUpload: UploadComponent;
dataSet = []; dataSet = [];
pageNum = 1;
pageCount = pageSize;
totalNum;
loading = false;
constructor() { constructor(private workSer: WorkService, private message: NzMessageService,
private commonSer: CommonService) {
} }
ngOnInit() { ngOnInit() {
this.getList();
}
change($event) {
this.pageNum = $event;
this.getList();
}
getList() {
this.loading = true;
const data = {
pageNum: this.pageNum,
pageCount: this.pageCount,
obj:{
flag:0
}
};
this.workSer.knowledgedFindPage(data).subscribe(
(res) => {
if (res.errCode == 10000) {
if (res.data) {
this.dataSet = res.data.data;
this.totalNum = res.data.totalNum;
}
} else {
this.message.info(res.errMsg);
}
this.loading = false;
}
);
} }
//导入 //导入
...@@ -23,8 +62,12 @@ export class CommonProblemComponent implements OnInit { ...@@ -23,8 +62,12 @@ export class CommonProblemComponent implements OnInit {
} }
//下载 //下载
download(data) { download(item) {
this.workSer.knowledgedDownload(item.id).subscribe(
(data) => {
this.commonSer.downloadFile(item.name, data);
}
);
} }
} }
...@@ -25,17 +25,18 @@ ...@@ -25,17 +25,18 @@
<div nz-col nzSpan="8" class="text-right"> <div nz-col nzSpan="8" class="text-right">
</div> </div>
</div> </div>
<nz-table #basicTable [nzData]="dataSet"> <nz-table #basicTable [nzData]="dataSet" [nzLoading]="loading" [nzShowPagination]="true"
[nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount"
(nzPageIndexChange)="change($event)">
<thead> <thead>
<tr> <tr>
<th>文件名称</th> <th nzWidth="80%">文件名称</th>
<th>操作</th> <th>操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let data of basicTable.data"> <tr *ngFor="let data of basicTable.data">
<td>{{data.name}}</td> <td>{{data.name}}</td>
<td>{{data.comment}}</td>
<td class="handle main-color"> <td class="handle main-color">
<span (click)="download(data)">下载</span> <span (click)="download(data)">下载</span>
</td> </td>
...@@ -43,4 +44,4 @@ ...@@ -43,4 +44,4 @@
</tbody> </tbody>
</nz-table> </nz-table>
<!--导入文件--> <!--导入文件-->
<smart-upload #smartUpload></smart-upload> <smart-upload #smartUpload (done)="getDone()"></smart-upload>
import {Component, OnInit, ViewChild} from '@angular/core'; import {Component, OnInit, ViewChild} from '@angular/core';
import {UploadComponent} from '../../work/modal/upload/upload.component'; import {UploadComponent} from '../../work/modal/upload/upload.component';
import {pageSize} from '../../app.constants';
import {WorkService} from '../../work/work.service';
import {NzMessageService} from 'ng-zorro-antd';
import {CommonService} from '../../shared/common/common.service';
@Component({ @Component({
selector: 'smart-information-tech', selector: 'smart-information-tech',
...@@ -10,11 +14,54 @@ export class InformationTechComponent implements OnInit { ...@@ -10,11 +14,54 @@ export class InformationTechComponent implements OnInit {
@ViewChild('smartUpload') smartUpload: UploadComponent; @ViewChild('smartUpload') smartUpload: UploadComponent;
dataSet = []; dataSet = [];
pageNum = 1;
pageCount = pageSize;
totalNum;
loading = false;
constructor() { constructor(private workSer: WorkService, private message: NzMessageService,
private commonSer: CommonService) {
} }
ngOnInit() { ngOnInit() {
console.log('init');
this.getList();
}
change($event) {
console.log('change');
this.pageNum = $event;
this.getList();
}
getDone() {
console.log('done');
this.pageNum = 1;
this.getList();
}
getList() {
this.loading = true;
const data = {
pageNum: this.pageNum,
pageCount: this.pageCount,
obj: {
flag: 1
}
};
this.workSer.knowledgedFindPage(data).subscribe(
(res) => {
if (res.errCode == 10000) {
if (res.data) {
this.dataSet = res.data.data;
this.totalNum = res.data.totalNum;
}
} else {
this.message.info(res.errMsg);
}
this.loading = false;
}
);
} }
//导入 //导入
...@@ -23,8 +70,12 @@ export class InformationTechComponent implements OnInit { ...@@ -23,8 +70,12 @@ export class InformationTechComponent implements OnInit {
} }
//下载 //下载
download(data) { download(item) {
this.workSer.knowledgedDownload(item.id).subscribe(
(data) => {
this.commonSer.downloadFile(item.name, data);
}
);
} }
} }
...@@ -25,17 +25,18 @@ ...@@ -25,17 +25,18 @@
<div nz-col nzSpan="8" class="text-right"> <div nz-col nzSpan="8" class="text-right">
</div> </div>
</div> </div>
<nz-table #basicTable [nzData]="dataSet"> <nz-table #basicTable [nzData]="dataSet" [nzLoading]="loading" [nzShowPagination]="true"
[nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount"
(nzPageIndexChange)="change($event)">
<thead> <thead>
<tr> <tr>
<th>文件名称</th> <th nzWidth="80%">文件名称</th>
<th>操作</th> <th>操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let data of basicTable.data"> <tr *ngFor="let data of basicTable.data">
<td>{{data.name}}</td> <td>{{data.name}}</td>
<td>{{data.comment}}</td>
<td class="handle main-color"> <td class="handle main-color">
<span (click)="download(data)">下载</span> <span (click)="download(data)">下载</span>
</td> </td>
...@@ -43,4 +44,4 @@ ...@@ -43,4 +44,4 @@
</tbody> </tbody>
</nz-table> </nz-table>
<!--导入文件--> <!--导入文件-->
<smart-upload #smartUpload></smart-upload> <smart-upload #smartUpload (done)="getList()"></smart-upload>
import {Component, OnInit, ViewChild} from '@angular/core'; import {Component, OnInit, ViewChild} from '@angular/core';
import {UploadComponent} from '../../work/modal/upload/upload.component'; import {UploadComponent} from '../../work/modal/upload/upload.component';
import {pageSize} from '../../app.constants';
import {WorkService} from '../../work/work.service';
import {NzMessageService} from 'ng-zorro-antd';
import {CommonService} from '../../shared/common/common.service';
@Component({ @Component({
selector: 'smart-management-system', selector: 'smart-management-system',
...@@ -10,11 +14,46 @@ export class ManagementSystemComponent implements OnInit { ...@@ -10,11 +14,46 @@ export class ManagementSystemComponent implements OnInit {
@ViewChild('smartUpload') smartUpload: UploadComponent; @ViewChild('smartUpload') smartUpload: UploadComponent;
dataSet = []; dataSet = [];
pageNum = 1;
pageCount = pageSize;
totalNum;
loading = false;
constructor() { constructor(private workSer: WorkService, private message: NzMessageService,
private commonSer: CommonService) {
} }
ngOnInit() { ngOnInit() {
this.getList();
}
change($event) {
this.pageNum = $event;
this.getList();
}
getList() {
this.loading = true;
const data = {
pageNum: this.pageNum,
pageCount: this.pageCount,
obj:{
flag:2
}
};
this.workSer.knowledgedFindPage(data).subscribe(
(res) => {
if (res.errCode == 10000) {
if (res.data) {
this.dataSet = res.data.data;
this.totalNum = res.data.totalNum;
}
} else {
this.message.info(res.errMsg);
}
this.loading = false;
}
);
} }
//导入 //导入
...@@ -23,8 +62,12 @@ export class ManagementSystemComponent implements OnInit { ...@@ -23,8 +62,12 @@ export class ManagementSystemComponent implements OnInit {
} }
//下载 //下载
download(data) { download(item) {
this.workSer.knowledgedDownload(item.id).subscribe(
(data) => {
this.commonSer.downloadFile(item.name, data);
}
);
} }
} }
...@@ -66,6 +66,10 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{ ...@@ -66,6 +66,10 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{
const sub = this.appSer.theme.subscribe(value=>{ const sub = this.appSer.theme.subscribe(value=>{
this.theme = value; this.theme = value;
}) })
const data = {
token:''
}
} }
/** /**
......
...@@ -107,7 +107,6 @@ export class CommonService implements OnInit { ...@@ -107,7 +107,6 @@ export class CommonService implements OnInit {
*/ */
downloadFile(title, data: Response) { downloadFile(title, data: Response) {
const blob = new Blob([data], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;'}); const blob = new Blob([data], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;'});
const ie = navigator.userAgent.match(/MSIE\s([\d.]+)/), const ie = navigator.userAgent.match(/MSIE\s([\d.]+)/),
ie11 = navigator.userAgent.match(/Trident\/7.0/) && navigator.userAgent.match(/rv:11/), ie11 = navigator.userAgent.match(/Trident\/7.0/) && navigator.userAgent.match(/rv:11/),
ieEDGE = navigator.userAgent.match(/Edge/g), ieEDGE = navigator.userAgent.match(/Edge/g),
......
...@@ -18,7 +18,7 @@ export class UploadComponent implements OnInit { ...@@ -18,7 +18,7 @@ export class UploadComponent implements OnInit {
fileList: UploadFile[] = []; fileList: UploadFile[] = [];
constructor(private message: NzMessageService, private workSer: WorkService, constructor(private message: NzMessageService, private workSer: WorkService,
private systemSer: SystemService,private overAllSer:OverAllService) { private systemSer: SystemService, private overAllSer: OverAllService) {
} }
ngOnInit() { ngOnInit() {
...@@ -59,9 +59,12 @@ export class UploadComponent implements OnInit { ...@@ -59,9 +59,12 @@ export class UploadComponent implements OnInit {
if (this.title == '上传组织文件') { if (this.title == '上传组织文件') {
this.orgUpload(); this.orgUpload();
} }
if(this.title == '上传XML模版'){ if (this.title == '上传XML模版') {
this.xmlpload(); this.xmlpload();
} }
if (this.title == '上传常见问题文件' || this.title == '上传信息技术文件' || this.title == '上传管理制度文件') {
this.knowladgeUpload();
}
} }
//上传资产文件 //上传资产文件
...@@ -145,4 +148,30 @@ export class UploadComponent implements OnInit { ...@@ -145,4 +148,30 @@ export class UploadComponent implements OnInit {
} }
); );
} }
//知识库里面的文件
knowladgeUpload() {
let flag;
if (this.title == '上传常见问题文件') flag = 0;
if (this.title == '上传信息技术文件') flag = 1;
if (this.title == '上传管理制度文件') flag = 2;
const formData = new FormData();
this.fileList.forEach((file: any) => {
formData.append('file', file);
});
this.workSer.importKnowladage(formData, flag).subscribe(
(res) => {
if (res.errCode == 10000) {
this.isVisible = false;
this.fileList = [];
this.done.emit();
this.message.success('上传成功');
} else {
this.message.error(res.errMsg);
}
this.isOkLoading = false;
}
);
}
} }
import { Injectable } from '@angular/core'; import {Injectable} from '@angular/core';
import {Observable} from 'rxjs/Rx'; import {Observable} from 'rxjs/Rx';
import {SERVER_API_URL} from '../app.constants'; import {SERVER_API_URL} from '../app.constants';
import {HttpClient} from '@angular/common/http'; import {HttpClient} from '@angular/common/http';
...@@ -10,183 +10,198 @@ export class WorkService { ...@@ -10,183 +10,198 @@ export class WorkService {
} }
//事件转派 //事件转派
transfer(data): Observable<any>{ transfer(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/sysevent/transfer' ,data); return this.http.post(SERVER_API_URL + '/sysevent/transfer', data);
} }
//修改事件 //修改事件
update(data): Observable<any>{ update(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/sysevent/update' ,data); return this.http.post(SERVER_API_URL + '/sysevent/update', data);
} }
//删除事件 //删除事件
deleteEvent(data): Observable<any>{ deleteEvent(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/sysevent/delete' ,data); return this.http.post(SERVER_API_URL + '/sysevent/delete', data);
} }
//查找事件列表 //查找事件列表
find(data): Observable<any>{ find(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/sysevent/find' ,data); return this.http.post(SERVER_API_URL + '/sysevent/find', data);
} }
//根据事件编号查询 //根据事件编号查询
findByNo(params): Observable<any>{ findByNo(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/sysevent/findTransferAndInventory/' +params); return this.http.get(SERVER_API_URL + '/sysevent/findTransferAndInventory/' + params);
} }
//添加事件 //添加事件
create(data): Observable<any>{ create(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/sysevent/create' ,data); return this.http.post(SERVER_API_URL + '/sysevent/create', data);
} }
//事件信息流转记录查询接口 //事件信息流转记录查询接口
transferInfo(params): Observable<any>{ transferInfo(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/sysevent/transferInfo/' +params); return this.http.get(SERVER_API_URL + '/sysevent/transferInfo/' + params);
} }
//处理事件 //处理事件
deal(data): Observable<any>{ deal(data): Observable<any> {
return this.http.put(SERVER_API_URL + '/sysevent/deal' ,data); return this.http.put(SERVER_API_URL + '/sysevent/deal', data);
} }
//事件确认 //事件确认
confirmEvent(data): Observable<any>{ confirmEvent(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/sysevent/confirm' ,data); return this.http.post(SERVER_API_URL + '/sysevent/confirm', data);
} }
//查询事件, 操作人, 流转记录, 资产 //查询事件, 操作人, 流转记录, 资产
findTransferAndInventory(params): Observable<any>{ findTransferAndInventory(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/sysevent/findTransferAndInventory/' +params); return this.http.get(SERVER_API_URL + '/sysevent/findTransferAndInventory/' + params);
} }
//修改巡检计划 //修改巡检计划
updatePlan(data): Observable<any>{ updatePlan(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/plan/update' ,data); return this.http.post(SERVER_API_URL + '/plan/update', data);
} }
//删除计划 //删除计划
deletePlan(data): Observable<any>{ deletePlan(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/plan/delete' ,data); return this.http.post(SERVER_API_URL + '/plan/delete', data);
} }
//查找单个计划 //查找单个计划
findPlan(params): Observable<any>{ findPlan(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/plan/find/' +params); return this.http.get(SERVER_API_URL + '/plan/find/' + params);
} }
//查询列表 //查询列表
findPlanList(data): Observable<any>{ findPlanList(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/plan/find' ,data); return this.http.post(SERVER_API_URL + '/plan/find', data);
} }
//添加巡检计划 //添加巡检计划
createPlan(data): Observable<any>{ createPlan(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/plan/create' ,data); return this.http.post(SERVER_API_URL + '/plan/create', data);
} }
//修改资产分类 //修改资产分类
updateType(data): Observable<any>{ updateType(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/inventory/updateType' ,data); return this.http.post(SERVER_API_URL + '/inventory/updateType', data);
} }
//查询所有父级资产类型 //查询所有父级资产类型
findByParentType(): Observable<any>{ findByParentType(): Observable<any> {
return this.http.get(SERVER_API_URL + '/inventory/findByParentType' ); return this.http.get(SERVER_API_URL + '/inventory/findByParentType');
} }
//根据父级类型查询子级 //根据父级类型查询子级
findByParentidCount(params): Observable<any>{ findByParentidCount(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/inventory/findByParentidCount/' +params); return this.http.get(SERVER_API_URL + '/inventory/findByParentidCount/' + params);
} }
//创建资产分类 //创建资产分类
createType(data): Observable<any>{ createType(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/inventory/createType' ,data); return this.http.post(SERVER_API_URL + '/inventory/createType', data);
} }
//根据主键id查询资产类型 //根据主键id查询资产类型
findType(params): Observable<any>{ findType(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/inventory/findType/' +params); return this.http.get(SERVER_API_URL + '/inventory/findType/' + params);
} }
//根据资产类型id 查询没有配置主机的资产 //根据资产类型id 查询没有配置主机的资产
selectByInventoryTypeidAndHostidNull(params): Observable<any>{ selectByInventoryTypeidAndHostidNull(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/inventory/selectByInventoryTypeidAndHostidNull/' ,params); return this.http.get(SERVER_API_URL + '/inventory/selectByInventoryTypeidAndHostidNull/', params);
} }
//设置资产匹配的主机 //设置资产匹配的主机
updateHostid(data): Observable<any>{ updateHostid(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/inventory/updateHostid' ,data); return this.http.post(SERVER_API_URL + '/inventory/updateHostid', data);
} }
//根据type查找 //根据type查找
findByType(data): Observable<any>{ findByType(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/syseventType/findByType' ,data); return this.http.post(SERVER_API_URL + '/syseventType/findByType', data);
} }
//创建资产 //创建资产
createInventory(data): Observable<any>{ createInventory(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/inventory/createInventory' ,data); return this.http.post(SERVER_API_URL + '/inventory/createInventory', data);
} }
//修改资产 //修改资产
updateInventory(data): Observable<any>{ updateInventory(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/inventory/updateInventory' ,data); return this.http.post(SERVER_API_URL + '/inventory/updateInventory', data);
} }
//根据资产类型id查询资产 //根据资产类型id查询资产
findInventory(params): Observable<any>{ findInventory(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/inventory/findInventory/' +params); return this.http.get(SERVER_API_URL + '/inventory/findInventory/' + params);
} }
//删除资产(可批量) //删除资产(可批量)
deleteInventory(data): Observable<any>{ deleteInventory(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/inventory/deleteInventory' ,data); return this.http.post(SERVER_API_URL + '/inventory/deleteInventory', data);
} }
//导入资产 //导入资产
importInventory(data): Observable<any>{ importInventory(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/inventory/import' ,data); return this.http.post(SERVER_API_URL + '/inventory/import', data);
}
//导入知识库
importKnowladage(data, params): Observable<any> {
return this.http.post(SERVER_API_URL + '/knowledge/import/' + params, data);
}
//知识库翻页
knowledgedFindPage(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/knowledge/findPage', data);
}
//下载
knowledgedDownload(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/knowledge/download/' + params,{responseType: 'blob'});
} }
//根据资产类型id查询资产 //根据资产类型id查询资产
selectByPrimaryKey(params): Observable<any>{ selectByPrimaryKey(params): Observable<any> {
return this.http.get(SERVER_API_URL + '/inventory/selectByPrimaryKey/' +params); return this.http.get(SERVER_API_URL + '/inventory/selectByPrimaryKey/' + params);
} }
//删除资产分类 //删除资产分类
deleteType(data): Observable<any>{ deleteType(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/inventory/deleteType' ,data); return this.http.post(SERVER_API_URL + '/inventory/deleteType', data);
} }
//根据type查找 //根据type查找
findParamsByType(data): Observable<any>{ findParamsByType(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/syseventType/findByType' ,data); return this.http.post(SERVER_API_URL + '/syseventType/findByType', data);
} }
//添加类型 //添加类型
createTypeByparams(data): Observable<any>{ createTypeByparams(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/syseventType/create' ,data); return this.http.post(SERVER_API_URL + '/syseventType/create', data);
} }
//修改分类 //修改分类
updateTypeByparams(data): Observable<any>{ updateTypeByparams(data): Observable<any> {
return this.http.put(SERVER_API_URL + '/syseventType/update' ,data); return this.http.put(SERVER_API_URL + '/syseventType/update', data);
} }
//删除分类 //删除分类
deleteTypeByparams(data): Observable<any>{ deleteTypeByparams(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/syseventType/delete' ,data); return this.http.post(SERVER_API_URL + '/syseventType/delete', data);
} }
//查找当前事件编号前缀 //查找当前事件编号前缀
getEventNoPre(): Observable<any>{ getEventNoPre(): Observable<any> {
return this.http.get(SERVER_API_URL + '/sysevent/getEventNoPre' ); return this.http.get(SERVER_API_URL + '/sysevent/getEventNoPre');
} }
//修改事件编号前缀 //修改事件编号前缀
updateEventNoPre(data): Observable<any>{ updateEventNoPre(data): Observable<any> {
return this.http.put(SERVER_API_URL + '/sysevent/updateEventNoPre',data ); return this.http.put(SERVER_API_URL + '/sysevent/updateEventNoPre', data);
} }
/** /**
...@@ -195,14 +210,14 @@ export class WorkService { ...@@ -195,14 +210,14 @@ export class WorkService {
* @param url 地址 * @param url 地址
* @returns {Observable<any>} * @returns {Observable<any>}
*/ */
downloadTemplate(pararmsType,paramsId): Observable<any>{ downloadTemplate(pararmsType, paramsId): Observable<any> {
return this.http.get( SERVER_API_URL + "/api/download/file/" + pararmsType +"/"+ paramsId,{responseType: 'blob'}); return this.http.get(SERVER_API_URL + '/api/download/file/' + pararmsType + '/' + paramsId, {responseType: 'blob'});
} }
/** /**
* 批量下载资产文件 * 批量下载资产文件
*/ */
getExportUrl(data): Observable<any>{ getExportUrl(data): Observable<any> {
return this.http.post( SERVER_API_URL + "/inventory/getExportUrl" ,data); return this.http.post(SERVER_API_URL + '/inventory/getExportUrl', data);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment