瀏覽代碼

feat:完成视频管理模块页面初始化及接口联调

mnisting 4 月之前
父節點
當前提交
5773f1b744

+ 44 - 0
src/api/videoManage/category/index.js

@@ -0,0 +1,44 @@
+import request from "@/utils/request";
+
+// 查询列表
+export function getList(query) {
+  return request({
+    url: "/video/category/list",
+    method: "get",
+    params: query,
+  });
+}
+
+// 查询详情
+export function getDetail(id) {
+  return request({
+    url: `/video/category/${id}`,
+    method: "get",
+  });
+}
+
+// 新增
+export function add(data) {
+  return request({
+    url: "/video/category",
+    method: "post",
+    data,
+  });
+}
+
+// 修改
+export function update(data) {
+  return request({
+    url: "/video/category",
+    method: "put",
+    data,
+  });
+}
+
+// 删除
+export function del(ids) {
+  return request({
+    url: `/video/category/${ids}`,
+    method: "delete",
+  });
+}

+ 53 - 0
src/api/videoManage/videoInfo/index.js

@@ -0,0 +1,53 @@
+import request from "@/utils/request";
+
+// 查询列表
+export function getList(query) {
+  return request({
+    url: "/video/content/list",
+    method: "get",
+    params: query,
+  });
+}
+
+// 查询详情
+export function getDetail(id) {
+  return request({
+    url: `/video/content/${id}`,
+    method: "get",
+  });
+}
+
+// 新增
+export function add(data) {
+  return request({
+    url: "/video/content",
+    method: "post",
+    data,
+  });
+}
+
+// 修改
+export function update(data) {
+  return request({
+    url: "/video/content",
+    method: "put",
+    data,
+  });
+}
+
+// 删除
+export function del(ids) {
+  return request({
+    url: `/video/content/${ids}`,
+    method: "delete",
+  });
+}
+
+// 操作记录
+export function getRecord(query) {
+  return request({
+    url: `/video/operationRecord/list`,
+    method: "get",
+    params: query,
+  });
+}

+ 124 - 0
src/views/videoManage/category/components/addAndEdit.vue

