Commit 85098044 authored by wangqinghua's avatar wangqinghua

update

parent 97bd3c9b
...@@ -94,6 +94,7 @@ import {HomeComponent} from './home/home.component'; ...@@ -94,6 +94,7 @@ import {HomeComponent} from './home/home.component';
import {SelectGroupComponent} from './modal/select-group/select-group.component'; import {SelectGroupComponent} from './modal/select-group/select-group.component';
import {ModifyPasswordComponent} from './modal/modify-password/modify-password.component'; import {ModifyPasswordComponent} from './modal/modify-password/modify-password.component';
import {FullScreenComponent} from './modal/full-screen/full-screen.component'; import {FullScreenComponent} from './modal/full-screen/full-screen.component';
import {LookRoleComponent} from './look-role/look-role.component';
@NgModule({ @NgModule({
imports: [ imports: [
...@@ -189,6 +190,8 @@ import {FullScreenComponent} from './modal/full-screen/full-screen.component'; ...@@ -189,6 +190,8 @@ import {FullScreenComponent} from './modal/full-screen/full-screen.component';
SelectGroupComponent, SelectGroupComponent,
ModifyPasswordComponent, ModifyPasswordComponent,
FullScreenComponent, FullScreenComponent,
LookPlanComponent,
LookRoleComponent,
], ],
providers:[ providers:[
OverAllService, OverAllService,
......
...@@ -56,6 +56,7 @@ p { ...@@ -56,6 +56,7 @@ p {
color: #6097b7; color: #6097b7;
font-size: 20px font-size: 20px
} }
.main-font-color
/*我的关注*/ /*我的关注*/
.follow { .follow {
......
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'smart-look-role',
templateUrl: './look-role.component.html',
styles: []
})
export class LookRoleComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
...@@ -106,6 +106,9 @@ export class AlarmModalComponent implements OnInit { ...@@ -106,6 +106,9 @@ export class AlarmModalComponent implements OnInit {
//下级 //下级
mouseAction(name: string, event: NzFormatEmitEvent) { mouseAction(name: string, event: NzFormatEmitEvent) {
if(event.node.children.length > 0){
return false;
}
const index = <any>event.node.key - 1; const index = <any>event.node.key - 1;
const data = { const data = {
'groupids': [event.node.origin.groupid], 'groupids': [event.node.origin.groupid],
...@@ -123,8 +126,6 @@ export class AlarmModalComponent implements OnInit { ...@@ -123,8 +126,6 @@ export class AlarmModalComponent implements OnInit {
res.isLeaf = true; res.isLeaf = true;
}); });
event.node.addChildren(dataSet); event.node.addChildren(dataSet);
this.nodeList[index].children = dataSet;
this.nodeList[index].expanded = true;
} else { } else {
event.node.addChildren([]); event.node.addChildren([]);
this.message.info('该分组下无资源'); this.message.info('该分组下无资源');
......
...@@ -118,19 +118,19 @@ ...@@ -118,19 +118,19 @@
<nz-tab nzTitle="2.步骤"> <nz-tab nzTitle="2.步骤">
<button (click)="addStep()" nz-button nzType="default">添加步骤</button> <button (click)="addStep()" nz-button nzType="default">添加步骤</button>
<div> <div style="padding: 10px;">
<div nz-row [nzGutter]="24"> <div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="1"> <div nz-col [nzSpan]="1">
No No
</div> </div>
<div nz-col [nzSpan]="3"> <div nz-col [nzSpan]="3">
步骤名称 <span class="color-red">*</span>步骤名称
</div> </div>
<div nz-col [nzSpan]="3"> <div nz-col [nzSpan]="3">
超时 <span class="color-red">*</span>超时
</div> </div>
<div nz-col [nzSpan]="3"> <div nz-col [nzSpan]="3">
URL <span class="color-red">*</span>URL
</div> </div>
<div nz-col [nzSpan]="3"> <div nz-col [nzSpan]="3">
要求字串 要求字串
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
要求状态码 要求状态码
</div> </div>
<div nz-col [nzSpan]="3"> <div nz-col [nzSpan]="3">
跟随调整 <span class="color-red">*</span>跟随跳转
</div> </div>
<div nz-col [nzSpan]="1"> <div nz-col [nzSpan]="1">
......
...@@ -35,14 +35,14 @@ ...@@ -35,14 +35,14 @@
<div class="layui-layout layui-layout-admin"> <div class="layui-layout layui-layout-admin">
<div class="layui-header layui-bg-gray" style="line-height: 60px;color: #6097b7;padding: 0 20px;"> <div class="layui-header header-bar">
<span (click)="addDevice()">添加设备</span> <span (click)="addDevice()">添加设备</span>
<span (click)="addCheck()">添加监测点</span> <span (click)="addCheck()">添加监测点</span>
<span (click)="showAddImg()">添加图片</span> <span (click)="showAddImg()">添加图片</span>
<span onClick="editor.utils.deleteSelectedNodes()">移除</span> <span onClick="editor.utils.deleteSelectedNodes()">移除</span>
<!-- 顶部工具栏 --> <!-- 顶部工具栏 -->
<div class="layui-nav layui-layout-right" > <div class="layui-nav layui-layout-right" style="color: #6097b7" >
<span aria-hidden="true" title="全屏查看" <span aria-hidden="true" title="全屏查看"
onClick="editor.utils.showInFullScreen(editor.stage.canvas,'RequestFullScreen')">全屏查看</span> onClick="editor.utils.showInFullScreen(editor.stage.canvas,'RequestFullScreen')">全屏查看</span>
<span aria-hidden="true" title="居中显示" onClick="editor.utils.showInCenter()">居中显示</span> <span aria-hidden="true" title="居中显示" onClick="editor.utils.showInCenter()">居中显示</span>
......
...@@ -28,6 +28,12 @@ declare var layui: any; ...@@ -28,6 +28,12 @@ declare var layui: any;
margin-right: 15px; margin-right: 15px;
cursor: pointer; cursor: pointer;
} }
.header-bar{
line-height: 60px;
color: #6097b7;
padding: 0 20px;
background-color: #ddd;
}
.tips { .tips {
position: absolute; position: absolute;
......
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
<div nz-row class="search-form"> <div nz-row class="search-form">
<div nz-col nzSpan="16"> <div nz-col nzSpan="16">
<button (click)="showSeparationModal()" nz-button nzType="default">三员分立</button> <button (click)="showSeparationModal()" nz-button nzType="default">三员分立</button>
<button (click)="showAddRoleModal()" nz-button nzType="default"><i class="anticon anticon-plus-circle-o"></i>新增角色</button> <button (click)="showAddRoleModal()" nz-button nzType="default"><i class="anticon anticon-plus-circle-o"></i>新增角色
</button>
</div> </div>
<div nz-col nzSpan="8" class="text-right"> <div nz-col nzSpan="8" class="text-right">
<input nz-input placeholder="角色/权限模块/资源权限"> <input nz-input placeholder="角色/权限模块/资源权限">
...@@ -33,8 +34,8 @@ ...@@ -33,8 +34,8 @@
<tr> <tr>
<th>角色名称</th> <th>角色名称</th>
<th>说明</th> <th>说明</th>
<th>权限模块</th> <!--<th>权限模块</th>-->
<th>资源权限</th> <!--<th>资源权限</th>-->
<th>有效</th> <th>有效</th>
<th>操作</th> <th>操作</th>
</tr> </tr>
...@@ -42,9 +43,9 @@ ...@@ -42,9 +43,9 @@
<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.comments}}</td> <td>{{data.comment}}</td>
<td>{{data.key3}}</td> <!--<td>{{data.key3}}</td>-->
<td>{{data.key4}}</td> <!--<td>{{data.key4}}</td>-->
<td> <td>
<ng-container *ngIf="data.status == 0"> <ng-container *ngIf="data.status == 0">
<i class="anticon anticon-check"></i> <i class="anticon anticon-check"></i>
...@@ -52,7 +53,7 @@ ...@@ -52,7 +53,7 @@
</td> </td>
<td class="handle"> <td class="handle">
<span (click)="grantUser(data)">授予用户</span> <span (click)="grantUser(data)">授予用户</span>
<span>查看</span> <!--<span (click)="lookRole(data)">查看</span>-->
<span (click)="showEditModal(data)">编辑</span> <span (click)="showEditModal(data)">编辑</span>
<span (click)="deleteRole(data)">删除</span> <span (click)="deleteRole(data)">删除</span>
</td> </td>
...@@ -67,3 +68,5 @@ ...@@ -67,3 +68,5 @@
<!--选择人员--> <!--选择人员-->
<smart-select-person #smartSelectPerson (done)="batchAdduserToRole($event)"></smart-select-person> <smart-select-person #smartSelectPerson (done)="batchAdduserToRole($event)"></smart-select-person>
<!--查看角色-->
<smart-look-role #smartLookRole></smart-look-role>
...@@ -4,6 +4,7 @@ import {RoleComponent} from '../modal/role/role.component'; ...@@ -4,6 +4,7 @@ import {RoleComponent} from '../modal/role/role.component';
import {NzMessageService, NzModalService} from 'ng-zorro-antd'; import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {SelectPersonComponent} from '../../modal/select-person/select-person.component'; import {SelectPersonComponent} from '../../modal/select-person/select-person.component';
import {SeparationComponent} from '../modal/separation/separation.component'; import {SeparationComponent} from '../modal/separation/separation.component';
import {LookRoleComponent} from '../../look-role/look-role.component';
@Component({ @Component({
selector: 'jhi-power', selector: 'jhi-power',
...@@ -14,6 +15,7 @@ export class PowerComponent implements OnInit { ...@@ -14,6 +15,7 @@ export class PowerComponent implements OnInit {
@ViewChild('smartRole') smartRole: RoleComponent; @ViewChild('smartRole') smartRole: RoleComponent;
@ViewChild('smartSelectPerson') smartSelectPerson:SelectPersonComponent; @ViewChild('smartSelectPerson') smartSelectPerson:SelectPersonComponent;
@ViewChild('smartSeparation') smartSeparation:SeparationComponent; @ViewChild('smartSeparation') smartSeparation:SeparationComponent;
@ViewChild('smartLookRole') smartLookRole:LookRoleComponent;
dataSet: any[]; dataSet: any[];
isVisible = false; isVisible = false;
...@@ -116,4 +118,8 @@ export class PowerComponent implements OnInit { ...@@ -116,4 +118,8 @@ export class PowerComponent implements OnInit {
e.preventDefault(); e.preventDefault();
} }
lookRole(data){
}
} }
...@@ -36,13 +36,15 @@ ...@@ -36,13 +36,15 @@
<div nz-row [nzGutter]="24"> <div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12"> <div nz-col [nzSpan]="12">
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="equipmentTypeid">资产编号 <nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="equipmentTypeid">资产编号</nz-form-label>
</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
{{inventoryExtend?.inventoryNo}} {{inventoryExtend?.inventoryNo}}
<ng-container *ngIf="!inventoryExtend?.hostid"> <ng-container *ngIf="!inventoryExtend?.hostid">
<button nzSize="small" (click)="linkThen()" nz-button nzType="primary">关联</button> <button nzSize="small" (click)="linkThen()" nz-button nzType="primary">关联</button>
</ng-container> </ng-container>
<ng-container *ngIf="inventoryExtend?.hostid">
<span (click)="goToHost(inventoryExtend?.hostid)" class="main-color-font">已关联监控资源</span>
</ng-container>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
......
...@@ -126,4 +126,14 @@ export class AssetsDetailComponent implements OnInit { ...@@ -126,4 +126,14 @@ export class AssetsDetailComponent implements OnInit {
} }
) )
} }
//查看资源
goToHost(hostid){
this.router.navigate(['app/main/basic-detail'], {
queryParams: {
hostId: hostid,
type: 0,
}
});
}
} }
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<th>计划类型</th> <th>计划类型</th>
<th>计划负责人</th> <th>计划负责人</th>
<th>循环周期</th> <th>循环周期</th>
<th>计划工作量</th> <!--<th>计划工作量</th>-->
<th>开始日期</th> <th>开始日期</th>
<th>计划状态</th> <th>计划状态</th>
<th style="text-align: center">操作</th> <th style="text-align: center">操作</th>
...@@ -71,10 +71,17 @@ ...@@ -71,10 +71,17 @@
</td> </td>
<td>{{data.principals[0].username}}</td> <td>{{data.principals[0].username}}</td>
<td> <td>
{{data.cycleNum}}/{{data.cycleType}} <span *ngIf="data.cycleType == '0'">每天</span>
<span *ngIf="data.cycleType == '1'">工作日</span>
<span *ngIf="data.cycleType == '2'">每周</span>
<span *ngIf="data.cycleType == '3'">每月</span>
<span *ngIf="data.cycleType == '4'">每季度</span>
<span *ngIf="data.cycleType == '5'">每半年</span>
<span *ngIf="data.cycleType == '6'"></span>
/{{data.cycleNum}}
</td> </td>
<td>{{data.workload}}</td> <!--<td>{{data.workload}}</td>-->
<td>{{data.createTime | date:"yyyy-MM-dd HH:mm:ss"}}</td> <td>{{data.startTime | date:"yyyy-MM-dd HH:mm:ss"}}</td>
<td> <td>
<span *ngIf="data.status == 0">未开始</span> <span *ngIf="data.status == 0">未开始</span>
<span *ngIf="data.status == 1">进行中</span> <span *ngIf="data.status == 1">进行中</span>
......
...@@ -12,14 +12,14 @@ ...@@ -12,14 +12,14 @@
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col [nzSpan]="12"> <!--<div nz-col [nzSpan]="12">-->
<nz-form-item nzFlex> <!--<nz-form-item nzFlex>-->
<nz-form-label [nzSpan]="6" nzFor="typeId">计划工作量</nz-form-label> <!--<nz-form-label [nzSpan]="6" nzFor="typeId">计划工作量</nz-form-label>-->
<nz-form-control [nzSpan]="14"> <!--<nz-form-control [nzSpan]="14">-->
</nz-form-control> <!--</nz-form-control>-->
</nz-form-item> <!--</nz-form-item>-->
</div> <!--</div>-->
</div> </div>
<div nz-row [nzGutter]="24"> <div nz-row [nzGutter]="24">
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
开始日期 开始日期
</nz-form-label> </nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
{{plan?.startTime}} {{plan?.startTime | date:"yyyy-MM-dd HH:mm:ss"}}
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzSpan]="6" nzFor="serialnoA">终止日期</nz-form-label> <nz-form-label [nzSpan]="6" nzFor="serialnoA">终止日期</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
{{plan?.endTime}} {{plan?.endTime | date:"yyyy-MM-dd HH:mm:ss"}}
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
...@@ -50,10 +50,16 @@ ...@@ -50,10 +50,16 @@
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="secondLevelType"> <nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="secondLevelType">
循环周期 循环周期
</nz-form-label> </nz-form-label>
<nz-form-control [nzSpan]="7"> <nz-form-control [nzSpan]="4">
{{plan?.cycleType}} <span *ngIf="plan?.cycleType == '0'">每天</span>
<span *ngIf="plan?.cycleType == '1'">工作日</span>
<span *ngIf="plan?.cycleType == '2'">每周</span>
<span *ngIf="plan?.cycleType == '3'">每月</span>
<span *ngIf="plan?.cycleType == '4'">每季度</span>
<span *ngIf="plan?.cycleType == '5'">每半年</span>
<span *ngIf="plan?.cycleType == '6'"></span>
</nz-form-control> </nz-form-control>
<nz-form-control [nzSpan]="6"> <nz-form-control [nzSpan]="2">
{{plan?.cycleNum}} {{plan?.cycleNum}}
</nz-form-control> </nz-form-control>
<nz-form-control [nzSpan]="6"> <nz-form-control [nzSpan]="6">
...@@ -72,34 +78,50 @@ ...@@ -72,34 +78,50 @@
</div> </div>
</div> </div>
<nz-form-item> <div nz-row [nzGutter]="24">
<nz-form-label [nzSpan]="4" nzRequired nzFor="serviceid">参与人</nz-form-label> <div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="title">参与人</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<span *ngFor="let item of plan?.participants">{{item.username}}</span> <span style="margin-right: 5px" *ngFor="let item of plan?.participants">{{item.username}}</span>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div>
</div>
<nz-form-item> <div nz-row [nzGutter]="24">
<nz-form-label [nzSpan]="4" nzRequired nzFor="serviceid">负责人</nz-form-label> <div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="title">负责人</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<span *ngFor="let item of plan?.principals">{{item.username}}</span> <span style="margin-right: 5px" *ngFor="let item of plan?.principals">{{item.username}}</span>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div>
</div>
<nz-form-item> <div nz-row [nzGutter]="24">
<nz-form-label [nzSpan]="4" nzRequired nzFor="description">计划描述</nz-form-label> <div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="title">计划描述</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
{{plan?.description}} {{plan?.description}}
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div>
</div>
<nz-form-item> <div nz-row [nzGutter]="24">
<nz-form-label [nzSpan]="7" nzRequired nzFor="group">附件</nz-form-label> <div nz-col [nzSpan]="12">
<nz-form-control [nzSpan]="12"> <nz-form-item nzFlex>
<a href="/file/planFile/{{plan?.file}}" download>下载</a> <nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="title">附件</nz-form-label>
<nz-form-control [nzSpan]="14">
<a (click)="downLoad()">下载</a>
<a class="main-color cursor">{{plan?.fileNmae}}</a>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div>
</div>
</div> </div>
</form> </form>
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import {WorkService} from '../../work.service'; import {WorkService} from '../../work.service';
import {fileUrl} from '../../../app.constants'; import {fileUrl} from '../../../app.constants';
import {CommonService} from '../../../shared/common/common.service';
@Component({ @Component({
selector: 'smart-look-plan', selector: 'smart-look-plan',
...@@ -12,14 +13,16 @@ export class LookPlanComponent implements OnInit { ...@@ -12,14 +13,16 @@ export class LookPlanComponent implements OnInit {
isVisible = false; isVisible = false;
title; title;
plan; plan;
planId;
url = fileUrl + "/planFile/"; url = fileUrl + "/planFile/";
constructor(private workSer:WorkService) { } constructor(private workSer:WorkService,private commonSer:CommonService) { }
ngOnInit() { ngOnInit() {
} }
showModal(id,name){ showModal(id,name){
this.planId = id;
this.title = "计划:"+name; this.title = "计划:"+name;
this.isVisible = true; this.isVisible = true;
this.workSer.findPlan(id).subscribe( this.workSer.findPlan(id).subscribe(
...@@ -35,4 +38,12 @@ export class LookPlanComponent implements OnInit { ...@@ -35,4 +38,12 @@ export class LookPlanComponent implements OnInit {
this.isVisible = false; this.isVisible = false;
} }
downLoad(){
this.workSer.downloadTemplate("plan",this.planId).subscribe(
(data)=>{
this.commonSer.downloadFile(this.plan.fileName,data)
}
)
}
} }
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
</nz-form-control> </nz-form-control>
<nz-form-control [nzSpan]="6" *ngIf="validateForm.value.cycleType != 6"> <nz-form-control [nzSpan]="6" *ngIf="validateForm.value.cycleType != 6">
<nz-select name="cycleType" name="cycleType" nzPlaceHolder="次数" formControlName="cycleType"> <nz-select name="cycleNum" name="cycleNum" nzPlaceHolder="次数" formControlName="cycleNum">
<nz-option nzValue="1" nzLabel="1"></nz-option> <nz-option nzValue="1" nzLabel="1"></nz-option>
<nz-option nzValue="2" nzLabel="2"></nz-option> <nz-option nzValue="2" nzLabel="2"></nz-option>
<nz-option nzValue="3" nzLabel="3"></nz-option> <nz-option nzValue="3" nzLabel="3"></nz-option>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<div nz-row> <div nz-row>
<div nz-col nzSpan="4">请求人</div> <div nz-col nzSpan="4">请求人</div>
<div nz-col nzSpan="1"></div> <div nz-col nzSpan="1"></div>
<div nz-col nzSpan="4">{{event?.requester}}</div> <div nz-col nzSpan="3">{{event?.requester}}</div>
<div nz-col nzSpan="7">{{event?.requesterPhone}}</div> <div nz-col nzSpan="7">{{event?.requesterPhone}}</div>
</div> </div>
<div nz-row> <div nz-row>
...@@ -53,7 +53,9 @@ ...@@ -53,7 +53,9 @@
<div nz-row> <div nz-row>
<div nz-col nzSpan="4">附件</div> <div nz-col nzSpan="4">附件</div>
<div nz-col nzSpan="1"></div> <div nz-col nzSpan="1"></div>
<div nz-col nzSpan="7">{{event?.file}}</div> <div nz-col nzSpan="7">{{event?.fileName}}
<span (click)="downLoad()" class="main-color cursor">下载</span>
</div>
</div> </div>
<h2>处理结果</h2> <h2>处理结果</h2>
......
...@@ -2,6 +2,7 @@ import {Component, OnInit} from '@angular/core'; ...@@ -2,6 +2,7 @@ import {Component, OnInit} from '@angular/core';
import {WorkService} from '../../work.service'; import {WorkService} from '../../work.service';
import {NzMessageService} from 'ng-zorro-antd'; import {NzMessageService} from 'ng-zorro-antd';
import {ActivatedRoute} from '@angular/router'; import {ActivatedRoute} from '@angular/router';
import {CommonService} from '../../../shared/common/common.service';
@Component({ @Component({
selector: 'smart-handle-detail', selector: 'smart-handle-detail',
...@@ -29,7 +30,7 @@ export class HandleDetailComponent implements OnInit { ...@@ -29,7 +30,7 @@ export class HandleDetailComponent implements OnInit {
transforsList; transforsList;
constructor(private workSer: WorkService, private message: NzMessageService, constructor(private workSer: WorkService, private message: NzMessageService,
private routrInfo: ActivatedRoute) { private routrInfo: ActivatedRoute,private commonSer:CommonService) {
this.routrInfo.queryParams.subscribe( this.routrInfo.queryParams.subscribe(
(res) => { (res) => {
this.eventId = res.eventId; this.eventId = res.eventId;
...@@ -48,4 +49,13 @@ export class HandleDetailComponent implements OnInit { ...@@ -48,4 +49,13 @@ export class HandleDetailComponent implements OnInit {
} }
); );
} }
downLoad(){
this.workSer.downloadTemplate("event",this.eventId).subscribe(
(data)=>{
this.commonSer.downloadFile(this.event.fileName,data)
}
)
}
} }
...@@ -54,7 +54,9 @@ ...@@ -54,7 +54,9 @@
<div nz-row> <div nz-row>
<div nz-col nzSpan="4">附件</div> <div nz-col nzSpan="4">附件</div>
<div nz-col nzSpan="1"></div> <div nz-col nzSpan="1"></div>
<div nz-col nzSpan="7">{{event?.fileName}}</div> <div nz-col nzSpan="7">{{event?.fileName}}
<span (click)="downLoad()" class="main-color cursor">下载</span>
</div>
</div> </div>
<h2>流转记录</h2> <h2>流转记录</h2>
......
...@@ -5,6 +5,7 @@ import {NzMessageService} from 'ng-zorro-antd'; ...@@ -5,6 +5,7 @@ import {NzMessageService} from 'ng-zorro-antd';
import {LinkInventoryComponent} from '../../modal/link-inventory/link-inventory.component'; import {LinkInventoryComponent} from '../../modal/link-inventory/link-inventory.component';
import {DatePipe, Location} from '@angular/common'; import {DatePipe, Location} from '@angular/common';
import {TransforComponent} from '../../modal/transfor/transfor.component'; import {TransforComponent} from '../../modal/transfor/transfor.component';
import {CommonService} from '../../../shared/common/common.service';
@Component({ @Component({
selector: 'smart-handle-event', selector: 'smart-handle-event',
...@@ -41,7 +42,7 @@ export class HandleEventComponent implements OnInit { ...@@ -41,7 +42,7 @@ export class HandleEventComponent implements OnInit {
time; time;
constructor(private routrInfo: ActivatedRoute, private workSer: WorkService,private location:Location, constructor(private routrInfo: ActivatedRoute, private workSer: WorkService,private location:Location,
private message: NzMessageService,private datePipe:DatePipe) { private message: NzMessageService,private datePipe:DatePipe,private commonSer:CommonService) {
this.routrInfo.queryParams.subscribe( this.routrInfo.queryParams.subscribe(
(res) => { (res) => {
this.eventId = res.eventId; this.eventId = res.eventId;
...@@ -135,4 +136,12 @@ export class HandleEventComponent implements OnInit { ...@@ -135,4 +136,12 @@ export class HandleEventComponent implements OnInit {
} }
downLoad(){
this.workSer.downloadTemplate("event",this.eventId).subscribe(
(data)=>{
this.commonSer.downloadFile(this.event.fileName,data)
}
)
}
} }
...@@ -183,4 +183,15 @@ export class WorkService { ...@@ -183,4 +183,15 @@ export class WorkService {
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 );
} }
/**
* 附件文件
* @param pararms 参数
* @param url 地址
* @returns {Observable<any>}
*/
downloadTemplate(pararmsType,paramsId): Observable<any>{
return this.http.get( SERVER_API_URL + "/api/download/file/" + pararmsType +"/"+ paramsId,{responseType: 'blob'});
}
} }
...@@ -167,3 +167,6 @@ ...@@ -167,3 +167,6 @@
.padding-10{ .padding-10{
padding: 10px; padding: 10px;
} }
.main-color{
color:#6097b7;
}
\ No newline at end of file
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