陈鹏飞 4 years ago
parent
commit
caeafb2f1d
  1. 20
      src/app/examiner/create-test-score/create-test-score.component.html
  2. 355
      src/app/examiner/create-test-score/create-test-score.component.ts
  3. 2
      src/app/examiner/examiner-index/examiner-index.component.html
  4. 62
      src/app/examiner/examiner-index/examiner-index.component.ts
  5. 20
      src/app/ui/collection-tools/examinationQuestions.ts

20
src/app/examiner/create-test-score/create-test-score.component.html

@ -66,7 +66,7 @@
[nzData]="unit.basicInfoNodes"
nzCheckable
nzMultiple
[nzCheckedKeys]="defaultCheckedKeys"
[nzCheckedKeys]="unit.basicInfoNodesKey"
[nzExpandedKeys]="defaultExpandedKeys"
[nzSelectedKeys]="defaultSelectedKeys"
(nzClick)="nzEvent($event,key)"
@ -109,7 +109,7 @@
[nzData]="unit.aroundNodes"
nzCheckable
nzMultiple
[nzCheckedKeys]="defaultCheckedKeys"
[nzCheckedKeys]="unit.aroundNodesKey"
[nzExpandedKeys]="defaultExpandedKeys"
[nzSelectedKeys]="defaultSelectedKeys"
(nzClick)="nzEvent($event,key)"
@ -152,7 +152,7 @@
[nzData]="unit.keySiteNodes"
nzCheckable
nzMultiple
[nzCheckedKeys]="defaultCheckedKeys"
[nzCheckedKeys]="unit.keySiteNodesKey"
[nzExpandedKeys]="defaultExpandedKeys"
[nzSelectedKeys]="defaultSelectedKeys"
(nzClick)="nzEvent($event,key)"
@ -195,7 +195,7 @@
[nzData]="unit.funDivNodes"
nzCheckable
nzMultiple
[nzCheckedKeys]="defaultCheckedKeys"
[nzCheckedKeys]="unit.funDivNodesKey"
[nzExpandedKeys]="defaultExpandedKeys"
[nzSelectedKeys]="defaultSelectedKeys"
(nzClick)="nzEvent($event,key)"
@ -238,7 +238,7 @@
[nzData]="unit.fireFacNodes"
nzCheckable
nzMultiple
[nzCheckedKeys]="defaultCheckedKeys"
[nzCheckedKeys]="unit.fireFacNodesKey"
[nzExpandedKeys]="defaultExpandedKeys"
[nzSelectedKeys]="defaultSelectedKeys"
(nzClick)="nzEvent($event,key)"
@ -263,11 +263,11 @@
</div>
</div>
<div class="fightdeploydiv" [hidden]="!(selectedTab == 2)">
<div class="fightdeploydiv" [hidden]="!(selectedTab == 2) ">
<div class="addPlan" (click)="addPlan()">
<mat-icon style="vertical-align: text-top">add_circle_outline</mat-icon>添加预案
</div>
<div class="planList">
<div class="planList" *ngIf="unitId[selectedUnitIndex]">
<table>
<tr >
<td>预案名称</td>
@ -279,13 +279,13 @@
<td>操作</td>
</tr>
<tr *ngFor="let item of unitId[selectedUnitIndex].planList">
<td>{{item.name}}</td>
<td>{{item.title}}</td>
<td>{{item.creatorName}}</td>
<td>{{item.modifiedTime | date:'yyyy-MM-dd'}}</td>
<td>{{item.openRange}}</td>
<td>{{item.isPublic ? '已公开' : '未公开'}}</td>
<td>{{item.planLevel | planlevel}}</td>
<td>
<input (input)="planItemScore(item)" type="number" [(ngModel)]="item.score">
<input (input)="planItemScore()" type="number" [(ngModel)]="item.score">
</td>
<td>
<span style="color: #07CDCF;" (click)="edit(item)">编辑</span>

355
src/app/examiner/create-test-score/create-test-score.component.ts

