Merge branch 'main' of http://114.55.169.15:3000/qiushanhe/ss-crm-manage-web into salary
This commit is contained in:
@@ -59,6 +59,11 @@ const usedSchema = ref([])
|
|||||||
|
|
||||||
const newSchema = computed(() => {
|
const newSchema = computed(() => {
|
||||||
let schema: FormSchema[] = cloneDeep(usedSchema.value)
|
let schema: FormSchema[] = cloneDeep(usedSchema.value)
|
||||||
|
schema.forEach((item: FormSchema) => {
|
||||||
|
if (item.component == 'TreeSelect') {
|
||||||
|
item.componentProps['check-strictly'] = true
|
||||||
|
}
|
||||||
|
})
|
||||||
if (props.expand && props.expandField && !unref(visible)) {
|
if (props.expand && props.expandField && !unref(visible)) {
|
||||||
const index = findIndex(schema, (v: FormSchema) => v.field === props.expandField)
|
const index = findIndex(schema, (v: FormSchema) => v.field === props.expandField)
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
|
|||||||
@@ -108,9 +108,11 @@ const aftersaleList = ref([])
|
|||||||
const extraPayList = ref([])
|
const extraPayList = ref([])
|
||||||
|
|
||||||
const prodTotalPrice = computed(() => {
|
const prodTotalPrice = computed(() => {
|
||||||
return orderInfo.value.signProducts.reduce(
|
return (
|
||||||
(pre, cur) => pre + (cur?.price || 0) * (cur?.signNum || 0),
|
orderInfo.value.signProducts?.reduce(
|
||||||
0
|
(pre, cur) => pre + (cur?.price || 0) * (cur?.signNum || 0),
|
||||||
|
0
|
||||||
|
) || 0
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -67,9 +67,10 @@
|
|||||||
<div class="p-10px flex justify-center">
|
<div class="p-10px flex justify-center">
|
||||||
<el-table :data="row.signProducts" stripe style="width: 900px">
|
<el-table :data="row.signProducts" stripe style="width: 900px">
|
||||||
<el-table-column prop="productName" label="成交产品" />
|
<el-table-column prop="productName" label="成交产品" />
|
||||||
<el-table-column prop="specsName" label="产品规格" />
|
<el-table-column prop="specsName" label="产品规格" width="100px" />
|
||||||
<el-table-column prop="signNum" label="成交数量" width="100px" />
|
<el-table-column prop="signNum" label="成交数量" width="90px" />
|
||||||
<el-table-column label="发货状态" prop="sendState" width="100px" />
|
<el-table-column prop="remark" label="成交备注" />
|
||||||
|
<el-table-column label="发货状态" prop="sendState" width="90px" />
|
||||||
<el-table-column label="发货备注" width="100px">
|
<el-table-column label="发货备注" width="100px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-popover
|
<el-popover
|
||||||
@@ -205,6 +206,15 @@ import DialogDelivery from './DialogDelivery.vue'
|
|||||||
|
|
||||||
import { removeNullField } from '@/utils'
|
import { removeNullField } from '@/utils'
|
||||||
|
|
||||||
|
const userOptions = ref([])
|
||||||
|
onMounted(() => {
|
||||||
|
getUserOption().then((data) => {
|
||||||
|
userOptions.value = data
|
||||||
|
getCurdSchemas()
|
||||||
|
})
|
||||||
|
getOptions()
|
||||||
|
})
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const allSchemas = ref({})
|
const allSchemas = ref({})
|
||||||
@@ -337,15 +347,6 @@ const deliveryDialog = ref()
|
|||||||
function handleDelivery(row) {
|
function handleDelivery(row) {
|
||||||
deliveryDialog.value.open(row)
|
deliveryDialog.value.open(row)
|
||||||
}
|
}
|
||||||
|
|
||||||
const userOptions = ref([])
|
|
||||||
onMounted(() => {
|
|
||||||
getUserOption().then((data) => {
|
|
||||||
userOptions.value = data
|
|
||||||
getCurdSchemas()
|
|
||||||
})
|
|
||||||
getOptions()
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
|||||||
@@ -182,6 +182,15 @@ import DialogExtraFee from './DialogExtraPay.vue'
|
|||||||
|
|
||||||
import { removeNullField } from '@/utils'
|
import { removeNullField } from '@/utils'
|
||||||
|
|
||||||
|
const userOptions = ref([])
|
||||||
|
onMounted(() => {
|
||||||
|
getUserOption().then((data) => {
|
||||||
|
userOptions.value = data
|
||||||
|
getCurdSchemas()
|
||||||
|
})
|
||||||
|
getOptions()
|
||||||
|
})
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const allSchemas = ref({})
|
const allSchemas = ref({})
|
||||||
@@ -322,20 +331,11 @@ async function getClassTypeOptions() {
|
|||||||
|
|
||||||
function getOptions() {
|
function getOptions() {
|
||||||
// 驾校
|
// 驾校
|
||||||
getPlaceList().then((data) => {
|
getPlaceList({ placeStatus: 0, schoolStatus: 0, isSearchSchool: true }).then((data) => {
|
||||||
schoolOptions.value = data.schoolList
|
schoolOptions.value = data.schoolList
|
||||||
allPlaceOptions.value = data.placeList
|
allPlaceOptions.value = data.placeList
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const userOptions = ref([])
|
|
||||||
onMounted(() => {
|
|
||||||
getUserOption().then((data) => {
|
|
||||||
userOptions.value = data
|
|
||||||
getCurdSchemas()
|
|
||||||
})
|
|
||||||
getOptions()
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
|||||||
269
src/views/Clue/Pool/Comp/ClueMap.vue
Normal file
269
src/views/Clue/Pool/Comp/ClueMap.vue
Normal file
@@ -0,0 +1,269 @@
|
|||||||
|
<template>
|
||||||
|
<div class="relative w-full h-full">
|
||||||
|
<div id="mapClue" style="height: 100%"></div>
|
||||||
|
<el-autocomplete
|
||||||
|
v-model="areaValue"
|
||||||
|
clearable
|
||||||
|
style="position: absolute; top: 20px; left: 20px; width: 400px"
|
||||||
|
placeholder="输入并搜索位置"
|
||||||
|
:fetch-suggestions="remoteMethod"
|
||||||
|
@select="currentSelect"
|
||||||
|
/>
|
||||||
|
<el-collapse v-model="collaspeKey" class="box-card">
|
||||||
|
<el-collapse-item name="nearbySchool">
|
||||||
|
<template #title>
|
||||||
|
<span class="ml-10px font-bold" style="font-size: 16px">附近驾校</span>
|
||||||
|
</template>
|
||||||
|
<div style="padding: 0 10px">
|
||||||
|
<div v-if="nearbySchoolSearching">正在搜索中...</div>
|
||||||
|
<template v-else>
|
||||||
|
<div v-for="p in nearbySchoolList" :key="p.index">
|
||||||
|
<div class="hover-pointer" style="font-size: 14px; color: blue">
|
||||||
|
<i v-if="p.recommend" class="el-icon-star-off"></i>
|
||||||
|
驾校: {{ p.deptName }}-{{ p.name }}
|
||||||
|
</div>
|
||||||
|
<div class="mt5">地址:{{ p.address }}</div>
|
||||||
|
<div class="mt5">
|
||||||
|
直线距离: {{ p.distance }} 公里;
|
||||||
|
<span class="ml0">步行距离:{{ p.walkdistance }}</span>
|
||||||
|
</div>
|
||||||
|
<el-divider style="margin: 3px 0 !important" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</el-collapse-item>
|
||||||
|
</el-collapse>
|
||||||
|
<DialogSchoolInfo ref="placeInfoDialog" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="ClueMap">
|
||||||
|
import { getPlaceList } from '@/api/school/place'
|
||||||
|
|
||||||
|
import ImgPostion from '@/assets/imgs/flag/position_black.png'
|
||||||
|
import FlagRed from '@/assets/imgs/flag/flag_red.png'
|
||||||
|
import FlagYellow from '@/assets/imgs/flag/flag_yellow.png'
|
||||||
|
import FlagPurple from '@/assets/imgs/flag/flag_purple.png'
|
||||||
|
import FlagGreen from '@/assets/imgs/flag/flag_green.png'
|
||||||
|
import FlagBlue from '@/assets/imgs/flag/flag_blue.png'
|
||||||
|
import FlagBlack from '@/assets/imgs/flag/flag_black.png'
|
||||||
|
import AMapLoader from '@amap/amap-jsapi-loader'
|
||||||
|
|
||||||
|
import DialogSchoolInfo from './DialogSchoolInfo.vue'
|
||||||
|
|
||||||
|
// 地图相关
|
||||||
|
const clueMap = ref(null)
|
||||||
|
const aMap = ref(null)
|
||||||
|
const areaValue = ref('')
|
||||||
|
|
||||||
|
const flagMap = {
|
||||||
|
red: FlagRed,
|
||||||
|
yellow: FlagYellow,
|
||||||
|
purple: FlagPurple,
|
||||||
|
green: FlagGreen,
|
||||||
|
blue: FlagBlue,
|
||||||
|
black: FlagBlack
|
||||||
|
}
|
||||||
|
|
||||||
|
const defaultLatLng = ref({
|
||||||
|
lat: 31.86119,
|
||||||
|
lng: 117.283042
|
||||||
|
})
|
||||||
|
|
||||||
|
let AutoComplete = ref(null)
|
||||||
|
function initMap() {
|
||||||
|
AMapLoader.load({
|
||||||
|
key: '713d839ff505943b0f18e6df45f3b0dc', //设置您的key
|
||||||
|
version: '2.0',
|
||||||
|
plugins: ['AMap.AutoComplete']
|
||||||
|
}).then((AMap) => {
|
||||||
|
aMap.value = AMap
|
||||||
|
AutoComplete.value = new AMap.AutoComplete({
|
||||||
|
city: '合肥'
|
||||||
|
})
|
||||||
|
clueMap.value = new AMap.Map('mapClue', {
|
||||||
|
zoom: 14,
|
||||||
|
zooms: [2, 22],
|
||||||
|
center: [defaultLatLng.value.lng, defaultLatLng.value.lat]
|
||||||
|
})
|
||||||
|
getPageData()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const placeList = ref([])
|
||||||
|
|
||||||
|
async function getPageData() {
|
||||||
|
placeList.value = []
|
||||||
|
const data = await getPlaceList({
|
||||||
|
placeStatus: 0
|
||||||
|
})
|
||||||
|
if (data.placeList) {
|
||||||
|
placeList.value = data.placeList
|
||||||
|
createMarkersInMap()
|
||||||
|
getNearbySchool(defaultLatLng.value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 生成markers
|
||||||
|
function createMarkersInMap() {
|
||||||
|
for (let i = 0; i < placeList.value.length; i++) {
|
||||||
|
const element = placeList.value[i]
|
||||||
|
const markerIcon = flagMap[element.flagColor || 'red']
|
||||||
|
const tmpMarker = new aMap.value.Marker({
|
||||||
|
map: clueMap.value,
|
||||||
|
position: [element.lng, element.lat],
|
||||||
|
icon: markerIcon,
|
||||||
|
label: {
|
||||||
|
content: element.name,
|
||||||
|
direction: 'right'
|
||||||
|
},
|
||||||
|
extData: element
|
||||||
|
})
|
||||||
|
tmpMarker.on('click', handleClickMarker)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const placeInfoDialog = ref()
|
||||||
|
function handleClickMarker(ev) {
|
||||||
|
placeInfoDialog.value.open(ev.target.getExtData())
|
||||||
|
}
|
||||||
|
|
||||||
|
function remoteMethod(searchValue, cb) {
|
||||||
|
if (searchValue) {
|
||||||
|
AutoComplete.value?.search(searchValue, (status, result) => {
|
||||||
|
if (result.tips?.length) {
|
||||||
|
// areaList.value = result?.tips
|
||||||
|
const list = result.tips.map((it) => ({
|
||||||
|
...it,
|
||||||
|
value: it.name
|
||||||
|
}))
|
||||||
|
cb(list)
|
||||||
|
} else {
|
||||||
|
cb([])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
cb([])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function currentSelect(val) {
|
||||||
|
if (val) {
|
||||||
|
defaultLatLng.value = {
|
||||||
|
lng: val.location?.lng,
|
||||||
|
lat: val.location?.lat
|
||||||
|
}
|
||||||
|
addmark(val.location?.lng, val.location?.lat, aMap.value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const marker = ref(null)
|
||||||
|
function addmark(lat, lng, AMap) {
|
||||||
|
marker.value && removeMarker()
|
||||||
|
marker.value = new AMap.Marker({
|
||||||
|
position: new AMap.LngLat(lat, lng),
|
||||||
|
zoom: 14,
|
||||||
|
icon: ImgPostion,
|
||||||
|
offset: [-16, -32]
|
||||||
|
})
|
||||||
|
clueMap.value.add(marker.value)
|
||||||
|
clueMap.value.setCenter([lat, lng], true)
|
||||||
|
getNearbySchool({ lat: lng, lng: lat })
|
||||||
|
}
|
||||||
|
|
||||||
|
const nearbySchoolList = ref([])
|
||||||
|
const nearbySchoolSearching = ref(false)
|
||||||
|
const collaspeKey = ref('nearbySchool')
|
||||||
|
|
||||||
|
function getNearbySchool(info) {
|
||||||
|
if (info.lng && info.lat) {
|
||||||
|
nearbySchoolList.value = []
|
||||||
|
nearbySchoolSearching.value = true
|
||||||
|
// 推荐的场地
|
||||||
|
let places1 = []
|
||||||
|
// 普通的场地
|
||||||
|
let places2 = []
|
||||||
|
|
||||||
|
const p2 = [info.lng, info.lat]
|
||||||
|
for (let i = 0; i < placeList.value.length; i++) {
|
||||||
|
const element = placeList.value[i]
|
||||||
|
const p1 = [element.lng, element.lat]
|
||||||
|
// 计算直线距离
|
||||||
|
element.distance = (aMap.value.GeometryUtil.distance(p1, p2) / 1000).toFixed(2)
|
||||||
|
element.recommend ? places1.push(element) : places2.push(element)
|
||||||
|
}
|
||||||
|
// 按直线距离排序
|
||||||
|
// 排序
|
||||||
|
if (places1.length > 1) {
|
||||||
|
places1 = places1.sort((a, b) => a.distance - b.distance)
|
||||||
|
}
|
||||||
|
// 排序
|
||||||
|
if (places2.length > 1) {
|
||||||
|
places2 = places2.sort((a, b) => a.distance - b.distance)
|
||||||
|
}
|
||||||
|
// 取普通场地和推荐场地,组合, 取四个
|
||||||
|
nearbySchoolList.value = []
|
||||||
|
for (let i = 0; i < 4; i++) {
|
||||||
|
places1.length > i && nearbySchoolList.value.push(places1[i])
|
||||||
|
places2.length > i && nearbySchoolList.value.push(places2[i])
|
||||||
|
if (nearbySchoolList.value.length === 4) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 计算步行距离
|
||||||
|
nearbySchoolList.value.map(async (item) => {
|
||||||
|
const p1 = [item.lng, item.lat]
|
||||||
|
const resp = await getWalkingDistance(p1, p2)
|
||||||
|
item.walkdistance = resp
|
||||||
|
})
|
||||||
|
nearbySchoolSearching.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取两点之间的步行距离
|
||||||
|
async function getWalkingDistance(start, end) {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
aMap.value.plugin('AMap.Walking', () => {
|
||||||
|
const walking = new aMap.value.Walking()
|
||||||
|
let num = 0
|
||||||
|
walking.search(start, end, (status, result) => {
|
||||||
|
if (status === 'complete') {
|
||||||
|
result.routes.forEach((item) => {
|
||||||
|
num += item.distance
|
||||||
|
})
|
||||||
|
resolve(num > 1000 ? `${(num / 1000).toFixed(2)} 公里` : `${num} 米`)
|
||||||
|
} else {
|
||||||
|
resolve('步行数据无法确定')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeMarker() {
|
||||||
|
clueMap.value.remove(marker.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
function destroyMap() {
|
||||||
|
areaValue.value = undefined
|
||||||
|
clueMap.value = null
|
||||||
|
aMap.value = null
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({ destroyMap })
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
nextTick(() => {
|
||||||
|
initMap()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.box-card {
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
bottom: 10px;
|
||||||
|
width: 40%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px" @close="destroyMap">
|
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px" @close="destroyMap">
|
||||||
<el-tabs v-model="tabName">
|
<el-tabs v-model="tabName" @tab-change="changeTab">
|
||||||
<el-tab-pane label="线索信息" name="info">
|
<el-tab-pane label="线索信息" name="info">
|
||||||
<Form ref="formRef" v-loading="formLoading" :rules="rules" isCol :schema="formSchema" />
|
<Form ref="formRef" v-loading="formLoading" :rules="rules" isCol :schema="formSchema" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
@@ -41,6 +41,8 @@
|
|||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="row.content"
|
v-model="row.content"
|
||||||
|
type="textarea"
|
||||||
|
:autoSize="{ minRows: 2 }"
|
||||||
placeholder="输入跟进内容"
|
placeholder="输入跟进内容"
|
||||||
:disabled="!row.editable"
|
:disabled="!row.editable"
|
||||||
/>
|
/>
|
||||||
@@ -60,18 +62,15 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane v-if="appStore.getAppInfo?.instanceType == 1" label="位置信息" name="map">
|
<el-tab-pane v-if="appStore.getAppInfo?.instanceType == 1" label="位置信息" name="map">
|
||||||
<div class="flex justify-between items-center">
|
<div class="flex justify-between items-center">
|
||||||
<el-select
|
<el-autocomplete
|
||||||
v-model="areaValue"
|
v-model="areaValue"
|
||||||
filterable
|
|
||||||
clearable
|
clearable
|
||||||
remote
|
|
||||||
style="width: 250px"
|
style="width: 250px"
|
||||||
reserve-keyword
|
|
||||||
placeholder="输入并搜索位置"
|
placeholder="输入并搜索位置"
|
||||||
:remote-method="remoteMethod"
|
:fetch-suggestions="remoteMethod"
|
||||||
@change="currentSelect"
|
@select="currentSelect"
|
||||||
>
|
>
|
||||||
<el-option
|
<!-- <el-option
|
||||||
v-for="item in areaList"
|
v-for="item in areaList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
@@ -80,8 +79,8 @@
|
|||||||
>
|
>
|
||||||
<span style="float: left">{{ item.name }}</span>
|
<span style="float: left">{{ item.name }}</span>
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.district }}</span>
|
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.district }}</span>
|
||||||
</el-option>
|
</el-option> -->
|
||||||
</el-select>
|
</el-autocomplete>
|
||||||
<div class="flex-1 flex items-center ml-10px mr-10px">
|
<div class="flex-1 flex items-center ml-10px mr-10px">
|
||||||
<div class="w-100px">线索位置:</div>
|
<div class="w-100px">线索位置:</div>
|
||||||
<el-input v-model="address" disabled placeholder="请输入线索位置" clearable />
|
<el-input v-model="address" disabled placeholder="请输入线索位置" clearable />
|
||||||
@@ -119,18 +118,17 @@
|
|||||||
</el-collapse>
|
</el-collapse>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
<div style="position: absolute; top: 75px; right: 20px">
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button :disabled="formLoading" type="primary" @click="handleSave">保 存</el-button>
|
||||||
|
</div>
|
||||||
<DialogSchoolInfo ref="schoolInfoDialog" />
|
<DialogSchoolInfo ref="schoolInfoDialog" />
|
||||||
<template #footer>
|
|
||||||
<span>
|
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
||||||
<el-button :disabled="formLoading" type="primary" @click="handleSave">保 存</el-button>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="DialogClue">
|
<script setup name="DialogClue">
|
||||||
import { useAppStore } from '@/store/modules/app'
|
import { useAppStore } from '@/store/modules/app'
|
||||||
|
import { useUserStore } from '@/store/modules/user'
|
||||||
import { getPlaceList } from '@/api/school/place'
|
import { getPlaceList } from '@/api/school/place'
|
||||||
import * as ClueApi from '@/api/clue'
|
import * as ClueApi from '@/api/clue'
|
||||||
import { getDiyFieldList } from '@/api/clue/clueField'
|
import { getDiyFieldList } from '@/api/clue/clueField'
|
||||||
@@ -139,7 +137,7 @@ import AMapLoader from '@amap/amap-jsapi-loader'
|
|||||||
|
|
||||||
import DialogSchoolInfo from './DialogSchoolInfo.vue'
|
import DialogSchoolInfo from './DialogSchoolInfo.vue'
|
||||||
|
|
||||||
import ImgPostion from '@/assets/imgs/flag/position_blue.png'
|
import ImgPostion from '@/assets/imgs/flag/position_black.png'
|
||||||
import FlagRed from '@/assets/imgs/flag/flag_red.png'
|
import FlagRed from '@/assets/imgs/flag/flag_red.png'
|
||||||
import FlagYellow from '@/assets/imgs/flag/flag_yellow.png'
|
import FlagYellow from '@/assets/imgs/flag/flag_yellow.png'
|
||||||
import FlagPurple from '@/assets/imgs/flag/flag_purple.png'
|
import FlagPurple from '@/assets/imgs/flag/flag_purple.png'
|
||||||
@@ -148,7 +146,6 @@ import FlagBlue from '@/assets/imgs/flag/flag_blue.png'
|
|||||||
import FlagBlack from '@/assets/imgs/flag/flag_black.png'
|
import FlagBlack from '@/assets/imgs/flag/flag_black.png'
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
|
||||||
const appStore = useAppStore()
|
const appStore = useAppStore()
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -161,8 +158,14 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const formSchema = computed(() => {
|
const formSchema = computed(() => {
|
||||||
|
const newSchema = [...props.schema]
|
||||||
|
newSchema.forEach((it) => {
|
||||||
|
if (it.field == 'consultTime') {
|
||||||
|
it.componentProps['disabled-date'] = dateAfterToday
|
||||||
|
}
|
||||||
|
})
|
||||||
return [
|
return [
|
||||||
...props.schema,
|
...newSchema,
|
||||||
{
|
{
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
label: '诉求',
|
label: '诉求',
|
||||||
@@ -185,6 +188,10 @@ const formSchema = computed(() => {
|
|||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const dateAfterToday = (t) => {
|
||||||
|
return t.getTime() > Date.now()
|
||||||
|
}
|
||||||
|
|
||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const dialogTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
@@ -204,7 +211,6 @@ const tabName = ref('info')
|
|||||||
const followList = ref([])
|
const followList = ref([])
|
||||||
|
|
||||||
const areaValue = ref('')
|
const areaValue = ref('')
|
||||||
const areaList = ref([])
|
|
||||||
const address = ref('')
|
const address = ref('')
|
||||||
const defaultLatLng = ref({
|
const defaultLatLng = ref({
|
||||||
lat: 31.86119,
|
lat: 31.86119,
|
||||||
@@ -235,36 +241,54 @@ const open = async (type, id) => {
|
|||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
followList.value = []
|
followList.value = [
|
||||||
|
{
|
||||||
|
userId: useUserStore().getUser.id,
|
||||||
|
content: undefined,
|
||||||
|
nextFollowTime: formatDate(new Date()),
|
||||||
|
editable: true
|
||||||
|
}
|
||||||
|
]
|
||||||
address.value = ''
|
address.value = ''
|
||||||
defaultLatLng.value = {
|
defaultLatLng.value = {
|
||||||
lat: 31.86119,
|
lat: 31.86119,
|
||||||
lng: 117.283042
|
lng: 117.283042
|
||||||
}
|
}
|
||||||
}
|
nextTick(() => {
|
||||||
if (appStore.getAppInfo?.instanceType == 1 && !dialogMap.value) {
|
formRef.value.setValues(info.value)
|
||||||
nextTick(async () => {
|
|
||||||
await getSchoolPlace()
|
|
||||||
initMap(info.value)
|
|
||||||
remoteMethod(address.value)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function changeTab() {
|
||||||
|
if (tabName.value == 'map') {
|
||||||
|
if (!dialogMap.value) {
|
||||||
|
nextTick(async () => {
|
||||||
|
await getSchoolPlace()
|
||||||
|
initMap(info.value)
|
||||||
|
// remoteMethod(address.value)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
destroyMap()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
function resetForm() {
|
function resetForm() {
|
||||||
info.value.address = undefined
|
info.value.address = undefined
|
||||||
info.value.lat = undefined
|
info.value.lat = undefined
|
||||||
info.value.lng = undefined
|
info.value.lng = undefined
|
||||||
|
info.value.consultTime = formatDate(new Date())
|
||||||
info.value.followUsers = []
|
info.value.followUsers = []
|
||||||
info.value.diyParams = {}
|
info.value.diyParams = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
const placeList = ref([])
|
const placeList = ref([])
|
||||||
async function getSchoolPlace() {
|
async function getSchoolPlace() {
|
||||||
const data = await getPlaceList()
|
const data = await getPlaceList({ placeStatus: 0 })
|
||||||
placeList.value = data.placeList.filter((it) => it.status == 0 && it.schoolStatus == 0)
|
placeList.value = data.placeList
|
||||||
}
|
}
|
||||||
|
|
||||||
const emit = defineEmits(['success'])
|
const emit = defineEmits(['success'])
|
||||||
@@ -274,7 +298,7 @@ async function handleSave() {
|
|||||||
if (!formRef.value) return
|
if (!formRef.value) return
|
||||||
const valid = await formRef.value.getElFormRef().validate()
|
const valid = await formRef.value.getElFormRef().validate()
|
||||||
if (!valid) return
|
if (!valid) return
|
||||||
if (!followList.value && followList.value.length == 0) {
|
if (!followList.value || followList.value.length == 0) {
|
||||||
message.info('请添加跟进人')
|
message.info('请添加跟进人')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -303,11 +327,11 @@ async function handleSave() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (formType.value === 'create') {
|
if (formType.value === 'create') {
|
||||||
await ClueApi.createClue(params)
|
const data = await ClueApi.createClue(params)
|
||||||
message.success(t('common.createSuccess'))
|
message.success(data)
|
||||||
} else {
|
} else {
|
||||||
await ClueApi.updateClue(params)
|
const data = await ClueApi.updateClue(params)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(data)
|
||||||
}
|
}
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
// 发送操作成功的事件
|
// 发送操作成功的事件
|
||||||
@@ -353,11 +377,9 @@ function initMap(data) {
|
|||||||
zooms: [2, 22],
|
zooms: [2, 22],
|
||||||
center: [defaultLatLng.value.lng, defaultLatLng.value.lat]
|
center: [defaultLatLng.value.lng, defaultLatLng.value.lat]
|
||||||
})
|
})
|
||||||
if (data.lng || data.lat) {
|
addmark(defaultLatLng.value.lng, defaultLatLng.value.lat, AMap)
|
||||||
addmark(data.lng, data.lat, AMap)
|
|
||||||
}
|
|
||||||
AutoComplete.value = new AMap.AutoComplete({
|
AutoComplete.value = new AMap.AutoComplete({
|
||||||
city: '全国'
|
city: '合肥'
|
||||||
})
|
})
|
||||||
geoCoder.value = new AMap.Geocoder()
|
geoCoder.value = new AMap.Geocoder()
|
||||||
dialogMap.value.on('click', (e) => {
|
dialogMap.value.on('click', (e) => {
|
||||||
@@ -459,10 +481,11 @@ function addmark(lat, lng, AMap) {
|
|||||||
marker.value = new AMap.Marker({
|
marker.value = new AMap.Marker({
|
||||||
position: new AMap.LngLat(lat, lng),
|
position: new AMap.LngLat(lat, lng),
|
||||||
zoom: 13,
|
zoom: 13,
|
||||||
icon: ImgPostion
|
icon: ImgPostion,
|
||||||
|
offset: [-16, -32]
|
||||||
})
|
})
|
||||||
dialogMap.value.add(marker.value)
|
dialogMap.value.add(marker.value)
|
||||||
dialogMap.value.setCenter([lat, lng], '', 500)
|
dialogMap.value.setCenter([lat, lng], true)
|
||||||
getNearbySchool({ lat: lng, lng: lat })
|
getNearbySchool({ lat: lng, lng: lat })
|
||||||
}
|
}
|
||||||
function removeMarker() {
|
function removeMarker() {
|
||||||
@@ -508,28 +531,33 @@ function showSchoolInfo(val) {
|
|||||||
schoolInfoDialog.value.open(val)
|
schoolInfoDialog.value.open(val)
|
||||||
}
|
}
|
||||||
|
|
||||||
function remoteMethod(searchValue) {
|
function remoteMethod(searchValue, cb) {
|
||||||
if (searchValue !== '') {
|
if (searchValue) {
|
||||||
setTimeout(() => {
|
AutoComplete.value?.search(searchValue, (status, result) => {
|
||||||
AutoComplete.value?.search(searchValue, (status, result) => {
|
if (result.tips?.length) {
|
||||||
if (result.tips?.length) {
|
// areaList.value = result?.tips
|
||||||
areaList.value = result?.tips
|
const list = result.tips.map((it) => ({
|
||||||
}
|
...it,
|
||||||
})
|
value: it.name
|
||||||
}, 200)
|
}))
|
||||||
|
cb(list)
|
||||||
|
} else {
|
||||||
|
cb([])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
cb([])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function currentSelect(val) {
|
function currentSelect(val) {
|
||||||
const area = areaList.value.find((it) => it.name == val)
|
if (val) {
|
||||||
if (area) {
|
|
||||||
defaultLatLng.value = {
|
defaultLatLng.value = {
|
||||||
lng: area.location?.lng,
|
lng: val.location?.lng,
|
||||||
lat: area.location?.lat
|
lat: val.location?.lat
|
||||||
}
|
}
|
||||||
addmark(area.location?.lng, area.location?.lat, aMap.value)
|
addmark(val.location?.lng, val.location?.lat, aMap.value)
|
||||||
dialogMap.value.setCenter([area.location?.lng, area.location?.lat], '', 500)
|
regeoCode(val.location?.lng, val.location?.lat)
|
||||||
regeoCode(area.location?.lng, area.location?.lat)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -445,7 +445,7 @@ async function getClassTypeOptions() {
|
|||||||
function getOptions() {
|
function getOptions() {
|
||||||
if (appStore.getAppInfo?.instanceType == 1) {
|
if (appStore.getAppInfo?.instanceType == 1) {
|
||||||
// 驾校
|
// 驾校
|
||||||
getPlaceList().then((data) => {
|
getPlaceList({ placeStatus: 0, schoolStatus: 0, isSearchSchool: true }).then((data) => {
|
||||||
schoolOptions.value = data.schoolList
|
schoolOptions.value = data.schoolList
|
||||||
allPlaceOptions.value = data.placeList
|
allPlaceOptions.value = data.placeList
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ import DialogSchoolInfo from './DialogSchoolInfo.vue'
|
|||||||
import AMapLoader from '@amap/amap-jsapi-loader'
|
import AMapLoader from '@amap/amap-jsapi-loader'
|
||||||
import { formatDate, dateFormatter } from '@/utils/formatTime'
|
import { formatDate, dateFormatter } from '@/utils/formatTime'
|
||||||
|
|
||||||
import ImgPostion from '@/assets/imgs/flag/position_blue.png'
|
import ImgPostion from '@/assets/imgs/flag/position_black.png'
|
||||||
import FlagRed from '@/assets/imgs/flag/flag_red.png'
|
import FlagRed from '@/assets/imgs/flag/flag_red.png'
|
||||||
import FlagYellow from '@/assets/imgs/flag/flag_yellow.png'
|
import FlagYellow from '@/assets/imgs/flag/flag_yellow.png'
|
||||||
import FlagPurple from '@/assets/imgs/flag/flag_purple.png'
|
import FlagPurple from '@/assets/imgs/flag/flag_purple.png'
|
||||||
@@ -267,8 +267,8 @@ function followSuccess() {
|
|||||||
|
|
||||||
const placeList = ref([])
|
const placeList = ref([])
|
||||||
async function getSchoolPlace() {
|
async function getSchoolPlace() {
|
||||||
const data = await getPlaceList()
|
const data = await getPlaceList({ placeStatus: 0 })
|
||||||
placeList.value = data.placeList.filter((it) => it.status == 0 && it.schoolStatus == 0)
|
placeList.value = data.placeList
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultLatLng = ref({
|
const defaultLatLng = ref({
|
||||||
@@ -339,7 +339,8 @@ function addmark(lat, lng, AMap) {
|
|||||||
marker.value = new AMap.Marker({
|
marker.value = new AMap.Marker({
|
||||||
position: new AMap.LngLat(lat, lng),
|
position: new AMap.LngLat(lat, lng),
|
||||||
zoom: 13,
|
zoom: 13,
|
||||||
icon: ImgPostion
|
icon: ImgPostion,
|
||||||
|
offset: [-16, -32]
|
||||||
})
|
})
|
||||||
dialogMap.value.add(marker.value)
|
dialogMap.value.add(marker.value)
|
||||||
dialogMap.value.setCenter([lat, lng], '', 500)
|
dialogMap.value.setCenter([lat, lng], '', 500)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<el-tabs v-model="queryType" size="small" @tab-change="getTableList">
|
<el-tabs v-model="queryType" size="small" @tab-change="quickChange">
|
||||||
<el-tab-pane label="全部" name="0" />
|
<el-tab-pane label="全部" name="0" />
|
||||||
<el-tab-pane name="1">
|
<el-tab-pane name="1">
|
||||||
<template #label>
|
<template #label>
|
||||||
@@ -31,6 +31,14 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="公海" name="4" />
|
<el-tab-pane label="公海" name="4" />
|
||||||
|
<el-tab-pane
|
||||||
|
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||||
|
label="地图总览"
|
||||||
|
name="5"
|
||||||
|
style="height: calc(100vh - 160px)"
|
||||||
|
>
|
||||||
|
<ClueMap ref="mapClue" v-if="queryType == 5" />
|
||||||
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<div class="absolute" style="right: 10px; top: 0">
|
<div class="absolute" style="right: 10px; top: 0">
|
||||||
<el-button plain v-hasPermi="['clue:pool:import']">导入</el-button>
|
<el-button plain v-hasPermi="['clue:pool:import']">导入</el-button>
|
||||||
@@ -39,117 +47,119 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 搜索工作栏 -->
|
<template v-if="queryType != 5">
|
||||||
<Search v-if="!loading" ref="searchRef" :schema="allSchemas.searchSchema" labelWidth="0">
|
<!-- 搜索工作栏 -->
|
||||||
<template #actionMore>
|
<Search v-if="!loading" ref="searchRef" :schema="allSchemas.searchSchema" labelWidth="0">
|
||||||
<el-button @click="getTableList" v-hasPermi="['clue:pool:search']"> 搜索 </el-button>
|
<template #actionMore>
|
||||||
<el-button @click="resetQuery" v-hasPermi="['clue:pool:reset']"> 重置 </el-button>
|
<el-button @click="getTableList" v-hasPermi="['clue:pool:search']"> 搜索 </el-button>
|
||||||
</template>
|
<el-button @click="resetQuery" v-hasPermi="['clue:pool:reset']"> 重置 </el-button>
|
||||||
</Search>
|
</template>
|
||||||
<!-- 列表 -->
|
</Search>
|
||||||
<SSTable
|
<!-- 列表 -->
|
||||||
v-if="!loading"
|
<SSTable
|
||||||
class="mt-20px"
|
v-if="!loading"
|
||||||
v-model:tableObject="tableObject"
|
class="mt-20px"
|
||||||
:tableColumns="allSchemas.tableColumns"
|
v-model:tableObject="tableObject"
|
||||||
@get-list="getTableList"
|
:tableColumns="allSchemas.tableColumns"
|
||||||
@get-checked-columns="getCheckedColumns"
|
@get-list="getTableList"
|
||||||
>
|
@get-checked-columns="getCheckedColumns"
|
||||||
<el-table-column
|
|
||||||
v-for="item in showColumns"
|
|
||||||
:key="item.field"
|
|
||||||
:prop="item.field"
|
|
||||||
:label="item.label"
|
|
||||||
min-width="120px"
|
|
||||||
>
|
>
|
||||||
<template #default="{ row }">
|
<el-table-column
|
||||||
<div v-if="item.field == 'followRecord'">
|
v-for="item in showColumns"
|
||||||
<el-button
|
:key="item.field"
|
||||||
type="primary"
|
:prop="item.field"
|
||||||
text
|
:label="item.label"
|
||||||
style="padding: 0"
|
min-width="120px"
|
||||||
@click="handleFollow(row)"
|
>
|
||||||
v-if="queryType != 4"
|
<template #default="{ row }">
|
||||||
v-hasPermi="['clue:pool:update']"
|
<div v-if="item.field == 'followRecord'">
|
||||||
>
|
<el-button
|
||||||
快速新增
|
type="primary"
|
||||||
</el-button>
|
text
|
||||||
</div>
|
style="padding: 0"
|
||||||
<div v-else-if="item.field == 'contact'">
|
@click="handleFollow(row)"
|
||||||
<span>{{ row[item.field] }}</span>
|
v-if="queryType != 4"
|
||||||
<Icon class="ml-5px" icon="ep:phone" @click="makeCall(row.contact)" />
|
v-hasPermi="['clue:pool:update']"
|
||||||
</div>
|
>
|
||||||
<div v-else-if="item.form?.component == 'DatePicker'">
|
快速新增
|
||||||
<span>{{ formatDate(row[item.field]) }}</span>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="item.field == 'remark' || item.form?.component == 'Editor'">
|
<div v-else-if="item.field == 'contact'">
|
||||||
<el-popover placement="top" width="500px" trigger="click" v-if="row[item.field]">
|
<span>{{ row[item.field] }}</span>
|
||||||
<template #reference>
|
<Icon class="ml-5px" icon="ep:phone" @click="makeCall(row.contact)" />
|
||||||
<el-button type="primary" style="padding: 0" text>点击查看</el-button>
|
</div>
|
||||||
</template>
|
<div v-else-if="item.form?.component == 'DatePicker'">
|
||||||
<div v-dompurify-html="row[item.field]"></div>
|
<span>{{ formatDate(row[item.field]) }}</span>
|
||||||
</el-popover>
|
</div>
|
||||||
</div>
|
<div v-else-if="item.field == 'remark' || item.form?.component == 'Editor'">
|
||||||
<span v-else>{{ row[item.field] }}</span>
|
<el-popover placement="top" width="500px" trigger="click" v-if="row[item.field]">
|
||||||
</template>
|
<template #reference>
|
||||||
</el-table-column>
|
<el-button type="primary" style="padding: 0" text>点击查看</el-button>
|
||||||
<el-table-column label="操作" width="200px" fixed="right">
|
</template>
|
||||||
<template #default="scope">
|
<div v-dompurify-html="row[item.field]"></div>
|
||||||
<el-button
|
</el-popover>
|
||||||
type="primary"
|
</div>
|
||||||
link
|
<span v-else>{{ row[item.field] }}</span>
|
||||||
@click="handleDetail(scope.row)"
|
|
||||||
v-hasPermi="['clue:pool:detail']"
|
|
||||||
>
|
|
||||||
详情
|
|
||||||
</el-button>
|
|
||||||
<template v-if="queryType != 4">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
link
|
|
||||||
@click="handleEdit(scope.row)"
|
|
||||||
v-hasPermi="['clue:pool:update']"
|
|
||||||
>
|
|
||||||
修改
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
link
|
|
||||||
:disabled="scope.row.state == '成交'"
|
|
||||||
@click="handleSuccess(scope.row)"
|
|
||||||
v-hasPermi="['clue:pool:enroll']"
|
|
||||||
>
|
|
||||||
登记
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
link
|
|
||||||
v-hasPermi="['clue:pool:release']"
|
|
||||||
@click="handleRelease(scope.row.clueId)"
|
|
||||||
>
|
|
||||||
释放
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="200px" fixed="right">
|
||||||
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
v-hasPermi="['clue:pool:gain']"
|
@click="handleDetail(scope.row)"
|
||||||
@click="handleGain(scope.row.clueId)"
|
v-hasPermi="['clue:pool:detail']"
|
||||||
>
|
>
|
||||||
获取
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<template v-if="queryType != 4">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
@click="handleEdit(scope.row)"
|
||||||
|
v-hasPermi="['clue:pool:update']"
|
||||||
|
>
|
||||||
|
修改
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
:disabled="scope.row.state == '成交'"
|
||||||
|
@click="handleSuccess(scope.row)"
|
||||||
|
v-hasPermi="['clue:pool:enroll']"
|
||||||
|
>
|
||||||
|
登记
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
v-hasPermi="['clue:pool:release']"
|
||||||
|
@click="handleRelease(scope.row.clueId)"
|
||||||
|
>
|
||||||
|
释放
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
v-hasPermi="['clue:pool:gain']"
|
||||||
|
@click="handleGain(scope.row.clueId)"
|
||||||
|
>
|
||||||
|
获取
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
</SSTable>
|
||||||
</SSTable>
|
</template>
|
||||||
|
|
||||||
<DialogClue
|
<DialogClue
|
||||||
v-if="!loading"
|
v-if="!loading"
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:userOptions="userOptions"
|
:userOptions="userOptions"
|
||||||
:schema="allSchemas.formSchema"
|
:schema="allSchemas.formSchema"
|
||||||
@sucess="getTableList"
|
@success="getTableList"
|
||||||
/>
|
/>
|
||||||
<DrawerClue
|
<DrawerClue
|
||||||
v-if="!loading"
|
v-if="!loading"
|
||||||
@@ -164,11 +174,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="CluePool">
|
<script setup name="CluePool">
|
||||||
|
import { useAppStore } from '@/store/modules/app'
|
||||||
import { getSimpleFieldList } from '@/api/clue/clueField'
|
import { getSimpleFieldList } from '@/api/clue/clueField'
|
||||||
import DialogClue from './Comp/DialogClue.vue'
|
import DialogClue from './Comp/DialogClue.vue'
|
||||||
import DrawerClue from './Comp/DrawerClue.vue'
|
import DrawerClue from './Comp/DrawerClue.vue'
|
||||||
import DialogSuccess from './Comp/DialogSuccess.vue'
|
import DialogSuccess from './Comp/DialogSuccess.vue'
|
||||||
import DialogFollow from './Comp/DialogFollow.vue'
|
import DialogFollow from './Comp/DialogFollow.vue'
|
||||||
|
import ClueMap from './Comp/ClueMap.vue'
|
||||||
import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
||||||
|
|
||||||
import { removeNullField } from '@/utils'
|
import { removeNullField } from '@/utils'
|
||||||
@@ -177,6 +189,7 @@ import { formatDate } from '@/utils/formatTime'
|
|||||||
import * as ClueApi from '@/api/clue'
|
import * as ClueApi from '@/api/clue'
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
const appStore = useAppStore()
|
||||||
|
|
||||||
const searchRef = ref()
|
const searchRef = ref()
|
||||||
const queryType = ref('2')
|
const queryType = ref('2')
|
||||||
@@ -223,10 +236,24 @@ function getCheckedColumns(list) {
|
|||||||
showColumns.value = list && list.length ? list : allSchemas.value.tableColumns
|
showColumns.value = list && list.length ? list : allSchemas.value.tableColumns
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const mapClue = ref()
|
||||||
|
function quickChange(name) {
|
||||||
|
try {
|
||||||
|
if (name != '5') {
|
||||||
|
resetQuery()
|
||||||
|
mapClue.value && mapClue.value.destroyMap()
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function resetQuery() {
|
function resetQuery() {
|
||||||
searchRef.value.reset()
|
nextTick(() => {
|
||||||
tableObject.value.pageNo = 1
|
searchRef.value && searchRef.value.reset()
|
||||||
getTableList()
|
tableObject.value.pageNo = 1
|
||||||
|
getTableList()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getTableList() {
|
async function getTableList() {
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
<span class="mr-10px">{{ item.username }}</span>
|
<span class="mr-10px">{{ item.username }}</span>
|
||||||
<span>已跟进{{ item.followNum }}条线索</span>
|
<span>已跟进{{ item.followNum }}条线索</span>
|
||||||
</li>
|
</li>
|
||||||
<br />
|
<!-- <br /> -->
|
||||||
<!-- </TransitionGroup> -->
|
<!-- </TransitionGroup> -->
|
||||||
</ul>
|
</ul>
|
||||||
</el-skeleton>
|
</el-skeleton>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
:options="props.schoolOption"
|
:options="props.schoolOption"
|
||||||
v-model="formData.schPlace"
|
v-model="formData.schPlace"
|
||||||
filterable
|
filterable
|
||||||
:props="{ value: 'id' }"
|
:props="{ value: 'value' }"
|
||||||
show-all-levels
|
show-all-levels
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="handleBatchDelete"
|
@click="handleBatchDelete([])"
|
||||||
v-hasPermi="['school:class:batch-delete']"
|
v-hasPermi="['school:class:batch-delete']"
|
||||||
>批量删除</el-button
|
>批量删除</el-button
|
||||||
>
|
>
|
||||||
@@ -175,7 +175,11 @@ const schoolOption = ref([])
|
|||||||
|
|
||||||
async function getSchoolList() {
|
async function getSchoolList() {
|
||||||
try {
|
try {
|
||||||
const data = await PlaceApi.getPlaceList()
|
const data = await PlaceApi.getPlaceList({
|
||||||
|
placeStatus: 0,
|
||||||
|
schoolStatus: 0,
|
||||||
|
isSearchSchool: true
|
||||||
|
})
|
||||||
schoolOption.value = data.schoolList.map((item) => ({
|
schoolOption.value = data.schoolList.map((item) => ({
|
||||||
value: item.schoolId,
|
value: item.schoolId,
|
||||||
label: item.schoolName,
|
label: item.schoolName,
|
||||||
@@ -240,7 +244,7 @@ function handleReset() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function handleBatchDelete(arr = []) {
|
async function handleBatchDelete(arr = []) {
|
||||||
if (!arr.length || !selectRows.value.length) {
|
if (!arr.length && !selectRows.value.length) {
|
||||||
message.info('请选择表格行!')
|
message.info('请选择表格行!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -325,7 +325,10 @@ function regeoCode() {
|
|||||||
async function getPageData() {
|
async function getPageData() {
|
||||||
schoolList.value = []
|
schoolList.value = []
|
||||||
tableData.value = []
|
tableData.value = []
|
||||||
const data = await PlaceApi.getPlaceList()
|
const data = await PlaceApi.getPlaceList({
|
||||||
|
schoolStatus: 0,
|
||||||
|
isSearchSchool: true
|
||||||
|
})
|
||||||
if (data.schoolList) {
|
if (data.schoolList) {
|
||||||
schoolList.value = data.schoolList.map((item) => ({ ...item, showInMap: true }))
|
schoolList.value = data.schoolList.map((item) => ({ ...item, showInMap: true }))
|
||||||
}
|
}
|
||||||
@@ -363,7 +366,7 @@ function handleClickSchool(item) {
|
|||||||
function createMarkersInMap() {
|
function createMarkersInMap() {
|
||||||
for (let i = 0; i < tableData.value.length; i++) {
|
for (let i = 0; i < tableData.value.length; i++) {
|
||||||
const element = tableData.value[i]
|
const element = tableData.value[i]
|
||||||
if (!element.schoolShow || !element.showInMap) {
|
if (!element.schoolShow || !element.showInMap || element.status == 1) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
const markerIcon = flagMap[element.flagColor || 'red']
|
const markerIcon = flagMap[element.flagColor || 'red']
|
||||||
@@ -542,7 +545,8 @@ async function changePlaceStatus(row) {
|
|||||||
await PlaceApi.updatePlaceStatus(row.placeId, row.status)
|
await PlaceApi.updatePlaceStatus(row.placeId, row.status)
|
||||||
message.success('修改成功')
|
message.success('修改成功')
|
||||||
// 刷新列表
|
// 刷新列表
|
||||||
// await getList()
|
// await getPageData()
|
||||||
|
tableData.value.find((item) => item.placeId == row.placeId).status = row.status
|
||||||
resetMarkers()
|
resetMarkers()
|
||||||
} catch {
|
} catch {
|
||||||
// 取消后,进行恢复按钮
|
// 取消后,进行恢复按钮
|
||||||
|
|||||||
Reference in New Issue
Block a user