|
@@ -274,11 +274,28 @@
|
|
|
:loading="bindCidServerLoading"
|
|
:loading="bindCidServerLoading"
|
|
|
@click="handleBindCidServer(scope.row)"
|
|
@click="handleBindCidServer(scope.row)"
|
|
|
>绑定cid服务</el-button>
|
|
>绑定cid服务</el-button>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
<el-button v-if="scope.row.userType !== '00'" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['company:user:edit']">修改</el-button>
|
|
<el-button v-if="scope.row.userType !== '00'" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['company:user:edit']">修改</el-button>
|
|
|
<el-button v-if="scope.row.userType !== '00'" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['company:user:remove']">删除</el-button>
|
|
<el-button v-if="scope.row.userType !== '00'" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['company:user:remove']">删除</el-button>
|
|
|
<el-button size="mini" type="text" icon="el-icon-key" @click="handleResetPwd(scope.row)" v-hasPermi="['company:user:resetPwd']">重置密码</el-button>
|
|
<el-button size="mini" type="text" icon="el-icon-key" @click="handleResetPwd(scope.row)" v-hasPermi="['company:user:resetPwd']">重置密码</el-button>
|
|
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-edit" @click="checkBindSipCallUser(scope.row)" v-if="scope.row.aiSipCallUserId==null">绑定sip角色</el-button>
|
|
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-search" @click="checkChangeSipCallUser(scope.row)" v-if="scope.row.aiSipCallUserId">修改sip角色</el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="!scope.row.accountId"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ icon="el-icon-link"
|
|
|
|
|
+ @click="handleBindXsy(scope.row)"
|
|
|
|
|
+ >绑定销售易</el-button>
|
|
|
|
|
+
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="scope.row.accountId"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ icon="el-icon-close"
|
|
|
|
|
+ @click="handleUnbindXsy(scope.row)"
|
|
|
|
|
+ >解绑销售易</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -739,10 +756,12 @@ import { getConfigByKey } from "@/api/company/companyConfig";
|
|
|
import axios from "axios";
|
|
import axios from "axios";
|
|
|
import {addCodeUrl} from "../../../api/company/companyUser";
|
|
import {addCodeUrl} from "../../../api/company/companyUser";
|
|
|
import selectDoctor from "@/views/qw/user/selectDoctor.vue";
|
|
import selectDoctor from "@/views/qw/user/selectDoctor.vue";
|
|
|
-import {bindCidServer,unbindCidServer} from "@/api/company/companyAiWorkflowServer"
|
|
|
|
|
|
|
+import {bindCidServer,unbindCidServer} from "@/api/company/companyAiWorkflowServer";
|
|
|
|
|
+import AiSipCallUser from "../../aiSipCall/aiSipCallUser.vue";
|
|
|
|
|
+import { bindXsyAccount,unbindXsyAccount,listXsyAccount} from "@/api/xsy/xsy";
|
|
|
export default {
|
|
export default {
|
|
|
name: "User",
|
|
name: "User",
|
|
|
- components: {selectDoctor, Treeselect ,selectUser},
|
|
|
|
|
|
|
+ components: {selectDoctor, Treeselect ,selectUser,AiSipCallUser},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
bindCidServerLoading:false,
|
|
bindCidServerLoading:false,
|
|
@@ -952,6 +971,20 @@ export default {
|
|
|
selectedFsUserIds: [],
|
|
selectedFsUserIds: [],
|
|
|
boundUsersList: [],
|
|
boundUsersList: [],
|
|
|
bindUserLoading: false,
|
|
bindUserLoading: false,
|
|
|
|
|
+ // 销售易绑定弹窗
|
|
|
|
|
+ xsyBindDialog: {
|
|
|
|
|
+ open: false,
|
|
|
|
|
+ title: '绑定销售易账号',
|
|
|
|
|
+ loading: false
|
|
|
|
|
+ },
|
|
|
|
|
+ // 销售易账号列表
|
|
|
|
|
+ xsyAccountList: [],
|
|
|
|
|
+ // 绑定表单
|
|
|
|
|
+ xsyBindForm: {
|
|
|
|
|
+ companyUserId: null,
|
|
|
|
|
+ nickName: '',
|
|
|
|
|
+ accountId: null
|
|
|
|
|
+ },
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
@@ -1759,7 +1792,7 @@ export default {
|
|
|
this.$message.success('解绑成功');
|
|
this.$message.success('解绑成功');
|
|
|
this.getList();
|
|
this.getList();
|
|
|
}).catch(res=>{
|
|
}).catch(res=>{
|
|
|
- this.bindCidServerLoading = false;
|
|
|
|
|
|
|
+ this.bindCidServerLoading = false;
|
|
|
console.log(res)
|
|
console.log(res)
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -1852,6 +1885,79 @@ export default {
|
|
|
this.boundUsersList = [];
|
|
this.boundUsersList = [];
|
|
|
this.bindUserLoading = false;
|
|
this.bindUserLoading = false;
|
|
|
},
|
|
},
|
|
|
|
|
+ checkBindSipCallUser(row){
|
|
|
|
|
+ this.$refs.aiSipCallUser.handleAddCompanyUserOnSip(row.userName,row.nickName,row.userId);
|
|
|
|
|
+ },
|
|
|
|
|
+ checkChangeSipCallUser(row){
|
|
|
|
|
+ this.$refs.aiSipCallUser.handleUpdateById(row.aiSipCallUserId);
|
|
|
|
|
+ },
|
|
|
|
|
+ // 打开绑定销售易账号弹窗
|
|
|
|
|
+ handleBindXsy(row) {
|
|
|
|
|
+ this.xsyBindForm = {
|
|
|
|
|
+ companyUserId: row.userId,
|
|
|
|
|
+ nickName: row.nickName,
|
|
|
|
|
+ accountId: null
|
|
|
|
|
+ }
|
|
|
|
|
+ this.xsyAccountList = []
|
|
|
|
|
+ this.xsyBindDialog.open = true
|
|
|
|
|
+ this.xsyBindDialog.loading = true
|
|
|
|
|
+
|
|
|
|
|
+ listXsyAccount({
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 9999
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ this.xsyAccountList = res.rows || []
|
|
|
|
|
+ }).finally(() => {
|
|
|
|
|
+ this.xsyBindDialog.loading = false
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 取消绑定销售易
|
|
|
|
|
+ cancelBindXsy() {
|
|
|
|
|
+ this.xsyBindDialog.open = false
|
|
|
|
|
+ this.xsyBindForm = {
|
|
|
|
|
+ companyUserId: null,
|
|
|
|
|
+ nickName: '',
|
|
|
|
|
+ accountId: null
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 提交绑定销售易
|
|
|
|
|
+ submitBindXsy() {
|
|
|
|
|
+ if (!this.xsyBindForm.accountId) {
|
|
|
|
|
+ this.$message.warning('请选择销售易账号')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ bindXsyAccount({
|
|
|
|
|
+ companyUserId: this.xsyBindForm.companyUserId,
|
|
|
|
|
+ accountId: this.xsyBindForm.accountId
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ this.msgSuccess('绑定成功')
|
|
|
|
|
+ this.xsyBindDialog.open = false
|
|
|
|
|
+ this.getList()
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 解绑销售易账号
|
|
|
|
|
+ handleUnbindXsy(row) {
|
|
|
|
|
+ this.$confirm('是否确认解绑当前员工的销售易账号?', '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ return unbindXsyAccount({
|
|
|
|
|
+ companyUserId: row.userId
|
|
|
|
|
+ })
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ this.msgSuccess('解绑成功')
|
|
|
|
|
+ this.getList()
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(() => {})
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|