This commit is contained in:
qsh
2024-08-02 18:03:21 +08:00
parent 605151c5c8
commit 925887f4c9
13 changed files with 251 additions and 60 deletions

View File

@@ -53,6 +53,12 @@
<template #actionMore>
<el-button @click="getTableList" v-hasPermi="['clue:pool:search']"> 搜索 </el-button>
<el-button @click="resetQuery" v-hasPermi="['clue:pool:reset']"> 重置 </el-button>
<el-button
@click="handleBatchChangeFollow"
v-hasPermi="['clue:pool:batch-update-follow']"
>
批量修改跟进人
</el-button>
</template>
</Search>
<!-- 列表 -->
@@ -63,7 +69,9 @@
:tableColumns="allSchemas.tableColumns"
@get-list="getTableList"
@get-checked-columns="getCheckedColumns"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="60" />
<el-table-column
v-for="item in showColumns"
:key="item.field"
@@ -178,6 +186,11 @@
@success="getTableList"
/>
<DialogFollow ref="followRef" @success="getTableList" />
<DialogBatchChangeFollow
ref="batchChangeFollowDialog"
:userOptions="userOptions"
@success="getTableList"
/>
</div>
</template>
@@ -189,6 +202,7 @@ import DrawerClue from './Comp/DrawerClue.vue'
import DialogSuccess from './Comp/DialogSuccess.vue'
import DialogFollow from './Comp/DialogFollow.vue'
import ClueMap from './Comp/ClueMap.vue'
import DialogBatchChangeFollow from './Comp/DialogBatchChangeFollow.vue'
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
import { removeNullField } from '@/utils'
@@ -216,7 +230,7 @@ async function getCurdSchemas() {
try {
const data = await getSimpleFieldList()
data.forEach((elem) => {
if (elem.field == 'followUser' || elem.field == 'convertPeople') {
if (['followUser', 'convertPeople', 'firstFollowUser'].includes(elem.field)) {
elem.search.options = userOptions.value
}
})
@@ -295,6 +309,20 @@ function getSearchCount() {
})
}
const batchIds = ref([])
function handleSelectionChange(val) {
batchIds.value = val.map((it) => it.clueId)
}
const batchChangeFollowDialog = ref()
function handleBatchChangeFollow() {
if (batchIds.value.length) {
batchChangeFollowDialog.value.open(batchIds.value)
} else {
message.info('请选择表格中的数据!')
}
}
// 新增
function handleInsert() {
formRef.value.open('create', null)