|
@@ -57,10 +57,18 @@
|
|
|
v-loading="loading"
|
|
|
:data="videoList"
|
|
|
@selection-change="handleSelectionChange"
|
|
|
+ @sort-change="sortChange"
|
|
|
>
|
|
|
<el-table-column type="selection" width="50" />
|
|
|
<el-table-column type="index" label="序号" align="center" width="80" />
|
|
|
<el-table-column prop="interactionName" label="视频名称" align="center" />
|
|
|
+ <el-table-column
|
|
|
+ prop="createTime"
|
|
|
+ label="创建时间"
|
|
|
+ align="center"
|
|
|
+ sortable="custom"
|
|
|
+ />
|
|
|
+ <el-table-column prop="remark" label="备注" align="center" />
|
|
|
<el-table-column label="操作" align="center">
|
|
|
<template #default="{ row }">
|
|
|
<el-button type="primary" icon="Edit" link @click="handleUpdate(row)"
|
|
@@ -125,6 +133,8 @@ const multiple = ref(true);
|
|
|
const materialOpen = ref(false);
|
|
|
const data = reactive({
|
|
|
queryParams: {
|
|
|
+ orderByColumn: "create_time",
|
|
|
+ isAsc: "desc",
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
interactionName: undefined,
|
|
@@ -150,6 +160,19 @@ function getList() {
|
|
|
loading.value = false;
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+const sortableKeyMap = {
|
|
|
+ descending: "desc",
|
|
|
+ ascending: "asc",
|
|
|
+};
|
|
|
+
|
|
|
+// 排序
|
|
|
+function sortChange(sortData) {
|
|
|
+ // console.log(sortData);
|
|
|
+ queryParams.value.isAsc = sortableKeyMap[sortData.order];
|
|
|
+ getList();
|
|
|
+}
|
|
|
+
|
|
|
/** 搜索按钮操作 */
|
|
|
function handleQuery() {
|
|
|
queryParams.value.pageNum = 1;
|
|
@@ -164,7 +187,7 @@ function resetQuery() {
|
|
|
function handleDelete(row) {
|
|
|
const interactionIds = row.interactionId || ids.value;
|
|
|
proxy.$modal
|
|
|
- .confirm('是否确认删除互动视频编号为"' + interactionIds + '"的数据项?')
|
|
|
+ .confirm('是否确认删除互动视频名称为"' + row.interactionName + '"的数据项?')
|
|
|
.then(function () {
|
|
|
return interactionVideoDel(interactionIds);
|
|
|
})
|
|
@@ -200,7 +223,8 @@ function handleView(row) {
|
|
|
// 获取互动视频基本信息以及节点
|
|
|
getInteractionVideoDetail(row.interactionId).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
- if(!res.data.rootNode) return proxy.$modal.msgError("暂无可播放视频,可添加视频素材后预览");
|
|
|
+ if (!res.data.rootNode)
|
|
|
+ return proxy.$modal.msgError("暂无可播放视频,可添加视频素材后预览");
|
|
|
graphData.value = transfromReturnGraphdata(res.data.rootNode);
|
|
|
videoDetail.value = graphData.value;
|
|
|
if (!videoDetail.value.data.uri) {
|