@@ -0,0 +1,124 @@
+<template>
+  <div v-loading="loading">
+    <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-form-item label="分类名称" prop="name">
+        <el-input v-model="form.name" placeholder="请输入分类名称" />
+      </el-form-item>
+      <el-form-item label="排序" prop="sort">
+        <el-input-number
+          style="width: 100%"
+          v-model="form.sort"
+          :min="1"
+          :max="9999"
+          label="请输入排序"
+        ></el-input-number>
+      </el-form-item>
+      <el-form-item label="显示状态" prop="status">
+        <el-select
+          v-model="form.status"
+          placeholder="请选择显示状态"
+          style="width: 100%"
+        >
+          <el-option
+            v-for="dict in statusOption"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="备注" prop="remark">
+        <el-input
+          type="textarea"
+          :rows="4"
+          v-model="form.remark"
+          placeholder="请输入备注"
+        />
+      </el-form-item>
+    </el-form>
+    <div style="text-align: right">
+      <el-button type="primary" @click="handleConfirm">确 定</el-button>
+      <el-button @click="handleCancel">取 消</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    data: {
+      type: Object,
+      default: () => {},
+    },
+    loading: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  data() {
+    return {
+      // 状态组
+      statusOption: [
+        { value: "0", label: "显示" },
+        { value: "1", label: "隐藏" },
+      ],
+      form: {
+        name: "",
+        sort: "",
+        status: "",
+        remark: "",
+      },
+      rules: {
+        name: [{ required: true, trigger: "blur", message: "请输入分类名称" }],
+        sort: [{ required: true, trigger: "blur", message: "请输入排序" }],
+        status: [
+          { required: true, trigger: "change", message: "请选择显示状态" },
+        ],
+      },
+    };
+  },
+  watch: {
+    data: {
+      handler(newVal) {
+        if (newVal) {
+          this.form = {
+            id: newVal.id || "",
+            name: newVal.name || "",
+            sort: newVal.sort || "",
+            status: newVal.status || "",
+            remark: newVal.remark || "",
+          };
+          this.$nextTick(() => {
+            this.$refs.form && this.$refs.form.clearValidate();
+          });
+        }
+      },
+    },
+  },
+  methods: {
+    // 确定
+    handleConfirm() {
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          this.$emit("confirm", this.form);
+        }
+      });
+    },
+    // 取消
+    handleCancel() {
+      this.form = {
+        name: "",
+        sort: "",
+        status: "",
+        remark: "",
+      };
+      this.$nextTick(() => {
+        this.$refs.form && this.$refs.form.clearValidate();
+      });
+      this.$emit("cancel");
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 315 - 0
src/views/videoManage/category/index.vue

@@ -0,0 +1,315 @@
+<template>
+  <div class="app-container">
+    <!-- 表单筛选 -->
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      inline
+      v-show="showSearch"
+      label-width="80px"
+    >
+      <el-form-item label="分类名称" prop="name">
+        <el-input
+          v-model="queryParams.name"
+          placeholder="请输入分类名称"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="状态" prop="status">
+        <el-select
+          v-model="queryParams.status"
+          placeholder="请选择状态"
+          clearable
+        >
+          <el-option
+            v-for="dict in statusOption"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="创建时间">
+        <el-date-picker
+          v-model="dateRange"
+          style="width: 100%"
+          value-format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
+      </el-form-item>
+    </el-form>
+    <!-- 按钮组 -->
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          >新增</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="selectedRow.length < 1"
+          @click="handleDelete"
+          >删除</el-button
+        >
+      </el-col>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getTableList"
+      ></right-toolbar>
+    </el-row>
+    <!-- 表格 -->
+    <el-table
+      v-loading="loading"
+      :data="tableList"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column
+        type="selection"
+        width="55"
+        align="center"
+        :selectable="selectable"
+      />
+      <el-table-column label="分类名称" align="center" prop="name" />
+      <el-table-column label="排序" align="center" prop="sort" />
+      <el-table-column label="显示状态" align="center" prop="status">
+        <template slot-scope="scope">
+          <el-tag
+            effect="dark"
+            :type="scope.row.status === '0' ? 'success' : 'danger'"
+          >
+            {{ scope.row.status === "0" ? "显示" : "隐藏" }}
+          </el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="备注"
+        align="center"
+        prop="remark"
+        show-overflow-tooltip
+      />
+      <el-table-column label="创建时间" align="center" prop="createTime" />
+      <el-table-column label="修改时间" align="center" prop="updateTime" />
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            >修改</el-button
+          >
+          <el-button
+            v-if="scope.row.status === '1'"
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            >删除</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 分页 -->
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getTableList"
+    />
+    <!-- 新增编辑弹窗 -->
+    <el-dialog
+      :title="title"
+      :visible.sync="dlgVisible"
+      append-to-body
+      width="30%"
+    >
+      <AddAndEdit
+        :loading="dlgLoading"
+        :data="formData"
+        @confirm="handleConfirm"
+        @cancel="handleCancel"
+      ></AddAndEdit>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  getList,
+  getDetail,
+  add,
+  update,
+  del,
+} from "@/api/videoManage/category";
+import AddAndEdit from "./components/addAndEdit.vue";
+export default {
+  name: "Category",
+  components: {
+    AddAndEdit,
+  },
+  data() {
+    return {
+      // 显示搜索条件
+      showSearch: true,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        name: "",
+        status: "",
+      },
+      // 时间
+      dateRange: [],
+      // 状态组
+      statusOption: [
+        { value: "0", label: "显示" },
+        { value: "1", label: "隐藏" },
+      ],
+      // 表格相关
+      loading: false,
+      tableList: [],
+      selectedRow: [],
+      total: 0,
+      //  弹窗相关
+      title: "",
+      dlgVisible: false,
+      formData: {},
+      dlgLoading: false,
+    };
+  },
+  created() {
+    this.getTableList();
+  },
+  methods: {
+    // 搜索
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getTableList();
+    },
+    // 重置
+    resetQuery() {
+      this.dateRange = [];
+      this.queryParams = {
+        pageNum: 1,
+        pageSize: 10,
+        name: "",
+        status: "",
+      };
+      this.getTableList();
+    },
+    // 新增
+    handleAdd() {
+      this.title = "新增";
+      this.dlgVisible = true;
+      this.formData = {};
+    },
+    // 修改
+    handleUpdate(row) {
+      this.title = "编辑";
+      this.dlgVisible = true;
+      this.dlgLoading = true;
+      // const id = row.id || this.selectedRow[0].id;
+      getDetail(row.id)
+        .then((res) => {
+          if (res.code === 200) {
+            this.formData = res.data;
+          }
+        })
+        .finally(() => (this.dlgLoading = false));
+    },
+    // 弹窗确认
+    handleConfirm(val) {
+      if (val.id) {
+        update(val).then((res) => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("编辑成功");
+            this.handleCancel();
+            this.getTableList();
+          }
+        });
+      } else {
+        add(val).then((res) => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("新增成功");
+            this.handleCancel();
+            this.getTableList();
+          }
+        });
+      }
+    },
+    // 弹窗取消
+    handleCancel() {
+      this.dlgVisible = false;
+    },
+    // 删除
+    handleDelete(row) {
+      const selectIds = this.selectedRow.map((item) => item.id);
+      const ids = row.id || selectIds;
+      this.$modal
+        .confirm("是否确认删除数据?")
+        .then(function () {
+          return del(ids);
+        })
+        .then(() => {
+          this.getTableList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
+    },
+    // 表格选中
+    handleSelectionChange(selection) {
+      this.selectedRow = selection;
+    },
+    // 表格当前行是否可选
+    selectable(row, index) {
+      return row.status === "1";
+    },
+    // 查询列表
+    getTableList() {
+      let params = this.addDateRange(this.queryParams, this.dateRange);
+      this.loading = true;
+      getList(params)
+        .then((res) => {
+          if (res.code === 200) {
+            this.tableList = res.rows;
+            this.total = res.total;
+          }
+        })
+        .finally(() => (this.loading = false));
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 202 - 0
src/views/videoManage/videoInfo/components/addAndEdit.vue

@@ -0,0 +1,202 @@
+<template>
+  <div v-loading="loading">
+    <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-form-item label="标题" prop="title">
+        <el-input
+          v-model="form.title"
+          placeholder="请输入标题"
+          :disabled="[3, 4].includes(dlgType)"
+        />
+      </el-form-item>
+      <el-form-item label="分类" prop="categoryId">
+        <SelectRemote
+          :disabled="[3, 4].includes(dlgType)"
+          url="/video/category/list"
+          field="name"
+          v-model="form.categoryId"
+          :selectObj="selectObj"
+          :searchParams="searchParams"
+        />
+      </el-form-item>
+      <el-form-item label="封面图片" prop="picPath">
+        <image-upload
+          :limit="1"
+          v-model="form.picPath"
+          :disabled="[3, 4].includes(dlgType)"
+        />
+      </el-form-item>
+      <el-form-item label="视频" prop="videoPath">
+        <VideoUpload
+          :limit="1"
+          v-model="form.videoPath"
+          :disabled="[3, 4].includes(dlgType)"
+        />
+      </el-form-item>
+      <template v-if="dlgType === 3">
+        <el-form-item label="状态" prop="checkStatus">
+          <el-select
+            v-model="form.checkStatus"
+            placeholder="请选择状态"
+            style="width: 100%"
+            disabled
+          >
+            <el-option
+              v-for="dict in dict.type.check_status"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </template>
+      <template v-if="[3, 4].includes(dlgType)">
+        <el-form-item label="审核结果" prop="checkResult">
+          <el-select
+            v-model="form.checkResult"
+            placeholder="请选择审核结果"
+            style="width: 100%"
+            :disabled="dlgType === 3"
+          >
+            <el-option
+              v-for="dict in dict.type.check_result"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input
+            type="textarea"
+            :rows="4"
+            v-model="form.remark"
+            placeholder="审核不通过时必填"
+            :disabled="dlgType === 3"
+          />
+        </el-form-item>
+      </template>
+    </el-form>
+    <div style="text-align: right" v-if="dlgType !== 3">
+      <el-button type="primary" @click="handleConfirm">确 定</el-button>
+      <el-button @click="handleCancel">取 消</el-button>
+    </div>
+    <div style="text-align: right" v-else>
+      <el-button @click="handleCancel">关 闭</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import SelectRemote from "@/components/SelectRemote";
+import VideoUpload from "@/components/VideoUpload";
+export default {
+  components: { SelectRemote, VideoUpload },
+  dicts: ["check_result", "check_status"],
+  props: {
+    data: {
+      type: Object,
+      default: () => {},
+    },
+    loading: {
+      type: Boolean,
+      default: false,
+    },
+    dlgType: {
+      // 弹窗类型  1 - 新增   2 - 修改   3 - 查看   4 - 审核
+      type: Number,
+      default: 1,
+    },
+  },
+  data() {
+    return {
+      // 选中的资讯标题
+      selectObj: {},
+      // 远程搜索框的查询条件
+      searchParams: {
+        status: "0",
+      },
+      form: {
+        title: "",
+        categoryId: "",
+        picPath: "",
+        videoPath: "",
+        content: "",
+        checkStatus: "1", // 审核状态,默认草稿
+        checkResult: "",
+        remark: "",
+      },
+      rules: {
+        title: [{ required: true, trigger: "blur", message: "请输入标题" }],
+        categoryId: [
+          { required: true, trigger: "change", message: "请选择分类" },
+        ],
+        picPath: [{ required: true, trigger: "blur", message: "请上传封面图" }],
+        videoPath: [
+          { required: true, trigger: "blur", message: "请上传封面图" },
+        ],
+        content: [
+          { required: true, trigger: "blur", message: "请输入正文内容" },
+        ],
+      },
+    };
+  },
+  watch: {
+    data: {
+      handler(newVal) {
+        if (newVal) {
+          this.form = {
+            id: newVal.id || "",
+            title: newVal.title || "",
+            categoryId: newVal.categoryId || "",
+            picPath: newVal.picPath || "",
+            videoPath: newVal.videoPath || "",
+            content: newVal.content || "",
+            checkStatus: newVal.checkStatus || "1",
+            checkResult: newVal.checkResult || "",
+            remark: newVal.remark || "",
+          };
+          this.selectObj = {
+            id: newVal.categoryId || "",
+            selectLabel: newVal.categoryName || "",
+          };
+          this.$nextTick(() => {
+            this.$refs.form && this.$refs.form.clearValidate();
+          });
+        }
+      },
+    },
+  },
+  methods: {
+    // 确定
+    handleConfirm() {
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          if (this.form.checkResult == "1" && !this.form.remark)
+            return this.$modal.msgError("请填写审核不通过的原因");
+          if (this.dlgType === 4) this.form.checkStatus = "3";
+          this.$emit("confirm", this.form);
+        }
+      });
+    },
+    // 取消
+    handleCancel() {
+      this.form = {
+        title: "",
+        categoryId: "",
+        picPath: "",
+        videoPath: "",
+        content: "",
+        checkStatus: "1", // 审核状态,默认草稿
+        checkResult: "",
+        remark: "",
+      };
+      this.$nextTick(() => {
+        this.$refs.form && this.$refs.form.clearValidate();
+      });
+      this.$emit("cancel");
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 512 - 0
src/views/videoManage/videoInfo/index.vue

@@ -0,0 +1,512 @@
+<template>
+  <div class="app-container">
+    <!-- 表单筛选 -->
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      inline
+      v-show="showSearch"
+      label-width="80px"
+    >
+      <el-form-item label="分类名称" prop="categoryId">
+        <SelectRemote
+          url="/video/category/list"
+          field="name"
+          v-model="queryParams.categoryId"
+          :selectObj="selectObj"
+          :searchParams="searchParams"
+        />
+      </el-form-item>
+      <el-form-item label="状态" prop="checkStatus">
+        <el-select
+          v-model="queryParams.checkStatus"
+          placeholder="请选择状态"
+          clearable
+        >
+          <el-option
+            v-for="dict in dict.type.check_status"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="创建时间">
+        <el-date-picker
+          v-model="dateRange"
+          style="width: 100%"
+          value-format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </el-form-item>
+      <el-form-item label="发布时间">
+        <el-date-picker
+          v-model="publishDateRange"
+          style="width: 100%"
+          value-format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
+      </el-form-item>
+    </el-form>
+    <!-- 按钮组 -->
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          >新增</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="selectedRow.length < 1"
+          @click="handleDelete"
+          >删除</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="selectedRow.length !== 1"
+          @click="handleApply"
+          >申请审核</el-button
+        >
+      </el-col>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getTableList"
+      ></right-toolbar>
+    </el-row>
+    <!-- 表格 -->
+    <el-table
+      v-loading="loading"
+      :data="tableList"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="标题" align="center" prop="title" />
+      <el-table-column label="分类" align="center" prop="categoryName" />
+      <el-table-column label="图片" align="center" prop="picPath" width="100">
+        <template slot-scope="scope">
+          <image-preview :src="scope.row.picPath" :width="50" :height="50" />
+        </template>
+      </el-table-column>
+      <el-table-column label="状态" align="center" prop="checkStatus">
+        <template slot-scope="scope">
+          <dict-tag
+            :options="dict.type.check_status"
+            :value="scope.row.checkStatus"
+          />
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="发布时间"
+        align="center"
+        prop="publishTime"
+        width="100"
+      />
+      <el-table-column
+        label="撤销时间"
+        align="center"
+        prop="cancelTime"
+        width="100"
+      />
+      <el-table-column
+        label="创建时间"
+        align="center"
+        prop="createTime"
+        width="100"
+      />
+      <el-table-column
+        label="修改时间"
+        align="center"
+        prop="updateTime"
+        width="100"
+      />
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            @click="handleDetail(scope.row)"
+            >查看</el-button
+          >
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-if="
+              scope.row.checkStatus === '1' ||
+              (scope.row.checkStatus === '3' && scope.row.checkResult === '2')
+            "
+            >修改</el-button
+          >
+          <!-- 后期需核实删除按钮展示是否有限制(目前是已发布的数据不能删除) -->
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-if="scope.row.checkStatus !== '5'"
+            >删除</el-button
+          >
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-document-checked"
+            @click="handleReview(scope.row)"
+            v-if="scope.row.checkStatus === '2'"
+            >审核</el-button
+          >
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-upload2"
+            @click="handleRelease(scope.row)"
+            v-if="
+              scope.row.checkResult === '2' && scope.row.checkStatus !== '5'
+            "
+            >发布</el-button
+          >
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-download"
+            @click="handleRevoke(scope.row)"
+            v-if="scope.row.checkStatus === '5'"
+            >撤销发布</el-button
+          >
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-s-order"
+            @click="handleRecord(scope.row)"
+            >操作记录</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 分页 -->
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getTableList"
+    />
+    <!-- 新增编辑弹窗 -->
+    <el-dialog
+      :title="title"
+      :visible.sync="dlgVisible"
+      append-to-body
+      width="30%"
+    >
+      <AddAndEdit
+        :loading="dlgLoading"
+        :data="formData"
+        :dlgType="dlgType"
+        @confirm="handleConfirm"
+        @cancel="handleCancel"
+      ></AddAndEdit>
+    </el-dialog>
+    <!-- 操作记录弹窗 -->
+    <el-dialog title="操作记录" :visible.sync="recordVisible" append-to-body>
+      <!-- 表格 -->
+      <el-table v-loading="recordLoading" :data="recordList">
+        <el-table-column label="操作类型" align="center" prop="operateType" />
+        <el-table-column label="操作时间" align="center" prop="createTime" />
+        <el-table-column label="操作人" align="center" prop="createBy" />
+      </el-table>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="recordVisible = false">关 闭</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  getList,
+  getDetail,
+  add,
+  update,
+  del,
+  getRecord,
+} from "@/api/videoManage/videoInfo";
+import SelectRemote from "@/components/SelectRemote";
+import AddAndEdit from "./components/addAndEdit.vue";
+export default {
+  name: "VideoInfo",
+  dicts: ["check_status", "check_result"],
+  components: {
+    AddAndEdit,
+    SelectRemote,
+  },
+  data() {
+    return {
+      selectObj: {},
+      // 远程搜索框的查询条件
+      searchParams: {
+        status: "0",
+      },
+      // 显示搜索条件
+      showSearch: true,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        categoryId: "",
+        checkStatus: "",
+      },
+      // 时间
+      dateRange: [],
+      publishDateRange: [],
+      // 来源组
+      sourceOption: [
+        { value: "0", label: "智能生成" },
+        { value: "1", label: "手工录入" },
+      ],
+      // 分类组
+      categoryOption: [],
+      // 表格相关
+      loading: false,
+      tableList: [],
+      selectedRow: [],
+      total: 0,
+      //  弹窗相关
+      title: "",
+      dlgVisible: false,
+      formData: {},
+      dlgLoading: false,
+      dlgType: 1, // 弹窗类型  1 - 新增   2 - 修改   3 - 查看   4 - 审核
+      // 操作记录弹窗相关
+      recordVisible: false,
+      recordLoading: false,
+      recordList: [],
+    };
+  },
+  created() {
+    this.getTableList();
+  },
+  methods: {
+    // 搜索
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getTableList();
+    },
+    // 重置
+    resetQuery() {
+      this.dateRange = [];
+      this.publishDateRange = [];
+      this.queryParams = {
+        pageNum: 1,
+        pageSize: 10,
+        categoryId: "",
+        checkStatus: "",
+      };
+      this.selectObj = {};
+      this.getTableList();
+    },
+    // 提交,发布,撤销发布公共部分
+    handleCommon(params, tip) {
+      this.$modal
+        .confirm(tip)
+        .then(function () {
+          return update(params);
+        })
+        .then(() => {
+          this.getTableList();
+          this.$modal.msgSuccess("操作成功");
+        })
+        .catch(() => {});
+    },
+    // 撤销发布  checkStatus   6
+    handleRevoke(row) {
+      let params = {
+        ...row,
+        checkStatus: "6",
+      };
+      let tip = "是否确认撤销发布?";
+      this.handleCommon(params, tip);
+    },
+    // 发布 checkStatus   5
+    handleRelease(row) {
+      let params = {
+        ...row,
+        checkStatus: "5",
+      };
+      let tip = "是否确认发布?";
+      this.handleCommon(params, tip);
+    },
+    // 审核
+    handleReview(row) {
+      this.title = "审核";
+      this.dlgVisible = true;
+      this.dlgType = 4;
+      this.dlgLoading = true;
+      getDetail(row.id)
+        .then((res) => {
+          if (res.code === 200) {
+            this.formData = { ...res.data, categoryName: row.categoryName };
+          }
+        })
+        .finally(() => (this.dlgLoading = false));
+    },
+    // 申请审核
+    handleApply() {
+      let obj = this.selectedRow[0];
+      if (obj.checkStatus !== "1")
+        return this.$modal.msgError("当前数据不是草稿状态,无法提交");
+      let params = {
+        ...this.selectedRow[0],
+        checkStatus: "2", // 审核状态由草稿 1 改为 待审核 2
+      };
+      let tip = "是否确认提交审核?";
+      this.handleCommon(params, tip);
+    },
+    // 新增(手动新增的来源都是手工录入)
+    handleAdd() {
+      this.title = "新增";
+      this.dlgType = 1;
+      this.dlgVisible = true;
+      this.formData = {};
+    },
+    // 查看
+    handleDetail(row) {
+      this.title = "查看";
+      this.dlgVisible = true;
+      this.dlgType = 3;
+      this.dlgLoading = true;
+      getDetail(row.id)
+        .then((res) => {
+          if (res.code === 200) {
+            this.formData = { ...res.data, categoryName: row.categoryName };
+          }
+        })
+        .finally(() => (this.dlgLoading = false));
+    },
+    // 修改
+    handleUpdate(row) {
+      this.title = "编辑";
+      this.dlgType = 2;
+      this.dlgVisible = true;
+      this.dlgLoading = true;
+      getDetail(row.id)
+        .then((res) => {
+          if (res.code === 200) {
+            this.formData = { ...res.data, categoryName: row.categoryName };
+          }
+        })
+        .finally(() => (this.dlgLoading = false));
+    },
+    // 弹窗确认
+    handleConfirm(val) {
+      if (val.id) {
+        update(val).then((res) => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("编辑成功");
+            this.handleCancel();
+            this.getTableList();
+          }
+        });
+      } else {
+        add(val).then((res) => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("新增成功");
+            this.handleCancel();
+            this.getTableList();
+          }
+        });
+      }
+    },
+    // 弹窗取消
+    handleCancel() {
+      this.dlgVisible = false;
+    },
+    // 删除
+    handleDelete(row) {
+      const selectIds = this.selectedRow.map((item) => item.id);
+      const ids = row.id || selectIds;
+      this.$modal
+        .confirm("是否确认删除数据?")
+        .then(function () {
+          return del(ids);
+        })
+        .then(() => {
+          this.getTableList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
+    },
+    // 操作记录
+    handleRecord(row) {
+      this.recordVisible = true;
+      this.recordLoading = true;
+      getRecord({ videoId: row.id })
+        .then((res) => {
+          this.recordList = res.rows;
+        })
+        .finally(() => (this.recordLoading = false));
+    },
+    // 表格选中
+    handleSelectionChange(selection) {
+      this.selectedRow = selection;
+    },
+    // 查询列表
+    getTableList() {
+      let params1 = this.addDateRange(this.queryParams, this.dateRange);
+      let params2 = this.addDateRange(
+        params1,
+        this.publishDateRange,
+        "PublishTime"
+      );
+      this.loading = true;
+      getList(params2)
+        .then((res) => {
+          if (res.code === 200) {
+            this.tableList = res.rows;
+            this.total = res.total;
+          }
+        })
+        .finally(() => (this.loading = false));
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>