Browse Source

[修改]维护更新或新增查询条件传空值

tangshan
陈敬瑜 3 years ago
parent
commit
c18a666430
  1. 52
      src/app/key-unit/key-unit-management/key-unit-management.component.ts
  2. 43
      src/app/plan-management/entry-plan/entry-plan.component.ts
  3. 8
      src/app/plan-management/meet-plan/meet-plan.component.ts
  4. 40
      src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts
  5. 34
      src/app/plan-management/open-plan/open-plan.component.ts
  6. 41
      src/app/plan-management/pass-plan/pass-plan.component.ts
  7. 36
      src/app/plan-management/reinforce-plan/reinforce-plan.component.ts
  8. 32
      src/app/plan-management/type-plan/type-plan.component.ts

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

@ -354,7 +354,7 @@ export class KeyUnitManagementComponent implements OnInit {
]
allKeyUnitInfo:any //所有的重点单位
IsNewData:boolean//是否是新增或者维护更新
IsNewData=''//是否是新增或者维护更新
getAllKeyUnit(){
// console.log(Boolean(Number(this.follow)))
let follow
@ -379,7 +379,7 @@ export class KeyUnitManagementComponent implements OnInit {
PageSize: this.pageSizeOptions[0],
Sort: this.integritySort ? 'integrityscore' : '',
SortType: this.integritySort || '',
//IsNewData:this.IsNewData,
IsNewData:this.IsNewData,
IntegrityScoreMin:this.integrityScoreMin/100||0,
IntegrityScoreMax:this.integrityScoreMax/100||1
}
@ -652,7 +652,7 @@ export class KeyUnitManagementComponent implements OnInit {
this.integritySort = ''
this.integrityScoreMax=undefined
this.integrityScoreMin=undefined
this.IsNewData=undefined
this.IsNewData=''
this.getAllKeyUnit();
}
@ -683,51 +683,7 @@ export class KeyUnitManagementComponent implements OnInit {
onSubmit(value){
this.PageNumber = 1
this.pageEvent.pageIndex = 0
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
if(this.integrityScoreMax<this.integrityScoreMin){
this.snackBar.open('最大值不能小于最小值!','确定',config);
}else{
let follow
if(this.follow == ''){
follow = ''
}
if(this.follow == '0'){
follow = false
}
if(this.follow == '1'){
follow = true
}
let paramsdata:any = {
Name: this.companyName || '',
OrganizationId: this.jsId || '',
HasChildren:this.jscheck || '',
USCI:this.shehui || '',
IsFollowed: follow,
BuildingTypeId: this.unittype || '',
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
Sort: this.integritySort ? 'integrityscore' : '',
SortType: this.integritySort || '',
IsNewData:this.IsNewData==undefined?true:this.IsNewData,
IntegrityScoreMin:this.integrityScoreMin/100||0,
IntegrityScoreMax:this.integrityScoreMax/100||1
}
this.http.get("/api/Companies",{params:paramsdata}).subscribe((data:any)=>{
this.length = data.totalCount
this.allKeyUnitInfo = data
// data.items.sort( (a,b) => {
// return a.usci - b.usci
// })
data.items.forEach( (item,index) => {
item.integrity = this.wanzhengduArr[index]
})
//console.log(789,data.items)
this.tabledataSource = new MatTableDataSource(data.items);
})
}
this.getAllKeyUnit()
}
bigclosediv(e){

43
src/app/plan-management/entry-plan/entry-plan.component.ts

@ -42,8 +42,8 @@ export class EntryPlanComponent implements OnInit {
pageSize:any; //每页条数
pageSizeOptions: number[] = [10] //设置每页条数
PageNumber:any; //第几页
IsNewData:boolean //预案维护更新或者新增
IsNewCompanyData:boolean//单位维护更新或者新增
IsNewData='' //预案维护更新或者新增
IsNewCompanyData=''//单位维护更新或者新增
displayedColumns: string[] = ['state','unitname','integrity','level','jurisdictionsquadron', 'unittype','plantype', 'passstate','projectlevel','operation'];
@ -335,8 +335,8 @@ export class EntryPlanComponent implements OnInit {
SortType: this.integritySort || '',
HasPlanComponents:this.haveyuan||'',
PlanCategories:this.planCategory,
/* IsNewData:this.IsNewData,
IsNewCompanyData:this.IsNewCompanyData */
IsNewData:this.IsNewData,
IsNewCompanyData:this.IsNewCompanyData
}
this.http.get("/api/Plans",{params:paramsdata}).subscribe((data:any)=>{
@ -358,36 +358,7 @@ export class EntryPlanComponent implements OnInit {
onSubmit (value) {
this.PageNumber = 1
this.pageEvent.pageIndex = 0
let reservePlanType
this.reservePlanType ? reservePlanType = JSON.parse(JSON.stringify(this.reservePlanType)) : reservePlanType = ''
if(this.reservePlanType && this.reservePlanType.length != 0){
reservePlanType = eval(this.reservePlanType.join("|"))
}
let paramsdata:any = {
CompanyName: this.companyName || '',
OrganizationId: this.jsId || '',
HasChildrenOrganization:this.jscheck || '',
BuildingTypeId: this.unittype || '',
PlanType: reservePlanType || '',
AuditStatus: this.toExamine || '',
PlanLevel: this.preparelevel || '',
HasChildrenPlanLevel: this.plcheck || '',
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
Sort: this.integritySort ? 'integrityscore' : '',
SortType: this.integritySort || '',
HasPlanComponents:this.haveyuan||'',
PlanCategories:this.planCategory,
IsNewData:this.IsNewData==undefined?true:this.IsNewData,
IsNewCompanyData:this.IsNewCompanyData==undefined?true:this.IsNewCompanyData
}
this.http.get("/api/Plans",{params:paramsdata}).subscribe((data:any)=>{
this.length = data.totalCount
this.allPlanInfo = data
this.tabledataSource = data.items
})
this.getAllPlanInfo()
}
companyName:any //单位名称
@ -402,8 +373,8 @@ export class EntryPlanComponent implements OnInit {
planCategory=[] //预案级别
//重置
reset(){
this.IsNewCompanyData=undefined
this.IsNewData=undefined
this.IsNewCompanyData=''
this.IsNewData=''
this.companyName = ''
this.js = ''
this.jsId = ''

8
src/app/plan-management/meet-plan/meet-plan.component.ts

@ -83,7 +83,7 @@ export class MeetPlanComponent implements OnInit {
preparelevels: any
plcheck: boolean //编制级别勾选框
IsNewData:boolean //维护更新活新增
IsNewData='' //维护更新活新增
displayedColumns: string[] = ['state','unitname', 'level', 'addname', 'addtime', 'plantype', 'passstate', 'isopen', 'projectlevel', 'operation'];
tabledataSource
typePlan//新预案类型
@ -142,7 +142,7 @@ export class MeetPlanComponent implements OnInit {
HasChildrenPlanLevel: this.plcheck || '',
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
//IsNewData:this.IsNewData,
IsNewData:this.IsNewData,
}
this.http.get("/api/PlanComponentsMajor", { params: paramsdata }).subscribe((data: any) => {
this.length = data.totalCount
@ -368,8 +368,8 @@ export class MeetPlanComponent implements OnInit {
this.reservePlanType = ''
this.unitstate = ''
this.projectlevel = ''
this.plcheck =
this.IsNewData=undefined
this.plcheck = false
this.IsNewData=''
this.getAlltabledate()
}
//新增预案弹窗

40
src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts

@ -114,7 +114,7 @@ export class OnetwoEntryPlanComponent implements OnInit {
pageSize: any; //每页条数
pageSizeOptions: number[] = [10] //设置每页条数
PageNumber: any; //第几页
IsNewData:boolean //维护更新活新增
IsNewData='' //维护更新活新增
//获取表格数据
getAlltabledate() {
@ -136,7 +136,7 @@ export class OnetwoEntryPlanComponent implements OnInit {
HasChildrenPlanLevel: this.plcheck || '',
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
//IsNewData:this.IsNewData,
IsNewData:this.IsNewData,
}
this.http.get("/api/PlanComponentsMajor", { params: paramsdata }).subscribe((data: any) => {
this.length = data.totalCount
@ -151,6 +151,7 @@ export class OnetwoEntryPlanComponent implements OnInit {
//重置
reset() {
this.IsNewData=''
this.typePlan = ''
this.unitname = ''
this.level = ''
@ -167,40 +168,7 @@ export class OnetwoEntryPlanComponent implements OnInit {
//查询
onSubmit(value) {
//console.log(value)
if (this.endtime != undefined && this.addtime > this.endtime) {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('开始时间不能大于结束时间!', '确定', config);
} else {
this.PageNumber = 1
this.pageEvent.pageIndex = 0
let reservePlanType
this.reservePlanType ? reservePlanType = JSON.parse(JSON.stringify(this.reservePlanType)) : reservePlanType = ''
if (this.reservePlanType && this.reservePlanType.length != 0) {
reservePlanType = eval(this.reservePlanType.join("|"))
}
let paramsdata: any = {
Name: this.unitname || '',
planCategories: this.url == '2' ? 2 : 1,
//PlanType:reservePlanType||'',
DisasterType: this.typePlan || '',
CreatorName: this.addname || '',
AuditStatus: this.unitstate || '',
CreationTimeRangeStart: this.addtime || '',
CreationTimeRangeEnd: this.endtime || '',
PlanLevel: this.projectlevel || '',
HasChildrenPlanLevel: this.plcheck || '',
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
IsNewData:this.IsNewData==undefined?true:this.IsNewData,
}
this.http.get("/api/PlanComponentsMajor", { params: paramsdata }).subscribe((data: any) => {
this.length = data.totalCount
this.tabledataSource = data.items
})
}
this.getAlltabledate()
}
//删除预案
deletePlan(id) {

34
src/app/plan-management/open-plan/open-plan.component.ts

@ -43,7 +43,7 @@ export class OpenPlanComponent implements OnInit {
pageSize: any; //每页条数
pageSizeOptions: number[] = [10] //设置每页条数
PageNumber: any; //第几页
IsNewData:boolean //维护更新活新增
IsNewData='' //维护更新活新增
displayedColumns: string[] = ['state','unitname', 'planname', 'addpeople', 'addtime', 'plantype', 'auditStatus', 'openRange', 'projectlevel', 'operation'];
@ -115,7 +115,7 @@ export class OpenPlanComponent implements OnInit {
allPlanInfo: any //存储所有预案信息
//获得所有预案信息
IsNewCompanyData=true
IsNewCompanyData=''
getAllPlanInfo() {
let paramsdata: any = {
CompanyName: this.companyName || '',
@ -129,8 +129,8 @@ export class OpenPlanComponent implements OnInit {
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
Sort: '',
/* IsNewData:this.IsNewData,
IsNewCompanyData:this.IsNewCompanyData */
IsNewData:this.IsNewData,
IsNewCompanyData:this.IsNewCompanyData
}
this.http.get("/api/PublicPlans", { params: paramsdata }).subscribe((data: any) => {
// console.log(111,data)
@ -269,27 +269,7 @@ export class OpenPlanComponent implements OnInit {
}
//查询
onSubmit(e) {
let paramsdata: any = {
CompanyName: this.companyName || '',
OrganizationId: '',
HasChildrenOrganization: '',
BuildingTypeId: this.unittype || '',
PlanType: this.reservePlanType || '',
AuditStatus: '', //审核状态
PlanLevel: this.preparelevel || '',
HasChildrenPlanLevel: this.plcheck || '',
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
Sort: '',
IsNewData:this.IsNewData==undefined?true:this.IsNewData,
IsNewCompanyData:this.IsNewCompanyData==undefined?true:this.IsNewCompanyData
}
this.http.get("/api/PublicPlans", { params: paramsdata }).subscribe((data: any) => {
// console.log(111,data)
this.length = data.totalCount
this.allPlanInfo = data
this.tabledataSource = data.items
})
this.getAllPlanInfo()
}
companyName: any //单位名称
js: any //所选组织机构
@ -313,8 +293,8 @@ export class OpenPlanComponent implements OnInit {
this.pageEvent.pageIndex = 0
this.PageNumber = 1
this.getAllPlanInfo();
this.IsNewCompanyData=undefined
this.IsNewData=undefined
this.IsNewCompanyData=''
this.IsNewData=''
}
}

41
src/app/plan-management/pass-plan/pass-plan.component.ts

@ -48,7 +48,7 @@ export class PassPlanComponent implements OnInit {
allorganizations: any //所有组织机构
allunittype: any //所有单位类型
tabledataSource: any //表格数据
IsNewData:boolean //维护更新活新增
IsNewData='' //维护更新活新增
url
preparelevels: any
@ -116,7 +116,7 @@ export class PassPlanComponent implements OnInit {
}
allPlanInfo: any //存储所有预案信息
IsNewCompanyData:boolean //单位是新增还是维护更新
IsNewCompanyData='' //单位是新增还是维护更新
//获得所有预案信息
getAllPlanInfo() {
let reservePlanType
@ -139,8 +139,8 @@ export class PassPlanComponent implements OnInit {
PageSize: this.pageSizeOptions[0],
Sort: '',
PlanCategories: this.planCategory,
/* IsNewData:this.IsNewData,
IsNewCompanyData:this.IsNewCompanyData */
IsNewData:this.IsNewData,
IsNewCompanyData:this.IsNewCompanyData
}
this.http.get("/api/ApprovedPlans", { params: paramsdata }).subscribe((data: any) => {
this.length = data.totalCount
@ -440,34 +440,7 @@ export class PassPlanComponent implements OnInit {
onSubmit(e) {
this.PageNumber = 1
this.pageEvent.pageIndex = 0
let reservePlanType
this.reservePlanType ? reservePlanType = JSON.parse(JSON.stringify(this.reservePlanType)) : reservePlanType = ''
if (this.reservePlanType && this.reservePlanType.length != 0) {
reservePlanType = eval(this.reservePlanType.join("|"))
}
let paramsdata: any = {
CompanyName: this.companyName || '',
OrganizationId: this.jsId || '',
HasChildrenOrganization: this.jscheck || '',
BuildingTypeId: this.unittype || '',
PlanType: this.reservePlanType || '',
AuditStatus: '', //审核状态
PlanLevel: this.preparelevel || '',
HasChildrenPlanLevel: this.plcheck || '',
CreationTimeRangeStart: this.addtime || '',
CreationTimeRangeEnd: this.endtime || '',
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
Sort: '',
PlanCategories: this.planCategory,
IsNewData:this.IsNewData==undefined?true:this.IsNewData,
IsNewCompanyData:this.IsNewCompanyData==undefined?true:this.IsNewCompanyData
}
this.http.get("/api/ApprovedPlans", { params: paramsdata }).subscribe((data: any) => {
this.length = data.totalCount
this.allPlanInfo = data
this.tabledataSource = data.items
})
this.getAllPlanInfo()
}
companyName: any //单位名称
js: any //所选组织机构
@ -480,8 +453,8 @@ export class PassPlanComponent implements OnInit {
planCategory = []//预案级别
//重置
reset() {
this.IsNewData=undefined
this.IsNewCompanyData=undefined
this.IsNewData=''
this.IsNewCompanyData=''
this.companyName = ''
this.js = ''
this.jsId = ''

36
src/app/plan-management/reinforce-plan/reinforce-plan.component.ts

@ -48,7 +48,7 @@ export class ReinforcePlanComponent implements OnInit {
allorganizations:any //所有组织机构
allunittype:any //所有单位类型
tabledataSource:any //表格数据
IsNewData=true //维护更新活新增
IsNewData='' //维护更新活新增
preparelevels:any
ngOnInit(): void {
@ -114,7 +114,7 @@ export class ReinforcePlanComponent implements OnInit {
allPlanInfo:any //存储所有预案信息
//获得所有预案信息
IsNewCompanyData=true//单位维护更新或者新增
IsNewCompanyData=''//单位维护更新或者新增
getAllPlanInfo(){
let paramsdata:any = {
CompanyName: this.companyName || '',
@ -130,8 +130,8 @@ export class ReinforcePlanComponent implements OnInit {
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
Sort: '',
/* IsNewData:this.IsNewData,
IsNewCompanyData:this.IsNewCompanyData */
IsNewData:this.IsNewData,
IsNewCompanyData:this.IsNewCompanyData
}
this.http.get("/api/ApprovedPlans/GetReinforcementPlanComponents",{params:paramsdata}).subscribe((data:any)=>{
// console.log('增援预案列表',data)
@ -205,29 +205,7 @@ export class ReinforcePlanComponent implements OnInit {
onSubmit (e) {
this.PageNumber = 1
this.pageEvent.pageIndex = 0
let paramsdata:any = {
CompanyName: this.companyName || '',
OrganizationId: this.jsId || '',
HasChildrenOrganization:this.jscheck || '',
BuildingTypeId: this.unittype || '',
PlanType: this.reservePlanType || '',
AuditStatus:'', //审核状态
PlanLevel: this.preparelevel || '',
HasChildrenPlanLevel: this.plcheck || '',
CreationTimeRangeStart:this.addtime||'',
CreationTimeRangeEnd:this.endtime||'',
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
Sort: '',
IsNewData:this.IsNewData,
IsNewCompanyData:this.IsNewCompanyData
}
this.http.get("/api/ApprovedPlans/GetReinforcementPlanComponents",{params:paramsdata}).subscribe((data:any)=>{
// console.log('增援预案列表',data)
this.length = data.totalCount
this.allPlanInfo = data
this.tabledataSource = data.items
})
this.getAllPlanInfo()
}
companyName:any //单位名称
js:any //所选组织机构
@ -239,8 +217,8 @@ export class ReinforcePlanComponent implements OnInit {
plcheck:boolean //编制级别勾选框
//重置
reset(){
this.IsNewData=undefined
this.IsNewCompanyData=undefined
this.IsNewData=''
this.IsNewCompanyData=''
this.companyName = ''
this.js = ''
this.jsId = ''

32
src/app/plan-management/type-plan/type-plan.component.ts

@ -89,7 +89,7 @@ export class TypePlanComponent implements OnInit {
levels
preparelevels: any
plcheck: boolean //编制级别勾选框
IsNewData:boolean //维护更新活新增
IsNewData='' //维护更新活新增
displayedColumns: string[] = ['state','unitname', 'addname', 'addtime', 'plantype', 'passstate', 'isopen', 'projectlevel', 'operation'];
tabledataSource
unitname//预案名称
@ -122,7 +122,7 @@ export class TypePlanComponent implements OnInit {
HasChildrenPlanLevel: this.plcheck || '',
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
//IsNewData:this.IsNewData,
IsNewData:this.IsNewData,
}
this.http.get("/api/PlanComponentsMajor", { params: paramsdata }).subscribe((data: any) => {
this.length = data.totalCount
@ -137,6 +137,7 @@ export class TypePlanComponent implements OnInit {
//重置
reset() {
this.IsNewData=''
this.unitname = ''
this.level = ''
this.addname = ''
@ -150,32 +151,7 @@ export class TypePlanComponent implements OnInit {
//查询
onSubmit(value) {
if (this.endtime != undefined && this.addtime > this.endtime) {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('开始时间不能大于结束时间!', '确定', config);
} else {
this.PageNumber = 1
this.pageEvent.pageIndex = 0
let paramsdata: any = {
Name: this.unitname || '',
planCategories: 8,
CreatorName: this.addname || '',
AuditStatus: this.unitstate || '',
CreationTimeRangeStart: this.addtime || '',
CreationTimeRangeEnd: this.endtime || '',
PlanLevel: this.projectlevel || '',
HasChildrenPlanLevel: this.plcheck || '',
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
IsNewData:this.IsNewData==undefined?true:this.IsNewData,
}
this.http.get("/api/PlanComponentsMajor", { params: paramsdata }).subscribe((data: any) => {
this.length = data.totalCount
this.tabledataSource = data.items
})
}
this.getAlltabledate()
}

Loading…
Cancel
Save