From bda87b248b22036ad6df2a0c51adfeae4716f01b Mon Sep 17 00:00:00 2001 From: wangzeyan <258785420@qq.com> Date: Sun, 18 May 2025 07:48:54 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/auto-imports.d.ts | 1 + admin/components.d.ts | 1 + .../views/campus/components/campus-edit.vue | 15 ++- admin/src/components/TencentMapPicker.vue | 100 +++++++++++++++--- 4 files changed, 101 insertions(+), 16 deletions(-) diff --git a/admin/auto-imports.d.ts b/admin/auto-imports.d.ts index a51b7a66..8f3c7963 100644 --- a/admin/auto-imports.d.ts +++ b/admin/auto-imports.d.ts @@ -1,5 +1,6 @@ // Generated by 'unplugin-auto-import' export {} declare global { + const ElMessage: typeof import('element-plus/es')['ElMessage'] const ElNotification: typeof import('element-plus/es')['ElNotification'] } diff --git a/admin/components.d.ts b/admin/components.d.ts index f54888df..266a85b9 100644 --- a/admin/components.d.ts +++ b/admin/components.d.ts @@ -21,6 +21,7 @@ declare module '@vue/runtime-core' { ElColorPicker: typeof import('element-plus/es')['ElColorPicker'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElContainer: typeof import('element-plus/es')['ElContainer'] + ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] ElDialog: typeof import('element-plus/es')['ElDialog'] ElDrawer: typeof import('element-plus/es')['ElDrawer'] ElDropdown: typeof import('element-plus/es')['ElDropdown'] diff --git a/admin/src/app/views/campus/components/campus-edit.vue b/admin/src/app/views/campus/components/campus-edit.vue index d16a13d1..87a56e9e 100644 --- a/admin/src/app/views/campus/components/campus-edit.vue +++ b/admin/src/app/views/campus/components/campus-edit.vue @@ -37,7 +37,14 @@ - + {{ + t('campusCoordinatesPlaceholder') + }} + @@ -99,7 +106,11 @@ const initialFormData = { const formData: Record = reactive({ ...initialFormData }) const formRef = ref() - +const mapPickerRef = ref() +const showMapPickerVisible = ref(false) +const showMapPicker = () => { + showMapPickerVisible.value = true +} // 表单验证规则 const formRules = computed(() => { return { diff --git a/admin/src/components/TencentMapPicker.vue b/admin/src/components/TencentMapPicker.vue index 26aaa9b3..e763ba11 100644 --- a/admin/src/components/TencentMapPicker.vue +++ b/admin/src/components/TencentMapPicker.vue @@ -4,9 +4,18 @@ :title="t('mapPickerTitle')" width="800px" :before-close="handleClose" + :close-on-click-modal="false" + :close-on-press-escape="false" + :show-close="false" > - -
+
+
+ {{ props.placeholder }} +
+
- - + + + + + diff --git a/admin/src/app/views/attendance/components/attendance-edit.vue b/admin/src/app/views/attendance/components/attendance-edit.vue index fae85c12..5e2354af 100644 --- a/admin/src/app/views/attendance/components/attendance-edit.vue +++ b/admin/src/app/views/attendance/components/attendance-edit.vue @@ -1,233 +1,296 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/campus/campus.vue b/admin/src/app/views/campus/campus.vue index b384f486..8f9dd59a 100644 --- a/admin/src/app/views/campus/campus.vue +++ b/admin/src/app/views/campus/campus.vue @@ -1,193 +1,253 @@ - - - - - + + + + + diff --git a/admin/src/app/views/campus_person_role/campus_person_role.vue b/admin/src/app/views/campus_person_role/campus_person_role.vue index e7094b1a..2ad6f913 100644 --- a/admin/src/app/views/campus_person_role/campus_person_role.vue +++ b/admin/src/app/views/campus_person_role/campus_person_role.vue @@ -1,233 +1,306 @@ - - - - - + + + + + diff --git a/admin/src/app/views/campus_person_role/components/campus-person-role-edit.vue b/admin/src/app/views/campus_person_role/components/campus-person-role-edit.vue index fa24cc12..7d6362de 100644 --- a/admin/src/app/views/campus_person_role/components/campus-person-role-edit.vue +++ b/admin/src/app/views/campus_person_role/components/campus-person-role-edit.vue @@ -1,225 +1,268 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/class/class.vue b/admin/src/app/views/class/class.vue index 1928f5a9..59b54cb0 100644 --- a/admin/src/app/views/class/class.vue +++ b/admin/src/app/views/class/class.vue @@ -1,231 +1,360 @@ - - - - - + + + + + diff --git a/admin/src/app/views/class/components/class-edit.vue b/admin/src/app/views/class/components/class-edit.vue index 1c4d6e3f..6c103c43 100644 --- a/admin/src/app/views/class/components/class-edit.vue +++ b/admin/src/app/views/class/components/class-edit.vue @@ -1,263 +1,327 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/communication_records/communication_records.vue b/admin/src/app/views/communication_records/communication_records.vue index d4c8ed69..18fc2957 100644 --- a/admin/src/app/views/communication_records/communication_records.vue +++ b/admin/src/app/views/communication_records/communication_records.vue @@ -1,219 +1,351 @@ - - - - - + + + + + diff --git a/admin/src/app/views/communication_records/components/communication-records-edit.vue b/admin/src/app/views/communication_records/components/communication-records-edit.vue index 2460dda7..bc7a21fc 100644 --- a/admin/src/app/views/communication_records/components/communication-records-edit.vue +++ b/admin/src/app/views/communication_records/components/communication-records-edit.vue @@ -1,243 +1,322 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/contract/components/contract-edit.vue b/admin/src/app/views/contract/components/contract-edit.vue index 0b595811..69ef4893 100644 --- a/admin/src/app/views/contract/components/contract-edit.vue +++ b/admin/src/app/views/contract/components/contract-edit.vue @@ -1,213 +1,274 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/contract/contract.vue b/admin/src/app/views/contract/contract.vue index a1fc4f9a..80e81ff7 100644 --- a/admin/src/app/views/contract/contract.vue +++ b/admin/src/app/views/contract/contract.vue @@ -1,201 +1,290 @@ - - - - - + + + + + diff --git a/admin/src/app/views/course/components/course-edit.vue b/admin/src/app/views/course/components/course-edit.vue index 91330290..b1d3d780 100644 --- a/admin/src/app/views/course/components/course-edit.vue +++ b/admin/src/app/views/course/components/course-edit.vue @@ -1,223 +1,290 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/course/course.vue b/admin/src/app/views/course/course.vue index f4e56e02..6ce6185c 100644 --- a/admin/src/app/views/course/course.vue +++ b/admin/src/app/views/course/course.vue @@ -1,207 +1,307 @@ - - - - - + + + + + diff --git a/admin/src/app/views/course_schedule/components/course-schedule-edit.vue b/admin/src/app/views/course_schedule/components/course-schedule-edit.vue index 7d8fc1d2..8c7d63d8 100644 --- a/admin/src/app/views/course_schedule/components/course-schedule-edit.vue +++ b/admin/src/app/views/course_schedule/components/course-schedule-edit.vue @@ -1,233 +1,296 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/course_schedule/course_schedule.vue b/admin/src/app/views/course_schedule/course_schedule.vue index 816b8592..5fb3dac5 100644 --- a/admin/src/app/views/course_schedule/course_schedule.vue +++ b/admin/src/app/views/course_schedule/course_schedule.vue @@ -1,213 +1,326 @@ - - - - - + + + + + diff --git a/admin/src/app/views/customer_resource_changes/components/customer-resource-changes-edit.vue b/admin/src/app/views/customer_resource_changes/components/customer-resource-changes-edit.vue index 9dbae596..1b9e571d 100644 --- a/admin/src/app/views/customer_resource_changes/components/customer-resource-changes-edit.vue +++ b/admin/src/app/views/customer_resource_changes/components/customer-resource-changes-edit.vue @@ -1,193 +1,253 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/customer_resource_changes/customer_resource_changes.vue b/admin/src/app/views/customer_resource_changes/customer_resource_changes.vue index e442b7d2..40945c66 100644 --- a/admin/src/app/views/customer_resource_changes/customer_resource_changes.vue +++ b/admin/src/app/views/customer_resource_changes/customer_resource_changes.vue @@ -1,189 +1,277 @@ - - - - - + + + + + diff --git a/admin/src/app/views/customer_resources/components/customer-resources-edit.vue b/admin/src/app/views/customer_resources/components/customer-resources-edit.vue index 699b8b7d..8ba98fce 100644 --- a/admin/src/app/views/customer_resources/components/customer-resources-edit.vue +++ b/admin/src/app/views/customer_resources/components/customer-resources-edit.vue @@ -1,409 +1,553 @@ - - - - - - +}) + +const emit = defineEmits(['complete']) + +/** + * 确认 + * @param formEl + */ +const confirm = async (formEl: FormInstance | undefined) => { + if (loading.value || !formEl) return + let save = formData.id ? editCustomerResources : addCustomerResources + + 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 sourceList = ref([]) +const sourceDictList = async () => { + sourceList.value = await (await useDictionary('source')).data.dictionary +} +sourceDictList() +watch( + () => sourceList.value, + () => { + formData.source = sourceList.value[0].value + } +) +let source_channelList = ref([]) +const source_channelDictList = async () => { + source_channelList.value = await ( + await useDictionary('SourceChannel') + ).data.dictionary +} +source_channelDictList() +watch( + () => source_channelList.value, + () => { + formData.source_channel = source_channelList.value[0].value + } +) +let genderList = ref([]) +const genderDictList = async () => { + genderList.value = await (await useDictionary('zy_sex')).data.dictionary +} +genderDictList() +watch( + () => genderList.value, + () => { + formData.gender = genderList.value[0].value + } +) +let purchasing_powerList = ref([]) +const purchasing_powerDictList = async () => { + purchasing_powerList.value = await ( + await useDictionary('customer_purchasing_power') + ).data.dictionary +} +purchasing_powerDictList() +watch( + () => purchasing_powerList.value, + () => { + formData.purchasing_power = purchasing_powerList.value[0].value + } +) +let cognitive_ideaList = ref([]) +const cognitive_ideaDictList = async () => { + cognitive_ideaList.value = await ( + await useDictionary('cognitive_concept') + ).data.dictionary +} +cognitive_ideaDictList() +watch( + () => cognitive_ideaList.value, + () => { + formData.cognitive_idea = cognitive_ideaList.value[0].value + } +) +let initial_intentList = ref([]) +const initial_intentDictList = async () => { + initial_intentList.value = await ( + await useDictionary('preliminarycustomerintention') + ).data.dictionary +} +initial_intentDictList() +watch( + () => initial_intentList.value, + () => { + formData.initial_intent = initial_intentList.value[0].value + } +) +let statusList = ref([]) +const statusDictList = async () => { + statusList.value = await (await useDictionary('kh_status')).data.dictionary +} +statusDictList() +watch( + () => statusList.value, + () => { + formData.status = statusList.value[0].value + } +) + +const campusList = ref([] as any[]) +const setCampusList = async () => { + campusList.value = await (await getWithCampusList({})).data +} +setCampusList() +const setFormData = async (row: any = null) => { + Object.assign(formData, initialFormData) + loading.value = true + if (row) { + const data = await (await getCustomerResourcesInfo(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, +}) + + + + diff --git a/admin/src/app/views/customer_resources/customer_resources.vue b/admin/src/app/views/customer_resources/customer_resources.vue index dc38a212..834d68a9 100644 --- a/admin/src/app/views/customer_resources/customer_resources.vue +++ b/admin/src/app/views/customer_resources/customer_resources.vue @@ -1,226 +1,311 @@ - - - - - + + + + + diff --git a/admin/src/app/views/departments/components/departments-edit.vue b/admin/src/app/views/departments/components/departments-edit.vue index 5c1000f2..4dc66615 100644 --- a/admin/src/app/views/departments/components/departments-edit.vue +++ b/admin/src/app/views/departments/components/departments-edit.vue @@ -1,166 +1,206 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/departments/departments.vue b/admin/src/app/views/departments/departments.vue index 5e907bb0..d3e97014 100644 --- a/admin/src/app/views/departments/departments.vue +++ b/admin/src/app/views/departments/departments.vue @@ -1,179 +1,229 @@ - - - - - + + + + + diff --git a/admin/src/app/views/exam_answers/components/exam-answers-edit.vue b/admin/src/app/views/exam_answers/components/exam-answers-edit.vue index 0518b4b0..70614968 100644 --- a/admin/src/app/views/exam_answers/components/exam-answers-edit.vue +++ b/admin/src/app/views/exam_answers/components/exam-answers-edit.vue @@ -1,183 +1,223 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/exam_answers/exam_answers.vue b/admin/src/app/views/exam_answers/exam_answers.vue index 6db75362..65817bd8 100644 --- a/admin/src/app/views/exam_answers/exam_answers.vue +++ b/admin/src/app/views/exam_answers/exam_answers.vue @@ -1,183 +1,248 @@ - - - - - + + + + + diff --git a/admin/src/app/views/exam_papers/components/exam-papers-edit.vue b/admin/src/app/views/exam_papers/components/exam-papers-edit.vue index b6ddeb4c..75445ec0 100644 --- a/admin/src/app/views/exam_papers/components/exam-papers-edit.vue +++ b/admin/src/app/views/exam_papers/components/exam-papers-edit.vue @@ -1,163 +1,205 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/exam_papers/exam_papers.vue b/admin/src/app/views/exam_papers/exam_papers.vue index 1bd05111..354fe785 100644 --- a/admin/src/app/views/exam_papers/exam_papers.vue +++ b/admin/src/app/views/exam_papers/exam_papers.vue @@ -1,171 +1,220 @@ - - - - - + + + + + diff --git a/admin/src/app/views/exam_questions/exam_questions.vue b/admin/src/app/views/exam_questions/exam_questions.vue index 0bdeddea..14104344 100644 --- a/admin/src/app/views/exam_questions/exam_questions.vue +++ b/admin/src/app/views/exam_questions/exam_questions.vue @@ -1,223 +1,360 @@ - - - - - + + + + + diff --git a/admin/src/app/views/exam_questions/exam_questions_edit.vue b/admin/src/app/views/exam_questions/exam_questions_edit.vue index 5d27d036..7c4abef6 100644 --- a/admin/src/app/views/exam_questions/exam_questions_edit.vue +++ b/admin/src/app/views/exam_questions/exam_questions_edit.vue @@ -1,250 +1,349 @@ - - - - - + + + + + diff --git a/admin/src/app/views/exam_records/components/exam-records-edit.vue b/admin/src/app/views/exam_records/components/exam-records-edit.vue index 231402fc..185f2332 100644 --- a/admin/src/app/views/exam_records/components/exam-records-edit.vue +++ b/admin/src/app/views/exam_records/components/exam-records-edit.vue @@ -1,203 +1,249 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/exam_records/exam_records.vue b/admin/src/app/views/exam_records/exam_records.vue index f2cd2604..e75367ec 100644 --- a/admin/src/app/views/exam_records/exam_records.vue +++ b/admin/src/app/views/exam_records/exam_records.vue @@ -1,195 +1,276 @@ - - - - - + + + + + diff --git a/admin/src/app/views/market_performance/components/market-performance-edit.vue b/admin/src/app/views/market_performance/components/market-performance-edit.vue index f3479ef1..d3936591 100644 --- a/admin/src/app/views/market_performance/components/market-performance-edit.vue +++ b/admin/src/app/views/market_performance/components/market-performance-edit.vue @@ -1,189 +1,231 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/market_performance/market_performance.vue b/admin/src/app/views/market_performance/market_performance.vue index ae3370cd..77db6a92 100644 --- a/admin/src/app/views/market_performance/market_performance.vue +++ b/admin/src/app/views/market_performance/market_performance.vue @@ -1,186 +1,240 @@ - - - - - + + + + + diff --git a/admin/src/app/views/order_table/components/order-table-edit.vue b/admin/src/app/views/order_table/components/order-table-edit.vue index aeed17d4..df702bf9 100644 --- a/admin/src/app/views/order_table/components/order-table-edit.vue +++ b/admin/src/app/views/order_table/components/order-table-edit.vue @@ -1,263 +1,343 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/order_table/order_table.vue b/admin/src/app/views/order_table/order_table.vue index c4d390f3..f569d1dc 100644 --- a/admin/src/app/views/order_table/order_table.vue +++ b/admin/src/app/views/order_table/order_table.vue @@ -1,231 +1,369 @@ - - - - - + + + + + diff --git a/admin/src/app/views/performance_records/components/performance-records-edit.vue b/admin/src/app/views/performance_records/components/performance-records-edit.vue index c2daa609..36bc6f84 100644 --- a/admin/src/app/views/performance_records/components/performance-records-edit.vue +++ b/admin/src/app/views/performance_records/components/performance-records-edit.vue @@ -1,203 +1,259 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/performance_records/performance_records.vue b/admin/src/app/views/performance_records/performance_records.vue index e22f81fa..2cb0fb7e 100644 --- a/admin/src/app/views/performance_records/performance_records.vue +++ b/admin/src/app/views/performance_records/performance_records.vue @@ -1,195 +1,284 @@ - - - - - + + + + + diff --git a/admin/src/app/views/person_course_schedule/components/person-course-schedule-edit.vue b/admin/src/app/views/person_course_schedule/components/person-course-schedule-edit.vue index 6db96236..d3cd056f 100644 --- a/admin/src/app/views/person_course_schedule/components/person-course-schedule-edit.vue +++ b/admin/src/app/views/person_course_schedule/components/person-course-schedule-edit.vue @@ -1,183 +1,227 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/person_course_schedule/person_course_schedule.vue b/admin/src/app/views/person_course_schedule/person_course_schedule.vue index 6eb4a278..d3608b15 100644 --- a/admin/src/app/views/person_course_schedule/person_course_schedule.vue +++ b/admin/src/app/views/person_course_schedule/person_course_schedule.vue @@ -1,183 +1,256 @@ - - - - - + + + + + diff --git a/admin/src/app/views/physical_test/components/physical-test-edit.vue b/admin/src/app/views/physical_test/components/physical-test-edit.vue index 6e1493e5..07e37708 100644 --- a/admin/src/app/views/physical_test/components/physical-test-edit.vue +++ b/admin/src/app/views/physical_test/components/physical-test-edit.vue @@ -1,303 +1,399 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/physical_test/physical_test.vue b/admin/src/app/views/physical_test/physical_test.vue index 5ae14bb0..58daec25 100644 --- a/admin/src/app/views/physical_test/physical_test.vue +++ b/admin/src/app/views/physical_test/physical_test.vue @@ -1,255 +1,428 @@ - - - - - + + + + + diff --git a/admin/src/app/views/reimbursement/components/reimbursement-edit.vue b/admin/src/app/views/reimbursement/components/reimbursement-edit.vue index 6c2b60d5..f20cdcc4 100644 --- a/admin/src/app/views/reimbursement/components/reimbursement-edit.vue +++ b/admin/src/app/views/reimbursement/components/reimbursement-edit.vue @@ -1,193 +1,236 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/reimbursement/reimbursement.vue b/admin/src/app/views/reimbursement/reimbursement.vue index 2a63afc6..1837ae03 100644 --- a/admin/src/app/views/reimbursement/reimbursement.vue +++ b/admin/src/app/views/reimbursement/reimbursement.vue @@ -1,189 +1,265 @@ - - - - - + + + + + diff --git a/admin/src/app/views/resource_sharing/components/resource-sharing-edit.vue b/admin/src/app/views/resource_sharing/components/resource-sharing-edit.vue index 2e7a8271..73edf4cc 100644 --- a/admin/src/app/views/resource_sharing/components/resource-sharing-edit.vue +++ b/admin/src/app/views/resource_sharing/components/resource-sharing-edit.vue @@ -1,183 +1,223 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/resource_sharing/resource_sharing.vue b/admin/src/app/views/resource_sharing/resource_sharing.vue index 97ab0769..bd322590 100644 --- a/admin/src/app/views/resource_sharing/resource_sharing.vue +++ b/admin/src/app/views/resource_sharing/resource_sharing.vue @@ -1,183 +1,256 @@ - - - - - + + + + + diff --git a/admin/src/app/views/salary/components/salary-edit.vue b/admin/src/app/views/salary/components/salary-edit.vue index 93e7b9ea..d1c3dccc 100644 --- a/admin/src/app/views/salary/components/salary-edit.vue +++ b/admin/src/app/views/salary/components/salary-edit.vue @@ -1,253 +1,330 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/salary/salary.vue b/admin/src/app/views/salary/salary.vue index 6b12bd35..947e5823 100644 --- a/admin/src/app/views/salary/salary.vue +++ b/admin/src/app/views/salary/salary.vue @@ -1,225 +1,346 @@ - - - - - + + + + + diff --git a/admin/src/app/views/service/components/service-edit.vue b/admin/src/app/views/service/components/service-edit.vue index efddf592..b9903723 100644 --- a/admin/src/app/views/service/components/service-edit.vue +++ b/admin/src/app/views/service/components/service-edit.vue @@ -1,233 +1,311 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/service/service.vue b/admin/src/app/views/service/service.vue index 3e681813..a5044402 100644 --- a/admin/src/app/views/service/service.vue +++ b/admin/src/app/views/service/service.vue @@ -1,213 +1,321 @@ - - - - - + + + + + diff --git a/admin/src/app/views/six_speed/components/six-speed-edit.vue b/admin/src/app/views/six_speed/components/six-speed-edit.vue index fa2a6631..6981866c 100644 --- a/admin/src/app/views/six_speed/components/six-speed-edit.vue +++ b/admin/src/app/views/six_speed/components/six-speed-edit.vue @@ -1,263 +1,358 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/six_speed/six_speed.vue b/admin/src/app/views/six_speed/six_speed.vue index 6786480d..a1401496 100644 --- a/admin/src/app/views/six_speed/six_speed.vue +++ b/admin/src/app/views/six_speed/six_speed.vue @@ -1,231 +1,372 @@ - - - - - + + + + + diff --git a/admin/src/app/views/six_speed_modification_log/components/six-speed-modification-log-edit.vue b/admin/src/app/views/six_speed_modification_log/components/six-speed-modification-log-edit.vue index c767cf4b..a9839576 100644 --- a/admin/src/app/views/six_speed_modification_log/components/six-speed-modification-log-edit.vue +++ b/admin/src/app/views/six_speed_modification_log/components/six-speed-modification-log-edit.vue @@ -1,209 +1,261 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/six_speed_modification_log/six_speed_modification_log.vue b/admin/src/app/views/six_speed_modification_log/six_speed_modification_log.vue index 82541d2a..d2292276 100644 --- a/admin/src/app/views/six_speed_modification_log/six_speed_modification_log.vue +++ b/admin/src/app/views/six_speed_modification_log/six_speed_modification_log.vue @@ -1,186 +1,252 @@ - - - - - + + + + + diff --git a/admin/src/app/views/stat_hour/components/stat-hour-edit.vue b/admin/src/app/views/stat_hour/components/stat-hour-edit.vue index 41cc75aa..d028f70e 100644 --- a/admin/src/app/views/stat_hour/components/stat-hour-edit.vue +++ b/admin/src/app/views/stat_hour/components/stat-hour-edit.vue @@ -1,453 +1,566 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/stat_hour/stat_hour.vue b/admin/src/app/views/stat_hour/stat_hour.vue index f2b81ec3..47f63994 100644 --- a/admin/src/app/views/stat_hour/stat_hour.vue +++ b/admin/src/app/views/stat_hour/stat_hour.vue @@ -1,345 +1,626 @@ - - - - - + + + + + diff --git a/admin/src/app/views/student_course_usage/components/student-course-usage-edit.vue b/admin/src/app/views/student_course_usage/components/student-course-usage-edit.vue index 0b8b8066..20443edd 100644 --- a/admin/src/app/views/student_course_usage/components/student-course-usage-edit.vue +++ b/admin/src/app/views/student_course_usage/components/student-course-usage-edit.vue @@ -1,163 +1,203 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/student_course_usage/student_course_usage.vue b/admin/src/app/views/student_course_usage/student_course_usage.vue index 64c21e71..98cbf43d 100644 --- a/admin/src/app/views/student_course_usage/student_course_usage.vue +++ b/admin/src/app/views/student_course_usage/student_course_usage.vue @@ -1,171 +1,228 @@ - - - - - + + + + + diff --git a/admin/src/app/views/student_courses/components/student-courses-edit.vue b/admin/src/app/views/student_courses/components/student-courses-edit.vue index 815059a6..4138ba7c 100644 --- a/admin/src/app/views/student_courses/components/student-courses-edit.vue +++ b/admin/src/app/views/student_courses/components/student-courses-edit.vue @@ -1,193 +1,236 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/student_courses/student_courses.vue b/admin/src/app/views/student_courses/student_courses.vue index 3474f4b5..b00d6457 100644 --- a/admin/src/app/views/student_courses/student_courses.vue +++ b/admin/src/app/views/student_courses/student_courses.vue @@ -1,189 +1,267 @@ - - - - - + + + + + diff --git a/admin/src/app/views/user_feedback/components/user-feedback-edit.vue b/admin/src/app/views/user_feedback/components/user-feedback-edit.vue index 184c0784..063f268f 100644 --- a/admin/src/app/views/user_feedback/components/user-feedback-edit.vue +++ b/admin/src/app/views/user_feedback/components/user-feedback-edit.vue @@ -1,163 +1,205 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/user_feedback/user_feedback.vue b/admin/src/app/views/user_feedback/user_feedback.vue index 3bf8d48d..33442ab3 100644 --- a/admin/src/app/views/user_feedback/user_feedback.vue +++ b/admin/src/app/views/user_feedback/user_feedback.vue @@ -1,171 +1,223 @@ - - - - - + + + + + diff --git a/admin/src/app/views/venue/components/venue-edit.vue b/admin/src/app/views/venue/components/venue-edit.vue index c5b90c87..05e285d3 100644 --- a/admin/src/app/views/venue/components/venue-edit.vue +++ b/admin/src/app/views/venue/components/venue-edit.vue @@ -1,213 +1,278 @@ - - - - - - + + + + + + diff --git a/admin/src/app/views/venue/venue.vue b/admin/src/app/views/venue/venue.vue index bd3da2d6..a02b843b 100644 --- a/admin/src/app/views/venue/venue.vue +++ b/admin/src/app/views/venue/venue.vue @@ -1,201 +1,293 @@ - - - - - + + + + + diff --git a/admin/src/app/views/yjpz_config/yjpz_config.vue b/admin/src/app/views/yjpz_config/yjpz_config.vue index b8a82bae..b722e31e 100644 --- a/admin/src/app/views/yjpz_config/yjpz_config.vue +++ b/admin/src/app/views/yjpz_config/yjpz_config.vue @@ -9,37 +9,35 @@ :rules="formRules" v-loading="loading" > - - 每个 - - 元 超过 - - - - - - - + + 每个 + + 元 超过 + + + + + @@ -55,8 +53,7 @@ import { reactive, ref } from 'vue' import { t } from '@/lang' import { FormInstance, FormRules } from 'element-plus' -import { yjpzConfig,getYjpzConfig} from '@/app/api/sys' - +import { yjpzConfig, getYjpzConfig } from '@/app/api/sys' const loading = ref(true) const formData = reactive({ @@ -68,7 +65,7 @@ const formData = reactive({ fri: { basePrice: 0, limitCount: 0, extraPrice: 0 }, sat: { basePrice: 0, limitCount: 0, extraPrice: 0 }, sun: { basePrice: 0, limitCount: 0, extraPrice: 0 }, - } + }, }) const weekDays = [ @@ -83,25 +80,22 @@ const weekDays = [ const formRules = reactive({}) - const setFormData = async () => { - const data = await (await getYjpzConfig()).data - formData['priceRules'] = data; - loading.value = false + const data = await (await getYjpzConfig()).data + formData['priceRules'] = data + loading.value = false } -setFormData(); +setFormData() const onSave = async () => { - - yjpzConfig(formData) - .then(() => { - loading.value = true - setFormData(); - }) - .catch(() => { - loading.value = false - }) - } - + yjpzConfig(formData) + .then(() => { + loading.value = true + setFormData() + }) + .catch(() => { + loading.value = false + }) +} diff --git a/admin/src/components/TencentMapPicker.vue b/admin/src/components/TencentMapPicker.vue index e763ba11..cb6719bd 100644 --- a/admin/src/components/TencentMapPicker.vue +++ b/admin/src/components/TencentMapPicker.vue @@ -110,7 +110,7 @@ const dialogVisible = computed({ }, set(value) { emit('update:visible', value) - } + }, }) watch(dialogVisible, (newVal) => { @@ -172,25 +172,29 @@ const initMapScript = () => { let mapScript: HTMLScriptElement | null = null -watch(dialogVisible, (newVal) => { - if (newVal) { - if (mapScript) { - document.body.removeChild(mapScript) - mapScript = null - } - initMapScript() - getAreaListByPid(0).then((res) => { - provinceList.value = res.data - }) - } else { - if (mapScript) { - document.body.removeChild(mapScript) - mapScript = null +watch( + dialogVisible, + (newVal) => { + if (newVal) { + if (mapScript) { + document.body.removeChild(mapScript) + mapScript = null + } + initMapScript() + getAreaListByPid(0).then((res) => { + provinceList.value = res.data + }) + } else { + if (mapScript) { + document.body.removeChild(mapScript) + mapScript = null + } + map = null + marker = null } - map = null - marker = null - } -}, { immediate: true }) + }, + { immediate: true } +) const initMap = () => { console.log('initMap') From 1c394c15e571c1564684c2365ee374aa347e37b5 Mon Sep 17 00:00:00 2001 From: wangzeyan <258785420@qq.com> Date: Sun, 18 May 2025 11:46:17 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9C=B0=E5=8C=BA?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/components.d.ts | 4 + admin/src/app/api/venue.ts | 25 +- admin/src/app/lang/zh-cn/venue.venue.json | 50 +- .../views/campus/components/campus-edit.vue | 25 +- .../app/views/venue/components/venue-edit.vue | 545 +++++++++--------- admin/src/app/views/venue/venue.vue | 544 ++++++++--------- admin/src/components/TencentMapPicker.vue | 389 +++++++++---- .../app/adminapi/controller/venue/Venue.php | 9 +- niucloud/app/adminapi/route/venue.php | 3 + niucloud/app/model/venue/Venue.php | 86 ++- .../service/admin/campus/CampusService.php | 15 +- .../student_courses/StudentCoursesService.php | 2 +- .../app/service/admin/venue/VenueService.php | 14 +- niucloud/app/validate/venue/Venue.php | 3 +- 14 files changed, 961 insertions(+), 753 deletions(-) diff --git a/admin/components.d.ts b/admin/components.d.ts index 266a85b9..e5b7f07b 100644 --- a/admin/components.d.ts +++ b/admin/components.d.ts @@ -10,6 +10,7 @@ declare module '@vue/runtime-core' { Attachment: typeof import('./src/components/upload-attachment/attachment.vue')['default'] DiyLink: typeof import('./src/components/diy-link/index.vue')['default'] Editor: typeof import('./src/components/editor/index.vue')['default'] + ElAlert: typeof import('element-plus/es')['ElAlert'] ElAside: typeof import('element-plus/es')['ElAside'] ElAvatar: typeof import('element-plus/es')['ElAvatar'] ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] @@ -44,6 +45,7 @@ declare module '@vue/runtime-core' { ElPopover: typeof import('element-plus/es')['ElPopover'] ElRadio: typeof import('element-plus/es')['ElRadio'] ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] + ElResult: typeof import('element-plus/es')['ElResult'] ElRow: typeof import('element-plus/es')['ElRow'] ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] ElSelect: typeof import('element-plus/es')['ElSelect'] @@ -56,6 +58,8 @@ declare module '@vue/runtime-core' { ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] ElTag: typeof import('element-plus/es')['ElTag'] + ElTimeline: typeof import('element-plus/es')['ElTimeline'] + ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] ElTree: typeof import('element-plus/es')['ElTree'] ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect'] diff --git a/admin/src/app/api/venue.ts b/admin/src/app/api/venue.ts index 36489c79..695778f5 100644 --- a/admin/src/app/api/venue.ts +++ b/admin/src/app/api/venue.ts @@ -1,5 +1,7 @@ import request from '@/utils/request' + + // USER_CODE_BEGIN -- venue /** * 获取场地列表 @@ -7,7 +9,7 @@ import request from '@/utils/request' * @returns */ export function getVenueList(params: Record) { - return request.get(`venue/venue`, { params }) + return request.get(`venue/venue`, {params}) } /** @@ -16,7 +18,7 @@ export function getVenueList(params: Record) { * @returns */ export function getVenueInfo(id: number) { - return request.get(`venue/venue/${id}`) + return request.get(`venue/venue/${id}`); } /** @@ -25,10 +27,7 @@ export function getVenueInfo(id: number) { * @returns */ export function addVenue(params: Record) { - return request.post('venue/venue', params, { - showErrorMessage: true, - showSuccessMessage: true, - }) + return request.post('venue/venue', params, { showErrorMessage: true, showSuccessMessage: true }) } /** @@ -38,10 +37,7 @@ export function addVenue(params: Record) { * @returns */ export function editVenue(params: Record) { - return request.put(`venue/venue/${params.id}`, params, { - showErrorMessage: true, - showSuccessMessage: true, - }) + return request.put(`venue/venue/${params.id}`, params, { showErrorMessage: true, showSuccessMessage: true }) } /** @@ -50,10 +46,11 @@ export function editVenue(params: Record) { * @returns */ export function deleteVenue(id: number) { - return request.delete(`venue/venue/${id}`, { - showErrorMessage: true, - showSuccessMessage: true, - }) + return request.delete(`venue/venue/${id}`, { showErrorMessage: true, showSuccessMessage: true }) +} + +export function getWithCampusList(params: Record){ + return request.get('venue/campus_all', {params}) } // USER_CODE_END -- venue diff --git a/admin/src/app/lang/zh-cn/venue.venue.json b/admin/src/app/lang/zh-cn/venue.venue.json index 45915b90..03d57f6a 100644 --- a/admin/src/app/lang/zh-cn/venue.venue.json +++ b/admin/src/app/lang/zh-cn/venue.venue.json @@ -1,25 +1,27 @@ { - "id": "场地编号", - "idPlaceholder": "请输入场地编号", - "campusId": "校区ID", - "campusIdPlaceholder": "请输入校区ID", - "venueName": "场地名称", - "venueNamePlaceholder": "请输入场地名称", - "capacity": "场地可容纳人数上限", - "capacityPlaceholder": "请输入场地可容纳人数上限", - "availabilityStatus": "场地可用状态", - "availabilityStatusPlaceholder": "请输入场地可用状态", - "timeRangeType": "场地可用时间范围类型", - "timeRangeTypePlaceholder": "请输入场地可用时间范围类型", - "timeRangeStart": "范围类型的开始时间", - "timeRangeStartPlaceholder": "请输入范围类型的开始时间", - "timeRangeEnd": "范围类型的结束时间", - "timeRangeEndPlaceholder": "请输入范围类型的结束时间", - "fixedTimeRanges": "固定时间范围类型的可用时间, 存储为JSON数组", - "fixedTimeRangesPlaceholder": "请输入固定时间范围类型的可用时间, 存储为JSON数组", - "addVenue": "添加场地", - "updateVenue": "编辑场地", - "venueDeleteTips": "确定要删除该数据吗?", - "startDate": "请选择开始时间", - "endDate": "请选择结束时间" -} + "campusId":"校区", + "campusIdPlaceholder":"全部", + "venueName":"场地名称", + "venueNamePlaceholder":"请输入场地名称", + "capacity":"场地可容纳人数上限", + "capacityPlaceholder":"请输入场地可容纳人数上限", + "availabilityStatus":"场地可用状态", + "availabilityStatusPlaceholder":"请输入场地可用状态", + "timeRangeType":"场地可用时间范围类型", + "timeRangeTypePlaceholder":"请输入场地可用时间范围类型", + "timeRangeStart":"范围类型的开始时间", + "timeRangeStartPlaceholder":"请输入范围类型的开始时间", + "timeRangeEnd":"范围类型的结束时间", + "timeRangeEndPlaceholder":"请输入范围类型的结束时间", + "fixedTimeRanges":"固定时间范围类型的可用时间, 存储为JSON数组", + "fixedTimeRangesPlaceholder":"请输入固定时间范围类型的可用时间, 存储为JSON数组", + "createdAt":"创建时间", + "createdAtPlaceholder":"请输入创建时间", + "updatedAt":"修改时间", + "updatedAtPlaceholder":"请输入修改时间", + "addVenue":"添加场地", + "updateVenue":"编辑场地", + "venueDeleteTips":"确定要删除该数据吗?", + "startDate":"请选择开始时间", + "endDate":"请选择结束时间" +} \ No newline at end of file diff --git a/admin/src/app/views/campus/components/campus-edit.vue b/admin/src/app/views/campus/components/campus-edit.vue index 87a56e9e..ca00310a 100644 --- a/admin/src/app/views/campus/components/campus-edit.vue +++ b/admin/src/app/views/campus/components/campus-edit.vue @@ -23,23 +23,26 @@ />
- - - + + + + + + + + - {{ - t('campusCoordinatesPlaceholder') - }} + + {{ + formData.campus_coordinates?.address || + t('campusCoordinatesPlaceholder') + }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + diff --git a/admin/src/app/views/venue/venue.vue b/admin/src/app/views/venue/venue.vue index a02b843b..9cdc60de 100644 --- a/admin/src/app/views/venue/venue.vue +++ b/admin/src/app/views/venue/venue.vue @@ -1,293 +1,251 @@ - - - - - + + + + + diff --git a/admin/src/components/TencentMapPicker.vue b/admin/src/components/TencentMapPicker.vue index cb6719bd..41341f31 100644 --- a/admin/src/components/TencentMapPicker.vue +++ b/admin/src/components/TencentMapPicker.vue @@ -12,9 +12,7 @@
- {{ props.placeholder }} -
+ >