|
@@ -101,12 +101,15 @@
|
101
|
101
|
<el-table-column label="操作" align="center" width="150px">
|
102
|
102
|
<template slot-scope="scope">
|
103
|
103
|
<div class="flex" style="justify-content:center">
|
104
|
|
- <div class="c-00B38A pointer table_button" @click="goDetail(scope.row.rule_id)">详情</div>
|
105
|
|
- <div class="c-00B38A pointer table_button lMar14" v-if="scope.row.send_type == 2" @click="createFriCircle('edit',scope.row.rule_id)">编辑</div>
|
|
104
|
+ <div :class="['pointer','table_button',scope.row.enable == 1 ? 'c-FF604D' :'c-007AFF']" v-if="scope.row.enable == 1 || scope.row.enable == 0"
|
|
105
|
+ @click="enableForbidden(scope.row)">
|
|
106
|
+ {{scope.row.enable == 1 ? '禁用' : scope.row.enable == 0 ? '启用':''}}
|
|
107
|
+ </div>
|
|
108
|
+ <div class="c-00B38A pointer table_button lMar5" @click="scope.row.send_type == 2 ? createFriCircle('edit',scope.row.rule_id) : goDetail(scope.row.rule_id)">详情</div>
|
106
|
109
|
<el-popconfirm
|
107
|
110
|
@confirm="remindClick(scope.row.rule_id)"
|
108
|
111
|
:title="'企微助手将提醒未发送朋友圈的'+scope.row.unpublished_count+'名员工发朋友圈,是否确认提醒 ?'">
|
109
|
|
- <div slot="reference" class="c-00B38A pointer table_button lMar14">提醒</div>
|
|
112
|
+ <div slot="reference" class="c-00B38A pointer table_button lMar5">提醒</div>
|
110
|
113
|
</el-popconfirm>
|
111
|
114
|
</div>
|
112
|
115
|
</template>
|
|
@@ -162,6 +165,42 @@ export default {
|
162
|
165
|
this.init(1)
|
163
|
166
|
},
|
164
|
167
|
methods:{
|
|
168
|
+ enableForbidden (item) {
|
|
169
|
+ if (item.enable != 1 && item.enable != 0) {
|
|
170
|
+ return
|
|
171
|
+ }
|
|
172
|
+ this.$confirm(`确定${item.enable == 1 ? '禁用' : '启用'}【${item.name}】?`, '提示', {
|
|
173
|
+ confirmButtonText: '确定',
|
|
174
|
+ cancelButtonText: '取消',
|
|
175
|
+ type: 'warning'
|
|
176
|
+ }).then(() => {
|
|
177
|
+ this.$loading(this.$loadingConfig);
|
|
178
|
+ this.$axios.get(this.URL.BASEURL + this.URL.FriendsCircleChangeStatus, {
|
|
179
|
+ params: {
|
|
180
|
+ rule_id: item.rule_id,
|
|
181
|
+ status: item.enable == 1 ? 0 : 1
|
|
182
|
+ }
|
|
183
|
+ }).then((res) => {
|
|
184
|
+ var res = res.data;
|
|
185
|
+ this.$loading(this.$loadingConfig).close();
|
|
186
|
+ if (res && res.errno == 0) {
|
|
187
|
+ this.$message({
|
|
188
|
+ message: '操作成功!',
|
|
189
|
+ type: 'success'
|
|
190
|
+ })
|
|
191
|
+ this.init(1)
|
|
192
|
+ } else {
|
|
193
|
+ this.$message({
|
|
194
|
+ message: res.err,
|
|
195
|
+ type: 'warning'
|
|
196
|
+ })
|
|
197
|
+ }
|
|
198
|
+ }).catch(() => {
|
|
199
|
+ this.$loading(this.$loadingConfig).close();
|
|
200
|
+ })
|
|
201
|
+ }).catch(() => {
|
|
202
|
+ })
|
|
203
|
+ },
|
165
|
204
|
changeDrawerSize () {
|
166
|
205
|
this.drawerSize = this.drawerSize == '100%' ? '60%' : '100%'
|
167
|
206
|
},
|