Browse Source

[修改]预案在线编制单位信息修改同步修改问题

tangshan
chenjingyu 3 years ago
parent
commit
5a2e75d9c1
  1. 1
      src/app/key-unit/key-unit-management/key-unit-management.component.ts
  2. 145
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html
  3. 129
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss
  4. 211
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts
  5. 2
      src/app/ui/plan-template/plan-template.component.scss
  6. 40
      src/app/ui/plan-template/plan-template.component.ts
  7. BIN
      src/assets/images/search.png
  8. BIN
      src/assets/images/路径 323@2x.png

1
src/app/key-unit/key-unit-management/key-unit-management.component.ts

@ -763,6 +763,7 @@ export class KeyUnitManagementComponent implements OnInit {
}
//撤销审核
cancelAudit(element){
this.deleteAll=[]
this.http.delete(`/api/ContentVerifies/${element.contentVerify.id}`).subscribe(data=>{
this.getAllKeyUnit()
},

145
src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html

@ -181,6 +181,54 @@
</div>
</div>
</div>
<div class="leftnew" *ngIf="pattern == 'edit' && ( selectedItem == '组织指挥'|| selectedItem == '社会联动'|| selectedItem == '勤务保障'|| selectedItem == '辅助决策')">
<div class="newHead">
<span>模板列表</span>
</div>
<div class="newBody">
<div class="search">
<div class="searchChoose">
<select [(ngModel)]="searchType">
<option value="0">自定义</option>
<option value="1">按机构</option>
</select>
</div>
<div class="searchText">
<div class="queryField ordiv" *ngIf="searchType=='1'">
<input readonly placeholder="请输入组织" autocomplete="off" [(ngModel)]="js" name="js" (focus)="openorganizationbox()">
<!-- <mat-checkbox style="margin-left: 6px;" [(ngModel)]="jscheck" name="jscheck">包含下级</mat-checkbox> -->
<div class="organizationbox" *ngIf="isorganizationbox">
<div (click)="closediv()" class="closediv"><mat-icon>clear</mat-icon></div>
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding (click)='add(node)' class="organizationlist">
<button type="button" mat-icon-button disabled ></button>
<li>{{node.name}}</li>
</mat-tree-node>
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)='add(node)' class="organizationlist">
<button
type="button"
mat-icon-button
matTreeNodeToggle
[attr.aria-label]="'toggle ' + node.name">
<mat-icon class="mat-icon-rtl-mirror">
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
</mat-icon>
</button>
<li>{{node.name}}</li>
</mat-tree-node>
</mat-tree>
</div>
</div>
<div class="zdy" *ngIf="searchType=='0'">
<input type="text" placeholder="请输入关键字" [(ngModel)]="zdysearch">
</div>
</div>
<div class="searImg">
<img src="../../../assets/images/search.png" >
</div>
</div>
</div>
</div>
<div class="mainbox" id="mainbox">
@ -395,8 +443,9 @@
<th *ngFor="let itemth of element.tableth;let tablethi=index;TrackBy:trackByFn" style="border: 1px solid #999;
height: 40px;
font-size: 16px;
text-align: center;width: 185px;" >
text-align: center;" >
{{element.tableth[tablethi]}}
<!-- <textarea [value]="element.tableth[tablethi]" disabled style="width: 100%;height: 100%;"></textarea> -->
</th>
</thead>
<tbody *ngIf="pattern == 'edit'">
@ -414,7 +463,7 @@
<td *ngFor="let itemtd of itemtr.tabletd;let tabletdi=index;TrackBy:trackByFn" style="border: 1px solid #999;
height: 40px;
font-size: 16px;
text-align: center;width: 185px;">
text-align: center;">
{{itemtr.tabletd[tabletdi]}}
</td>
</tr>
@ -435,16 +484,21 @@
[(ngModel)]="itemthj.head" *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 60%;"
[(ngModel)]="itemthj.body" *ngIf="pattern == 'edit'">
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;">
<tr>
<th style="border: 1px solid #999;
height: 40px;
font-size: 16px;
text-align: center; white-space:pre-wrap; width: 185px;">{{itemthj.head}}</th>
text-align: center; white-space:pre-wrap; width: 185px;">
{{itemthj.head}}
</th>
<td style="border: 1px solid #999;
height: 40px;
font-size: 16px;
text-align: center;white-space:pre-wrap;width: 185px;">{{itemthj.body}}</td>
text-align: center;white-space:pre-wrap;width: 185px;">
{{itemthj.body}}
</td>
</tr>
</table>
</div>
@ -846,12 +900,13 @@
height: 40px;
background-color: #ffd91d;
text-align: center;">
<input type="text" placeholder="请输入内容" [(ngModel)]="parts.heafName"*ngIf="pattern == 'edit'">
<span style="font-size: 16px;
<input type="text" placeholder="请输入内容" [(ngModel)]="parts.heafName" *ngIf="pattern == 'edit'">
<textarea [(ngModel)]="parts.heafName" *ngIf="pattern == 'look'" style="width: 100%;height: 100%;color: #b99a00;" disabled></textarea>
<!-- <span style="font-size: 16px;
text-align: center;
height: 40px;
line-height: 40px;
color: #b99a00;">{{parts.heafName}}</span>
color: #b99a00;" *ngIf="pattern == 'look'">{{parts.heafName}}</span> -->
<img src="../../../assets/images/deletered.png" (click)='unitDel(element.surveyName,uniti,infoi)' *ngIf="pattern == 'edit'">
</div>
<div class="partsBody">
@ -862,15 +917,18 @@
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;">
<tr>
<th style="border: 1px solid #999;
height: 40px;
width: 40%;
font-size: 16px;
text-align: center;">{{parts.body[0].name}}</th>
text-align: center;height: 40px;width: 185px;">
{{parts.body[0].name}}
<!-- <textarea style="height: 100%;width: 100%;" [(ngModel)]="parts.body[0].name" disabled></textarea> -->
</th>
<td style="border: 1px solid #999;
height: 40px;
width: 60%;
font-size: 16px;
text-align: center;">{{parts.body[0].value}}</td>
text-align: center;">
{{parts.body[0].value}}
<!-- <textarea style="height: 30px;width: 180px;" [(ngModel)]="parts.body[0].value" disabled></textarea> -->
</td>
</tr>
</table>
</div>
@ -880,15 +938,20 @@
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;">
<tr>
<th style="border: 1px solid #999;
height: 40px;
width: 40%;
height: 40px;width: 185px;
font-size: 16px;
text-align: center;">{{parts.body[1].name}}</th>
text-align: center;">
{{parts.body[1].name}}
<!-- <textarea style="height: 100%;width: 100%;" [(ngModel)]="parts.body[1].name" disabled></textarea> -->
</th>
<td style="border: 1px solid #999;
height: 40px;
width: 60%;
font-size: 16px;
text-align: center;">{{parts.body[1].value}}</td>
text-align: center;">
{{parts.body[1].value}}
<!-- <textarea style="height: 100%;width:100%;" [(ngModel)]="parts.body[1].value" disabled></textarea> -->
</td>
</tr>
</table>
</div>
@ -900,15 +963,19 @@
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;">
<tr>
<th style="border: 1px solid #999;
height: 40px;
width: 40%;
height: 40px;width: 185px;
font-size: 16px;
text-align: center;">{{parts.body[2].name}}</th>
text-align: center;">
{{parts.body[2].name}}
<!-- <textarea style="height: 100%;width: 100%;" [(ngModel)]="parts.body[2].name" disabled></textarea> -->
</th>
<td style="border: 1px solid #999;
height: 40px;
width: 60%;
height: 40px;width: 185px;
font-size: 16px;
text-align: center;">{{parts.body[2].value}}</td>
text-align: center;">
{{parts.body[2].value}}
<!-- <textarea style="height: 100%;width: 100%;" [(ngModel)]="parts.body[2].value" disabled></textarea> -->
</td>
</tr>
</table>
</div>
@ -918,15 +985,19 @@
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;">
<tr>
<th style="border: 1px solid #999;
height: 40px;
width: 40%;
height: 40px;width: 185px;
font-size: 16px;
text-align: center;">{{parts.body[3].name}}</th>
text-align: center;">
{{parts.body[3].name}}
<!-- <textarea style="height: 80%;width: 90%;" [(ngModel)]="parts.body[3].name" disabled></textarea> -->
</th>
<td style="border: 1px solid #999;
height: 40px;
width: 60%;
height: 40px;width: 185px;
font-size: 16px;
text-align: center;">{{parts.body[3].value}}</td>
text-align: center;">
{{parts.body[3].value}}
<!-- <textarea style="height: 100%;width: 100%;" [(ngModel)]="parts.body[3].value" disabled></textarea> -->
</td>
</tr>
</table>
</div>
@ -937,15 +1008,19 @@
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;">
<tr>
<th style="border: 1px solid #999;
height: 40px;
width: 40%;
height: 40px;width: 185px;
font-size: 16px;
text-align: center;">{{parts.body[4].name}}</th>
text-align: center;">
{{parts.body[4].name}}
<!-- <textarea style="height: 100%;width: 100%;" [(ngModel)]="parts.body[4].name" disabled></textarea> -->
</th>
<td style="border: 1px solid #999;
height: 40px;
width: 60%;
height: 40px;width: 185px;
font-size: 16px;
text-align: center;">{{parts.body[4].value}}</td>
text-align: center;">
{{parts.body[4].value}}
<!-- <textarea style="height: 100%;width: 100%;" [(ngModel)]="parts.body[4].value" disabled></textarea> -->
</td>
</tr>
</table>
</div>

129
src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss

@ -220,6 +220,135 @@
}
}
}
.leftnew{
position: fixed;
width: 14%;
height: 85%;
background-color: white;
top: 66px;
min-width: 300px;
overflow-y: auto;
display: flex;
flex-direction: column;
.newHead{
width: 100%;
height: 40px;
text-align: center;
background-color: #e1f1ff;
span{
text-align: center;
font-size: 16px;
color: #2196F3;
height: 40px;
line-height: 40px;
}
}
.newBody{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
.search{
margin: 10px;
width: 280px;
height: 32px;
background-color: #E8E9E9;
border-radius: 20px;
display: flex;
.searchChoose{
width: 30%;
height: 70%;
margin-top: 2%;
border-right: 1px solid #9EAAB4;
//text-align: center;
select{
background-color: transparent;
border: 0;
outline: none;
margin-left: 5px;
//height: 22px;
width: 85%;
font-size: 14px;
position: relative;
bottom: 3px;
}
}
.searchText{
width: 65%;
height: 100%;
input {
margin-left: 2%;
width: 90%;
height: 100%;
border: none;
outline: none;
background-color: #E8E9E9;
//line-height: 32px;
//border-radius: 3px;
}
.queryField {
height: 32px;
//margin: 0 10px;
}
.ordiv{
position: relative;
.organizationbox{
width:280px;
height: 600px;
background: white;
position: absolute;
top: 38px;
right: -40px;
z-index: 999;
border: 1px solid grey;
overflow-y: auto;
li{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
mat-tree-node{
cursor: pointer;
white-space:pre;
}
mat-tree-node:hover{
background: rgba(225, 225, 225, 0.8);
}
.closediv{
z-index: 100;
position: absolute;
right: 0;
top: 0;
width: 30px;
height: 30px;
cursor: pointer;
line-height: 30px;
text-align: center;
}
.closediv:hover{
background:rgba(225, 225, 225, 0.8);
}
}
}
.zdy{
width: 100%;
height: 100%;
}
}
.searImg{
width: 15%;
height: 100%;
img{
position: relative;
top: 20%;
left: 10%;
}
}
}
}
}
.mainbox {
background-color: white;
width: 745px;

211
src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts

@ -4,14 +4,21 @@
* @Author: sueRimn
* @Date: 2021-06-16 13:56:54
* @LastEditors: sueRimn
* @LastEditTime: 2021-07-30 14:56:55
* @LastEditTime: 2021-08-05 16:24:21
*/
import { HttpClient } from '@angular/common/http';
import { Component, Inject, OnInit, Renderer2, ViewChild, Input } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { MatPaginator } from '@angular/material/paginator';
import { FlatTreeControl } from '@angular/cdk/tree';
import { FormControl } from '@angular/forms';
import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
import { PageEvent } from '@angular/material/paginator';
import { TreeService } from '../../http-interceptors/tree.service'
import Viewer from 'viewerjs';
import { async } from 'rxjs/internal/scheduler/async';
declare var $: any
@Component({
selector: 'app-create-plan-online-five',
@ -20,8 +27,31 @@ declare var $: any
})
export class CreatePlanOnlineFiveComponent implements OnInit {
constructor(private http: HttpClient, private route: ActivatedRoute, public snackBar: MatSnackBar, public dialog: MatDialog) { }
constructor(private http: HttpClient, private route: ActivatedRoute, public snackBar: MatSnackBar, public dialog: MatDialog, private tree: TreeService) { }
private _transformer = (node, level: number) => { //初始化tree
return {
expandable: !!node.children && node.children.length > 0,
name: node.name,
level: level,
id: node.id,
parentId: node.parentId,
children: node.children
};
}
treeControl = new FlatTreeControl<any>(node => node.level, node => node.expandable);
treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
myControl = new FormControl();
hasChild = (_: number, node: any) => node.expandable;
//分页
@ViewChild(MatPaginator, { static: true })
pageEvent: PageEvent;
paginator: MatPaginator;
length: any; //共多少条数据
pageSize: any; //每页条数
pageSizeOptions: number[] = [10] //设置每页条数
PageNumber: any; //第几页
planLevel: string//预案级别
blockyl=true
@ -34,29 +64,82 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
this.pattern='edit'
}
this.getUnitData()
this.getOrganizations();
//this.getAllBuildings()
this.tree = {
json: this.treedate,
config: this.treeConfig
};
}
//树形结构数据
treedate = [
{
"guid": "bc4c7a02-5379-4046-92be-12c67af4295a",
"displayName": "Elentrix",
"children": [
/* "85d412c2-ebc1-4d56-96c9-7da433ac9bb2",
"28aac445-83b1-464d-9695-a4157dab6eac" */
]
}
zdysearch
organizationName: any //当前单位组织机构名称
treedata: any //组织机构树型数据
newArr: any = []
newallorganizations: any //用于存储在原始数据基础上的每个机构增加children字段
pcMore//pc更多
pcput = false//pc收起
pcfind//pc查询
padjt = false
//辖区中队div是否显示
isorganizationbox: boolean = false
js: any //所选组织机构
jsId: any //所选组织机构的id
jscheck: boolean //所选组织机构勾选框
//点击辖区中队树,将选择的辖区中队添加到变量
add(node) {
this.isorganizationbox = false
this.js = node.name
this.jsId = node.id
}
//关闭辖区中队隐藏框
closeorganizationbox() {
this.isorganizationbox = false
}
//打开辖区中队隐藏框
openorganizationbox() {
this.isorganizationbox = true
}
//关闭出现的组织机构div
closediv() {
this.isorganizationbox = false
}
//得到当前单位所在组织机构的tree型数据
allorganizations: any //所有组织机构
getpresentOrganization() {
this.newallorganizations = this.allorganizations
this.newallorganizations.forEach(item => {
item.children = []
this.newallorganizations.forEach(element => {
if (element.parentId == item.id) {
item.children.push(element)
}
});
});
this.http.get("/api/Account/Profiles").subscribe(
(data: any) => {
this.organizationName = data.organizationName
if (this.organizationName) {
this.newallorganizations.forEach(item => {
if (item.name == this.organizationName) {
this.dataSource.data = [item]
}
});
} else {
this.dataSource.data = this.tree.toTree(this.treedata);
}
}
)
]
tree
treeConfig = {
nodeWidth: 90,
nodeHeight: 60
};
}
//获得所有组织机构
getOrganizations() {
this.http.get('/api/Organizations').subscribe(
(data: any) => {
this.allorganizations = data
this.treedata = this.tree.toTree(data);
this.getpresentOrganization();
}
)
}
//获得单位信息
unitData: any
@ -68,7 +151,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
data.items.forEach(element => {
if (element.id == this.route.snapshot.queryParams.companyId) {
this.unitData = element
// console.log('单位列表信息', this.unitData)
console.log('单位列表信息', this.unitData)
this.getTemplateData()
}
});
@ -76,7 +159,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
}
selectedItem: string = '封面'
clickTitleItem(item) {
async clickTitleItem(item) {
this.addNumber = -1
this.selectedItem = item.groupName
if (this.selectedItem == '重点图示') {
@ -84,7 +167,15 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
this.getSitePlan()
this.getRealPicture()
} else if (this.selectedItem == '单位概况') {
this.getAllBuildings()
await this.getAllBuildings()
this.planTemplateData[1].building.forEach(element => {
element.body[0].attinf[0].olddata = this.unitData.usci
element.body[0].attinf[1].olddata = this.unitData.buildingTypes[0].name
element.body[0].attinf[2].olddata = this.unitData.contacts
element.body[0].attinf[3].olddata = this.unitData.phone
element.body[0].attinf[4].olddata = this.unitData.organizationName
element.body[0].attinf[5].olddata = this.unitData.address
});
this.planTemplateData[1].attribute[0].attinf[0].value=this.planTemplateData[1].attribute[0].attinf[0].olddata = this.unitData.usci
this.planTemplateData[1].attribute[0].attinf[1].value=this.planTemplateData[1].attribute[0].attinf[1].olddata = this.unitData.buildingTypes[0].name
@ -161,11 +252,11 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
//获得模板信息
getTemplateData() {
this.http.get(`/api/PlanComponents/${this.route.snapshot.queryParams.planId}/WebText`).subscribe((data: any) => {
// console.log('预案内容', data)
console.log('预案内容', data)
this.planTemplateData = JSON.parse(data.webTextData).filter(item =>
item.completed == true
)
// console.log(this.planTemplateData)
//console.log(this.planTemplateData)
if (this.planTemplateData[0].groupName != '封面') {
let obj = {
completed: true,
@ -193,6 +284,9 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
}
this.planTemplateData.unshift(obj)
}
else if(this.planTemplateData[0].groupName == '封面'){
this.planTemplateData[0].attribute.objName=this.unitData.name
}
this.planTemplateData.forEach(element => {
if (element.groupName == '重点图示') {
if (!element.attribute) {
@ -309,38 +403,42 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
unitId: any = this.route.snapshot.queryParams.companyId
//获得所有的建筑物
allBuildings: any
getAllBuildings() {
this.http.get("/api/Buildings", {
params: {
companyId: this.unitId
}
}).subscribe((data: any) => {
data.forEach((item, index) => {
let params = { buildingId: item.id }
item.plandata = []
this.http.get('/api/BuildingAreas', { params }).subscribe(data => {
item.plandata = data
async getAllBuildings() {
let result = await new Promise((resolve, reject) => {
this.http.get("/api/Buildings", {
params: {
companyId: this.unitId
}
}).subscribe((data: any) => {
data.forEach((item, index) => {
let params = { buildingId: item.id }
item.plandata = []
this.http.get('/api/BuildingAreas', { params }).subscribe(data => {
item.plandata = data
resolve(data)
})
})
})
this.allBuildings = data
if (this.planTemplateData[1].building == undefined) {
this.planTemplateData[1].building = []
for (var i = 0; i < this.allBuildings.length; i++) {
if (i == 0) {
this.planTemplateData[1].building.push({ name: this.allBuildings[i].name, body: this.planTemplateData[1].attribute, completed: true })
} else {
this.planTemplateData[1].building.push({ name: this.allBuildings[i].name, body: this.planTemplateData[1].attribute, completed: false })
this.allBuildings = data
if (this.planTemplateData[1].building == undefined) {
this.planTemplateData[1].building = []
for (var i = 0; i < this.allBuildings.length; i++) {
if (i == 0) {
this.planTemplateData[1].building.push({ name: this.allBuildings[i].name, body: this.planTemplateData[1].attribute, completed: true })
} else {
this.planTemplateData[1].building.push({ name: this.allBuildings[i].name, body: this.planTemplateData[1].attribute, completed: false })
}
}
}
}
console.log(this.planTemplateData)
//this.buildingName=this.planTemplateData[1].building[0].name
this.group = this.planTemplateData[1].building
//delete this.planTemplateData[0].attribute
//console.log(this.planTemplateData)
//this.buildingName=this.planTemplateData[1].building[0].name
this.group = this.planTemplateData[1].building
//delete this.planTemplateData[0].attribute
})
})
}
//获取总平面图
sitePlanItems: any
@ -599,7 +697,10 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
oldData=false
clickoldData(){
this.oldData=!this.oldData
}
//新增功能(社会联动等引用)
searchType='0'
}

2
src/app/ui/plan-template/plan-template.component.scss

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-05-19 15:50:20
* @LastEditors: sueRimn
* @LastEditTime: 2021-06-15 10:44:55
* @LastEditTime: 2021-08-02 09:47:06
*/
.box {
height: 100%;

40
src/app/ui/plan-template/plan-template.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-05-31 10:40:01
* @LastEditors: sueRimn
* @LastEditTime: 2021-07-28 14:37:50
* @LastEditTime: 2021-08-04 15:30:24
*/
import { Component, Inject, OnInit,ViewEncapsulation } from '@angular/core';
@ -131,7 +131,7 @@ export class PlanTemplateComponent implements OnInit {
}
//修改模板
upPlan(item,i,operation){
async upPlan(item,i,operation){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
@ -141,7 +141,7 @@ export class PlanTemplateComponent implements OnInit {
disableClose:true,
data:{item:item,plandata:this.newleftTabledata}
});
dialogRef.afterClosed().subscribe(result => {
dialogRef.afterClosed().subscribe(async result => {
console.log(result)
if(result!=undefined){
//this.newleftTabledata[i].name=result.name
@ -176,22 +176,28 @@ export class PlanTemplateComponent implements OnInit {
planCategory:Number(result.planCategory),
data:null
}
this.http.post("/api/PlanTemplate",savaData).subscribe((data:any)=>{
this.newleftTabledata[this.newleftTabledata.length-1].id=''
this.newleftTabledata[this.newleftTabledata.length-1].id=data.id
let body={
id:data.id,
basicCategoryId:result.basicCategoryId,
buildingTypeId:result.buildingTypeId,
planCategory:Number(result.planCategory),
data:JSON.stringify(this.newleftTabledata[this.leftclicki].data)
}
this.http.put(`/api/PlanTemplate/${data.id}`,body).subscribe((data:any)=>{
this.snackBar.open('复制成功!','确定',config);
console.log(data)
let aaa = await new Promise((resolve, reject)=>{
delete this.newleftTabledata[this.leftclicki].data[0].attribute[1].attinf
delete this.newleftTabledata[this.leftclicki].data[0].attribute[3].attinf
this.http.post("/api/PlanTemplate",savaData).subscribe((data:any)=>{
this.newleftTabledata[this.newleftTabledata.length-1].id=''
this.newleftTabledata[this.newleftTabledata.length-1].id=data.id
let body={
id:data.id,
basicCategoryId:result.basicCategoryId,
buildingTypeId:result.buildingTypeId,
planCategory:Number(result.planCategory),
data:JSON.stringify(this.newleftTabledata[this.leftclicki].data)
}
this.http.put(`/api/PlanTemplate/${data.id}`,body).subscribe((data:any)=>{
resolve(data)
this.snackBar.open('复制成功!','确定',config);
})
//this.getLeftdata()
})
this.getLeftdata()
})
this.getLeftdata()
}
}

BIN
src/assets/images/search.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

BIN
src/assets/images/路径 323@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 854 B

Loading…
Cancel
Save