|
|
@@ -253,57 +253,72 @@
|
|
|
</el-dialog>
|
|
|
|
|
|
<!-- 下发详情弹窗 -->
|
|
|
- <el-dialog :title="deviceDialog.title" v-model="deviceDialog.visible" width="900px" append-to-body>
|
|
|
+ <el-dialog :title="deviceDialog.title" v-model="deviceDialog.visible" width="1400px" append-to-body>
|
|
|
<!--发布名称-->
|
|
|
<div>
|
|
|
- <el-form ref="itemPushFormRef" :model="form" :rules="rules" label-width="70px">
|
|
|
- <el-form-item label="发布名称" prop="name">
|
|
|
- <el-input v-model="form.name" style="width: 500px" placeholder="请输入名称" :disabled="true" />
|
|
|
- </el-form-item>
|
|
|
- <el-row>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="发布类型" prop="itemType">
|
|
|
- <el-select v-model="form.itemType" placeholder="请选择类型" @change="getItemList" :disabled="true">
|
|
|
- <el-option v-for="dict in smsb_push_type" :key="dict.value" :label="dict.label"
|
|
|
- :value="parseInt(dict.value)"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="优先级" prop="level">
|
|
|
- <el-select v-model="form.level" placeholder="请选择优先级" :disabled="true">
|
|
|
- <el-option v-for="dict in smsb_push_level" :key="dict.value" :label="dict.label"
|
|
|
- :value="parseInt(dict.value)"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
+ <el-descriptions title="详情信息" :column="2" border>
|
|
|
+ <el-descriptions-item label="发布名称">
|
|
|
+ {{form.name}}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="发布类型">
|
|
|
+ <dict-tag :options="smsb_push_type" :value="form.itemType" />
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="开始时间">
|
|
|
+ {{form.startDate}}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="结束时间">
|
|
|
+ {{form.endDate}}
|
|
|
+ </el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
</div>
|
|
|
- <!--设备列表-->
|
|
|
- <el-button type="primary" v-if="removeItemTag" icon="Bottom" :disabled="removeButtonTag"
|
|
|
- @click="handleDoRemoveItem()"> 下架 </el-button>
|
|
|
- <el-table v-loading="deviceLoading" :data="pushDeviceList" style="height: 500px; margin-top: 10px"
|
|
|
- @selection-change="handleDeviceSelectionChange">
|
|
|
- <el-table-column type="selection" v-if="removeItemTag" width="55" align="center" />
|
|
|
- <el-table-column label="设备名称" align="left" prop="deviceName" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="发布排序" align="center" prop="sortNum" width="100" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="发布状态" align="center" prop="pushState" width="120" :show-overflow-tooltip="true">
|
|
|
- <template #default="scope">
|
|
|
- <dict-tag :options="smsb_push_device_state" :value="scope.row.pushState" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="发布时间" align="left" prop="createTime" width="170" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="操作" v-if="removeItemTag" align="center" class-name="small-padding fixed-width"
|
|
|
- width="150">
|
|
|
- <template #default="scope">
|
|
|
- <el-tooltip content="下架" placement="top">
|
|
|
- <el-button link type="primary" icon="Bottom" @click="handleDoRemoveItem(scope.row)"
|
|
|
- v-hasPermi="['source:itemPush:edit']"></el-button>
|
|
|
- </el-tooltip>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
+
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-table v-loading="deviceLoading" :data="pushSourceList" style="height: 500px; margin-top: 10px">
|
|
|
+ <el-table-column label="排序" align="center" prop="sort" width="60" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column label="时长" align="center" prop="duration" width="80" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="资源" align="left" prop="fileName" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="预览" align="center" prop="screenshot" width="120">
|
|
|
+ <template #default="scope">
|
|
|
+ <div v-if="scope.row.fileType === 1">
|
|
|
+ <image-preview :src="scope.row.screenshot" style="width: 40px; height: 40px; cursor: pointer" />
|
|
|
+ </div>
|
|
|
+ <div v-else-if="scope.row.fileType === 2">
|
|
|
+ <el-icon class="VideoPlay" @click="viewVideo(scope.row.screenshot)" size="40" style="cursor: pointer">
|
|
|
+ <VideoPlay />
|
|
|
+ </el-icon>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <!--设备列表-->
|
|
|
+ <el-button type="primary" v-if="removeItemTag" icon="Bottom" :disabled="removeButtonTag"
|
|
|
+ @click="handleDoRemoveItem()" style="margin-top: 10px"> 下架 </el-button>
|
|
|
+ <el-table v-loading="deviceLoading" :data="pushDeviceList" style="height: 500px; margin-top: 10px"
|
|
|
+ @selection-change="handleDeviceSelectionChange">
|
|
|
+ <el-table-column type="selection" v-if="removeItemTag" width="55" align="center" />
|
|
|
+ <el-table-column label="设备名称" align="left" prop="deviceName" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column label="发布排序" align="center" prop="sortNum" width="80" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column label="发布状态" align="center" prop="pushState" width="100" :show-overflow-tooltip="true">
|
|
|
+ <template #default="scope">
|
|
|
+ <dict-tag :options="smsb_push_device_state" :value="scope.row.pushState" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="发布时间" align="left" prop="createTime" width="160" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column label="操作" v-if="removeItemTag" align="center" class-name="small-padding fixed-width"
|
|
|
+ width="80">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-tooltip content="下架" placement="top">
|
|
|
+ <el-button link type="primary" icon="Bottom" @click="handleDoRemoveItem(scope.row)"
|
|
|
+ v-hasPermi="['source:itemPush:edit']"></el-button>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
@@ -312,7 +327,7 @@
|
|
|
</el-dialog>
|
|
|
|
|
|
<!-- 用于展示播放的视频 -->
|
|
|
- <el-dialog v-model="videoDialogVisible">
|
|
|
+ <el-dialog v-model="videoDialogVisible" append-to-body>
|
|
|
<video width="100%" controls :src="videoUrl"></video>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
@@ -333,11 +348,12 @@ import {ItemPushForm, ItemPushQuery, ItemPushVO} from '@/api/smsb/source/item_pu
|
|
|
import {DeviceQuery, DeviceVO} from '@/api/smsb/device/device_type';
|
|
|
import {listDevice} from '@/api/smsb/device/device';
|
|
|
import {ItemQuery, ItemVO} from '@/api/smsb/source/item_type';
|
|
|
-import {listItem} from '@/api/smsb/source/item';
|
|
|
+import {listItem, listItemPushSource} from '@/api/smsb/source/item';
|
|
|
import {ItemPushDeviceVO} from '@/api/smsb/source/item_push_device_type';
|
|
|
import {listItemPushDeviceV2, removeItemPushDevice} from '@/api/smsb/source/item_push_device';
|
|
|
import {MinioDataVO} from "@/api/smsb/source/minioData_type";
|
|
|
import {listMinioData} from "@/api/smsb/source/minioData";
|
|
|
+import {ItemFileRelVO} from "@/api/smsb/source/itemFile_type";
|
|
|
|
|
|
const {proxy} = getCurrentInstance() as ComponentInternalInstance;
|
|
|
const {smsb_push_state, smsb_push_device_state, smsb_push_type, smsb_push_level,smsb_push_isuse} = toRefs<any>(
|
|
|
@@ -368,6 +384,7 @@ const scNum = ref(0);
|
|
|
const dateRangeCreateTime = ref<[DateModelType, DateModelType]>(['', '']);
|
|
|
const deviceList = ref<DeviceVO[]>([]);
|
|
|
const pushDeviceList = ref<ItemPushDeviceVO[]>([]);
|
|
|
+const pushSourceList = ref<ItemFileRelVO[]>([]);
|
|
|
// 存储选中行的唯一标识
|
|
|
const selectedRowId = ref<number | null>(null);
|
|
|
const selectedMinioDataIds = ref<[]>;
|
|
|
@@ -526,6 +543,7 @@ const handleDevice = async (row?: ItemPushVO) => {
|
|
|
const pushInfo = await getItemPush(pushId);
|
|
|
Object.assign(form.value, pushInfo.data);
|
|
|
await getItemDeviceList(pushId);
|
|
|
+ await getItemSourceList(pushId);
|
|
|
};
|
|
|
const handleRemoveItem = async (row?: ItemPushVO) => {
|
|
|
removeItemTag.value = true;
|
|
|
@@ -541,6 +559,7 @@ const handleRemoveItem = async (row?: ItemPushVO) => {
|
|
|
const pushInfo = await getItemPush(pushId);
|
|
|
Object.assign(form.value, pushInfo.data);
|
|
|
await getItemDeviceList(pushId);
|
|
|
+ await getItemSourceList(pushId);
|
|
|
};
|
|
|
const handleDoRemoveItem = async (row?: ItemPushDeviceVO) => {
|
|
|
const deviceIds = Array<number | string>();
|
|
|
@@ -568,6 +587,13 @@ const getItemDeviceList = async (pushId: number | string) => {
|
|
|
deviceLoading.value = false;
|
|
|
};
|
|
|
|
|
|
+const getItemSourceList = async (pushId: number | string) => {
|
|
|
+ deviceLoading.value = true;
|
|
|
+ const res = await listItemPushSource(pushId);
|
|
|
+ pushSourceList.value = res.data;
|
|
|
+ deviceLoading.value = false;
|
|
|
+};
|
|
|
+
|
|
|
/** 重置按钮操作 */
|
|
|
const resetQuery = () => {
|
|
|
dateRangeCreateTime.value = ['', ''];
|