Browse Source

[完善]完善演练卡片

非煤矿山灾害智能感知和预警系统
邵佳豪 2 years ago
parent
commit
dc97943f0a
  1. 25
      src/app/home/statistic-analysis/dist/statistic-analysis.component.js
  2. 1
      src/app/home/statistic-analysis/statistic-analysis.component.ts
  3. 25
      src/app/home/system-management/dist/system-management.component.js
  4. 1
      src/app/home/system-management/system-management.component.ts
  5. 375
      src/app/home/task/station-task-execution/dist/station-task-execution.component.js
  6. 3
      src/app/home/task/station-task-execution/station-task-execution.component.ts
  7. 142
      src/app/home/task/station-task-execution/task-details/dist/task-details.component.js
  8. 2617
      src/app/home/task/station-task-execution/task-details/task-details.component.html
  9. 98
      src/app/home/task/station-task-execution/task-details/task-details.component.ts

25
src/app/home/statistic-analysis/dist/statistic-analysis.component.js vendored

@ -0,0 +1,25 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
exports.__esModule = true;
exports.StatisticAnalysisComponent = void 0;
var core_1 = require("@angular/core");
var StatisticAnalysisComponent = /** @class */ (function () {
function StatisticAnalysisComponent() {
}
StatisticAnalysisComponent.prototype.ngOnInit = function () {
};
StatisticAnalysisComponent = __decorate([
core_1.Component({
selector: 'app-statistic-analysis',
templateUrl: './statistic-analysis.component.html',
styleUrls: ['./statistic-analysis.component.scss']
})
], StatisticAnalysisComponent);
return StatisticAnalysisComponent;
}());
exports.StatisticAnalysisComponent = StatisticAnalysisComponent;

1
src/app/home/statistic-analysis/statistic-analysis.component.ts

@ -10,6 +10,7 @@ export class StatisticAnalysisComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

25
src/app/home/system-management/dist/system-management.component.js vendored

@ -0,0 +1,25 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
exports.__esModule = true;
exports.SystemManagementComponent = void 0;
var core_1 = require("@angular/core");
var SystemManagementComponent = /** @class */ (function () {
function SystemManagementComponent() {
}
SystemManagementComponent.prototype.ngOnInit = function () {
};
SystemManagementComponent = __decorate([
core_1.Component({
selector: 'app-system-management',
templateUrl: './system-management.component.html',
styleUrls: ['./system-management.component.scss']
})
], SystemManagementComponent);
return SystemManagementComponent;
}());
exports.SystemManagementComponent = SystemManagementComponent;

1
src/app/home/system-management/system-management.component.ts

@ -12,4 +12,5 @@ export class SystemManagementComponent implements OnInit {
ngOnInit(): void {
}
}

375
src/app/home/task/station-task-execution/dist/station-task-execution.component.js vendored

