Browse Source

5.18 账户配置 页面

jiayufei 4 years ago
parent
commit
c1967cf814

+ 7 - 0
src/api/actor.js

@@ -178,6 +178,13 @@ export function fileEditUpdate(parameter) {
     })
 }
 
+export function fileEditUpdateBatch(parameter) {
+    return axios({
+        url: "/ctop/materialInfo/bytedance/batchedit",
+        method: 'put',
+        data: parameter
+    })
+}
 
 export function fileEditAll(parameter) {
     return axios({

+ 2 - 2
src/views/modules/account-config/account-config-server.js

@@ -1,3 +1,3 @@
 // export const urlAcount = 'http://118.24.244.213:8080'; // 线上
-// export const urlAcount = 'http://192.168.1.43:8080'; // 子安
-export const urlAcount = 'http://139.186.165.84:8080'; // 测试
+export const urlAcount = 'http://192.168.1.43:8080'; // 子安
+// export const urlAcount = 'http://139.186.165.84:8080'; // 测试

+ 73 - 44
src/views/modules/account-config/components/configuration-modal.vue

@@ -21,27 +21,39 @@
                     >
                     </acount-search>
                 </a-form-model-item>
-                <a-form-model-item label="dp链接范围" class="dp-link-start" prop="dpLinkStartIndex">
-                    <a-input-number
-                        class="common-input"
-                        v-model="configForm.dpLinkStartIndex"
-                        :disabled="modalTitle === 'edit'"
-                        :min="1"
-                        placeholder="请输入"
-                        @change="handleDplinkStart"
-                    />
-                    <span>~</span>
-                </a-form-model-item>
-                <a-form-model-item class="dp-link-end" prop="dpLinkEndIndex">
-                    <a-input-number
-                        class="common-input"
-                        v-model="configForm.dpLinkEndIndex"
-                        :disabled="modalTitle === 'edit'"
-                        :min="getEndIndex"
-                        placeholder="请输入"
-                        @change="handleDplinkEnd"
-                    />
+                <a-form-model-item label="dp链接">
+                    <a-radio-group
+                        v-model="configForm.dpLinkIndexUsed"
+                        button-style="solid"
+                        @change="handleDpLinkIndexUsed"
+                    >
+                        <a-radio-button :value="0">关闭</a-radio-button>
+                        <a-radio-button :value="1">开启</a-radio-button>
+                    </a-radio-group>
                 </a-form-model-item>
+                <div v-if="configForm.dpLinkIndexUsed === 1">
+                    <a-form-model-item label="dp链接范围" class="dp-link-start" prop="dpLinkStartIndex">
+                        <a-input-number
+                            class="common-input"
+                            v-model="configForm.dpLinkStartIndex"
+                            :disabled="modalTitle === 'edit'"
+                            :min="1"
+                            placeholder="请输入"
+                            @change="handleDplinkStart"
+                        />
+                        <span>~</span>
+                    </a-form-model-item>
+                    <a-form-model-item class="dp-link-end" prop="dpLinkEndIndex">
+                        <a-input-number
+                            class="common-input"
+                            v-model="configForm.dpLinkEndIndex"
+                            :disabled="modalTitle === 'edit'"
+                            :min="getEndIndex"
+                            placeholder="请输入"
+                            @change="handleDplinkEnd"
+                        />
+                    </a-form-model-item>
+                </div>
                 <a-form-model-item label="预算方式">
                     <a-radio-group
                         v-model="configForm.accountBudgetMode"
@@ -296,25 +308,26 @@
                             </a-radio-group>
                         </a-form-model-item>
                         <a-form-model-item v-if="configForm.customPerson === 'a'" label="定向逻辑">
-                            <a-radio-group v-model="configForm.directionalLogic" button-style="solid" @change="handleDirectionalLogic">
+                            <!-- adRetargetingTagsType -->
+                            <a-radio-group v-model="configForm.adRetargetingTagsType" button-style="solid" @change="handleDirectionalLogic">
                                 <a-radio-button value="1">定向</a-radio-button>
                                 <a-radio-button value="2">排除</a-radio-button>
                                 <a-radio-button value="3">同时定向排除</a-radio-button>
                             </a-radio-group>
                         </a-form-model-item>
-                        <div v-if="configForm.customPerson === 'a' && configForm.directionalLogic === '1'" class="adver-position-radio">
+                        <div v-if="configForm.customPerson === 'a' && configForm.adRetargetingTagsType === '1'" class="adver-position-radio">
                             <div style="width: 60%;">
-                                <directional-logic ref="direct" packtype="directional" multitype="alone" :defaultlist="directionalData" :updatelistinclude="configForm.updateGetingInclude" @selection-alone-event="handleSelectionAloneEvent"></directional-logic>
+                                <directional-logic ref="direct" packtype="directional" multitype="alone" :defaultlist="directionalData" :valueids="configForm.adRetargetingTagsType" :updatelistinclude="configForm.updateGetingInclude" @selection-alone-event="handleSelectionAloneEvent"></directional-logic>
                             </div>
                         </div>
-                        <div v-if="configForm.customPerson === 'a' && configForm.directionalLogic === '2'" class="adver-position-radio">
+                        <div v-if="configForm.customPerson === 'a' && configForm.adRetargetingTagsType === '2'" class="adver-position-radio">
                             <div style="width: 60%;">
-                                <directional-logic ref="exclude" packtype="exclude" multitype="alone" :defaultlist="directionalData" :updatelistexclude="configForm.updateGetingExclude" @selection-alone-event="handleSelectionAloneEvent"></directional-logic>
+                                <directional-logic ref="exclude" packtype="exclude" multitype="alone" :defaultlist="directionalData" :valueids="configForm.adRetargetingTagsType" :updatelistexclude="configForm.updateGetingExclude" @selection-alone-event="handleSelectionAloneEvent"></directional-logic>
                             </div>
                         </div>
-                        <div v-if="configForm.customPerson === 'a' && configForm.directionalLogic === '3'" class="adver-position-radio">
+                        <div v-if="configForm.customPerson === 'a' && configForm.adRetargetingTagsType === '3'" class="adver-position-radio">
                             <div style="width: 60%;">
-                                <directional-logic ref="twoway" packtype="twoway" multitype="all" :defaultlist="directionalData" :updatelistinclude="configForm.updateGetingInclude" :updatelistexclude="configForm.updateGetingExclude" @selection-direct-event="handleDirectEvent" @selection-exclude-event="handleExcludeEvent"></directional-logic>
+                                <directional-logic ref="twoway" packtype="twoway" multitype="all" :defaultlist="directionalData" :valueids="configForm.adRetargetingTagsType" :updatelistinclude="configForm.updateGetingInclude" :updatelistexclude="configForm.updateGetingExclude" @selection-direct-event="handleDirectEvent" @selection-exclude-event="handleExcludeEvent"></directional-logic>
                             </div>
                         </div>
                         <a-form-model-item label="媒体定向">
@@ -914,7 +927,7 @@ export default {
             md5Result: '',
             urlResult: '',
             createOptions: [],
-            adNameTags: ['出价方式', '素材名称', '日期', 'dp链接标识', '创意方式'],
+            adNameTags: ['出价方式', '素材名称', '日期', '创意方式'],
             fieldNames: {
                 label: 'industryName',
                 value: 'industryId',
@@ -1023,7 +1036,8 @@ export default {
                 creativeThirdIndustryIds: [{required: true, message: '请选择', trigger: 'change'}]
             },
             configForm: {
-                directionalLogic: '1',
+                dpLinkIndexUsed: 0,
+                adRetargetingTagsType: '1',
                 adAudiencePackageId: undefined,
                 adStepBid: 0,
                 ladderOne: '',
@@ -1213,6 +1227,17 @@ export default {
     methods: {
         ...mapGetters(['nickname', 'avatar', 'userInfo']),
         moment,
+        handleDpLinkIndexUsed(e) {
+            const defaultId = e.target.value;
+            if (defaultId === 0) {
+                this.adNameTags.pop();
+                this.configForm.dpLinkStartIndex = 1;
+                this.configForm.dpLinkEndIndex = 2;
+            }
+            else if (defaultId === 1) {
+                this.adNameTags.push('dp链接标识');
+            }
+        },
         handleDplinkStart(e) {
             this.configForm.dpLinkStartIndex = Math.round(e);
         },
@@ -1241,13 +1266,13 @@ export default {
             });
         },
         handleSelectionAloneEvent(list) {
-            if (this.configForm.directionalLogic === '1') {
+            if (this.configForm.adRetargetingTagsType === '1') {
                 this.configForm.updateGetingInclude = list;
                 this.configForm.adRetargetingTagsInclude = list && list.join(',');
                 this.configForm.adRetargetingTagsExclude = '';
                 this.configForm.updateGetingExclude = [];
             }
-            else if (this.configForm.directionalLogic === '2') {
+            else if (this.configForm.adRetargetingTagsType === '2') {
                 this.configForm.updateGetingExclude = list;
                 this.configForm.adRetargetingTagsExclude = list && list.join(',');
                 this.configForm.updateGetingInclude = [];
@@ -1255,10 +1280,12 @@ export default {
             }
         },
         handleDirectEvent(list) {
+            console.log(list, 'list--list--Include');
             this.configForm.updateGetingInclude = list;
             this.configForm.adRetargetingTagsInclude = list && list.join(',');
         },
         handleExcludeEvent(list) {
+            console.log(list, 'list--list--Exclude');
             this.configForm.updateGetingExclude = list;
             this.configForm.adRetargetingTagsExclude = list && list.join(',');
         },
@@ -1267,9 +1294,13 @@ export default {
             this.handleDirectionalList();
             if (selectValue === '1') {
                 this.$refs.exclude.aloneInput = '';
+                this.$refs.twoway.directInput = '';
+                this.$refs.twoway.excludeInput = '';
             }
             else if (selectValue === '2') {
                 this.$refs.direct.aloneInput = '';
+                this.$refs.twoway.directInput = '';
+                this.$refs.twoway.excludeInput = '';
             }
             else if (selectValue === '3') {
                 this.$refs.direct.aloneInput = '';
@@ -1547,6 +1578,7 @@ export default {
                         this.configForm.campaignLandingType = detailData.campaignLandingType;
                         this.configForm.advertisingType = detailData.advertisingType || '1';
                         this.configForm.campaignName = detailData.campaignName || '';
+                        this.configForm.dpLinkIndexUsed = detailData.dpLinkIndexUsed;
                         this.configForm.adName = detailData.adName || '';
                         this.configForm.campaignCnt = detailData.campaignCnt || '';
                         this.configForm.campaignAdCnt = detailData.campaignAdCnt || '';
@@ -1568,31 +1600,28 @@ export default {
                                     item.key = item.custom_audience_id;
                                 });
                                 this.directionalData = result.result;
-                                if (detailData.adRetargetingTagsInclude && detailData.adRetargetingTagsExclude) {
+                                this.configForm.adRetargetingTagsType = detailData.adRetargetingTagsType || '1';
+                                if (detailData.adRetargetingTagsType === '3') {
                                     this.configForm.customPerson = 'a';
-                                    this.configForm.directionalLogic = '3';
                                     this.configForm.adRetargetingTagsInclude = detailData.adRetargetingTagsInclude;
                                     this.configForm.adRetargetingTagsExclude = detailData.adRetargetingTagsExclude;
+                                    this.configForm.updateGetingExclude = detailData.adRetargetingTagsExclude ? detailData.adRetargetingTagsExclude.split(',').map(item => Number(item)) : [];
+                                    this.configForm.updateGetingInclude = detailData.adRetargetingTagsInclude ? detailData.adRetargetingTagsInclude.split(',').map(item => Number(item)) : [];
+                                }
+                                else if (detailData.adRetargetingTagsType === '2') {
+                                    this.configForm.customPerson = 'a';
+                                    this.configForm.adRetargetingTagsExclude = detailData.adRetargetingTagsExclude;
                                     this.configForm.updateGetingExclude = detailData.adRetargetingTagsExclude.split(',').map(item => Number(item));
-                                    this.configForm.updateGetingInclude = detailData.adRetargetingTagsInclude.split(',').map(item => Number(item));
+                                    this.configForm.updateGetingInclude = [];
                                 }
-                                else if (detailData.adRetargetingTagsInclude && !detailData.adRetargetingTagsExclude) {
+                                else if (detailData.adRetargetingTagsType === '1') {
                                     this.configForm.customPerson = 'a';
-                                    this.configForm.directionalLogic = '1';
                                     this.configForm.adRetargetingTagsInclude = detailData.adRetargetingTagsInclude;
                                     this.configForm.updateGetingExclude = [];
                                     this.configForm.updateGetingInclude = detailData.adRetargetingTagsInclude.split(',').map(item => Number(item));
                                 }
-                                else if (!detailData.adRetargetingTagsInclude && detailData.adRetargetingTagsExclude) {
-                                    this.configForm.customPerson = 'a';
-                                    this.configForm.directionalLogic = '2';
-                                    this.configForm.adRetargetingTagsExclude = detailData.adRetargetingTagsExclude;
-                                    this.configForm.updateGetingExclude = detailData.adRetargetingTagsExclude.split(',').map(item => Number(item));
-                                    this.configForm.updateGetingInclude = [];
-                                }
                                 else {
                                     this.configForm.customPerson = 'NONE';
-                                    this.configForm.directionalLogic = '1';
                                     this.configForm.adRetargetingTagsExclude = '';
                                     this.configForm.updateGetingExclude = '';
                                     this.configForm.updateGetingInclude = [];

+ 53 - 26
src/views/modules/account-config/components/directional-logic/directional-logic.vue

@@ -4,7 +4,7 @@
             <div class="select-class-left">
                 <a-tabs v-model="selectPackageTabs" @change="handleTabsChange">
                     <a-tab-pane key="1" tab="定向池">
-                        <a-input-search class="input-search" v-model="directInput" placeholder="请输入账户名或ID" @change="handleSearchPack($event, 'all', 'direct')" />
+                        <a-input-search class="input-search" v-model="directInput" placeholder="请输入人群包名称" @change="handleSearchPack($event, 'all', 'direct')" />
                         <a-table
                             :columns="columns"
                             :data-source="tableDataAllDirect"
@@ -18,7 +18,7 @@
                         </a-table>
                     </a-tab-pane>
                     <a-tab-pane key="2" tab="排除池">
-                        <a-input-search class="input-search" v-model="excludeInput" placeholder="请输入账户名或ID" @change="handleSearchPack($event, 'all', 'exclude')" />
+                        <a-input-search class="input-search" v-model="excludeInput" placeholder="请输入人群包名称" @change="handleSearchPack($event, 'all', 'exclude')" />
                         <a-table
                             :columns="columns"
                             :data-source="tableDataAllExclude"
@@ -82,7 +82,7 @@
             </div>
         </div>
         <div v-else>
-            <a-input-search class="input-search" v-model="aloneInput" placeholder="请输入账户名或ID" @change="handleSearchPack($event, 'alone')" />
+            <a-input-search class="input-search" v-model="aloneInput" placeholder="请输入人群包名称" @change="handleSearchPack($event, 'alone')" />
             <div class="tree-select-class">
                 <div class="select-class-left">
                     <a-table
@@ -133,6 +133,10 @@ export default {
             type: String,
             default: ''
         },
+        valueids: {
+            type: String,
+            default: ''
+        },
         defaultlist: {
             type: Array,
             default: () => {
@@ -255,6 +259,7 @@ export default {
                     console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
                     this.tableSelectDirectIds = selectedRows && selectedRows.map(item => item.key);
                     this.tableSelectDirectData = selectedRows;
+                    this.$emit('selection-direct-event', this.tableSelectDirectIds);
                 },
                 selectedRowKeys: this.tableSelectDirectIds,
                 getCheckboxProps: record => ({
@@ -272,6 +277,7 @@ export default {
                     console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
                     this.tableSelectExcludeIds = selectedRows && selectedRows.map(item => item.key);
                     this.tableSelectExcludeData = selectedRows;
+                    this.$emit('selection-exclude-event', this.tableSelectExcludeIds);
                 },
                 selectedRowKeys: this.tableSelectExcludeIds,
                 getCheckboxProps: record => ({
@@ -338,29 +344,52 @@ export default {
         this.updateTableAllExclude = this.defaultlist;
         this.tableDataAlone = this.defaultlist;
         this.updateTreeDataAlone = this.defaultlist;
-        
-        console.log(this.updateTableAllDirect, 'this.updateTableAllDirect');
-        console.log(this.updatelistinclude, this.updatelistexclude, '--00--00--00--0--555555');
-        if (this.updatelistinclude.length && this.updatelistexclude.length) {
-            this.tableSelectDirectIds = [...this.updatelistinclude];
-            this.tableSelectExcludeIds = [...this.updatelistexclude];
-            this.updateTableAllDirect.forEach(item => {
-                this.updatelistinclude.forEach(val => {
-                    if (item.key === val) {
-                        this.tableSelectDirectData.push(item);
-                    }
+
+        if (this.valueids === '3') {
+            if (this.updatelistinclude.length && this.updatelistexclude.length) {
+                this.tableSelectDirectIds = [...this.updatelistinclude];
+                this.tableSelectExcludeIds = [...this.updatelistexclude];
+                this.updateTableAllDirect.forEach(item => {
+                    this.updatelistinclude.forEach(val => {
+                        if (item.key === val) {
+                            this.tableSelectDirectData.push(item);
+                        }
+                    });
                 });
-            });
-            this.updateTableAllExclude.forEach(item => {
-                this.updatelistexclude.forEach(val => {
-                    if (item.key === val) {
-                        this.tableSelectExcludeData.push(item);
-                    }
+                this.updateTableAllExclude.forEach(item => {
+                    this.updatelistexclude.forEach(val => {
+                        if (item.key === val) {
+                            this.tableSelectExcludeData.push(item);
+                        }
+                    });
                 });
-            });
+            }
+            else if (this.updatelistexclude.length && !this.updatelistinclude.length) {
+                this.tableSelectExcludeIds = [...this.updatelistexclude];
+                this.selectPackageTabs = '2';
+                this.selectAllRightTabs = '4';
+                this.updateTableAllExclude.forEach(item => {
+                    this.updatelistexclude.forEach(val => {
+                        if (item.key === val) {
+                            this.tableSelectExcludeData.push(item);
+                        }
+                    });
+                });
+            }
+            else if (!this.updatelistexclude.length && this.updatelistinclude.length) {
+                this.tableSelectDirectIds = [...this.updatelistinclude];
+                this.selectPackageTabs = '1';
+                this.selectAllRightTabs = '3';
+                this.updateTableAllDirect.forEach(item => {
+                    this.updatelistinclude.forEach(val => {
+                        if (item.key === val) {
+                            this.tableSelectDirectData.push(item);
+                        }
+                    });
+                });
+            }
         }
-        else if (this.updatelistinclude.length && !this.updatelistexclude.length) {
-            console.log(11111);
+        else if (this.valueids === '1') {
             this.tableSelectIds = [...this.updatelistinclude];
             this.updateTableAllDirect.forEach(item => {
                 this.updatelistinclude.forEach(val => {
@@ -370,8 +399,7 @@ export default {
                 });
             });
         }
-        else if (!this.updatelistinclude.length && this.updatelistexclude.length) {
-            console.log(222222);
+        else if (this.valueids === '2') {
             this.tableSelectIds = [...this.updatelistexclude];
             this.updateTableAllDirect.forEach(item => {
                 this.updatelistexclude.forEach(val => {
@@ -380,7 +408,6 @@ export default {
                     }
                 });
             });
-            console.log(this.selectRightData, 'this.selectRightData--this.selectRightData');
         }
     },
     methods: {

+ 3 - 2
src/views/modules/creative-copywrit/creative-copywrit.less

@@ -9,12 +9,13 @@
     .acount-title {
         display: flex;
         font-size: 14px;
-        height: 40px;
-        line-height: 40px;
         .acount-title-left {
             margin-right: 20px;
             width: 100px;
         }
+        .only-title-mater {
+            height: 35px;
+        }
         .examin-form-model {
             width: 500px;
             position: relative;

+ 128 - 10
src/views/modules/creative-copywrit/creative-copywrit.vue

@@ -394,13 +394,15 @@
             >
                 一键同步
             </a-button>
-            <a-button v-if="checkArr.length" type="primary" @click="handleFodderWind">素材下线</a-button>
+            <!-- &&  -->
+            <a-button v-if="checkArr.length && showTabsTitle !== '0'" type="primary" @click="handleFodderWind">素材下线</a-button>
+            <a-button v-if="checkArr.length && showTabsTitle === '0'" type="primary" @click="handleApprovedClick">通过审核</a-button>
         </div>
         <a-tabs @change="callbackTwo" v-model="active" type="card" id="material-card">
             <a-tab-pane :tab="item.tab" v-for="item of examinelList" :key="item.value">
                 <a-spin :spinning="spinning">
                     <div v-if="dataSource.length > 0">
-                        <a-checkbox-group @change="onChangeCheck" v-model="checkArr" class="home-card">
+                        <a-checkbox-group @change="onChangeCheck($event, item)" v-model="checkArr" class="home-card">
                         <div class="home-item" v-for="(items, index) in dataSource" :key="index" @click="showDetail(items)">
                             <span v-if="items.excellent == 0"></span>
                             <span
@@ -601,7 +603,7 @@
                                         </a-menu-item>
                                     </a-menu>
                                 </a-dropdown>
-                                <a-checkbox :value="items.id" style="float: right" v-show="active == '1'"></a-checkbox>
+                                <a-checkbox :value="items.id" style="float: right" v-show="active == '0' || active == '1'"></a-checkbox>
                                 <br />
                                 {{ items.createTime | getDate }}
                             </span>
@@ -1466,7 +1468,66 @@
             <div>
                 <div class="acount-title">
                     <div class="acount-title-left">素材名称</div>
-                    <div class="acount-title-right">{{ currentPageOnlyList.materialName }}</div>
+                    <div class="acount-title-right">
+                        <div class="only-title-mater">{{ currentPageOnlyList.materialName }}</div>
+                    </div>
+                </div>
+                <div class="acount-title push-plate">
+                    <div class="acount-title-left">创意标题</div>
+                    <div class="acount-title-right">
+                        <a-button type="primary" @click="handleAddOrigin"><a-icon type="plus" />创意标题</a-button>
+                        <a-button class="examin-select-title" @click="handleSelectTitle">选标题</a-button>
+                        <span>已填:{{ titleFiledResult.length || 0 }}</span>
+                    </div>
+                </div>
+                <div class="acount-title">
+                    <div class="acount-title-left"></div>
+                    <div class="acount-title-right">
+                        <a-form :form="examinForm">
+                            <a-form-item
+                                v-for="item in defaultFormList"
+                                :key="item.id"
+                                class="examin-form-model"
+                                :label-col="labelCol"
+                                :wrapper-col="wrapperCol"
+                                label=""
+                            >
+                                <a-input
+                                    v-decorator="[
+                                        item.name,
+                                        { rules: [
+                                            {required: true, message: '请输入创意标题'},
+                                            {min: 5, max: 30, message: '创意标题5-30个字'}
+                                        ]}
+                                    ]"
+                                    class="examin-form-input"
+                                    placeholder="请输入"
+                                    @change="handleFormInputChang($event, item)"
+                                />
+                                <span class="examin-form-num">{{ handleFilterName(item.name) }}/30</span>
+                                <a-icon class="examin-form-icon" type="delete" @click="handleDelOrigin(item)"/>
+                            </a-form-item>
+                        </a-form>
+                    </div>
+                </div>
+            </div>
+        </a-modal>
+        <a-modal
+            v-if="batchVisible"
+            title="审核通过"
+            dialog-class="examin-modal"
+            :visible="batchVisible"
+            @ok="handleBatchSure"
+            @cancel="handleBatchCancel"
+        >
+            <div>
+                <div class="acount-title">
+                    <div class="acount-title-left">素材名称</div>
+                    <div class="acount-title-right">
+                        <div class="only-title-mater" v-for="item in modalShowBatchList" :key="item.id">
+                            {{ item.materialName }}
+                        </div>
+                    </div>
                 </div>
                 <div class="acount-title push-plate">
                     <div class="acount-title-left">创意标题</div>
@@ -1507,7 +1568,7 @@
                     </div>
                 </div>
             </div>
-        </a-modal>  
+        </a-modal>
     </a-card>
 </template>
 <script>
@@ -1516,7 +1577,7 @@ import {JeecgListMixin} from '@/mixins/JeecgListMixin';
 import JEllipsis from '@/components/jeecg/JEllipsis';
 import UploadToAli from '@femessage/upload-to-ali';
 import selectTable from '@/views/modules/Statistics/components/selectPagination.vue';
-import {fileCheck, fileEdit, fileEditAll, fileInsertV2, fileEditUpdate} from '@/api/actor';
+import {fileCheck, fileEdit, fileEditAll, fileInsertV2, fileEditUpdate, fileEditUpdateBatch} from '@/api/actor';
 import {deleteAction, getAction, postAction, putAction} from '@/api/manage';
 import uploadFile from '@/components/uploadFile.vue';
 import {closeAllVideoFun, stopOtherVideo} from '@/utils/videoControl';
@@ -1542,6 +1603,8 @@ export default {
     },
     data() {
         return {
+            batchVisible: false,
+            showTabsTitle: '',
             taobaoSpecialOfferTitle: 'taobao',
             defaultSolganStatus: 'input',
             defaultSolganTitle: 'test',
@@ -1724,7 +1787,8 @@ export default {
             bohuiShow: false,
             waterLoading: false,
             videoTag: [],
-            videoVisibleChange: ''
+            videoVisibleChange: '',
+            modalShowBatchList: []
         };
     },
     filters: {
@@ -1863,6 +1927,56 @@ export default {
     },
     methods: {
         ...mapGetters(['nickname', 'avatar', 'userInfo']),
+        handleApprovedClick() {
+            const batchList = [];
+            this.defaultFormList = [];
+            this.dataSource.forEach(item => {
+                if (this.checkArr.includes(item.id)) {
+                    batchList.push(item);
+                }
+            });
+            console.log(batchList, 'batchList');
+            this.modalShowBatchList = batchList;
+            this.batchVisible = true;
+            for (let i = 0; i < 3; i++) {
+                const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
+                this.defaultFormList.push({
+                    id: randomNum,
+                    name: 'username' + randomNum,
+                    value: ''
+                });
+            }
+        },
+        handleBatchSure() {
+            if (this.defaultFormList && this.defaultFormList.length < 3) {
+                this.$message.error('请至少输入3条标题');
+                return;
+            }
+            let params = {
+                ids: this.modalShowBatchList.map(item => item.id) || [],
+                auditorId: this.userInfo().id,
+                status: 1,
+                slogans: this.defaultFormList.map(item => item.value) || []
+            };
+            this.examinForm.validateFields(err => {
+                if (!err) {
+                    fileEditUpdateBatch(params).then(res => {
+                        if (res.code === 200) {
+                            this.refuseReason = '';
+                            this.batchVisible = false;
+                            this.defaultFormList = [];
+                            this.$message.success('审核成功');
+                            this.loadData();
+                        }
+                        
+                    });
+                }
+            });
+        },
+        handleBatchCancel() {
+            console.log('批量取消按钮');
+            this.batchVisible = false;
+        },
         handleFodderWind() {
             if (this.checkArr.length > 8) {
                 this.$message.error('最多可以支持同时选择8个视频');
@@ -2069,6 +2183,7 @@ export default {
             this.defaultFormList = formData.filter(item => list.id !== item.id);
         },
         handleExamin(data) {
+            this.defaultFormList = [];
             getAction('/ctop/materialInfo/queryById', {
                 id: data.id
             }).then(res => {
@@ -2473,9 +2588,12 @@ export default {
                 this.checkAllImage = false;
             }
         },
-        onChangeCheck(checkedList) {
-            console.log(checkedList, 'checkedList--checkedList--bbbbb');
-            console.log(this.checkArr, 'checkArr--checkArr--checkArr');
+        onChangeCheck(checkedList, data) {
+            console.log(data, 'data--data');
+            console.log(checkedList, this.checkArr, this.dataSource, '-------');
+            if (data.value === '0') {
+                this.showTabsTitle = '0';
+            }
             if (checkedList.length === 0) {
                 this.checkAll = false;
             }

+ 1 - 0
vue.config.js

@@ -87,6 +87,7 @@ module.exports = {
         // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目 
         // target:'http://118.24.244.213:8804',
         // target: 'http://192.168.1.43:8080', // 子安
+        // target: 'http://192.168.1.8:8806', // 学超
        target:'http://139.186.165.84:8806', //测试
 
         ws: false,