35 changed files with 3129 additions and 2658 deletions
@ -1,38 +1,107 @@ |
|||||
{ |
{ |
||||
"source": "来源", |
"source":"来源", |
||||
"sourcePlaceholder": "请输入来源", |
"sourcePlaceholder":"请输入来源", |
||||
"sourceChannel": "来源渠道", |
"sourceChannel":"来源渠道", |
||||
"sourceChannelPlaceholder": "请输入来源渠道", |
"sourceChannelPlaceholder":"请输入来源渠道", |
||||
"consultant": "顾问", |
"consultant":"顾问", |
||||
"name": "姓名", |
"name":"姓名", |
||||
"namePlaceholder": "请输入姓名", |
"namePlaceholder":"请输入姓名", |
||||
"age": "年龄", |
"age":"年龄", |
||||
"agePlaceholder": "请输入年龄", |
"agePlaceholder":"请输入年龄", |
||||
"gender": "性别", |
"gender":"性别", |
||||
"genderPlaceholder": "请输入性别", |
"genderPlaceholder":"请输入性别", |
||||
"phoneNumber": "联系电话", |
"phoneNumber":"联系电话", |
||||
"phoneNumberPlaceholder": "请输入联系电话", |
"phoneNumberPlaceholder":"请输入联系电话", |
||||
"demand": "需求", |
"demand":"需求", |
||||
"demandPlaceholder": "请输入需求", |
"demandPlaceholder":"请输入需求", |
||||
"purchasingPower": "购买力", |
"purchasingPower":"购买力", |
||||
"purchasingPowerPlaceholder": "请输入购买力", |
"purchasingPowerPlaceholder":"请输入购买力", |
||||
"cognitiveIdea": "认知理念", |
"cognitiveIdea":"认知理念", |
||||
"cognitiveIdeaPlaceholder": "请输入认知理念", |
"cognitiveIdeaPlaceholder":"请输入认知理念", |
||||
"optionalClassTime": "可选上课时间", |
"optionalClassTime":"可选上课时间", |
||||
"optionalClassTimePlaceholder": "请输入可选上课时间", |
"optionalClassTimePlaceholder":"请输入可选上课时间", |
||||
"distance": "距离", |
"distance":"距离", |
||||
"distancePlaceholder": "请输入距离", |
"distancePlaceholder":"请输入距离", |
||||
"decisionMaker": "决策人", |
"decisionMaker":"决策人", |
||||
"decisionMakerPlaceholder": "请输入决策人", |
"decisionMakerPlaceholder":"请输入决策人", |
||||
"initialIntent": "客户初步意向度", |
"initialIntent":"客户初步意向度", |
||||
"initialIntentPlaceholder": "请输入客户初步意向度", |
"initialIntentPlaceholder":"请输入客户初步意向度", |
||||
"campus": "所属校区", |
"campus":"所属校区", |
||||
"campusPlaceholder": "请输入所属校区", |
"campusPlaceholder":"请输入所属校区", |
||||
"status": "客户状态", |
"status":"客户状态", |
||||
"statusPlaceholder": "请输入客户状态", |
"statusPlaceholder":"请输入客户状态", |
||||
"addCustomerResources": "添加客户资源", |
"addCustomerResources":"添加客户资源", |
||||
"updateCustomerResources": "编辑客户资源", |
"updateCustomerResources":"编辑客户资源", |
||||
"customerResourcesDeleteTips": "确定要删除该数据吗?", |
"customerResourcesDeleteTips":"确定要删除该数据吗?", |
||||
"startDate": "请选择开始时间", |
"startDate":"请选择开始时间", |
||||
"endDate": "请选择结束时间" |
"endDate":"请选择结束时间", |
||||
|
|
||||
|
|
||||
|
"resourceId":"资源", |
||||
|
"resourceIdPlaceholder":"请输入资源", |
||||
|
"orderStatus":"订单状态", |
||||
|
"orderStatusPlaceholder":"请输入订单状态", |
||||
|
"paymentType":"付款类型", |
||||
|
"paymentTypePlaceholder":"请输入付款类型", |
||||
|
"orderAmount":"订单金额", |
||||
|
"orderAmountPlaceholder":"请输入订单金额", |
||||
|
"courseId":"课程", |
||||
|
"courseIdPlaceholder":"请输入课程", |
||||
|
"classId":"班级", |
||||
|
"classIdPlaceholder":"请输入班级", |
||||
|
"staffId":"人员", |
||||
|
"paymentTime":"支付时间", |
||||
|
"addOrderTable":"添加订单", |
||||
|
"updateOrderTable":"编辑订单", |
||||
|
|
||||
|
|
||||
|
"resourceId":"客户姓名", |
||||
|
"resourceIdPlaceholder":"全部", |
||||
|
"studentId":"学员姓名", |
||||
|
"studentIdPlaceholder":"全部", |
||||
|
"height":"身高", |
||||
|
"heightPlaceholder":"请输入身高", |
||||
|
"createdAt":"创建时间", |
||||
|
"updatedAt":"修改时间", |
||||
|
"addPhysicalTest":"添加体测", |
||||
|
"updatePhysicalTest":"编辑体测", |
||||
|
"physicalTestDeleteTips":"确定要删除该数据吗?", |
||||
|
"startDate":"请选择开始时间", |
||||
|
"endDate":"请选择结束时间", |
||||
|
|
||||
|
"resourceId":"客户姓名", |
||||
|
"resourceIdPlaceholder":"全部", |
||||
|
"studentId":"学员姓名", |
||||
|
"studentIdPlaceholder":"全部", |
||||
|
"height":"身高", |
||||
|
"heightPlaceholder":"请输入身高", |
||||
|
"weight":"体重", |
||||
|
"weightPlaceholder":"请输入体重", |
||||
|
"coachId":"教练", |
||||
|
"coachIdPlaceholder":"请输入教练", |
||||
|
"seatedForwardBend":"坐位体前屈", |
||||
|
"seatedForwardBendPlaceholder":"请输入坐位体前屈", |
||||
|
"sitUps":"仰卧卷腹", |
||||
|
"sitUpsPlaceholder":"请输入仰卧卷腹", |
||||
|
"pushUps":"九十度仰卧撑", |
||||
|
"pushUpsPlaceholder":"请输入九十度仰卧撑", |
||||
|
"flamingoBalance":"火烈鸟平衡测试", |
||||
|
"flamingoBalancePlaceholder":"请输入火烈鸟平衡测试", |
||||
|
"thirtySecJump":"三十秒双脚连续跳", |
||||
|
"thirtySecJumpPlaceholder":"请输入三十秒双脚连续跳", |
||||
|
"standingLongJump":"立定跳远", |
||||
|
"standingLongJumpPlaceholder":"请输入立定跳远", |
||||
|
"agilityRun":"4乘10m灵敏折返跑", |
||||
|
"agilityRunPlaceholder":"请输入4乘10m灵敏折返跑", |
||||
|
"balanceBeam":"走平衡木", |
||||
|
"balanceBeamPlaceholder":"请输入走平衡木", |
||||
|
"tennisThrow":"网球掷远", |
||||
|
"tennisThrowPlaceholder":"请输入网球掷远", |
||||
|
"tenMeterShuttleRun":"十米往返跑", |
||||
|
"tenMeterShuttleRunPlaceholder":"请输入十米往返跑", |
||||
|
"addPhysicalTest":"添加体测", |
||||
|
"updatePhysicalTest":"编辑体测", |
||||
|
"physicalTestDeleteTips":"确定要删除该数据吗?", |
||||
|
"startDate":"请选择开始时间", |
||||
|
"endDate":"请选择结束时间" |
||||
} |
} |
||||
@ -1,35 +1,21 @@ |
|||||
{ |
{ |
||||
"id": "订单编号", |
"resourceId":"资源", |
||||
"idPlaceholder": "请输入订单编号", |
"resourceIdPlaceholder":"请输入资源", |
||||
"paymentId": "支付编号", |
"orderStatus":"订单状态", |
||||
"paymentIdPlaceholder": "请输入支付编号", |
"orderStatusPlaceholder":"请输入订单状态", |
||||
"orderStatus": "订单状态: pending-待支付, paid-已支付", |
"paymentType":"付款类型", |
||||
"orderStatusPlaceholder": "请输入订单状态: pending-待支付, paid-已支付", |
"paymentTypePlaceholder":"请输入付款类型", |
||||
"paymentType": "付款类型: cash-现金支付, scan_code-扫码支付, subscription-订阅支付", |
"orderAmount":"订单金额", |
||||
"paymentTypePlaceholder": "请输入付款类型: cash-现金支付, scan_code-扫码支付, subscription-订阅支付", |
"orderAmountPlaceholder":"请输入订单金额", |
||||
"orderAmount": "订单金额", |
"courseId":"课程", |
||||
"orderAmountPlaceholder": "请输入订单金额", |
"courseIdPlaceholder":"请输入课程", |
||||
"courseId": "课程ID", |
"classId":"班级", |
||||
"courseIdPlaceholder": "请输入课程ID", |
"classIdPlaceholder":"请输入班级", |
||||
"classId": "班级ID", |
"staffId":"人员", |
||||
"classIdPlaceholder": "请输入班级ID", |
"paymentTime":"支付时间", |
||||
"staffId": "人员ID", |
"addOrderTable":"添加订单", |
||||
"staffIdPlaceholder": "请输入人员ID", |
"updateOrderTable":"编辑订单", |
||||
"resourceId": "资源ID", |
"orderTableDeleteTips":"确定要删除该数据吗?", |
||||
"resourceIdPlaceholder": "请输入资源ID", |
"startDate":"请选择开始时间", |
||||
"afterSalesStatus": "售后状态", |
"endDate":"请选择结束时间" |
||||
"afterSalesStatusPlaceholder": "请输入售后状态", |
|
||||
"afterSalesReason": "售后原因", |
|
||||
"afterSalesReasonPlaceholder": "请输入售后原因", |
|
||||
"afterSalesTime": "售后时间", |
|
||||
"afterSalesTimePlaceholder": "请输入售后时间", |
|
||||
"paymentTime": "支付时间", |
|
||||
"paymentTimePlaceholder": "请输入支付时间", |
|
||||
"subscriptionPaymentTime": "订阅支付生成时间", |
|
||||
"subscriptionPaymentTimePlaceholder": "请输入订阅支付生成时间", |
|
||||
"addOrderTable": "添加订单", |
|
||||
"updateOrderTable": "编辑订单", |
|
||||
"orderTableDeleteTips": "确定要删除该数据吗?", |
|
||||
"startDate": "请选择开始时间", |
|
||||
"endDate": "请选择结束时间" |
|
||||
} |
} |
||||
@ -1,17 +1,37 @@ |
|||||
{ |
{ |
||||
"resourceId": "客户姓名", |
"resourceId":"客户姓名", |
||||
"resourceIdPlaceholder": "请输入客户姓名", |
"resourceIdPlaceholder":"全部", |
||||
"studentId": "学员姓名", |
"studentId":"学员姓名", |
||||
"studentIdPlaceholder": "请输入学员姓名", |
"studentIdPlaceholder":"全部", |
||||
"height": "身高", |
"height":"身高", |
||||
"heightPlaceholder": "请输入身高", |
"heightPlaceholder":"请输入身高", |
||||
"createdAt": "创建时间", |
"weight":"体重", |
||||
"createdAtPlaceholder": "请输入创建时间", |
"weightPlaceholder":"请输入体重", |
||||
"updatedAt": "修改时间", |
"coachId":"教练", |
||||
"updatedAtPlaceholder": "请输入修改时间", |
"coachIdPlaceholder":"请输入教练", |
||||
"addPhysicalTest": "添加体测", |
"seatedForwardBend":"坐位体前屈", |
||||
"updatePhysicalTest": "编辑体测", |
"seatedForwardBendPlaceholder":"请输入坐位体前屈", |
||||
"physicalTestDeleteTips": "确定要删除该数据吗?", |
"sitUps":"仰卧卷腹", |
||||
"startDate": "请选择开始时间", |
"sitUpsPlaceholder":"请输入仰卧卷腹", |
||||
"endDate": "请选择结束时间" |
"pushUps":"九十度仰卧撑", |
||||
|
"pushUpsPlaceholder":"请输入九十度仰卧撑", |
||||
|
"flamingoBalance":"火烈鸟平衡测试", |
||||
|
"flamingoBalancePlaceholder":"请输入火烈鸟平衡测试", |
||||
|
"thirtySecJump":"三十秒双脚连续跳", |
||||
|
"thirtySecJumpPlaceholder":"请输入三十秒双脚连续跳", |
||||
|
"standingLongJump":"立定跳远", |
||||
|
"standingLongJumpPlaceholder":"请输入立定跳远", |
||||
|
"agilityRun":"4乘10m灵敏折返跑", |
||||
|
"agilityRunPlaceholder":"请输入4乘10m灵敏折返跑", |
||||
|
"balanceBeam":"走平衡木", |
||||
|
"balanceBeamPlaceholder":"请输入走平衡木", |
||||
|
"tennisThrow":"网球掷远", |
||||
|
"tennisThrowPlaceholder":"请输入网球掷远", |
||||
|
"tenMeterShuttleRun":"十米往返跑", |
||||
|
"tenMeterShuttleRunPlaceholder":"请输入十米往返跑", |
||||
|
"addPhysicalTest":"添加体测", |
||||
|
"updatePhysicalTest":"编辑体测", |
||||
|
"physicalTestDeleteTips":"确定要删除该数据吗?", |
||||
|
"startDate":"请选择开始时间", |
||||
|
"endDate":"请选择结束时间" |
||||
} |
} |
||||
@ -1,39 +1,39 @@ |
|||||
{ |
{ |
||||
"resourceId": "客户姓名", |
"resourceId":"客户姓名", |
||||
"studentId": "学员姓名", |
"studentId":"学员姓名", |
||||
"height": "身高", |
"height":"身高", |
||||
"weight": "体重", |
"weight":"体重", |
||||
"coachId": "教练", |
"coachId":"教练", |
||||
"createdAt": "创建时间", |
"createdAt":"创建时间", |
||||
"updatedAt": "修改时间", |
"updatedAt":"修改时间", |
||||
"seatedForwardBend": "坐位体前屈", |
"seatedForwardBend":"坐位体前屈", |
||||
"sitUps": "仰卧卷腹", |
"sitUps":"仰卧卷腹", |
||||
"pushUps": "九十度仰卧撑", |
"pushUps":"九十度仰卧撑", |
||||
"flamingoBalance": "火烈鸟平衡测试", |
"flamingoBalance":"火烈鸟平衡测试", |
||||
"thirtySecJump": "三十秒双脚连续跳", |
"thirtySecJump":"三十秒双脚连续跳", |
||||
"standingLongJump": "立定跳远", |
"standingLongJump":"立定跳远", |
||||
"agilityRun": "4乘10m灵敏折返跑", |
"agilityRun":"4乘10m灵敏折返跑", |
||||
"balanceBeam": "走平衡木", |
"balanceBeam":"走平衡木", |
||||
"tennisThrow": "网球掷远", |
"tennisThrow":"网球掷远", |
||||
"tenMeterShuttleRun": "十米往返跑", |
"tenMeterShuttleRun":"十米往返跑", |
||||
"resourceIdPlaceholder": "请输入客户姓名", |
"resourceIdPlaceholder":"请选择客户姓名", |
||||
"studentIdPlaceholder": "请输入学员姓名", |
"studentIdPlaceholder":"请选择学员姓名", |
||||
"heightPlaceholder": "请输入身高", |
"heightPlaceholder":"请输入身高", |
||||
"weightPlaceholder": "请输入体重", |
"weightPlaceholder":"请输入体重", |
||||
"coachIdPlaceholder": "请输入教练", |
"coachIdPlaceholder":"请选择教练", |
||||
"createdAtPlaceholder": "请输入创建时间", |
"createdAtPlaceholder":"请输入创建时间", |
||||
"updatedAtPlaceholder": "请输入修改时间", |
"updatedAtPlaceholder":"请输入修改时间", |
||||
"seatedForwardBendPlaceholder": "请输入坐位体前屈", |
"seatedForwardBendPlaceholder":"请输入坐位体前屈", |
||||
"sitUpsPlaceholder": "请输入仰卧卷腹", |
"sitUpsPlaceholder":"请输入仰卧卷腹", |
||||
"pushUpsPlaceholder": "请输入九十度仰卧撑", |
"pushUpsPlaceholder":"请输入九十度仰卧撑", |
||||
"flamingoBalancePlaceholder": "请输入火烈鸟平衡测试", |
"flamingoBalancePlaceholder":"请输入火烈鸟平衡测试", |
||||
"thirtySecJumpPlaceholder": "请输入三十秒双脚连续跳", |
"thirtySecJumpPlaceholder":"请输入三十秒双脚连续跳", |
||||
"standingLongJumpPlaceholder": "请输入立定跳远", |
"standingLongJumpPlaceholder":"请输入立定跳远", |
||||
"agilityRunPlaceholder": "请输入4乘10m灵敏折返跑", |
"agilityRunPlaceholder":"请输入4乘10m灵敏折返跑", |
||||
"balanceBeamPlaceholder": "请输入走平衡木", |
"balanceBeamPlaceholder":"请输入走平衡木", |
||||
"tennisThrowPlaceholder": "请输入网球掷远", |
"tennisThrowPlaceholder":"请输入网球掷远", |
||||
"tenMeterShuttleRunPlaceholder": "请输入十米往返跑", |
"tenMeterShuttleRunPlaceholder":"请输入十米往返跑", |
||||
"addPhysicalTest": "添加体测", |
"addPhysicalTest":"添加体测", |
||||
"updatePhysicalTest": "编辑体测", |
"updatePhysicalTest":"编辑体测", |
||||
"physicalTestDeleteTips": "确定要删除该体测吗?" |
"physicalTestDeleteTips":"确定要删除该体测吗?" |
||||
} |
} |
||||
@ -0,0 +1,37 @@ |
|||||
|
{ |
||||
|
"resourceId":"客户姓名", |
||||
|
"resourceIdPlaceholder":"全部", |
||||
|
"studentId":"学员姓名", |
||||
|
"studentIdPlaceholder":"全部", |
||||
|
"height":"身高", |
||||
|
"heightPlaceholder":"请输入身高", |
||||
|
"weight":"体重", |
||||
|
"weightPlaceholder":"请输入体重", |
||||
|
"coachId":"教练", |
||||
|
"coachIdPlaceholder":"请输入教练", |
||||
|
"seatedForwardBend":"坐位体前屈", |
||||
|
"seatedForwardBendPlaceholder":"请输入坐位体前屈", |
||||
|
"sitUps":"仰卧卷腹", |
||||
|
"sitUpsPlaceholder":"请输入仰卧卷腹", |
||||
|
"pushUps":"九十度仰卧撑", |
||||
|
"pushUpsPlaceholder":"请输入九十度仰卧撑", |
||||
|
"flamingoBalance":"火烈鸟平衡测试", |
||||
|
"flamingoBalancePlaceholder":"请输入火烈鸟平衡测试", |
||||
|
"thirtySecJump":"三十秒双脚连续跳", |
||||
|
"thirtySecJumpPlaceholder":"请输入三十秒双脚连续跳", |
||||
|
"standingLongJump":"立定跳远", |
||||
|
"standingLongJumpPlaceholder":"请输入立定跳远", |
||||
|
"agilityRun":"4乘10m灵敏折返跑", |
||||
|
"agilityRunPlaceholder":"请输入4乘10m灵敏折返跑", |
||||
|
"balanceBeam":"走平衡木", |
||||
|
"balanceBeamPlaceholder":"请输入走平衡木", |
||||
|
"tennisThrow":"网球掷远", |
||||
|
"tennisThrowPlaceholder":"请输入网球掷远", |
||||
|
"tenMeterShuttleRun":"十米往返跑", |
||||
|
"tenMeterShuttleRunPlaceholder":"请输入十米往返跑", |
||||
|
"addPhysicalTest":"添加体测", |
||||
|
"updatePhysicalTest":"编辑体测", |
||||
|
"physicalTestDeleteTips":"确定要删除该数据吗?", |
||||
|
"startDate":"请选择开始时间", |
||||
|
"endDate":"请选择结束时间" |
||||
|
} |
||||
@ -1,368 +1,368 @@ |
|||||
<template> |
<template> |
||||
<div class="main-container"> |
<div class="main-container"> |
||||
<el-card class="box-card !border-none" shadow="never"> |
<el-card class="box-card !border-none" shadow="never"> |
||||
<div class="flex justify-between items-center"> |
|
||||
<span class="text-lg">{{ pageName }}</span> |
<div class="flex justify-between items-center"> |
||||
<el-button type="primary" @click="addEvent" v-if="type == 'khzy'"> |
<span class="text-lg">{{pageName}}</span> |
||||
{{ t('addCustomerResources') }} |
<el-button type="primary" @click="addEvent" v-if="customerResourcesTable.searchParam.type == 'khzy'"> |
||||
</el-button> |
{{ t('addCustomerResources') }} |
||||
</div> |
</el-button> |
||||
|
</div> |
||||
<el-card |
|
||||
class="box-card !border-none my-[10px] table-search-wrap" |
<el-card class="box-card !border-none my-[10px] table-search-wrap" shadow="never"> |
||||
shadow="never" |
<el-form :inline="true" :model="customerResourcesTable.searchParam" ref="searchFormRef"> |
||||
> |
<el-form-item :label="t('name')" prop="name"> |
||||
<el-form |
<el-input v-model="customerResourcesTable.searchParam.name" |
||||
:inline="true" |
:placeholder="t('namePlaceholder')" /> |
||||
:model="customerResourcesTable.searchParam" |
</el-form-item> |
||||
ref="searchFormRef" |
|
||||
> |
<el-form-item label="年龄" prop="age"> |
||||
<el-form-item :label="t('name')" prop="name"> |
<el-input v-model="customerResourcesTable.searchParam.age" placeholder="请输入年龄" /> |
||||
<el-input |
</el-form-item> |
||||
v-model="customerResourcesTable.searchParam.name" |
|
||||
:placeholder="t('namePlaceholder')" |
|
||||
/> |
<el-form-item label="性别" prop="gender"> |
||||
</el-form-item> |
<el-select v-model="customerResourcesTable.searchParam.gender" placeholder="请选择性别"> |
||||
<el-form-item :label="t('phoneNumber')" prop="phone_number"> |
<el-option label="男性" value="male" /> |
||||
<el-input |
<el-option label="女性" value="female" /> |
||||
v-model="customerResourcesTable.searchParam.phone_number" |
<el-option label="其他" value="other" /> |
||||
:placeholder="t('phoneNumberPlaceholder')" |
</el-select> |
||||
/> |
</el-form-item> |
||||
</el-form-item> |
|
||||
|
|
||||
<el-form-item> |
|
||||
<el-button type="primary" @click="loadCustomerResourcesList()">{{ |
<el-form-item :label="t('phoneNumber')" prop="phone_number"> |
||||
t('search') |
<el-input v-model="customerResourcesTable.searchParam.phone_number" |
||||
}}</el-button> |
:placeholder="t('phoneNumberPlaceholder')" /> |
||||
<el-button @click="resetForm(searchFormRef)">{{ |
</el-form-item> |
||||
t('reset') |
|
||||
}}</el-button> |
|
||||
</el-form-item> |
<el-form-item label="创建时间"> |
||||
</el-form> |
<el-date-picker v-model="customerResourcesTable.searchParam.created_at" type="daterange" range-separator="至" |
||||
</el-card> |
start-placeholder="开始日期" end-placeholder="结束日期" format="YYYY-MM-DD" |
||||
|
value-format="YYYY-MM-DD" /> |
||||
<div class="mt-[10px]"> |
</el-form-item> |
||||
<el-table |
|
||||
:data="customerResourcesTable.data" |
<!-- 更新时间 --> |
||||
size="large" |
<el-form-item label="更新时间"> |
||||
v-loading="customerResourcesTable.loading" |
<el-date-picker v-model="customerResourcesTable.searchParam.updated_at" type="daterange" range-separator="至" |
||||
> |
start-placeholder="开始日期" end-placeholder="结束日期" format="YYYY-MM-DD" |
||||
<template #empty> |
value-format="YYYY-MM-DD" /> |
||||
<span>{{ |
</el-form-item> |
||||
!customerResourcesTable.loading ? t('emptyData') : '' |
|
||||
}}</span> |
|
||||
</template> |
<el-form-item> |
||||
<el-table-column |
<el-button type="primary" @click="loadCustomerResourcesList()">{{ t('search') }}</el-button> |
||||
:label="t('source')" |
<el-button @click="resetForm(searchFormRef)">{{ t('reset') }}</el-button> |
||||
min-width="180" |
</el-form-item> |
||||
align="center" |
</el-form> |
||||
:show-overflow-tooltip="true" |
</el-card> |
||||
> |
|
||||
<template #default="{ row }"> |
<div class="mt-[10px]"> |
||||
<div v-for="(item, index) in sourceList"> |
<el-table :data="customerResourcesTable.data" size="large" v-loading="customerResourcesTable.loading"> |
||||
<div v-if="item.value == row.source">{{ item.name }}</div> |
<template #empty> |
||||
</div> |
<span>{{ !customerResourcesTable.loading ? t('emptyData') : '' }}</span> |
||||
</template> |
</template> |
||||
</el-table-column> |
<el-table-column :label="t('source')" min-width="180" align="center" :show-overflow-tooltip="true"> |
||||
|
<template #default="{ row }"> |
||||
<el-table-column |
<div v-for="(item, index) in sourceList"> |
||||
prop="consultant_name" |
<div v-if="item.value == row.source">{{ item.name }}</div> |
||||
:label="t('consultant')" |
</div> |
||||
min-width="120" |
</template> |
||||
:show-overflow-tooltip="true" |
</el-table-column> |
||||
/> |
|
||||
|
<el-table-column prop="consultant_name" :label="t('consultant')" min-width="120" |
||||
<el-table-column |
:show-overflow-tooltip="true" /> |
||||
prop="name" |
|
||||
:label="t('name')" |
<el-table-column prop="name" :label="t('name')" min-width="120" :show-overflow-tooltip="true" /> |
||||
min-width="120" |
|
||||
:show-overflow-tooltip="true" |
<el-table-column prop="age" :label="t('age')" min-width="50" :show-overflow-tooltip="true" /> |
||||
/> |
|
||||
|
<el-table-column :label="t('gender')" min-width="60" align="center" :show-overflow-tooltip="true"> |
||||
<el-table-column |
<template #default="{ row }"> |
||||
prop="age" |
<div v-for="(item, index) in genderList"> |
||||
:label="t('age')" |
<div v-if="item.value == row.gender">{{ item.name }}</div> |
||||
min-width="120" |
</div> |
||||
:show-overflow-tooltip="true" |
</template> |
||||
/> |
</el-table-column> |
||||
|
|
||||
<el-table-column |
<el-table-column prop="phone_number" :label="t('phoneNumber')" min-width="120" |
||||
:label="t('gender')" |
:show-overflow-tooltip="true" /> |
||||
min-width="180" |
|
||||
align="center" |
<el-table-column prop="decision_maker" :label="t('decisionMaker')" min-width="120" |
||||
:show-overflow-tooltip="true" |
:show-overflow-tooltip="true" /> |
||||
> |
|
||||
<template #default="{ row }"> |
|
||||
<div v-for="(item, index) in genderList"> |
<el-table-column prop="created_at" label="添加时间" min-width="120" :show-overflow-tooltip="true" /> |
||||
<div v-if="item.value == row.gender">{{ item.name }}</div> |
|
||||
</div> |
<el-table-column prop="updated_at" label="修改时间" min-width="120" :show-overflow-tooltip="true" /> |
||||
</template> |
|
||||
</el-table-column> |
|
||||
|
<el-table-column :label="t('operation')" fixed="right" min-width="200" v-if="customerResourcesTable.searchParam.type == 'khzy'"> |
||||
<el-table-column |
<template #default="{ row }"> |
||||
prop="phone_number" |
<el-button type="primary" link @click="modificationLog(row.id)">六要素修改记录</el-button> |
||||
:label="t('phoneNumber')" |
<el-button type="primary" link @click="resourceChanges(row.id)">客户信息修改记录</el-button> |
||||
min-width="120" |
<el-button type="primary" link @click="editEvent(row)">{{ t('edit') }}</el-button> |
||||
:show-overflow-tooltip="true" |
<el-button type="primary" link @click="deleteEvent(row.id)">{{ t('delete') }}</el-button> |
||||
/> |
|
||||
|
</template> |
||||
<el-table-column |
</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="200" |
||||
/> |
v-if="customerResourcesTable.searchParam.type == 'yjfp'"> |
||||
|
<template #default="{ row }"> |
||||
<el-table-column |
<el-button type="primary" link @click="fpEvent(row)">分配</el-button> |
||||
:label="t('operation')" |
</template> |
||||
fixed="right" |
</el-table-column> |
||||
min-width="200" |
|
||||
v-if="type == 'khzy'" |
|
||||
> |
<el-table-column :label="t('operation')" fixed="right" min-width="200" |
||||
<template #default="{ row }"> |
v-if="customerResourcesTable.searchParam.type == 'zylb'"> |
||||
<el-button type="primary" link @click="modificationLog(row.id)" |
<template #default="{ row }"> |
||||
>六要素修改记录</el-button |
<el-button type="primary" link @click="editEvent(row)">{{ t('edit') }}</el-button> |
||||
> |
|
||||
<el-button type="primary" link @click="resourceChanges(row.id)" |
<el-button type="primary" link @click="addOrder({'resource_id':row.id})">添加订单</el-button> |
||||
>客户信息修改记录</el-button |
|
||||
> |
<el-button type="primary" link @click="tcEvent({'resource_id':row.id})">体测</el-button> |
||||
<el-button type="primary" link @click="editEvent(row)">{{ |
</template> |
||||
t('edit') |
</el-table-column> |
||||
}}</el-button> |
|
||||
<el-button type="primary" link @click="deleteEvent(row.id)">{{ |
</el-table> |
||||
t('delete') |
<div class="mt-[16px] flex justify-end"> |
||||
}}</el-button> |
<el-pagination v-model:current-page="customerResourcesTable.page" |
||||
</template> |
v-model:page-size="customerResourcesTable.limit" |
||||
</el-table-column> |
layout="total, sizes, prev, pager, next, jumper" :total="customerResourcesTable.total" |
||||
|
@size-change="loadCustomerResourcesList()" @current-change="loadCustomerResourcesList" /> |
||||
<el-table-column |
</div> |
||||
:label="t('operation')" |
</div> |
||||
fixed="right" |
|
||||
min-width="200" |
<edit ref="editCustomerResourcesDialog" @complete="loadCustomerResourcesList" /> |
||||
v-if="type == 'yjfp'" |
|
||||
> |
<fp ref="fpCustomerResourcesDialog" @complete="loadCustomerResourcesList" /> |
||||
<template #default="{ row }"> |
|
||||
<el-button type="primary" link @click="fpEvent(row)" |
<Order ref="editOrderTableDialog" @complete="loadCustomerResourcesList" /> |
||||
>分配</el-button |
|
||||
> |
<tc ref="TcCustomerResourcesDialog" @complete="loadCustomerResourcesList" /> |
||||
</template> |
|
||||
</el-table-column> |
</el-card> |
||||
</el-table> |
</div> |
||||
<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" |
|
||||
/> |
|
||||
|
|
||||
<fp |
|
||||
ref="fpCustomerResourcesDialog" |
|
||||
@complete="loadCustomerResourcesList" |
|
||||
/> |
|
||||
</el-card> |
|
||||
</div> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script lang="ts" setup> |
<script lang="ts" setup> |
||||
import { reactive, ref, watch } from 'vue' |
import { reactive, ref, watch } from 'vue' |
||||
import { t } from '@/lang' |
import { t } from '@/lang' |
||||
import { useDictionary } from '@/app/api/dict' |
import { useDictionary } from '@/app/api/dict' |
||||
import { |
import { getCustomerResourcesList, deleteCustomerResources, getWithPersonnelList, getWithCampusList } from '@/app/api/customer_resources' |
||||
getCustomerResourcesList, |
import { img } from '@/utils/common' |
||||
deleteCustomerResources, |
import { ElMessageBox, FormInstance } from 'element-plus' |
||||
getWithPersonnelList, |
import Edit from '@/app/views/customer_resources/components/customer-resources-edit.vue' |
||||
getWithCampusList, |
import Fp from '@/app/views/customer_resources/components/fp.vue' |
||||
} from '@/app/api/customer_resources' |
import Order from '@/app/views/order_table/components/order-table-edit.vue' |
||||
import { img } from '@/utils/common' |
|
||||
import { ElMessageBox, FormInstance } from 'element-plus' |
import Tc from '@/app/views/tc_dialog/tc_dialog.vue' |
||||
import Edit from '@/app/views/customer_resources/components/customer-resources-edit.vue' |
|
||||
import Fp from '@/app/views/customer_resources/components/fp.vue' |
import { useRouter, useRoute } from 'vue-router' |
||||
import { useRouter, useRoute } from 'vue-router' |
const route = useRoute() |
||||
const route = useRoute() |
const pageName = route.meta.title; |
||||
const pageName = route.meta.title |
const router = useRouter() |
||||
const router = useRouter() |
|
||||
|
let customerResourcesTable = reactive({ |
||||
const type = pageName == '业绩分配' ? 'yjfp' : 'khzy' |
page: 1, |
||||
|
limit: 10, |
||||
const modificationLog = (id: number) => { |
total: 0, |
||||
router.push({ |
loading: true, |
||||
path: '/six_speed_modification_log/six_speed_modification_log', |
data: [], |
||||
query: { id: id }, |
searchParam: { |
||||
}) |
"name": "", |
||||
} |
"age": "", |
||||
|
"gender": "", |
||||
const resourceChanges = (id: number) => { |
"phone_number": "", |
||||
router.push({ |
'type': '', |
||||
path: '/customer_resource_changes/customer_resource_changes', |
"created_at" : "", |
||||
query: { id: id }, |
"updated_at" : "" |
||||
}) |
} |
||||
} |
}) |
||||
|
|
||||
let customerResourcesTable = reactive({ |
if (pageName == '业绩分配') { |
||||
page: 1, |
customerResourcesTable.searchParam.type = 'yjfp'; |
||||
limit: 10, |
} else if (pageName == '客户资源列表') { |
||||
total: 0, |
customerResourcesTable.searchParam.type = 'khzy'; |
||||
loading: true, |
} else if (pageName == '资源列表') { |
||||
data: [], |
customerResourcesTable.searchParam.type = 'zylb'; |
||||
searchParam: { |
} |
||||
name: '', |
|
||||
phone_number: '', |
// const type = pageName == '业绩分配' ? 'yjfp' : 'khzy'; |
||||
type: type, |
|
||||
}, |
|
||||
}) |
|
||||
|
const modificationLog = (id : number) => { |
||||
const searchFormRef = ref<FormInstance>() |
router.push({ path: '/six_speed_modification_log/six_speed_modification_log', query: { id: id } }) |
||||
|
} |
||||
// 选中数据 |
|
||||
const selectData = ref<any[]>([]) |
const resourceChanges = (id : number) => { |
||||
|
router.push({ path: '/customer_resource_changes/customer_resource_changes', query: { id: id } }) |
||||
// 字典数据 |
} |
||||
const sourceList = ref([] as any[]) |
|
||||
const sourceDictList = async () => { |
|
||||
sourceList.value = await (await useDictionary('source')).data.dictionary |
/** |
||||
} |
* 添加订单 |
||||
sourceDictList() |
*/ |
||||
const source_channelList = ref([] as any[]) |
const editOrderTableDialog : Record<string, any> | null = ref(null) |
||||
const source_channelDictList = async () => { |
const addOrder = (row : any) => { |
||||
source_channelList.value = await ( |
|
||||
await useDictionary('SourceChannel') |
console.log(row); |
||||
).data.dictionary |
editOrderTableDialog.value.setFormData(row) |
||||
} |
editOrderTableDialog.value.showDialog = true |
||||
source_channelDictList() |
} |
||||
const genderList = ref([] as any[]) |
|
||||
const genderDictList = async () => { |
|
||||
genderList.value = await (await useDictionary('zy_sex')).data.dictionary |
const TcCustomerResourcesDialog : Record<string, any> | null = ref(null) |
||||
} |
const tcEvent = (row : any) => { |
||||
genderDictList() |
TcCustomerResourcesDialog.value.setFormData(row) |
||||
const purchasing_powerList = ref([] as any[]) |
TcCustomerResourcesDialog.value.showDialog = true |
||||
const purchasing_powerDictList = async () => { |
} |
||||
purchasing_powerList.value = await ( |
|
||||
await useDictionary('customer_purchasing_power') |
|
||||
).data.dictionary |
|
||||
} |
|
||||
purchasing_powerDictList() |
const searchFormRef = ref<FormInstance>() |
||||
const cognitive_ideaList = ref([] as any[]) |
|
||||
const cognitive_ideaDictList = async () => { |
// 选中数据 |
||||
cognitive_ideaList.value = await ( |
const selectData = ref<any[]>([]) |
||||
await useDictionary('cognitive_concept') |
|
||||
).data.dictionary |
// 字典数据 |
||||
} |
const sourceList = ref([] as any[]) |
||||
cognitive_ideaDictList() |
const sourceDictList = async () => { |
||||
const initial_intentList = ref([] as any[]) |
sourceList.value = await (await useDictionary('source')).data.dictionary |
||||
const initial_intentDictList = async () => { |
} |
||||
initial_intentList.value = await ( |
sourceDictList(); |
||||
await useDictionary('preliminarycustomerintention') |
const source_channelList = ref([] as any[]) |
||||
).data.dictionary |
const source_channelDictList = async () => { |
||||
} |
source_channelList.value = await (await useDictionary('SourceChannel')).data.dictionary |
||||
initial_intentDictList() |
} |
||||
const statusList = ref([] as any[]) |
source_channelDictList(); |
||||
const statusDictList = async () => { |
const genderList = ref([] as any[]) |
||||
statusList.value = await (await useDictionary('kh_status')).data.dictionary |
const genderDictList = async () => { |
||||
} |
genderList.value = await (await useDictionary('zy_sex')).data.dictionary |
||||
statusDictList() |
} |
||||
|
genderDictList(); |
||||
/** |
const purchasing_powerList = ref([] as any[]) |
||||
* 获取客户资源列表 |
const purchasing_powerDictList = async () => { |
||||
*/ |
purchasing_powerList.value = await (await useDictionary('customer_purchasing_power')).data.dictionary |
||||
const loadCustomerResourcesList = (page: number = 1) => { |
} |
||||
customerResourcesTable.loading = true |
purchasing_powerDictList(); |
||||
customerResourcesTable.page = page |
const cognitive_ideaList = ref([] as any[]) |
||||
|
const cognitive_ideaDictList = async () => { |
||||
getCustomerResourcesList({ |
cognitive_ideaList.value = await (await useDictionary('cognitive_concept')).data.dictionary |
||||
page: customerResourcesTable.page, |
} |
||||
limit: customerResourcesTable.limit, |
cognitive_ideaDictList(); |
||||
...customerResourcesTable.searchParam, |
const initial_intentList = ref([] as any[]) |
||||
}) |
const initial_intentDictList = async () => { |
||||
.then((res) => { |
initial_intentList.value = await (await useDictionary('preliminarycustomerintention')).data.dictionary |
||||
customerResourcesTable.loading = false |
} |
||||
customerResourcesTable.data = res.data.data |
initial_intentDictList(); |
||||
customerResourcesTable.total = res.data.total |
const statusList = ref([] as any[]) |
||||
}) |
const statusDictList = async () => { |
||||
.catch(() => { |
statusList.value = await (await useDictionary('kh_status')).data.dictionary |
||||
customerResourcesTable.loading = false |
} |
||||
}) |
statusDictList(); |
||||
} |
|
||||
loadCustomerResourcesList() |
|
||||
|
/** |
||||
const editCustomerResourcesDialog: Record<string, any> | null = ref(null) |
* 获取客户资源列表 |
||||
|
*/ |
||||
const fpCustomerResourcesDialog: Record<string, any> | null = ref(null) |
const loadCustomerResourcesList = (page : number = 1) => { |
||||
|
customerResourcesTable.loading = true |
||||
/** |
customerResourcesTable.page = page |
||||
* 添加客户资源 |
|
||||
*/ |
getCustomerResourcesList({ |
||||
const addEvent = () => { |
page: customerResourcesTable.page, |
||||
editCustomerResourcesDialog.value.setFormData() |
limit: customerResourcesTable.limit, |
||||
editCustomerResourcesDialog.value.showDialog = true |
...customerResourcesTable.searchParam |
||||
} |
}).then(res => { |
||||
|
customerResourcesTable.loading = false |
||||
/** |
customerResourcesTable.data = res.data.data |
||||
* 编辑客户资源 |
customerResourcesTable.total = res.data.total |
||||
* @param data |
}).catch(() => { |
||||
*/ |
customerResourcesTable.loading = false |
||||
const editEvent = (data: any) => { |
}) |
||||
editCustomerResourcesDialog.value.setFormData(data) |
} |
||||
editCustomerResourcesDialog.value.showDialog = true |
loadCustomerResourcesList() |
||||
} |
|
||||
|
const editCustomerResourcesDialog : Record<string, any> | null = ref(null) |
||||
const fpEvent = (data: any) => { |
|
||||
fpCustomerResourcesDialog.value.setFormData(data) |
const fpCustomerResourcesDialog : Record<string, any> | null = ref(null) |
||||
fpCustomerResourcesDialog.value.showDialog = true |
|
||||
} |
/** |
||||
|
* 添加客户资源 |
||||
/** |
*/ |
||||
* 删除客户资源 |
const addEvent = () => { |
||||
*/ |
editCustomerResourcesDialog.value.setFormData() |
||||
const deleteEvent = (id: number) => { |
editCustomerResourcesDialog.value.showDialog = true |
||||
ElMessageBox.confirm(t('customerResourcesDeleteTips'), t('warning'), { |
} |
||||
confirmButtonText: t('confirm'), |
|
||||
cancelButtonText: t('cancel'), |
/** |
||||
type: 'warning', |
* 编辑客户资源 |
||||
}).then(() => { |
* @param data |
||||
deleteCustomerResources(id) |
*/ |
||||
.then(() => { |
const editEvent = (data : any) => { |
||||
loadCustomerResourcesList() |
editCustomerResourcesDialog.value.setFormData(data) |
||||
}) |
editCustomerResourcesDialog.value.showDialog = true |
||||
.catch(() => {}) |
} |
||||
}) |
|
||||
} |
const fpEvent = (data : any) => { |
||||
|
fpCustomerResourcesDialog.value.setFormData(data) |
||||
const consultantList = ref([]) |
fpCustomerResourcesDialog.value.showDialog = true |
||||
const setConsultantList = async () => { |
} |
||||
consultantList.value = await (await getWithPersonnelList({})).data |
|
||||
} |
|
||||
setConsultantList() |
/** |
||||
const campusList = ref([]) |
* 删除客户资源 |
||||
const setCampusList = async () => { |
*/ |
||||
campusList.value = await (await getWithCampusList({})).data |
const deleteEvent = (id : number) => { |
||||
} |
ElMessageBox.confirm(t('customerResourcesDeleteTips'), t('warning'), |
||||
setCampusList() |
{ |
||||
|
confirmButtonText: t('confirm'), |
||||
const resetForm = (formEl: FormInstance | undefined) => { |
cancelButtonText: t('cancel'), |
||||
if (!formEl) return |
type: 'warning', |
||||
formEl.resetFields() |
} |
||||
loadCustomerResourcesList() |
).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> |
</script> |
||||
|
|
||||
<style lang="scss" scoped> |
<style lang="scss" scoped> |
||||
/* 多行超出隐藏 */ |
/* 多行超出隐藏 */ |
||||
.multi-hidden { |
.multi-hidden { |
||||
word-break: break-all; |
word-break: break-all; |
||||
text-overflow: ellipsis; |
text-overflow: ellipsis; |
||||
overflow: hidden; |
overflow: hidden; |
||||
display: -webkit-box; |
display: -webkit-box; |
||||
-webkit-line-clamp: 2; |
-webkit-line-clamp: 2; |
||||
-webkit-box-orient: vertical; |
-webkit-box-orient: vertical; |
||||
} |
} |
||||
</style> |
</style> |
||||
@ -0,0 +1,239 @@ |
|||||
|
<template> |
||||
|
<el-dialog |
||||
|
v-model="showDialog" |
||||
|
title="体测列表" |
||||
|
width="80%" |
||||
|
class="diy-dialog-wrap" |
||||
|
:destroy-on-close="true" |
||||
|
> |
||||
|
<div class="main-container"> |
||||
|
<el-card class="box-card !border-none" shadow="never"> |
||||
|
|
||||
|
<div class="flex justify-between items-center"> |
||||
|
<span class="text-lg">体测列表</span> |
||||
|
<el-button type="primary" @click="addEvent"> |
||||
|
{{ t('addPhysicalTest') }} |
||||
|
</el-button> |
||||
|
</div> |
||||
|
|
||||
|
<!-- <el-card class="box-card !border-none my-[10px] table-search-wrap" shadow="never"> |
||||
|
<el-form :inline="true" :model="physicalTestTable.searchParam" ref="searchFormRef"> |
||||
|
|
||||
|
<el-form-item :label="t('resourceId')" prop="resource_id"> |
||||
|
<el-select class="w-[280px]" v-model="physicalTestTable.searchParam.resource_id" clearable :placeholder="t('resourceIdPlaceholder')"> |
||||
|
<el-option |
||||
|
v-for="(item, index) in resourceIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
|
||||
|
<el-form-item :label="t('studentId')" prop="student_id"> |
||||
|
<el-select class="w-[280px]" v-model="physicalTestTable.searchParam.student_id" clearable :placeholder="t('studentIdPlaceholder')"> |
||||
|
<el-option |
||||
|
v-for="(item, index) in studentIdList" |
||||
|
:key="index" |
||||
|
:label="item['name']" |
||||
|
:value="item['id']" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="t('height')" prop="height"> |
||||
|
<el-input v-model="physicalTestTable.searchParam.height" :placeholder="t('heightPlaceholder')" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" @click="loadPhysicalTestList()">{{ 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="physicalTestTable.data" size="large" v-loading="physicalTestTable.loading"> |
||||
|
<template #empty> |
||||
|
<span>{{ !physicalTestTable.loading ? t('emptyData') : '' }}</span> |
||||
|
</template> |
||||
|
<el-table-column prop="resource_id_name" :label="t('resourceId')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="student_id_name" :label="t('studentId')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="height" :label="t('height')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="created_at" :label="t('createdAt')" min-width="120" :show-overflow-tooltip="true"/> |
||||
|
|
||||
|
<el-table-column prop="updated_at" :label="t('updatedAt')" 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="physicalTestTable.page" v-model:page-size="physicalTestTable.limit" |
||||
|
layout="total, sizes, prev, pager, next, jumper" :total="physicalTestTable.total" |
||||
|
@size-change="loadPhysicalTestList()" @current-change="loadPhysicalTestList" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<edit ref="editPhysicalTestDialog" @complete="loadPhysicalTestList" /> |
||||
|
</el-card> |
||||
|
</div> |
||||
|
|
||||
|
</el-dialog> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, watch } from 'vue' |
||||
|
import { t } from '@/lang' |
||||
|
import { useDictionary } from '@/app/api/dict' |
||||
|
import { getPhysicalTestList, deletePhysicalTest, getWithCustomerResourcesList, getWithStudentList, getWithPersonnelList } from '@/app/api/physical_test' |
||||
|
import { img } from '@/utils/common' |
||||
|
import { ElMessageBox,FormInstance } from 'element-plus' |
||||
|
import Edit from '@/app/views/physical_test/components/physical-test-edit.vue' |
||||
|
import { useRouter } from 'vue-router' |
||||
|
import { useRoute } from 'vue-router' |
||||
|
const route = useRoute() |
||||
|
const pageName = route.meta.title; |
||||
|
let showDialog = ref(false) |
||||
|
|
||||
|
|
||||
|
|
||||
|
let physicalTestTable = reactive({ |
||||
|
page: 1, |
||||
|
limit: 10, |
||||
|
total: 0, |
||||
|
loading: true, |
||||
|
data: [], |
||||
|
searchParam:{ |
||||
|
"resource_id":"", |
||||
|
"student_id":"", |
||||
|
"height":"" |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
const searchFormRef = ref<FormInstance>() |
||||
|
|
||||
|
// 选中数据 |
||||
|
const selectData = ref<any[]>([]) |
||||
|
|
||||
|
// 字典数据 |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 获取体测列表 |
||||
|
*/ |
||||
|
const loadPhysicalTestList = (page: number = 1) => { |
||||
|
physicalTestTable.loading = true |
||||
|
physicalTestTable.page = page |
||||
|
|
||||
|
getPhysicalTestList({ |
||||
|
page: physicalTestTable.page, |
||||
|
limit: physicalTestTable.limit, |
||||
|
...physicalTestTable.searchParam |
||||
|
}).then(res => { |
||||
|
physicalTestTable.loading = false |
||||
|
physicalTestTable.data = res.data.data |
||||
|
physicalTestTable.total = res.data.total |
||||
|
}).catch(() => { |
||||
|
physicalTestTable.loading = false |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
const router = useRouter() |
||||
|
|
||||
|
const editPhysicalTestDialog: Record<string, any> | null = ref(null) |
||||
|
|
||||
|
/** |
||||
|
* 添加体测 |
||||
|
*/ |
||||
|
const addEvent = () => { |
||||
|
editPhysicalTestDialog.value.setFormData({'resource_id':physicalTestTable.searchParam.resource_id}) |
||||
|
editPhysicalTestDialog.value.showDialog = true |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 编辑体测 |
||||
|
* @param data |
||||
|
*/ |
||||
|
const editEvent = (data: any) => { |
||||
|
// router.push('/physical_test/physical_test_edit?id='+data.id) |
||||
|
editPhysicalTestDialog.value.setFormData(data) |
||||
|
editPhysicalTestDialog.value.showDialog = true |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除体测 |
||||
|
*/ |
||||
|
const deleteEvent = (id: number) => { |
||||
|
ElMessageBox.confirm(t('physicalTestDeleteTips'), t('warning'), |
||||
|
{ |
||||
|
confirmButtonText: t('confirm'), |
||||
|
cancelButtonText: t('cancel'), |
||||
|
type: 'warning', |
||||
|
} |
||||
|
).then(() => { |
||||
|
deletePhysicalTest(id).then(() => { |
||||
|
loadPhysicalTestList() |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
const resourceIdList = ref([]) |
||||
|
const setResourceIdList = async () => { |
||||
|
resourceIdList.value = await (await getWithCustomerResourcesList({})).data |
||||
|
} |
||||
|
setResourceIdList() |
||||
|
const studentIdList = ref([]) |
||||
|
const setStudentIdList = async () => { |
||||
|
studentIdList.value = await (await getWithStudentList({})).data |
||||
|
} |
||||
|
setStudentIdList() |
||||
|
const coachIdList = ref([]) |
||||
|
const setCoachIdList = async () => { |
||||
|
coachIdList.value = await (await getWithPersonnelList({})).data |
||||
|
} |
||||
|
setCoachIdList() |
||||
|
|
||||
|
const resetForm = (formEl: FormInstance | undefined) => { |
||||
|
if (!formEl) return |
||||
|
formEl.resetFields() |
||||
|
loadPhysicalTestList() |
||||
|
} |
||||
|
|
||||
|
|
||||
|
const setFormData = async (row: any = null) => { |
||||
|
// Object.assign(formData, initialFormData) |
||||
|
physicalTestTable.searchParam.resource_id = row.resource_id |
||||
|
|
||||
|
console.log(physicalTestTable.searchParam.resource_id); |
||||
|
|
||||
|
loadPhysicalTestList() |
||||
|
} |
||||
|
defineExpose({ |
||||
|
showDialog, |
||||
|
setFormData |
||||
|
}) |
||||
|
</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> |
||||
@ -0,0 +1,226 @@ |
|||||
|
<?php |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Niucloud-admin 企业快速开发的多应用管理平台 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | 官方网址:https://www.niucloud.com |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | niucloud团队 版权所有 开源版本可自由商用 |
||||
|
// +---------------------------------------------------------------------- |
||||
|
// | Author: Niucloud Team |
||||
|
// +---------------------------------------------------------------------- |
||||
|
|
||||
|
namespace app\model\class_grade; |
||||
|
|
||||
|
use core\base\BaseModel; |
||||
|
use think\model\concern\SoftDelete; |
||||
|
use think\model\relation\HasMany; |
||||
|
use think\model\relation\HasOne; |
||||
|
|
||||
|
/** |
||||
|
* 班级模型 |
||||
|
* Class Class |
||||
|
* @package app\model\class |
||||
|
*/ |
||||
|
class ClassGrade extends BaseModel |
||||
|
{ |
||||
|
|
||||
|
use SoftDelete; |
||||
|
|
||||
|
/** |
||||
|
* 数据表主键 |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $pk = 'id'; |
||||
|
|
||||
|
/** |
||||
|
* 模型名称 |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $name = 'class'; |
||||
|
|
||||
|
/** |
||||
|
* 定义软删除标记字段. |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $deleteTime = 'deleted_at'; |
||||
|
|
||||
|
/** |
||||
|
* 定义软删除字段的默认值. |
||||
|
* @var int |
||||
|
*/ |
||||
|
protected $defaultSoftDelete = 0; |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:班级班级编号 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchIdAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("id", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:班级校区ID |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchCampusIdAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("campus_id", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:班级校区名称 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchCampusNameAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("campus_name", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:班级班级名称 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchClassNameAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("class_name", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:班级班级主教练 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchHeadCoachAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("head_coach", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:班级班级授课年龄段 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchAgeGroupAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("age_group", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:班级班级类型 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchClassTypeAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("class_type", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:班级班级助教 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchAssistantCoachAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("assistant_coach", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:班级创建时间 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchCreatedAtAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("created_at", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:班级修改时间 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchUpdatedAtAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("updated_at", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:班级逻辑删除时间 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchDeletedAtAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("deleted_at", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:班级班级状态 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchStatusAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("status", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:班级班级排序 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchSortOrderAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("sort_order", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 搜索器:班级班级备注 |
||||
|
* @param $value |
||||
|
* @param $data |
||||
|
*/ |
||||
|
public function searchRemarksAttr($query, $value, $data) |
||||
|
{ |
||||
|
if ($value) { |
||||
|
$query->where("remarks", $value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
Loading…
Reference in new issue