@ -0,0 +1,375 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
exports.__esModule = true;
exports.StationTaskExecutionComponent = void 0;
var core_1 = require("@angular/core");
var upload_component_1 = require("./upload/upload.component");
var StationTaskExecutionComponent = /** @class */ (function () {
function StationTaskExecutionComponent(router, methodService, fb, modal, viewContainerRef, message, http, toTree) {
this.router = router;
this.methodService = methodService;
this.fb = fb;
this.modal = modal;
this.viewContainerRef = viewContainerRef;
this.message = message;
this.http = http;
this.toTree = toTree;
this.searchForm = {
taskname: '',
unitname: '',
unitlevel: '',
or: ''
};
this.months = [
{ id: 1, name: '1月', isable: true },
{ id: 2, name: '2月', isable: true },
{ id: 3, name: '3月', isable: true },
{ id: 4, name: '4月', isable: true },
{ id: 5, name: '5月', isable: true },
{ id: 6, name: '6月', isable: true },
{ id: 7, name: '7月', isable: true },
{ id: 8, name: '8月', isable: true },
{ id: 9, name: '9月', isable: true },
{ id: 10, name: '10月', isable: true },
{ id: 11, name: '11月', isable: true },
{ id: 12, name: '12月', isable: true }
];
this.selectedYear = 2022;
this.isloading = false;
this.PageNumber = 1;
this.PageSize = 10;
this.taskLIst = [];
this.nodes = [];
//获得所有检查员
this.supervisorList = [];
this.mainsupervisorList = [];
this.assitantsupervisorList = [];
this.ischat = false;
}
StationTaskExecutionComponent.prototype.selectMonth = function (item) {
this.selectedMonth = item.id;
this.getTaskList();
};
StationTaskExecutionComponent.prototype.selectYear = function (e) {
this.selectedYear = e;
this.getTaskList();
};
StationTaskExecutionComponent.prototype.cancel = function (item, type) {
};
StationTaskExecutionComponent.prototype["delete"] = function (item) {
};
StationTaskExecutionComponent.prototype.getTaskList = function () {
var _this = this;
this.isloading = true;
var selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01';
var params = {
Month: selectedTime,
// OrganizationId: this.OrganizationId,
TaskTypes: this.isSupervisor ? ['双随机', '联络指导'] : ['熟悉演练'],
TaskName: this.searchForm.taskname,
CompanyName: this.searchForm.unitname,
SupervisorId: this.isSupervisor ? this.userId : null,
AssistantOrganizationId: this.isSupervisor ? null : this.OrganizationId,
approvalStatuses: ['待检查', '已检查'],
PageNumber: this.PageNumber,
PageSize: this.PageSize
};
this.http.get('/api/PlanTasks', {
params: params
}).subscribe(function (data) {
_this.isloading = false;
console.log('任务申请列表', data);
_this.totalCount = data.totalCount;
_this.taskLIst = __spreadArrays(data.items);
});
};
StationTaskExecutionComponent.prototype.pageChange = function ($event) {
this.PageNumber = $event;
this.getTaskList();
};
StationTaskExecutionComponent.prototype.search = function () {
this.PageNumber = 1;
this.getTaskList();
};
StationTaskExecutionComponent.prototype.reset = function () {
this.PageNumber = 1;
this.searchForm = {
taskname: '',
unitname: '',
unitlevel: '',
or: ''
};
this.getTaskList();
};
StationTaskExecutionComponent.prototype.getAllOrganization = function () {
return __awaiter(this, void 0, void 0, function () {
var params, p;
var _this = this;
return __generator(this, function (_a) {
params = {
PageNumber: 1,
PageSize: 9999
};
p = new Promise(function (resolve, reject) {
_this.http.get('/api/Organizations', {
params: params
}).subscribe(function (data) {
data.items.forEach(function (element) {
element.key = element.id;
element.title = element.name;
element.disableCheckbox = true;
element.selectable = false;
});
_this.organizationListAll = JSON.parse(JSON.stringify(data.items));
_this.organizationList = JSON.parse(JSON.stringify(data.items)).filter(function (item) {
return item.level != 'squadron';
});
resolve(data);
});
});
return [2 /*return*/, p];
});
});
};
StationTaskExecutionComponent.prototype.getSupervisor = function () {
return __awaiter(this, void 0, void 0, function () {
var p;
var _this = this;
return __generator(this, function (_a) {
p = new Promise(function (resolve, reject) {
_this.http.get('/api/Users/Inspectors').subscribe(function (data) {
console.log('检查员列表', data);
data.forEach(function (element) {
element.key = element.id;
element.title = element.name;
element.parentId = element.organizationId;
});
_this.supervisorList = data;
resolve(data);
});
});
return [2 /*return*/, p];
});
});
};
StationTaskExecutionComponent.prototype.getUsers = function () {
return __awaiter(this, void 0, void 0, function () {
var p;
var _this = this;
return __generator(this, function (_a) {
p = new Promise(function (resolve, reject) {
var params = {
OrganizationId: _this.OrganizationId,
OrganizationLevel: 'squadron',
ContainsChildren: true,
PageNumber: 1,
PageSize: 9999
};
_this.http.get('/api/Users', {
params: params
}).subscribe(function (data) {
console.log('用户列表', data.items);
data.items.forEach(function (element) {
element.key = element.id;
element.title = element.name;
element.parentId = element.organizationId;
});
_this.users = data.items;
resolve(data);
});
});
return [2 /*return*/, p];
});
});
};
StationTaskExecutionComponent.prototype.ngOnInit = function () {
var _this = this;
this.userId = JSON.parse(sessionStorage.getItem('userData')).id;
this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId;
this.userId = JSON.parse(sessionStorage.getItem('userData')).id;
var roles = JSON.parse(sessionStorage.getItem('userData')).roles;
var isSupervisor = roles.find(function (item) {
return item.name.indexOf('检查') != -1;
});
isSupervisor ? this.isSupervisor = true : this.isSupervisor = false;
this.selectedMonth = new Date().getMonth() + 1;
this.getTaskList();
Promise.all([this.getAllOrganization(), this.getSupervisor(), this.getUsers()])
.then(function (results) {
if (_this.isSupervisor) {
var arr = __spreadArrays(_this.users, _this.organizationListAll);
_this.nodes = _this.toTree.toTree(JSON.parse(JSON.stringify(arr)));
}
else {
var arr = __spreadArrays(_this.supervisorList, _this.organizationList);
_this.nodes = _this.toTree.toTree(JSON.parse(JSON.stringify(arr)));
}
});
setTimeout(function () {
_this.rollStart();
}, 0);
var t1 = new Date().getTime();
var date = '2022-9-10';
var t2 = Date.parse(date);
// this.methodService.countdown(t1, t2, (res) => {
// // console.log(666, res)
// this.time1 = res.day + '天' + res.hour + '小时'
// })
};
StationTaskExecutionComponent.prototype.rollStart = function () {
var ROLL_SPEED = 100;
var noticeList1 = document.getElementById('notice-list');
var noticeList2 = document.getElementById('notice-list-2');
var listWrapper = document.getElementById('list-wrapper');
noticeList2.innerHTML = noticeList1.innerHTML;
this.timer = setInterval(rollStart, ROLL_SPEED);
function rollStart() {
if (Math.abs(_subStr(listWrapper.style.top)) >= noticeList1.clientHeight) {
listWrapper.style.top = '0px';
}
else {
var top = listWrapper.style.top;
listWrapper.style.top = _subStr(top) - 1 + 'px';
}
}
// 截取px前数值
function _subStr(str) {
var index = str.indexOf('px');
if (index > -1) {
return parseFloat(str.substr(0, index + 1));
}
}
};
StationTaskExecutionComponent.prototype.mouseEnter = function () {
// console.log('进入了')
window.clearInterval(this.timer);
};
StationTaskExecutionComponent.prototype.mouseleave = function () {
this.rollStart();
};
StationTaskExecutionComponent.prototype.ngOnDestroy = function () {
console.log('退出了');
this.mouseEnter();
this.methodService.cleartimer();
};
StationTaskExecutionComponent.prototype.apply = function () {
};
StationTaskExecutionComponent.prototype.look = function (item) {
console.log(item);
this.router.navigate(['/task/taskexecution/taskdetails'], { queryParams: { id: item.id, company: item.company.companyName, organization: item.organization.name } });
};
StationTaskExecutionComponent.prototype.complete = function (item) {
var _this = this;
var modal = this.modal.create({
nzTitle: '完成任务',
nzContent: upload_component_1.UploadComponent,
nzViewContainerRef: this.viewContainerRef,
nzWidth: 450,
nzMaskClosable: false,
nzComponentParams: {
data: item
},
nzOnOk: function () { return __awaiter(_this, void 0, void 0, function () {
var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (!instance.validateForm.valid) return [3 /*break*/, 2];
return [4 /*yield*/, new Promise(function (resolve, reject) {
var body = {
inspectionResult: instance.validateForm.value.result,
resultAttachment: instance.fileList
};
_this.http.patch("/api/PlanTasks/" + item.id, body).subscribe({
next: function (data) {
_this.message.create('success', '已完成');
_this.getTaskList();
resolve(data);
},
error: function (err) {
_this.message.create('warning', '完成失败');
reject(err);
}
});
})];
case 1:
_a.sent();
return [3 /*break*/, 3];
case 2:
this.message.create('warning', '请选择结果!');
return [2 /*return*/, false];
case 3: return [2 /*return*/];
}
});
}); }
});
var instance = modal.getContentComponent();
modal.afterOpen.subscribe(function () { return console.log('[afterOpen] emitted!'); });
modal.afterClose.subscribe(function (result) { return console.log('[afterClose] The result is:', result); });
};
StationTaskExecutionComponent.prototype.openchat = function (item) {
console.log(item);
this.taskId = item.id;
this.ischat = true;
};
StationTaskExecutionComponent.prototype.closechat = function () {
this.ischat = false;
};
StationTaskExecutionComponent = __decorate([
core_1.Component({
selector: 'app-station-task-execution',
templateUrl: './station-task-execution.component.html',
styleUrls: ['./station-task-execution.component.scss']
})
], StationTaskExecutionComponent);
return StationTaskExecutionComponent;
}());
exports.StationTaskExecutionComponent = StationTaskExecutionComponent;

