|
@@ -308,6 +308,21 @@
|
|
|
<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-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 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>
|
|
@@ -825,6 +840,37 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
+ <!-- 绑定销售易账号 -->
|
|
|
|
|
+ <el-dialog :title="xsyBindDialog.title" :visible.sync="xsyBindDialog.open" width="500px" append-to-body>
|
|
|
|
|
+ <el-form ref="xsyBindFormRef" :model="xsyBindForm" label-width="100px">
|
|
|
|
|
+ <el-form-item label="员工姓名">
|
|
|
|
|
+ <el-input v-model="xsyBindForm.nickName" disabled />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="销售易账号" prop="accountId">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="xsyBindForm.accountId"
|
|
|
|
|
+ filterable
|
|
|
|
|
+ clearable
|
|
|
|
|
+ placeholder="请选择销售易账号"
|
|
|
|
|
+ style="width: 100%;"
|
|
|
|
|
+ :loading="xsyBindDialog.loading"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in xsyAccountList"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ :label="item.accountName"
|
|
|
|
|
+ :value="item.id"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button type="primary" @click="submitBindXsy">确 定</el-button>
|
|
|
|
|
+ <el-button @click="cancelBindXsy">取 消</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
<ai-sip-call-user ref="aiSipCallUser" v-show="false" @refreshParentData="getList" />
|
|
<ai-sip-call-user ref="aiSipCallUser" v-show="false" @refreshParentData="getList" />
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
@@ -864,6 +910,7 @@ import {addCodeUrl, bindSaleAndFsUser, getSaleBindUserList} from "../../../api/c
|
|
|
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 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,AiSipCallUser},
|
|
components: {selectDoctor, Treeselect ,selectUser,AiSipCallUser},
|
|
@@ -1092,6 +1139,20 @@ export default {
|
|
|
selectedFsUserIds: [],
|
|
selectedFsUserIds: [],
|
|
|
boundUsersList: [],
|
|
boundUsersList: [],
|
|
|
bindUserLoading: false,
|
|
bindUserLoading: false,
|
|
|
|
|
+ // 销售易绑定弹窗
|
|
|
|
|
+ xsyBindDialog: {
|
|
|
|
|
+ open: false,
|
|
|
|
|
+ title: '绑定销售易账号',
|
|
|
|
|
+ loading: false
|
|
|
|
|
+ },
|
|
|
|
|
+ // 销售易账号列表
|
|
|
|
|
+ xsyAccountList: [],
|
|
|
|
|
+ // 绑定表单
|
|
|
|
|
+ xsyBindForm: {
|
|
|
|
|
+ companyUserId: null,
|
|
|
|
|
+ nickName: '',
|
|
|
|
|
+ accountId: null
|
|
|
|
|
+ },
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
},
|
|
},
|
|
@@ -2123,7 +2184,74 @@ export default {
|
|
|
},
|
|
},
|
|
|
checkChangeSipCallUser(row){
|
|
checkChangeSipCallUser(row){
|
|
|
this.$refs.aiSipCallUser.handleUpdateById(row.aiSipCallUserId);
|
|
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>
|