✨ feat: 任务状态字典展示
This commit is contained in:
@@ -9,9 +9,16 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<div style="display: flex;">
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<div style="display: flex;">
|
||||||
<div class="card" @click="handleVideoCameraFilled(item)" v-for="item in deviceList" :key="item.deviceId">
|
<div class="card" @click="handleVideoCameraFilled(item)" v-for="item in deviceList" :key="item.deviceId">
|
||||||
<div class="card-image"></div>
|
<div class="card-image">
|
||||||
|
<img :src="item.url" :alt="item.url" style="width: 100%; height: 100%;" />
|
||||||
|
<!-- <div style="width: 100%; height: 100%;">
|
||||||
|
{{ item.url }}
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
<div class="category"><dict-tag :options="device_type" :value="item.type"/></div>
|
<div class="category"><dict-tag :options="device_type" :value="item.type"/></div>
|
||||||
<div class="heading">
|
<div class="heading">
|
||||||
{{ item.ip }}
|
{{ item.ip }}
|
||||||
@@ -19,6 +26,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
||||||
@@ -94,6 +107,8 @@ getList();
|
|||||||
background-color: rgb(236, 236, 236);
|
background-color: rgb(236, 236, 236);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 130px;
|
height: 130px;
|
||||||
|
text-align: center;
|
||||||
|
word-break: break-all;
|
||||||
border-radius: 6px 6px 0 0;
|
border-radius: 6px 6px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="任务状态" prop="status">
|
<el-form-item label="任务状态" prop="status">
|
||||||
<el-select v-model="queryParams.status" placeholder="请选择任务状态" clearable>
|
<el-select v-model="queryParams.status" placeholder="请选择任务状态" clearable>
|
||||||
<el-option label="启用" value="0" />
|
<el-option v-for="dict in task_status" :key="dict.value" :label="dict.label" :value="dict.value"/>
|
||||||
<el-option label="停用" value="1" />
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -80,7 +79,7 @@
|
|||||||
<el-table-column label="巡检时长(秒)" align="center" prop="duration" />
|
<el-table-column label="巡检时长(秒)" align="center" prop="duration" />
|
||||||
<el-table-column label="任务状态" align="center" prop="status">
|
<el-table-column label="任务状态" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="sys_normal_disable" :value="scope.row.status"/>
|
<dict-tag :options="task_status" :value="scope.row.status"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="启用检测" align="center" prop="enableDetection">
|
<el-table-column label="启用检测" align="center" prop="enableDetection">
|
||||||
@@ -144,14 +143,12 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="任务状态" prop="status">
|
<el-form-item label="任务状态" prop="status">
|
||||||
<el-radio-group v-model="form.status">
|
<el-radio-group v-model="form.status">
|
||||||
<el-radio label="0">启用</el-radio>
|
<el-radio v-for="dict in task_status" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
|
||||||
<el-radio label="1">停用</el-radio>
|
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="启用检测" prop="enableDetection">
|
<el-form-item label="启用检测" prop="enableDetection">
|
||||||
<el-radio-group v-model="form.enableDetection">
|
<el-radio-group v-model="form.enableDetection">
|
||||||
<el-radio label="0">启用</el-radio>
|
<el-radio v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
|
||||||
<el-radio label="1">停用</el-radio>
|
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="检测阈值" prop="threshold">
|
<el-form-item label="检测阈值" prop="threshold">
|
||||||
@@ -175,7 +172,7 @@ import { listDevice } from "@/api/video/device";
|
|||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const { sys_normal_disable } = proxy.useDict('sys_normal_disable');
|
const { sys_normal_disable, task_status } = proxy.useDict('sys_normal_disable', 'task_status');
|
||||||
|
|
||||||
const inspectionList = ref([]);
|
const inspectionList = ref([]);
|
||||||
const deviceList = ref([]);
|
const deviceList = ref([]);
|
||||||
@@ -332,6 +329,7 @@ function handleDelete(row) {
|
|||||||
/** 启动任务 */
|
/** 启动任务 */
|
||||||
function handleStart(row) {
|
function handleStart(row) {
|
||||||
proxy.$modal.confirm('是否确认启动任务"' + row.taskName + '"?').then(function() {
|
proxy.$modal.confirm('是否确认启动任务"' + row.taskName + '"?').then(function() {
|
||||||
|
console.log(row.taskId);
|
||||||
return startTask(row.taskId);
|
return startTask(row.taskId);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
getList();
|
getList();
|
||||||
|
|||||||
Reference in New Issue
Block a user