Quellcode durchsuchen

优化获客链接管理页面展示逻辑

cgp vor 3 Tagen
Ursprung
Commit
08ea14ecb0
2 geänderte Dateien mit 0 neuen und 241 gelöschten Zeilen
  1. 0 41
      src/api/qw/acquisitionAssistant.js
  2. 0 200
      src/views/qw/acquisitionAssistant/index.vue

+ 0 - 41
src/api/qw/acquisitionAssistant.js

@@ -50,28 +50,6 @@ export function getQwUserListByIds(qwUserTableIds) {
   })
 }
 
-// 从企微同步获客链接列表(全量)- 需要corpId
-export function syncList(corpId) {
-  return request({
-    url: '/qw/acquisitionAssistant/syncList',
-    method: 'post',
-    params: { corpId }
-  })
-}
-
-// 分页获取企微列表(直接调用企微接口)- 需要corpId
-export function getQwList(limit, cursor, corpId) {
-  return request({
-    url: '/qw/acquisitionAssistant/qwList',
-    method: 'get',
-    params: {
-      limit: limit,
-      cursor: cursor,
-      corpId: corpId
-    }
-  })
-}
-
 // 根据linkId直接获取详情
 export function getDetailByLinkId(linkId) {
   return request({
@@ -105,22 +83,3 @@ export function deleteAssistant(id) {
     method: 'get'
   })
 }
-
-// 批量删除获客链接
-export function batchDeleteAssistant(ids) {
-  return request({
-    url: '/qw/acquisitionAssistant/batchDelete',
-    method: 'delete',
-    data: ids
-  })
-}
-
-// 导出获客链接
-export function exportAssistant(query) {
-  return request({
-    url: '/qw/acquisitionAssistant/export',
-    method: 'get',
-    params: query,
-    responseType: 'blob'
-  })
-}

+ 0 - 200
src/views/qw/acquisitionAssistant/index.vue

@@ -79,22 +79,6 @@
           @click="handleDelete"
         >删除</el-button>
       </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          icon="el-icon-refresh"
-          size="mini"
-          @click="handleSync"
-        >同步企微(全量同步)</el-button>
-      </el-col>
-<!--      <el-col :span="1.5">-->
-<!--        <el-button-->
-<!--          type="info"-->
-<!--          icon="el-icon-view"-->
-<!--          size="mini"-->
-<!--          @click="handleViewQwList"-->
-<!--        >查看企微原始数据</el-button>-->
-<!--      </el-col>-->
     </el-row>
 
     <!-- 数据表格 -->
@@ -316,81 +300,12 @@
         <el-form-item label="备注">{{ detailData.remark || '-' }}</el-form-item>
       </el-form>
     </el-dialog>
-
-    <!-- 企微原始数据对话框 -->
-    <el-dialog
-      title="企微获客链接原始数据"
-      :visible.sync="qwListOpen"
-      width="900px"
-      append-to-body
-      @close="handleQwListClose"
-    >
-      <div class="mb8">
-        <el-button
-          type="primary"
-          icon="el-icon-plus"
-          size="mini"
-          :disabled="!selectedQwLinks || selectedQwLinks.length === 0"
-          @click="handleImportQw"
-        >导入选中到本地</el-button>
-      </div>
-      <el-table
-        :data="qwDataList"
-        v-loading="qwLoading"
-        height="400"
-        @selection-change="handleQwSelectionChange"
-      >
-        <el-table-column type="selection" width="55" align="center" />
-        <el-table-column label="链接ID" prop="linkId" width="200" :show-overflow-tooltip="true" />
-<!--        <el-table-column label="链接名称" prop="link_name" width="150" :show-overflow-tooltip="true" />-->
-<!--        <el-table-column label="链接URL" prop="url" width="200" :show-overflow-tooltip="true" />-->
-<!--        <el-table-column label="创建时间" prop="create_time" width="160" align="center" />-->
-        <el-table-column label="操作" width="150" align="center" fixed="right">
-          <template slot-scope="scope">
-            <el-button size="mini" type="text" @click="handleViewDetail(scope.row.link_id)">查看详情</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="pagination-container" style="margin-top: 15px; text-align: right;">
-        <el-pagination
-          background
-          @current-change="handleQwPageChange"
-          :current-page="qwPage"
-          :page-size="qwLimit"
-          layout="prev, pager, next"
-          :total="qwTotal"
-        />
-      </div>
-    </el-dialog>
-
-    <!-- 企微详情对话框 -->
-    <el-dialog
-      title="企微获客链接详情"
-      :visible.sync="qwDetailOpen"
-      width="700px"
-      append-to-body
-    >
-      <el-form :model="qwDetailData" label-width="120px">
-        <el-form-item label="链接ID">{{ qwDetailData.link_id }}</el-form-item>
-        <el-form-item label="链接名称">{{ qwDetailData.link_name }}</el-form-item>
-        <el-form-item label="链接URL">
-          <el-link :href="qwDetailData.url" target="_blank" type="primary">{{ qwDetailData.url }}</el-link>
-        </el-form-item>
-        <el-form-item label="创建时间">{{ qwDetailData.create_time }}</el-form-item>
-        <el-form-item label="使用范围">{{ qwDetailData.range_desc || '-' }}</el-form-item>
-        <el-form-item label="配置信息">
-          <pre>{{ JSON.stringify(qwDetailData.config, null, 2) }}</pre>
-        </el-form-item>
-      </el-form>
-    </el-dialog>
   </div>
 </template>
 
 <script>
 import {
   listAssistant,
-  syncList,
-  getQwList,
   getDetailByLinkId,
   addAssistant,
   updateAssistant,
@@ -406,7 +321,6 @@ export default {
     return {
       // 遮罩层
       loading: true,
-      qwLoading: false,
       userLoading: false,
       loadingMore: false,
       // 添加部门选择器显示控制
@@ -421,23 +335,13 @@ export default {
       total: 0,
       // 表格数据
       assistantList: [],
-      // 企微列表数据
-      qwDataList: [],
-      qwTotal: 0,
-      qwPage: 1,
-      qwLimit: 100,
-      qwCursor: '',
-      selectedQwLinks: [],
       // 详情数据
       detailData: {},
-      qwDetailData: {},
       // 弹出层标题
       title: '',
       // 是否显示弹出层
       open: false,
       detailOpen: false,
-      qwListOpen: false,
-      qwDetailOpen: false,
       // 查询参数 - corpId作为全局筛选条件
       queryParams: {
         pageNum: 1,
@@ -1064,110 +968,6 @@ export default {
       })
     },
 
-    /** 同步企微 - 需要传入当前选中的corpId */
-    handleSync() {
-      if (!this.checkCorpId()) return
-
-      this.$confirm('确认同步企微获客链接列表?此操作将全量更新本地数据', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        return syncList(this.queryParams.corpId)
-      }).then(response => {
-        this.msgSuccess(response.msg || '同步成功')
-        this.getList()
-      }).catch(() => {})
-    },
-
-    /** 查看企微原始数据 - 需要传入当前选中的corpId */
-    handleViewQwList() {
-      if (!this.checkCorpId()) return
-
-      this.qwListOpen = true
-      this.qwPage = 1
-      this.qwCursor = ''
-      this.getQwList()
-    },
-
-    /** 获取企微列表 - 使用当前选中的corpId */
-    getQwList() {
-      if (!this.checkCorpId()) {
-        this.qwLoading = false
-        return
-      }
-
-      this.qwLoading = true
-      getQwList(this.qwLimit, this.qwCursor, this.queryParams.corpId).then(response => {
-        //处理数据,这里多套了一层
-        if (response.code === 200&&response.data.errcode===0) {
-          const data = response.data || {}
-          this.qwDataList = data.linkIdList || []
-          this.qwTotal = data.total_count || 0
-          this.qwCursor = data.nextCursor || ''
-        } else {
-          this.qwDataList = []
-          this.qwTotal = 0
-          this.msgError(response.msg || '获取数据失败')
-        }
-
-        this.qwLoading = false
-      }).catch(error => {
-        console.error('获取企微原始数据失败:', error)
-        this.qwLoading = false
-        this.msgError('获取企微原始数据失败')
-      })
-    },
-
-    /** 企微分页切换 */
-    handleQwPageChange(page) {
-      this.qwPage = page
-      this.getQwList()
-    },
-
-    /** 企微列表选中 */
-    handleQwSelectionChange(selection) {
-      this.selectedQwLinks = selection
-    },
-
-    /** 导入选中 */
-    handleImportQw() {
-      if (!this.selectedQwLinks || this.selectedQwLinks.length === 0) {
-        this.msgError('请至少选择一条数据')
-        return
-      }
-
-      if (!this.checkCorpId()) return
-
-      // 跳转到新增页面并填充数据
-      const link = this.selectedQwLinks[0]
-      this.qwListOpen = false
-      this.$nextTick(() => {
-        this.handleAdd()
-        this.form.linkId = link.link_id
-        this.form.linkName = link.link_name
-        this.form.url = link.url
-      })
-    },
-
-    /** 查看企微详情 */
-    handleViewDetail(linkId) {
-      this.qwLoading = true
-      getDetailByLinkId(linkId).then(response => {
-        this.qwDetailData = response.data
-        this.qwDetailOpen = true
-        this.qwLoading = false
-      }).catch(() => {
-        this.qwLoading = false
-      })
-    },
-
-    /** 关闭企微列表弹窗 */
-    handleQwListClose() {
-      this.selectedQwLinks = []
-      this.qwCursor = ''
-    },
-
     /** 取消按钮 */
     cancel() {
       this.open = false