pengwei
2025-04-21 7bbf1a9df53f5fe1c6c419304460ceec5b7a3629
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<template>
  <div class="Largescreen">
    <div
      style="
        display: flex;
        justify-content: center;
        color: #fff;
        font-size: 5rem;
      "
    >
      检一道检修监控
    </div>
    <div
      style="
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        color: #fff;
        font-size: 3rem;
        margin-top: 3rem;
      "
    >
      <span>股道电源状态</span>
      <div
        style="
          width: 8rem;
          height: 8rem;
          border-radius: 50% 50%;
          margin-top: 2rem;
        "
        :class="true ? 'shadow' : ''"
      >
        <img
          style="width: 8rem; height: 8rem"
          src="@/assets/TheCurrentJob/pouer.png"
          alt=""
        />
      </div>
    </div>
    <!-- <div
      style="
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        color: #fff;
        font-size: 3rem;
       
      "
    >
      <span>管理人员状态</span>
    </div> -->
    <div
      style="
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        margin-top: 10%;
        padding-bottom: 10%;
        border: 0.15rem solid #fff;
        height: 70%;
        box-sizing: border-box;
      "
    >
      <span style="color: #fff; font-size: 3rem; margin-top: 2rem"
        >检修人员状态</span
      >
 
      <div
        style="
          display: flex;
          width: 100%;
          justify-content: center;
          flex-direction: column;
          align-items: center;
          text-align: right;
          margin-top: 3rem;
        "
      >
        <div style="color: #fff; font-size: 3rem; width: 90%">
          正在检修人员数量:
          <span style="font-size: 4rem">{{ totalCount }}</span
          >位
        </div>
        <div style="width: 90%; margin-top: 2rem">
          <el-table
            empty-text="暂无数据"
            :data="tableData"
            style="width: 100%"
            :header-cell-style="{
              height: '1.61rem',
              color: '#1AC8FE',
              background: '#0A5B91',
              fontSize: '0.88rem',
            }"
            :cell-style="{
              color: '#fff',
              background: '#147BAF',
            }"
          >
            <el-table-column
              prop="userTrueName"
              label="姓名"
              align="center"
              min-width="1%"
            />
            <el-table-column
              prop="userteam"
              label="单位"
              align="center"
              min-width="1%"
            />
            <el-table-column prop="userteam" label="班组" min-width="1%" />
            <el-table-column
              prop="maintenanceStatus"
              label="检修状态"
              align="center"
              min-width="1%"
            >
              <template #default="scope">
                <span v-if="scope.row.maintenanceStatus === 0">未开始</span>
                <span v-else-if="scope.row.maintenanceStatus === 1"
                  >进行中</span
                >
                <span v-else-if="scope.row.maintenanceStatus === 2"
                  >已结束</span
                ></template
              >
            </el-table-column>
            <el-table-column
              prop="maintenanceDate"
              label="日期"
              align="center"
              min-width="2%"
            />
          </el-table>
        </div>
      </div>
    </div>
  </div>
</template>
<script setup>
import { onMounted, reactive, ref, toRef } from "vue";
import { PersonnelMonitoring } from "@/api/newapi/Maintenance";
 
const tableData = ref([]);
const pageTotal = ref(0);
const totalCount = ref(0);
//分页请求参数
const pageQuery = ref({
  page: 1, //当前页面
  rows: 20, //每页显示条数
  order: "desc", //排序方式
  sort: "", //排序字段
  wheres: "", //条件查询
});
const obj = {
  selectType: "",
  inputcontent: "",
};
const queryForm = toRef({ ...obj });
const initData = () => {
  PersonnelMonitoring({
    pageIndex: pageQuery.value.page,
    pageSize: pageQuery.value.rows,
    searchKeyword: queryForm.value.inputcontent,
    status: queryForm.value.selectType,
  }).then((res) => {
    tableData.value = res.data.items;
    pageTotal.value = res.data.totalCount;
    totalCount.value = res.data.items.filter(
      (v) => v.maintenanceStatus == 1
    ).length;
  });
};
onMounted(() => {
  initData();
});
</script>
<style lang="scss" scoped>
.Largescreen {
  display: flex;
  flex-direction: column;
  background-color: rgba($color: #000000, $alpha: 0.2);
  .shadow {
    box-shadow: 0px 0px 1rem 0.5rem rgb(18, 150, 219);
  }
}
</style>