liding
2025-05-08 2e0f40608e66abc1fc5026f1194c032a7e52379e
1.>>>.cell {}更改  2.客户档案删除优化
已修改3个文件
42 ■■■■■ 文件已修改
src/api/basicData/customerFile.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/PIMTable/PIMTable.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/customerFile/index.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/basicData/customerFile.js
@@ -42,10 +42,11 @@
    })
}
// 删除客户档案
export function delCustomer(id) {
export function delCustomer(ids) {
    return request({
        url: '/basic/customer/' + id,
        method: 'delete'
        url: '/basic/customer/delCustomer',
        method: 'delete',
        data: ids
    })
}
src/components/PIMTable/PIMTable.vue
@@ -1,17 +1,16 @@
<template>
  <el-table ref="multipleTable" v-loading="tableLoading" :border="border" :data="tableData"
            :header-cell-style="{ background: '#F0F1F5', color: '#333333' }" height="calc(100vh - 18.5em)"
            :highlight-current-row="highlightCurrentRow" :row-class-name="rowClassName" :row-style="rowStyle"
            :row-key="rowKey" style="width: 100%" tooltip-effect="dark" @row-click="rowClick"
            @current-change="currentChange" @selection-change="handleSelectionChange" class="lims-table">
    :highlight-current-row="highlightCurrentRow" :row-class-name="rowClassName" :row-style="rowStyle" :row-key="rowKey"
    style="width: 100%" tooltip-effect="dark" @row-click="rowClick" @current-change="currentChange"
    @selection-change="handleSelectionChange" class="lims-table">
    <el-table-column align="center" type="selection" width="55" />
    <el-table-column align="center" label="序号" type="index" width="60" />
    
    <el-table-column v-for="(item, index) in column" :key="index" :column-key="item.columnKey"
                     :filter-method="item.filterHandler" :filter-multiple="item.filterMultiple" :filtered-value="item.filteredValue"
                     :filters="item.filters" :fixed="item.fixed" :label="item.label" :prop="item.prop"
                     show-overflow-tooltip :align="item.align"
                     :sortable="!!item.sortable" :type="item.type" :width="item.width">
      :filters="item.filters" :fixed="item.fixed" :label="item.label" :prop="item.prop" show-overflow-tooltip
      :align="item.align" :sortable="!!item.sortable" :type="item.type" :width="item.width">
      <template v-if="item.hasOwnProperty('colunmTemplate')" #[item.colunmTemplate]="scope">
        <slot v-if="item.theadSlot" :name="item.theadSlot" :index="scope.$index" :row="scope.row" />
      </template>
@@ -27,7 +26,8 @@
        </div>
        <!-- 图片 -->
        <div v-else-if="item.dataType == 'image'">
          <img :src="javaApi + '/img/' + scope.row[item.prop]" alt="" style="width: 40px; height: 40px; margin-top: 10px" />
          <img :src="javaApi + '/img/' + scope.row[item.prop]" alt=""
            style="width: 40px; height: 40px; margin-top: 10px" />
        </div>
        
        <!-- tag -->
@@ -39,12 +39,13 @@
          </el-tag>
          
          <el-tag v-for="(tag, index) in dataTypeFn(scope.row[item.prop], item.formatData)"
                  v-else-if="typeof dataTypeFn(scope.row[item.prop], item.formatData) === 'object'"
                  :key="index" :title="formatters(scope.row[item.prop], item.formatData)" :type="formatType(tag, item.formatType)">
            v-else-if="typeof dataTypeFn(scope.row[item.prop], item.formatData) === 'object'" :key="index"
            :title="formatters(scope.row[item.prop], item.formatData)" :type="formatType(tag, item.formatType)">
            {{ item.tagGroup ? tag[item.tagGroup.label] ?? tag : tag }}
          </el-tag>
          
          <el-tag v-else :title="formatters(scope.row[item.prop], item.formatData)" :type="formatType(scope.row[item.prop], item.formatType)">
          <el-tag v-else :title="formatters(scope.row[item.prop], item.formatData)"
            :type="formatType(scope.row[item.prop], item.formatType)">
            {{ formatters(scope.row[item.prop], item.formatData) }}
          </el-tag>
        </div>
@@ -87,8 +88,8 @@
      </template>
    </el-table-column>
  </el-table>
  <pagination v-show="total > 0" :total="total" :layout="page.layout" :page="page.current"
              :limit="page.size" @pagination="paginationSearch" />
  <pagination v-show="total > 0" :total="total" :layout="page.layout" :page="page.current" :limit="page.size"
    @pagination="paginationSearch" />
</template>
<script setup>
@@ -274,9 +275,10 @@
</script>
<style scoped lang="scss">
>>>.cell {
:deep(.cell) {
  padding: 0 !important;
}
.cell {
  white-space: nowrap;
  overflow: hidden;
src/views/basicData/customerFile/index.vue
@@ -282,16 +282,19 @@
  }
  ElMessageBox.confirm(
      '选中的内容将被删除,是否确认删除?',
      '导出', {
      '删除提示', {
        confirmButtonText: '确认',
        cancelButtonText: '取消',
        type: 'warning',
      }
  ).then(() => {
    tableLoading.value = true
    delCustomer(ids).then(res => {
      proxy.$modal.msgSuccess("删除成功")
    })
    getList()
    }).finally(() => {
      tableLoading.value = false
    })
  }).catch(() => {
    proxy.$modal.msg("已取消")
  })