Browse Source

动态词包 逻辑修改 增加id

jiayufei 4 years ago
parent
commit
68295c8be7
2 changed files with 10 additions and 4 deletions
  1. 8 2
      src/views/modules/creative-copywrit/creative-copywrit.vue
  2. 2 2
      vue.config.js

+ 8 - 2
src/views/modules/creative-copywrit/creative-copywrit.vue

@@ -2076,6 +2076,7 @@ export default {
             node.focus();
             node.blur();
             this.$nextTick(() => {
+                const dynamicWordPackIds = [];
                 let finallyLenList = this.handleJudgeExec(this.examinForm.getFieldsValue()[field]);
                 const inputDefaultLen = this.examinForm.getFieldsValue()[field].length;
                 let tagsLen = finallyLenList.length * 4;
@@ -2085,6 +2086,7 @@ export default {
                     finallyLenList.forEach(val => {
                         if (item.name === val) {
                             tagsSureLen += item.maxWordLen;
+                            dynamicWordPackIds.push(item.creativeWordId);
                         }
                     });
                 });
@@ -2096,6 +2098,7 @@ export default {
                     if (item.id === formId) {
                         item.lenSize = resultSelectSize;
                         item.value = this.examinForm.getFieldsValue()[field];
+                        item.wordPackId = dynamicWordPackIds;
                     }
                 });
             });
@@ -2150,7 +2153,7 @@ export default {
             let changeSlogan = this.defaultFormList;
             changeSlogan.forEach(item => {
                 item.title = item.value;
-                item.creative_word_ids = [];
+                item.creative_word_ids = item.wordPackId;
             });
             let params = {
                 ids: this.modalShowBatchList.map(item => item.id) || [],
@@ -2293,6 +2296,7 @@ export default {
                 }
             });
             this.$nextTick(() => {
+                const dynamicWordPackIds = [];
                 let finallyLenList = this.handleJudgeExec(this.examinForm.getFieldsValue()[field]);
                 const inputDefaultLen = this.defaultFormList.filter(item => item.id === formId)[0].value.length;
                 let tagsLen = finallyLenList.length * 4;
@@ -2302,6 +2306,7 @@ export default {
                     finallyLenList.forEach(val => {
                         if (item.name === val) {
                             tagsSureLen += item.maxWordLen;
+                            dynamicWordPackIds.push(item.creativeWordId);
                         }
                     });
                 });
@@ -2312,6 +2317,7 @@ export default {
                 this.defaultFormList.forEach(item => {
                     if (item.id === formId) {
                         item.lenSize = resultSelectSize;
+                        item.wordPackId = dynamicWordPackIds;
                     }
                 });
                 this.titleFiledResult = changeFiled;
@@ -2469,7 +2475,7 @@ export default {
             let changeSlogan = this.defaultFormList;
             changeSlogan.forEach(item => {
                 item.title = item.value;
-                item.creative_word_ids = [];
+                item.creative_word_ids = item.wordPackId;
             });
             let params = {
                 id: this.currentPageOnlyList.id,

+ 2 - 2
vue.config.js

@@ -80,14 +80,14 @@ module.exports = {
         // target: 'http://192.168.1.219:8081', //请求本地 需要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后台项目
         // 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://192.168.1.8:8806', // 学超
       //  target:'http://139.186.165.84:8806', //测试
         // target:'http://apipre.tjyourong.com.cn', //预生产