Browse Source

[新增]单位基本信息原数据

tangshan
chenjingyu 3 years ago
parent
commit
7dcba20f5b
  1. 18
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html
  2. 28
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss
  3. 20
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts
  4. 4
      src/app/plan-management/entry-plan-look/AddPlanone.html
  5. 25
      src/app/ui/plan-template/plan-template.component.ts
  6. BIN
      src/assets/images/olddata.png

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

@ -708,8 +708,10 @@
<div class="building" *ngIf="element.surveyName=='单位基本信息'"> <div class="building" *ngIf="element.surveyName=='单位基本信息'">
<div *ngFor="let info of element.attinf"> <div *ngFor="let info of element.attinf">
<div *ngIf="info.completed" class="onetext"> <div *ngIf="info.completed" class="onetext">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #e8e9e9;text-align: center;" [(ngModel)]="info.propertyName" readonly *ngIf="pattern == 'edit'"> <input type="text" placeholder="请输入内容" style="width: 30%;background-color: #e8e9e9;text-align: center;" [(ngModel)]="info.propertyName" readonly *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 60%;background-color: #FFFFFF;" [(ngModel)]="info.value" *ngIf="pattern == 'edit'"> <input type="text" placeholder="请输入内容" style="width: 40%;background-color: #FFFFFF;" [(ngModel)]="info.value" *ngIf="pattern == 'edit'">
<!-- <input type="text" style="width: 30%;background-color: #FFFFFF;color: #999;" [(ngModel)]="info.olddata" *ngIf="pattern == 'edit'&&oldData" readonly> -->
<span style="width: 30%;background-color: #FFFFFF;color: #999;" *ngIf="pattern == 'edit'&&oldData">{{info.olddata||'无原数据'}}</span>
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;"> <table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;">
<tr> <tr>
<th style="border: 1px solid #999; <th style="border: 1px solid #999;
@ -730,8 +732,10 @@
<div class="building" *ngIf="element.surveyName=='建筑信息'"> <div class="building" *ngIf="element.surveyName=='建筑信息'">
<div *ngFor="let info of element.attinf"> <div *ngFor="let info of element.attinf">
<div *ngIf="info.completed" class="onetext"> <div *ngIf="info.completed" class="onetext">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #e8e9e9;text-align: center;" [(ngModel)]="info.propertyName" readonly *ngIf="pattern == 'edit'"> <input type="text" placeholder="请输入内容" style="width: 30%;background-color: #e8e9e9;text-align: center;" [(ngModel)]="info.propertyName" readonly *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 60%;background-color: #FFFFFF;" [(ngModel)]="info.propertyValue" *ngIf="pattern == 'edit'"> <input type="text" placeholder="请输入内容" style="width: 40%;background-color: #FFFFFF;" [(ngModel)]="info.propertyValue" *ngIf="pattern == 'edit'">
<!-- <input type="text" style="width: 30%;background-color: #FFFFFF;color: #999;" [(ngModel)]="info.olddata" *ngIf="pattern == 'edit'&&oldData" readonly> -->
<span style="width: 30%;background-color: #FFFFFF;color: #999;" *ngIf="pattern == 'edit'&&oldData">{{info.olddata||'无原数据'}}</span>
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;"> <table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;">
<tr> <tr>
<th style="border: 1px solid #999; <th style="border: 1px solid #999;
@ -955,11 +959,15 @@
</div> </div>
</div> </div>
</div> </div>
<div class="oldData" *ngIf="pattern == 'edit'" (click)='clickoldData()'>
<img src="../../../assets/images/olddata.png">
<span>原数据</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="toolDiv" *ngIf="pattern == 'look'"> <div class="toolDiv" *ngIf="pattern == 'look'">
<button title="下载文档" mat-mini-fab color="primary" (click)="generatingDoc()"> <button title="下载文档" mat-mini-fab color="primary" (click)="generatingDoc()">

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

