Prechádzať zdrojové kódy

视频素材添加新功能

朱鑫波 3 rokov pred
rodič
commit
02568c4ba0

+ 25 - 1
src/mixins/videoMaterialMixin.js

@@ -117,7 +117,31 @@
        // if(params.endDate){
        //   params.endDate = moment(params.endDate).format('YYYY-MM-DD')
        // }
- 
+       if(params.videoStatus == 0){
+        params.syncKuaishou = null
+        params.syncBytedance = null
+      }else if(params.videoStatus == 1){
+        params.syncKuaishou = 0
+        params.syncBytedance = 0
+      }else if(params.videoStatus == '2'){
+        params.syncKuaishou = 0
+        params.syncBytedance = null
+      }else if(params.videoStatus == 3){
+        params.syncKuaishou = null
+        params.syncBytedance = 0
+      }else if(params.videoStatus == 4){
+        params.syncKuaishou = 1
+        params.syncBytedance = 0
+      }else if(params.videoStatus == 5){
+        params.syncKuaishou = 0
+        params.syncBytedance = 1
+      }else if(params.videoStatus == 6){
+        params.syncKuaishou = 1
+        params.syncBytedance = 1
+      }else{
+        params.syncKuaishou = null
+        params.syncBytedance = null
+      }
        this.loading = true;
        await getAction(this.url.list, params).then((res) => {
          if (res.success) {

+ 1 - 2
src/views/modules/Statistics/components/selectPagination.vue

@@ -47,7 +47,7 @@
   >
     <a-input
       placeholder="请选择项目名称"
-      @focus="topMiddle = true"
+      @focus="topMiddle = true;getData(productId)"
       v-model="keyValue"
       @change="getData(productId)"
       :disabled="disabled"
@@ -285,7 +285,6 @@ export default {
       this.topMiddle = false
       if(!!!this.projectId){
         this.keyValue = ''
-        this.getData(this.productId)
       }
     },
     // allData() {

+ 6 - 2
src/views/modules/material/accountCheckBytedance.vue

@@ -213,7 +213,11 @@ export default {
       console.log(e)
       var data = this.$refs.tree.getCheckedKeys()
       var dataArr = data.map(item=>{
-        return item.split('@')[0]
+        return {
+          accountId:item.split('@')[0],
+          userName:item.split('@')[2],
+          userId:item.split('@')[1],
+        }
       })
       // console.log(dataArr)
       this.showEdit = false
@@ -307,7 +311,7 @@ export default {
           console.log(res)
           this.options = res.result.map((item) => {
             return {
-              id: item.accountId+'@'+item.userId,
+              id: item.accountId+'@'+item.userId+'@'+item.userName,
               label: item.userId+'-'+item.projectName,
               children: [],
             }

+ 1 - 2
src/views/modules/material/comment/selectTable.vue

@@ -47,7 +47,7 @@
   >
     <a-input
       placeholder="请选择产品名称"
-      @focus="topMiddle = true"
+      @focus="topMiddle = true;getData()"
       v-model="keyValue"
       @change="getData"
       :disabled="disabled"
@@ -283,7 +283,6 @@ export default {
       this.topMiddle = false
       if(!!!this.projectId){
         this.keyValue = ''
-        this.getData()
       }
     },
     // allData() {

+ 229 - 103
src/views/modules/material/videoMaterial.vue

@@ -429,6 +429,46 @@ a {
           </a-col>
 
           <a-col :md="8" :sm="8">
+            <a-form-item label="是否创新视频">
+              <a-select v-model="queryParam.materialInnovate" allowClear>
+                <a-select-option :value="1">
+                    否
+                </a-select-option>
+                <a-select-option :value="2">
+                    是
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="8" :sm="8" v-if="active == '1'">
+            <a-form-item label="状态">
+              <a-select v-model="queryParam.videoStatus">
+                <a-select-option :value="0">
+                    不限
+                </a-select-option>
+                <a-select-option :value="1">
+                    未推送
+                </a-select-option>
+                <a-select-option :value="2">
+                    未推送到快手
+                </a-select-option>
+                <a-select-option :value="3">
+                    未推送到头条 
+                </a-select-option>
+                <a-select-option :value="4">
+                    仅推送到快手
+                </a-select-option>
+                <a-select-option :value="5">
+                    仅推送到头条
+                </a-select-option>
+                <a-select-option :value="6">
+                    已推送到快手&头条 
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+
+          <a-col :md="8" :sm="8">
             <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
               <a-button type="primary" @click="searchRe" icon="reload" style="margin-left: 8px">重置</a-button>
@@ -590,7 +630,7 @@ a {
                     <a-icon
                       type="close-circle"
                       @click="deleteData(items.id)"
-                      v-show="active == '0'"
+                      v-show="active == '0'||active == '2'"
                       v-if="items.userId == userInfo().id"
                     />
                   </a-badge>
@@ -607,7 +647,7 @@ a {
                         </template>
                         <img
                           style="width: 30px; height: 30px"
-                          v-if="items.kuaishouVideoIsUp == 1"
+                          v-if="items.syncKuaishou == 1"
                           :style="{ filter: items.kuaishouEffiType == 1 ? 'grayscale(0%)' : 'grayscale(100%)' }"
                           src="./kuaishou.jpg"
                         />
@@ -617,13 +657,13 @@ a {
                           <span>{{ items.toutiaoEffiType == 1 ? '抖音有效视频' : '已经同步到抖音平台' }}</span>
                         </template>
                         <img
-                          v-if="items.toutiaoVideoIsUp == 1 && items.toutiaoEffiType == 1"
+                          v-if="items.syncBytedance == 1 && items.toutiaoEffiType == 1"
                           style="width: 30px; height: 30px; margin-left: 5px"
                           src="./douyin.jpg"
                           alt
                         />
                         <img
-                          v-else-if="items.toutiaoVideoIsUp == 1 && items.toutiaoEffiType == 0"
+                          v-else-if="items.syncBytedance == 1 && items.toutiaoEffiType == 0"
                           style="width: 30px; height: 30px; margin-left: 5px"
                           src="./douyinhui.jpg"
                           alt
@@ -645,6 +685,7 @@ a {
                         <!-- {{ videoTag.join(',') }} -->
                         <!-- <br v-if="index%3"/> -->
                         <a-tag v-for="(item, index) of videoTag" :key="index" style="margin: 5px">{{ item }}</a-tag>
+                        <a-tag>{{ items.materialInnovate == 2? '创新素材' : '非创新素材'  }}</a-tag>
                       </template>
                       <template slot="content" v-else>
                         <div style="width: 100%; text-align: center">加载中。。。</div>
@@ -817,7 +858,7 @@ a {
                         </a-menu-item>
                       </a-menu>
                     </a-dropdown>
-					<a v-show="active === '0' || active === '1'" style="margin-right: 20px" @click="handleUsageDetails(items)">使用详情</a>
+					          <a v-show="active === '0' || active === '1'" style="margin-right: 20px" @click="handleUsageDetails(items)">使用详情</a>
                     <a-checkbox :value="items.id" style="float: right" v-show="active == '1'"></a-checkbox>
                     <br />
                     {{ items.createTime }}
@@ -1125,7 +1166,13 @@ a {
                 required: true,
                 message: '场景标签必选',
                 trigger: 'blur',
-              }">
+              }"
+              v-if="!items.modalityTagList.includes(60158)
+              && !items.modalityTagList.includes(60159)
+              && !items.modalityTagList.includes(101)
+              && !items.modalityTagList.includes(104)
+              && !items.modalityTagList.includes(112)"
+              >
                 <el-cascader
                   placeholder="搜索你想要的场景标签"
                   :options="departTreeSence"
@@ -1167,6 +1214,17 @@ a {
                   style="width: 100%"
                 ></el-cascader>
               </a-form-model-item>
+              <a-form-model-item label="基调标签" 
+              :prop="'urlListData.'+index+'.modTagList'"  
+              :label-col="{ span: 4 }" 
+              :wrapper-col="{ span: 14 }"
+                :rules="{
+                required: true,
+                message: '基调标签必选',
+                trigger: 'blur',
+              }">
+                  <a-switch v-model="items.materialInnovate"/>
+              </a-form-model-item>
               <a-form-model-item :wrapper-col="{ span: 14,offset:4 }" v-if="index == 0">
                   <a-button type="primary" @click="syncDesign">剩余素材同步设计人员</a-button>
               </a-form-model-item>
@@ -1367,7 +1425,7 @@ a {
             :options="departTreeModality"
             v-decorator="[
               'modalityTagList', // 给表单赋值或拉取表单时,该input对应的key
-              { rules: [{ required: true, message: '请选择形式标签!' }] },
+              { rules: [{ required: true, message: '请选择形式标签!' }],initialValue:[] },
             ]"
             :props="{
               multiple: true,
@@ -1417,7 +1475,11 @@ a {
             sm: { span: 12 },
           }"
           label="场景标签"
-          v-if="add && visible"
+          v-if="add && visible && (!getData('modalityTagList')||(!getData('modalityTagList').includes(60158)
+          && !getData('modalityTagList').includes(60159)
+          && !getData('modalityTagList').includes(101)
+          && !getData('modalityTagList').includes(104)
+          && !getData('modalityTagList').includes(112)))"
         >
           <el-cascader
             placeholder="搜索你想要的场景标签"
@@ -1470,6 +1532,20 @@ a {
           :label-col="labelCol"
           :wrapper-col="{
             xs: { span: 24 },
+            sm: { span: 12 },
+          }"
+          label="创新素材"
+          v-if="add && visible"
+        >
+         <a-switch v-decorator="[
+              'materialInnovate', // 给表单赋值或拉取表单时,该input对应的key
+              { rules: [{ required: true, message: '' }],initialValue:false },
+            ]"/>
+        </a-form-item>
+        <a-form-item
+          :label-col="labelCol"
+          :wrapper-col="{
+            xs: { span: 24 },
             sm: { span: 18 },
           }"
           label="其他"
@@ -1946,6 +2022,11 @@ a {
           sm: { span: 12 },
         }"
         label="场景"
+        v-if="!departValueInfoModality.includes(60158)
+              && !departValueInfoModality.includes(60159)
+              && !departValueInfoModality.includes(101)
+              && !departValueInfoModality.includes(104)
+              && !departValueInfoModality.includes(112)"
       >
         <el-cascader
           placeholder="搜索你想要的场景标签"
@@ -1987,6 +2068,16 @@ a {
           style="width: 100%"
         ></el-cascader>
       </a-form-item>
+      <a-form-item
+          :label-col="labelCol"
+          :wrapper-col="{
+            xs: { span: 24 },
+            sm: { span: 12 },
+          }"
+          label="创新素材"
+        >
+         <a-switch v-model="materialInnovate"/>
+        </a-form-item>
     </a-modal>
     <a-modal title="推荐封面" v-model="chouzhen" width="60%">
       <template slot="footer">
@@ -2015,13 +2106,13 @@ a {
     <accountCheckBytedance ref="accountCheckBytedance" @synchro="implement" />
     <permission-modal ref="modalForm" @ok="modalFormOkElse"></permission-modal>
     <!-- 换脸模块 -->
-	<change-face
-		:status="faceTypeStatus"
-		:defaultList="faceChangeList"
-		@closeface="handleFaceCloseModal"
-		@sureface="handleFaceSureModal"
-	>
-	</change-face>
+    <change-face
+      :status="faceTypeStatus"
+      :defaultList="faceChangeList"
+      @closeface="handleFaceCloseModal"
+      @sureface="handleFaceSureModal"
+    >
+    </change-face>
     <a-modal
         v-if="faceShowStatus"
         title="换脸操作"
@@ -2073,90 +2164,101 @@ a {
           @showSizeChange="onShowSizeChange"
       />
     </a-modal>
-	<a-modal
-        v-if="usageDetailsStatus"
-        title="使用详情"
-		:width="750"
-        :visible="usageDetailsStatus"
-        dialog-class="usage-details-modal change-face-modal change-list-modal-show"
-		:footer="null"
-		@cancel="handleProfitModalnCancel"
-    >
-		<div style="overflow: hidden;">	
-			<a-tabs v-model="materiaModalType" @change="handleMateriaTabsChange">
-				<a-tab-pane key="1" tab="头条">
-					<a-table
-						class="face-right-table"
-						ref="table"
-						size="middle"
-						bordered
-						:columns="materiaColumnsToutiao"
-						:dataSource="materiaDataToutiao"
-						:pagination="false"
-						:loading="toutiaoMateriaLoading"
-					>
-						<span slot="accountStatus" slot-scope="text">
-							<span>{{ text === 0 ? '投放中' : '已暂停' }}</span>
-						</span>
-					</a-table>
-					<a-pagination
-						class="pagin-table-class"
-						:total="materiaDataTotalToutiao"
-						:show-total="total => `共 ${materiaDataTotalToutiao} 条`"
-						size="small"
-						:current="defaultCurrentToutiao"
-						:defaultPageSize="10"
-						@change="materiaDataSizeChange"
-						@showSizeChange="materiaDataSizeChange"
-					/>
-				</a-tab-pane>
-				<a-tab-pane key="2" tab="快手">
-					<a-table
-						class="face-right-table"
-						ref="table"
-						size="middle"
-						bordered
-						:columns="materiaColumnsKuaishou"
-						:dataSource="materiaDataKuaishou"
-						:pagination="false"
-						:loading="kuaishouMateriaLoading"
-					>
-						<span slot="accountStatus" slot-scope="text">
-							<span>{{ text === 0 ? '投放中' : '已暂停' }}</span>
-						</span>
-						<span slot="refuseCount" slot-scope="text, record">
-							<span>{{ record.refuseInfo.refuseCount }}</span>
-						</span>
-						<span slot="refuseDetail" slot-scope="text, record">
-							<a :disabled="!record.refuseInfo.refuseDetail" @click="handleRejectReason(record)">拒绝原因</a>
-						</span>
-					</a-table>
-					<a-pagination
-						class="pagin-table-class"
-						:total="materiaDataTotalKuaishou"
-						:show-total="total => `共 ${materiaDataTotalKuaishou} 条`"
-						size="small"
-						:current="defaultCurrentKuaishou"
-						:defaultPageSize="10"
-						@change="materiaDataSizeChangeKuaishou"
-						@showSizeChange="materiaDataSizeChangeKuaishou"
-					/>
-				</a-tab-pane>
-			</a-tabs>
-		</div>
+    <a-modal
+          v-if="usageDetailsStatus"
+          title="使用详情"
+      :width="750"
+          :visible="usageDetailsStatus"
+          dialog-class="usage-details-modal change-face-modal change-list-modal-show"
+      :footer="null"
+      @cancel="handleProfitModalnCancel"
+      >
+      <div style="overflow: hidden;">	
+        <a-tabs v-model="materiaModalType" @change="handleMateriaTabsChange">
+          <a-tab-pane key="1" tab="头条">
+            <a-table
+              class="face-right-table"
+              ref="table"
+              size="middle"
+              bordered
+              :columns="materiaColumnsToutiao"
+              :dataSource="materiaDataToutiao"
+              :pagination="false"
+              :loading="toutiaoMateriaLoading"
+            >
+              <span slot="accountStatus" slot-scope="text">
+                <span>{{ text === 0 ? '投放中' : '已暂停' }}</span>
+              </span>
+            </a-table>
+            <a-pagination
+              class="pagin-table-class"
+              :total="materiaDataTotalToutiao"
+              :show-total="total => `共 ${materiaDataTotalToutiao} 条`"
+              size="small"
+              :current="defaultCurrentToutiao"
+              :defaultPageSize="10"
+              @change="materiaDataSizeChange"
+              @showSizeChange="materiaDataSizeChange"
+            />
+          </a-tab-pane>
+          <a-tab-pane key="2" tab="快手">
+            <a-table
+              class="face-right-table"
+              ref="table"
+              size="middle"
+              bordered
+              :columns="materiaColumnsKuaishou"
+              :dataSource="materiaDataKuaishou"
+              :pagination="false"
+              :loading="kuaishouMateriaLoading"
+            >
+              <span slot="accountStatus" slot-scope="text">
+                <span>{{ text === 0 ? '投放中' : '已暂停' }}</span>
+              </span>
+              <span slot="refuseCount" slot-scope="text, record">
+                <span>{{ record.refuseInfo.refuseCount }}</span>
+              </span>
+              <span slot="refuseDetail" slot-scope="text, record">
+                <a :disabled="!record.refuseInfo.refuseDetail" @click="handleRejectReason(record)">拒绝原因</a>
+              </span>
+            </a-table>
+            <a-pagination
+              class="pagin-table-class"
+              :total="materiaDataTotalKuaishou"
+              :show-total="total => `共 ${materiaDataTotalKuaishou} 条`"
+              size="small"
+              :current="defaultCurrentKuaishou"
+              :defaultPageSize="10"
+              @change="materiaDataSizeChangeKuaishou"
+              @showSizeChange="materiaDataSizeChangeKuaishou"
+            />
+          </a-tab-pane>
+        </a-tabs>
+      </div>
     </a-modal>
-	<a-modal
-        v-if="rejectReasonStatus"
-        title="审核拒绝原因"
-		:width="750"
-        :visible="rejectReasonStatus"
-		:footer="null"
-		@cancel="handleRejectReasonCancel"
-    >
-		<div>
-			<p v-for="(item, index) in rejectReasonList" :key="index + 1">{{ index + 1 }}:{{ item }}</p>
-		</div>
-	</a-modal>
+    <a-modal
+          v-if="rejectReasonStatus"
+          title="审核拒绝原因"
+      :width="750"
+          :visible="rejectReasonStatus"
+      :footer="null"
+      @cancel="handleRejectReasonCancel"
+      >
+      <div>
+        <p v-for="(item, index) in rejectReasonList" :key="index + 1">{{ index + 1 }}:{{ item }}</p>
+      </div>
+    </a-modal>
+    <a-modal v-model="showDataListVisible" title="信息" :footer="null">
+      <div v-if="showDataList">
+        <p v-for="(item, index) in showDataList" :key="index">
+            素材:{{item.materialName}},{{item.message}};
+            <br/>
+            同步账户:{{item.ids.join()}}
+        </p>
+      </div>
+       
+    </a-modal>
+
   </a-card>
 </template>
 
@@ -2341,6 +2443,7 @@ export default {
       departTreeMod: [],
       departValue: [],
       departValueInfo: [],
+      materialInnovate:false,
       departValueInfoModality: [],
       departValueInfoContent: [],
       departValueInfoSence: [],
@@ -2474,6 +2577,8 @@ export default {
       acceptImage: 'image/jpeg,image/jpg,image/png',
       accessKeyId: 'LTAIbNbqWzSOklQV',
       accessKeySecret: '1rkPz7JNoXk8sJevPaeYHWqfkQXBGh',
+      showDataList:null,
+      showDataListVisible:false,
       checkArr: [],
       checkAll: false,
       checkArrImage: [],
@@ -2746,7 +2851,8 @@ export default {
           modTagList:[],
           modalityTagList:[],
           senceTagList:[],
-          materialName:''
+          materialName:'',
+          materialInnovate:false
         }
       })
     },
@@ -2777,7 +2883,8 @@ export default {
                 planId:item.planId,
                 clipId:item.clipId,
                 shotId:item.shotId,
-              }
+              },
+              materialInnovate:item.materialInnovate?2:1
             }
           })
           postAction('/insertV3',params).then(res=>{
@@ -2979,9 +3086,17 @@ export default {
         ...this.departValueInfoContent,
         ...this.departValueInfoSence,
       ]
+      var params = {}
+      params.id = this.id
+      params.materialInnovate = this.materialInnovate?2:1
+      fileEdit({
+        ...params
+      }).then((res) => {
+
+      })
       postAction('/ctop/materialTagInfo/mark', {
         code: this.tagCode,
-        tagList: data,
+        tagList: data
       }).then((res) => {
         console.log(res)
         if (res.success) {
@@ -2989,6 +3104,7 @@ export default {
           this.departValueInfoMod = []
           this.departValueInfoContent = []
           this.departValueInfoSence = []
+          this.materialInnovate = false
           this.loadingTag = false
           this.tagInfoListVisible = false
         } else {
@@ -2999,8 +3115,10 @@ export default {
     },
     editTagList(item) {
       this.tagInfoListVisible = true
+      this.materialInnovate = item.materialInnovate == 1?false:true
       this.getTagListInfo(item.code)
       this.tagCode = item.code
+      this.id = item.id
     },
     getTagListAll() {
       this.departTree = []
@@ -3198,14 +3316,21 @@ export default {
       params.mediaId = this.mediaId
       params.materialArray = JSON.stringify(this.checkArr)
       params.accountArray = data.treeData ? JSON.stringify(data.treeData) : JSON.stringify(data)
+      params.loginId = this.userInfo().id
+      params.userName = this.userInfo().realname
       if (this.mediaId == '2') {
-        params.shieldBackwardSwitch = data.shieldBackwardSwitch
+        params.shieldBackwardSwitch = data.shieldBackwardSwitch?1:2
       }
-
       postAction('/ctop/materialUpload/uploadAccount', params).then((res) => {
         if (res.code == 0) {
           this.checkArr = []
           this.checkAll = false
+          if(res.data){
+            this.showDataList = res.data
+            this.showDataListVisible = true
+          }else{
+            this.$message.success(res.message)
+          }
         }
       })
       //   /ctop/materialUpload/uploadAccount
@@ -3666,6 +3791,7 @@ export default {
                 }
           params.tag = this.tags
           params.imageArr = this.imageArrList
+          params.materialInnovate = values.materialInnovate?2:1
           if (this.add) {
             fileInsertV2(params).then((res) => {
               if (res.success) {

+ 2 - 2
vue.config.js

@@ -97,7 +97,7 @@ module.exports = {
       '/jeecg-boot': {
         // target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.1.3:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
-        // target: 'http://192.168.1.3:7001', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        target: 'http://192.168.1.3:7001', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.0.59:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.1.62:7001', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.6.162:9806', //请求本地 需要jeecg-boot后台项目  祚云
@@ -108,7 +108,7 @@ module.exports = {
         // target: 'http://192.168.1.219:7701', //请求本地 需要jeecg-boot后台项目  赵西安
         // target: 'http://192.168.1.193:8080', //请求本地 需要jeecg-boot后台项目  李煜一
         // target: 'http://192.168.1.193:31012', //请求本地 需要jeecg-boot后台项目  李煜一
-        target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
+        // target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目
         //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目