|
@@ -66,8 +66,8 @@
|
|
|
<el-table-column label="企微成员ID" align="center" prop="id" />
|
|
|
<el-table-column label="企微账号" align="center" prop="qwUserId" />
|
|
|
<el-table-column label="企微昵称" align="center" prop="qwUserName" />
|
|
|
- <el-table-column label="所属部门" align="center" prop="departmentName" />
|
|
|
- <el-table-column label="活码编号" align="center" prop="configId" />
|
|
|
+ <el-table-column label="员工称呼" align="center" prop="welcomeText" />
|
|
|
+ <!-- <el-table-column label="所属部门" align="center" prop="departmentName" />-->
|
|
|
<el-table-column label="联系我二维码" align="center" prop="contactWay" >
|
|
|
<template slot-scope="scope">
|
|
|
<el-image
|
|
@@ -80,19 +80,19 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="绑定的AI客服" align="center" prop="fastGptRoleName" />
|
|
|
<el-table-column label="授权码" align="center" prop="appKey" />
|
|
|
- <el-table-column label="企微状态" align="center" prop="loginStatus">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag v-if="scope.row.loginStatus == 1 && scope.row.toolStatus==1" type="success">在线</el-tag>
|
|
|
- <el-tag v-else type="danger">离线</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="插件状态" align="center" prop="toolStatus">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag v-if="scope.row.toolStatus == 1" type="success">在线</el-tag>
|
|
|
- <el-tag v-else type="danger">离线</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="插件版本" align="center" prop="version"/>
|
|
|
+ <!-- <el-table-column label="企微状态" align="center" prop="loginStatus">-->
|
|
|
+ <!-- <template slot-scope="scope">-->
|
|
|
+ <!-- <el-tag v-if="scope.row.loginStatus == 1 && scope.row.toolStatus==1" type="success">在线</el-tag>-->
|
|
|
+ <!-- <el-tag v-else type="danger">离线</el-tag>-->
|
|
|
+ <!-- </template>-->
|
|
|
+ <!-- </el-table-column>-->
|
|
|
+ <!-- <el-table-column label="插件状态" align="center" prop="toolStatus">-->
|
|
|
+ <!-- <template slot-scope="scope">-->
|
|
|
+ <!-- <el-tag v-if="scope.row.toolStatus == 1" type="success">在线</el-tag>-->
|
|
|
+ <!-- <el-tag v-else type="danger">离线</el-tag>-->
|
|
|
+ <!-- </template>-->
|
|
|
+ <!-- </el-table-column>-->
|
|
|
+ <!-- <el-table-column label="插件版本" align="center" prop="version"/>-->
|
|
|
<el-table-column label="服务器地址" align="center" prop="loginCodeUrl">
|
|
|
<template slot-scope="scope">
|
|
|
<el-tooltip class="item" effect="dark" :content="scope.row.loginCodeUrl" placement="top">
|
|
@@ -102,33 +102,44 @@
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100px" fixed="right">
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120px" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
- icon="el-icon-sunny"
|
|
|
+ icon="el-icon-user-solid"
|
|
|
plain
|
|
|
- @click="handleLoginQwCode(scope.row)"
|
|
|
- v-hasPermi="['qw:user:login']"
|
|
|
+ @click="handleAppellation(scope.row)"
|
|
|
>
|
|
|
- 登录企微
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- v-if="scope.row.appKey!=null && scope.row.toolStatus === 1 && scope.row.loginStatus === 1"
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-moon"
|
|
|
- plain
|
|
|
- @click="handleLoginOutQwStatus(scope.row)"
|
|
|
- v-hasPermi="['qw:user:login']"
|
|
|
- >
|
|
|
- 退出企微
|
|
|
+ 修改员工称呼
|
|
|
</el-button>
|
|
|
|
|
|
+ <!-- <el-button-->
|
|
|
+ <!-- v-if="scope.row.toolStatus==1"-->
|
|
|
+ <!-- size="mini"-->
|
|
|
+ <!-- type="text"-->
|
|
|
+ <!-- icon="el-icon-sunny"-->
|
|
|
+ <!-- plain-->
|
|
|
+ <!-- @click="handleLoginQwCode(scope.row)"-->
|
|
|
+ <!-- v-hasPermi="['qw:user:login']"-->
|
|
|
+ <!-- >-->
|
|
|
+ <!-- 登录企微-->
|
|
|
+ <!-- </el-button>-->
|
|
|
+ <!-- <el-button-->
|
|
|
+ <!-- v-if="scope.row.appKey!=null && scope.row.toolStatus === 1 && scope.row.loginStatus === 1"-->
|
|
|
+ <!-- size="mini"-->
|
|
|
+ <!-- type="text"-->
|
|
|
+ <!-- icon="el-icon-moon"-->
|
|
|
+ <!-- plain-->
|
|
|
+ <!-- @click="handleLoginOutQwStatus(scope.row)"-->
|
|
|
+ <!-- v-hasPermi="['qw:user:login']"-->
|
|
|
+ <!-- >-->
|
|
|
+ <!-- 退出企微-->
|
|
|
+ <!-- </el-button>-->
|
|
|
+
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="主机" align="center" class-name="small-padding fixed-width" width="170px" fixed="right">
|
|
|
+ <el-table-column label="主机" align="center" class-name="small-padding fixed-width" width="110px" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-button
|
|
@@ -138,11 +149,11 @@
|
|
|
icon="el-icon-s-check"
|
|
|
plain
|
|
|
v-hasPermi="['qw:user:authAppKey']"
|
|
|
- @click="handleAuthorizeKey(scope.row)"
|
|
|
+ @click="uploadAuthorizeKey2(scope.row)"
|
|
|
>授权key
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- v-if="scope.row.loginCodeUrl==null"
|
|
|
+ v-if="scope.row.loginCodeUrl==null && scope.row.appKey !=null"
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-sunny"
|
|
@@ -156,7 +167,7 @@
|
|
|
v-if="scope.row.loginCodeUrl!=null"
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
- icon="el-icon-moon"
|
|
|
+ icon="el-icon-video-camera-solid"
|
|
|
plain
|
|
|
@click="handleCloudAP(scope.row.loginCodeUrl)"
|
|
|
v-hasPermi="['qw:user:cloudAP']"
|
|
@@ -176,7 +187,7 @@
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="AI客服" align="center" class-name="small-padding fixed-width" width="180px" fixed="right">
|
|
|
+ <el-table-column label="AI客服" align="center" class-name="small-padding fixed-width" width="100px" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
@@ -219,16 +230,16 @@
|
|
|
<fast-gpt-role ref="fastGptRole" @refreshFastGptList="refreshFastGptList" ></fast-gpt-role>
|
|
|
</el-dialog>
|
|
|
|
|
|
-<!-- <el-dialog :visible.sync="updateIp.open" width="600px" append-to-body>-->
|
|
|
-<!-- <el-form ref="updateIpForm" :model="updateIpForm" :rules="updateIpRule" label-width="100px">-->
|
|
|
-<!-- <el-form-item label="新云主机IP" prop="Ip">-->
|
|
|
-<!-- <el-input v-model="updateIpForm.newIp" placeholder="请输入新IP" />-->
|
|
|
-<!-- </el-form-item>-->
|
|
|
-<!-- </el-form>-->
|
|
|
-<!-- <div slot="footer" class="dialog-footer" >-->
|
|
|
-<!-- <el-button type="primary" @click="submitUpdateIpForm">确 定</el-button>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </el-dialog>-->
|
|
|
+ <!-- <el-dialog :visible.sync="updateIp.open" width="600px" append-to-body>-->
|
|
|
+ <!-- <el-form ref="updateIpForm" :model="updateIpForm" :rules="updateIpRule" label-width="100px">-->
|
|
|
+ <!-- <el-form-item label="新云主机IP" prop="Ip">-->
|
|
|
+ <!-- <el-input v-model="updateIpForm.newIp" placeholder="请输入新IP" />-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
+ <!-- </el-form>-->
|
|
|
+ <!-- <div slot="footer" class="dialog-footer" >-->
|
|
|
+ <!-- <el-button type="primary" @click="submitUpdateIpForm">确 定</el-button>-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!-- </el-dialog>-->
|
|
|
|
|
|
<el-dialog title="云主机信息" :visible.sync="cloudAPOpen.open" append-to-body>
|
|
|
<el-card class="box-card">
|
|
@@ -241,15 +252,26 @@
|
|
|
</el-card>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <el-dialog :title="callOpen.title" :visible.sync="callOpen.open" width="500px" append-to-body>
|
|
|
+ <el-form ref="callOpenFrom" :model="callOpenFrom" :rules="callOpenRule" label-width="110px">
|
|
|
+ <el-form-item label="员工称呼" prop="welcomeText">
|
|
|
+ <el-input v-model="callOpenFrom.welcomeText" placeholder="请输入员工称呼" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer" >
|
|
|
+ <el-button type="primary" @click="submitCallOpenFrom">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<el-dialog title="授权key" :visible.sync="authorizeKeyOpen" width="500px" append-to-body>
|
|
|
- <el-form ref="authorizeKeyFrom" :model="authorizeKeyFrom" :rules="authorizeKeyRule" label-width="110px">
|
|
|
- <el-form-item label="授权的key值" prop="appKey">
|
|
|
- <el-input v-model="authorizeKeyFrom.appKey" placeholder="请输入授权key" />
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <div slot="footer" class="dialog-footer" >
|
|
|
- <el-button type="primary" @click="submitAuthorizeKeyForm">确 定</el-button>
|
|
|
- </div>
|
|
|
+ <el-form ref="authorizeKeyFrom" :model="authorizeKeyFrom" :rules="authorizeKeyRule" label-width="110px">
|
|
|
+ <el-form-item label="授权的key值" prop="appKey">
|
|
|
+ <el-input v-model="authorizeKeyFrom.appKey" placeholder="请输入授权key" type="Number"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer" >
|
|
|
+ <el-button type="primary" @click="submitAuthorizeKeyForm">确 定</el-button>
|
|
|
+ </div>
|
|
|
</el-dialog>
|
|
|
<!--二维码 -->
|
|
|
<el-dialog
|
|
@@ -383,6 +405,15 @@ export default {
|
|
|
admin:null,
|
|
|
passWord:null,
|
|
|
},
|
|
|
+ callOpen:{
|
|
|
+ open:false,
|
|
|
+ title: '修改员工称呼',
|
|
|
+
|
|
|
+ },
|
|
|
+ callOpenFrom:{
|
|
|
+ id:null,
|
|
|
+ welcomeText:null,
|
|
|
+ },
|
|
|
qrCodeInterval:null,
|
|
|
loginQwInterval:null,
|
|
|
loginOutQwInterval:null,
|
|
@@ -403,6 +434,9 @@ export default {
|
|
|
authorizeKeyRule:{
|
|
|
appKey:[{required:true,message:"授权码不能为空",trigger:"blur"}]
|
|
|
},
|
|
|
+ callOpenRule:{
|
|
|
+ welcomeText:[{required:true,message:"员工称呼不能为空",trigger:"blur"}]
|
|
|
+ },
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
},
|
|
@@ -482,13 +516,17 @@ export default {
|
|
|
|
|
|
},
|
|
|
|
|
|
+ handleAppellation(val){
|
|
|
+ this.callOpen.open=true;
|
|
|
+ this.callOpenFrom.welcomeText=val.welcomeText;
|
|
|
+ this.callOpenFrom.id=val.id;
|
|
|
+ },
|
|
|
//登录
|
|
|
-
|
|
|
handleLoginQwCode(val){
|
|
|
|
|
|
// v-if="scope.row.appKey!=null && scope.row.toolStatus === 1 && scope.row.loginStatus === 0"
|
|
|
if (val.appKey==null || val.appKey===''){
|
|
|
- return this.$message.warning("没有授权码,无法登录企业微信,请联系管理员开通");
|
|
|
+ return this.$message.warning("没有授权码,无法登录企业微信,请授权");
|
|
|
}
|
|
|
|
|
|
if (val.toolStatus===0 || val.toolStatus==null ){
|
|
@@ -674,14 +712,31 @@ export default {
|
|
|
},
|
|
|
|
|
|
handleUnbindCloudHost(val){
|
|
|
- qwUnbindCloudHost(val.appKey).then(res => {
|
|
|
- this.$message.success('解绑成功');
|
|
|
|
|
|
- }).finally(() => {
|
|
|
+ const appKey=val.appKey;
|
|
|
+
|
|
|
+ this.$confirm(
|
|
|
+ '确定要给企微账号:<span style="color: green;">' +val.qwUserId + '' +
|
|
|
+ '</span><br>企微昵称:<span style="color: red;">【' + val.qwUserName + '】</span>' +
|
|
|
+ '</span><br><span style="color: orange;">解绑【Ps:解绑后此云主机可能会分配给他人】</span></span>',
|
|
|
+ "警告",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ dangerouslyUseHTMLString: true // 允许使用 HTML 字符串
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ return qwUnbindCloudHost(appKey);
|
|
|
+ }).then(response => {
|
|
|
+ this.$message.success('解绑成功');
|
|
|
+ }).finally(res=>{
|
|
|
this.getList();
|
|
|
})
|
|
|
+
|
|
|
},
|
|
|
|
|
|
+
|
|
|
handleAuthorizeKey(val){
|
|
|
this.authorizeKeyFrom.id=val.id;
|
|
|
this.authorizeKeyFrom.qwUserId=val.qwUserId;
|
|
@@ -699,6 +754,22 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ submitCallOpenFrom(){
|
|
|
+
|
|
|
+ this.$refs["callOpenFrom"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+
|
|
|
+ if (this.callOpenFrom.id != null && this.callOpenFrom.welcomeText != null) {
|
|
|
+ updateUser(this.callOpenFrom).then(res=>{
|
|
|
+ this.$message.success('修改成功');
|
|
|
+ this.callOpen.open=false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
|
|
|
uploadAuthorizeKey(){
|
|
|
this.$confirm(
|
|
@@ -723,17 +794,58 @@ export default {
|
|
|
})
|
|
|
|
|
|
},
|
|
|
+
|
|
|
+ uploadAuthorizeKey2(val){
|
|
|
+ const id=val.id;
|
|
|
+ this.$confirm(
|
|
|
+ '确定要给企微账号:<span style="color: green;">' +val.qwUserId + '' +
|
|
|
+ '</span><br>企微昵称:<span style="color: red;">【' + val.qwUserName + '】</span>' +
|
|
|
+ '</span><br>授权key</span>?',
|
|
|
+ "警告",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ dangerouslyUseHTMLString: true // 允许使用 HTML 字符串
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ return handleAuthAppKey({id:id});
|
|
|
+ }).then(response => {
|
|
|
+ this.msgSuccess("授权key完成");
|
|
|
+ }).finally(res=>{
|
|
|
+ this.resetAuthorizeKeyFrom();
|
|
|
+ this.getList();
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
handleBindCloudHost(val){
|
|
|
|
|
|
if (val.appKey == null || val.appKey == '') {
|
|
|
return this.$message.warning('没有授权码,无法绑定主机,请联系管理员');
|
|
|
}
|
|
|
|
|
|
- qwBindCloudHost(val.appKey).then(res => {
|
|
|
- this.$message.success('绑定成功');
|
|
|
- }).finally(() => {
|
|
|
+ const appKey=val.appKey;
|
|
|
+
|
|
|
+ this.$confirm(
|
|
|
+ '确定要给企微账号:<span style="color: green;">' +val.qwUserId + '' +
|
|
|
+ '</span><br>企微昵称:<span style="color: red;">【' + val.qwUserName + '】</span>' +
|
|
|
+ '</span><br><span style="color: dodgerblue;">绑定云主机?</span></span>',
|
|
|
+ "警告",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ dangerouslyUseHTMLString: true // 允许使用 HTML 字符串
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ return qwBindCloudHost(appKey);
|
|
|
+ }).then(response => {
|
|
|
+ this.$message.success('绑定成功,请登录云主机进行配置~~');
|
|
|
+ }).finally(res=>{
|
|
|
this.getList();
|
|
|
})
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
|
|
|
openImageViewer(url) {
|
|
@@ -766,10 +878,10 @@ export default {
|
|
|
//重置授权
|
|
|
resetAuthorizeKeyFrom(){
|
|
|
this.authorizeKeyFrom={
|
|
|
- id:null,
|
|
|
- appKey:null,
|
|
|
- qwUserId:null,
|
|
|
- qwUserName:null
|
|
|
+ id:null,
|
|
|
+ appKey:null,
|
|
|
+ qwUserId:null,
|
|
|
+ qwUserName:null
|
|
|
};
|
|
|
},
|
|
|
//重置登录
|