@ -641,7 +641,7 @@
height: 40px; height: 40px;
width: 40%; width: 40%;
font-size: 16px; font-size: 16px;
background-color: #e8e9e9; background-color: #F2F4F5;
} }
input{ input{
height: 40px; height: 40px;
@ -649,7 +649,7 @@
font-size: 16px; font-size: 16px;
border: none; border: none;
outline: none; outline: none;
border-bottom: 1px solid #F2F4F5;
} }
img{ img{
height: 20px; height: 20px;
@ -853,6 +853,30 @@
margin: 5px 0; margin: 5px 0;
} }
} }
.oldData{
width: 100px;
height: 36px;
background-color: #FFFFFF;
border-radius: 0px 60px 60px 0px;
position: fixed;
right: 25.3%;
top: 120px;
display: flex;
cursor: pointer;
span{
color: #2196f3;
font-size: 16px;
line-height: 36px;
margin-left: 5px;
}
img{
width: 18px;
height: 15px;
position: relative;
top: 10px;
left: 5px;
}
}
} }
.noPadding{ .noPadding{
padding-top: 10px; padding-top: 10px;

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

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2021-06-16 13:56:54 * @Date: 2021-06-16 13:56:54
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-07-02 14:28:59 * @LastEditTime: 2021-07-05 15:36:30
*/ */
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Component, Inject, OnInit, Renderer2, ViewChild, Input } from '@angular/core'; import { Component, Inject, OnInit, Renderer2, ViewChild, Input } from '@angular/core';
@ -78,13 +78,14 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
this.getRealPicture() this.getRealPicture()
} else if (this.selectedItem == '单位概况') { } else if (this.selectedItem == '单位概况') {
this.getAllBuildings() this.getAllBuildings()
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
this.planTemplateData[1].attribute[0].attinf[2].value=this.planTemplateData[1].attribute[0].attinf[2].olddata = this.unitData.contacts
this.planTemplateData[1].attribute[0].attinf[3].value=this.planTemplateData[1].attribute[0].attinf[3].olddata = this.unitData.phone
this.planTemplateData[1].attribute[0].attinf[4].value=this.planTemplateData[1].attribute[0].attinf[4].olddata = this.unitData.organizationName
this.planTemplateData[1].attribute[0].attinf[5].value=this.planTemplateData[1].attribute[0].attinf[5].olddata = this.unitData.address
console.log(this.planTemplateData) console.log(this.planTemplateData)
this.planTemplateData[1].attribute[0].attinf[0].value = this.unitData.usci
this.planTemplateData[1].attribute[0].attinf[1].value = this.unitData.buildingTypes[0].name
this.planTemplateData[1].attribute[0].attinf[2].value = this.unitData.contacts
this.planTemplateData[1].attribute[0].attinf[3].value = this.unitData.phone
this.planTemplateData[1].attribute[0].attinf[4].value = this.unitData.organizationName
this.planTemplateData[1].attribute[0].attinf[5].value = this.unitData.address
} /* else if (this.selectedItem == '单位概况') { } /* else if (this.selectedItem == '单位概况') {
//this.getAllBuildings() //this.getAllBuildings()
} */ else if (this.selectedItem == '') { } */ else if (this.selectedItem == '') {
@ -558,6 +559,11 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
console.log(666, $(".mainbox")) console.log(666, $(".mainbox"))
$(".mainbox").wordExport('word文档'); $(".mainbox").wordExport('word文档');
} }
//原数据点击
oldData=false
clickoldData(){
this.oldData=!this.oldData
}
} }

