From 60e60cc647fe696a68f211d25d563d677f8b27c2 Mon Sep 17 00:00:00 2001
From: batman <978517621@qq.com>
Date: Wed, 08 Mar 2023 10:54:48 +0800
Subject: [PATCH] 新修改添加页面
---
src/views/specialWorkSystem/specialIndex/index.vue | 165 +++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 125 insertions(+), 40 deletions(-)
diff --git a/src/views/specialWorkSystem/specialIndex/index.vue b/src/views/specialWorkSystem/specialIndex/index.vue
index e7f696e..9f747d8 100644
--- a/src/views/specialWorkSystem/specialIndex/index.vue
+++ b/src/views/specialWorkSystem/specialIndex/index.vue
@@ -1,5 +1,8 @@
<template>
<div class="home-container">
+ <div class="full">
+ 全屏
+ </div>
<div class="topChart">
<div class="chart-item">
<div class="chart-tit">
@@ -50,7 +53,6 @@
<div class="filter-part">
<el-switch
v-model="chartSearch4.type"
- class="ml-2"
inline-prompt
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #13ce66"
active-text="作业人"
@@ -70,17 +72,18 @@
:value="item.id"
/>
</el-select>
+ <el-button type="text" size="small">所有记录>></el-button>
</div>
</div>
<div class="chart">
<el-table ref="multipleTableRef" :data="warningData" style="width: 100%" :header-cell-style="{ background: '#fafafa' }">
<el-table-column property="name" label="姓名" width="180" align="center"/>
- <el-table-column property="depName" label="所属部门" align="center"/>
- <el-table-column property="applyUname" label="异常报警次数" align="center"/>
- <el-table-column property="operators" label="角色" align="center"/>
- <el-table-column label="是否持证" align="center" width="180">
+ <el-table-column property="dep" label="所属部门" align="center"/>
+ <el-table-column property="warning" label="异常报警次数" align="center"/>
+ <el-table-column property="role" label="角色" align="center"/>
+ <el-table-column property="isCard" label="是否持证" align="center" width="180">
<template #default="scope">
- <el-tag :type="scope.row.status==2?'success':(scope.row.status==8||scope.row.status==9)?'warning':'danger'">{{ scope.row.statusDesc }}</el-tag>
+ <span>{{scope.row.isCard == 1?'是':'否'}}</span>
</template>
</el-table-column>
</el-table>
@@ -88,13 +91,13 @@
<!-- <div class="chart" :id="slfx"></div>-->
</div>
</div>
- <div style="height: 100%">
+ <div>
<div class="homeCard">
<el-row>
<el-col :span="5" style="display:flex;align-items: center">
<span style="white-space: nowrap">作业类型:</span>
<div class="grid-content topInfo">
- <el-select v-model="searchWord">
+ <el-select v-model="searchWord" size="small">
<el-option
v-for="item in workType"
:key="item.id"
@@ -107,7 +110,7 @@
<el-col :span="5" style="display:flex;align-items: center">
<span style="white-space: nowrap">作业状态:</span>
<div class="grid-content topInfo">
- <el-select v-model="searchStatus">
+ <el-select v-model="searchStatus" size="small">
<el-option
v-for="item in workStatus"
:key="item.value"
@@ -120,7 +123,7 @@
<el-col :span="5" style="display:flex;align-items: center">
<span style="white-space: nowrap">作业部门:</span>
<div class="grid-content topInfo">
- <el-cascader v-model="searchDep" :options="departmentList" :props="casProps" :show-all-levels="false"/>
+ <el-cascader size="small" v-model="searchDep" :options="departmentList" :props="casProps" :show-all-levels="false"/>
</div>
</el-col>
<el-col :span="6" style="display:flex;align-items: center;">
@@ -128,6 +131,7 @@
<div class="grid-content topInfo">
<el-date-picker
v-model="searchDate"
+ size="small"
type="daterange"
unlink-panels
range-separator="至"
@@ -137,8 +141,8 @@
/>
</div>
</el-col>
- <el-button type="primary" style="margin-left: 20px" @click="searchRecord">查询</el-button>
- <el-button plain @click="clearSearch">重置</el-button>
+ <el-button type="primary" style="margin-left: 20px" @click="searchRecord" size="small">查询</el-button>
+ <el-button plain @click="clearSearch" size="small">重置</el-button>
</el-row>
<div class="main-card">
<el-row class="cardTop" style="justify-content: space-between">
@@ -163,31 +167,38 @@
<el-button type="primary" :icon="Refresh" size="default" @click="reLoadData()" />
</el-col>
</el-row>
- <el-table ref="multipleTableRef" :data="applyData" style="width: 100%" :header-cell-style="{ background: '#fafafa' }">
- <el-table-column property="workPermitNo" label="作业证编号" width="180" align="center"/>
- <el-table-column property="depName" label="部门" align="center"/>
- <el-table-column property="applyUname" label="申请人" align="center"/>
- <el-table-column property="operators" label="作业人" align="center"/>
- <el-table-column property="workTypeDesc" label="作业类型" align="center"/>
- <el-table-column property="workLevelDesc" label="作业等级" align="center"/>
- <el-table-column property="applyTime" label="申请时间" width="180" align="center"/>
- <el-table-column property="startTime" label="作业开始时间" width="180" align="center"/>
- <el-table-column property="endTime" label="作业结束时间" width="180" align="center"/>
- <el-table-column label="作业状态" align="center" width="180">
+ <el-table ref="multipleTableRef" :data="workData" style="width: 100%" :header-cell-style="{ background: '#fafafa' }">
+ <el-table-column property="num" label="作业证编号" width="180" align="center"/>
+ <el-table-column property="dep" label="部门" align="center"/>
+ <el-table-column property="applyer" label="申请人" align="center"/>
+ <el-table-column property="worker" label="作业人" align="center"/>
+ <el-table-column property="type" label="作业类型" align="center"/>
+ <el-table-column property="level" label="作业等级" align="center"/>
+ <el-table-column property="applyTime" label="申请时间" align="center"/>
+ <el-table-column property="startTime" label="作业开始时间" align="center"/>
+ <el-table-column property="endTime" label="作业结束时间" align="center"/>
+ <el-table-column label="作业状态" align="center">
<template #default="scope">
- <el-tag :type="scope.row.status==2?'success':(scope.row.status==8||scope.row.status==9)?'warning':'danger'">{{ scope.row.statusDesc }}</el-tag>
+ <el-tag>{{ scope.row.status==0?'进行中':scope.row.status==1?'作业中止':scope.row.status==2?'作业结束验收': '作业完成'}}</el-tag>
</template>
</el-table-column>
- <el-table-column property="stopReason" label="中止原因" align="center"/>
- <el-table-column label="安全预警" align="center" width="180">
+ <el-table-column property="reason" label="中止原因" align="center"/>
+ <el-table-column label="安全预警" align="center">
<template #default="scope">
- <el-tag :type="scope.row.saftyWarning==0?'success':(scope.row.saftyWarning==1||scope.row.saftyWarning==2)?'warning':'danger'">{{ scope.row.saftyWarning==0?'正常':'报警' }}</el-tag>
+ <el-tag :type="scope.row.warning==0?'success':(scope.row.warning==1||scope.row.warning==2)?'warning':'danger'">{{ scope.row.warning==0?'正常':'报警' }}</el-tag>
</template>
</el-table-column>
+ <el-table-column property="message" label="报警信息" align="center">
+ <template #default="scope">
+ <el-button type="text" size="small" v-if="scope.row.message == 1">查看报警信息</el-button>
+ <span v-else>无</span>
+ </template>
+ </el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="250">
<template #default="scope">
- <el-button link type="primary" size="small" :icon="View" @click="viewRecord(scope.row)">查看</el-button>
- <el-button link type="primary" size="small" :icon="FolderChecked" @click="handleReview(scope.row)">验收</el-button>
+ <el-button link type="primary" size="small" :icon="View" @click="viewRecord(scope.row)">查看作业票</el-button>
+ <el-button link type="primary" size="small" :icon="FolderChecked" @click="handleReview(scope.row)">验收</el-button>
+ <el-button link type="primary" size="small" :icon="FolderChecked" @click="handleReview(scope.row)">查看实时监控</el-button>
</template>
</el-table-column>
</el-table>
@@ -253,7 +264,7 @@
// 定义接口来定义对象的类型
interface stateType {
- applyData: Array<string>;
+ workData: Array<any>;
workTimeList: Array<string>;
multipleSelection: Array<any>;
casProps: {};
@@ -282,6 +293,7 @@
workStatus: Array<status>;
reviewForm: object;
reviewRules: object;
+ warningData: Array<any>;
}
interface type {
id: number;
@@ -348,7 +360,53 @@
searchDep2: null,
searchDep: null,
searchDate: [],
- applyData: [],
+ workData: [
+ {
+ num: '111',
+ dep: '部门1',
+ applyer: '张凤',
+ worker: '李羽飞',
+ type: '动火作业',
+ level: '一级',
+ applyTime: '2023-03-08',
+ startTime: '2023-03-08',
+ endTime: '2023-03-08',
+ status: 0,
+ reason: '分析超时',
+ warning: 0,
+ message: 1
+ },
+ {
+ num: '222',
+ dep: '部门2',
+ applyer: '张凤',
+ worker: '李羽飞',
+ type: '动土作业',
+ level: '一级',
+ applyTime: '2023-03-08',
+ startTime: '2023-03-08',
+ endTime: '2023-03-08',
+ status: 1,
+ reason: '分析超时',
+ warning: 1,
+ message: 0
+ },
+ {
+ num: '333',
+ dep: '部门3',
+ applyer: '张凤',
+ worker: '李羽飞',
+ type: '动火作业',
+ level: '一级',
+ applyTime: '2023-03-08',
+ startTime: '2023-03-08',
+ endTime: '2023-03-08',
+ status: 2,
+ reason: '分析超时',
+ warning: 2,
+ message: 0
+ }
+ ],
workTimeList: [],
multipleSelection: [],
approveInfo: {
@@ -401,6 +459,22 @@
{
name: '作业完成',
value: 3
+ }
+ ],
+ warningData: [
+ {
+ name: '黄公子',
+ dep: '有机事业部',
+ warning: 69,
+ role: '作业人',
+ isCard: 1
+ },
+ {
+ name: '李飞飞',
+ dep: '有机事业部',
+ warning: 51,
+ role: '监护人',
+ isCard: 0
}
],
reviewForm: {
@@ -497,7 +571,7 @@
xAxis: [
{
type: 'category',
- data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
+ data: ['事业部1', '事业部2', '事业部3', '事业部4', '事业部5', '事业部6', '事业部7'],
axisTick: {
alignWithLabel: true
}
@@ -585,8 +659,8 @@
const data = { pageSize: state.pageSize1, pageIndex: state.pageIndex1, searchParams: { workType: state.searchWord, applyDepId: state.searchDep,applyStartTime: dateRange[0],applyEndTime: dateRange[1]} };
let res = await workApplyApi().getApplyList(data);
if (res.data.code === '200') {
- state.applyData = JSON.parse(JSON.stringify(res.data.data));
- state.applyData = state.applyData.map((item) => {
+ state.workData = JSON.parse(JSON.stringify(res.data.data));
+ state.workData = state.workData.map((item) => {
if (item.operators == null || item.operators == []) {
item.operators = [];
} else {
@@ -744,8 +818,16 @@
$homeNavLengh: 8;
.home-container {
height: calc(100vh - 144px);
+ position: relative;
box-sizing: border-box;
overflow: hidden;
+ overflow-y: scroll;
+ scrollbar-width: none; /* firefox */
+ -ms-overflow-style: none; /* IE 10+ */
+
+ &::-webkit-scrollbar {
+ display: none; /* Chrome Safari */
+ }
.demo-tabs {
width: 100%;
height: 100%;
@@ -765,6 +847,9 @@
align-items: flex-start;
margin-bottom: 20px;
height: 40%;
+ &:last-of-type{
+ margin-bottom: 0;
+ }
.chart-item{
width: calc(50% - 10px);
@@ -784,7 +869,7 @@
align-items: flex-start;
justify-content: space-between;
.tit{
- font-size: 16px;
+ font-size: 1.33rem;
font-weight: bolder;
}
.filter-part{
@@ -861,12 +946,12 @@
.top-info {
display: flex;
- font-size: 16px;
+ font-size: 14px;
font-weight: bolder;
align-items: center;
- padding: 6px 10px;
+ padding: 4px 10px;
background: #ffeb87;
- border-radius: 4px;
+ border-radius: 2px;
border: 1px solid #ffae00;
margin-right: 20px;
@@ -874,7 +959,7 @@
vertical-align: middle;
white-space: nowrap;
span {
- font-size: 22px;
+ font-size: 18px;
color: #f3001e;
margin: 0 2px;
cursor: pointer;
@@ -1103,7 +1188,7 @@
.el-row {
display: flex;
align-items: center;
- margin-bottom: 20px;
+ margin-bottom: 10px;
&:last-child {
margin-bottom: 0;
}
--
Gitblit v1.9.2