20 changed files with 1703 additions and 1908 deletions
@ -1,38 +1,38 @@ |
|||
{ |
|||
"source": "来源", |
|||
"sourcePlaceholder": "请输入来源", |
|||
"sourceChannel": "来源渠道", |
|||
"sourceChannelPlaceholder": "请输入来源渠道", |
|||
"consultant": "顾问", |
|||
"name": "姓名", |
|||
"namePlaceholder": "请输入姓名", |
|||
"age": "年龄", |
|||
"agePlaceholder": "请输入年龄", |
|||
"gender": "性别", |
|||
"genderPlaceholder": "请输入性别", |
|||
"phoneNumber": "联系电话", |
|||
"phoneNumberPlaceholder": "请输入联系电话", |
|||
"demand": "需求", |
|||
"demandPlaceholder": "请输入需求", |
|||
"purchasingPower": "购买力", |
|||
"purchasingPowerPlaceholder": "请输入购买力", |
|||
"cognitiveIdea": "认知理念", |
|||
"cognitiveIdeaPlaceholder": "请输入认知理念", |
|||
"optionalClassTime": "可选上课时间", |
|||
"optionalClassTimePlaceholder": "请输入可选上课时间", |
|||
"distance": "距离", |
|||
"distancePlaceholder": "请输入距离", |
|||
"decisionMaker": "决策人", |
|||
"decisionMakerPlaceholder": "请输入决策人", |
|||
"initialIntent": "客户初步意向度", |
|||
"initialIntentPlaceholder": "请输入客户初步意向度", |
|||
"campus": "所属校区", |
|||
"campusPlaceholder": "请输入所属校区", |
|||
"status": "客户状态", |
|||
"statusPlaceholder": "请输入客户状态", |
|||
"addCustomerResources": "添加客户资源", |
|||
"updateCustomerResources": "编辑客户资源", |
|||
"customerResourcesDeleteTips": "确定要删除该数据吗?", |
|||
"startDate": "请选择开始时间", |
|||
"endDate": "请选择结束时间" |
|||
} |
|||
"source":"来源", |
|||
"sourcePlaceholder":"请输入来源", |
|||
"sourceChannel":"来源渠道", |
|||
"sourceChannelPlaceholder":"请输入来源渠道", |
|||
"consultant":"顾问", |
|||
"name":"姓名", |
|||
"namePlaceholder":"请输入姓名", |
|||
"age":"年龄", |
|||
"agePlaceholder":"请输入年龄", |
|||
"gender":"性别", |
|||
"genderPlaceholder":"请输入性别", |
|||
"phoneNumber":"联系电话", |
|||
"phoneNumberPlaceholder":"请输入联系电话", |
|||
"demand":"需求", |
|||
"demandPlaceholder":"请输入需求", |
|||
"purchasingPower":"购买力", |
|||
"purchasingPowerPlaceholder":"请输入购买力", |
|||
"cognitiveIdea":"认知理念", |
|||
"cognitiveIdeaPlaceholder":"请输入认知理念", |
|||
"optionalClassTime":"可选上课时间", |
|||
"optionalClassTimePlaceholder":"请输入可选上课时间", |
|||
"distance":"距离", |
|||
"distancePlaceholder":"请输入距离", |
|||
"decisionMaker":"决策人", |
|||
"decisionMakerPlaceholder":"请输入决策人", |
|||
"initialIntent":"客户初步意向度", |
|||
"initialIntentPlaceholder":"请输入客户初步意向度", |
|||
"campus":"所属校区", |
|||
"campusPlaceholder":"请输入所属校区", |
|||
"status":"客户状态", |
|||
"statusPlaceholder":"请输入客户状态", |
|||
"addCustomerResources":"添加客户资源", |
|||
"updateCustomerResources":"编辑客户资源", |
|||
"customerResourcesDeleteTips":"确定要删除该数据吗?", |
|||
"startDate":"请选择开始时间", |
|||
"endDate":"请选择结束时间" |
|||
} |
|||
@ -1,35 +1,29 @@ |
|||
{ |
|||
"id": "编号", |
|||
"idPlaceholder": "请输入编号", |
|||
"purchasePower": "需求购买力", |
|||
"purchasePowerPlaceholder": "请输入需求购买力", |
|||
"conceptAwareness": "认知理念", |
|||
"conceptAwarenessPlaceholder": "请输入认知理念", |
|||
"preferredClassTime": "可选上课时间", |
|||
"preferredClassTimePlaceholder": "请输入可选上课时间", |
|||
"distance": "距离", |
|||
"distancePlaceholder": "请输入距离", |
|||
"communication": "沟通备注", |
|||
"communicationPlaceholder": "请输入沟通备注", |
|||
"promisedVisitTime": "承诺到访时间", |
|||
"promisedVisitTimePlaceholder": "请输入承诺到访时间", |
|||
"actualVisitTime": "实际到访时间", |
|||
"actualVisitTimePlaceholder": "请输入实际到访时间", |
|||
"callIntent": "电话后的意向程度: low-低, medium-中, high-高", |
|||
"callIntentPlaceholder": "请输入电话后的意向程度: low-低, medium-中, high-高", |
|||
"firstVisitStatus": "一访情况", |
|||
"firstVisitStatusPlaceholder": "请输入一访情况", |
|||
"secondVisitStatus": "二访情况", |
|||
"secondVisitStatusPlaceholder": "请输入二访情况", |
|||
"isClosed": "是否关单: 1-是, 0-否", |
|||
"isClosedPlaceholder": "请输入是否关单: 1-是, 0-否", |
|||
"staffId": "人员ID", |
|||
"staffIdPlaceholder": "请输入人员ID", |
|||
"resourceId": "资源ID", |
|||
"resourceIdPlaceholder": "请输入资源ID", |
|||
"addSixSpeed": "添加六一速", |
|||
"updateSixSpeed": "编辑六一速", |
|||
"sixSpeedDeleteTips": "确定要删除该数据吗?", |
|||
"startDate": "请选择开始时间", |
|||
"endDate": "请选择结束时间" |
|||
} |
|||
"purchasePower":"需求购买力", |
|||
"purchasePowerPlaceholder":"请输入需求购买力", |
|||
"conceptAwareness":"认知理念", |
|||
"conceptAwarenessPlaceholder":"请输入认知理念", |
|||
"preferredClassTime":"可选上课时间", |
|||
"preferredClassTimePlaceholder":"请输入可选上课时间", |
|||
"distance":"距离", |
|||
"distancePlaceholder":"请输入距离", |
|||
"communication":"沟通备注", |
|||
"communicationPlaceholder":"请输入沟通备注", |
|||
"promisedVisitTime":"承诺到访时间", |
|||
"promisedVisitTimePlaceholder":"请输入承诺到访时间", |
|||
"actualVisitTime":"实际到访时间", |
|||
"actualVisitTimePlaceholder":"请输入实际到访时间", |
|||
"callIntent":"电话后的意向程度", |
|||
"callIntentPlaceholder":"请输入电话后的意向程度", |
|||
"firstVisitStatus":"一访情况", |
|||
"firstVisitStatusPlaceholder":"请输入一访情况", |
|||
"secondVisitStatus":"二访情况", |
|||
"secondVisitStatusPlaceholder":"请输入二访情况", |
|||
"isClosed":"是否关单", |
|||
"isClosedPlaceholder":"请输入是否关单", |
|||
"addSixSpeed":"添加六一速", |
|||
"updateSixSpeed":"编辑六一速", |
|||
"sixSpeedDeleteTips":"确定要删除该数据吗?", |
|||
"startDate":"请选择开始时间", |
|||
"endDate":"请选择结束时间" |
|||
} |
|||
File diff suppressed because it is too large
@ -1,311 +1,231 @@ |
|||
<template> |
|||
<div class="main-container"> |
|||
<el-card class="box-card !border-none" shadow="never"> |
|||
<div class="flex justify-between items-center"> |
|||
<span class="text-lg">{{ pageName }}</span> |
|||
<el-button type="primary" @click="addEvent"> |
|||
{{ t('addCustomerResources') }} |
|||
</el-button> |
|||
</div> |
|||
|
|||
<el-card |
|||
class="box-card !border-none my-[10px] table-search-wrap" |
|||
shadow="never" |
|||
> |
|||
<el-form |
|||
:inline="true" |
|||
:model="customerResourcesTable.searchParam" |
|||
ref="searchFormRef" |
|||
> |
|||
<el-form-item :label="t('name')" prop="name"> |
|||
<el-input |
|||
v-model="customerResourcesTable.searchParam.name" |
|||
:placeholder="t('namePlaceholder')" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item :label="t('phoneNumber')" prop="phone_number"> |
|||
<el-input |
|||
v-model="customerResourcesTable.searchParam.phone_number" |
|||
:placeholder="t('phoneNumberPlaceholder')" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item> |
|||
<el-button type="primary" @click="loadCustomerResourcesList()">{{ |
|||
t('search') |
|||
}}</el-button> |
|||
<el-button @click="resetForm(searchFormRef)">{{ |
|||
t('reset') |
|||
}}</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-card> |
|||
|
|||
<div class="mt-[10px]"> |
|||
<el-table |
|||
:data="customerResourcesTable.data" |
|||
size="large" |
|||
v-loading="customerResourcesTable.loading" |
|||
> |
|||
<template #empty> |
|||
<span>{{ |
|||
!customerResourcesTable.loading ? t('emptyData') : '' |
|||
}}</span> |
|||
</template> |
|||
<el-table-column |
|||
:label="t('source')" |
|||
min-width="180" |
|||
align="center" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
<template #default="{ row }"> |
|||
<div v-for="(item, index) in sourceList"> |
|||
<div v-if="item.value == row.source">{{ item.name }}</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="consultant" |
|||
:label="t('consultant')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
prop="name" |
|||
:label="t('name')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
prop="age" |
|||
:label="t('age')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
:label="t('gender')" |
|||
min-width="180" |
|||
align="center" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
<template #default="{ row }"> |
|||
<div v-for="(item, index) in genderList"> |
|||
<div v-if="item.value == row.gender">{{ item.name }}</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="phone_number" |
|||
:label="t('phoneNumber')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
prop="decision_maker" |
|||
:label="t('decisionMaker')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
:label="t('operation')" |
|||
fixed="right" |
|||
min-width="120" |
|||
> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="editEvent(row)">{{ |
|||
t('edit') |
|||
}}</el-button> |
|||
<el-button type="primary" link @click="deleteEvent(row.id)">{{ |
|||
t('delete') |
|||
}}</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div class="mt-[16px] flex justify-end"> |
|||
<el-pagination |
|||
v-model:current-page="customerResourcesTable.page" |
|||
v-model:page-size="customerResourcesTable.limit" |
|||
layout="total, sizes, prev, pager, next, jumper" |
|||
:total="customerResourcesTable.total" |
|||
@size-change="loadCustomerResourcesList()" |
|||
@current-change="loadCustomerResourcesList" |
|||
/> |
|||
</div> |
|||
</div> |
|||
|
|||
<edit |
|||
ref="editCustomerResourcesDialog" |
|||
@complete="loadCustomerResourcesList" |
|||
/> |
|||
</el-card> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, watch } from 'vue' |
|||
import { t } from '@/lang' |
|||
import { useDictionary } from '@/app/api/dict' |
|||
import { |
|||
getCustomerResourcesList, |
|||
deleteCustomerResources, |
|||
getWithCampusList, |
|||
} from '@/app/api/customer_resources' |
|||
import { img } from '@/utils/common' |
|||
import { ElMessageBox, FormInstance } from 'element-plus' |
|||
import Edit from '@/app/views/customer_resources/components/customer-resources-edit.vue' |
|||
import { useRoute } from 'vue-router' |
|||
const route = useRoute() |
|||
const pageName = route.meta.title |
|||
|
|||
let customerResourcesTable = reactive({ |
|||
page: 1, |
|||
limit: 10, |
|||
total: 0, |
|||
loading: true, |
|||
data: [], |
|||
searchParam: { |
|||
name: '', |
|||
phone_number: '', |
|||
}, |
|||
}) |
|||
|
|||
const searchFormRef = ref<FormInstance>() |
|||
|
|||
// 选中数据 |
|||
const selectData = ref<any[]>([]) |
|||
|
|||
// 字典数据 |
|||
const sourceList = ref([] as any[]) |
|||
const sourceDictList = async () => { |
|||
sourceList.value = await (await useDictionary('source')).data.dictionary |
|||
} |
|||
sourceDictList() |
|||
const source_channelList = ref([] as any[]) |
|||
const source_channelDictList = async () => { |
|||
source_channelList.value = await ( |
|||
await useDictionary('SourceChannel') |
|||
).data.dictionary |
|||
} |
|||
source_channelDictList() |
|||
const genderList = ref([] as any[]) |
|||
const genderDictList = async () => { |
|||
genderList.value = await (await useDictionary('zy_sex')).data.dictionary |
|||
} |
|||
genderDictList() |
|||
const purchasing_powerList = ref([] as any[]) |
|||
const purchasing_powerDictList = async () => { |
|||
purchasing_powerList.value = await ( |
|||
await useDictionary('customer_purchasing_power') |
|||
).data.dictionary |
|||
} |
|||
purchasing_powerDictList() |
|||
const cognitive_ideaList = ref([] as any[]) |
|||
const cognitive_ideaDictList = async () => { |
|||
cognitive_ideaList.value = await ( |
|||
await useDictionary('cognitive_concept') |
|||
).data.dictionary |
|||
} |
|||
cognitive_ideaDictList() |
|||
const initial_intentList = ref([] as any[]) |
|||
const initial_intentDictList = async () => { |
|||
initial_intentList.value = await ( |
|||
await useDictionary('preliminarycustomerintention') |
|||
).data.dictionary |
|||
} |
|||
initial_intentDictList() |
|||
const statusList = ref([] as any[]) |
|||
const statusDictList = async () => { |
|||
statusList.value = await (await useDictionary('kh_status')).data.dictionary |
|||
} |
|||
statusDictList() |
|||
|
|||
/** |
|||
* 获取客户资源列表 |
|||
*/ |
|||
const loadCustomerResourcesList = (page: number = 1) => { |
|||
customerResourcesTable.loading = true |
|||
customerResourcesTable.page = page |
|||
|
|||
getCustomerResourcesList({ |
|||
page: customerResourcesTable.page, |
|||
limit: customerResourcesTable.limit, |
|||
...customerResourcesTable.searchParam, |
|||
}) |
|||
.then((res) => { |
|||
customerResourcesTable.loading = false |
|||
customerResourcesTable.data = res.data.data |
|||
customerResourcesTable.total = res.data.total |
|||
}) |
|||
.catch(() => { |
|||
customerResourcesTable.loading = false |
|||
}) |
|||
} |
|||
loadCustomerResourcesList() |
|||
|
|||
const editCustomerResourcesDialog: Record<string, any> | null = ref(null) |
|||
|
|||
/** |
|||
* 添加客户资源 |
|||
*/ |
|||
const addEvent = () => { |
|||
editCustomerResourcesDialog.value.setFormData() |
|||
editCustomerResourcesDialog.value.showDialog = true |
|||
} |
|||
|
|||
/** |
|||
* 编辑客户资源 |
|||
* @param data |
|||
*/ |
|||
const editEvent = (data: any) => { |
|||
editCustomerResourcesDialog.value.setFormData(data) |
|||
editCustomerResourcesDialog.value.showDialog = true |
|||
} |
|||
|
|||
/** |
|||
* 删除客户资源 |
|||
*/ |
|||
const deleteEvent = (id: number) => { |
|||
ElMessageBox.confirm(t('customerResourcesDeleteTips'), t('warning'), { |
|||
confirmButtonText: t('confirm'), |
|||
cancelButtonText: t('cancel'), |
|||
type: 'warning', |
|||
}).then(() => { |
|||
deleteCustomerResources(id) |
|||
.then(() => { |
|||
loadCustomerResourcesList() |
|||
}) |
|||
.catch(() => {}) |
|||
}) |
|||
} |
|||
|
|||
const campusList = ref([]) |
|||
const setCampusList = async () => { |
|||
campusList.value = await (await getWithCampusList({})).data |
|||
} |
|||
setCampusList() |
|||
|
|||
const resetForm = (formEl: FormInstance | undefined) => { |
|||
if (!formEl) return |
|||
formEl.resetFields() |
|||
loadCustomerResourcesList() |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
/* 多行超出隐藏 */ |
|||
.multi-hidden { |
|||
word-break: break-all; |
|||
text-overflow: ellipsis; |
|||
overflow: hidden; |
|||
display: -webkit-box; |
|||
-webkit-line-clamp: 2; |
|||
-webkit-box-orient: vertical; |
|||
} |
|||
</style> |
|||
<template> |
|||
<div class="main-container"> |
|||
<el-card class="box-card !border-none" shadow="never"> |
|||
|
|||
<div class="flex justify-between items-center"> |
|||
<span class="text-lg">{{pageName}}</span> |
|||
<el-button type="primary" @click="addEvent"> |
|||
{{ t('addCustomerResources') }} |
|||
</el-button> |
|||
</div> |
|||
|
|||
<el-card class="box-card !border-none my-[10px] table-search-wrap" shadow="never"> |
|||
<el-form :inline="true" :model="customerResourcesTable.searchParam" ref="searchFormRef"> |
|||
<el-form-item :label="t('name')" prop="name"> |
|||
<el-input v-model="customerResourcesTable.searchParam.name" :placeholder="t('namePlaceholder')" /> |
|||
</el-form-item> |
|||
<el-form-item :label="t('phoneNumber')" prop="phone_number"> |
|||
<el-input v-model="customerResourcesTable.searchParam.phone_number" :placeholder="t('phoneNumberPlaceholder')" /> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" @click="loadCustomerResourcesList()">{{ t('search') }}</el-button> |
|||
<el-button @click="resetForm(searchFormRef)">{{ t('reset') }}</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-card> |
|||
|
|||
<div class="mt-[10px]"> |
|||
<el-table :data="customerResourcesTable.data" size="large" v-loading="customerResourcesTable.loading"> |
|||
<template #empty> |
|||
<span>{{ !customerResourcesTable.loading ? t('emptyData') : '' }}</span> |
|||
</template> |
|||
<el-table-column :label="t('source')" min-width="180" align="center" :show-overflow-tooltip="true"> |
|||
<template #default="{ row }"> |
|||
<div v-for="(item, index) in sourceList"> |
|||
<div v-if="item.value == row.source">{{ item.name }}</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="consultant_name" :label="t('consultant')" min-width="120" :show-overflow-tooltip="true"/> |
|||
|
|||
<el-table-column prop="name" :label="t('name')" min-width="120" :show-overflow-tooltip="true"/> |
|||
|
|||
<el-table-column prop="age" :label="t('age')" min-width="120" :show-overflow-tooltip="true"/> |
|||
|
|||
<el-table-column :label="t('gender')" min-width="180" align="center" :show-overflow-tooltip="true"> |
|||
<template #default="{ row }"> |
|||
<div v-for="(item, index) in genderList"> |
|||
<div v-if="item.value == row.gender">{{ item.name }}</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="phone_number" :label="t('phoneNumber')" min-width="120" :show-overflow-tooltip="true"/> |
|||
|
|||
<el-table-column prop="decision_maker" :label="t('decisionMaker')" min-width="120" :show-overflow-tooltip="true"/> |
|||
|
|||
<el-table-column :label="t('operation')" fixed="right" min-width="120"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="editEvent(row)">{{ t('edit') }}</el-button> |
|||
<el-button type="primary" link @click="deleteEvent(row.id)">{{ t('delete') }}</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
</el-table> |
|||
<div class="mt-[16px] flex justify-end"> |
|||
<el-pagination v-model:current-page="customerResourcesTable.page" v-model:page-size="customerResourcesTable.limit" |
|||
layout="total, sizes, prev, pager, next, jumper" :total="customerResourcesTable.total" |
|||
@size-change="loadCustomerResourcesList()" @current-change="loadCustomerResourcesList" /> |
|||
</div> |
|||
</div> |
|||
|
|||
<edit ref="editCustomerResourcesDialog" @complete="loadCustomerResourcesList" /> |
|||
</el-card> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, watch } from 'vue' |
|||
import { t } from '@/lang' |
|||
import { useDictionary } from '@/app/api/dict' |
|||
import { getCustomerResourcesList, deleteCustomerResources, getWithPersonnelList, getWithCampusList } from '@/app/api/customer_resources' |
|||
import { img } from '@/utils/common' |
|||
import { ElMessageBox,FormInstance } from 'element-plus' |
|||
import Edit from '@/app/views/customer_resources/components/customer-resources-edit.vue' |
|||
import { useRoute } from 'vue-router' |
|||
const route = useRoute() |
|||
const pageName = route.meta.title; |
|||
|
|||
let customerResourcesTable = reactive({ |
|||
page: 1, |
|||
limit: 10, |
|||
total: 0, |
|||
loading: true, |
|||
data: [], |
|||
searchParam:{ |
|||
"name":"", |
|||
"phone_number":"" |
|||
} |
|||
}) |
|||
|
|||
const searchFormRef = ref<FormInstance>() |
|||
|
|||
// 选中数据 |
|||
const selectData = ref<any[]>([]) |
|||
|
|||
// 字典数据 |
|||
const sourceList = ref([] as any[]) |
|||
const sourceDictList = async () => { |
|||
sourceList.value = await (await useDictionary('source')).data.dictionary |
|||
} |
|||
sourceDictList(); |
|||
const source_channelList = ref([] as any[]) |
|||
const source_channelDictList = async () => { |
|||
source_channelList.value = await (await useDictionary('SourceChannel')).data.dictionary |
|||
} |
|||
source_channelDictList(); |
|||
const genderList = ref([] as any[]) |
|||
const genderDictList = async () => { |
|||
genderList.value = await (await useDictionary('zy_sex')).data.dictionary |
|||
} |
|||
genderDictList(); |
|||
const purchasing_powerList = ref([] as any[]) |
|||
const purchasing_powerDictList = async () => { |
|||
purchasing_powerList.value = await (await useDictionary('customer_purchasing_power')).data.dictionary |
|||
} |
|||
purchasing_powerDictList(); |
|||
const cognitive_ideaList = ref([] as any[]) |
|||
const cognitive_ideaDictList = async () => { |
|||
cognitive_ideaList.value = await (await useDictionary('cognitive_concept')).data.dictionary |
|||
} |
|||
cognitive_ideaDictList(); |
|||
const initial_intentList = ref([] as any[]) |
|||
const initial_intentDictList = async () => { |
|||
initial_intentList.value = await (await useDictionary('preliminarycustomerintention')).data.dictionary |
|||
} |
|||
initial_intentDictList(); |
|||
const statusList = ref([] as any[]) |
|||
const statusDictList = async () => { |
|||
statusList.value = await (await useDictionary('kh_status')).data.dictionary |
|||
} |
|||
statusDictList(); |
|||
|
|||
/** |
|||
* 获取客户资源列表 |
|||
*/ |
|||
const loadCustomerResourcesList = (page: number = 1) => { |
|||
customerResourcesTable.loading = true |
|||
customerResourcesTable.page = page |
|||
|
|||
getCustomerResourcesList({ |
|||
page: customerResourcesTable.page, |
|||
limit: customerResourcesTable.limit, |
|||
...customerResourcesTable.searchParam |
|||
}).then(res => { |
|||
customerResourcesTable.loading = false |
|||
customerResourcesTable.data = res.data.data |
|||
customerResourcesTable.total = res.data.total |
|||
}).catch(() => { |
|||
customerResourcesTable.loading = false |
|||
}) |
|||
} |
|||
loadCustomerResourcesList() |
|||
|
|||
const editCustomerResourcesDialog: Record<string, any> | null = ref(null) |
|||
|
|||
/** |
|||
* 添加客户资源 |
|||
*/ |
|||
const addEvent = () => { |
|||
editCustomerResourcesDialog.value.setFormData() |
|||
editCustomerResourcesDialog.value.showDialog = true |
|||
} |
|||
|
|||
/** |
|||
* 编辑客户资源 |
|||
* @param data |
|||
*/ |
|||
const editEvent = (data: any) => { |
|||
editCustomerResourcesDialog.value.setFormData(data) |
|||
editCustomerResourcesDialog.value.showDialog = true |
|||
} |
|||
|
|||
/** |
|||
* 删除客户资源 |
|||
*/ |
|||
const deleteEvent = (id: number) => { |
|||
ElMessageBox.confirm(t('customerResourcesDeleteTips'), t('warning'), |
|||
{ |
|||
confirmButtonText: t('confirm'), |
|||
cancelButtonText: t('cancel'), |
|||
type: 'warning', |
|||
} |
|||
).then(() => { |
|||
deleteCustomerResources(id).then(() => { |
|||
loadCustomerResourcesList() |
|||
}).catch(() => { |
|||
}) |
|||
}) |
|||
} |
|||
|
|||
|
|||
const consultantList = ref([]) |
|||
const setConsultantList = async () => { |
|||
consultantList.value = await (await getWithPersonnelList({})).data |
|||
} |
|||
setConsultantList() |
|||
const campusList = ref([]) |
|||
const setCampusList = async () => { |
|||
campusList.value = await (await getWithCampusList({})).data |
|||
} |
|||
setCampusList() |
|||
|
|||
const resetForm = (formEl: FormInstance | undefined) => { |
|||
if (!formEl) return |
|||
formEl.resetFields() |
|||
loadCustomerResourcesList() |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
/* 多行超出隐藏 */ |
|||
.multi-hidden { |
|||
word-break: break-all; |
|||
text-overflow: ellipsis; |
|||
overflow: hidden; |
|||
display: -webkit-box; |
|||
-webkit-line-clamp: 2; |
|||
-webkit-box-orient: vertical; |
|||
} |
|||
</style> |
|||
|
|||
@ -1,358 +1,323 @@ |
|||
<template> |
|||
<el-dialog |
|||
v-model="showDialog" |
|||
:title="formData.id ? t('updateSixSpeed') : t('addSixSpeed')" |
|||
width="50%" |
|||
class="diy-dialog-wrap" |
|||
:destroy-on-close="true" |
|||
> |
|||
<el-form |
|||
:model="formData" |
|||
label-width="120px" |
|||
ref="formRef" |
|||
:rules="formRules" |
|||
class="page-form" |
|||
v-loading="loading" |
|||
> |
|||
<el-form-item :label="t('purchasePower')" prop="purchase_power"> |
|||
<el-input |
|||
v-model="formData.purchase_power" |
|||
clearable |
|||
:placeholder="t('purchasePowerPlaceholder')" |
|||
class="input-width" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item :label="t('conceptAwareness')" prop="concept_awareness"> |
|||
<el-input |
|||
v-model="formData.concept_awareness" |
|||
clearable |
|||
:placeholder="t('conceptAwarenessPlaceholder')" |
|||
class="input-width" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
:label="t('preferredClassTime')" |
|||
prop="preferred_class_time" |
|||
> |
|||
<el-input |
|||
v-model="formData.preferred_class_time" |
|||
clearable |
|||
:placeholder="t('preferredClassTimePlaceholder')" |
|||
class="input-width" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item :label="t('distance')" prop="distance"> |
|||
<el-input |
|||
v-model="formData.distance" |
|||
clearable |
|||
:placeholder="t('distancePlaceholder')" |
|||
class="input-width" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item :label="t('communication')" prop="communication"> |
|||
<el-input |
|||
v-model="formData.communication" |
|||
clearable |
|||
:placeholder="t('communicationPlaceholder')" |
|||
class="input-width" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item :label="t('promisedVisitTime')" prop="promised_visit_time"> |
|||
<el-input |
|||
v-model="formData.promised_visit_time" |
|||
clearable |
|||
:placeholder="t('promisedVisitTimePlaceholder')" |
|||
class="input-width" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item :label="t('actualVisitTime')"> |
|||
<el-input |
|||
v-model="formData.actual_visit_time" |
|||
clearable |
|||
:placeholder="t('actualVisitTimePlaceholder')" |
|||
class="input-width" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item :label="t('callIntent')" prop="call_intent"> |
|||
<el-input |
|||
v-model="formData.call_intent" |
|||
clearable |
|||
:placeholder="t('callIntentPlaceholder')" |
|||
class="input-width" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item :label="t('firstVisitStatus')"> |
|||
<el-input |
|||
v-model="formData.first_visit_status" |
|||
clearable |
|||
:placeholder="t('firstVisitStatusPlaceholder')" |
|||
class="input-width" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item :label="t('secondVisitStatus')"> |
|||
<el-input |
|||
v-model="formData.second_visit_status" |
|||
clearable |
|||
:placeholder="t('secondVisitStatusPlaceholder')" |
|||
class="input-width" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item :label="t('isClosed')" prop="is_closed"> |
|||
<el-input |
|||
v-model="formData.is_closed" |
|||
clearable |
|||
:placeholder="t('isClosedPlaceholder')" |
|||
class="input-width" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item :label="t('staffId')" prop="staff_id"> |
|||
<el-input |
|||
v-model="formData.staff_id" |
|||
clearable |
|||
:placeholder="t('staffIdPlaceholder')" |
|||
class="input-width" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item :label="t('resourceId')" prop="resource_id"> |
|||
<el-input |
|||
v-model="formData.resource_id" |
|||
clearable |
|||
:placeholder="t('resourceIdPlaceholder')" |
|||
class="input-width" |
|||
/> |
|||
</el-form-item> |
|||
</el-form> |
|||
|
|||
<template #footer> |
|||
<span class="dialog-footer"> |
|||
<el-button @click="showDialog = false">{{ t('cancel') }}</el-button> |
|||
<el-button |
|||
type="primary" |
|||
:loading="loading" |
|||
@click="confirm(formRef)" |
|||
>{{ t('confirm') }}</el-button |
|||
> |
|||
</span> |
|||
</template> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { ref, reactive, computed, watch } from 'vue' |
|||
import { useDictionary } from '@/app/api/dict' |
|||
import { t } from '@/lang' |
|||
import type { FormInstance } from 'element-plus' |
|||
import { addSixSpeed, editSixSpeed, getSixSpeedInfo } from '@/app/api/six_speed' |
|||
|
|||
let showDialog = ref(false) |
|||
const loading = ref(false) |
|||
|
|||
/** |
|||
* 表单数据 |
|||
*/ |
|||
const initialFormData = { |
|||
id: '', |
|||
purchase_power: '', |
|||
concept_awareness: '', |
|||
preferred_class_time: '', |
|||
distance: '', |
|||
communication: '', |
|||
promised_visit_time: '', |
|||
actual_visit_time: '', |
|||
call_intent: '', |
|||
first_visit_status: '', |
|||
second_visit_status: '', |
|||
is_closed: '', |
|||
staff_id: '', |
|||
resource_id: '', |
|||
} |
|||
const formData: Record<string, any> = reactive({ ...initialFormData }) |
|||
|
|||
const formRef = ref<FormInstance>() |
|||
|
|||
// 表单验证规则 |
|||
const formRules = computed(() => { |
|||
return { |
|||
purchase_power: [ |
|||
{ |
|||
required: true, |
|||
message: t('purchasePowerPlaceholder'), |
|||
trigger: 'blur', |
|||
}, |
|||
], |
|||
concept_awareness: [ |
|||
{ |
|||
required: true, |
|||
message: t('conceptAwarenessPlaceholder'), |
|||
trigger: 'blur', |
|||
}, |
|||
], |
|||
preferred_class_time: [ |
|||
{ |
|||
required: true, |
|||
message: t('preferredClassTimePlaceholder'), |
|||
trigger: 'blur', |
|||
}, |
|||
], |
|||
distance: [ |
|||
{ required: true, message: t('distancePlaceholder'), trigger: 'blur' }, |
|||
], |
|||
communication: [ |
|||
{ |
|||
required: true, |
|||
message: t('communicationPlaceholder'), |
|||
trigger: 'blur', |
|||
}, |
|||
], |
|||
promised_visit_time: [ |
|||
{ |
|||
required: true, |
|||
message: t('promisedVisitTimePlaceholder'), |
|||
trigger: 'blur', |
|||
}, |
|||
], |
|||
actual_visit_time: [ |
|||
{ |
|||
required: true, |
|||
message: t('actualVisitTimePlaceholder'), |
|||
trigger: 'blur', |
|||
}, |
|||
], |
|||
call_intent: [ |
|||
{ required: true, message: t('callIntentPlaceholder'), trigger: 'blur' }, |
|||
], |
|||
first_visit_status: [ |
|||
{ |
|||
required: true, |
|||
message: t('firstVisitStatusPlaceholder'), |
|||
trigger: 'blur', |
|||
}, |
|||
], |
|||
second_visit_status: [ |
|||
{ |
|||
required: true, |
|||
message: t('secondVisitStatusPlaceholder'), |
|||
trigger: 'blur', |
|||
}, |
|||
], |
|||
is_closed: [ |
|||
{ required: true, message: t('isClosedPlaceholder'), trigger: 'blur' }, |
|||
], |
|||
staff_id: [ |
|||
{ required: true, message: t('staffIdPlaceholder'), trigger: 'blur' }, |
|||
], |
|||
resource_id: [ |
|||
{ required: true, message: t('resourceIdPlaceholder'), trigger: 'blur' }, |
|||
], |
|||
} |
|||
}) |
|||
|
|||
const emit = defineEmits(['complete']) |
|||
|
|||
/** |
|||
* 确认 |
|||
* @param formEl |
|||
*/ |
|||
const confirm = async (formEl: FormInstance | undefined) => { |
|||
if (loading.value || !formEl) return |
|||
let save = formData.id ? editSixSpeed : addSixSpeed |
|||
|
|||
await formEl.validate(async (valid) => { |
|||
if (valid) { |
|||
loading.value = true |
|||
|
|||
let data = formData |
|||
|
|||
save(data) |
|||
.then((res) => { |
|||
loading.value = false |
|||
showDialog.value = false |
|||
emit('complete') |
|||
}) |
|||
.catch((err) => { |
|||
loading.value = false |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 获取字典数据 |
|||
|
|||
const setFormData = async (row: any = null) => { |
|||
Object.assign(formData, initialFormData) |
|||
loading.value = true |
|||
if (row) { |
|||
const data = await (await getSixSpeedInfo(row.id)).data |
|||
if (data) |
|||
Object.keys(formData).forEach((key: string) => { |
|||
if (data[key] != undefined) formData[key] = data[key] |
|||
}) |
|||
} |
|||
loading.value = false |
|||
} |
|||
|
|||
// 验证手机号格式 |
|||
const mobileVerify = (rule: any, value: any, callback: any) => { |
|||
if (value && !/^1[3-9]\d{9}$/.test(value)) { |
|||
callback(new Error(t('generateMobile'))) |
|||
} else { |
|||
callback() |
|||
} |
|||
} |
|||
|
|||
// 验证身份证号 |
|||
const idCardVerify = (rule: any, value: any, callback: any) => { |
|||
if ( |
|||
value && |
|||
!/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test( |
|||
value |
|||
) |
|||
) { |
|||
callback(new Error(t('generateIdCard'))) |
|||
} else { |
|||
callback() |
|||
} |
|||
} |
|||
|
|||
// 验证邮箱号 |
|||
const emailVerify = (rule: any, value: any, callback: any) => { |
|||
if (value && !/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(value)) { |
|||
callback(new Error(t('generateEmail'))) |
|||
} else { |
|||
callback() |
|||
} |
|||
} |
|||
|
|||
// 验证请输入整数 |
|||
const numberVerify = (rule: any, value: any, callback: any) => { |
|||
if (!Number.isInteger(value)) { |
|||
callback(new Error(t('generateNumber'))) |
|||
} else { |
|||
callback() |
|||
} |
|||
} |
|||
|
|||
defineExpose({ |
|||
showDialog, |
|||
setFormData, |
|||
}) |
|||
</script> |
|||
|
|||
<style lang="scss" scoped></style> |
|||
<style lang="scss"> |
|||
.diy-dialog-wrap .el-form-item__label { |
|||
height: auto !important; |
|||
} |
|||
</style> |
|||
<template> |
|||
<el-dialog v-model="showDialog" :title="formData.id ? t('updateSixSpeed') : t('addSixSpeed')" width="50%" class="diy-dialog-wrap" :destroy-on-close="true"> |
|||
<el-form :model="formData" label-width="120px" ref="formRef" :rules="formRules" class="page-form" v-loading="loading"> |
|||
<el-form-item :label="t('purchasePower')" prop="purchase_power"> |
|||
<el-select class="input-width" v-model="formData.purchase_power" clearable :placeholder="t('purchasePowerPlaceholder')"> |
|||
<el-option label="请选择" value=""></el-option> |
|||
<el-option |
|||
v-for="(item, index) in purchase_powerList" |
|||
:key="index" |
|||
:label="item.name" |
|||
:value="item.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
<el-form-item :label="t('conceptAwareness')" prop="concept_awareness"> |
|||
<el-select class="input-width" v-model="formData.concept_awareness" clearable :placeholder="t('conceptAwarenessPlaceholder')"> |
|||
<el-option label="请选择" value=""></el-option> |
|||
<el-option |
|||
v-for="(item, index) in concept_awarenessList" |
|||
:key="index" |
|||
:label="item.name" |
|||
:value="item.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
<el-form-item :label="t('preferredClassTime')" prop="preferred_class_time" class="input-width"> |
|||
<el-date-picker |
|||
class="flex-1 !flex" |
|||
v-model="formData.preferred_class_time" |
|||
clearable |
|||
type="datetime" |
|||
value-format="YYYY-MM-DD HH:mm:ss" |
|||
:placeholder="t('preferredClassTimePlaceholder')"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item :label="t('distance')" prop="distance"> |
|||
<el-input v-model="formData.distance" clearable :placeholder="t('distancePlaceholder')" class="input-width" /> |
|||
</el-form-item> |
|||
|
|||
<el-form-item :label="t('communication')" prop="communication"> |
|||
<el-input v-model="formData.communication" type="textarea" rows="4" clearable :placeholder="t('communicationPlaceholder')" class="input-width"/> |
|||
</el-form-item> |
|||
<el-form-item :label="t('promisedVisitTime')" prop="promised_visit_time" class="input-width"> |
|||
<el-date-picker |
|||
class="flex-1 !flex" |
|||
v-model="formData.promised_visit_time" |
|||
clearable |
|||
type="datetime" |
|||
value-format="YYYY-MM-DD HH:mm:ss" |
|||
:placeholder="t('promisedVisitTimePlaceholder')"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item :label="t('actualVisitTime')" class="input-width"> |
|||
<el-date-picker |
|||
class="flex-1 !flex" |
|||
v-model="formData.actual_visit_time" |
|||
clearable |
|||
type="datetime" |
|||
value-format="YYYY-MM-DD HH:mm:ss" |
|||
:placeholder="t('actualVisitTimePlaceholder')"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item :label="t('callIntent')" prop="call_intent"> |
|||
<el-select class="input-width" v-model="formData.call_intent" clearable :placeholder="t('callIntentPlaceholder')"> |
|||
<el-option label="请选择" value=""></el-option> |
|||
<el-option |
|||
v-for="(item, index) in call_intentList" |
|||
:key="index" |
|||
:label="item.name" |
|||
:value="item.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
<el-form-item :label="t('firstVisitStatus')" > |
|||
<el-input v-model="formData.first_visit_status" type="textarea" rows="4" clearable :placeholder="t('firstVisitStatusPlaceholder')" class="input-width"/> |
|||
</el-form-item> |
|||
<el-form-item :label="t('secondVisitStatus')" > |
|||
<el-input v-model="formData.second_visit_status" type="textarea" rows="4" clearable :placeholder="t('secondVisitStatusPlaceholder')" class="input-width"/> |
|||
</el-form-item> |
|||
<el-form-item :label="t('isClosed')" prop="is_closed"> |
|||
<el-select class="input-width" v-model="formData.is_closed" clearable :placeholder="t('isClosedPlaceholder')"> |
|||
<el-option label="请选择" value=""></el-option> |
|||
<el-option |
|||
v-for="(item, index) in is_closedList" |
|||
:key="index" |
|||
:label="item.name" |
|||
:value="item.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
</el-form> |
|||
|
|||
<template #footer> |
|||
<span class="dialog-footer"> |
|||
<el-button @click="showDialog = false">{{ t('cancel') }}</el-button> |
|||
<el-button type="primary" :loading="loading" @click="confirm(formRef)">{{ |
|||
t('confirm') |
|||
}}</el-button> |
|||
</span> |
|||
</template> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { ref, reactive, computed, watch } from 'vue' |
|||
import { useDictionary } from '@/app/api/dict' |
|||
import { t } from '@/lang' |
|||
import type { FormInstance } from 'element-plus' |
|||
import { addSixSpeed, editSixSpeed, getSixSpeedInfo, getWithPersonnelList, getWithCustomerResourcesList } from '@/app/api/six_speed' |
|||
|
|||
let showDialog = ref(false) |
|||
const loading = ref(false) |
|||
|
|||
/** |
|||
* 表单数据 |
|||
*/ |
|||
const initialFormData = { |
|||
id: '', |
|||
purchase_power: '', |
|||
concept_awareness: '', |
|||
preferred_class_time: '', |
|||
distance: '', |
|||
communication: '', |
|||
promised_visit_time: '', |
|||
actual_visit_time: '', |
|||
call_intent: '', |
|||
first_visit_status: '', |
|||
second_visit_status: '', |
|||
is_closed: '', |
|||
} |
|||
const formData: Record<string, any> = reactive({ ...initialFormData }) |
|||
|
|||
const formRef = ref<FormInstance>() |
|||
|
|||
// 表单验证规则 |
|||
const formRules = computed(() => { |
|||
return { |
|||
purchase_power: [ |
|||
{ required: true, message: t('purchasePowerPlaceholder'), trigger: 'blur' }, |
|||
|
|||
] |
|||
, |
|||
concept_awareness: [ |
|||
{ required: true, message: t('conceptAwarenessPlaceholder'), trigger: 'blur' }, |
|||
|
|||
] |
|||
, |
|||
preferred_class_time: [ |
|||
{ required: true, message: t('preferredClassTimePlaceholder'), trigger: 'blur' }, |
|||
|
|||
] |
|||
, |
|||
distance: [ |
|||
{ required: true, message: t('distancePlaceholder'), trigger: 'blur' }, |
|||
|
|||
] |
|||
, |
|||
communication: [ |
|||
{ required: true, message: t('communicationPlaceholder'), trigger: 'blur' }, |
|||
|
|||
] |
|||
, |
|||
promised_visit_time: [ |
|||
{ required: true, message: t('promisedVisitTimePlaceholder'), trigger: 'blur' }, |
|||
|
|||
] |
|||
, |
|||
actual_visit_time: [ |
|||
{ required: true, message: t('actualVisitTimePlaceholder'), trigger: 'blur' }, |
|||
|
|||
] |
|||
, |
|||
call_intent: [ |
|||
{ required: true, message: t('callIntentPlaceholder'), trigger: 'blur' }, |
|||
|
|||
] |
|||
, |
|||
first_visit_status: [ |
|||
{ required: true, message: t('firstVisitStatusPlaceholder'), trigger: 'blur' }, |
|||
|
|||
] |
|||
, |
|||
second_visit_status: [ |
|||
{ required: true, message: t('secondVisitStatusPlaceholder'), trigger: 'blur' }, |
|||
|
|||
] |
|||
, |
|||
is_closed: [ |
|||
{ required: true, message: t('isClosedPlaceholder'), trigger: 'blur' }, |
|||
|
|||
] |
|||
, |
|||
} |
|||
}) |
|||
|
|||
const emit = defineEmits(['complete']) |
|||
|
|||
/** |
|||
* 确认 |
|||
* @param formEl |
|||
*/ |
|||
const confirm = async (formEl: FormInstance | undefined) => { |
|||
if (loading.value || !formEl) return |
|||
let save = formData.id ? editSixSpeed : addSixSpeed |
|||
|
|||
await formEl.validate(async (valid) => { |
|||
if (valid) { |
|||
loading.value = true |
|||
|
|||
let data = formData |
|||
|
|||
save(data).then(res => { |
|||
loading.value = false |
|||
showDialog.value = false |
|||
emit('complete') |
|||
}).catch(err => { |
|||
loading.value = false |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 获取字典数据 |
|||
let purchase_powerList = ref([]) |
|||
const purchase_powerDictList = async () => { |
|||
purchase_powerList.value = await (await useDictionary('customer_purchasing_power')).data.dictionary |
|||
} |
|||
purchase_powerDictList(); |
|||
watch(() => purchase_powerList.value, () => { formData.purchase_power = purchase_powerList.value[0].value }) |
|||
let concept_awarenessList = ref([]) |
|||
const concept_awarenessDictList = async () => { |
|||
concept_awarenessList.value = await (await useDictionary('cognitive_concept')).data.dictionary |
|||
} |
|||
concept_awarenessDictList(); |
|||
watch(() => concept_awarenessList.value, () => { formData.concept_awareness = concept_awarenessList.value[0].value }) |
|||
let call_intentList = ref([]) |
|||
const call_intentDictList = async () => { |
|||
call_intentList.value = await (await useDictionary('preliminarycustomerintention')).data.dictionary |
|||
} |
|||
call_intentDictList(); |
|||
watch(() => call_intentList.value, () => { formData.call_intent = call_intentList.value[0].value }) |
|||
let is_closedList = ref([]) |
|||
const is_closedDictList = async () => { |
|||
is_closedList.value = await (await useDictionary('global_true_or_false')).data.dictionary |
|||
} |
|||
is_closedDictList(); |
|||
watch(() => is_closedList.value, () => { formData.is_closed = is_closedList.value[0].value }) |
|||
|
|||
|
|||
const staffIdList = ref([] as any[]) |
|||
const setStaffIdList = async () => { |
|||
staffIdList.value = await (await getWithPersonnelList({})).data |
|||
} |
|||
setStaffIdList() |
|||
const resourceIdList = ref([] as any[]) |
|||
const setResourceIdList = async () => { |
|||
resourceIdList.value = await (await getWithCustomerResourcesList({})).data |
|||
} |
|||
setResourceIdList() |
|||
const setFormData = async (row: any = null) => { |
|||
Object.assign(formData, initialFormData) |
|||
loading.value = true |
|||
if(row){ |
|||
const data = await (await getSixSpeedInfo(row.id)).data |
|||
if (data) Object.keys(formData).forEach((key: string) => { |
|||
if (data[key] != undefined) formData[key] = data[key] |
|||
}) |
|||
} |
|||
loading.value = false |
|||
} |
|||
|
|||
// 验证手机号格式 |
|||
const mobileVerify = (rule: any, value: any, callback: any) => { |
|||
if (value && !/^1[3-9]\d{9}$/.test(value)) { |
|||
callback(new Error(t('generateMobile'))) |
|||
} else { |
|||
callback() |
|||
} |
|||
} |
|||
|
|||
// 验证身份证号 |
|||
const idCardVerify = (rule: any, value: any, callback: any) => { |
|||
if (value && !/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value)) { |
|||
callback(new Error(t('generateIdCard'))) |
|||
} else { |
|||
callback() |
|||
} |
|||
} |
|||
|
|||
// 验证邮箱号 |
|||
const emailVerify = (rule: any, value: any, callback: any) => { |
|||
if (value && !/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(value)) { |
|||
callback(new Error(t('generateEmail'))) |
|||
} else { |
|||
callback() |
|||
} |
|||
} |
|||
|
|||
// 验证请输入整数 |
|||
const numberVerify = (rule: any, value: any, callback: any) => { |
|||
if (!Number.isInteger(value)) { |
|||
callback(new Error(t('generateNumber'))) |
|||
} else { |
|||
callback() |
|||
} |
|||
} |
|||
|
|||
defineExpose({ |
|||
showDialog, |
|||
setFormData |
|||
}) |
|||
</script> |
|||
|
|||
<style lang="scss" scoped></style> |
|||
<style lang="scss"> |
|||
.diy-dialog-wrap .el-form-item__label{ |
|||
height: auto !important; |
|||
} |
|||
</style> |
|||
|
|||
@ -1,372 +1,214 @@ |
|||
<template> |
|||
<div class="main-container"> |
|||
<el-card class="box-card !border-none" shadow="never"> |
|||
<div class="flex justify-between items-center"> |
|||
<span class="text-lg">{{ pageName }}</span> |
|||
<el-button type="primary" @click="addEvent"> |
|||
{{ t('addSixSpeed') }} |
|||
</el-button> |
|||
</div> |
|||
|
|||
<el-card |
|||
class="box-card !border-none my-[10px] table-search-wrap" |
|||
shadow="never" |
|||
> |
|||
<el-form |
|||
:inline="true" |
|||
:model="sixSpeedTable.searchParam" |
|||
ref="searchFormRef" |
|||
> |
|||
<el-form-item :label="t('purchasePower')" prop="purchase_power"> |
|||
<el-input |
|||
v-model="sixSpeedTable.searchParam.purchase_power" |
|||
:placeholder="t('purchasePowerPlaceholder')" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item :label="t('conceptAwareness')" prop="concept_awareness"> |
|||
<el-input |
|||
v-model="sixSpeedTable.searchParam.concept_awareness" |
|||
:placeholder="t('conceptAwarenessPlaceholder')" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item |
|||
:label="t('preferredClassTime')" |
|||
prop="preferred_class_time" |
|||
> |
|||
<el-input |
|||
v-model="sixSpeedTable.searchParam.preferred_class_time" |
|||
:placeholder="t('preferredClassTimePlaceholder')" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item :label="t('distance')" prop="distance"> |
|||
<el-input |
|||
v-model="sixSpeedTable.searchParam.distance" |
|||
:placeholder="t('distancePlaceholder')" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item :label="t('communication')" prop="communication"> |
|||
<el-input |
|||
v-model="sixSpeedTable.searchParam.communication" |
|||
:placeholder="t('communicationPlaceholder')" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item |
|||
:label="t('promisedVisitTime')" |
|||
prop="promised_visit_time" |
|||
> |
|||
<el-input |
|||
v-model="sixSpeedTable.searchParam.promised_visit_time" |
|||
:placeholder="t('promisedVisitTimePlaceholder')" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item :label="t('actualVisitTime')" prop="actual_visit_time"> |
|||
<el-input |
|||
v-model="sixSpeedTable.searchParam.actual_visit_time" |
|||
:placeholder="t('actualVisitTimePlaceholder')" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item :label="t('callIntent')" prop="call_intent"> |
|||
<el-input |
|||
v-model="sixSpeedTable.searchParam.call_intent" |
|||
:placeholder="t('callIntentPlaceholder')" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item |
|||
:label="t('firstVisitStatus')" |
|||
prop="first_visit_status" |
|||
> |
|||
<el-input |
|||
v-model="sixSpeedTable.searchParam.first_visit_status" |
|||
:placeholder="t('firstVisitStatusPlaceholder')" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item |
|||
:label="t('secondVisitStatus')" |
|||
prop="second_visit_status" |
|||
> |
|||
<el-input |
|||
v-model="sixSpeedTable.searchParam.second_visit_status" |
|||
:placeholder="t('secondVisitStatusPlaceholder')" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item :label="t('isClosed')" prop="is_closed"> |
|||
<el-input |
|||
v-model="sixSpeedTable.searchParam.is_closed" |
|||
:placeholder="t('isClosedPlaceholder')" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item :label="t('staffId')" prop="staff_id"> |
|||
<el-input |
|||
v-model="sixSpeedTable.searchParam.staff_id" |
|||
:placeholder="t('staffIdPlaceholder')" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item :label="t('resourceId')" prop="resource_id"> |
|||
<el-input |
|||
v-model="sixSpeedTable.searchParam.resource_id" |
|||
:placeholder="t('resourceIdPlaceholder')" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item> |
|||
<el-button type="primary" @click="loadSixSpeedList()">{{ |
|||
t('search') |
|||
}}</el-button> |
|||
<el-button @click="resetForm(searchFormRef)">{{ |
|||
t('reset') |
|||
}}</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-card> |
|||
|
|||
<div class="mt-[10px]"> |
|||
<el-table |
|||
:data="sixSpeedTable.data" |
|||
size="large" |
|||
v-loading="sixSpeedTable.loading" |
|||
> |
|||
<template #empty> |
|||
<span>{{ !sixSpeedTable.loading ? t('emptyData') : '' }}</span> |
|||
</template> |
|||
<el-table-column |
|||
prop="purchase_power" |
|||
:label="t('purchasePower')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
prop="concept_awareness" |
|||
:label="t('conceptAwareness')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
prop="preferred_class_time" |
|||
:label="t('preferredClassTime')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
prop="distance" |
|||
:label="t('distance')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
prop="communication" |
|||
:label="t('communication')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
prop="promised_visit_time" |
|||
:label="t('promisedVisitTime')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
prop="actual_visit_time" |
|||
:label="t('actualVisitTime')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
prop="call_intent" |
|||
:label="t('callIntent')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
prop="first_visit_status" |
|||
:label="t('firstVisitStatus')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
prop="second_visit_status" |
|||
:label="t('secondVisitStatus')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
prop="is_closed" |
|||
:label="t('isClosed')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
prop="staff_id" |
|||
:label="t('staffId')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
prop="resource_id" |
|||
:label="t('resourceId')" |
|||
min-width="120" |
|||
:show-overflow-tooltip="true" |
|||
/> |
|||
|
|||
<el-table-column |
|||
:label="t('operation')" |
|||
fixed="right" |
|||
min-width="120" |
|||
> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="editEvent(row)">{{ |
|||
t('edit') |
|||
}}</el-button> |
|||
<el-button type="primary" link @click="deleteEvent(row.id)">{{ |
|||
t('delete') |
|||
}}</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div class="mt-[16px] flex justify-end"> |
|||
<el-pagination |
|||
v-model:current-page="sixSpeedTable.page" |
|||
v-model:page-size="sixSpeedTable.limit" |
|||
layout="total, sizes, prev, pager, next, jumper" |
|||
:total="sixSpeedTable.total" |
|||
@size-change="loadSixSpeedList()" |
|||
@current-change="loadSixSpeedList" |
|||
/> |
|||
</div> |
|||
</div> |
|||
|
|||
<edit ref="editSixSpeedDialog" @complete="loadSixSpeedList" /> |
|||
</el-card> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, watch } from 'vue' |
|||
import { t } from '@/lang' |
|||
import { useDictionary } from '@/app/api/dict' |
|||
import { getSixSpeedList, deleteSixSpeed } from '@/app/api/six_speed' |
|||
import { img } from '@/utils/common' |
|||
import { ElMessageBox, FormInstance } from 'element-plus' |
|||
import Edit from '@/app/views/six_speed/components/six-speed-edit.vue' |
|||
import { useRoute } from 'vue-router' |
|||
const route = useRoute() |
|||
const pageName = route.meta.title |
|||
|
|||
let sixSpeedTable = reactive({ |
|||
page: 1, |
|||
limit: 10, |
|||
total: 0, |
|||
loading: true, |
|||
data: [], |
|||
searchParam: { |
|||
purchase_power: '', |
|||
concept_awareness: '', |
|||
preferred_class_time: '', |
|||
distance: '', |
|||
communication: '', |
|||
promised_visit_time: '', |
|||
actual_visit_time: '', |
|||
call_intent: '', |
|||
first_visit_status: '', |
|||
second_visit_status: '', |
|||
is_closed: '', |
|||
staff_id: '', |
|||
resource_id: '', |
|||
}, |
|||
}) |
|||
|
|||
const searchFormRef = ref<FormInstance>() |
|||
|
|||
// 选中数据 |
|||
const selectData = ref<any[]>([]) |
|||
|
|||
// 字典数据 |
|||
|
|||
/** |
|||
* 获取六一速列表 |
|||
*/ |
|||
const loadSixSpeedList = (page: number = 1) => { |
|||
sixSpeedTable.loading = true |
|||
sixSpeedTable.page = page |
|||
|
|||
getSixSpeedList({ |
|||
page: sixSpeedTable.page, |
|||
limit: sixSpeedTable.limit, |
|||
...sixSpeedTable.searchParam, |
|||
}) |
|||
.then((res) => { |
|||
sixSpeedTable.loading = false |
|||
sixSpeedTable.data = res.data.data |
|||
sixSpeedTable.total = res.data.total |
|||
}) |
|||
.catch(() => { |
|||
sixSpeedTable.loading = false |
|||
}) |
|||
} |
|||
loadSixSpeedList() |
|||
|
|||
const editSixSpeedDialog: Record<string, any> | null = ref(null) |
|||
|
|||
/** |
|||
* 添加六一速 |
|||
*/ |
|||
const addEvent = () => { |
|||
editSixSpeedDialog.value.setFormData() |
|||
editSixSpeedDialog.value.showDialog = true |
|||
} |
|||
|
|||
/** |
|||
* 编辑六一速 |
|||
* @param data |
|||
*/ |
|||
const editEvent = (data: any) => { |
|||
editSixSpeedDialog.value.setFormData(data) |
|||
editSixSpeedDialog.value.showDialog = true |
|||
} |
|||
|
|||
/** |
|||
* 删除六一速 |
|||
*/ |
|||
const deleteEvent = (id: number) => { |
|||
ElMessageBox.confirm(t('sixSpeedDeleteTips'), t('warning'), { |
|||
confirmButtonText: t('confirm'), |
|||
cancelButtonText: t('cancel'), |
|||
type: 'warning', |
|||
}).then(() => { |
|||
deleteSixSpeed(id) |
|||
.then(() => { |
|||
loadSixSpeedList() |
|||
}) |
|||
.catch(() => {}) |
|||
}) |
|||
} |
|||
|
|||
const resetForm = (formEl: FormInstance | undefined) => { |
|||
if (!formEl) return |
|||
formEl.resetFields() |
|||
loadSixSpeedList() |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
/* 多行超出隐藏 */ |
|||
.multi-hidden { |
|||
word-break: break-all; |
|||
text-overflow: ellipsis; |
|||
overflow: hidden; |
|||
display: -webkit-box; |
|||
-webkit-line-clamp: 2; |
|||
-webkit-box-orient: vertical; |
|||
} |
|||
</style> |
|||
<template> |
|||
<div class="main-container"> |
|||
<el-card class="box-card !border-none" shadow="never"> |
|||
|
|||
<div class="flex justify-between items-center"> |
|||
<span class="text-lg">{{pageName}}</span> |
|||
<el-button type="primary" @click="addEvent"> |
|||
{{ t('addSixSpeed') }} |
|||
</el-button> |
|||
</div> |
|||
|
|||
<el-card class="box-card !border-none my-[10px] table-search-wrap" shadow="never"> |
|||
<el-form :inline="true" :model="sixSpeedTable.searchParam" ref="searchFormRef"> |
|||
|
|||
<el-form-item> |
|||
<el-button type="primary" @click="loadSixSpeedList()">{{ t('search') }}</el-button> |
|||
<el-button @click="resetForm(searchFormRef)">{{ t('reset') }}</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-card> |
|||
|
|||
<div class="mt-[10px]"> |
|||
<el-table :data="sixSpeedTable.data" size="large" v-loading="sixSpeedTable.loading"> |
|||
<template #empty> |
|||
<span>{{ !sixSpeedTable.loading ? t('emptyData') : '' }}</span> |
|||
</template> |
|||
<el-table-column prop="preferred_class_time" :label="t('preferredClassTime')" min-width="120" :show-overflow-tooltip="true"/> |
|||
|
|||
<el-table-column prop="distance" :label="t('distance')" min-width="120" :show-overflow-tooltip="true"/> |
|||
|
|||
<el-table-column prop="communication" :label="t('communication')" min-width="120" :show-overflow-tooltip="true"/> |
|||
|
|||
<el-table-column prop="promised_visit_time" :label="t('promisedVisitTime')" min-width="120" :show-overflow-tooltip="true"/> |
|||
|
|||
<el-table-column prop="actual_visit_time" :label="t('actualVisitTime')" min-width="120" :show-overflow-tooltip="true"/> |
|||
|
|||
<el-table-column :label="t('callIntent')" min-width="180" align="center" :show-overflow-tooltip="true"> |
|||
<template #default="{ row }"> |
|||
<div v-for="(item, index) in call_intentList"> |
|||
<div v-if="item.value == row.call_intent">{{ item.name }}</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="first_visit_status" :label="t('firstVisitStatus')" min-width="120" :show-overflow-tooltip="true"/> |
|||
|
|||
<el-table-column prop="second_visit_status" :label="t('secondVisitStatus')" min-width="120" :show-overflow-tooltip="true"/> |
|||
|
|||
<el-table-column :label="t('isClosed')" min-width="180" align="center" :show-overflow-tooltip="true"> |
|||
<template #default="{ row }"> |
|||
<div v-for="(item, index) in is_closedList"> |
|||
<div v-if="item.value == row.is_closed">{{ item.name }}</div> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<el-table-column :label="t('operation')" fixed="right" min-width="120"> |
|||
<template #default="{ row }"> |
|||
<el-button type="primary" link @click="editEvent(row)">{{ t('edit') }}</el-button> |
|||
<el-button type="primary" link @click="deleteEvent(row.id)">{{ t('delete') }}</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
</el-table> |
|||
<div class="mt-[16px] flex justify-end"> |
|||
<el-pagination v-model:current-page="sixSpeedTable.page" v-model:page-size="sixSpeedTable.limit" |
|||
layout="total, sizes, prev, pager, next, jumper" :total="sixSpeedTable.total" |
|||
@size-change="loadSixSpeedList()" @current-change="loadSixSpeedList" /> |
|||
</div> |
|||
</div> |
|||
|
|||
<edit ref="editSixSpeedDialog" @complete="loadSixSpeedList" /> |
|||
</el-card> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import { reactive, ref, watch } from 'vue' |
|||
import { t } from '@/lang' |
|||
import { useDictionary } from '@/app/api/dict' |
|||
import { getSixSpeedList, deleteSixSpeed, getWithPersonnelList, getWithCustomerResourcesList } from '@/app/api/six_speed' |
|||
import { img } from '@/utils/common' |
|||
import { ElMessageBox,FormInstance } from 'element-plus' |
|||
import Edit from '@/app/views/six_speed/components/six-speed-edit.vue' |
|||
import { useRoute } from 'vue-router' |
|||
const route = useRoute() |
|||
const pageName = route.meta.title; |
|||
|
|||
let sixSpeedTable = reactive({ |
|||
page: 1, |
|||
limit: 10, |
|||
total: 0, |
|||
loading: true, |
|||
data: [], |
|||
searchParam:{ |
|||
|
|||
} |
|||
}) |
|||
|
|||
const searchFormRef = ref<FormInstance>() |
|||
|
|||
// 选中数据 |
|||
const selectData = ref<any[]>([]) |
|||
|
|||
// 字典数据 |
|||
const purchase_powerList = ref([] as any[]) |
|||
const purchase_powerDictList = async () => { |
|||
purchase_powerList.value = await (await useDictionary('customer_purchasing_power')).data.dictionary |
|||
} |
|||
purchase_powerDictList(); |
|||
const concept_awarenessList = ref([] as any[]) |
|||
const concept_awarenessDictList = async () => { |
|||
concept_awarenessList.value = await (await useDictionary('cognitive_concept')).data.dictionary |
|||
} |
|||
concept_awarenessDictList(); |
|||
const call_intentList = ref([] as any[]) |
|||
const call_intentDictList = async () => { |
|||
call_intentList.value = await (await useDictionary('preliminarycustomerintention')).data.dictionary |
|||
} |
|||
call_intentDictList(); |
|||
const is_closedList = ref([] as any[]) |
|||
const is_closedDictList = async () => { |
|||
is_closedList.value = await (await useDictionary('global_true_or_false')).data.dictionary |
|||
} |
|||
is_closedDictList(); |
|||
|
|||
/** |
|||
* 获取六一速列表 |
|||
*/ |
|||
const loadSixSpeedList = (page: number = 1) => { |
|||
sixSpeedTable.loading = true |
|||
sixSpeedTable.page = page |
|||
|
|||
getSixSpeedList({ |
|||
page: sixSpeedTable.page, |
|||
limit: sixSpeedTable.limit, |
|||
...sixSpeedTable.searchParam |
|||
}).then(res => { |
|||
sixSpeedTable.loading = false |
|||
sixSpeedTable.data = res.data.data |
|||
sixSpeedTable.total = res.data.total |
|||
}).catch(() => { |
|||
sixSpeedTable.loading = false |
|||
}) |
|||
} |
|||
loadSixSpeedList() |
|||
|
|||
const editSixSpeedDialog: Record<string, any> | null = ref(null) |
|||
|
|||
/** |
|||
* 添加六一速 |
|||
*/ |
|||
const addEvent = () => { |
|||
editSixSpeedDialog.value.setFormData() |
|||
editSixSpeedDialog.value.showDialog = true |
|||
} |
|||
|
|||
/** |
|||
* 编辑六一速 |
|||
* @param data |
|||
*/ |
|||
const editEvent = (data: any) => { |
|||
editSixSpeedDialog.value.setFormData(data) |
|||
editSixSpeedDialog.value.showDialog = true |
|||
} |
|||
|
|||
/** |
|||
* 删除六一速 |
|||
*/ |
|||
const deleteEvent = (id: number) => { |
|||
ElMessageBox.confirm(t('sixSpeedDeleteTips'), t('warning'), |
|||
{ |
|||
confirmButtonText: t('confirm'), |
|||
cancelButtonText: t('cancel'), |
|||
type: 'warning', |
|||
} |
|||
).then(() => { |
|||
deleteSixSpeed(id).then(() => { |
|||
loadSixSpeedList() |
|||
}).catch(() => { |
|||
}) |
|||
}) |
|||
} |
|||
|
|||
|
|||
const staffIdList = ref([]) |
|||
const setStaffIdList = async () => { |
|||
staffIdList.value = await (await getWithPersonnelList({})).data |
|||
} |
|||
setStaffIdList() |
|||
const resourceIdList = ref([]) |
|||
const setResourceIdList = async () => { |
|||
resourceIdList.value = await (await getWithCustomerResourcesList({})).data |
|||
} |
|||
setResourceIdList() |
|||
|
|||
const resetForm = (formEl: FormInstance | undefined) => { |
|||
if (!formEl) return |
|||
formEl.resetFields() |
|||
loadSixSpeedList() |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
/* 多行超出隐藏 */ |
|||
.multi-hidden { |
|||
word-break: break-all; |
|||
text-overflow: ellipsis; |
|||
overflow: hidden; |
|||
display: -webkit-box; |
|||
-webkit-line-clamp: 2; |
|||
-webkit-box-orient: vertical; |
|||
} |
|||
</style> |
|||
|
|||
Loading…
Reference in new issue