|
@@ -10,10 +10,10 @@
|
10
|
10
|
<div class="name"><em>*</em>关联企微:</div>
|
11
|
11
|
<self-channel title="" width="250px" type='corpIdList' :afferent_value='corpid' @channelDefine="(val)=>{corpid = val;}"></self-channel>
|
12
|
12
|
</div>
|
13
|
|
- <div class="itemBox">
|
|
13
|
+ <!-- <div class="itemBox">
|
14
|
14
|
<div class="name">渠道编号:</div>
|
15
|
15
|
<el-input placeholder="请输入渠道编号" style="width:250px" v-model.trim="channel" size="small" clearable></el-input>
|
16
|
|
- </div>
|
|
16
|
+ </div> -->
|
17
|
17
|
</div>
|
18
|
18
|
<div slot="footer" class="dialog-footer">
|
19
|
19
|
<el-button size="mini" @click="$emit('returnReportRule')">取 消</el-button>
|
|
@@ -30,23 +30,19 @@ export default {
|
30
|
30
|
},
|
31
|
31
|
data () {
|
32
|
32
|
return {
|
33
|
|
- corpid: '',
|
34
|
|
- user_id: '',
|
35
|
|
- time: [],
|
36
|
33
|
loading: false,
|
|
34
|
+ corpid: '',
|
37
|
35
|
user_action_set_id: '',
|
38
|
|
- channel: ''
|
39
|
36
|
}
|
40
|
37
|
},
|
41
|
38
|
created () {
|
42
|
|
- if (this.editData && this.editData.wechat_account_id) {
|
|
39
|
+ if (this.editData && this.editData.account_id) {
|
43
|
40
|
this.corpid = this.editData.corp_id ? this.editData.corp_id : '';
|
44
|
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
|
44
|
methods: {
|
49
|
|
- submitEvent () {
|
|
45
|
+ async submitEvent () {
|
50
|
46
|
if (this.user_action_set_id == '') {
|
51
|
47
|
this.$message({
|
52
|
48
|
message: '请输入数据源ID',
|
|
@@ -61,28 +57,26 @@ export default {
|
61
|
57
|
})
|
62
|
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
|
69
|
if (res && res.errno == 0) {
|
|
70
|
+ this.$message.success('操作成功')
|
76
|
71
|
this.$emit('returnReportRule', 'update')
|
77
|
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
|
78
|
this.loading = false
|
85
|
|
- });
|
|
79
|
+ }
|
86
|
80
|
}
|
87
|
81
|
}
|
88
|
82
|
}
|