@ -9,7 +9,9 @@ import { DisabledTimeFn, DisabledTimePartial } from 'ng-zorro-antd/date-picker';
import getISOWeek from 'date-fns/getISOWeek';
import setHours from 'date-fns/setHours';
import { NzFormatEmitEvent, NzTreeComponent } from 'ng-zorro-antd/tree';
import { Router } from '@angular/router';
import { ActivatedRoute, Router } from '@angular/router';
import { async } from '@angular/core/testing';
import { functions } from 'firebase';
@Component({
selector: 'app-create-test-score',
templateUrl: './create-test-score.component.html',
@ -17,7 +19,7 @@ import { Router } from '@angular/router';
})
export class CreateTestScoreComponent implements OnInit {
constructor(private router:Router,public dialog: MatDialog,private http: HttpClient,public snackBar: MatSnackBar) { }
constructor(private router:Router,public dialog: MatDialog,private http: HttpClient,public snackBar: MatSnackBar,private route:ActivatedRoute) { }
selectedTab:number = 1 //选中的选项卡
selectTab(index){
setTimeout(() => {
@ -26,41 +28,91 @@ export class CreateTestScoreComponent implements OnInit {
}
ngOnInit(): void {
for (let y = 0, length = this.unitId.length; y < length; y++){
let element = this.unitId[y]
element.score = 0
element.basicInfoScore = 0
element.basicInfoItemScore = 0
element.basicInfoNodes = []
element.aroundScore = 0
element.aroundItemScore = 0
element.aroundNodes = []
element.keySiteScore = 0
element.keySiteItemScore = 0
element.keySiteNodes = []
element.funDivScore = 0
element.funDivItemScore = 0
element.funDivNodes = []
element.fireFacScore = 0
element.fireFacItemScore = 0
element.fireFacNodes = []
}
this.getUnitData().then(()=>{
this.getAround().then(()=>{
this.getKeySite().then(()=>{
this.getFunDiv().then(()=>{
this.getFireFac()
if(this.route.snapshot.queryParams.pattern && this.route.snapshot.queryParams.pattern == 'edit'){
this.getSoloPaper()
}else{
this.unitId = JSON.parse(sessionStorage.getItem(sessionStorage.getItem('paperId')))
for (let y = 0, length = this.unitId.length; y < length; y++){
let element = this.unitId[y]
element.score = 0
element.basicInfoScore = 0
element.basicInfoItemScore = 0
element.basicInfoNodes = []
element.aroundScore = 0
element.aroundItemScore = 0
element.aroundNodes = []
element.keySiteScore = 0
element.keySiteItemScore = 0
element.keySiteNodes = []
element.funDivScore = 0
element.funDivItemScore = 0
element.funDivNodes = []
element.fireFacScore = 0
element.fireFacItemScore = 0
element.fireFacNodes = []
}
this.getUnitData().then(()=>{
this.getAround().then(()=>{
this.getKeySite().then(()=>{
this.getFunDiv().then(()=>{
this.getFireFac()
})
})
})
})
this.getPaperPlans().then(()=>{
this.planItemScore()
})
}
}
//获得指定试卷信息。
getSoloPaper(){
this.http.get(`/api/Papers/${sessionStorage.getItem('paperId')}`).subscribe((data:any) => {
data.paperDataInfo.forEach(item => {
this.unitId.push(JSON.parse(item.originalData))
})
console.log('试卷信息',this.unitId)
this.planItemScore()
})
}
//获取所有考试设定
async getPaperPlans(){
for (let y = 0, length = this.unitId.length; y < length; y++){
let element = this.unitId[y]
await new Promise((resolve,reject)=>{
this.http.get('/api/PaperPlans',{params:{
paperId : sessionStorage.getItem('paperId'),
companyId : element.id
}}).subscribe(data => {
console.log('当前试卷的预案列表',data)
element.planList = data
resolve(1)
})
})
}
}
//当前选中的单位
selectedUnitIndex = 0
clickUnitName(key){
this.selectedUnitIndex = key
}
unitId:any = JSON.parse(sessionStorage.getItem(sessionStorage.getItem('paperId')))
unitId:any = []
//获取单位基本信息
async getUnitData(){
@ -314,14 +366,14 @@ export class CreateTestScoreComponent implements OnInit {
let result1 = await new Promise((resolve, reject) => {
this.http.get('/api/CompanyImportantLocations',{params:id}).subscribe((data:any)=>{
//如果存在单位毗邻
//如果存在单位重点部位
let newData = []
data.forEach(item => {
item.isLeaf = true
item.key = item.id
item.name ? newData.push(item) : null
})
if(data.length != 0){
if(newData.length != 0){
this.unitId[y].keySiteNodes.push({
name: '单位重点部位',
key: (Math.random()*10000000).toString(16).substr(0,4)+(new Date()).getTime()+Math.random().toString().substr(2,5),
@ -347,7 +399,7 @@ export class CreateTestScoreComponent implements OnInit {
})
console.log(element)
//获取当前单位所有建筑重点部位
@ -592,7 +644,7 @@ export class CreateTestScoreComponent implements OnInit {
//tree的选择事件
nzEvent(event: NzFormatEmitEvent,key): void {
if(event.node.origin.type == '基本信息' || (event.node.parentNode && event.node.parentNode.origin.type == '基本信息')){
let selectedNum = []
@ -696,6 +748,7 @@ export class CreateTestScoreComponent implements OnInit {
}
}
if(type == '重点部位'){
console.log('重点部位')
let selectedNum = 0
this.unitId[key].keySiteNodes.forEach(item => {
item.children.forEach(i => {
@ -721,7 +774,7 @@ export class CreateTestScoreComponent implements OnInit {
this.unitId[key].funDivItemScore = 0
}
}
if(type == '消防设施'){
if(type == '数据核验'){
let selectedNum = 0
this.unitId[key].fireFacNodes.forEach(item => {
item.children.forEach(i => {
@ -762,9 +815,8 @@ export class CreateTestScoreComponent implements OnInit {
}
//每条预案分数增加在试卷分数
planItemScore(item){
planItemScore(){
//计算整个试卷的总分
console.log(item)
let examScore = 0
this.unitId.forEach(element => {
examScore += element.score
@ -792,18 +844,87 @@ export class CreateTestScoreComponent implements OnInit {
//删除每条预案试卷
deletePlan(item){
this.unitId[this.selectedUnitIndex].planList.forEach((element,key)=>{
if(item == element){
this.unitId[this.selectedUnitIndex].planList.splice(key,1)
}
})
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('删除成功','确定',config);
if(window.confirm('你确定要删除该预案设定吗?')){
this.http.delete(`/api/PaperPlans/${item.id}`).subscribe(data => {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('删除成功','确定',config);
this.unitId[this.selectedUnitIndex].planList.forEach((element,key)=>{
if(item == element){
this.unitId[this.selectedUnitIndex].planList.splice(key,1)
}
})
this.planItemScore()
})
}else{
}
console.log(item)
}
//保存
save(){
this.unitId.forEach(item => {
//建筑的基本信息选中key集合
item.basicInfoNodesKey = []
item.basicInfoNodes.forEach((i,key) => {
if(i.checked){
item.basicInfoNodesKey.push(i.key)
}else{
i.children.forEach(ele => {
ele.checked ? item.basicInfoNodesKey.push(ele.key) : null
})
}
})
//四周毗邻选中key集合
item.aroundNodesKey = []
item.aroundNodes.forEach((i,key) => {
if(i.checked){
item.aroundNodesKey.push(i.key)
}else{
i.children.forEach(ele => {
ele.checked ? item.aroundNodesKey.push(ele.key) : null
})
}
})
//重点部位选中key集合
item.keySiteNodesKey = []
item.keySiteNodes.forEach((i,key) => {
if(i.checked){
item.keySiteNodesKey.push(i.key)
}else{
i.children.forEach(ele => {
ele.checked ? item.keySiteNodesKey.push(ele.key) : null
})
}
})
//功能分区选中key集合
item.funDivNodesKey = []
item.funDivNodes.forEach((i,key) => {
if(i.checked){
item.funDivNodesKey.push(i.key)
}else{
i.children.forEach(ele => {
ele.checked ? item.funDivNodesKey.push(ele.key) : null
})
}
})
//数据核验选中key集合
item.fireFacNodesKey = []
item.fireFacNodes.forEach((i,key) => {
if(i.checked){
item.fireFacNodesKey.push(i.key)
}else{
i.children.forEach(ele => {
ele.checked ? item.fireFacNodesKey.push(ele.key) : null
})
}
})
})
let copyDatas = JSON.parse(JSON.stringify(this.unitId))
//循环每个建筑处理数据筛选出选中数据
copyDatas.forEach(item => {
@ -900,7 +1021,7 @@ export class CreateTestScoreComponent implements OnInit {
i.children = newChildren
delete i.selected
})
console.log(111,item)
// console.log(111,item)
//建筑的重点部位模块处理
item.keySiteNodes ? item.keySiteNodes.forEach((i,key) => {
i.selected ? i.selected = null : null
@ -1068,7 +1189,7 @@ export class CreateTestScoreComponent implements OnInit {
copyDatas.forEach((item,key) =>{
paperDataInfo[key] = {}
paperDataInfo[key].id = null
paperDataInfo[key].paperId = null
paperDataInfo[key].paperId = sessionStorage.getItem('paperId')
paperDataInfo[key].companyId = item.id
paperDataInfo[key].basicInfoData = item.basicInfoNodes ? JSON.stringify(item.basicInfoNodes) : '[]'
paperDataInfo[key].basicInfoScore = item.basicInfoScore
@ -1079,12 +1200,13 @@ export class CreateTestScoreComponent implements OnInit {
paperDataInfo[key].functionalDivisionData = item.funDivNodes ? JSON.stringify(item.funDivNodes) : '[]'
paperDataInfo[key].functionalDivisionScore = item.funDivScore
paperDataInfo[key].facilityData = item.fireFacNodes ? JSON.stringify(item.fireFacNodes) : '[]'
paperDataInfo[key].facilityScore = item.fireFacScore
paperDataInfo[key].planList = item.planList
paperDataInfo[key].facilityScore = item.fireFacScore,
paperDataInfo[key].originalData = JSON.stringify(this.unitId[key])
})
//判断是否存在总分填写后没有勾选 或者勾选了没有填写总分的情况
paperDataInfo.forEach(element => {
for (let index = 0; index < paperDataInfo.length; index++) {
const element = paperDataInfo[index];
element.planList ? element.planList.forEach(item => {
if(!item.score || item.score == 0){
element.isPlanScore = false
@ -1119,29 +1241,61 @@ export class CreateTestScoreComponent implements OnInit {
return
}else
//存在预案没有填写总分
if(!element.isPlanScore){
if(element.isPlanScore == false){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('存在预案未填写总分的分组','确定',config);
return
}else{
if(window.confirm('你确定要创建该试卷吗?')){
console.log(555,this.unitId)
}
}
console.log(666,paperDataInfo)
}else{
//设置paperPlan的分数
console.log(123,this.unitId)
console.log(456,paperDataInfo)
let _this = this
async function setPlansScore(){
for (let index = 0; index < _this.unitId.length; index++) {
const element = _this.unitId[index];
for (let i = 0; i < element.planList.length; i++) {
await new Promise((resolve, reject) => {
const item = element.planList[i];
_this.http.put(`/api/PaperPlans/ModifyScore/${item.id}`,'',{params:{
score : item.score
}}).subscribe(((data) => {
resolve(i)
console.log('修改分数成功'+i,item.score)
}))
})
}
}
}
}
setPlansScore().then(()=>{
console.log('修改分数成功2222')
let body = {
id:sessionStorage.getItem('paperId'),
paperDataInfo:paperDataInfo
}
this.http.put(`/api/Papers/UpdatePaperData/${sessionStorage.getItem('paperId')}`,body).subscribe(data => {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('创建试卷成功','确定',config);
})
})
}
//上一步
goBack(){
@ -1211,7 +1365,7 @@ export class AddPlanTwoDialog {
}
ngOnInit(): void {
this.get2DPlan()
console.log(this.data)
console.log(1,this.data.companyData.companyData.id)
}
//获取当前公司的二维预案
@ -1235,12 +1389,37 @@ export class AddPlanTwoDialog {
confirm(){
if(this.planType){//如果选择的是已存在预案
if(this.selectedRadioData){
this.dialogRef.close(this.selectedRadioData);
sessionStorage.setItem('companyName',this.data.companyData.companyData.name)
sessionStorage.setItem('planId',this.selectedRadioData.id)
sessionStorage.setItem('buildingTypeId',this.data.companyData.companyData.buildingTypes[0].id)
sessionStorage.setItem('companyId',this.data.companyData.companyData.id)
window.open(`/canvasTool?openType=1&planName=${this.selectedRadioData.name}`)
console.log(this.selectedRadioData)
let paperPlansBody = {
id: null,
paperId: sessionStorage.getItem('paperId'),
planComponentId: this.selectedRadioData.id,
examPlanType: 0,
creatorId: JSON.parse(sessionStorage.getItem('creatorData')).id,
modifiedTime: new Date(),
isPublic: this.selectedRadioData.openRange == "未公开" ? false : true,
title: this.selectedRadioData.name,
mainPoint: null,
score: 0,
examFacilityAssetsData: null,
examDisposalNodesData: null,
companyId:this.data.companyData.companyData.id,
creatorName:this.selectedRadioData.creatorName,
planLevel:Number(this.selectedRadioData.planLevel)
}
let paperPlansParams:any = {
paperId:sessionStorage.getItem('paperId'),
}
this.http.post('/api/PaperPlans',paperPlansBody,{params:paperPlansParams}).subscribe((data2:any) => {
this.dialogRef.close(data2);
sessionStorage.setItem('companyName',this.data.companyData.companyData.name)
sessionStorage.setItem('planId',this.selectedRadioData.id)
sessionStorage.setItem('buildingTypeId',this.data.companyData.companyData.buildingTypes[0].id)
sessionStorage.setItem('companyId',this.data.companyData.companyData.id)
window.open(`/canvasTool?openType=1&planName=${this.selectedRadioData.name}&paperplanId=${data2.id}`)
})
}else{
if(this.dataSource.length == 0){
this.dialogRef.close();
@ -1255,6 +1434,12 @@ export class AddPlanTwoDialog {
}else{//如果选择的是自定义预案
let level = sessionStorage.getItem('level')
let body = {
id: null,
@ -1268,13 +1453,37 @@ export class AddPlanTwoDialog {
this.http.post("/api/ExamPlanComponents2D",body,{params:{
companyId : this.data.companyData.companyData.id
}}).subscribe((data:any)=>{
// console.log("创建成功")
this.dialogRef.close(data);
sessionStorage.setItem("planId",data.id);
sessionStorage.setItem("companyId",this.data.companyData.companyData.id)
sessionStorage.setItem("buildingTypeId",this.data.companyData.companyData.buildingTypes[0].id)
sessionStorage.setItem("editable","1")
window.open(`/canvasTool?openType=2&planName=${this.customPlanName}`)
console.log("创建自定义二维成功")
let paperPlansBody = {
id: null,
paperId: sessionStorage.getItem('paperId'),
planComponentId: data.id,
examPlanType: 1,
creatorId: JSON.parse(sessionStorage.getItem('creatorData')).id,
modifiedTime: new Date(),
isPublic: true,
title: this.customPlanName,
mainPoint: null,
score: 0,
examFacilityAssetsData: null,
examDisposalNodesData: null,
companyId:this.data.companyData.companyData.id,
creatorName:sessionStorage.getItem('realName'),
planLevel:Number(sessionStorage.getItem('level'))
}
let paperPlansParams:any = {
paperId:sessionStorage.getItem('paperId')
}
console.log(this)
this.http.post('/api/PaperPlans',paperPlansBody,{params:paperPlansParams}).subscribe((data2:any) => {
this.dialogRef.close(data2);
sessionStorage.setItem("planId",data.id);
sessionStorage.setItem("companyId",this.data.companyData.companyData.id)
sessionStorage.setItem("buildingTypeId",this.data.companyData.companyData.buildingTypes[0].id)
sessionStorage.setItem("editable","1")
window.open(`/canvasTool?openType=2&planName=${this.customPlanName}&paperplanId=${data2.id}`)
})
})
}
}

2
src/app/examiner/examiner-index/examiner-index.component.html

@ -84,7 +84,7 @@
<!-- <td [ngClass]="{'green': item.testState == '开考中','red':item.testState == '已结束'}">{{item.testState}}</td> -->
<td [ngClass]="{'green': item.status == '1','red':item.status == '2'}">{{item.status=="2"?"已结束":item.status=="0"?"未开考":"开考中"}}</td>
<td>
<span style="color: #07CDCF;margin-right: 10px;">编辑</span>
<span style="color: #07CDCF;margin-right: 10px;cursor: pointer;" (click)="editPaper(item)">编辑</span>
<span style="color: #07CDCF;">详情</span>
<span *ngIf="item.status=='0'" style="color: #FF8678;margin-left: 10px;cursor: pointer;" (click)="deleteExam(item.id)">删除</span>
</td>

62
src/app/examiner/examiner-index/examiner-index.component.ts

@ -34,11 +34,18 @@ export class ExaminerIndexComponent implements OnInit {
this.getunitdata();
this.getOrganizations();
this.getUnittype();
this.getAlltabledate()
setInterval(()=>this.getAlltabledate(),60000)
//this.getHelp()
this.getAlltabledate();
this.getProfiles()
}
//获取登录账号的个人资料
Profiles:any
getProfiles(){
this.http.get('/api/ExamAccounts/Profiles').subscribe((data:any) => {
console.log(data)
this.Profiles = data
sessionStorage.setItem('creatorData',JSON.stringify(data))
})
}
displayedColumns: string[] = ['name','startTime','endTime', 'examzhong','scc'];
tabledataSource:any
accound
@ -115,6 +122,14 @@ export class ExaminerIndexComponent implements OnInit {
)
}
//编辑试卷
editPaper(item){
// console.log(item)
sessionStorage.setItem("paperId",item.id)
this.router.navigateByUrl("/examiner/create-test-score?pattern=edit")
}
//获得所有组织机构
getOrganizations(){
this.http.get('/api/Organizations').subscribe(
@ -135,25 +150,25 @@ export class ExaminerIndexComponent implements OnInit {
)
}
//获得查询支队信息
help(){
let paramsdata:any = {
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
Sort: null,
SortType: null,
//获得查询支队信息
help(){
let paramsdata:any = {
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
Sort: null,
SortType: null,
}
//console.log(paramsdata)
this.http.get("/api/Papers",{params:paramsdata}).subscribe((data:any)=>{
this.tabledataSource=data
console.log(this.tabledataSource)
})
}
//分页事件
chagePage(e){
this.PageNumber = e.pageIndex+1
this.getAlltabledate()
}
//console.log(paramsdata)
this.http.get("/api/Papers",{params:paramsdata}).subscribe((data:any)=>{
this.tabledataSource=data
console.log(this.tabledataSource)
})
}
//分页事件
chagePage(e){
this.PageNumber = e.pageIndex+1
this.getAlltabledate()
}
//获取表格信息
getAlltabledate(){
let paramsdata:any = {
@ -288,9 +303,10 @@ export class FinishDia{
//获取登录账号的个人资料
Profiles:any
getProfiles(){
this.http.get('/api/ExamAccounts/Profiles').subscribe(data => {
this.http.get('/api/ExamAccounts/Profiles').subscribe((data:any) => {
console.log(data)
this.Profiles = data
sessionStorage.setItem('creatorData',JSON.stringify(data))
})
}

20
src/app/ui/collection-tools/examinationQuestions.ts

@ -210,7 +210,7 @@ export class uploadQuestions {
submit () {
console.log(this.data.question)
let body:any = {
id: null,
id: this.route.snapshot.queryParams.paperplanId,
paperId: sessionStorage.getItem('paperId'),
planComponentId: sessionStorage.getItem('planId'),
examPlanType: this.route.snapshot.queryParams.openType == 1 ? 0 : 1,
@ -219,23 +219,21 @@ export class uploadQuestions {
isPublic: true,
title: this.route.snapshot.queryParams.planName,
mainPoint: this.data.question.keynote,
score: null,
score: 0,
examFacilityAssetsData: sessionStorage.getItem('消防设施' + sessionStorage.getItem('paperId')) ? sessionStorage.getItem('消防设施' + sessionStorage.getItem('paperId')) : null,
examDisposalNodesData: sessionStorage.getItem('examNodeList') ? sessionStorage.getItem('examNodeList') : null
examDisposalNodesData: sessionStorage.getItem('examNodeList') ? sessionStorage.getItem('examNodeList') : null,
companyId:sessionStorage.getItem('companyId')
}
let params:any = {
paperId:sessionStorage.getItem('paperId'),
examPlanType:this.route.snapshot.queryParams.openType == 1 ? 0 : 1
}
this.http.post("/api/PaperPlans",body,{params:params}).subscribe(data => {
this.http.put(`/api/PaperPlans/${this.route.snapshot.queryParams.paperplanId}`,body).subscribe(data => {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('设置完成,页面将于一秒后关闭','确定',config);
setTimeout(() => {
window.close()
}, 1000);
// setTimeout(() => {
// window.close()
// }, 1000);
})

Loading…
Cancel
Save