Browse Source

feat: 短剧组推广 - 短剧组 - 编辑组&详情接口联调

zhengxy 2 years ago
parent
commit
1d21ae2541

+ 1 - 0
project/src/assets/config/interface_api.js

@@ -307,6 +307,7 @@ var api = {
307 307
   playletManage_paramsValidate: "/api/platform/paramsValidate", // 企微助手 - 剧集管理 - 加入剧组参数校验
308 308
   playletManage_setPlayletGroup: "/api/platform/setPlayletGroup", // 企微助手 - 剧集管理 - 创建组
309 309
   playletManage_playletGroupList: "/api/platform/playletGroupList", // 企微助手 - 剧集管理 - 短剧组列表
310
+  playletManage_playletGroupDetail: "/api/platform/playletGroupDetail", // 企微助手 - 剧集管理 - 短剧组详情
310 311
 
311 312
   sop_ruleList: "/api/userSop/ruleList", // 企微助手 - SOP设置 - 列表
312 313
   sop_changeStatus: "/api/userSop/changeStatus", // 企微助手 - SOP设置 - 启用/禁用

+ 28 - 1
project/src/components/manage/playletManageV2/dialog/groupDialog.vue

@@ -81,7 +81,7 @@ export default {
81 81
   computed: {
82 82
     // 弹框标题
83 83
     dialogTitle() {
84
-      return `创建组`
84
+      return this.group_id ? '编辑组' : '创建组'
85 85
     },
86 86
   },
87 87
   watch: {
@@ -105,6 +105,33 @@ export default {
105 105
         ]
106 106
       }
107 107
       console.log('this.form.selectedPlayletList => ', JSON.parse(JSON.stringify(this.form.selectedPlayletList)))
108
+
109
+      if (this.group_id) {
110
+        this.handleGetGroupDetail()
111
+      }
112
+    },
113
+    async handleGetGroupDetail() {
114
+      try {
115
+        let url = `${this.URL.BASEURL}${this.URL.playletManage_playletGroupDetail}`
116
+        const params = {
117
+          group_id: this.group_id,
118
+        }
119
+        this.loading = true
120
+        const { data: res = {} } = await this.$axios.get(url, { params })
121
+        if (res && res.errno == 0) {
122
+          this.form.name = res.rst.name
123
+          this.form.selectedPlayletList = [
124
+            ...res.rst.playlet_list
125
+          ]
126
+          console.log('this.form.selectedPlayletList => ', JSON.parse(JSON.stringify(this.form.selectedPlayletList)))
127
+        } else if (res.errno != 4002) {
128
+          this.$message.warning(res.err || '操作失败')
129
+        }
130
+      } catch (error) {
131
+        console.log('error => ', error)
132
+      } finally {
133
+        this.loading = false
134
+      }
108 135
     },
109 136
     async handleConfirm() {
110 137
       try {

+ 1 - 0
project/src/components/manage/playletManageV2/playletGroup.vue

@@ -110,6 +110,7 @@ export default {
110 110
     // 监听点击“编辑组”
111 111
     onClickEditGroup(row) {
112 112
       console.log('onClickEditGroup row => ', row)
113
+      this.currentGroupId = row.group_id
113 114
       this.groupDialogVisible = true
114 115
     },
115 116
     onConfirmGroupDialog({ isEdit }) {