瀏覽代碼

红包配置

zyp 2 周之前
父節點
當前提交
1ffd629317

+ 19 - 0
src/api/company/companyUser.js

@@ -209,3 +209,22 @@ export function generateSubDomain() {
     method: 'get'
   })
 }
+
+export function getCitysAreaList(query) {
+  return request({
+    url: '/company/user/getCitysAreaList',
+    method: 'get',
+    params: query
+  })
+}
+
+/**
+ * 批量修改 销售的所属区域(临时的)
+ */
+export function updateCompanyUserAreaList(data) {
+  return request({
+    url: '/company/user/updateCompanyUserAreaList',
+    method: 'post',
+    data: data
+  })
+}

+ 82 - 6
src/views/company/companyUser/index.vue

@@ -63,15 +63,15 @@
              v-hasPermi="['qw:user:sync']"
            >同步企微员工和部门</el-button>
           </el-col>
-          <!-- <el-col :span="1.5">
+          <el-col :span="1.5">
             <el-button
               type="primary"
               plain
               size="mini"
-              @click="qwSyncDept"
-              v-hasPermi="['qw:qwDept:list']"
-            >同步企微部门</el-button>
-          </el-col> -->
+              :disabled="multiple"
+              @click="handerCompanyUserAreaList"
+            >批量设置销售所属区域(原有的暂用)</el-button>
+          </el-col>
           <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
         </el-row>
 
@@ -305,6 +305,21 @@
               <el-button type="primary" @click="generateSubDomain" style="margin-left: 10px;">生成</el-button>
             </el-form-item>
           </el-col>
+
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="销售区域" prop="addressId">
+              <el-select v-model="form.addressId"  filterable placeholder="请选择所属销售的区域" style="width: 200px;">
+                <el-option
+                  v-for="item in citysAreaList"
+                  :key="item.cityId"
+                  :label="item.cityName"
+                  :value="item.cityId"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
         </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -316,11 +331,37 @@
       <selectUser ref="selectUser" @bindQwUser="bindQwUser"></selectUser>
     </el-dialog>
     <gw-query-list-dialog :visible="gwSearchOpen"/>
+    <el-dialog :title="companyUserArea.title" :visible.sync="companyUserArea.open" width="300px" append-to-body>
+      <el-select v-model="addressId"  filterable placeholder="请选择所属销售的区域" style="width: 200px;">
+        <el-option
+          v-for="item in citysAreaList"
+          :key="item.cityId"
+          :label="item.cityName"
+          :value="item.cityId"
+        ></el-option>
+      </el-select>
+      <div slot="footer" style="text-align: center;">
+        <el-button type="primary" @click="submitFormArea(addressId)">确 定</el-button>
+        <el-button @click="cancelArea">取 消</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import {qwList, delUser,addUser,getUser,updateUser,exportUser, resetUserPwd,changeUserStatus,importTemplate,generateSubDomain} from "@/api/company/companyUser";
+import {
+  qwList,
+  delUser,
+  addUser,
+  getUser,
+  updateUser,
+  exportUser,
+  resetUserPwd,
+  changeUserStatus,
+  importTemplate,
+  generateSubDomain,
+  getCitysAreaList, updateCompanyUserAreaList
+} from '@/api/company/companyUser'
 import { getToken } from "@/utils/auth";
 import { treeselect } from "@/api/company/companyDept";
 import Treeselect from "@riophae/vue-treeselect";
