Bläddra i källkod

迁移手动发课营期

吴树波 1 vecka sedan
förälder
incheckning
2c32b5707c
2 ändrade filer med 68 tillägg och 2 borttagningar
  1. 7 0
      src/api/qw/user.js
  2. 61 2
      src/views/qw/user/index.vue

+ 7 - 0
src/api/qw/user.js

@@ -202,6 +202,13 @@ export function loginQwIpad(data) {
     data: data
   })
 }
+export function updateSendType(data) {
+  return request({
+    url: '/qw/user/updateSendType',
+    method: 'post',
+    data: data
+  })
+}
 
 /**
  * 获取登录状态

+ 61 - 2
src/views/qw/user/index.vue

@@ -58,6 +58,17 @@
     </el-form>
 
     <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          :disabled="multiple"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          @click="updateSendType"
+        >修改发送方式
+        </el-button>
+      </el-col>
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -95,6 +106,13 @@
       </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="sendMsgType">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.sendMsgType == 0">方式一</el-tag>
+          <el-tag v-if="scope.row.sendMsgType == 1" type="success">方式二</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="UUID" align="center" prop="uid" />
       <el-table-column label="ai状态" align="center" prop="loginStatus">
         <template slot-scope="scope">
           <el-tag v-if="scope.row.ipadStatus == 1" type="success">在线</el-tag>
@@ -471,7 +489,31 @@
         style="display: block; max-width: 100%; margin: 0 auto"
       />
     </el-dialog>
-
+    <el-dialog
+      :visible.sync="updateSendOpen"
+      width="1000px"
+      append-to-body>
+      <el-form label-width="80px">
+        <p>是否修改企微账号发送方式:
+          <el-tag style="margin-left: 10px" v-for="name in names">{{ name }}</el-tag>
+        </p>
+        <el-form-item label="发送方式" prop="type">
+          <el-radio-group v-model="type">
+            <el-radio
+              :label="0"
+            >方式一
+            </el-radio>
+            <el-radio
+              :label="1"
+            >方式二
+            </el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitUpdateSendTypeForm">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -487,6 +529,7 @@ import {
   twoCode,
   twoCodeStatus,
   qrCodeStatus,
+  updateSendType,
   getQwIpad,
   delQwIpad,
   qrCodeVerify,
@@ -531,6 +574,7 @@ export default {
       }],
       // 遮罩层
       loading: true,
+      names: [],
       // 导出遮罩层
       exportLoading: false,
       // 选中数组
@@ -541,6 +585,7 @@ export default {
       multiple: true,
       // 显示搜索条件
       showSearch: true,
+      updateSendOpen: false,
       // 总条数
       total: 0,
       //公司列表
@@ -597,6 +642,7 @@ export default {
       },
 
       twoCodeInterval:null,
+      type: 0,
       loginQwInterval:null,
 
       imageLoading: true, // 控制加载状态
@@ -1103,6 +1149,7 @@ export default {
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)
+      this.names = selection.map(item => item.qwUserName)
       this.single = selection.length !== 1
       this.multiple = !selection.length
     },
@@ -1146,7 +1193,19 @@ export default {
         this.exportLoading = false;
       }).catch(() => {
       });
-    }
+    },
+    updateSendType() {
+      this.updateSendOpen = true;
+    },
+    cleanUpdateSendType() {
+      this.updateSendOpen = false;
+    },
+    submitUpdateSendTypeForm(){
+      updateSendType({ids: this.ids, type: this.type}).then(e => {
+        this.updateSendOpen = false;
+        this.getList();
+      });
+    },
   }
 };
 </script>