|
@@ -1,7 +1,9 @@
|
|
import {
|
|
import {
|
|
|
|
+ ajaxChangeEntGroup,
|
|
ajaxFollowEntAdd,
|
|
ajaxFollowEntAdd,
|
|
ajaxFollowEntCancel,
|
|
ajaxFollowEntCancel,
|
|
ajaxFollowEntInfo,
|
|
ajaxFollowEntInfo,
|
|
|
|
+ ajaxGetGroupList,
|
|
ajaxMonitorGroup
|
|
ajaxMonitorGroup
|
|
} from '../api/follow-ent'
|
|
} from '../api/follow-ent'
|
|
import MonitorApiBase from './base'
|
|
import MonitorApiBase from './base'
|
|
@@ -102,4 +104,45 @@ export default class MonitorEntApi extends MonitorApiBase {
|
|
return result
|
|
return result
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ async ajaxChange(params = {}) {
|
|
|
|
+ const { groupId, callback } = params
|
|
|
|
+ return ajaxChangeEntGroup({ entId: this.id, groups: groupId }).then(
|
|
|
|
+ (res) => {
|
|
|
|
+ const result = {
|
|
|
|
+ success: false,
|
|
|
|
+ msg: '',
|
|
|
|
+ data: {}
|
|
|
|
+ }
|
|
|
|
+ result.success = res?.error_code === 0 && res?.data === 'success'
|
|
|
|
+ result.data = res?.data
|
|
|
|
+ if (result.success) {
|
|
|
|
+ callback && callback()
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ result.msg = res?.error_msg || '抱歉,操作失败'
|
|
|
|
+ }
|
|
|
|
+ return result
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ async ajaxOnlyGroup(type = 'get') {
|
|
|
|
+ return ajaxGetGroupList(type).then((res) => {
|
|
|
|
+ const result = {
|
|
|
|
+ success: false,
|
|
|
|
+ msg: '',
|
|
|
|
+ data: {}
|
|
|
|
+ }
|
|
|
|
+ result.success = res?.error_code === 0
|
|
|
|
+ result.data = res?.data
|
|
|
|
+ if (result.success) {
|
|
|
|
+ this.groupList = res.data?.groupUserArr
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ result.msg = res?.error_msg || '抱歉,操作失败'
|
|
|
|
+ }
|
|
|
|
+ return result
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|