4
src/app/plan-management/entry-plan-look/AddPlanone.html

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-12-24 10:59:48 * @Date: 2020-12-24 10:59:48
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-06-21 14:28:53 * @LastEditTime: 2021-07-02 16:22:22
--> -->
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container"> <form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container">
<div class="topbox" style="text-align: center;"> <div class="topbox" style="text-align: center;">
@ -62,7 +62,7 @@
<span *ngIf="uploadover" style="font-size: 13px;">(已上传)</span> <span *ngIf="uploadover" style="font-size: 13px;">(已上传)</span>
</div> </div>
<div *ngIf="inputword"> <div *ngIf="inputword">
<!-- <mat-radio-button value="2" style="margin-right: 10px;">在线编制</mat-radio-button> --> <mat-radio-button value="2" style="margin-right: 10px;">在线编制</mat-radio-button>
<!-- <button mat-raised-button *ngIf="isinput" (click)='createWord()'>在线编制预案</button> --> <!-- <button mat-raised-button *ngIf="isinput" (click)='createWord()'>在线编制预案</button> -->
</div> </div>
<!-- <div *ngIf="inputword"> <!-- <div *ngIf="inputword">

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

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2021-05-31 10:40:01 * @Date: 2021-05-31 10:40:01
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-07-02 14:21:31 * @LastEditTime: 2021-07-05 15:15:36
*/ */
import { Component, Inject, OnInit,ViewEncapsulation } from '@angular/core'; import { Component, Inject, OnInit,ViewEncapsulation } from '@angular/core';
@ -372,7 +372,7 @@ export class PlanTemplateComponent implements OnInit {
//array[index].attribute[i].completed=false //array[index].attribute[i].completed=false
attarr[i].attinf.forEach((attinfValue,attinfi,attinfarr) => { attarr[i].attinf.forEach((attinfValue,attinfi,attinfarr) => {
if(attinfValue.propertyName==propertyName){ if(attinfValue.propertyName==propertyName){
attinfarr[attinfi].splice(attinfi,i) attinfarr[attinfi].completed=false
} }
}); });
} }
@ -774,12 +774,12 @@ defineClick(){
export class addattinf{ export class addattinf{
constructor(private http: HttpClient,public dialogRef: MatDialogRef<addattinf>,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {} constructor(private http: HttpClient,public dialogRef: MatDialogRef<addattinf>,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {}
addAttinf=[ addAttinf=[
{propertyName:'统一社会信用代码',completed:false,propertyType:0,value:''}, {propertyName:'统一社会信用代码',completed:false,propertyType:0,value:'',olddata:''},
{propertyName:'单位类型',completed:false,propertyType:0,value:''}, {propertyName:'单位类型',completed:false,propertyType:0,value:'',olddata:''},
{propertyName:'联系人',completed:false,propertyType:0,value:''}, {propertyName:'联系人',completed:false,propertyType:0,value:'',olddata:''},
{propertyName:'联系电话',completed:false,propertyType:0,value:''}, {propertyName:'联系电话',completed:false,propertyType:0,value:'',olddata:''},
{propertyName:'辖区中队',completed:false,propertyType:0,value:''}, {propertyName:'辖区中队',completed:false,propertyType:0,value:'',olddata:''},
{propertyName:'单位地址',completed:false,propertyType:0,value:''}, {propertyName:'单位地址',completed:false,propertyType:0,value:'',olddata:''},
/* {propertyName:'单位照片',completed:false,propertyType:0,value:''} *///,default:'-',must:'是',danwei:'-' /* {propertyName:'单位照片',completed:false,propertyType:0,value:''} *///,default:'-',must:'是',danwei:'-'
] ]
addAttinfBuild addAttinfBuild
@ -802,11 +802,17 @@ getattinf(){
if(dataarr[index].propertyName==arr[i].propertyName){ if(dataarr[index].propertyName==arr[i].propertyName){
if(dataarr[index].completed==true&&arr[i].completed==false){ if(dataarr[index].completed==true&&arr[i].completed==false){
arr[i].completed= dataarr[index].completed arr[i].completed= dataarr[index].completed
arr[i].olddata=dataarr[index].value
} }
} }
}) })
}); });
}else if(value.surveyName=='建筑信息'&&value.attinf==undefined){ }/* else if(value.surveyName=='单位基本信息'&&value.attinf==undefined){
this.addAttinf.forEach((data)=>{
data.olddata=data.value
})
} */
else if(value.surveyName=='建筑信息'&&value.attinf==undefined){
let paramsdata:any ={ let paramsdata:any ={
categoryId:this.data.newleftTabledata[this.data.leftclicki].basicCategoryId categoryId:this.data.newleftTabledata[this.data.leftclicki].basicCategoryId
} }
@ -814,6 +820,7 @@ getattinf(){
this.addAttinfBuild=data[0].propertyInfos this.addAttinfBuild=data[0].propertyInfos
this.addAttinfBuild.forEach(element => { this.addAttinfBuild.forEach(element => {
element.completed=false element.completed=false
element.olddata=element.propertyValue
}); });
console.log(this.addAttinfBuild) console.log(this.addAttinfBuild)
}) })

BIN
src/assets/images/olddata.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Loading…
Cancel
Save