Luolei 6 سال پیش
والد
کامیت
88b92d3fc1

+ 18 - 0
src/components/icss/CommonTemplate.vue

@@ -160,6 +160,10 @@ export default {
       default: () => {},
       type: Object
     },
+    copyed: {
+      default: false,
+      type: Boolean
+    },
   },
   data() {
     return {
@@ -261,6 +265,20 @@ export default {
         this.searchTagList()
       }
     },
+    rela(newVal, preVal){
+      if(newVal && newVal != preVal && this.copyed){
+        let lis =  this.rightTagsList.splice(0);
+        for(let i = 0;i < lis.length;i++){
+          let tmpLi = lis[i];
+          if(tmpLi.flag == 3){//去掉子模板
+            lis.splice(i,1)
+            this.subTmpList = []
+          }
+        }
+        this.rightTagsList = [...lis]
+        this.getSubTemplate()
+      }
+    },
   },
   methods: {
     updataData(){

+ 2 - 0
src/components/icss/PubTemplateGroup.vue

@@ -208,6 +208,8 @@ export default {
       this.form.isCopy = true
       this.$emit('staticOwn', this.form.region4, false)
       this.$emit('changeVal', this.form, false)
+      //去掉模板内容中的子模板
+
     },
     getTypes(type){
       let param = {

+ 1 - 0
src/components/icss/TemplateMaintenanceWrap.vue

@@ -18,6 +18,7 @@
         :pool="dataPub.tagPool"
         :type="dataPub.region1"
         :signe="dataPub.region3"
+        :copyed="dataPub.isCopy"
         :rela="dataPub.region4"
         :options="editData"
          @changeActionData="changeActionData"