DESKTOP-2S67K1S\31396 2 years atrás
parent
commit
86055ce475
1 changed files with 14 additions and 1 deletions
  1. 14 1
      src/mixin/index.js

+ 14 - 1
src/mixin/index.js

@@ -278,7 +278,8 @@ const platformMixin = {
           if (res.code === 0) {
             res.data.map(i => this.platformOptions.push({
               value: Number(i.id),
-              label: i.name
+              label: i.name,
+              joinType: i.joinType
             }))
             e ? this.platformTypeOptions = this.platformOptions : ''
             resolve(this.platformOptions, this.platformTypeOptions)
@@ -287,6 +288,18 @@ const platformMixin = {
           reject()
         })
       })
+    },
+
+    // 第三方资源平台不可编辑
+    disabledPlatformId(e) {
+      if (e) {
+        return this.platformOptions.find(i => i.value === e).joinType.includes('1')
+      }
+    },
+
+    // 禁止选择第三方平台
+    disabledJoinType(e) {
+      return e.split(',').includes('1')
     }
   }
 }