Kaynağa Gözat

优化获客链接的展示样式

cgp 1 ay önce
ebeveyn
işleme
0e129f54dd

+ 27 - 2
src/api/qw/acquisitionAssistant.js

@@ -85,9 +85,34 @@ export function deleteAssistant(id) {
 }
 
 //发送获客链接短信
-export function sendAcquisitionMessage(id, phone) {
+export function sendMessageLink(id, phone) {
   return request({
-    url: `/qw/acquisitionAssistant/sendAcquisitionMessage/${id}/${phone}`,
+    url: `/qw/linkInfo/sendMessageLink/${id}/${phone}`,
     method: 'get'
   })
 }
+
+//批量生成多手机号短链
+export function batchCreateMessageLink(data) {
+  return request({
+    url: '/qw/linkInfo/batchCreateMessageLink',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 提取链接 - 根据手机号生成短链接文本
+ * @param {Object} params - 参数对象
+ * @param {number} params.id - 获客链接ID
+ * @param {string} params.phone - 手机号码
+ * @param {string} params.url - 获客链接URL
+ * @returns {Promise}
+ */
+export function extractLink(params) {
+  return request({
+    url: '/qw/linkInfo/extractLink',
+    method: 'post',
+    data: params
+  })
+}

+ 44 - 0
src/api/qw/acquisitionLinkInfo.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询获客链接-号码链接记录列表
+export function listLinkInfo(query) {
+  return request({
+    url: '/qw/linkInfo/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询获客链接-号码链接记录详细
+export function getLinkInfo(id) {
+  return request({
+    url: '/qw/linkInfo/' + id,
+    method: 'get'
+  })
+}
+
+// 新增获客链接-号码链接记录
+export function addLinkInfo(data) {
+  return request({
+    url: '/qw/linkInfo',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改获客链接-号码链接记录
+export function updateLinkInfo(data) {
+  return request({
+    url: '/qw/linkInfo',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除获客链接-号码链接记录
+export function delLinkInfo(id) {
+  return request({
+    url: '/qw/linkInfo/' + id,
+    method: 'delete'
+  })
+}

+ 298 - 15
src/views/qw/acquisitionAssistant/index.vue

@@ -143,12 +143,13 @@
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
           >删除</el-button>
-          <!-- 一键提取链接按钮 -->
+
+          <!-- 提取链接按钮 -->
           <el-button
             size="mini"
             type="text"
             icon="el-icon-link"
-            @click="handleCopyLink(scope.row)"
+            @click="handleExtractLink(scope.row)"
           >提取链接</el-button>
           <!-- 生成二维码按钮 -->
           <el-button
@@ -165,6 +166,13 @@
             style="color: #E6A23C;"
             @click="handleSendSms(scope.row)"
           >发送短信</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-upload2"
+            style="color: #409EFF;"
+            @click="handleUploadPhones(scope.row)"
+          >上传电话批量生成短链</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -398,6 +406,105 @@
         <el-button @click="smsDialog.visible = false">取 消</el-button>
       </div>
     </el-dialog>
+
+    <!--上传电话号码弹窗 -->
+    <el-dialog
+      title="上传电话号码文件"
+      :visible.sync="uploadPhoneDialog.visible"
+      width="500px"
+      append-to-body
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      :show-close="!uploadPhoneDialog.loading"
+    >
+      <div v-loading="uploadPhoneDialog.loading" element-loading-text="处理中...">
+        <p style="color: #909399; font-size: 14px; margin-bottom: 20px;">
+          请上传 .xls 格式的文件,文件第一行为表头,第二列为电话号码。
+          <br/>
+          <strong>当前操作链接:</strong> {{ uploadPhoneDialog.rowData ? uploadPhoneDialog.rowData.linkName : '' }}
+        </p>
+        <el-upload
+          ref="upload"
+          class="upload-demo"
+          drag
+          action="#"
+          :http-request="handleHttpRequest"
+          :on-change="handleFileChange"
+          :before-upload="beforeUpload"
+          :show-file-list="true"
+          accept=".xls"
+          :limit="1"
+          :on-exceed="handleExceed"
+        >
+          <i class="el-icon-upload"></i>
+          <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+          <div class="el-upload__tip" slot="tip">
+            仅限 .xls 文件,大小不超过 5MB
+          </div>
+        </el-upload>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="uploadPhoneDialog.visible = false" :disabled="uploadPhoneDialog.loading">取 消</el-button>
+        <el-button type="primary" @click="startUpload" :loading="uploadPhoneDialog.loading">开始上传</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 提取链接弹窗 -->
+    <el-dialog
+      title="提取链接"
+      :visible.sync="extractLinkDialog.visible"
+      width="500px"
+      append-to-body
+      :close-on-click-modal="false"
+      @close="closeExtractLinkDialog"
+    >
+      <div v-loading="extractLinkDialog.loading" element-loading-text="生成中...">
+        <el-form :model="extractLinkDialog" label-width="100px">
+          <el-form-item label="手机号码" required>
+            <el-input
+              v-model="extractLinkDialog.phone"
+              placeholder="请输入手机号码"
+              clearable
+              :disabled="extractLinkDialog.resultText !== ''"
+            />
+            <div class="el-form-item__tips" style="color: #909399; font-size: 12px; margin-top: 5px;">
+              请输入11位手机号码
+            </div>
+          </el-form-item>
+          <el-form-item label="链接名称">
+            <span>{{ extractLinkDialog.rowData ? extractLinkDialog.rowData.linkName : '' }}</span>
+          </el-form-item>
+
+          <!-- 结果显示区域 -->
+          <el-form-item label="生成结果" v-if="extractLinkDialog.resultText">
+            <el-input
+              type="textarea"
+              :rows="4"
+              v-model="extractLinkDialog.resultText"
+              readonly
+              placeholder="生成的文本内容"
+            />
+            <div class="el-form-item__tips" style="color: #67C23A; font-size: 12px; margin-top: 5px;">
+              点击下方按钮复制文本
+            </div>
+          </el-form-item>
+        </el-form>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <template v-if="!extractLinkDialog.resultText">
+          <el-button type="primary" @click="confirmExtractLink" :loading="extractLinkDialog.loading">
+            确 定 生 成
+          </el-button>
+          <el-button @click="closeExtractLinkDialog">取 消</el-button>
+        </template>
+        <template v-else>
+          <el-button type="success" @click="copyExtractResult">
+            <i class="el-icon-document-copy"></i> 复制文本
+          </el-button>
+          <el-button @click="closeExtractLinkDialog">关 闭</el-button>
+        </template>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -411,7 +518,9 @@ import {
   getQwUserList,
   getQwUserListByIds,
   qwUserCompanyList,
-  sendAcquisitionMessage
+  sendMessageLink,
+  batchCreateMessageLink,
+  extractLink
 } from '@/api/qw/acquisitionAssistant'
 
 import QRCode from 'qrcodejs2'
@@ -420,6 +529,20 @@ export default {
   name: 'AcquisitionAssistant',
   data() {
     return {
+      // 提取链接弹窗数据
+      extractLinkDialog: {
+        visible: false,
+        loading: false,
+        phone: '',
+        rowData: null,
+        resultText: ''
+      },
+      // 上传电话号码弹窗数据
+      uploadPhoneDialog: {
+        visible: false,
+        loading: false,
+        rowData: null,
+      },
       // 遮罩层
       loading: true,
       userLoading: false,
@@ -539,6 +662,70 @@ export default {
     })
   },
   methods: {
+    /** 提取链接按钮操作 */
+    handleExtractLink(row) {
+      // 重置表单数据
+      this.extractLinkDialog = {
+        visible: true,
+        loading: false,
+        phone: '',
+        rowData: row,
+        resultText: ''
+      }
+    },
+
+    /** 确认提取链接 */
+    confirmExtractLink() {
+      // 验证手机号码
+      const phone = this.extractLinkDialog.phone.trim()
+      if (!phone) {
+        this.$message.warning('请输入手机号码')
+        return
+      }
+
+      // 验证手机号码格式
+      const phoneRegex = /^1[3-9]\d{9}$/
+      if (!phoneRegex.test(phone)) {
+        this.$message.warning('请输入正确的11位手机号码')
+        return
+      }
+
+      // 发送请求
+      this.extractLinkDialog.loading = true
+
+      extractLink({
+        id: this.extractLinkDialog.rowData.id,
+        phone: phone,
+        url: this.extractLinkDialog.rowData.url
+      }).then(response => {
+        if (response.code === 200) {
+          // 修改这里:使用 response.msg 而不是 response.data
+          this.extractLinkDialog.resultText = response.msg
+          this.$message.success('短链接生成成功')
+        } else {
+          this.$message.error(response.msg || '生成失败')
+        }
+      }).catch(error => {
+        const errorMsg = error.response?.data?.msg || error.message || '生成失败'
+        this.$message.error(errorMsg)
+      }).finally(() => {
+        this.extractLinkDialog.loading = false
+      })
+    },
+
+    /** 复制提取的链接文本 */
+    copyExtractResult() {
+      if (!this.extractLinkDialog.resultText) return
+
+      this.copyToClipboard(this.extractLinkDialog.resultText, '文本已复制到剪贴板')
+    },
+
+    /** 关闭提取链接弹窗 */
+    closeExtractLinkDialog() {
+      this.extractLinkDialog.visible = false
+      this.extractLinkDialog.phone = ''
+      this.extractLinkDialog.resultText = ''
+    },
     /** 获取完整链接 */
     getFullUrl(row) {
       if (!row || !row.pageParam) return `${this.baseDomain}`
@@ -579,7 +766,6 @@ export default {
           this.$message.error('复制失败,请手动复制')
         }
       } catch (err) {
-        console.error('复制失败:', err)
         this.$message.error('复制失败,请手动复制')
       } finally {
         document.body.removeChild(textarea)
@@ -635,12 +821,9 @@ export default {
                   // 转换为 data URL
                   this.qrCodeDialog.dataUrl = canvas.toDataURL('image/png')
                 } else {
-                  // 如果使用 table 方式生成,尝试其他方法
-                  console.warn('未找到canvas元素,尝试其他方法')
                   this.$message.warning('二维码生成方式不支持保存为图片,请更新浏览器')
                 }
               } catch (err) {
-                console.error('获取二维码图片失败:', err)
                 this.$message.error('生成二维码失败')
               } finally {
                 // 清理临时容器
@@ -649,14 +832,12 @@ export default {
               }
             }, 100)
           } catch (err) {
-            console.error('生成二维码失败:', err)
             this.$message.error('生成二维码失败')
             document.body.removeChild(tempDiv)
             this.qrCodeDialog.generating = false
           }
         }, 50)
       } catch (error) {
-        console.error('生成二维码失败:', error)
         this.$message.error('生成二维码失败')
         this.qrCodeDialog.generating = false
       }
@@ -716,13 +897,12 @@ export default {
       // 发送请求
       this.smsDialog.sending = true
 
-      sendAcquisitionMessage(this.smsDialog.linkId, phone)
+      sendMessageLink(this.smsDialog.linkId, phone)
         .then(response => {
           this.$message.success('短信发送成功')
           this.smsDialog.visible = false
         })
         .catch(error => {
-          console.error('发送短信失败:', error)
           const errorMsg = error.response?.data?.msg || error.message || '发送失败'
           this.$message.error(errorMsg)
         })
@@ -981,7 +1161,6 @@ export default {
         this.userLoading = false
         this.loadingMore = false
       }).catch(error => {
-        console.error('搜索用户失败:', error)
         this.userLoading = false
         this.loadingMore = false
       })
@@ -1166,7 +1345,6 @@ export default {
                 this.form.userListParam = []
               }
             } catch (e) {
-              console.error('解析 userList 失败:', e)
               this.form.userListParam = []
             }
           } else if (Array.isArray(data.userList)) {
@@ -1229,7 +1407,6 @@ export default {
         this.open = true
         this.title = '修改获客链接'
       }).catch(error => {
-        console.error('获取详情失败:', error)
         this.msgError('获取详情失败')
       })
     },
@@ -1393,7 +1570,108 @@ export default {
       this.userPage = 1
       this.hasMoreUsers = true
       this.resetForm('form')
-    }
+    },
+    /**
+     * 处理上传电话号码按钮点击事件
+     */
+    handleUploadPhones(row) {
+      this.uploadPhoneDialog.rowData = row;
+      this.uploadPhoneDialog.visible = true;
+      // 重置加载状态,防止上次上传的loading状态残留
+      this.uploadPhoneDialog.loading = false;
+    },
+    /**
+     * 自定义上传方法,供 el-upload 调用
+     */
+    handleHttpRequest(options) {
+      this.uploadFile(options);
+    },
+    /**
+     * 上传文件到后端
+     */
+    async uploadFile(file) {
+      // 1. 构建FormData对象
+      const formData = new FormData();
+      formData.append('file', file.file);
+      formData.append('qwAcquisitionAssistantId', this.uploadPhoneDialog.rowData.id);
+      formData.append('qwAcquisitionAssistantUrl', this.uploadPhoneDialog.rowData.url);
+
+      this.uploadPhoneDialog.loading = true;
+
+      try {
+        const response = await batchCreateMessageLink(formData);
+        if (response.code === 200) {
+          this.$message.success(response.msg || '批量生成短链成功!');
+          this.uploadPhoneDialog.visible = false;
+        } else {
+          this.$message.error(response.msg || '操作失败');
+        }
+      } catch (error) {
+        console.error('上传文件请求失败:', error);
+        this.$message.error(error.message || '上传失败,请稍后重试');
+      } finally {
+        // 5. 结束加载状态
+        this.uploadPhoneDialog.loading = false;
+      }
+    },
+
+    /**
+     * 上传文件前的钩子函数,可以做校验
+     */
+    beforeUpload(file) {
+      const isXLS = file.type === 'application/vnd.ms-excel';
+      const isXLSAlt = file.name.toLowerCase().endsWith('.xls'); // 有些浏览器可能检测不到MIME类型
+
+      if (!isXLS && !isXLSAlt) {
+        this.$message.error('上传文件只能是 .xls 格式!');
+        return false;
+      }
+      return true; // 返回true才继续上传
+    },
+
+    /**
+     * 上传成功后的回调
+     */
+    handleUploadSuccess(response, file, fileList) {
+    },
+
+    /**
+     * 上传失败后的回调
+     */
+    handleUploadError(error, file, fileList) {
+      console.error('文件上传失败:', error);
+    },
+    /**
+     * 文件状态改变时的钩子,添加文件、上传成功和失败都会被调用
+     * @param {Object} file - 文件对象
+     * @param {Array} fileList - 文件列表
+     */
+    handleFileChange(file, fileList) {
+      console.log('文件列表发生变化:', fileList);
+    },
+
+    /**
+     * 文件超出个数限制时的钩子
+     */
+    handleExceed(files, fileList) {
+      this.$message.warning(`最多只能上传 1 个文件!`);
+      console.warn('文件数量超出限制,当前文件:', files, '文件列表:', fileList);
+    },
+    /** 开始上传按钮点击事件 */
+    startUpload() {
+      // 获取 el-upload 组件实例
+      const uploadComponent = this.$refs.upload;
+      if (uploadComponent) {
+        // 如果有文件队列,开始上传
+        if (uploadComponent.uploadFiles && uploadComponent.uploadFiles.length > 0) {
+          uploadComponent.submit();
+        } else {
+          this.$message.warning('请先选择要上传的文件');
+        }
+      } else {
+        this.$message.warning('请先选择要上传的文件');
+      }
+    },
   }
 }
 </script>
@@ -1463,4 +1741,9 @@ export default {
   display: flex;
   justify-content: center;
 }
+
+/* 上传弹窗样式 */
+.upload-demo {
+  text-align: center;
+}
 </style>

+ 281 - 0
src/views/qw/acquisitionLinkInfo/index.vue

@@ -0,0 +1,281 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="链接ID" prop="qwAcquisitionAssistantId">
+        <el-input
+          v-model="queryParams.qwAcquisitionAssistantId"
+          placeholder="请输入获客链接ID"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="链接" prop="link">
+        <el-input
+          v-model="queryParams.link"
+          placeholder="请输入完整链接"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="电话" prop="phone">
+        <el-input
+          v-model="queryParams.phone"
+          placeholder="请输入客户电话"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" 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-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="qwAcquisitionLinkInfoList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="获客链接ID" align="center" prop="qwAcquisitionAssistantId" />
+      <el-table-column label="完整链接" align="center" prop="link" :show-overflow-tooltip="true" />
+      <el-table-column label="客户电话" align="center" prop="phone" />
+      <el-table-column label="创建者" align="center" prop="createBy" />
+      <el-table-column label="创建时间" align="center" prop="createTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="更新者" align="center" prop="updateBy" />
+      <el-table-column label="更新时间" align="center" prop="updateTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 修改对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="获客链接ID" prop="qwAcquisitionAssistantId">
+          <el-input v-model="form.qwAcquisitionAssistantId" placeholder="请输入获客链接ID" />
+        </el-form-item>
+        <el-form-item label="完整链接" prop="link">
+          <el-input v-model="form.link" type="textarea" placeholder="请输入完整链接" />
+        </el-form-item>
+        <el-form-item label="客户电话" prop="phone">
+          <el-input v-model="form.phone" placeholder="请输入客户电话" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listLinkInfo, getLinkInfo, delLinkInfo, addLinkInfo, updateLinkInfo } from "@/api/qw/acquisitionLinkInfo";
+
+export default {
+  name: "AcquisitionLinkInfo",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 获客链接-号码链接记录表格数据
+      qwAcquisitionLinkInfoList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        qwAcquisitionAssistantId: null,
+        link: null,
+        phone: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        qwAcquisitionAssistantId: [
+          { required: true, message: "获客链接ID不能为空", trigger: "blur" }
+        ],
+        link: [
+          { required: true, message: "完整链接不能为空", trigger: "blur" }
+        ],
+        phone: [
+          { required: true, message: "客户电话不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询获客链接-号码链接记录列表 */
+    getList() {
+      this.loading = true;
+      listLinkInfo(this.queryParams).then(response => {
+        this.qwAcquisitionLinkInfoList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        qwAcquisitionAssistantId: null,
+        link: null,
+        phone: null,
+        remark: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getLinkInfo(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改获客链接-号码链接记录";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateLinkInfo(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addLinkInfo(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除获客链接-号码链接记录编号为"' + ids + '"的数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        return delLinkInfo(ids);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("删除成功");
+      })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('qw/linkInfo/export', {
+        ...this.queryParams
+      }, `qw_link_info_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>