Преглед на файлове

feat:口播视频和页面

chenjiaxin преди 2 дни
родител
ревизия
d57995d60e

+ 2 - 2
src/router/index.js

@@ -33,7 +33,7 @@ export const constantRoutes = [
     ]
   },
 ];
-// import userAuthRouter from "./modules/userAuth";
+import userAuthRouter from "./modules/userAuth";
 import oralVideoRouter from "./modules/oralVideo";
 import catwalkVideoRouter from "./modules/catwalkVideo";
 import faceSwapVideoRouter from "./modules/faceSwapVideo";
@@ -41,7 +41,7 @@ export const asyncRoutes = [
   oralVideoRouter,
   catwalkVideoRouter,
   faceSwapVideoRouter,
-  // userAuthRouter,
+  userAuthRouter,
 ];
 
 

+ 2 - 2
src/router/modules/catwalkVideo.js

@@ -7,7 +7,7 @@ const catwalkVideoRouter = {
   component: Layout,
   redirect: "/catwalkVideo/catwalkVideoIndex",
   name: "走秀视频管理",
-  meta: { title: "走秀视频管理", icon: "el-icon-s-cooperation" },
+  meta: { title: "走秀视频管理", icon: "el-icon-camera-solid" },
   children: [
     {
       path: "catwalkVideoIndex",
@@ -17,7 +17,7 @@ const catwalkVideoRouter = {
     },
     {
       path: "catwalkVideoTool",
-      component: () => import("@/views/catwalk-video/catwalk-video"),
+      component: () => import("@/views/catwalk-video/catwalkVideo"),
       name: "AI走秀视频剪辑",
       meta: { title: "AI走秀视频剪辑" }
     },

+ 2 - 2
src/router/modules/faceSwapVideo.js

@@ -7,7 +7,7 @@ const faceSwapVideoRouter = {
   component: Layout,
   redirect: "/face-swap-video/faceSwapVideoIndex",
   name: "视频换脸管理",
-  meta: { title: "视频换脸管理", icon: "el-icon-camera-solid" },
+  meta: { title: "视频换脸管理", icon: "el-icon-s-cooperation" },
   children: [
     {
       path: "faceSwapVideoIndex",
@@ -17,7 +17,7 @@ const faceSwapVideoRouter = {
     },
     {
       path: "faceSwapVideoTool",
-      component: () => import("@/views/face-swap-video/face-swap-video"),
+      component: () => import("@/views/face-swap-video/faceSwapVideo"),
       name: "AI视频换脸",
       meta: { title: "AI视频换脸" }
     },

+ 0 - 1
src/store/getters.js

@@ -7,7 +7,6 @@ const getters = {
   token: state => state.user.token,
   avatar: state => state.user.avatar,
   name: state => state.user.name,
-  introduction: state => state.user.introduction,
   roles: state => state.user.roles,
   orgGroup: state => state.user.orgGroup,
   orgName: state => state.user.orgName,

+ 0 - 72
src/store/modules/storeTmplAttr.js

@@ -1,72 +0,0 @@
-const state = {
-  industryAttrList:[], //行业属性 即 左边供选择的属性
-  checkedAttrIdLst: [], //选中属性的Id
-  settingAttrId: null, //当前正在配置的属性Id
-  checkedAttrConfig:{
-    scope:null,//属性应用范围  1 基本属性 2:专属属性
-    channelCodeList:[],//TM,JD
-    attrNameAlias:null,
-    require:false,
-    select:null, //输入;选择;复杂
-    type:0, // 【单行输入 、多行属性】;【单选、多选】;【单复杂 | 多复杂】
-    cascade: false , //是否级联属性
-    checkedAttrValIds:[],//选中的属性值ID集合
-    checkedValues:[], //选中的属性对象列表
-    values:[], //所有的属性值 - select 为 1 时有值
-  }
-};
-
-const mutations = {
-  SET_INIT_DATA(){
-	  state.industryAttrList = [];
-    state.checkedAttrIdLst=[];
-    state.settingAttrId = null;
-
-    state.checkedAttrConfig.scope = null;
-    state.checkedAttrConfig.channelCodeList = [];
-    state.checkedAttrConfig.name = null;
-    state.checkedAttrConfig.attrNameAlias = null;
-    state.checkedAttrConfig.require = false;
-    state.checkedAttrConfig.select = null;
-    state.checkedAttrConfig.type = null;
-    state.checkedAttrConfig.cascade = false;
-    state.checkedAttrConfig.checkedAttrValIds = [];
-    state.checkedAttrConfig.checkedValues = [];
-    state.checkedAttrConfig.values = [];
-	},
-  SET_INDUSTRY_ATTRS(state,industryAttrList){
-    state.industryAttrList = industryAttrList;
-  },
-  SET_CHECKED_ATTR_IDS(state,checkAttrIds){
-  	state.checkedAttrIdLst = checkAttrIds;
-  },
-  SET_CURR_ATTR_ID(state,attrId){ //当前操作的属性ID
-    state.settingAttrId = attrId;
-  },
-  SET_CHECKED_CONFIG(state,config){
-	  state.checkedAttrConfig = config;
-  }
-};
-
-const actions = {
-  setInitData({ commit }, data) {
-    commit('SET_INIT_DATA',data );
-  },
-  setIndustryAttrList({ commit }, data) {
-    commit('SET_INDUSTRY_ATTRS', data);
-  },
-  setCheckedAttrIds({ commit }, data) {
-    commit('SET_CHECKED_ATTR_IDS', data);
-  },
-  setCurrAttrId({ commit }, data) {
-    commit('SET_CURR_ATTR_ID',data);
-  },
-  setCheckedConfig({ commit}, data) {
-    commit('SET_CHECKED_CONFIG',data);
-  },
-};
-export default {
-  state,
-  mutations,
-  actions
-}

+ 10 - 13
src/store/modules/user.js

@@ -10,7 +10,6 @@ const state = {
   name: '',
   loginName: '',
   avatar: '',
-  introduction: '',
   roles: [],
   // 用户拥有的按钮资源
   btns: [],
@@ -23,9 +22,6 @@ const mutations = {
   SET_TOKEN: (state, token) => {
     state.token = token;
   },
-  SET_INTRODUCTION: (state, introduction) => {
-    state.introduction = introduction;
-  },
   SET_NAME: (state, name) => {
     state.name = name;
   },
@@ -82,15 +78,16 @@ const actions = {
     return new Promise((resolve, reject) => {
       getInfo(state.token).then(response => {
         // const orgGroup = response.orgGroup;
-        const orgGroup = {
-          "orgId": -1000,
-          "orgGroupId": -1000,
-          "orgGroupCode": "ROOT",
-          "orgGroupName": "平台管理员"
-        }
-        const orgName = response.orgName;
+        // const orgGroup = {
+        //   "orgId": -1000,
+        //   "orgGroupId": -1000,
+        //   "orgGroupCode": "ROOT",
+        //   "orgGroupName": "平台管理员"
+        // }
         const data = response.data;
-        const roles = ["ROOT", "DEF", "GuanLiYuan"]
+        const orgName = data.orgName;
+        const roles = data.roleCodeList
+        const orgGroup = data.orgId
         if (roles && roles.length > 0) {
           commit('SET_ROLES', roles)
         } else {
@@ -112,7 +109,7 @@ const actions = {
         commit('SET_ORGNAME', orgName);
         //组织角色
         if (orgGroup !== null && orgGroup !== '') {
-          commit('SET_ORG_GROUP', orgGroup.orgGroupCode);
+          commit('SET_ORG_GROUP', orgGroup);
         }
         commit('SET_USERID', data.id);
         resolve(response);

+ 0 - 0
src/views/catwalk-video/catwalk-video.vue → src/views/catwalk-video/catwalkVideo.vue


+ 58 - 0
src/views/catwalk-video/component/editSuggestion.vue

@@ -0,0 +1,58 @@
+<template>
+  <el-dialog :title="'优化建议 - ' + rows.videoTitle" width="540px" :visible.sync="dialogVisible">
+    <el-form :model="form" :rules="rules" ref="suggestionForm" >
+      <el-form-item>
+        <el-input type="textarea" :autosize="{ minRows: 6, maxRows: 10 }" placeholder="请输入内容" v-model="form.suggestion">
+        </el-input>
+      </el-form-item>
+    </el-form>
+
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="dialogVisible = false">取消</el-button>
+      <el-button type="primary" @click="handleConfirm">确定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  name: "EditSuggestion",
+  props: {
+    rows: {
+      type: Object,
+      required: true
+    }
+  },
+  data() {
+    return {
+      form: {
+        suggestion: null
+      },
+      dialogVisible: false,
+      loading: false,
+      rules: {
+        suggestion: [
+          { required: true, message: "请输入建议", trigger: "blur" }
+        ]
+      }
+    };
+  },
+  methods: {
+    show() {
+      this.dialogVisible = !this.dialogVisible;
+    },
+    handleConfirm() {
+      this.$refs.suggestionForm.validate(valid => {
+        if (valid) {
+          this.$emit("confirm", this.form);
+        } else {
+          return false;
+        }
+      });
+      this.dialogVisible = false;
+    }
+  }
+};
+</script>
+
+

+ 71 - 0
src/views/catwalk-video/component/suggestionTable.vue

@@ -0,0 +1,71 @@
+<template>
+  <el-dialog
+    title="查看优化建议"
+    width="700px"
+    :visible.sync="dialogVisible"
+  >
+  <el-table style="width: 100%" v-loading="listLoading" :key="tableKey" :data="list" row-key="id" stripe border fit
+  highlight-current-row>
+  <el-table-column label="序号" type="index" width="60" align="center" />
+  <el-table-column label="优化建议" min-width="100" align="center" prop="suggestion" />
+  <el-table-column label="建议人" min-width="100" align="center" prop="name" />
+  </el-table>
+    <!-- 分页 -->
+    <swPage v-if="total > 0" key="2" :listQuery="listQuery" :total="total" pos="btmRight" @retPage="retPage" />
+  </el-dialog>
+</template>
+
+<script>
+import { fetchOralVideoList } from "@/api/video";
+import swPage from "@/views/common/swPage";
+export default {
+  name: "SuggestionTable",
+  props: {
+    rows: {
+      type: Object,
+      required: true
+    }
+  },
+  components: {
+    swPage,
+  },
+  data() {
+    return {
+      dialogVisible: false,
+      listLoading: false,
+      tableKey: 0,
+      list: [],
+      total:0,
+      listQuery: {
+        currentPage: 1,
+        pageSize: 10,
+      },
+    };
+  },
+  methods: {
+    show() {
+      this.dialogVisible = !this.dialogVisible;
+    },
+    getList() {
+      this.listLoading = true;
+      fetchOralVideoList(this.listQuery).then(res => {
+        if (200 == res.code) {
+          this.total = res.data.total;
+          this.list = res.data.rows;
+        }
+        this.listLoading = false;
+      });
+    },
+    retPage() {
+      //分页
+      this.getList();
+    },
+  }
+};
+</script>
+
+<style scoped>
+.el-select {
+  width: 100%;
+}
+</style>

+ 83 - 86
src/views/catwalk-video/index.vue

@@ -13,18 +13,18 @@
           <template slot="upload-text">
             导入话题
           </template>
-        </excel-import>
-      </div> -->
+</excel-import>
+</div> -->
     </div>
 
     <div class="table-container">
-      <el-table style="width: 100%" v-loading="listLoading" :key="tableKey" :data="list" row-key="id" stripe border fit
+      <el-table  height="80vh" style="width: 100%" v-loading="listLoading" :key="tableKey" :data="list" row-key="id" stripe border fit
         highlight-current-row>
         <el-table-column label="序号" type="index" width="60" align="center" />
         <el-table-column label="视频ID" min-width="100" align="center" prop="id" />
 
-        <el-table-column label="视频标题" min-width="150" align="center" prop="videoTitle" />
-        <el-table-column label="视频封面" min-width="110" align="center" prop="videoCoverImageUrl">
+        <!-- <el-table-column label="视频标题" min-width="150" align="center" prop="videoTitle" /> -->
+        <el-table-column label="视频封面" min-width="130" align="center" prop="videoCoverImageUrl">
           <template slot-scope="scope">
             <div v-if="scope.row.videoCoverImageUrl" class="video" @click="handlePlay(scope.row)">
               <img :src="scope.row.videoCoverImageUrl" class="video-img" />
@@ -32,59 +32,40 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column label="视频描述" min-width="150" align="center" prop="videoDesc">
+        <el-table-column label="视频末帧" min-width="130" align="center" prop="videoDesc">
           <template slot-scope="scope">
-            <el-popover placement="top-start" width="200" trigger="hover" :content="scope.row.videoDesc">
-              <span class="desc"
-                slot="reference">{{ scope.row.videoDesc }}</span>
-            </el-popover>
+            <el-image class="video-last-img" :src="scope.row.videoCoverImageUrl"
+              :preview-src-list="[scope.row.videoCoverImageUrl]">
+            </el-image>
           </template>
         </el-table-column>
+        <el-table-column label="使用音乐" min-width="110" align="center" prop="videoMusic" />
+        <el-table-column label="拼接视频个数" min-width="100" align="center" prop="publishTime" />
         <el-table-column label="SKU" min-width="100" align="center" prop="sku" />
-
-        <el-table-column label="SKUID" min-width="100" align="center" prop="skuId" />
-        <el-table-column label="审核状态" min-width="100" align="center" prop="reviewStatus">
+        <!-- <el-table-column label="操作人" min-width="100" align="center" prop="creator" /> -->
+        <el-table-column label="创建时间" min-width="100" align="center" prop="createTime" />
+        <el-table-column label="下载次数" min-width="100" align="center" prop="createTime" />
+        <el-table-column label="优化建议" min-width="100" align="center" prop="createTime">
           <template slot-scope="scope">
-            <span class="status-tag" :class="{
-              'status-pending': scope.row.reviewStatus === 0,
-              'status-success': scope.row.reviewStatus === 1,
-              'status-error': scope.row.reviewStatus === 2
-            }"></span>
-            {{ getValueByKey(scope.row.reviewStatus, auditStatus) }}
+            <p v-if="roles.includes('superAdmin')">
+              <span class="desc">优化</span>
+              <a class="look-more" href="javascript:void(0);" @click="handleViewSuggestions(scope.row)">更多&nbsp;>></a>
+            </p>
+            <p v-else>
+              <a class="edit" href="javascript:void(0);" @click="handleEditSuggestions(scope.row)"><i
+                  class="el-icon-edit" /></a>
+            </p>
           </template>
         </el-table-column>
-
-        <el-table-column label="审核时间" min-width="100" align="center" prop="reviewTime" />
-        <el-table-column label="审核人" min-width="100" align="center" prop="reviewer" />
-        <el-table-column label="发布状态" min-width="100" align="center" prop="publishStatus">
+        <el-table-column v-permission="['superAdmin']" label="使用账号" width="100" align="center" prop="createTime">
           <template slot-scope="scope">
-            <span class="status-tag" :class="{
-              'status-pending': scope.row.publishStatus === 0,
-              'status-success': scope.row.publishStatus === 1,
-              'status-error': scope.row.publishStatus === 2
-            }"></span>
-            {{ getValueByKey(scope.row.publishStatus, auditStatus) }}
+            <el-popover placement="top-start" width="200" trigger="hover" :content="scope.row.videoDesc">
+              <span class="desc" slot="reference"></span>
+            </el-popover>
           </template>
         </el-table-column>
-        <el-table-column label="发布时间" min-width="100" align="center" prop="publishTime" />
-        <el-table-column label="发布人" min-width="100" align="center" prop="publisher" />
-        <el-table-column label="关联话题" min-width="100" align="center" prop="hotWords" />
-
-        <el-table-column label="直播时间" min-width="100" align="center" prop="liveTime" />
-        <!-- <el-table-column
-          label="直播场次"
-          min-width="100"
-          align="center"
-          prop="liveSession"
-        /> -->
-        <el-table-column label="直播中控" min-width="120" align="center" prop="liveController">
-        </el-table-column>
-
-        <el-table-column label="直播间号" min-width="100" align="center" prop="liveRoomId" />
-        <el-table-column label="操作人" min-width="100" align="center" prop="creator" />
-
-        <el-table-column label="创建时间" min-width="100" align="center" prop="createTime" />
-        <el-table-column label="操作" align="center" min-width="160"
+        <!-- <el-table-column label="生成账号" min-width="100" align="center" prop="createTime" /> -->
+        <el-table-column label="操作" align="center" width="160"
           v-bind="device !== 'mobile' ? { fixed: 'right' } : {}">
           <template slot-scope="scope">
             <el-tooltip class="item" effect="dark" content="下载" placement="top">
@@ -96,19 +77,9 @@
             <el-tooltip class="item" effect="dark" content="播放" placement="top">
               <el-button type="success" size="mini" icon="el-icon-caret-right" circle @click="handlePlay(scope.row)" />
             </el-tooltip>
-            <el-tooltip
-              class="more"
-              effect="dark"
-              content="删除"
-              placement="top"
-            >
-              <el-button
-                type="danger"
-                size="mini"
-                icon="el-icon-delete-solid"
-                circle
-                @click="handleDelete(scope.row)"
-              />
+            <el-tooltip class="more" effect="dark" content="删除" placement="top">
+              <el-button type="danger" size="mini" icon="el-icon-delete-solid" circle
+                @click="handleDelete(scope.row)" />
             </el-tooltip>
             <!-- <el-tooltip class="more" effect="dark" content="更多" placement="top">
               <el-dropdown trigger="click" @command="command => handleMore(command, scope.row)">
@@ -129,8 +100,10 @@
     <!-- 视频播放 -->
     <video-player ref="videoPlayer" :video-url="currentVideoUrl" :video-title="currentVideoTitle"
       @close="handlePlayerClose" />
-    <!-- 修改话题-->
-     <change-topic ref="changeTopicRef" :rows="currentVideo" @confirm="handleTopicChange" />
+    <!-- 优化建议 -->
+    <suggestion-table ref="suggestionTable" :rows="currentVideo" />
+    <!-- 编辑优化建议 -->
+    <edit-suggestion ref="editSuggestion" :rows="currentVideo" @confirm="handleCofirmSuggestion" />
   </div>
 </template>
 
@@ -139,8 +112,9 @@ import waves from "@/directive/waves";
 import swPage from "@/views/common/swPage";
 import { auditStatus } from "@/constants/index";
 import { getValueByKey } from "@/utils/index";
-import ExcelImport from "@/components/ExcelImport";
-import changeTopic from "@/views/oral-video/component/changeTopic";
+// import ExcelImport from "@/components/ExcelImport";
+import EditSuggestion from "./component/editSuggestion";
+import SuggestionTable from "./component/suggestionTable";
 
 import { fetchOralVideoList, deleteOralVideoList } from "@/api/video";
 import downloadUtil from "@/utils/downloadUtil";
@@ -156,11 +130,13 @@ export default {
   components: {
     swPage,
     VideoPlayer,
-    ExcelImport,
-    changeTopic
+    SuggestionTable,
+    EditSuggestion
+    // ExcelImport,
+    // changeTopic
   },
   computed: {
-    ...mapGetters(["device"]) // 从 vuex 中获取设备类型
+    ...mapGetters(["device","roles"]) // 从 vuex 中获取设备类型
   },
   data() {
     return {
@@ -178,7 +154,7 @@ export default {
       },
       currentVideoUrl: null,
       currentVideoTitle: null,
-      currentVideo:{},
+      currentVideo: {},
     };
   },
   //页面创建的时候执行
@@ -257,13 +233,6 @@ export default {
         });
       });
     },
-    // 导入话题回调
-    handleImportSuccess({ data, header, file }) {
-      console.log("导入的数据:", data);
-      console.log("表头:", header);
-      console.log("原始文件:", file);
-      // 处理导入的数据
-    },
     //更多
     handleMore(command, row) {
       if (command === "delete") {
@@ -272,13 +241,15 @@ export default {
         this.changeTopic(row); // 修改话题
       }
     },
-    // 修改话题
-    changeTopic(row) {
-      this.currentVideo = row;
-      this.$refs.changeTopicRef.show();
+    handleViewSuggestions(row) {
+      this.currentVideo = row
+      this.$refs.suggestionTable.show();
+    },
+    handleEditSuggestions(row) {
+      this.currentVideo = row
+      this.$refs.editSuggestion.show();
     },
-    handleTopicChange() {
-      this.$refs.changeTopicRef.show();
+    handleCofirmSuggestion() {
       this.retPage()
     }
   }
@@ -298,6 +269,21 @@ export default {
   }
 }
 
+.video-last-img {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+
+  /deep/.el-image__preview {
+    width: 80px;
+    height: 80px;
+    border: 1px solid #eee;
+    object-fit: cover;
+    cursor: pointer;
+  }
+
+}
+
 .video {
   position: relative;
   display: flex;
@@ -315,16 +301,16 @@ export default {
   }
 
   &-img {
-    width: 60px;
-    height: 60px;
+    width: 80px;
+    height: 80px;
     border: 1px solid #eee;
     object-fit: cover;
     cursor: pointer;
   }
 
   i {
-    width: 60px;
-    height: 60px;
+    width: 80px;
+    height: 80px;
     position: absolute;
     top: 85%;
     left: 50%;
@@ -374,4 +360,15 @@ export default {
 .more {
   margin-left: 10px;
 }
+
+.look-more {
+  font-size: 12px;
+  color: #AE8877;
+  text-decoration: underline;
+}
+
+.edit {
+  font-size: 16px;
+  color: #AE8877;
+}
 </style>

+ 0 - 0
src/views/face-swap-video/face-swap-video.vue → src/views/face-swap-video/faceSwapVideo.vue


+ 1 - 1
src/views/face-swap-video/index.vue

@@ -18,7 +18,7 @@
     </div>
 
     <div class="table-container">
-      <el-table style="width: 100%" v-loading="listLoading" :key="tableKey" :data="list" row-key="id" stripe border fit
+      <el-table height="80vh" style="width: 100%" v-loading="listLoading" :key="tableKey" :data="list" row-key="id" stripe border fit
         highlight-current-row>
         <el-table-column label="序号" type="index" width="60" align="center" />
         <el-table-column label="视频ID" min-width="100" align="center" prop="id" />

+ 6 - 6
src/views/oral-video/index.vue

@@ -18,13 +18,13 @@
     </div>
 
     <div class="table-container">
-      <el-table style="width: 100%" v-loading="listLoading" :key="tableKey" :data="list" row-key="id" stripe border fit
+      <el-table height="80vh" style="width: 100%" v-loading="listLoading" :key="tableKey" :data="list" row-key="id" stripe border fit
         highlight-current-row>
         <el-table-column label="序号" type="index" width="60" align="center" />
         <el-table-column label="视频ID" min-width="100" align="center" prop="id" />
 
         <el-table-column label="视频标题" min-width="150" align="center" prop="videoTitle" />
-        <el-table-column label="视频封面" min-width="110" align="center" prop="videoCoverImageUrl">
+        <el-table-column label="视频封面" min-width="130" align="center" prop="videoCoverImageUrl">
           <template slot-scope="scope">
             <div v-if="scope.row.videoCoverImageUrl" class="video" @click="handlePlay(scope.row)">
               <img :src="scope.row.videoCoverImageUrl" class="video-img" />
@@ -315,16 +315,16 @@ export default {
   }
 
   &-img {
-    width: 60px;
-    height: 60px;
+    width: 80px;
+    height: 80px;
     border: 1px solid #eee;
     object-fit: cover;
     cursor: pointer;
   }
 
   i {
-    width: 60px;
-    height: 60px;
+    width: 80px;
+    height: 80px;
     position: absolute;
     top: 85%;
     left: 50%;

+ 1 - 1
src/views/product/product.vue

@@ -37,7 +37,7 @@
             <template slot-scope="scope">
               <el-popover placement="top-start" width="200" trigger="hover" :content="scope.row.videoDesc">
                 <span class="desc"
-                  slot="reference">测试测试测试测试测试测试测试测试测试测试测试测试试测试测试测试测试测试测试测试测试测试试测试测试测试测试测试测试测试测试测试试测试测试测试测试测试测试测试测试测试试测试测试测试测试测试测试测试测试测试</span>
+                  slot="reference"</span>
               </el-popover>
             </template>
           </el-table-column>