@@ -336,6 +377,13 @@ export default {
   components: {GwQueryListDialog, Treeselect ,selectUser},
   data() {
     return {
+      companyUserArea:{
+        open:false,
+        title:"分配区域",
+      },
+      //选择的区域
+      addressId:null,
+      citysAreaList:[],
       // 遮罩层
       loading: false,
       qwUserList:[],
@@ -440,6 +488,9 @@ export default {
         password: [
           { required: true, message: "员工密码不能为空", trigger: "blur" },
         ],
+        addressId: [
+          { required: true, message: "销售所属区域不能为空", trigger: "blur" },
+        ],
         idCard: [
           { required: true, message: "身份证号不能为空", trigger: "blur" },
         ],
@@ -476,6 +527,9 @@ export default {
     },
   },
   created() {
+    getCitysAreaList().then(res=>{
+      this.citysAreaList=res.data;
+    })
     this.getList();
     this.getTreeselect();
     this.getDicts("sys_normal_disable").then((response) => {
@@ -496,6 +550,28 @@ export default {
     });
   },
   methods: {
+    submitFormArea(address){
+      const uIds = this.ids;
+
+      if (address == null){
+        this.$message.error("请选择地区");
+        return;
+      }
+      updateCompanyUserAreaList({userIds:uIds,addressId:address}).then(res=>{
+        this.companyUserArea.open=false;
+        this.getList();
+        this.msgSuccess("操作成功");
+
+      })
+
+    },
+    cancelArea(){
+      this.companyUserArea.open=false;
+      this.addressId=null;
+    },
+    handerCompanyUserAreaList(){
+      this.companyUserArea.open=true;
+    },
     // 绑定个微
     gwBind(row){
       this.gwOpen = true

+ 149 - 78
src/views/components/course/userCourseVideoDetails.vue

@@ -16,9 +16,9 @@
         </el-descriptions-item>
         <el-descriptions-item label="封面图" >
           <el-popover v-if="item!=null"
-            placement="right"
-            title=""
-            trigger="hover">
+                      placement="right"
+                      title=""
+                      trigger="hover">
             <img slot="reference" :src="item.thumbnail" width="50px">
             <img :src="item.thumbnail" style="max-width: 150px;">
           </el-popover>
@@ -27,31 +27,47 @@
           <span v-if="item!=null">{{item.description}}</span>
         </el-descriptions-item>
         <el-descriptions-item label="时长" >
-            <span v-if="item!=null">{{formatDuration(item.duration)}}</span>
+          <span v-if="item!=null">{{formatDuration(item.duration)}}</span>
         </el-descriptions-item>
         <el-descriptions-item label="课程排序" >
-            <span v-if="item!=null">{{item.courseSort}}</span>
+          <span v-if="item!=null">{{item.courseSort}}</span>
         </el-descriptions-item>
 
         <el-descriptions-item label="创建时间" >
-            <span v-if="item!=null">{{item.createTime}}</span>
+          <span v-if="item!=null">{{item.createTime}}</span>
         </el-descriptions-item>
         <el-descriptions-item label="审核时间" >
-            <span v-if="item!=null">{{item.auditTime}}</span>
+          <span v-if="item!=null">{{item.auditTime}}</span>
         </el-descriptions-item>
+
+        <el-descriptions-item label="默认红包" >
+          <span v-if="item!=null">{{item.redPacketMoney}}</span>
+        </el-descriptions-item>
+
         <el-descriptions-item label="备注" >
-            <span v-if="item!=null">{{item.remark}}</span>
+          <span v-if="item!=null">{{item.remark}}</span>
         </el-descriptions-item>
       </el-descriptions>
     </div>
-    <div class="contentx" v-if="item">
+    <div class="contentx" v-if="item" @contextmenu.prevent>
       <div class="desct">
         视频内容
       </div>
-      <div style="display: flex; justify-content: center; align-items: center;">
-          <div style="display: grid; place-items: center;" v-if="item.videoUrl!=null">
-             <video  :src="item.videoUrl" controls style="max-width: 400px; max-height: 400px;"></video>
+      <div style="display: flex; justify-content: center; align-items: center; position: relative;">
+        <!-- 父容器设置为 relative,水印根据此容器定位 -->
+        <div style="display: grid; place-items: center; position: relative;" v-if="item.videoUrl != null">
+          <video ref="video" :src="item.videoUrl" controls disablepictureinpicture controlsList="nodownload nofullscreen nopictureinpicture"
+                 style="max-width: 800px; max-height: 600px;" @loadedmetadata="onVideoLoaded">
+          </video>
+
+          <!-- 动态生成的20个水印,按照4排每排5个 -->
+          <div class="watermarks" :style="watermarkGridStyle">
+            <div class="watermark" v-for="n in 20" :key="n"
+                 :style="getWatermarkPosition(n)">
+              {{ user.nickName }} : {{ user.userId }}
+            </div>
           </div>
+        </div>
       </div>
     </div>
     <div class="contentx" v-if="item">
@@ -85,82 +101,137 @@
 
 <script>
 import {getUserCourseVideo} from "@/api/course/userCourseVideo";
-  export default {
-    name: "userCourseVideoDetails",
-    data() {
+export default {
+  name: "userCourseVideoDetails",
+  data() {
+    return {
+      videoWidth: 0,  // 视频宽度
+      videoHeight: 0, // 视频高度
+      watermarkCount: 20, // 水印数量,固定为20个
+      watermarkSize: 20, // 单个水印的大小,固定为40px
+      user: this.$store.state.user.user,  // 从 Vuex 获取当前用户
+      typeOptions:[],
+      packageTypeOptions: [],
+      diseaseTypeOptions: [],
+      packageSubTypeOptions:[],
+      item:null,
+      packageItem:null,
+      productJson:[],
+      courseIdOptions: [],
+      // 视频状态 1:草稿,2:待审核,3:发布字典
+      statusOptions: [],
+      // 是否展示字典
+      orOptions: [],
+      // 来源 1 用户 2 后台字典
+      sourceOptions: [],
+      // 删除标志字典
+      isDelOptions: [],
+      isAuditOptions:[],
+      specShowOptions:[]
+    }
+  },
+  created() {
+    this.getDicts("sys_course_temp_type").then(response => {
+      this.typeOptions = response.data;
+    });
+  },
+  computed: {
+    // 动态计算水印容器的样式
+    watermarkGridStyle() {
       return {
-        typeOptions:[],
-        packageTypeOptions: [],
-        diseaseTypeOptions: [],
-        packageSubTypeOptions:[],
-        item:null,
-        packageItem:null,
-        productJson:[],
-        courseIdOptions: [],
-        // 视频状态 1:草稿,2:待审核,3:发布字典
-        statusOptions: [],
-        // 是否展示字典
-        orOptions: [],
-        // 来源 1 用户 2 后台字典
-        sourceOptions: [],
-        // 删除标志字典
-        isDelOptions: [],
-        isAuditOptions:[],
-        specShowOptions:[]
-      }
+        position: 'absolute',
+        top: '0',
+        left: '0',
+        width: '100%',
+        height: '100%',
+        zIndex: 1,
+        pointerEvents: 'none', // 让水印不会干扰视频控制
+        display: 'grid',
+        gridTemplateColumns: `repeat(5, 1fr)`,  // 每排5个水印
+        gridTemplateRows: `repeat(4, auto)`,   // 四排水印
+        gap: `${this.gap}px`,  // 水印之间的间隙
+      };
+    }
+  },
+  methods: {
+    // 视频加载完成后获取其尺寸
+    onVideoLoaded() {
+      const video = this.$refs.video;
+      this.videoWidth = video.videoWidth;
+      this.videoHeight = video.videoHeight;
+
+      // // 根据视频尺寸计算水印的数量和大小
+      // this.watermarkSize = Math.floor(this.videoWidth / 30); // 水印大小为视频宽度的 1/10
     },
-    created() {
-      this.getDicts("sys_course_temp_type").then(response => {
-        this.typeOptions = response.data;
-      });
+    // 计算每个水印的位置,按照四排5列排列
+    getWatermarkPosition(n) {
+      return {
+        position: 'relative',
+        color: 'rgba(255, 255, 255, 0.3)', // 提高透明度,确保不干扰视频内容
+        fontSize: `${this.watermarkSize}px`, // 固定水印的字体大小
+        textAlign: 'center',
+        lineHeight: `${this.watermarkSize}px`, // 水平方向和垂直方向居中
+        transform: 'rotate(-30deg)',
+      };
     },
-    methods: {
-      formatDuration(seconds) {
-        if (seconds === null || seconds === undefined) {
-          return '未上传视频'; // 或者您可以根据具体需求返回其他默认值
-        }
-        const hours = Math.floor(seconds / 3600);
-        const minutes = Math.floor((seconds % 3600) / 60);
-        const remainingSeconds = seconds % 60;
+    formatDuration(seconds) {
+      if (seconds === null || seconds === undefined) {
+        return '未上传视频'; // 或者您可以根据具体需求返回其他默认值
+      }
+      const hours = Math.floor(seconds / 3600);
+      const minutes = Math.floor((seconds % 3600) / 60);
+      const remainingSeconds = seconds % 60;
 
-        const formattedHours = hours > 0 ? hours.toString() + ':' : '';
-        const formattedMinutes = minutes.toString().padStart(2, '0');
-        const formattedSeconds = remainingSeconds.toString().padStart(2, '0');
+      const formattedHours = hours > 0 ? hours.toString() + ':' : '';
+      const formattedMinutes = minutes.toString().padStart(2, '0');
+      const formattedSeconds = remainingSeconds.toString().padStart(2, '0');
 
-        return `${formattedHours}${formattedMinutes}:${formattedSeconds}`;
-      },
-      getDetails(videoId) {
-        console.log(videoId);
-        this.item=null;
-        getUserCourseVideo(videoId).then(response => {
-          this.item = response.data;
-        });
-      },
-    }
+      return `${formattedHours}${formattedMinutes}:${formattedSeconds}`;
+    },
+    getDetails(videoId) {
+      console.log(videoId);
+      this.item=null;
+      getUserCourseVideo(videoId).then(response => {
+        this.item = response.data;
+      });
+    },
   }
+}
 </script>
 
 <style>
-  .contentx{
-      height: 100%;
-      background-color: #fff;
-      padding: 0px 20px 20px;
+/* 水印样式 */
+.watermark, .watermark-bottom-right {
+  position: absolute;
+  color: rgba(255, 255, 255, 0.3);  /* 提高透明度,确保水印不干扰视频内容 */
+  font-size: 10vw;  /* 动态字体大小,确保水印不会过大 */
+  transform: rotate(-30deg);
+  z-index: 1;
+  pointer-events: none;  /* 不干扰视频的交互 */
+}
 
+/* 设置视频和水印层的绝对定位,使水印显示在视频上方 */
+.watermark-full {
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  text-align: center;
+  line-height: 100%;  /* 水平和垂直居中 */
+}
+.contentx{
+  height: 100%;
+  background-color: #fff;
+  padding: 0px 20px 20px;
 
-      margin: 20px;
-  }
-  .el-descriptions-item__label.is-bordered-label{
-    font-weight: normal;
-  }
-  .el-descriptions-item__content {
-    max-width: 150px;
-    min-width: 100px;
-  }
-  .desct{
-      padding-top: 20px;
-      padding-bottom: 20px;
-      color: #524b4a;
-      font-weight: bold;
-    }
+
+  margin: 20px;
+}
+.desct{
+  padding-top: 20px;
+  padding-bottom: 20px;
+  color: #524b4a;
+  font-weight: bold;
+}
 
 </style>

+ 178 - 66
src/views/qw/user/index.vue

@@ -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
       };
     },
     //重置登录