فهرست منبع

提交外呼功能提交

吴树波 1 هفته پیش
والد
کامیت
3e2f859a28
3فایلهای تغییر یافته به همراه216 افزوده شده و 327 حذف شده
  1. 53 14
      src/views/company/companyVoiceRobotic/index.vue
  2. 53 14
      src/views/company/companyVoiceRobotic/myIndex.vue
  3. 110 299
      src/views/components/QwUserSelect.vue

+ 53 - 14
src/views/company/companyVoiceRobotic/index.vue

@@ -405,11 +405,11 @@
             </div>
             <el-form-item label="添加类型" prop="isWeCom">
               <el-radio-group v-model="form.isWeCom">
-                <el-radio :label="1" border>
+                <el-radio v-if="workflowHasPersonalAddWx" :label="1" border>
                   <i class="el-icon-pie-chart"></i>
                   个微
                 </el-radio>
-                <el-radio :label="2" border>
+                <el-radio v-if="workflowHasQwAddWx" :label="2" border>
                   <i class="el-icon-star-on"></i>
                   企微
                 </el-radio>
@@ -485,6 +485,7 @@
     <append-customer-select @success="appendSelectFun" ref="appendCustomer" />
     <component
       :is="getCurrentComponent()"
+      :key="form.isWeCom"
       @success="selectQwUserFun"
       ref="dynamicQwUserSelect"
     />
@@ -815,10 +816,10 @@
                             {{ log.statusName }}
                           </el-tag>
                         </div>
-                        <div class="node-log-body" v-if="log.errorMsg">
+                        <div class="node-log-body" v-if="log.errorMessage && isFailedLog(log)">
                           <div class="error-msg">
                             <i class="el-icon-warning"></i>
-                            {{ log.errorMsg }}
+                            <span class="error-label">失败原因:</span>{{ log.errorMessage }}
                           </div>
                         </div>
                         <div class="node-log-footer">
@@ -954,6 +955,8 @@ export default {
       taskTypeList:[{id:1,name:"普通任务"},{id:2,name:"场景任务"}],
       currentCompanyId:null,
       workflowHasAddWx: false,
+      workflowHasPersonalAddWx: false,
+      workflowHasQwAddWx: false,
       // 遮罩层
       loading: true,
       // CIDGroupList:[],
@@ -1278,6 +1281,8 @@ export default {
         availableEndTime: null
       };
       this.workflowHasAddWx = false;
+      this.workflowHasPersonalAddWx = false;
+      this.workflowHasQwAddWx = false;
       this.resetForm("form");
     },
     /** 搜索按钮操作 */
