Преглед изворни кода

work 修改账户配置 新增

jiayufei пре 3 година
родитељ
комит
fa57191f39

+ 2 - 2
src/utils/request.js

@@ -19,8 +19,8 @@ else if (process.env.NODE_ENV === 'debug') {
 }
 else if (process.env.NODE_ENV === 'production') {
 	// axios.defaults.baseURL = 'http://apipre.tjyourong.com.cn/jeecg-boot'; // 预生产
-    // axios.defaults.baseURL = 'http://gateway.tjyourong.com.cn/jeecg-boot';//测试
-	axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot'; // 生产环境
+    axios.defaults.baseURL = 'http://gateway.tjyourong.com.cn/jeecg-boot';//测试
+	// axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot'; // 生产环境
 }
 const service = axios.create({
 	// baseURL: '/jeecg-boot', // api base_url

+ 0 - 1
src/views/modules/Statistics/components/Treeselect.vue

@@ -105,7 +105,6 @@ export default {
     $route(n, o) {},
     appId: {
       handler(n, o) {
-        console.log(n)
         if (n.length == 0) {
           if (this.multiple) {
             this.value = []

+ 1 - 1
src/views/modules/autoLaunch/auto-copy-library/auto-copy-library.less

@@ -1,6 +1,6 @@
 .auto-copylibrary-content {
     background: #fff;
-    height: calc(100vh - 137px);
+    height: calc(100vh - 320px);
     padding: 20px;
     overflow-y: auto;
     .control-con-header {

+ 17 - 7
src/views/modules/autoLaunch/auto-copy-library/auto-copy-library.vue

@@ -16,7 +16,7 @@
                             class="acount-search-class"
                             :appId.sync="configForm.acountId"
                             :multiple="false"
-                            request="1,3"
+                            request="2,4"
                         >
                         </acount-search>
                     </a-form-item>
@@ -90,9 +90,9 @@
         <a-modal
             v-if="causeVisible"
             :title="copywritingType === 'add' ? '新建文案' : '编辑文案'"
-            dialog-class="auto-copy-library-modal"
             :visible="causeVisible"
             :confirmLoading="confirmLoading"
+            dialog-class="auto-copy-library-modal"
             @ok="handleCauseSure"
             @cancel="handleCauseCancel"
         >
@@ -101,7 +101,7 @@
                     <div class="acount-title-left">广告账户</div>
                     <div class="acount-title-right">
                         <div class="only-title-mater">
-                            <acount-search :appId.sync="advertisingAccount" request="1,3"></acount-search>
+                            <acount-search :appId.sync="advertisingAccount" request="2,4"></acount-search>
                         </div>
                     </div>
                 </div>
@@ -153,10 +153,10 @@
                 <a-pagination
                     class="pagin-table-class"
                     v-model="rejectIdeasPag.page"
+                    size="small"
                     :page-size="rejectIdeasPag.size"
                     :total="rejectIdeasTotalAll"
                     :show-total="total => `共 ${rejectIdeasTotalAll} 条`"
-                    size="small"
                     @change="handleRejectIdeasPage"
                     @showSizeChange="handleRejectIdeasPage"
                 />
@@ -167,7 +167,7 @@
 <script>
 
 import AcountSearch from '@/views/modules/Statistics/components/Treeselect.vue';
-import {getAction, postFileAction, postAction, deleteAction} from '@/api/manage';
+import {getAction, postAction} from '@/api/manage';
 import {mapGetters} from 'vuex';
 
 export default {
@@ -177,6 +177,7 @@ export default {
     },
     data() {
         return {
+            editShowAccountList: [],
             confirmLoading: false,
             controlLoading: false,
             refusedReasonList: {},
@@ -329,8 +330,9 @@ export default {
                 this.$message.error('请选择账户');
                 return;
             }
+            // this.editShowAccountList
             let paramsData = new FormData();
-            paramsData.append('accountIds', this.advertisingAccount);
+            paramsData.append('accountIds', [...this.advertisingAccount, ...this.editShowAccountList]);
             if (this.copywritingType === 'add') {
                 if (!this.fileList.length) {
                     this.$message.error('请上传文件');
@@ -352,6 +354,10 @@ export default {
                 if (result.code === 200) {
                     this.$message.success(result.message);
                     this.causeVisible = false;
+                    this.currencyPag = {
+                        page: 1,
+                        size: 10
+                    };
                     this.handleInitTable();
                 }
                 else {
@@ -361,11 +367,13 @@ export default {
                 console.log(error, 'eeee');
             }).finally(() => {
                 this.confirmLoading = false;
+                this.editShowAccountList = [];
             });
         },
         handleCauseCancel() {
             this.advertisingAccount = [];
             this.fileList = [];
+            this.editShowAccountList = [];
             this.causeVisible = false;
         },
         handleEditCopyLibrary(list) {
@@ -380,7 +388,9 @@ export default {
         handleGetAcoountId(list) {
             getAction('/document/library/getAcoountId', {copyWriterId: list.copyWriterId}).then(result => {
                 if (result.code === 0) {
-                    this.advertisingAccount = result.result;
+                    const defaultData = result.result.map(item => Number(item));
+                    this.editShowAccountList = defaultData;
+                    this.advertisingAccount = defaultData;
                 }
                 else {
                     this.$message.error(result.message);

+ 2 - 2
src/views/modules/autoLaunch/material-pool/material.vue

@@ -19,7 +19,7 @@ export default {
     },
     data() {
         return {
-            currentTabComponent: 'autoCopyLibrary', // 当前加载的组件名称
+            currentTabComponent: 'directional', // 当前加载的组件名称
             tabListNoTitle: [
                 {
                     key: 'directional',
@@ -50,7 +50,7 @@ export default {
         }
     },
     created() {
-        this.currentTabComponent = 'autoCopyLibrary';
+        this.currentTabComponent = 'directional';
     }
 }
 </script>