Pārlūkot izejas kodu

feat: 企微数据 - adq授权 - 绑定企微以及数据源ID接口联调

zhengxy 2 gadi atpakaļ
vecāks
revīzija
dcd3fff448

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

252
   adqAccount_adqBindPitcher: "/api/pitcher/adqBindPitcher",
252
   adqAccount_adqBindPitcher: "/api/pitcher/adqBindPitcher",
253
   adqAccount_adqPitcherIndex: "/api/pitcher/adqPitcherIndex",
253
   adqAccount_adqPitcherIndex: "/api/pitcher/adqPitcherIndex",
254
   adqAccount_adqEditPitcher: "/api/pitcher/adqEditPitcher",
254
   adqAccount_adqEditPitcher: "/api/pitcher/adqEditPitcher",
255
+  adqAccount_adqBindUserActionSetId: "/api/pitcher/adqBindUserActionSetId",
255
 };
256
 };
256
 
257
 
257
 export { api };
258
 export { api };

+ 20 - 26
project/src/components/dataBoard/adqAccount/accountReportConf.vue

10
         <div class="name"><em>*</em>关联企微:</div>
10
         <div class="name"><em>*</em>关联企微:</div>
11
         <self-channel title="" width="250px" type='corpIdList' :afferent_value='corpid' @channelDefine="(val)=>{corpid = val;}"></self-channel>
11
         <self-channel title="" width="250px" type='corpIdList' :afferent_value='corpid' @channelDefine="(val)=>{corpid = val;}"></self-channel>
12
       </div>
12
       </div>
13
-      <div class="itemBox">
13
+      <!-- <div class="itemBox">
14
         <div class="name">渠道编号:</div>
14
         <div class="name">渠道编号:</div>
15
         <el-input placeholder="请输入渠道编号" style="width:250px" v-model.trim="channel" size="small" clearable></el-input>
15
         <el-input placeholder="请输入渠道编号" style="width:250px" v-model.trim="channel" size="small" clearable></el-input>
16
-      </div>
16
+      </div> -->
17
     </div>
17
     </div>
18
     <div slot="footer" class="dialog-footer">
18
     <div slot="footer" class="dialog-footer">
19
       <el-button size="mini" @click="$emit('returnReportRule')">取 消</el-button>
19
       <el-button size="mini" @click="$emit('returnReportRule')">取 消</el-button>
30
   },
30
   },
31
   data () {
31
   data () {
32
     return {
32
     return {
33
-      corpid: '',
34
-      user_id: '',
35
-      time: [],
36
       loading: false,
33
       loading: false,
34
+      corpid: '',
37
       user_action_set_id: '',
35
       user_action_set_id: '',
38
-      channel: ''
39
     }
36
     }
40
   },
37
   },
41
   created () {
38
   created () {
42
-    if (this.editData && this.editData.wechat_account_id) {
39
+    if (this.editData && this.editData.account_id) {
43
       this.corpid = this.editData.corp_id ? this.editData.corp_id : '';
40
       this.corpid = this.editData.corp_id ? this.editData.corp_id : '';
44
       this.user_action_set_id = this.editData.user_action_set_id ? this.editData.user_action_set_id : '';
41
       this.user_action_set_id = this.editData.user_action_set_id ? this.editData.user_action_set_id : '';
45
-      this.channel = this.editData.channel ? this.editData.channel : '';
46
     }
42
     }
47
   },
43
   },
48
   methods: {
44
   methods: {
49
-    submitEvent () {
45
+    async submitEvent () {
50
       if (this.user_action_set_id == '') {
46
       if (this.user_action_set_id == '') {
51
         this.$message({
47
         this.$message({
52
           message: '请输入数据源ID',
48
           message: '请输入数据源ID',
61
         })
57
         })
62
         return
58
         return
63
       }
59
       }
64
-      this.loading = true
65
-      let axios_api = this.URL.pitcher_setAccountReportConf
66
-      let params = {
67
-        user_action_set_id: this.user_action_set_id,
68
-        corpid: this.corpid,
69
-        app_id: this.editData.wechat_account_id,
70
-        channel: this.channel
71
-      }
72
-      this.$axios.post(this.URL.BASEURL + axios_api, params).then((res) => {
73
-        var res = res.data
74
-        this.loading = false
60
+
61
+      try {
62
+        const params = {
63
+          account_id: this.editData.account_id,
64
+          user_action_set_id: this.user_action_set_id,
65
+          corpid: this.corpid,
66
+        }
67
+        this.loading = true
68
+        const { data: res = {} } = await this.$axios.post(`${this.URL.BASEURL}${this.URL.adqAccount_adqBindUserActionSetId}`, params)
75
         if (res && res.errno == 0) {
69
         if (res && res.errno == 0) {
70
+          this.$message.success('操作成功')
76
           this.$emit('returnReportRule', 'update')
71
           this.$emit('returnReportRule', 'update')
77
         } else if (res.errno != 4002) {
72
         } else if (res.errno != 4002) {
78
-          this.$message({
79
-            message: res.err,
80
-            type: "warning"
81
-          })
73
+          this.$message.warning(res.err)
82
         }
74
         }
83
-      }).catch((err) => {
75
+      } catch (error) {
76
+        console.log('error => ', error)
77
+      } finally {
84
         this.loading = false
78
         this.loading = false
85
-      });
79
+      }
86
     }
80
     }
87
   }
81
   }
88
 }
82
 }

+ 2 - 2
project/src/components/dataBoard/adqAccount/list.vue

11
             <el-button type="primary" plain size="mini" @click="clearSelect">清空选中</el-button>
11
             <el-button type="primary" plain size="mini" @click="clearSelect">清空选中</el-button>
12
           </div>
12
           </div>
13
         </div>
13
         </div>
14
-        <div class="c-FF604D f14 lMar28">重要提示:ADQ账号完成后请及时编辑渠道编号、数据源ID与企微主体</div>
14
+        <div class="c-FF604D f14 lMar28">重要提示:ADQ账号完成后请及时编辑数据源ID与企微主体</div>
15
       </div>
15
       </div>
16
       <div class="flex">
16
       <div class="flex">
17
         <el-popover placement="bottom" width="600" trigger="click">
17
         <el-popover placement="bottom" width="600" trigger="click">
91
       <reportRule :app_ids='app_ids' :editData='editData' v-if="reportRuleFlag" @returnReportRule="returnAddPitcher"></reportRule>
91
       <reportRule :app_ids='app_ids' :editData='editData' v-if="reportRuleFlag" @returnReportRule="returnAddPitcher"></reportRule>
92
     </el-dialog>
92
     </el-dialog>
93
     <!-- ADQ账号绑定数据源及企微 -->
93
     <!-- ADQ账号绑定数据源及企微 -->
94
-    <el-dialog :title="`${editData.account_name} - 编辑`" :visible.sync="accountReportConfFlag" :append-to-body="true" width="400px">
94
+    <el-dialog :title="`${editData.account_id} - 编辑`" :visible.sync="accountReportConfFlag" :append-to-body="true" width="400px">
95
       <accountReportConf :editData='editData' v-if="accountReportConfFlag" @returnReportRule="returnAddPitcher"></accountReportConf>
95
       <accountReportConf :editData='editData' v-if="accountReportConfFlag" @returnReportRule="returnAddPitcher"></accountReportConf>
96
     </el-dialog>
96
     </el-dialog>
97
 
97