3
src/app/home/task/station-task-execution/station-task-execution.component.ts

@ -278,7 +278,8 @@ export class StationTaskExecutionComponent implements OnInit {
look(item) {
this.router.navigate(['/task/taskexecution/taskdetails'], { queryParams: { id: item.id } })
console.log(item)
this.router.navigate(['/task/taskexecution/taskdetails'], { queryParams: { id: item.id, company: item.company.companyName, organization: item.organization.name } })
}
complete(item) {

142
src/app/home/task/station-task-execution/task-details/dist/task-details.component.js vendored

@ -0,0 +1,142 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
exports.__esModule = true;
exports.TaskDetailsPagesComponent = void 0;
var core_1 = require("@angular/core");
var TaskDetailsPagesComponent = /** @class */ (function () {
function TaskDetailsPagesComponent(methodService, route) {
this.methodService = methodService;
this.route = route;
/**
* 实战演练表格信息
*/
this.exerciseData = {
data: {
people: "",
typeAndAmount: "",
time: "请选择时间",
add: '',
information: "",
situation: "",
data: {
danger: '',
from: [
{
name: '侦查', form: {
// mode: '',
// people: '',
// add: '',
// marshalling: '',
// imgShow: ''
}
},
{
name: '警戒', form: {
// mode: '',
// people: '',
// add: '',
// jingshi: '',
// imgShow: ''
}
},
{
name: '供水', form: {
// mode: '',
// people: '',
// gongshui: '',
// qushuidian: '',
// imgShow: ''
}
},
{
name: '搜救', form: {
// mode: '',
// people: '',
// add: '',
// jingshi: '',
// imgShow: ''
}
},
{
name: '排烟', form: {
// mode: '',
// people: '',
// add: '',
// paiyan: '',
// imgShow: ''
}
},
{
name: '灭火', form: {
// mode: '',
// people: '',
// add: '',
// jingshi: '',
// imgShow: ''
}
},
{
name: '照明', form: {
// mode: '',
// people: '',
// zhaoming: '',
// imgShow: ''
}
},
{
name: '撤离', form: {
// cheliluxian: '',
// chelixinhao: '',
// imgShow: ''
}
},
{
name: '讲评', form: {
// jiangpingren: '',
// qingdian: '',
// haode: '',
// buzu: '',
// imgShow: ''
}
}
]
},
vehicleType: []
}
};
this.xxx = true;
this.yyy = [1];
}
TaskDetailsPagesComponent.prototype.ngOnInit = function () {
var _this = this;
this.company = this.route.snapshot.queryParams.company;
this.organization = JSON.parse(sessionStorage.getItem('userData')).organizationName;
var taskId = this.route.snapshot.queryParams.id;
this.methodService.getTaskDetails(taskId).then(function (data) {
var obj = JSON.parse(data.resultData);
_this.exerciseData = _this.methodService.getTaskDetailsItem('实战演练', obj.form);
console.log('实战演练详情', _this.exerciseData);
_this.planData = _this.methodService.getTaskDetailsItem('数字化预案', obj.form);
});
};
TaskDetailsPagesComponent.prototype.goback = function () {
window.history.back();
};
TaskDetailsPagesComponent.prototype.download = function (type) {
type == 1 ? $("#tablebox").wordExport('演练卡') : $("#tablebox2").wordExport('数字化预案');
};
TaskDetailsPagesComponent = __decorate([
core_1.Component({
selector: 'app-task-details',
templateUrl: './task-details.component.html',
styleUrls: ['./task-details.component.scss']
})
], TaskDetailsPagesComponent);
return TaskDetailsPagesComponent;
}());
exports.TaskDetailsPagesComponent = TaskDetailsPagesComponent;

2617
src/app/home/task/station-task-execution/task-details/task-details.component.html

File diff suppressed because it is too large Load Diff

98
src/app/home/task/station-task-execution/task-details/task-details.component.ts

@ -17,16 +17,95 @@ export class TaskDetailsPagesComponent implements OnInit {
*/
exerciseData: any = {
data: {
people: "",
typeAndAmount: "",
time: "请选择时间",
add: '',
information: "",
situation: "",//消防设施使用情况
data: {
form: []
danger: '',
from: [
{
name: '侦查', form: {
// mode: '',
// people: '',
// add: '',
// marshalling: '',
// imgShow: ''
}
},
{
name: '警戒', form: {
// mode: '',
// people: '',
// add: '',
// jingshi: '',
// imgShow: ''
}
},
{
name: '供水', form: {
// mode: '',
// people: '',
// gongshui: '',
// qushuidian: '',
// imgShow: ''
}
},
{
name: '搜救', form: {
// mode: '',
// people: '',
// add: '',
// jingshi: '',
// imgShow: ''
}
},
{
name: '排烟', form: {
// mode: '',
// people: '',
// add: '',
// paiyan: '',
// imgShow: ''
}
},
{
name: '灭火', form: {
// mode: '',
// people: '',
// add: '',
// jingshi: '',
// imgShow: ''
}
},
{
name: '照明', form: {
// mode: '',
// people: '',
// zhaoming: '',
// imgShow: ''
}
},
{
name: '撤离', form: {
// cheliluxian: '',
// chelixinhao: '',
// imgShow: ''
}
},
{
name: '讲评', form: {
// jiangpingren: '',
// qingdian: '',
// haode: '',
// buzu: '',
// imgShow: ''
}
}
]
},
index: 2,
information: "",
people: "",
situation: "",
time: "请选择时间",
typeAndAmount: "",
vehicleType: []
}
}
@ -35,9 +114,12 @@ export class TaskDetailsPagesComponent implements OnInit {
*/
planData: any
company: string
organization: string
ngOnInit(): void {
this.company = this.route.snapshot.queryParams.company
this.organization = JSON.parse(sessionStorage.getItem('userData')).organizationName
let taskId = this.route.snapshot.queryParams.id
this.methodService.getTaskDetails(taskId).then((data: any) => {
let obj = JSON.parse(data.resultData)

Loading…
Cancel
Save