|
|
@@ -120,10 +120,6 @@
|
|
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
|
|
v-hasPermi="['source:itemPush:edit']"></el-button>
|
|
|
</el-tooltip> -->
|
|
|
- <el-tooltip content="删除" placement="top">
|
|
|
- <el-button link type="primary" icon="Delete" v-if="scope.row.isUse == '0'" @click="handleDelete(scope.row)"
|
|
|
- v-hasPermi="['source:itemPush:remove']"></el-button>
|
|
|
- </el-tooltip>
|
|
|
<!-- <el-tooltip content="提交审核" placement="top">
|
|
|
<el-button link type="primary" icon="Top" @click="handleReview(scope.row)"
|
|
|
v-hasPermi="['source:minioData:add']"></el-button>
|
|
|
@@ -136,6 +132,10 @@
|
|
|
<el-button link type="primary" icon="Bottom" v-if="scope.row.status == 'finish' && scope.row.isUse == '1'"
|
|
|
@click="handleRemoveItem(scope.row)" v-hasPermi="['source:itemPush:edit']"></el-button>
|
|
|
</el-tooltip>
|
|
|
+ <el-tooltip content="删除" placement="top">
|
|
|
+ <el-button link type="primary" icon="Delete" v-if="scope.row.isUse == '0'" @click="handleDelete(scope.row)"
|
|
|
+ v-hasPermi="['source:itemPush:remove']"></el-button>
|
|
|
+ </el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -144,10 +144,14 @@
|
|
|
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
|
</el-card>
|
|
|
<!-- 添加或修改内容发布对话框 -->
|
|
|
- <el-dialog :title="dialog.title" v-model="dialog.visible" width="1500px" style="height: 700px" append-to-body>
|
|
|
+ <el-dialog :title="dialog.title" v-model="dialog.visible" width="1500px" style="height: 750px" append-to-body>
|
|
|
<el-row :gutter="20" style="height: 100%; display: flex">
|
|
|
<!--设备列表-->
|
|
|
<el-col :span="6" style="height: 100%; overflow: auto; border-right: 1px solid #eee; padding-right: 10px">
|
|
|
+ <el-row style="margin-bottom: 10px">
|
|
|
+ <el-input v-model="queryParams.deviceName" placeholder="请输入设备名称" clearable style="width: 270px" />
|
|
|
+ <el-button type="primary" @click="getDeviceList" style="margin-left: 10px">查询</el-button>
|
|
|
+ </el-row>
|
|
|
<el-table v-loading="loading" :data="deviceList" @selection-change="handleSelectDevice" style="height: 520px">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="设备名称" align="left" prop="name" :show-overflow-tooltip="true" />
|
|
|
@@ -210,7 +214,7 @@
|
|
|
<el-col :span="9" style="height: 100%; overflow: auto; padding-left: 10px">
|
|
|
<!--轮播组 -->
|
|
|
<div v-if="form.itemType === 1 || form.itemType === 3">
|
|
|
- <el-table v-loading="loading" :data="itemList" style="height: 520px">
|
|
|
+ <el-table v-loading="loading" :data="itemList" style="height: 570px">
|
|
|
<el-table-column label="ID" width="200" align="left" :show-overflow-tooltip="true">
|
|
|
<template #default="{ row }">
|
|
|
<el-radio v-model="selectedRowId" :label="row.id" @change="handleRadioChange(row)" />
|
|
|
@@ -253,57 +257,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 +331,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 +352,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 +388,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<[]>;
|
|
|
@@ -456,6 +477,7 @@ const getList = async () => {
|
|
|
|
|
|
/** 查询设备列表 */
|
|
|
const getDeviceList = async () => {
|
|
|
+ dialogQueryParams.value.name = queryParams.value.deviceName;
|
|
|
const res = await listDevice(dialogQueryParams.value);
|
|
|
deviceList.value = res.rows;
|
|
|
deviceTotal.value = res.total;
|
|
|
@@ -526,6 +548,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 +564,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 +592,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 = ['', ''];
|
|
|
@@ -610,8 +641,9 @@ const handleRadioChange = (row: ItemVO) => {
|
|
|
const handleAdd = () => {
|
|
|
reset();
|
|
|
dialog.visible = true;
|
|
|
- dialog.title = '添加内容发布';
|
|
|
+ dialog.title = '内容发布';
|
|
|
selectedRowId.value = null;
|
|
|
+ queryParams.value.deviceName = null;
|
|
|
getDeviceList();
|
|
|
};
|
|
|
|