|
|
@ -21,25 +21,9 @@ export class CombinedQueryComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
constructor(private http: HttpClient, private router: Router, private route: ActivatedRoute, private tree: TreeService, public dialog: MatDialog, public snackBar: MatSnackBar) { } |
|
|
|
constructor(private http: HttpClient, private router: Router, private route: ActivatedRoute, private tree: TreeService, public dialog: MatDialog, public snackBar: MatSnackBar) { } |
|
|
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
|
|
|
if (window.matchMedia("(max-width: 1400px)").matches) { |
|
|
|
|
|
|
|
this.pcMore = false |
|
|
|
|
|
|
|
this.padMore = true |
|
|
|
|
|
|
|
this.pcfind = false |
|
|
|
|
|
|
|
this.padjt = true |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.pcfind = true |
|
|
|
|
|
|
|
this.pcMore = true |
|
|
|
|
|
|
|
this.padMore = false |
|
|
|
|
|
|
|
this.padjt = false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.getunitdata(); |
|
|
|
|
|
|
|
this.getOrganizations(); |
|
|
|
|
|
|
|
this.getUnittype(); |
|
|
|
|
|
|
|
this.getAllPlanInfo(); |
|
|
|
|
|
|
|
let level = sessionStorage.getItem("level"); |
|
|
|
|
|
|
|
this.url = window.location.href.substring(window.location.href.length - 1, window.location.href.length) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private _transformer = (node, level: number) => { //初始化tree
|
|
|
|
private _transformer = (node, level: number) => { //初始化tree
|
|
|
|
return { |
|
|
|
return { |
|
|
|
expandable: !!node.children && node.children.length > 0, |
|
|
|
expandable: !!node.children && node.children.length > 0, |
|
|
@ -55,48 +39,170 @@ export class CombinedQueryComponent implements OnInit { |
|
|
|
dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener); |
|
|
|
dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener); |
|
|
|
myControl = new FormControl(); |
|
|
|
myControl = new FormControl(); |
|
|
|
hasChild = (_: number, node: any) => node.expandable; |
|
|
|
hasChild = (_: number, node: any) => node.expandable; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
displayedColumns: string[] = ['组织名称', '总数'];//, 'addtime', 'plantype', 'auditStatus', 'openRange', 'projectlevel', 'operation'
|
|
|
|
displayedColumns: string[] = ['组织名称', '总数'];//, 'addtime', 'plantype', 'auditStatus', 'openRange', 'projectlevel', 'operation'
|
|
|
|
yuanColumns: string[] = ['组织名称', '总数']; |
|
|
|
yuanColumns: string[] = ['组织名称', '总数']; |
|
|
|
allorganizations: any //所有组织机构
|
|
|
|
|
|
|
|
allunittype: any //所有单位类型
|
|
|
|
|
|
|
|
tabledataSource = [] //单位表格数据
|
|
|
|
tabledataSource = [] //单位表格数据
|
|
|
|
yuanTable = []//预案表格数据
|
|
|
|
yuanTable = []//预案表格数据
|
|
|
|
excelData: any |
|
|
|
excelData: any |
|
|
|
url |
|
|
|
|
|
|
|
findTj = 0//查询条件
|
|
|
|
findTj = 0//查询条件
|
|
|
|
|
|
|
|
|
|
|
|
preparelevels:Number=0 |
|
|
|
|
|
|
|
pcMore//pc更多
|
|
|
|
|
|
|
|
pcput = false//pc收起
|
|
|
|
|
|
|
|
pcfind//pc查询
|
|
|
|
|
|
|
|
padjt = false |
|
|
|
|
|
|
|
padMore = true//pad收缩控制
|
|
|
|
|
|
|
|
padput = false//pad收起按钮
|
|
|
|
|
|
|
|
imgsrcopen = "../../../assets/images/routdown2.png" |
|
|
|
|
|
|
|
imgsrcdown = "../../../assets/images/routup2.png" |
|
|
|
|
|
|
|
pcInfo() { |
|
|
|
|
|
|
|
this.pcMore = !this.pcMore |
|
|
|
|
|
|
|
this.pcput = !this.pcput |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
padInfo() { |
|
|
|
|
|
|
|
this.padMore = !this.padMore |
|
|
|
|
|
|
|
this.padput = !this.padput |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
allPlanInfo: any //存储所有预案信息
|
|
|
|
allPlanInfo: any //存储所有预案信息
|
|
|
|
lable = ['单位查询', '预案查询'] |
|
|
|
lable = ['单位查询', '预案查询'] |
|
|
|
selected = new FormControl(0); //选项卡实例
|
|
|
|
selected = new FormControl(0); //选项卡实例
|
|
|
|
//判断选了哪一个
|
|
|
|
//判断选了哪一个
|
|
|
|
selectedIndexChange(e) { |
|
|
|
selectedIndexChange(e) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.selected.setValue(e) |
|
|
|
this.selected.setValue(e) |
|
|
|
this.preparelevels = Number(e) |
|
|
|
this.preparelevels = Number(e) |
|
|
|
this.getAllPlanInfo() |
|
|
|
this.getAllPlanInfo() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getNowFormatDate() { |
|
|
|
|
|
|
|
var date = new Date(); |
|
|
|
|
|
|
|
var seperator1 = "-"; |
|
|
|
|
|
|
|
var year = date.getFullYear(); |
|
|
|
|
|
|
|
var month: any = date.getMonth() + 1; |
|
|
|
|
|
|
|
var strDate: any = date.getDate(); |
|
|
|
|
|
|
|
if (month >= 1 && month <= 9) { |
|
|
|
|
|
|
|
month = "0" + month; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (strDate >= 0 && strDate <= 9) { |
|
|
|
|
|
|
|
strDate = "0" + strDate; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
var currentdate = year + seperator1 + month + seperator1 + strDate; |
|
|
|
|
|
|
|
return currentdate; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async ngOnInit(): Promise<void> { |
|
|
|
|
|
|
|
await this.getunitdata(); |
|
|
|
|
|
|
|
await this.getOrganizations(); |
|
|
|
|
|
|
|
await this.getUnittype(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.jscheck = true |
|
|
|
|
|
|
|
this.yuanjscheck = true |
|
|
|
|
|
|
|
this.dwaddtime = '2020-01-01'//单位查询开始时间
|
|
|
|
|
|
|
|
this.dwendtime = this.getNowFormatDate()//单位结束时间
|
|
|
|
|
|
|
|
this.yuanaddtime = '2020-01-01'//预案查询开始时间
|
|
|
|
|
|
|
|
this.yuanendtime = this.getNowFormatDate()//预案查询结束时间
|
|
|
|
|
|
|
|
this.reservePlanType = ['1', '2', '4', '16'] |
|
|
|
|
|
|
|
this.planCategory = ['1', '2', '3', '4', '5'] |
|
|
|
|
|
|
|
this.getAllPlanInfo(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//得到当前单位信息
|
|
|
|
|
|
|
|
organizationName: any //当前单位组织机构名称
|
|
|
|
|
|
|
|
organizationId: any //当前单位组织机构id
|
|
|
|
|
|
|
|
async getunitdata() { |
|
|
|
|
|
|
|
await new Promise<void>((resolve, reject) => { |
|
|
|
|
|
|
|
this.http.get("/api/Account/Profiles").subscribe( |
|
|
|
|
|
|
|
(data: any) => { |
|
|
|
|
|
|
|
console.log('当前登陆用户信息', data) |
|
|
|
|
|
|
|
resolve(data) |
|
|
|
|
|
|
|
this.organizationName = data.organizationName |
|
|
|
|
|
|
|
this.organizationId = data.organizationId |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获得所有组织机构
|
|
|
|
|
|
|
|
allorganizations: any //所有组织机构
|
|
|
|
|
|
|
|
treedata: any //组织机构树型数据
|
|
|
|
|
|
|
|
newallorganizations: any //用于存储在原始数据基础上的每个机构增加children字段
|
|
|
|
|
|
|
|
async getOrganizations() { |
|
|
|
|
|
|
|
await new Promise<void>((resolve, reject) => { |
|
|
|
|
|
|
|
this.http.get('/api/Organizations').subscribe( |
|
|
|
|
|
|
|
(data: any) => { |
|
|
|
|
|
|
|
this.allorganizations = data |
|
|
|
|
|
|
|
this.treedata = this.tree.toTree(data); |
|
|
|
|
|
|
|
this.getpresentOrganization(); |
|
|
|
|
|
|
|
resolve(data) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//得到当前单位所在组织机构的tree型数据
|
|
|
|
|
|
|
|
getpresentOrganization() { |
|
|
|
|
|
|
|
this.newallorganizations = this.allorganizations |
|
|
|
|
|
|
|
this.newallorganizations.forEach(item => { |
|
|
|
|
|
|
|
item.children = [] |
|
|
|
|
|
|
|
this.newallorganizations.forEach(element => { |
|
|
|
|
|
|
|
if (element.parentId == item.id) { |
|
|
|
|
|
|
|
item.children.push(element) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
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); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.js = this.organizationName |
|
|
|
|
|
|
|
this.jsId = this.organizationId |
|
|
|
|
|
|
|
this.yuanjs = this.organizationName |
|
|
|
|
|
|
|
this.yuanjsId = this.organizationId |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获得所有单位类型
|
|
|
|
|
|
|
|
allunittype: any //所有单位类型
|
|
|
|
|
|
|
|
async getUnittype() { |
|
|
|
|
|
|
|
await new Promise<void>((resolve, reject) => { |
|
|
|
|
|
|
|
this.http.get('/api/BuildingTypes/Simple').subscribe( |
|
|
|
|
|
|
|
(data: any) => { |
|
|
|
|
|
|
|
this.allunittype = data |
|
|
|
|
|
|
|
console.log('单位类型', data) |
|
|
|
|
|
|
|
this.allunittype.forEach(element => { |
|
|
|
|
|
|
|
this.unittype.push(element.id) |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
resolve(data) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//获得所有预案或单位信息
|
|
|
|
//获得所有预案或单位信息
|
|
|
|
tableDataNull = false |
|
|
|
tableDataNull = false |
|
|
|
|
|
|
|
preparelevels: Number = 0 |
|
|
|
|
|
|
|
companyName: any //单位名称
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js: any //单位所选组织机构
|
|
|
|
|
|
|
|
jsId: any //单位所选组织机构的id
|
|
|
|
|
|
|
|
jscheck: boolean //单位所选组织机构勾选框
|
|
|
|
|
|
|
|
yuanjs: any //预案所选组织机构
|
|
|
|
|
|
|
|
yuanjsId: any //预案所选组织机构的id
|
|
|
|
|
|
|
|
yuanjscheck: boolean //预案所选组织机构勾选框
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dwaddtime//单位查询开始时间
|
|
|
|
|
|
|
|
dwendtime//单位结束时间
|
|
|
|
|
|
|
|
yuanaddtime//预案查询开始时间
|
|
|
|
|
|
|
|
yuanendtime//预案查询结束时间
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unittype = [] //单位类型
|
|
|
|
|
|
|
|
reservePlanType = [] //预案类型
|
|
|
|
|
|
|
|
preparelevel = [1] //单位状态
|
|
|
|
|
|
|
|
plcheck: boolean //编制级别勾选框
|
|
|
|
|
|
|
|
planCategory = [] //预案级别
|
|
|
|
|
|
|
|
integritySort = 1 //单位排序字段
|
|
|
|
|
|
|
|
yuanintegritySort = 1 //预案排序字段
|
|
|
|
|
|
|
|
isMasklayer = false |
|
|
|
async getAllPlanInfo() { |
|
|
|
async getAllPlanInfo() { |
|
|
|
/* this.planCategory=new Array<number>(); |
|
|
|
|
|
|
|
this.reservePlanType=new Array<number>(); */ |
|
|
|
|
|
|
|
let paramsdata: any = { |
|
|
|
let paramsdata: any = { |
|
|
|
QueryMode: this.preparelevels, |
|
|
|
QueryMode: this.preparelevels, |
|
|
|
OrganizationId: this.jsId || '', |
|
|
|
OrganizationId: this.jsId || '', |
|
|
@ -119,9 +225,11 @@ export class CombinedQueryComponent implements OnInit { |
|
|
|
SortBy: 'totalCount', |
|
|
|
SortBy: 'totalCount', |
|
|
|
SortType: this.yuanintegritySort |
|
|
|
SortType: this.yuanintegritySort |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// console.log(666, paramsdata)
|
|
|
|
|
|
|
|
this.isMasklayer = true |
|
|
|
let result = await new Promise((resolve, reject) => { |
|
|
|
let result = await new Promise((resolve, reject) => { |
|
|
|
this.http.get("/api/StatisticsAnalysis/ReportTable", { params: this.preparelevels == 0 ? paramsdata : yuandata }).subscribe((data: any) => { |
|
|
|
this.http.get("/api/StatisticsAnalysis/ReportTable", { params: this.preparelevels == 0 ? paramsdata : yuandata }).subscribe((data: any) => { |
|
|
|
console.log(data) |
|
|
|
console.log('接口数据', data) |
|
|
|
this.excelData = data |
|
|
|
this.excelData = data |
|
|
|
if (data.length == 0) { |
|
|
|
if (data.length == 0) { |
|
|
|
this.tableDataNull = true |
|
|
|
this.tableDataNull = true |
|
|
@ -240,11 +348,9 @@ export class CombinedQueryComponent implements OnInit { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//this.tabledataSource=data
|
|
|
|
// console.log(this.yuanColumns)
|
|
|
|
|
|
|
|
// console.log(this.yuanTable)
|
|
|
|
console.log(this.yuanColumns) |
|
|
|
this.isMasklayer = false |
|
|
|
console.log(this.yuanTable) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
resolve(this.excelData) |
|
|
|
resolve(this.excelData) |
|
|
|
} |
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
@ -252,188 +358,19 @@ export class CombinedQueryComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
colorRgb(sColor) { |
|
|
|
|
|
|
|
var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; |
|
|
|
|
|
|
|
var sColor = sColor.toLowerCase(); |
|
|
|
|
|
|
|
if (sColor && reg.test(sColor)) { |
|
|
|
|
|
|
|
if (sColor.length === 4) { |
|
|
|
|
|
|
|
var sColorNew = "#"; |
|
|
|
|
|
|
|
for (var i = 1; i < 4; i += 1) { |
|
|
|
|
|
|
|
sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
sColor = sColorNew; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//处理六位的颜色值
|
|
|
|
|
|
|
|
var sColorChange = []; |
|
|
|
|
|
|
|
for (var i = 1; i < 7; i += 2) { |
|
|
|
|
|
|
|
sColorChange.push(parseInt("0x" + sColor.slice(i, i + 2))); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return sColorChange; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return sColor; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
colorHex(rgb) { |
|
|
|
|
|
|
|
var _this = rgb; |
|
|
|
|
|
|
|
var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; |
|
|
|
|
|
|
|
if (/^(rgb|RGB)/.test(_this)) { |
|
|
|
|
|
|
|
var aColor = _this.replace(/(?:(|)|rgb|RGB)*/g, "").split(","); |
|
|
|
|
|
|
|
var strHex = "#"; |
|
|
|
|
|
|
|
for (var i = 0; i < aColor.length; i++) { |
|
|
|
|
|
|
|
var hex: any = Number(aColor[i]).toString(16); |
|
|
|
|
|
|
|
hex = hex < 10 ? 0 + '' + hex : hex;// 保证每个rgb的值为2位
|
|
|
|
|
|
|
|
if (hex === "0") { |
|
|
|
|
|
|
|
hex += hex; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
strHex += hex; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (strHex.length !== 7) { |
|
|
|
|
|
|
|
strHex = _this; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return strHex; |
|
|
|
|
|
|
|
} else if (reg.test(_this)) { |
|
|
|
|
|
|
|
var aNum = _this.replace(/#/, "").split(""); |
|
|
|
|
|
|
|
if (aNum.length === 6) { |
|
|
|
|
|
|
|
return _this; |
|
|
|
|
|
|
|
} else if (aNum.length === 3) { |
|
|
|
|
|
|
|
var numHex = "#"; |
|
|
|
|
|
|
|
for (var i = 0; i < aNum.length; i += 1) { |
|
|
|
|
|
|
|
numHex += (aNum[i] + aNum[i]); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return numHex; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return _this; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gradientColor(startColor, endColor, step) { |
|
|
|
|
|
|
|
let _this = this |
|
|
|
|
|
|
|
let startRGB = _this.colorRgb(startColor);//转换为rgb数组模式
|
|
|
|
|
|
|
|
let startR = startRGB[0]; |
|
|
|
|
|
|
|
let startG = startRGB[1]; |
|
|
|
|
|
|
|
let startB = startRGB[2]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let endRGB = _this.colorRgb(endColor); |
|
|
|
|
|
|
|
let endR = endRGB[0]; |
|
|
|
|
|
|
|
let endG = endRGB[1]; |
|
|
|
|
|
|
|
let endB = endRGB[2]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let sR = (endR - startR) / step;//总差值
|
|
|
|
|
|
|
|
let sG = (endG - startG) / step; |
|
|
|
|
|
|
|
let sB = (endB - startB) / step; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var colorArr = []; |
|
|
|
integrityScoreMin//完整度最小值
|
|
|
|
for (var i = 0; i < step; i++) { |
|
|
|
integrityScoreMax//完整度最大值
|
|
|
|
//计算每一步的hex值
|
|
|
|
|
|
|
|
var hex = _this.colorHex('rgb(' + parseInt((sR * i + startR)) + ',' + parseInt((sG * i + startG)) + ',' + parseInt((sB * i + startB)) + ')'); |
|
|
|
|
|
|
|
colorArr.push(hex); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return colorArr; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
integrity(width) { |
|
|
|
|
|
|
|
let _this = this |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let style: any = {} |
|
|
|
|
|
|
|
style.width = width + '%'; |
|
|
|
|
|
|
|
if (width < 30) { |
|
|
|
|
|
|
|
let colorArr = this.gradientColor('#D50000', '#E53935', 30); |
|
|
|
|
|
|
|
for (let i = 0; i < 30; i++) { |
|
|
|
|
|
|
|
if (i == width) { |
|
|
|
|
|
|
|
style.background = colorArr[i] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (width >= 30 && width < 60) { |
|
|
|
|
|
|
|
let colorArr = this.gradientColor('#FF9800', '#E65100', 30); |
|
|
|
|
|
|
|
for (let i = 30; i < 60; i++) { |
|
|
|
|
|
|
|
if (i == width) { |
|
|
|
|
|
|
|
style.background = colorArr[i - 30] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (width >= 60) { |
|
|
|
|
|
|
|
let colorArr = this.gradientColor('#81C784', '#2E7D32', 41); |
|
|
|
|
|
|
|
for (let i = 60; i <= 100; i++) { |
|
|
|
|
|
|
|
if (i == width) { |
|
|
|
|
|
|
|
style.background = colorArr[i - 60] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return style |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
integrityDetails(width, zong) { |
|
|
|
|
|
|
|
let style: any = {} |
|
|
|
|
|
|
|
style.width = (width / zong) * 100 + '%'; |
|
|
|
|
|
|
|
return style |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
newArr: any = [] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//得到当前单位信息
|
|
|
|
|
|
|
|
getunitdata() { |
|
|
|
|
|
|
|
this.http.get("/api/Account/Profiles").subscribe( |
|
|
|
|
|
|
|
(data: any) => { |
|
|
|
|
|
|
|
this.organizationName = data.organizationName |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
dwaddtime//单位查询开始时间
|
|
|
|
|
|
|
|
dwendtime//单位结束时间
|
|
|
|
|
|
|
|
yuanaddtime//预案查询开始时间
|
|
|
|
|
|
|
|
yuanendtime//预案查询结束时间
|
|
|
|
|
|
|
|
integrityScoreMin//完整度最小值
|
|
|
|
|
|
|
|
integrityScoreMax//完整度最大值
|
|
|
|
|
|
|
|
organizationName: any //当前单位组织机构名称
|
|
|
|
|
|
|
|
treedata: any //组织机构树型数据
|
|
|
|
|
|
|
|
newArr: any = [] |
|
|
|
|
|
|
|
newallorganizations: any //用于存储在原始数据基础上的每个机构增加children字段
|
|
|
|
|
|
|
|
//得到当前单位所在组织机构的tree型数据
|
|
|
|
|
|
|
|
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); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//获得所有组织机构
|
|
|
|
|
|
|
|
getOrganizations() { |
|
|
|
|
|
|
|
this.http.get('/api/Organizations').subscribe( |
|
|
|
|
|
|
|
(data: any) => { |
|
|
|
|
|
|
|
this.allorganizations = data |
|
|
|
|
|
|
|
this.treedata = this.tree.toTree(data); |
|
|
|
|
|
|
|
this.getpresentOrganization(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获得所有单位类型
|
|
|
|
|
|
|
|
getUnittype() { |
|
|
|
|
|
|
|
this.http.get('/api/BuildingTypes/Simple').subscribe( |
|
|
|
|
|
|
|
data => { |
|
|
|
|
|
|
|
this.allunittype = data |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//辖区中队div是否显示
|
|
|
|
//辖区中队div是否显示
|
|
|
|
isorganizationbox: boolean = false |
|
|
|
isorganizationbox: boolean = false |
|
|
|
//点击辖区中队树,将选择的辖区中队添加到变量
|
|
|
|
//点击辖区中队树,将选择的辖区中队添加到变量
|
|
|
@ -460,6 +397,9 @@ export class CombinedQueryComponent implements OnInit { |
|
|
|
closediv() { |
|
|
|
closediv() { |
|
|
|
this.isorganizationbox = false |
|
|
|
this.isorganizationbox = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询
|
|
|
|
//查询
|
|
|
|
onSubmit(e) { |
|
|
|
onSubmit(e) { |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
@ -470,43 +410,56 @@ export class CombinedQueryComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
this.getAllPlanInfo(); |
|
|
|
this.getAllPlanInfo(); |
|
|
|
} |
|
|
|
} |
|
|
|
companyName: any //单位名称
|
|
|
|
|
|
|
|
js: any //单位所选组织机构
|
|
|
|
|
|
|
|
jsId: any //单位所选组织机构的id
|
|
|
|
|
|
|
|
jscheck: boolean //单位所选组织机构勾选框
|
|
|
|
|
|
|
|
yuanjs: any //预案所选组织机构
|
|
|
|
|
|
|
|
yuanjsId: any //预案所选组织机构的id
|
|
|
|
|
|
|
|
yuanjscheck: boolean //预案所选组织机构勾选框
|
|
|
|
|
|
|
|
unittype=[] //单位类型
|
|
|
|
|
|
|
|
reservePlanType=[] //预案类型
|
|
|
|
|
|
|
|
preparelevel=[1] //单位状态
|
|
|
|
|
|
|
|
plcheck: boolean //编制级别勾选框
|
|
|
|
|
|
|
|
planCategory=[] //预案级别
|
|
|
|
|
|
|
|
integritySort=1 //单位排序字段
|
|
|
|
|
|
|
|
yuanintegritySort=1 //预案排序字段
|
|
|
|
|
|
|
|
//重置
|
|
|
|
//重置
|
|
|
|
reset() { |
|
|
|
reset() { |
|
|
|
if (this.preparelevels == 0) { |
|
|
|
if (this.preparelevels == 0) { |
|
|
|
this.js = '' |
|
|
|
this.js = this.organizationName |
|
|
|
this.jsId = '' |
|
|
|
this.jsId = this.organizationId |
|
|
|
this.jscheck = false |
|
|
|
this.jscheck = true |
|
|
|
this.unittype = [] |
|
|
|
this.unittype = [] |
|
|
|
this.preparelevel = [0] |
|
|
|
this.allunittype.forEach(element => { |
|
|
|
this.dwaddtime = '' |
|
|
|
this.unittype.push(element.id) |
|
|
|
this.dwendtime = '' |
|
|
|
}); |
|
|
|
|
|
|
|
this.preparelevel = [1] |
|
|
|
|
|
|
|
this.dwaddtime = '2020-01-01'//单位查询开始时间
|
|
|
|
|
|
|
|
this.dwendtime = this.getNowFormatDate()//单位结束时间
|
|
|
|
} else if (this.preparelevels == 1) { |
|
|
|
} else if (this.preparelevels == 1) { |
|
|
|
this.yuanaddtime='' |
|
|
|
this.yuanjs = this.organizationName |
|
|
|
this.yuanendtime='' |
|
|
|
this.yuanjsId = this.organizationId |
|
|
|
this.yuanjs='' |
|
|
|
this.yuanaddtime = '2020-01-01'//预案查询开始时间
|
|
|
|
this.yuanjsId='' |
|
|
|
this.yuanendtime = this.getNowFormatDate()//预案查询结束时间
|
|
|
|
this.yuanjscheck=false |
|
|
|
this.yuanjscheck = true |
|
|
|
this.reservePlanType = [] |
|
|
|
this.reservePlanType = ['1', '2', '4', '16'] |
|
|
|
this.planCategory = [] |
|
|
|
this.planCategory = ['1', '2', '3', '4', '5'] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//重新获取初始化列表
|
|
|
|
//重新获取初始化列表
|
|
|
|
this.getAllPlanInfo(); |
|
|
|
this.getAllPlanInfo(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//进入下一层
|
|
|
|
|
|
|
|
clicktd(key, element) { |
|
|
|
|
|
|
|
// console.log(key)
|
|
|
|
|
|
|
|
// console.log(element)
|
|
|
|
|
|
|
|
// console.log(this.allorganizations)
|
|
|
|
|
|
|
|
if (key == 0) { |
|
|
|
|
|
|
|
this.allorganizations.forEach(item => { |
|
|
|
|
|
|
|
if (element === item.name) { |
|
|
|
|
|
|
|
if (this.preparelevels == 0) { |
|
|
|
|
|
|
|
this.js = element |
|
|
|
|
|
|
|
this.jsId = item.id |
|
|
|
|
|
|
|
} else if (this.preparelevels == 1) { |
|
|
|
|
|
|
|
this.yuanjs = element |
|
|
|
|
|
|
|
this.yuanjsId = item.id |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.getAllPlanInfo(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
exal() { |
|
|
|
exal() { |
|
|
|
var uri = 'data:application/vnd.ms-excel;base64,', |
|
|
|
var uri = 'data:application/vnd.ms-excel;base64,', |
|
|
|
|
|
|
|
|
|
|
|