|
@@ -9,8 +9,12 @@
|
|
|
<!-- 统计卡片 -->
|
|
<!-- 统计卡片 -->
|
|
|
<el-row :gutter="18" class="mb-4">
|
|
<el-row :gutter="18" class="mb-4">
|
|
|
<el-col :span="4">
|
|
<el-col :span="4">
|
|
|
- <div style="background-color: #fff; border-radius: 10px">
|
|
|
|
|
- <div class="stat-card bg-blue-gradient">
|
|
|
|
|
|
|
+ <div style="border-radius: 10px">
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="stat-card bg-blue-gradient"
|
|
|
|
|
+ :style="{ border: statusList.all ? '2px solid #0050b3' : '' }"
|
|
|
|
|
+ @click="getList('all')"
|
|
|
|
|
+ >
|
|
|
<Icon icon="ep:histogram" :size="40" />
|
|
<Icon icon="ep:histogram" :size="40" />
|
|
|
<div class="card-title">工单数量</div>
|
|
<div class="card-title">工单数量</div>
|
|
|
<div class="card-value pt-5">{{
|
|
<div class="card-value pt-5">{{
|
|
@@ -21,7 +25,11 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="4">
|
|
<el-col :span="4">
|
|
|
- <div style="background-color: #fff; border-radius: 10px">
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ style="border-radius: 10px"
|
|
|
|
|
+ @click="getList('finished')"
|
|
|
|
|
+ :style="{ border: statusList.finished ? '2px solid #0050b3' : '' }"
|
|
|
|
|
+ >
|
|
|
<div class="stat-card bg-green-gradient">
|
|
<div class="stat-card bg-green-gradient">
|
|
|
<Icon icon="ep:finished" :size="40" />
|
|
<Icon icon="ep:finished" :size="40" />
|
|
|
<div class="card-title">完成数量</div>
|
|
<div class="card-title">完成数量</div>
|
|
@@ -31,7 +39,11 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="4">
|
|
<el-col :span="4">
|
|
|
- <div style="background-color: #fff; border-radius: 10px">
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ style="border-radius: 10px"
|
|
|
|
|
+ @click="getList('todo')"
|
|
|
|
|
+ :style="{ border: statusList.todo ? '2px solid #0050b3' : '' }"
|
|
|
|
|
+ >
|
|
|
<div class="stat-card bg-orange-gradient">
|
|
<div class="stat-card bg-orange-gradient">
|
|
|
<Icon icon="ep:more-filled" :size="40" />
|
|
<Icon icon="ep:more-filled" :size="40" />
|
|
|
<div class="card-title">未完成数量</div>
|
|
<div class="card-title">未完成数量</div>
|
|
@@ -41,7 +53,11 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="4">
|
|
<el-col :span="4">
|
|
|
- <div style="background-color: #fff; border-radius: 10px">
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ style="border-radius: 10px"
|
|
|
|
|
+ @click="getList('ignore')"
|
|
|
|
|
+ :style="{ border: statusList.ignore ? '2px solid #0050b3' : '' }"
|
|
|
|
|
+ >
|
|
|
<div class="stat-card bg-green-gradient">
|
|
<div class="stat-card bg-green-gradient">
|
|
|
<Icon icon="ep:hide" :size="40" />
|
|
<Icon icon="ep:hide" :size="40" />
|
|
|
<div class="card-title">已忽略</div>
|
|
<div class="card-title">已忽略</div>
|
|
@@ -51,7 +67,7 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="4">
|
|
<el-col :span="4">
|
|
|
- <div style="background-color: #fff; border-radius: 10px">
|
|
|
|
|
|
|
+ <div style="border-radius: 10px">
|
|
|
<div class="stat-card bg-red-gradient">
|
|
<div class="stat-card bg-red-gradient">
|
|
|
<Icon icon="ep:bell" :size="40" />
|
|
<Icon icon="ep:bell" :size="40" />
|
|
|
<div class="card-title">异常设备数量</div>
|
|
<div class="card-title">异常设备数量</div>
|
|
@@ -61,8 +77,11 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="4">
|
|
<el-col :span="4">
|
|
|
- <div style="background-color: #fff; border-radius: 10px">
|
|
|
|
|
- <div class="stat-card bg-warn-gradient">
|
|
|
|
|
|
|
+ <div style="border-radius: 10px" @click="getExceptionPoint">
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="stat-card bg-warn-gradient"
|
|
|
|
|
+ :style="{ border: statusList.exceptionPoint ? '2px solid #0050b3' : '' }"
|
|
|
|
|
+ >
|
|
|
<Icon icon="ep:info-filled" :size="40" />
|
|
<Icon icon="ep:info-filled" :size="40" />
|
|
|
<div class="card-title">异常点数量</div>
|
|
<div class="card-title">异常点数量</div>
|
|
|
<div class="card-value pt-5">{{ exceptionPoint.value }}</div>
|
|
<div class="card-value pt-5">{{ exceptionPoint.value }}</div>
|
|
@@ -84,6 +103,7 @@
|
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
|
<ContentWrap style="border: 0; margin-top: 10px">
|
|
<ContentWrap style="border: 0; margin-top: 10px">
|
|
|
<el-table
|
|
<el-table
|
|
|
|
|
+ v-if="!isExceptionPoint"
|
|
|
v-loading="loading"
|
|
v-loading="loading"
|
|
|
:row-class-name="tableRowClassName"
|
|
:row-class-name="tableRowClassName"
|
|
|
:data="list"
|
|
:data="list"
|
|
@@ -103,8 +123,8 @@
|
|
|
min-width="300"
|
|
min-width="300"
|
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
- <el-table-column label="项目" align="center" prop="project" min-width="110" />
|
|
|
|
|
<el-table-column label="公司" align="center" prop="company" min-width="110" />
|
|
<el-table-column label="公司" align="center" prop="company" min-width="110" />
|
|
|
|
|
+ <el-table-column label="项目" align="center" prop="project" min-width="110" />
|
|
|
|
|
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
:label="t('route.orderType')"
|
|
:label="t('route.orderType')"
|
|
@@ -123,6 +143,14 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ v-if="statusList.ignore"
|
|
|
|
|
+ label="忽略原因"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ prop="reason"
|
|
|
|
|
+ min-width="110"
|
|
|
|
|
+ />
|
|
|
|
|
+
|
|
|
<el-table-column label="设备明细" align="center" prop="deviceInfo" min-width="110" />
|
|
<el-table-column label="设备明细" align="center" prop="deviceInfo" min-width="110" />
|
|
|
|
|
|
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -161,12 +189,40 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
+ <!-- 巡检异常点 -->
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ v-else
|
|
|
|
|
+ v-loading="loading"
|
|
|
|
|
+ :data="list2"
|
|
|
|
|
+ :stripe="true"
|
|
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-table-column :label="t('iotDevice.serial')" width="70" align="center">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ {{ scope.$index + 1 }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column :label="t('bomList.name')" align="center" prop="orderName" />
|
|
|
|
|
+ <el-table-column :label="t('iotDevice.code')" align="center" prop="deviceCode" />
|
|
|
|
|
+ <el-table-column :label="t('monitor.deviceName')" align="center" prop="deviceName" />
|
|
|
|
|
+ <el-table-column :label="t('operationFill.duty')" align="center" prop="charge" />
|
|
|
|
|
+ <el-table-column :label="t('inspect.InspectionItems')" align="center" prop="item" />
|
|
|
|
|
+ <el-table-column :label="t('inspect.isException')" align="center" prop="ifNormal">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <span v-if="scope.row.ifNormal" style="color: dodgerblue">正常</span>
|
|
|
|
|
+ <span v-else-if="scope.row.ifNormal === null" style="color: #101010">待填写</span>
|
|
|
|
|
+ <span v-else-if="!scope.row.ifNormal" style="color: orangered">异常</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column :label="t('inspect.exceptionDes')" align="center" prop="description" />
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+
|
|
|
<!-- 分页 -->
|
|
<!-- 分页 -->
|
|
|
<Pagination
|
|
<Pagination
|
|
|
:total="total"
|
|
:total="total"
|
|
|
v-model:page="queryParams.pageNo"
|
|
v-model:page="queryParams.pageNo"
|
|
|
v-model:limit="queryParams.pageSize"
|
|
v-model:limit="queryParams.pageSize"
|
|
|
- @pagination="getList"
|
|
|
|
|
|
|
+ @pagination="getAllList"
|
|
|
/>
|
|
/>
|
|
|
</ContentWrap>
|
|
</ContentWrap>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -177,6 +233,8 @@
|
|
|
import { IotInspectOrderApi, IotInspectOrderVO } from '@/api/pms/inspect/order'
|
|
import { IotInspectOrderApi, IotInspectOrderVO } from '@/api/pms/inspect/order'
|
|
|
import { DICT_TYPE } from '@/utils/dict'
|
|
import { DICT_TYPE } from '@/utils/dict'
|
|
|
import DeptTree from '@/views/system/user/DeptTree.vue'
|
|
import DeptTree from '@/views/system/user/DeptTree.vue'
|
|
|
|
|
+import { IotInspectItemVO, IotInspectOrderDetailApi } from '@/api/pms/inspect/order/detail'
|
|
|
|
|
+
|
|
|
import { watch } from 'vue'
|
|
import { watch } from 'vue'
|
|
|
|
|
|
|
|
const { push } = useRouter()
|
|
const { push } = useRouter()
|
|
@@ -191,6 +249,15 @@ const deptId = params.deptId
|
|
|
const createTime = params.createTime
|
|
const createTime = params.createTime
|
|
|
const total = ref(0) // 列表的总页数
|
|
const total = ref(0) // 列表的总页数
|
|
|
|
|
|
|
|
|
|
+const statusList = ref({
|
|
|
|
|
+ all: false,
|
|
|
|
|
+ exception: false,
|
|
|
|
|
+ exceptionPoint: false,
|
|
|
|
|
+ finished: false,
|
|
|
|
|
+ ignore: false,
|
|
|
|
|
+ todo: false
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
let dateType = ref('year')
|
|
let dateType = ref('year')
|
|
|
const queryParams = reactive({
|
|
const queryParams = reactive({
|
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
@@ -234,10 +301,49 @@ const handleRowClick = (row, column: any, event: Event) => {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+let isExceptionPoint = ref(false)
|
|
|
|
|
+const list2 = ref<IotInspectItemVO[]>([]) // 列表的数据
|
|
|
|
|
+
|
|
|
|
|
+const getPointList = async () => {
|
|
|
|
|
+ loading.value = true
|
|
|
|
|
+ try {
|
|
|
|
|
+ queryParams.status = '异常'
|
|
|
|
|
+ const data = await IotInspectOrderDetailApi.getIotInspectItemStatusPage(queryParams)
|
|
|
|
|
+ list2.value = data.list
|
|
|
|
|
+ total.value = data.total
|
|
|
|
|
+ } finally {
|
|
|
|
|
+ loading.value = false
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const getExceptionPoint = () => {
|
|
|
|
|
+ Object.keys(statusList.value).forEach((key) => {
|
|
|
|
|
+ statusList.value[key] = false
|
|
|
|
|
+ })
|
|
|
|
|
+ statusList.value['exceptionPoint'] = true
|
|
|
|
|
+
|
|
|
|
|
+ isExceptionPoint.value = true
|
|
|
|
|
+ getPointList()
|
|
|
|
|
+}
|
|
|
/** 查询列表 */
|
|
/** 查询列表 */
|
|
|
-const getList = async () => {
|
|
|
|
|
|
|
+const getList = async (status: string = 'all') => {
|
|
|
|
|
+ isExceptionPoint.value = false
|
|
|
|
|
+ Object.keys(statusList.value).forEach((key) => {
|
|
|
|
|
+ statusList.value[key] = false
|
|
|
|
|
+ })
|
|
|
|
|
+ statusList.value[status] = true
|
|
|
loading.value = true
|
|
loading.value = true
|
|
|
try {
|
|
try {
|
|
|
|
|
+ if (status === 'all') {
|
|
|
|
|
+ queryParams.status = undefined
|
|
|
|
|
+ } else if (status === 'todo') {
|
|
|
|
|
+ queryParams.status = 'todo'
|
|
|
|
|
+ } else if (status === 'finished') {
|
|
|
|
|
+ queryParams.status = 'finished'
|
|
|
|
|
+ } else if (status === 'ignore') {
|
|
|
|
|
+ queryParams.status = 'ignore'
|
|
|
|
|
+ }
|
|
|
const data = await IotInspectOrderApi.getIotInspectOrderList(queryParams)
|
|
const data = await IotInspectOrderApi.getIotInspectOrderList(queryParams)
|
|
|
list.value = data.list
|
|
list.value = data.list
|
|
|
total.value = data.total
|
|
total.value = data.total
|
|
@@ -246,6 +352,14 @@ const getList = async () => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const getAllList = async () => {
|
|
|
|
|
+ if (isExceptionPoint.value) {
|
|
|
|
|
+ await getPointList()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ await getList()
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
watch(
|
|
watch(
|
|
|
dateType,
|
|
dateType,
|
|
|
() => {
|
|
() => {
|
|
@@ -402,6 +516,7 @@ onMounted(() => {
|
|
|
box-shadow 0.3s ease;
|
|
box-shadow 0.3s ease;
|
|
|
backdrop-filter: blur(12px);
|
|
backdrop-filter: blur(12px);
|
|
|
height: 200px;
|
|
height: 200px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
}
|
|
|
.stat-card::before {
|
|
.stat-card::before {
|
|
|
position: absolute;
|
|
position: absolute;
|