update:拖拽

This commit is contained in:
ltx 2026-06-26 13:35:13 +08:00
parent f7f60c7bbe
commit e4948fa8b5
4 changed files with 49 additions and 13 deletions

2
.env
View File

@ -8,4 +8,4 @@ VITE_OPEN = true
VITE_OPEN_CDN = false VITE_OPEN_CDN = false
# public path 配置线上环境路径(打包)、本地通过 http-server 访问时,请置空即可 # public path 配置线上环境路径(打包)、本地通过 http-server 访问时,请置空即可
VITE_PUBLIC_PATH = 'https://yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com/static/event_web/202606230907/' VITE_PUBLIC_PATH = 'https://yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com/static/event_web/202606251400/'

View File

@ -8,6 +8,7 @@
:tool-button="false" :tool-button="false"
:initParam="initParam" :initParam="initParam"
toolButton toolButton
border
> >
<template #tools> <template #tools>
<el-button v-auth="'event:add'" type="primary" @click="onOpenMenu()"> 新增 </el-button> <el-button v-auth="'event:add'" type="primary" @click="onOpenMenu()"> 新增 </el-button>
@ -301,4 +302,23 @@ const onDeleteMenu = async (id) => {
} }
}; };
</script> </script>
<style scoped lang="scss"></style> <style scoped lang="scss">
// 保留 border(拖拽宽度需要),表头显示竖线作为拖拽提示,数据行隐藏竖线
:deep(.el-table--border) {
// 数据行不显示竖线
td.el-table__cell {
border-right: none !important;
}
// 表头保留竖线,作为可拖拽宽度的视觉提示
th.el-table__cell {
border-right: 1px solid #dcdfe6 !important;
cursor: col-resize;
}
// 隐藏表格右侧外边框线
&::after {
display: none;
}
}
</style>

View File

@ -43,7 +43,7 @@
</div> </div>
</div> </div>
</div> </div>
<ProTable ref="tableRef" :request-api="eventregistrationPagePost" :columns="columns" :pagination="true" <ProTable ref="tableRef" border :request-api="eventregistrationPagePost" :columns="columns" :pagination="true"
:tool-button="false" :initParam="initParam" toolButton preserve-expanded-content :tool-button="false" :initParam="initParam" toolButton preserve-expanded-content
@selectionChange="selection"> @selectionChange="selection">
<template #tools> <template #tools>
@ -74,6 +74,21 @@
{{ scope.row.paymentStatus === 0 ? '未支付' : '已支付' }} {{ scope.row.paymentStatus === 0 ? '未支付' : '已支付' }}
</el-tag> </el-tag>
</template> </template>
<template #unitName="scope">
<span style="white-space: normal; word-break: break-all;">{{ scope.row.unitName || '-' }}</span>
</template>
<template #teamLeaderInfo="scope">
<div v-if="scope.row.teamLeaderInfo">
<div v-for="(item, i) in scope.row.teamLeaderInfo.split(',').filter(s => s.trim())" :key="i">{{ item.trim() }}</div>
</div>
<span v-else>-</span>
</template>
<template #coachInfo="scope">
<div v-if="scope.row.coachInfo">
<div v-for="(item, i) in scope.row.coachInfo.split(',').filter(s => s.trim())" :key="i">{{ item.trim() }}</div>
</div>
<span v-else>-</span>
</template>
<template #paymentProofUrl="scope"> <template #paymentProofUrl="scope">
<PreviewImage v-if="scope.row.paymentProofUrl" :src="scope.row.paymentProofUrl" width="80px" <PreviewImage v-if="scope.row.paymentProofUrl" :src="scope.row.paymentProofUrl" width="80px"
height="80px" fit="cover" radius="4px" :show-zoom-icon="true" /> height="80px" fit="cover" radius="4px" :show-zoom-icon="true" />
@ -548,14 +563,14 @@ const initParamLeader = computed(() => ({
const columns = reactive([ const columns = reactive([
{ {
width: '120px', width: '40px',
prop: 'index', prop: 'index',
label: '序号', label: '序号',
align: 'center', align: 'center',
type: 'selection' type: 'selection'
}, },
{ {
width: '120px', width: '110px',
prop: 'registrationMode', prop: 'registrationMode',
label: '报名方式', label: '报名方式',
search: { search: {
@ -574,9 +589,10 @@ const columns = reactive([
} }
}, },
{ {
width: '120px', width: '200px',
prop: 'unitName', prop: 'unitName',
label: '单位名称', label: '单位名称',
showOverflowTooltip: false,
}, },
{ {
prop: 'totalPersonCount', prop: 'totalPersonCount',
@ -638,26 +654,26 @@ const columns = reactive([
} }
}, },
{ {
width: '150px', prop: 'teamLeaderInfo', label: '领队信息', width: '180px', prop: 'teamLeaderInfo', label: '领队信息',
customRender: ({ text }) => { customRender: ({ text }) => {
return text || '-'; return text || '-';
} }
}, },
{ {
width: '150px', prop: 'coachInfo', label: '教练信息', width: '180px', prop: 'coachInfo', label: '教练信息',
customRender: ({ text }) => { customRender: ({ text }) => {
return text || '-'; return text || '-';
} }
}, },
{ {
width: '120px', prop: 'orderNo', label: '订单信息', width: '180px', prop: 'orderNo', label: '订单信息',
customRender: ({ text }) => { customRender: ({ text }) => {
return text || '-'; return text || '-';
} }
}, },
{ width: '120px', prop: 'paymentProofUrl', label: '付款凭证', }, { width: '120px', prop: 'paymentProofUrl', label: '付款凭证', },
{ {
width: '120px', width: '160px',
prop: 'registrationTime', prop: 'registrationTime',
label: '报名时间', label: '报名时间',
search: { search: {
@ -930,7 +946,7 @@ const columnsScore = ref([
{ prop: 'index', label: '序号', align: 'center', type: 'selection' }, { prop: 'index', label: '序号', align: 'center', type: 'selection' },
{ prop: 'name', label: '姓名', width: '120px', }, { prop: 'name', label: '姓名', width: '120px', },
{ prop: 'score', label: '成绩', width: '120px', }, { prop: 'score', label: '成绩', width: '120px', },
{ prop: 'unitName', label: '单位', width: '180px', }, { prop: 'unitName', label: '单位', width: '200px', },
{ prop: 'rankText', label: '名次', width: '120px', }, { prop: 'rankText', label: '名次', width: '120px', },
{ {
prop: 'gender', prop: 'gender',

View File

@ -30,8 +30,8 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
hmr: true, hmr: true,
proxy: { proxy: {
'/api': { '/api': {
// target: 'https://event.yuedongsports.com', target: 'https://event.yuedongsports.com',
target: 'http://8.153.108.90:9996', // target: 'http://8.153.108.90:9996',
ws: true, ws: true,
changeOrigin: true, changeOrigin: true,
secure: false, //解决target使用https出错问题 secure: false, //解决target使用https出错问题