Browse Source

文案库 添加 编辑删除搜索

jiayufei 4 years ago
parent
commit
669a6fa7f5

+ 2 - 2
src/utils/request.js

@@ -16,8 +16,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://139.186.165.84:8806/jeecg-boot';     
-  axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot';//生产环境
+  axios.defaults.baseURL = 'http://139.186.165.84:8806/jeecg-boot';     
+  // axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot';//生产环境
 }
 const service = axios.create({
 //   baseURL: '/jeecg-boot', // api base_url

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

@@ -5,6 +5,6 @@
 
 // export const urlAcount = 'http://118.24.244.213:8080'; // 线上
 // export const urlAcount = 'http://apipre.tjyourong.com.cn'; // 预生产
-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'; // 测试
 // export const urlAcount = 'http://192.168.1.8:8080'; // 学超

+ 70 - 33
src/views/modules/copy-library/copy-library.vue

@@ -61,7 +61,7 @@
                             @change="handleLaunchData"
                         />
                     </a-form-item>
-                    <a-form-item label="状态">
+                    <a-form-item v-show="configForm.acountId || configForm.adConvertId" label="状态">
                         <a-select v-model="configForm.searchStatus" style="width: 100px">
                             <a-select-option :value="2">不限</a-select-option>
                             <a-select-option :value="0">已删除</a-select-option>
@@ -162,7 +162,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="1,3" :disabled="copywritingType === 'edit'"></acount-search>
                         </div>
                     </div>
                 </div>
@@ -185,7 +185,7 @@
                     <div class="acount-title-left">选择素材</div>
                     <div class="acount-title-right">
                         <div class="only-title-mater">
-                            <div><a @click="handleSelectMaterial">选择素材</a></div>
+                            <div v-if="copywritingType === 'add'"><a @click="handleSelectMaterial">选择素材</a></div>
                             <div class="title-mater-list">
                                 <p
                                     class="mater-list-name"
@@ -193,7 +193,8 @@
                                     :key="item.id"
                                 >
                                     <span class="mater-list-show">{{ item.materialName }}</span>
-                                    <span class="mater-list-icon" @click="handleDelAlone(item)"><a-icon type="close"/></span>
+                                    <span class="mater-list-show">123</span>
+                                    <span v-if="copywritingType === 'add'" class="mater-list-icon" @click="handleDelAlone(item)"><a-icon type="close"/></span>
                                 </p>
                             </div>
                         </div>
@@ -508,12 +509,12 @@ export default {
                     width: 200,
                     dataIndex: 'textCopywriter'
                 },
-                {
-                    title: '状态',
-                    align: 'center',
-                    width: 150,
-                    dataIndex: 'status'
-                },
+                // {
+                //     title: '状态',
+                //     align: 'center',
+                //     width: 150,
+                //     dataIndex: 'status'
+                // },
                 {
                     title: '相关创意',
                     align: 'center',
@@ -582,14 +583,6 @@ export default {
                     align: 'center',
                     width: 150,
                     sorter: (a, b) => a.costConvert - b.costConvert
-                },
-                {
-                    title: '操作',
-                    dataIndex: 'currencyAction',
-                    align: 'center',
-                    width: 150,
-                    fixed: 'right',
-                    scopedSlots: {customRender: 'currencyAction'}
                 }
             ],
             appointColumns: [
@@ -599,12 +592,12 @@ export default {
                     width: 200,
                     dataIndex: 'slogan'
                 },
-                {
-                    title: '状态',
-                    align: 'center',
-                    width: 150,
-                    dataIndex: 'status'
-                },
+                // {
+                //     title: '状态',
+                //     align: 'center',
+                //     width: 150,
+                //     dataIndex: 'status'
+                // },
                 {
                     title: '相关创意',
                     align: 'center',
@@ -673,14 +666,6 @@ export default {
                     align: 'center',
                     width: 150,
                     sorter: (a, b) => a.costConvert - b.costConvert
-                },
-                {
-                    title: '操作',
-                    dataIndex: 'appointAction',
-                    align: 'center',
-                    width: 150,
-                    fixed: 'right',
-                    scopedSlots: {customRender: 'appointAction'}
                 }
             ],
             appointData: [],
@@ -729,7 +714,7 @@ export default {
     methods: {
         ...mapGetters(['nickname', 'avatar', 'userInfo']),
         handleCurrencyEdit(data) {
-            console.log(data, this.controlTypeModel, 'data, --data');
+            console.log(data, this.controlTypeModel, this.modalSelectMaterial, 'data, --data');
             const defaultData = data;
             defaultData.controlTypeModel = this.controlTypeModel;
             if (this.controlTypeModel === '1') {
@@ -887,6 +872,14 @@ export default {
                 launchDateRange: [],
                 searchStatus: 2
             };
+            if (this.currencyColumns[this.currencyColumns.length - 1].title === '操作') {
+                this.currencyColumns.pop();
+                this.currencyColumns.splice(1, 1);
+            }
+            if (this.appointColumns[this.appointColumns.length - 1].title === '操作') {
+                this.appointColumns.pop();
+                this.appointColumns.splice(1, 1);
+            }
             if (e === '1') {
                 this.handleGetCurrencyList();
             }
@@ -1406,6 +1399,42 @@ export default {
             };
             this.currencyPag = page;
             this.appointPag = page;
+            if (this.configForm.acountId) {
+                if (this.currencyColumns[this.currencyColumns.length - 1].title !== '操作') {
+                    this.currencyColumns.splice(1, 0, {
+                        title: '状态',
+                        align: 'center',
+                        width: 150,
+                        dataIndex: 'status'
+                    });
+                    this.currencyColumns.push({
+                        title: '操作',
+                        dataIndex: 'currencyAction',
+                        align: 'center',
+                        width: 150,
+                        fixed: 'right',
+                        scopedSlots: {customRender: 'currencyAction'}
+                    });
+                }
+            }
+            if (this.configForm.adConvertId) {
+                if (this.appointColumns[this.appointColumns.length - 1].title !== '操作') {
+                    this.appointColumns.splice(1, 0, {
+                        title: '状态',
+                        align: 'center',
+                        width: 150,
+                        dataIndex: 'status'
+                    });
+                    this.appointColumns.push({
+                        title: '操作',
+                        dataIndex: 'appointAction',
+                        align: 'center',
+                        width: 150,
+                        fixed: 'right',
+                        scopedSlots: {customRender: 'appointAction'}
+                    });
+                }
+            }
             if (this.controlTypeModel === '1') {
                 this.handleGetCurrencyList();
             }
@@ -1427,6 +1456,14 @@ export default {
             };
             this.currencyPag = page;
             this.appointPag = page;
+            if (this.currencyColumns[this.currencyColumns.length - 1].title === '操作') {
+                this.currencyColumns.pop();
+                this.currencyColumns.splice(1, 1);
+            }
+            if (this.appointColumns[this.appointColumns.length - 1].title === '操作') {
+                this.appointColumns.pop();
+                this.appointColumns.splice(1, 1);
+            }
             if (this.controlTypeModel === '1') {
                 this.handleGetCurrencyList();
             }