13562321995 3 years ago
parent
commit
a0830a42d6
  1. 25
      src/app/examiner/create-test-score/create-test-score.component.spec.ts
  2. 74
      src/app/examiner/examiner-index/examiner-index.component.html
  3. 238
      src/app/examiner/examiner-index/examiner-index.component.scss
  4. 79
      src/app/examiner/examiner-index/examiner-index.component.ts
  5. 26
      src/app/http-interceptors/tree.service.ts
  6. 33
      src/app/ui/collection-tools-examinee/collection-tools.component.html
  7. 276
      src/app/ui/collection-tools-examinee/collection-tools.component.scss
  8. 8
      src/app/ui/collection-tools-examinee/collection-tools.component.ts
  9. 33
      src/app/ui/collection-tools-read/collection-tools.component.html
  10. 279
      src/app/ui/collection-tools-read/collection-tools.component.scss
  11. 7
      src/app/ui/collection-tools-read/collection-tools.component.ts
  12. 35
      src/app/ui/collection-tools/collection-tools.component.html
  13. 36
      src/app/ui/collection-tools/collection-tools.component.scss
  14. 8
      src/app/ui/collection-tools/collection-tools.component.ts
  15. 5
      src/app/ui/collection-tools/examinationQuestions.ts

25
src/app/examiner/create-test-score/create-test-score.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CreateTestScoreComponent } from './create-test-score.component';
describe('CreateTestScoreComponent', () => {
let component: CreateTestScoreComponent;
let fixture: ComponentFixture<CreateTestScoreComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CreateTestScoreComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CreateTestScoreComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

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

@ -10,66 +10,37 @@
<div class="header">
<div class="queryBox">
<div class="queryField ordiv">
<label style="margin-right: 10px;font-size: 18px;">消防救援站:</label>
<!-- <input list="cars" placeholder="请输入用户账号" [(ngModel)]="accound" />
<datalist id="cars" (onchange)="getoption()">
<option *ngFor="let item of helpName" [value]="item.id" id={{item.id}} >{{item.name}}</option>
</datalist> -->
<input (click)="stopclose($event)" readonly autocomplete="off" [(ngModel)]="js" name="js"
(focus)="openorganizationbox()" placeholder="请填写">
<mat-checkbox color="primary" 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>
<!-- <mat-form-field appearance="fill">
<mat-label>请选择</mat-label>
<mat-select [(ngModel)]="accound">
<mat-option *ngFor="let food of helpName" [value]="food.id">
{{food.name}}
</mat-option>
</mat-select>
</mat-form-field> -->
<label style="margin-right: 10px;font-size: 15px;">消防救援站:</label>
<nz-tree-select [nzDropdownClassName]="'maxHeightTreeSelect'" style="width: 250px" [(ngModel)]="js"
[nzNodes]="nodes" nzPlaceHolder="请选择" [nzExpandedIcon]="multiExpandedIconTpl" [nzExpandedKeys]="expandedKeys">
</nz-tree-select>
<ng-template #multiExpandedIconTpl let-node let-origin="origin">
<ng-container *ngIf="node.children.length == 0; else elseTemplate">
</ng-container>
<ng-template #elseTemplate>
<ng-container *ngIf="node.isExpanded; else elseTemplate">
<mat-icon>expand_more</mat-icon>
</ng-container>
<ng-template #elseTemplate>
<mat-icon>chevron_right</mat-icon>
</ng-template>
</ng-template>
</ng-template>
<mat-checkbox color="primary" style="margin-left: 26px;" [(ngModel)]="jscheck" name="jscheck">包含下级
</mat-checkbox>
</div>
<div class="queryField">
<button style="background-color: #07CDCF;" (click)="findClick()">查询</button>
<button style="margin-left: 10px; background-color: #FF8678;" (click)="Reset()">重置</button>
</div>
<div class="queryField" style="margin-left: 620px;">
<button style="background-color: #07CDCF;" (click)="newExamination()"><img
style="position: relative;top: 3px;" src="../../../assets/images/add.png"> 新增考题</button>
<div class="queryField">
<button style="background-color: #07CDCF;" (click)="newExamination()"><img style="vertical-align: bottom;" src="../../../assets/images/add.png"> 新增考题</button>
</div>
</div>
</div>
<div class="centertable">
<!-- <table mat-table [dataSource]="dataSource" >
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef>试卷名称</th>
<td mat-cell *matCellDef="let element">{{element.name}}</td>
</ng-container>
</table> -->
<table>
<thead>
<th style="width: 15%;">试卷名称</th>
@ -87,7 +58,8 @@
<td>{{item.endTime|date:'yyyy-MM-dd HH:mm'}}</td>
<!-- <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" ? "未开考" : item.status == "-1" ? '未发布' : "开考中"}}</td>
{{item.status == "2" ? "已结束" : item.status == "0" ? "未开考" : item.status == "-1" ? '未发布' :
"开考中"}}</td>
<td>
<span style="color: #07CDCF;margin-right: 10px;cursor: pointer;"
(click)="editPaper(item)">编辑</span>

238
src/app/examiner/examiner-index/examiner-index.component.scss

@ -1,142 +1,122 @@
table {
width: 100%;
width: 100%;
text-align: center;
.cdk-header-cell {
text-align: center;
.cdk-header-cell {
text-align: center;
}
}
.content {
width: 100%;
height: 100%;
overflow: hidden;
background: #F2F5F6;
overflow-y: auto;
}
.header {
width: 100%;
padding: 10px;
margin-bottom: 10px;
}
.content {
width: 100%;
height: 100%;
overflow: hidden;
background: #F2F5F6;
overflow-y: auto;
}
.header {
width: 100%;
padding: 10px;
box-sizing: border-box;
display: flex;
align-items: center;
.queryBox {
box-sizing: border-box;
.queryBox {
box-sizing: border-box;
padding: 5px 15px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items:center;
justify-content:left;
.queryField {
margin: 0 25px;
font-size: 14px;
input,select {
font-size: 15px;
width: 320px;
height: 44px;
line-height: 34px;
border-radius: 5px;
padding-left: 5px;
outline: none;
border: 1px solid rgb(226, 211, 211);
}
button {
border: none;
color: white;
padding: 10px 25px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
border-radius: 8px;
outline:0 none !important;
}
}
.headerright{
float: right;
padding: 5px 15px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
justify-content: left;
.queryField {
margin: 0 25px;
font-size: 13px;
input,
select {
font-size: 13px;
width: 320px;
height: 44px;
line-height: 34px;
border-radius: 5px;
padding-left: 5px;
outline: none;
border: 1px solid rgb(226, 211, 211);
}
} //queryBox
.ordiv{
position: relative;
.organizationbox{
button{
color: #000000;
position: relative;
bottom: 9px;
}
width:450px;
height: 200px;
background: white;
position: absolute;
top: 47px;
left: 105px;
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);
}
button {
border: none;
color: white;
padding: 8px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 13px;
margin: 4px 2px;
cursor: pointer;
border-radius: 5px;
outline: 0 none !important;
}
}
.headerright {
float: right;
}
}
}
.centertable{
width: 95%;
margin-right: 40px;
margin-left: 40px;
background-color: #FFFFFF;
table{
td,th{
height: 48px;
font-size: 16px;
}
td{
border-bottom: 1px solid #F2F5F6;
}
thead{
background-color:#F5FDFE;
}
.green{
color: #07CDCF;
}
.centertable {
width: 95%;
margin-right: 40px;
margin-left: 40px;
background-color: #FFFFFF;
table {
td,
th {
height: 48px;
font-size: 13px;
}
.red{
color: #FF8678;
td {
border-bottom: 1px solid #F2F5F6;
}
thead {
background-color: #F5FDFE;
}
}
.operationSpan{
margin: 0 10px;
.spanbtn {
font-weight: 550;
cursor: pointer;
.green {
color: #07CDCF;
}
.red {
color: #FF8678;
}
.green{ color: #04ced1; }
.red{ color: #FF8678 }
.gray{ color: gray; }
}
}
.operationSpan {
margin: 0 10px;
.spanbtn {
font-weight: 550;
cursor: pointer;
}
.green {
color: #04ced1;
}
.red {
color: #FF8678
}
.gray {
color: gray;
}
}

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

@ -64,27 +64,14 @@ export class ExaminerIndexComponent implements OnInit {
allorganizations: any
allunittype: any //获取所有的单位类型
jscheck: any //辖区中队包含下级
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);
hasChild = (_: number, node: any) => node.expandable;
//获得所有组织机构
getOrganizations() {
this.http.get('/api/Organizations').subscribe(
(data: any) => {
this.allorganizations = data
console.log(this.allorganizations)
console.log('组织机构列表', this.allorganizations)
this.treedata = this.tree.toTree(data);
this.getpresentOrganization();
}
@ -92,9 +79,9 @@ export class ExaminerIndexComponent implements OnInit {
}
organizationName: any //当前单位组织机构名称
treedata: any //组织机构树型数据
newArr: any = []
newallorganizations: any //用于存储在原始数据基础上的每个机构增加children字段
newallorganizations2: any
nodes: any = []
expandedKeys: any = []//默认展开tree节点
//得到当前单位所在组织机构的tree型数据
getpresentOrganization() {
this.newallorganizations = this.allorganizations
@ -110,13 +97,13 @@ export class ExaminerIndexComponent implements OnInit {
if (this.organizationName) {
this.newallorganizations.forEach(item => {
if (item.name == this.organizationName) {
this.dataSource.data = [item]
this.newallorganizations2 = [item]
this.expandedKeys = [item.key]
this.nodes = [item]
}
});
} else {
this.newallorganizations2 = this.treedata
this.dataSource.data = this.treedata
this.expandedKeys = this.nodes[0].key
this.nodes = this.tree.toTree(this.treedata);
}
}
@ -183,7 +170,7 @@ export class ExaminerIndexComponent implements OnInit {
let paramsdata: any = {
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
OrganizationId: this.jsId || '',
OrganizationId: this.js || '',
HasChildren: this.jscheck || '',
Sort: null,
SortType: null,
@ -191,7 +178,6 @@ export class ExaminerIndexComponent implements OnInit {
this.http.get("/api/Papers", { params: paramsdata }).subscribe((data: any) => {
this.tabledataSource = data.items
this.length = data.totalCount
//console.log(this.tabledataSource)
})
}
//获取消防救援对信息
@ -224,32 +210,27 @@ export class ExaminerIndexComponent implements OnInit {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
console.log(this.js)
let paramsdata: any = {
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
OrganizationId: this.jsId || '',
OrganizationId: this.js || '',
HasChildren: this.jscheck || '',
Sort: null,
SortType: null,
}
if (this.jsId == undefined) {
this.snackBar.open('请输入消防救援队名称', '确定', config);
if (!this.js) {
this.snackBar.open('请选择消防救援队', '确定', config);
}
else {
this.http.get(`/api/Papers`, { params: paramsdata }).subscribe((data: any) => {
console.log(data)
})
this.PageNumber = 1
this.pageEvent.pageIndex = 0
this.getAlltabledate()
}
//console.log(this.accound)
console.log(this.jscheck, this.jsId)
this.PageNumber = 1
this.pageEvent.pageIndex = 0
this.getAlltabledate()
}
//重置按钮
Reset() {
//this.accound=undefined
this.jsId = ''
this.js = ''
this.jscheck = ''
this.getAlltabledate()
@ -280,33 +261,9 @@ export class ExaminerIndexComponent implements OnInit {
}
});
}
//辖区中队div是否显示
isorganizationbox: boolean = false
js: any //辖区中队输入框
jsId: any //辖区中队选择的id
stopclose(e) {
e.stopPropagation();
}
//点击辖区中队树,将选择的辖区中队添加到变量
add(node) {
this.isorganizationbox = false
this.js = node.name
this.jsId = node.id
}
//关闭辖区中队隐藏框
closeorganizationbox() {
this.isorganizationbox = false
}
//打开辖区中队隐藏框
openorganizationbox() {
this.isorganizationbox = true
}
js: any //辖区中队输入框
//关闭出现的组织机构div
closediv() {
this.isorganizationbox = false
}
}

26
src/app/http-interceptors/tree.service.ts

@ -2,21 +2,21 @@ import { Injectable } from '@angular/core';
@Injectable()
export class TreeService {
toTree(olddata){
toTree(olddata) {
let newdata = []
function getparentNode(parentId){
return olddata.find((item)=>{
return item.id == parentId
function getparentNode(parentId) {
return olddata.find((item) => {
return item.id == parentId
})
}
}
olddata.forEach(item => {
item.key = item.id
item.title = item.name
var parentNode = getparentNode(item.parentId);
if(parentNode){
if(!parentNode.children){
var parentNode = getparentNode(item.parentId);
if (parentNode) {
if (!parentNode.children) {
parentNode.children = []
}
@ -24,13 +24,13 @@ export class TreeService {
item.isTop = true;
} else {
item.isTop = false;
parentNode.children[parentNode.children.length -1].isBottom = false;
parentNode.children[parentNode.children.length - 1].isBottom = false;
}
item.isBottom = true;
parentNode.children.push(item)
}else{
if(!item.parentId){//如果parentId为null
} else {
if (!item.parentId) {//如果parentId为null
newdata.push(item)
}
}

33
src/app/ui/collection-tools-examinee/collection-tools.component.html

@ -28,6 +28,39 @@
<app-working-area #canvas [init]='this'></app-working-area>
<!-- H5Canvas -->
<!-- 天气 -->
<div class="weatherBox">
<span class="name">天气</span>
<input disabled class="weatherInput" [(ngModel)]="weatherData.weather" type="text" placeholder="最多输入10字节" maxlength="10">
<span class="name">气温</span>
<div style="display: inline-block;position: relative;">
<input disabled [(ngModel)]="weatherData.airTemperature" style="width: 60px;" type="number" value="0"
oninput="if(value.length>2)value=value.slice(0,2)">
<span style="position: absolute;right: 16px;top: 2px;color: #9c9fa5;"></span>
</div>
<span class="name">风力</span>
<select disabled class="weatherSelect" [(ngModel)]="weatherData.windScale">
<option value="0">0(无风)</option>
<option value="1">1(软风)</option>
<option value="2">2(轻风)</option>
<option value="3">3(微风)</option>
<option value="4">4(和风)</option>
<option value="5">5(清风)</option>
<option value="6">6(强风)</option>
</select>
<span class="name">风向</span>
<select disabled class="weatherSelect" [(ngModel)]="weatherData.windDirection">
<option value="0"></option>
<option value="1">西</option>
<option value="2"></option>
<option value="3"></option>
<option value="4">东南</option>
<option value="5">西南</option>
<option value="6">东北</option>
<option value="7">西北</option>
</select>
</div>
<!-- 拖拽窗口 -->
<div (mousewheel)="$event.stopPropagation()" class="centerBuildingDiv" style="user-select: none;" cdkDrag>
<div class="centerTotal">

276
src/app/ui/collection-tools-examinee/collection-tools.component.scss

@ -1,7 +1,10 @@
@import './panel.scss';
::-webkit-scrollbar {
display: none; /* Chrome Safari */
display: none;
/* Chrome Safari */
}
.content {
width: 100%;
height: 100%;
@ -10,7 +13,8 @@
padding: 3px;
display: flex;
flex-direction: column;
.buildingbtnchecked{
.buildingbtnchecked {
background-color: #07CDCF;
color: white;
}
@ -23,9 +27,10 @@
height: 46px;
min-height: 46px;
display: flex;
align-items:center;
align-items: center;
background-color: #fff;
box-shadow: inset 0px -3px 5px 0px rgb(165, 163, 163);
.headerTitle {
width: 235px;
overflow: hidden;
@ -35,14 +40,17 @@
font-size: 20px;
font-weight: 550;
}
.headerCenter {
flex: 1;
overflow: hidden;
.mainPointDiv{
.mainPointDiv {
box-sizing: border-box;
padding-left: 8px;
cursor: default;
span{
span {
font-family: Source Han Sans CN;
color: #FF8678;
font-size: 15px;
@ -50,19 +58,22 @@
}
}
.headerRight {
width: 350px;
overflow: hidden;
box-sizing: border-box;
padding-left: 10px;
button {
font-size: 14px;
color: #07CDCF;
color: #07CDCF;
background-color: #fff;
border: none;
outline: none;
cursor:pointer;
cursor: pointer;
}
.mat-icon {
font-size: 22px;
vertical-align: middle;
@ -74,14 +85,16 @@
//头部操作栏
.headerOperate {
img {
width: 24px;
width: 24px;
height: 24px;
vertical-align: middle;
margin-left: 1px;
}
span{
span {
font-size: 18px;
}
flex: 5%;
display: flex;
align-items:center;
@ -89,15 +102,18 @@
box-sizing: border-box;
margin: 3px 0;
background-color: white;
button{
button {
border: 0.5px solid rgb(208, 211, 214);
margin: 0 2px;
}
.editdeletebtn{
.editdeletebtn {
display: none;
}
.bigeditdeletebtn:hover{
.editdeletebtn{
.bigeditdeletebtn:hover {
.editdeletebtn {
display: inline-block;
}
}
@ -106,9 +122,10 @@
//功能区
// icon统一样式
.mat-icon {
cursor:pointer;
cursor: pointer;
vertical-align: middle;
}
//左右两侧功能栏 统一样式
.publicCss {
border-radius: 5px;
@ -116,14 +133,17 @@
height: 100%;
top: 0;
}
.functionalDomain {
flex: 1;
overflow: hidden;
.functionalDomainContent {
position: relative;
width: 100%;
height: 100%;
}
.centerBuildingDiv {
position: absolute;
max-width: 400px;
@ -132,6 +152,7 @@
z-index: 150;
display: flex;
}
.functionalDomainLeft {
background-color: #fff;
display: flex;
@ -143,7 +164,8 @@
width: 235px;
left: 0;
z-index: 111;
.leftDragDiv{
.leftDragDiv {
position: absolute;
right: 0;
height: 100%;
@ -152,20 +174,23 @@
cursor: e-resize;
}
}
.functionalDomainRight {
z-index: 111;
margin-right: 0px;
transition: margin-right 0.5s;
transition: margin-right 0.5s;
border: 1px solid #cacdd1;
width: 235px;
min-width: 235px;
right: 0;
}
//右边导航栏显示隐藏
//右边导航栏显示隐藏
.togglePanel2 {
margin-right: -2000px;
transition: margin-right 1s;
transition: margin-right 1s;
}
//左侧导航栏显示隐藏
.togglePanel {
margin-left: -2000px;
@ -182,19 +207,26 @@
border-radius: 5px;
box-sizing: border-box;
padding: 5px 0;
.centerTotalHeader {
height: 30px;
line-height: 30px;
box-sizing: border-box;
padding: 0 5px;
font-size: 14px;
.above:hover {cursor: move;;}
.above:hover {
cursor: move;
;
}
.above {
font-size: 24px;
color: rgb(175, 164, 164);
margin: 0 10px 0 10px;
}
}
.everyTotal {
width: 100%;
height: 30px;
@ -202,43 +234,60 @@
box-sizing: border-box;
padding: 0 5px;
margin: 3px 0;
cursor:pointer;
cursor: pointer;
font-size: 16px;
}
}
//中间建筑/楼层
//右边操作栏
.titleS{
.titleS {
width: 100%;
height: 35px;
line-height: 35px;
padding-left: 5px;
box-sizing: border-box;
color: #07CDCF;
.mat-icon {vertical-align: middle; margin-right: 5px; font-size: 22px;}
.mat-icon {
vertical-align: middle;
margin-right: 5px;
font-size: 22px;
}
}
input {
border: none;
outline: none;
background-color: #d6dddf;
box-sizing: border-box;
padding-left: 5px;
}
input { border: none; outline: none; background-color: #d6dddf; box-sizing: border-box; padding-left: 5px; }
//右侧属性
.property{
.property {
display: flex;
flex-flow: column;
.siteproperty{
.siteproperty {
height: 100%;
overflow-y: auto;
p{
p {
color: #9c9fa5;
padding-left: 5px;
}
.siteproperty_size{
.siteproperty_size {
background-color: #F2F5F6;
width: 93%;
margin: 0 auto;
border-radius: 3px;
min-height: 21px;
}
.rightAttribute{
.rightAttribute {
width: 12%;
height: 99.5%;
position: absolute;
@ -248,56 +297,70 @@ input { border: none; outline: none; background-color: #d6dddf; box-sizing: bord
border: 2px solid #464646;
}
}
.assetsproperty{
.assetsproperty {
overflow-y: auto;
height: 100%;
p{
p {
color: #9c9fa5;
margin:1px 0 3px 8px;
margin: 1px 0 3px 8px;
font-size: 14px;
}
span{
span {
font-size: 15px;
}
input{
input {
height: 24px;
border-radius: 3px;
}
.biginput{
.biginput {
display: block;
width: 88%;
margin: 0 auto;
}
.smallinput{
.smallinput {
display: block;
width: 19%;
margin-left: 14px;
}
.textarea{
.textarea {
display: block;
width: 88%;
height: 50px;
margin: 0 auto;
}
.swiper-button-next{
.swiper-button-next {
right: 6px;
}
.swiper-button-prev{
.swiper-button-prev {
left: 6px;
}
.swiper-container{
.swiper-container {
// --swiper-theme-color: #ff6600;/* 设置Swiper风格 */
// --swiper-navigation-color: #00ff33;/* 单独设置按钮颜色 */
--swiper-navigation-size:20px;/* 设置按钮大小 */
--swiper-navigation-size: 20px;
/* 设置按钮大小 */
}
.hoverred:hover{
.hoverred:hover {
color: rgb(187, 28, 28);
}
.selectDiv{
.selectDiv {
height: 21px;
position: relative;
margin-bottom: 5px;
select{
select {
width: 98px;
height: 22px;
vertical-align: middle;
@ -308,17 +371,20 @@ input { border: none; outline: none; background-color: #d6dddf; box-sizing: bord
border-radius: 2px;
}
}
.colorBigDiv{
.colorBigDiv {
width: 88%;
margin-left: 8px;
.colorBigTemplateDiv{
span{
.colorBigTemplateDiv {
span {
color: #9c9fa5;
font-size: 14px;
height: 26px;
line-height: 26px;
}
.colorTemplateDiv{
.colorTemplateDiv {
width: 65%;
height: 22px;
display: inline-block;
@ -326,29 +392,32 @@ input { border: none; outline: none; background-color: #d6dddf; box-sizing: bord
margin-left: 26px;
}
}
.colorDiv{
.colorLi{
.colorDiv {
.colorLi {
width: 24px;
height: 24px;
list-style: none;
float: left;
border: 2px solid white;
}
.coloractive{
.coloractive {
border: 2px solid black;
}
}
}
}
}
//右侧消防要素
.firecategories{
.firecategories {
position: relative;
display: flex;
flex-flow: column;
.firecategoriesTree{
.firecategoriesTree {
overflow-y: auto;
height: 100%;
}
@ -358,12 +427,15 @@ input { border: none; outline: none; background-color: #d6dddf; box-sizing: bord
div:focus {
outline: none;
}
//没有图片时显示无图片背景图
.noImgCss{
.noImgCss {
background: url(../../../assets/images/noImg.png) no-repeat center center;
background-size: 88% 100%;/*按比例缩放*/
background-size: 88% 100%;
/*按比例缩放*/
}
.input{
.input {
width: 18px;
height: 18px;
vertical-align: middle;
@ -372,27 +444,32 @@ div:focus {
}
// tree
.isLookCss{
.isLookCss {
margin-left: auto;
color: #07CDCF;
.icongray{
.icongray {
color: #D9D0DC;
}
}
.mat-tree-node{
.mat-tree-node {
padding-right: 3px;
min-height: 30px;
height: 30px;
font-size: 12px;
cursor: pointer;
}
.treeNode:hover{
.treeNode:hover {
background-color: #ccebf8;
}
.isLookPattern{
.isLookPattern {
display: none;
}
.treeText{
.treeText {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
@ -400,49 +477,49 @@ div:focus {
width: 65px;
}
.bigBox{
width: 700px;
height: 40px;
position: absolute;
overflow: hidden;
right: 0;
}
.weatherBox{
.weatherBox {
width: 600px;
height: 40px;
width: 700px;
line-height: 40px;
box-sizing: border-box;
padding: 0 12px;
display: flex;
justify-content: space-around;
align-items: center;
position: absolute;
right: 0;
transition: right linear .5s;
.openbtn{
right: 238px;
top: 2px;
background: #fff;
border-radius: 3px;
.openbtn {
font-size: 45px;
height: 45px;
width: 40px;
}
.name{
.name {
font-size: 16px;
vertical-align: middle;
margin-left: 3px;
}
input{
width: 140px;
height: 22px;
input {
width: 145px;
height: 25px;
margin-left: 3px;
border: 1px solid black;
background: none;
}
select{
width: 96px;
select {
width: 85px;
height: 25px;
margin-left: 3px;
vertical-align: middle;
}
}
.open{
right: 0px;
}
.close{
right:-622px;
}
.bottomCss{
.bottomCss {
position: absolute;
left: 232px;
right: 0px;
@ -452,7 +529,8 @@ div:focus {
z-index: 111;
background-color: white;
border: 1px solid #464646;
.dragDiv{
.dragDiv {
width: 100%;
height: 3px;
position: absolute;
@ -460,10 +538,12 @@ div:focus {
z-index: 111;
cursor: n-resize;
}
.title{
.title {
height: 35px;
background-color: #464646;
div{
div {
background-color: #464646;
float: left;
width: 80px;
@ -472,14 +552,16 @@ div:focus {
padding-left: 5px;
cursor: pointer;
}
.detailsAndattentBtn{
.detailsAndattentBtn {
background-color: #595959;
}
}
.body{
textarea{
.body {
textarea {
width: 100%;
border-radius: 0px;
}
}
}
}
}

8
src/app/ui/collection-tools-examinee/collection-tools.component.ts

@ -462,6 +462,13 @@ export class CollectionToolsExamineeComponent implements OnInit {
planData: any //当前考题题目
Facilities: any //当前预案考题所有楼层要考的基本信息素材
//获得单位预案设定
//上传考题
weatherData = {
weather: null,
airTemperature: null,
windScale: null,
windDirection: null
}
async getPaperPlanData() {
let params = {
paperId: this.paperId
@ -477,6 +484,7 @@ export class CollectionToolsExamineeComponent implements OnInit {
this.handleHybridTree(questions, '题目')
this.Facilities = JSON.parse(this.planData.examFacilityAssetsData)
console.log('当前预案设定需要隐藏的基本信息图标', this.Facilities)
this.weatherData = JSON.parse(this.planData.weather)
resolve(1)
})
})

33
src/app/ui/collection-tools-read/collection-tools.component.html

@ -33,7 +33,38 @@
<!-- H5Canvas -->
<app-working-area #canvas [init]='this'></app-working-area>
<!-- H5Canvas -->
<!-- 天气 -->
<div class="weatherBox">
<span class="name">天气</span>
<input disabled class="weatherInput" [(ngModel)]="weatherData.weather" type="text" placeholder="最多输入10字节" maxlength="10">
<span class="name">气温</span>
<div style="display: inline-block;position: relative;">
<input disabled [(ngModel)]="weatherData.airTemperature" style="width: 60px;" type="number" value="0"
oninput="if(value.length>2)value=value.slice(0,2)">
<span style="position: absolute;right: 16px;top: 2px;color: #9c9fa5;"></span>
</div>
<span class="name">风力</span>
<select disabled class="weatherSelect" [(ngModel)]="weatherData.windScale">
<option value="0">0(无风)</option>
<option value="1">1(软风)</option>
<option value="2">2(轻风)</option>
<option value="3">3(微风)</option>
<option value="4">4(和风)</option>
<option value="5">5(清风)</option>
<option value="6">6(强风)</option>
</select>
<span class="name">风向</span>
<select disabled class="weatherSelect" [(ngModel)]="weatherData.windDirection">
<option value="0"></option>
<option value="1">西</option>
<option value="2"></option>
<option value="3"></option>
<option value="4">东南</option>
<option value="5">西南</option>
<option value="6">东北</option>
<option value="7">西北</option>
</select>
</div>
<!-- 拖拽窗口 -->
<div (mousewheel)="$event.stopPropagation()" class="centerBuildingDiv" style="user-select: none;" cdkDrag>
<div class="centerTotal">

279
src/app/ui/collection-tools-read/collection-tools.component.scss

@ -1,7 +1,10 @@
@import './panel.scss';
::-webkit-scrollbar {
display: none; /* Chrome Safari */
display: none;
/* Chrome Safari */
}
.content {
width: 100%;
height: 100%;
@ -10,7 +13,8 @@
padding: 3px;
display: flex;
flex-direction: column;
.buildingbtnchecked{
.buildingbtnchecked {
background-color: #07CDCF;
color: white;
}
@ -23,9 +27,10 @@
height: 46px;
min-height: 46px;
display: flex;
align-items:center;
align-items: center;
background-color: #fff;
box-shadow: inset 0px -3px 5px 0px rgb(165, 163, 163);
.headerTitle {
width: 235px;
overflow: hidden;
@ -35,14 +40,17 @@
font-size: 20px;
font-weight: 550;
}
.headerCenter {
flex: 1;
overflow: hidden;
.mainPointDiv{
.mainPointDiv {
box-sizing: border-box;
padding-left: 8px;
cursor: default;
span{
span {
font-family: Source Han Sans CN;
color: #FF8678;
font-size: 15px;
@ -50,19 +58,22 @@
}
}
.headerRight {
width: 350px;
overflow: hidden;
box-sizing: border-box;
padding-left: 10px;
button {
font-size: 14px;
color: #07CDCF;
color: #07CDCF;
background-color: #fff;
border: none;
outline: none;
cursor:pointer;
cursor: pointer;
}
.mat-icon {
font-size: 22px;
vertical-align: middle;
@ -74,14 +85,16 @@
//头部操作栏
.headerOperate {
img {
width: 24px;
width: 24px;
height: 24px;
vertical-align: middle;
margin-left: 1px;
}
span{
span {
font-size: 18px;
}
flex: 5%;
display: flex;
align-items:center;
@ -89,15 +102,18 @@
box-sizing: border-box;
margin: 3px 0;
background-color: white;
button{
button {
border: 0.5px solid rgb(208, 211, 214);
margin: 0 2px;
}
.editdeletebtn{
.editdeletebtn {
display: none;
}
.bigeditdeletebtn:hover{
.editdeletebtn{
.bigeditdeletebtn:hover {
.editdeletebtn {
display: inline-block;
}
}
@ -106,9 +122,10 @@
//功能区
// icon统一样式
.mat-icon {
cursor:pointer;
cursor: pointer;
vertical-align: middle;
}
//左右两侧功能栏 统一样式
.publicCss {
border-radius: 5px;
@ -116,15 +133,18 @@
height: 100%;
top: 0;
}
.functionalDomain {
flex: 1;
overflow: hidden;
.functionalDomainContent {
position: relative;
width: 100%;
height: 100%;
}
.answerDivDrag{
.answerDivDrag {
position: absolute;
width: 230px;
min-height: 35px;
@ -137,6 +157,7 @@
border-radius: 5px;
// display: flex;
}
.centerBuildingDiv {
position: absolute;
max-width: 400px;
@ -145,6 +166,7 @@
z-index: 150;
display: flex;
}
.functionalDomainLeft {
background-color: #fff;
display: flex;
@ -156,7 +178,8 @@
width: 235px;
left: 0;
z-index: 111;
.leftDragDiv{
.leftDragDiv {
position: absolute;
right: 0;
height: 100%;
@ -165,20 +188,23 @@
cursor: e-resize;
}
}
.functionalDomainRight {
z-index: 111;
margin-right: 0px;
transition: margin-right 0.5s;
transition: margin-right 0.5s;
border: 1px solid #cacdd1;
width: 235px;
min-width: 235px;
right: 0;
}
//右边导航栏显示隐藏
//右边导航栏显示隐藏
.togglePanel2 {
margin-right: -2000px;
transition: margin-right 1s;
transition: margin-right 1s;
}
//左侧导航栏显示隐藏
.togglePanel {
margin-left: -2000px;
@ -195,19 +221,26 @@
border-radius: 5px;
box-sizing: border-box;
padding: 5px 0;
.centerTotalHeader {
height: 30px;
line-height: 30px;
box-sizing: border-box;
padding: 0 5px;
font-size: 14px;
.above:hover {cursor: move;;}
.above:hover {
cursor: move;
;
}
.above {
font-size: 24px;
color: rgb(175, 164, 164);
margin: 0 10px 0 10px;
}
}
.everyTotal {
width: 100%;
height: 30px;
@ -215,43 +248,60 @@
box-sizing: border-box;
padding: 0 5px;
margin: 3px 0;
cursor:pointer;
cursor: pointer;
font-size: 16px;
}
}
//中间建筑/楼层
//右边操作栏
.titleS{
.titleS {
width: 100%;
height: 35px;
line-height: 35px;
padding-left: 5px;
box-sizing: border-box;
color: #07CDCF;
.mat-icon {vertical-align: middle; margin-right: 5px; font-size: 22px;}
.mat-icon {
vertical-align: middle;
margin-right: 5px;
font-size: 22px;
}
}
input {
border: none;
outline: none;
background-color: #d6dddf;
box-sizing: border-box;
padding-left: 5px;
}
input { border: none; outline: none; background-color: #d6dddf; box-sizing: border-box; padding-left: 5px; }
//右侧属性
.property{
.property {
display: flex;
flex-flow: column;
.siteproperty{
.siteproperty {
height: 100%;
overflow-y: auto;
p{
p {
color: #9c9fa5;
padding-left: 5px;
}
.siteproperty_size{
.siteproperty_size {
background-color: #F2F5F6;
width: 93%;
margin: 0 auto;
border-radius: 3px;
min-height: 21px;
}
.rightAttribute{
.rightAttribute {
width: 12%;
height: 99.5%;
position: absolute;
@ -261,56 +311,70 @@ input { border: none; outline: none; background-color: #d6dddf; box-sizing: bord
border: 2px solid #464646;
}
}
.assetsproperty{
.assetsproperty {
overflow-y: auto;
height: 100%;
p{
p {
color: #9c9fa5;
margin:1px 0 3px 8px;
margin: 1px 0 3px 8px;
font-size: 14px;
}
span{
span {
font-size: 15px;
}
input{
input {
height: 24px;
border-radius: 3px;
}
.biginput{
.biginput {
display: block;
width: 88%;
margin: 0 auto;
}
.smallinput{
.smallinput {
display: block;
width: 19%;
margin-left: 14px;
}
.textarea{
.textarea {
display: block;
width: 88%;
height: 50px;
margin: 0 auto;
}
.swiper-button-next{
.swiper-button-next {
right: 6px;
}
.swiper-button-prev{
.swiper-button-prev {
left: 6px;
}
.swiper-container{
.swiper-container {
// --swiper-theme-color: #ff6600;/* 设置Swiper风格 */
// --swiper-navigation-color: #00ff33;/* 单独设置按钮颜色 */
--swiper-navigation-size:20px;/* 设置按钮大小 */
--swiper-navigation-size: 20px;
/* 设置按钮大小 */
}
.hoverred:hover{
.hoverred:hover {
color: rgb(187, 28, 28);
}
.selectDiv{
.selectDiv {
height: 21px;
position: relative;
margin-bottom: 5px;
select{
select {
width: 98px;
height: 22px;
vertical-align: middle;
@ -321,17 +385,20 @@ input { border: none; outline: none; background-color: #d6dddf; box-sizing: bord
border-radius: 2px;
}
}
.colorBigDiv{
.colorBigDiv {
width: 88%;
margin-left: 8px;
.colorBigTemplateDiv{
span{
.colorBigTemplateDiv {
span {
color: #9c9fa5;
font-size: 14px;
height: 26px;
line-height: 26px;
}
.colorTemplateDiv{
.colorTemplateDiv {
width: 65%;
height: 22px;
display: inline-block;
@ -339,29 +406,32 @@ input { border: none; outline: none; background-color: #d6dddf; box-sizing: bord
margin-left: 26px;
}
}
.colorDiv{
.colorLi{
.colorDiv {
.colorLi {
width: 24px;
height: 24px;
list-style: none;
float: left;
border: 2px solid white;
}
.coloractive{
.coloractive {
border: 2px solid black;
}
}
}
}
}
//右侧消防要素
.firecategories{
.firecategories {
position: relative;
display: flex;
flex-flow: column;
.firecategoriesTree{
.firecategoriesTree {
overflow-y: auto;
height: 100%;
}
@ -371,12 +441,15 @@ input { border: none; outline: none; background-color: #d6dddf; box-sizing: bord
div:focus {
outline: none;
}
//没有图片时显示无图片背景图
.noImgCss{
.noImgCss {
background: url(../../../assets/images/noImg.png) no-repeat center center;
background-size: 88% 100%;/*按比例缩放*/
background-size: 88% 100%;
/*按比例缩放*/
}
.input{
.input {
width: 18px;
height: 18px;
vertical-align: middle;
@ -385,27 +458,32 @@ div:focus {
}
// tree
.isLookCss{
.isLookCss {
margin-left: auto;
color: #07CDCF;
.icongray{
.icongray {
color: #D9D0DC;
}
}
.mat-tree-node{
.mat-tree-node {
padding-right: 3px;
min-height: 30px;
height: 30px;
font-size: 12px;
cursor: pointer;
}
.treeNode:hover{
.treeNode:hover {
background-color: #ccebf8;
}
.isLookPattern{
.isLookPattern {
display: none;
}
.treeText{
.treeText {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
@ -413,49 +491,49 @@ div:focus {
width: 65px;
}
.bigBox{
width: 700px;
height: 40px;
position: absolute;
overflow: hidden;
right: 0;
}
.weatherBox{
.weatherBox {
width: 600px;
height: 40px;
width: 700px;
line-height: 40px;
box-sizing: border-box;
padding: 0 12px;
display: flex;
justify-content: space-around;
align-items: center;
position: absolute;
right: 0;
transition: right linear .5s;
.openbtn{
right: 238px;
top: 2px;
background: #fff;
border-radius: 3px;
.openbtn {
font-size: 45px;
height: 45px;
width: 40px;
}
.name{
.name {
font-size: 16px;
vertical-align: middle;
margin-left: 3px;
}
input{
width: 140px;
height: 22px;
input {
width: 145px;
height: 25px;
margin-left: 3px;
border: 1px solid black;
background: none;
}
select{
width: 96px;
select {
width: 85px;
height: 25px;
margin-left: 3px;
vertical-align: middle;
}
}
.open{
right: 0px;
}
.close{
right:-622px;
}
.bottomCss{
.bottomCss {
position: absolute;
left: 232px;
right: 0px;
@ -465,7 +543,8 @@ div:focus {
z-index: 111;
background-color: white;
border: 1px solid #464646;
.dragDiv{
.dragDiv {
width: 100%;
height: 3px;
position: absolute;
@ -473,10 +552,12 @@ div:focus {
z-index: 111;
cursor: n-resize;
}
.title{
.title {
height: 35px;
background-color: #464646;
div{
div {
background-color: #464646;
float: left;
width: 80px;
@ -485,14 +566,16 @@ div:focus {
padding-left: 5px;
cursor: pointer;
}
.detailsAndattentBtn{
.detailsAndattentBtn {
background-color: #595959;
}
}
.body{
textarea{
.body {
textarea {
width: 100%;
border-radius: 0px;
}
}
}
}
}

7
src/app/ui/collection-tools-read/collection-tools.component.ts

@ -229,6 +229,12 @@ export class CollectionToolsReadComponent implements OnInit {
planData: any //当前考题题目
Facilities: any //当前预案考题所有楼层要考的基本信息素材
//获得单位预案设定
weatherData = {
weather: null,
airTemperature: null,
windScale: null,
windDirection: null
}
async getPaperPlanData() {
let params = {
paperId: this.paperId
@ -244,6 +250,7 @@ export class CollectionToolsReadComponent implements OnInit {
this.handleHybridTree(questions, '题目')
this.Facilities = JSON.parse(this.planData.examFacilityAssetsData)
console.log('当前预案设定需要隐藏的基本信息图标', this.Facilities)
this.weatherData = JSON.parse(this.planData.weather)
resolve(1)
})
})

35
src/app/ui/collection-tools/collection-tools.component.html

@ -22,6 +22,41 @@
<!-- H5Canvas -->
<app-working-area #canvas [init]='this'></app-working-area>
<!-- H5Canvas -->
<!-- 天气 -->
<div class="weatherBox">
<span class="name">天气</span>
<input class="weatherInput" [(ngModel)]="weatherData.weather" type="text" placeholder="最多输入10字节" maxlength="10">
<span class="name">气温</span>
<div style="display: inline-block;position: relative;">
<input [(ngModel)]="weatherData.airTemperature" style="width: 60px;" type="number" value="0"
oninput="if(value.length>2)value=value.slice(0,2)">
<span style="position: absolute;right: 16px;top: 2px;color: #9c9fa5;"></span>
</div>
<span class="name">风力</span>
<select class="weatherSelect" [(ngModel)]="weatherData.windScale">
<option value="0">0(无风)</option>
<option value="1">1(软风)</option>
<option value="2">2(轻风)</option>
<option value="3">3(微风)</option>
<option value="4">4(和风)</option>
<option value="5">5(清风)</option>
<option value="6">6(强风)</option>
</select>
<span class="name">风向</span>
<select class="weatherSelect" [(ngModel)]="weatherData.windDirection">
<option value="0"></option>
<option value="1">西</option>
<option value="2"></option>
<option value="3"></option>
<option value="4">东南</option>
<option value="5">西南</option>
<option value="6">东北</option>
<option value="7">西北</option>
</select>
</div>
<div (mousewheel)="$event.stopPropagation()" class="centerBuildingDiv" style="user-select: none;" cdkDrag>
<div class="centerTotal">
<div class="centerTotalHeader overflowText">

36
src/app/ui/collection-tools/collection-tools.component.scss

@ -471,21 +471,20 @@ div:focus {
width: 65px;
}
.bigBox {
width: 700px;
height: 40px;
position: absolute;
overflow: hidden;
right: 0;
}
.weatherBox {
width: 600px;
height: 40px;
width: 700px;
line-height: 40px;
box-sizing: border-box;
padding: 0 12px;
display: flex;
justify-content: space-around;
align-items: center;
position: absolute;
right: 0;
transition: right linear .5s;
right: 238px;
top: 2px;
background: #fff;
border-radius: 3px;
.openbtn {
font-size: 45px;
@ -500,26 +499,21 @@ div:focus {
}
input {
width: 140px;
height: 22px;
width: 145px;
height: 25px;
margin-left: 3px;
border: 1px solid black;
background: none;
}
select {
width: 96px;
width: 85px;
height: 25px;
margin-left: 3px;
vertical-align: middle;
}
}
.open {
right: 0px;
}
.close {
right: -622px;
}
.bottomCss {
position: absolute;

8
src/app/ui/collection-tools/collection-tools.component.ts

@ -1057,11 +1057,17 @@ export class CollectionToolsComponent implements OnInit {
}
//上传考题
weatherData = {
weather: null,
airTemperature: null,
windScale: null,
windDirection: null
}
openUploadQuestions() {
let treeData = JSON.parse(JSON.stringify(this.dataSource.data))
let nodes = JSON.parse(JSON.stringify(JSON.parse(sessionStorage.getItem('examNodeList'))))
if (nodes) {
let data = { treeData: treeData, question: JSON.parse(JSON.stringify(this.examMsg)), node: nodes, allFireElements: this.allFireElements }
let data = { treeData: treeData, question: JSON.parse(JSON.stringify(this.examMsg)), node: nodes, allFireElements: this.allFireElements, weatherData: this.weatherData }
let dialogRef = this.dialog.open(uploadQuestions, { data });
} else {
const config = new MatSnackBarConfig();

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

@ -183,6 +183,8 @@ export class uploadQuestions {
this.renderData = data
this.getProfiles()
this.nodeInit()
console.log('天气信息', this.data.weatherData)
}
//处理数据 将消防要素模板与真实素材结合
@ -291,7 +293,8 @@ export class uploadQuestions {
score: 0,
examFacilityAssetsData: sessionStorage.getItem('消防设施' + sessionStorage.getItem('paperId')) ? sessionStorage.getItem('消防设施' + sessionStorage.getItem('paperId')) : null,
examDisposalNodesData: sessionStorage.getItem('examNodeList') ? sessionStorage.getItem('examNodeList') : null,
companyId: sessionStorage.getItem('companyId')
companyId: sessionStorage.getItem('companyId'),
weather: JSON.stringify(this.data.weatherData)
}

Loading…
Cancel
Save