@@ -1312,7 +1317,7 @@ export default {
       getRobotic(id).then(response => {
         this.form = response.data;
         if (this.form.companyAiWorkflowId) {
-          this.onWorkflowChange(this.form.companyAiWorkflowId);
+          this.onWorkflowChange(this.form.companyAiWorkflowId, true);
         }
         this.open = true;
         this.title = "修改机器人外呼任务";
@@ -1335,7 +1340,7 @@ export default {
             for(let i = 0; i < this.form.qwUser.length; i++) {
               const account = this.form.qwUser[i];
               if(!account.companyUserId || account.companyUserId.length == 0) {
-                this.msgError(`第 ${i + 1} 个账号请选择企微`);
+                this.msgError(`第 ${i + 1} 个账号请选择${this.form.isWeCom === 2 ? '企微' : '个微'}`);
                 return;
               }
             }
@@ -1688,6 +1693,13 @@ export default {
       };
       return typeMap[statusName] || 'info';
     },
+    isFailedLog(log) {
+      const failedStatuses = [2, 7, 8];
+      if (failedStatuses.includes(log.status)) {
+        return true;
+      }
+      return ['执行失败', '执行超时', '执行中断'].includes(log.statusName);
+    },
     // 获取节点图标
     getNodeIcon(nodeKey) {
       const iconMap = {
@@ -1744,25 +1756,52 @@ export default {
       this.form.availableStartTime = null;
       this.form.availableEndTime = null;
       this.workflowHasAddWx = false;
+      this.workflowHasPersonalAddWx = false;
+      this.workflowHasQwAddWx = false;
       this.$nextTick(() => {
       this.$refs.form.clearValidate();
       })
     },
-    onWorkflowChange(workflowId) {
+    syncAddWxTypeByWorkflow(typeCodes, preserveAccount = false) {
+      const hasPersonal = typeCodes.includes('AI_ADD_WX_TASK_NEW');
+      const hasQw = typeCodes.includes('AI_QW_ADD_WX_TASK');
+      this.workflowHasPersonalAddWx = hasPersonal;
+      this.workflowHasQwAddWx = hasQw;
+      this.workflowHasAddWx = hasPersonal || hasQw;
+      if (!this.workflowHasAddWx) {
+        this.form.addType = 0;
+        this.form.isWeCom = 1;
+        if (!preserveAccount) {
+          this.form.qwUser = [];
+          this.selectQwUserList = [];
+        }
+        return;
+      }
+      if (hasPersonal && !hasQw) {
+        this.form.isWeCom = 1;
+      } else if (hasQw && !hasPersonal) {
+        this.form.isWeCom = 2;
+      } else if (!preserveAccount) {
+        this.form.isWeCom = 1;
+      }
+      if (!preserveAccount) {
+        this.form.qwUser = [];
+        this.selectQwUserList = [];
+      }
+    },
+    onWorkflowChange(workflowId, preserveAccount = false) {
       if (!workflowId) {
         this.workflowHasAddWx = false;
+        this.workflowHasPersonalAddWx = false;
+        this.workflowHasQwAddWx = false;
         return;
       }
       getWorkflowNodeTypeCodes(workflowId).then(res => {
-        const typeCodes = res.data || [];
-        this.workflowHasAddWx = typeCodes.includes('AI_ADD_WX_TASK_NEW') || typeCodes.includes('AI_QW_ADD_WX_TASK');
-        if (!this.workflowHasAddWx) {
-          this.form.addType = 0;
-          this.form.isWeCom = 1;
-          this.form.qwUser = [];
-        }
+        this.syncAddWxTypeByWorkflow(res.data || [], preserveAccount);
       }).catch(() => {
         this.workflowHasAddWx = false;
+        this.workflowHasPersonalAddWx = false;
+        this.workflowHasQwAddWx = false;
       });
     },
     async getExecLogs() {

+ 53 - 14
src/views/company/companyVoiceRobotic/myIndex.vue

@@ -393,11 +393,11 @@
             </div>
             <el-form-item label="添加类型" prop="isWeCom">
               <el-radio-group v-model="form.isWeCom">
-                <el-radio :label="1" border>
+                <el-radio v-if="workflowHasPersonalAddWx" :label="1" border>
                   <i class="el-icon-pie-chart"></i>
                   个微
                 </el-radio>
-                <el-radio :label="2" border>
+                <el-radio v-if="workflowHasQwAddWx" :label="2" border>
                   <i class="el-icon-star-on"></i>
                   企微
                 </el-radio>
@@ -472,6 +472,7 @@
     <customer-select @success="selectFun" ref="customer"/>
     <component
       :is="getCurrentComponent()"
+      :key="form.isWeCom"
       @success="selectQwUserFun"
       ref="dynamicQwUserSelect"
     />
@@ -798,10 +799,10 @@
                             {{ log.statusName }}
                           </el-tag>
                         </div>
-                        <div class="node-log-body" v-if="log.errorMsg">
+                        <div class="node-log-body" v-if="log.errorMessage && isFailedLog(log)">
                           <div class="error-msg">
                             <i class="el-icon-warning"></i>
-                            {{ log.errorMsg }}
+                            <span class="error-label">失败原因:</span>{{ log.errorMessage }}
                           </div>
                         </div>
                         <div class="node-log-footer">
@@ -931,6 +932,8 @@ export default {
       taskTypeList:[{id:1,name:"普通任务"},{id:2,name:"场景任务"}],
       currentCompanyId:null,
       workflowHasAddWx: false,
+      workflowHasPersonalAddWx: false,
+      workflowHasQwAddWx: false,
       // 遮罩层
       loading: true,
       // CIDGroupList:[],
@@ -1251,6 +1254,8 @@ export default {
         availableEndTime: null
       };
       this.workflowHasAddWx = false;
+      this.workflowHasPersonalAddWx = false;
+      this.workflowHasQwAddWx = false;
       this.resetForm("form");
     },
     /** 搜索按钮操作 */
@@ -1285,7 +1290,7 @@ export default {
       getRobotic(id).then(response => {
         this.form = response.data;
         if (this.form.companyAiWorkflowId) {
-          this.onWorkflowChange(this.form.companyAiWorkflowId);
+          this.onWorkflowChange(this.form.companyAiWorkflowId, true);
         }
         this.open = true;
         this.title = "修改机器人外呼任务";
@@ -1308,7 +1313,7 @@ export default {
             for(let i = 0; i < this.form.qwUser.length; i++) {
               const account = this.form.qwUser[i];
               if(!account.companyUserId || account.companyUserId.length == 0) {
-                this.msgError(`第 ${i + 1} 个账号请选择企微`);
+                this.msgError(`第 ${i + 1} 个账号请选择${this.form.isWeCom === 2 ? '企微' : '个微'}`);
                 return;
               }
             }
@@ -1586,6 +1591,13 @@ export default {
       };
       return typeMap[statusName] || 'info';
     },
+    isFailedLog(log) {
+      const failedStatuses = [2, 7, 8];
+      if (failedStatuses.includes(log.status)) {
+        return true;
+      }
+      return ['执行失败', '执行超时', '执行中断'].includes(log.statusName);
+    },
     // 获取节点图标
     getNodeIcon(nodeKey) {
       const iconMap = {
@@ -1642,25 +1654,52 @@ export default {
       this.form.availableStartTime = null;
       this.form.availableEndTime = null;
       this.workflowHasAddWx = false;
+      this.workflowHasPersonalAddWx = false;
+      this.workflowHasQwAddWx = false;
       this.$nextTick(() => {
       this.$refs.form.clearValidate();
       })
     },
-    onWorkflowChange(workflowId) {
+    syncAddWxTypeByWorkflow(typeCodes, preserveAccount = false) {
+      const hasPersonal = typeCodes.includes('AI_ADD_WX_TASK_NEW');
+      const hasQw = typeCodes.includes('AI_QW_ADD_WX_TASK');
+      this.workflowHasPersonalAddWx = hasPersonal;
+      this.workflowHasQwAddWx = hasQw;
+      this.workflowHasAddWx = hasPersonal || hasQw;
+      if (!this.workflowHasAddWx) {
+        this.form.addType = 0;
+        this.form.isWeCom = 1;
+        if (!preserveAccount) {
+          this.form.qwUser = [];
+          this.selectQwUserList = [];
+        }
+        return;
+      }
+      if (hasPersonal && !hasQw) {
+        this.form.isWeCom = 1;
+      } else if (hasQw && !hasPersonal) {
+        this.form.isWeCom = 2;
+      } else if (!preserveAccount) {
+        this.form.isWeCom = 1;
+      }
+      if (!preserveAccount) {
+        this.form.qwUser = [];
+        this.selectQwUserList = [];
+      }
+    },
+    onWorkflowChange(workflowId, preserveAccount = false) {
       if (!workflowId) {
         this.workflowHasAddWx = false;
+        this.workflowHasPersonalAddWx = false;
+        this.workflowHasQwAddWx = false;
         return;
       }
       getWorkflowNodeTypeCodes(workflowId).then(res => {
-        const typeCodes = res.data || [];
-        this.workflowHasAddWx = typeCodes.includes('AI_ADD_WX_TASK_NEW') || typeCodes.includes('AI_QW_ADD_WX_TASK');
-        if (!this.workflowHasAddWx) {
-          this.form.addType = 0;
-          this.form.isWeCom = 1;
-          this.form.qwUser = [];
-        }
+        this.syncAddWxTypeByWorkflow(res.data || [], preserveAccount);
       }).catch(() => {
         this.workflowHasAddWx = false;
+        this.workflowHasPersonalAddWx = false;
+        this.workflowHasQwAddWx = false;
       });
     },
     async getExecLogs() {

+ 110 - 299
src/views/components/QwUserSelect.vue

@@ -1,340 +1,151 @@
 <template>
-  <el-drawer size="75%" title="客户选择" :visible.sync="shows" append-to-body destroy-on-close>
-    <div class="app-container">
-      <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-        <el-form-item label="认领人" prop="companyUserNickName">
-          <el-input
-            v-model="queryParams.companyUserNickName"
-            placeholder="请输入认领人"
-            clearable
-            size="small"
-            @keyup.enter.native="handleQuery"
-          />
-        </el-form-item>
-        <el-form-item label="客户状态" prop="status">
-          <el-select v-model="queryParams.status" placeholder="请选择客户状态" clearable size="small">
-            <el-option
-              v-for="item in statusOptions"
-              :key="'status'+item.dictValue"
-              :label="item.dictLabel"
-              :value="item.dictValue"
-            />
-          </el-select>
-        </el-form-item>
-        <el-form-item label="客户类型" prop="customerType">
-          <el-select multiple v-model="ctsTypeArr" placeholder="请选择客户类型" clearable size="small">
-            <el-option
-              v-for="(item, index) in typeOptions"
-              :key="`${item.dictValue}-${index}`"
-              :label="item.dictLabel"
-              :value="item.dictValue"
-            />
-          </el-select>
-        </el-form-item>
+  <el-drawer size="75%" title="选择个微账号" :visible.sync="shows" append-to-body destroy-on-close class="qw-user-select-drawer">
+    <div class="drawer-container">
+      <el-card shadow="never" class="search-card">
+        <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="100px" class="search-form">
+          <el-row :gutter="16">
+            <el-col :span="6">
+              <el-form-item label="微信昵称" prop="wxNickName">
+                <el-input v-model="queryParams.wxNickName" placeholder="请输入微信昵称" clearable size="small" @keyup.enter.native="handleQuery"/>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="微信号" prop="wxNo">
+                <el-input v-model="queryParams.wxNo" placeholder="请输入微信号" clearable size="small" @keyup.enter.native="handleQuery"/>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="员工昵称" prop="companyUserName">
+                <el-input v-model="queryParams.companyUserName" placeholder="请输入员工昵称" clearable size="small" @keyup.enter.native="handleQuery"/>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item>
+                <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
+                <el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </el-card>
 
-        <el-form-item label="创建时间" prop="createTime">
-          <el-date-picker clearable size="small" style="width: 205.4px"
-                          v-model="dateRange"
-                          type="daterange"
-                          value-format="yyyy-MM-dd"
-                          start-placeholder="开始日期" end-placeholder="结束日期">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="领取时间" prop="receiveTimeRange">
-          <el-date-picker
-            style="width:205.4px"
-            clearable size="small"
-            v-model="receiveTimeRange"
-            type="daterange"
-            value-format="yyyy-MM-dd"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="客户来源" prop="source">
-          <el-select multiple v-model="sourceArr" placeholder="请选择客户来源" clearable size="small">
-            <el-option
-              v-for="item in sourceOptions"
-              :key="'source'+item.dictValue"
-              :label="item.dictLabel"
-              :value="item.dictValue"
-            />
-          </el-select>
-        </el-form-item>
-        <el-form-item label="客户标签" prop="tags">
-          <el-select multiple v-model="tagIds" placeholder="请选择客户标签" clearable size="small">
-            <el-option
-              v-for="(item, index) in tagsOptions"
-              :key="`${item.dictValue}-${index}`"
-              :label="item.dictLabel"
-              :value="item.dictLabel"
-            />
-          </el-select>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-        </el-form-item>
-      </el-form>
+      <el-card shadow="never" class="table-card">
+        <div slot="header" class="card-header">
+          <span>个微账号列表</span>
+          <el-tag v-if="selectedRows.length" type="success">已选择 {{ selectedRows.length }} 个账号</el-tag>
+        </div>
+        <el-table border v-loading="loading" :data="wxAccountList" :row-key="getRowKeys" @selection-change="handleSelectionChange" size="small" ref="table" height="500">
+          <el-table-column type="selection" width="55" align="center" :reserve-selection="true" />
+          <el-table-column label="微信昵称" align="center" prop="wxNickName"/>
+          <el-table-column label="微信号" align="center" prop="wxNo"/>
+          <el-table-column label="手机号" align="center" prop="phone"/>
+          <el-table-column label="员工" align="center" prop="companyUserName"/>
+        </el-table>
+      </el-card>
 
-      <el-table border v-loading="loading" :data="customerList" :row-key="getRowKeys" @selection-change="handleSelectionChange" size="mini" ref="table" height="460">
-        <el-table-column type="selection" width="55" align="center" :reserve-selection="true" />
-        <el-table-column label="微信昵称" align="center" prop="wxNickName"/>
-        <el-table-column label="微信号" align="center" prop="wxNo"/>
-        <el-table-column label="手机号" align="center" prop="phone"/>
-        <el-table-column label="员工" align="center" prop="companyUserName"/>
-      </el-table>
-      <div slot="footer" class="dialog-footer" style="width: 100%;display: flex;flex-direction: row-reverse;margin-top: 20px;z-index: 9898989;padding-top: 5px">
-        <el-button type="primary" @click="submitForm" style="margin-bottom: 5px">确 定</el-button>
+      <div class="footer-actions">
+        <el-button @click="shows = false">取 消</el-button>
+        <el-button type="primary" @click="submitForm">确定选择</el-button>
       </div>
     </div>
   </el-drawer>
 </template>
 
 <script>
-import { getCompanyList } from "@/api/company/company";
-import {getCitys} from "@/api/store/city";
-import {companyUserList} from "@/api/company/companyVoiceRobotic";
+import { listAll as listWxAccountAll } from '@/api/company/companyAccount'
 
 export default {
-  name: "CustomerSelect",
+  name: 'QwUserSelect',
   data() {
     return {
-      source:{
-        title:"修改客户来源",
-        open:false,
-      },
-      shows:false,
-      deptOptions:[],
-      receiveTimeRange:[],
-      tagId:null,
-      deptId:undefined,
-      companyId:undefined,
-      tagsOptions:[],
-      ctsTypeArr:[],
-      sourceArr:[],
-      dateRange:[],
-      cityIds:[],
-      citys:[],
-      tags:[],
-      tagIds:[],
-      inputVisible: false,
-      inputValue: '',
-      statusOptions:[],
-      typeOptions:[],
-      sourceOptions:[],
-      sexOptions:[],
-      pageSizes: [10, 20, 30, 50,100,500 ],
-      show:{
-        title:"客户详情",
-        open:false,
-      },
-      companys:[],
-      // 遮罩层
+      rows: [],
+      selectedRows: [],
+      shows: false,
       loading: true,
-      // 选中数组
       ids: [],
       names: [],
-      userIds: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 客户表格数据
-      customerList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 查询参数
+      wxAccountList: [],
       queryParams: {
-        customerCode: null,
-        customerName: null,
-        mobile: null,
-        sex: null,
-        weixin: null,
-        userId: null,
-        createUserId: null,
-        receiveUserId: null,
-        customerUserId: null,
-        address: null,
-        location: null,
-        detailAddress: null,
-        lng: null,
-        lat: null,
-        status: null,
-        isReceive: null,
-        deptId: null,
-        isDel: null,
-        customerType: null,
-        receiveTime: null,
-        poolTime: null,
-        companyId: null,
-        isLine: null,
-        source: null,
-        tags: null
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-        // customerName: [
-        //   { required: true, message: "客户名称不能为空", trigger: "blur" }
-        // ],
-        mobile: [
-          { required: true, message: "手机号不能为空", trigger: "blur" }
-        ],
-        // sex: [
-        //   { required: true, message: "性别不能为空", trigger: "blur" }
-        // ],
-        source: [
-          { required: true, message: "客户来源不能为空", trigger: "blur" }
-        ],
+        wxNickName: null,
+        wxNo: null,
+        companyUserName: null
       }
-    };
-  },
-  created() {
-    this.getDicts("crm_customer_tag").then((response) => {
-      this.tagsOptions = response.data;
-    });
-    this.getDicts("crm_customer_source").then((response) => {
-      this.sourceOptions = response.data;
-    });
-    this.getDicts("common_sex").then((response) => {
-      this.sexOptions = response.data;
-    });
-    this.getDicts("crm_customer_status").then((response) => {
-      this.statusOptions = response.data;
-    });
-    this.getDicts("crm_customer_type").then((response) => {
-      this.typeOptions = response.data;
-    });
-    getCompanyList().then(response => {
-      this.companys = response.data;
-    });
-    this.getCitys();
+    }
   },
   methods: {
-    setRows(rows){
-      this.shows = true;
-      this.rows = rows;
-      this.getList();
+    setRows(rows) {
+      this.shows = true
+      this.rows = rows || []
+      this.selectedRows = rows || []
+      this.getList()
     },
-    initSelect(){
-      let row = this.rows;
-      if(row && row.length > 0){
-        row.forEach(row => {
-          this.$refs.table.toggleRowSelection(row, true);
+    initSelect() {
+      const selectedRows = this.rows
+      if (selectedRows && selectedRows.length > 0 && this.$refs.table) {
+        selectedRows.forEach(row => {
+          this.$refs.table.toggleRowSelection(row, true)
         })
       }
     },
-    getRowKeys(item){
-      return item.id;
-    },
-    getCitys(){
-        getCitys().then(res => {
-          this.loading = false;
-          this.citys=res.data;
-        })
+    getRowKeys(item) {
+      return item.id
     },
-    /** 查询客户列表 */
     getList() {
-      this.loading = true;
-      if(this.receiveTimeRange!=null&&this.receiveTimeRange.length==2){
-        this.queryParams.receiveTimeRange=this.receiveTimeRange[0]+"--"+this.receiveTimeRange[1]
-      }
-      else{
-        this.queryParams.receiveTimeRange=null;
-      }
-      if(this.ctsTypeArr.length>0){
-        this.queryParams.customerType=this.ctsTypeArr.toString();
-      }
-      else{
-        this.queryParams.customerType=null
-      }
-
-      if(this.sourceArr.length>0){
-        this.queryParams.source=this.sourceArr.toString();
-      }
-      else{
-        this.queryParams.source=null
-      }
-      if(this.tagIds.length>0){
-        this.queryParams.tags=this.tagIds.toString();
-      }
-      else{
-        this.queryParams.tags=null
+      this.loading = true
+      const params = {
+        wxNickName: this.queryParams.wxNickName || undefined,
+        wxNo: this.queryParams.wxNo || undefined
       }
-      companyUserList(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
-        this.$refs.table.clearSelection();
-        this.customerList = response.data;
-        this.loading = false;
-        this.initSelect();
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
+      listWxAccountAll(params).then(response => {
+        if (this.$refs.table) {
+          this.$refs.table.clearSelection()
+        }
+        let list = response.data || []
+        const companyUserName = this.queryParams.companyUserName
+        if (companyUserName) {
+          list = list.filter(item => item.companyUserName && item.companyUserName.includes(companyUserName))
+        }
+        this.wxAccountList = list
+        this.loading = false
+        this.$nextTick(() => {
+          this.initSelect()
+        })
+      }).catch(() => {
+        this.loading = false
+      })
     },
-    /** 搜索按钮操作 */
     handleQuery() {
-      this.getList();
+      this.getList()
     },
-    /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
+      this.resetForm('queryForm')
+      this.queryParams.wxNickName = null
+      this.queryParams.wxNo = null
+      this.queryParams.companyUserName = null
+      this.getList()
     },
-    // 多选框选中数据
     handleSelectionChange(selection) {
-      this.rows = selection;
+      this.rows = selection
+      this.selectedRows = selection
       this.ids = selection.map(item => item.id)
-      // this.names = selection.map(item => item.qwUserName)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
+      this.names = selection.map(item => item.wxNickName || item.companyUserName)
     },
-     currDeptChange(val){
-          this.queryParams.deptId=val;
-          this.getList();
-    },
-    submitForm(){
+    submitForm() {
       this.$nextTick(() => {
-        this.$emit("success", {ids: this.ids, names: this.names, rows: this.rows})
-        this.shows = false;
-        this.$refs.table.clearSelection();
+        this.$emit('success', { ids: this.ids, names: this.names, rows: this.rows })
+        this.shows = false
+        if (this.$refs.table) {
+          this.$refs.table.clearSelection()
+        }
       })
-    },
+    }
   }
-};
+}
 </script>
+
 <style scoped>
-  .el-tag + .el-tag {
-    margin-left: 10px;
-  }
-  .button-new-tag {
-    margin-left: 10px;
-    height: 32px;
-    line-height: 30px;
-    padding-top: 0;
-    padding-bottom: 0;
-  }
-  .input-new-tag {
-    width: 90px;
-    margin-left: 10px;
-    vertical-align: bottom;
-  }
-  .el-dialog__wrapper{
-    z-index: 100000;
-  }
-  .app-container{padding: 0}
-  .dialog-footer{
-    position: absolute;
-    bottom: 0;
-    right: 20px;
-    background: #FFF;
-  }
+.footer-actions {
+  text-align: right;
+  margin: 20px;
+}
 </style>