|
|
|
@ -2,7 +2,7 @@ |
|
|
|
<div class="luckey"> |
|
|
|
<Card> |
|
|
|
<Row class="region-bar"> |
|
|
|
<span class="region-tip">当前校区:<b>{{ regionId || '未识别(请确认账号已绑定校区)' }}</b></span> |
|
|
|
<span class="region-tip" style="margin-right:20px;">当前校区:<b>{{ regionName || '未识别(请确认账号已绑定校区)' }}</b></span> |
|
|
|
<Button type="primary" icon="ios-refresh" @click="reloadActive" :disabled="!regionId">刷新</Button> |
|
|
|
</Row> |
|
|
|
|
|
|
|
@ -179,7 +179,7 @@ |
|
|
|
<!-- 奖池编辑 --> |
|
|
|
<Modal v-model="poolModal" :title="poolForm.id ? '编辑奖池' : '新建奖池'" :mask-closable="false"> |
|
|
|
<Form :label-width="90"> |
|
|
|
<FormItem label="所属校区"><Input v-model="poolForm.regionId" disabled placeholder="自动取自登录校区" /></FormItem> |
|
|
|
<FormItem label="所属校区"><Input v-model="regionName" disabled placeholder="自动取自登录校区" /></FormItem> |
|
|
|
<FormItem label="期号"><Input v-model="poolForm.periodNo" /></FormItem> |
|
|
|
<FormItem label="标题"><Input v-model="poolForm.title" /></FormItem> |
|
|
|
<FormItem label="奖池金额"><InputNumber v-model="poolForm.poolAmount" :min="0" style="width:100%" /></FormItem> |
|
|
|
@ -239,7 +239,7 @@ |
|
|
|
<!-- 任务编辑 --> |
|
|
|
<Modal v-model="taskModal" :title="taskForm.id ? '编辑任务' : '新增任务'" :mask-closable="false"> |
|
|
|
<Form :label-width="90"> |
|
|
|
<FormItem label="所属校区"><Input v-model="taskForm.regionId" disabled placeholder="自动取自登录校区" /></FormItem> |
|
|
|
<FormItem label="所属校区"><Input v-model="regionName" disabled placeholder="自动取自登录校区" /></FormItem> |
|
|
|
<FormItem label="任务编码"> |
|
|
|
<Select v-model="taskForm.code"> |
|
|
|
<Option value="waimai">外卖订单</Option> |
|
|
|
@ -266,7 +266,7 @@ |
|
|
|
<!-- BUFF编辑 --> |
|
|
|
<Modal v-model="buffModal" :title="buffForm.id ? '编辑BUFF' : '新增BUFF'" :mask-closable="false"> |
|
|
|
<Form :label-width="90"> |
|
|
|
<FormItem label="所属校区"><Input v-model="buffForm.regionId" disabled placeholder="自动取自登录校区" /></FormItem> |
|
|
|
<FormItem label="所属校区"><Input v-model="regionName" disabled placeholder="自动取自登录校区" /></FormItem> |
|
|
|
<FormItem label="类型"> |
|
|
|
<Select v-model="buffForm.type"> |
|
|
|
<Option value="double">双倍能量</Option> |
|
|
|
@ -295,7 +295,7 @@ |
|
|
|
<!-- 快讯编辑 --> |
|
|
|
<Modal v-model="newsModal" :title="newsForm.id ? '编辑快讯' : '新增快讯'" :mask-closable="false"> |
|
|
|
<Form :label-width="90"> |
|
|
|
<FormItem label="所属校区"><Input v-model="newsForm.regionId" disabled placeholder="自动取自登录校区" /></FormItem> |
|
|
|
<FormItem label="所属校区"><Input v-model="regionName" disabled placeholder="自动取自登录校区" /></FormItem> |
|
|
|
<FormItem label="类型"> |
|
|
|
<Select v-model="newsForm.type"> |
|
|
|
<Option value="sys">系统</Option> |
|
|
|
@ -322,7 +322,7 @@ |
|
|
|
<!-- 经营配置编辑 --> |
|
|
|
<Modal v-model="operateModal" :title="operateTitle" width="620" :mask-closable="false"> |
|
|
|
<Form :label-width="120"> |
|
|
|
<FormItem label="所属校区"><Input v-model="operateForm.regionId" disabled placeholder="自动取自登录校区" /></FormItem> |
|
|
|
<FormItem label="所属校区"><Input v-model="regionName" disabled placeholder="自动取自登录校区" /></FormItem> |
|
|
|
<FormItem v-for="f in operateFields" :key="f.key" :label="f.label"> |
|
|
|
<i-switch v-if="f.type==='switch'" v-model="operateForm[f.key]" :true-value="1" :false-value="0" /> |
|
|
|
<Select v-else-if="f.type==='select'" v-model="operateForm[f.key]"> |
|
|
|
@ -340,7 +340,7 @@ |
|
|
|
|
|
|
|
<Modal v-model="adventureEventModal" :title="adventureEventForm.id ? '编辑每日宇宙事件' : '新增每日宇宙事件'" :mask-closable="false"> |
|
|
|
<Form :label-width="110"> |
|
|
|
<FormItem label="所属校区"><Input v-model="adventureEventForm.regionId" disabled /></FormItem> |
|
|
|
<FormItem label="所属校区"><Input v-model="regionName" disabled /></FormItem> |
|
|
|
<FormItem label="事件日期"><DatePicker type="date" v-model="adventureEventForm.eventDate" format="yyyy-MM-dd" style="width:100%" /></FormItem> |
|
|
|
<FormItem label="事件类型"> |
|
|
|
<Select v-model="adventureEventForm.eventType"> |
|
|
|
@ -390,6 +390,7 @@ |
|
|
|
return { |
|
|
|
activeTab: 'pool', |
|
|
|
regionId: '', |
|
|
|
regionName:'', |
|
|
|
pool: { loading: false, data: [], total: 0, pageNumber: 1, pageSize: 10 }, |
|
|
|
task: { loading: false, data: [], total: 0, pageNumber: 1, pageSize: 10 }, |
|
|
|
buff: { loading: false, data: [], total: 0, pageNumber: 1, pageSize: 10 }, |
|
|
|
@ -511,7 +512,7 @@ |
|
|
|
return [ |
|
|
|
{ title: '期号', key: 'periodNo', minWidth: 120 }, |
|
|
|
{ title: '标题', key: 'title', minWidth: 120 }, |
|
|
|
{ title: '商圈', key: 'regionId', width: 100 }, |
|
|
|
// { title: '商圈', key: 'regionId', width: 100 }, |
|
|
|
{ title: '奖池金额', key: 'poolAmount', width: 100 }, |
|
|
|
{ title: '开奖时间', key: 'drawTime', minWidth: 160 }, |
|
|
|
{ title: '参与', key: 'joinCount', width: 70 }, |
|
|
|
@ -559,8 +560,8 @@ |
|
|
|
{ title: '名称', key: 'name', minWidth: 120 }, |
|
|
|
{ title: '描述', key: 'description', minWidth: 180 }, |
|
|
|
{ title: '奖励券', key: 'rewardTickets', width: 80 }, |
|
|
|
{ title: '每日上限', key: 'dailyLimit', width: 90 }, |
|
|
|
{ title: '商圈', key: 'regionId', width: 90 }, |
|
|
|
{ title: '每日上限', key: 'dailyLimit', minWidth: 90 }, |
|
|
|
// { title: '商圈', key: 'regionId', width: 90 }, |
|
|
|
{ title: '启用', minWidth: 70, render: (h, p) => h('Tag', { props: { color: p.row.enabled === 1 ? 'green' : 'default' } }, p.row.enabled === 1 ? '是' : '否') }, |
|
|
|
{ |
|
|
|
title: '操作', width: 150, align: 'center', render: (h, params) => { |
|
|
|
@ -578,7 +579,7 @@ |
|
|
|
{ title: '名称', key: 'name', minWidth: 120 }, |
|
|
|
{ title: '描述', key: 'description', minWidth: 180 }, |
|
|
|
{ title: '消耗券', key: 'costTickets', width: 80 }, |
|
|
|
{ title: '时长(h)', key: 'durationHours', width: 80 }, |
|
|
|
{ title: '时长(h)', key: 'durationHours', minWidth: 80 }, |
|
|
|
{ title: '效果值', key: 'effectValue', width: 80 }, |
|
|
|
{ title: '启用', minWidth: 70, render: (h, p) => h('Tag', { props: { color: p.row.enabled === 1 ? 'green' : 'default' } }, p.row.enabled === 1 ? '是' : '否') }, |
|
|
|
{ |
|
|
|
@ -595,7 +596,7 @@ |
|
|
|
return [ |
|
|
|
{ title: '类型', key: 'type', width: 90 }, |
|
|
|
{ title: '内容', key: 'content', minWidth: 260 }, |
|
|
|
{ title: '商圈', key: 'regionId', minWidth: 90 }, |
|
|
|
// { title: '商圈', key: 'regionId', minWidth: 90 }, |
|
|
|
{ title: '置顶', width: 70, render: (h, p) => h('span', p.row.isTop === 1 ? '是' : '否') }, |
|
|
|
{ title: '展示', width: 70, render: (h, p) => h('span', p.row.enabled === 1 ? '是' : '否') }, |
|
|
|
{ title: '时间', key: 'createTime', minWidth: 160 }, |
|
|
|
@ -613,7 +614,7 @@ |
|
|
|
return [ |
|
|
|
{ title: '用户id', key: 'userId', minWidth: 120 }, |
|
|
|
{ title: '昵称', key: 'nickname', minWidth: 120 }, |
|
|
|
{ title: '商圈', key: 'regionId', minWidth: 100 }, |
|
|
|
// { title: '商圈', key: 'regionId', minWidth: 100 }, |
|
|
|
{ title: '当前券', key: 'ticketCount', width: 90 }, |
|
|
|
{ title: '累计券', key: 'totalTicket', width: 90 }, |
|
|
|
{ title: '连续签到', key: 'consecutiveSignDays', minWidth: 90 }, |
|
|
|
@ -634,7 +635,7 @@ |
|
|
|
drawColumns() { |
|
|
|
return [ |
|
|
|
{ title: '期号', key: 'periodNo', minWidth: 130 }, |
|
|
|
{ title: '商圈', key: 'regionId', minWidth: 100 }, |
|
|
|
// { title: '商圈', key: 'regionId', minWidth: 100 }, |
|
|
|
{ title: '奖池金额', key: 'poolAmount', minWidth: 100 }, |
|
|
|
{ title: '参与人数', key: 'joinCount', minWidth: 90 }, |
|
|
|
{ title: '券总数', key: 'ticketTotal', minWidth: 90 }, |
|
|
|
@ -657,7 +658,7 @@ |
|
|
|
{ title: '周期(h)', key: 'cycleHours', width: 90 }, |
|
|
|
{ title: '收益率', key: 'rate', width: 90 }, |
|
|
|
{ title: '投入范围', minWidth: 140, render: (h, p) => h('span', `${p.row.minInvest || 0} - ${p.row.maxInvest || '不限'}`) }, |
|
|
|
{ title: '单次收益上限', key: 'maxProfit', width: 120 }, |
|
|
|
{ title: '单次收益上限', key: 'maxProfit', minWidth: 120 }, |
|
|
|
{ title: '日收益上限', key: 'dailyProfitLimit', width: 110 }, |
|
|
|
{ title: '启用', minWidth: 70, render: (h, p) => this.enabledTag(h, p.row.enabled) }, |
|
|
|
this.operateActionColumn('tree') |
|
|
|
@ -685,11 +686,11 @@ |
|
|
|
}, |
|
|
|
searchColumns() { |
|
|
|
return [ |
|
|
|
{ title: '每日次数', key: 'dailyLimit', width: 90 }, |
|
|
|
{ title: '体力消耗', key: 'staminaCost', width: 90 }, |
|
|
|
{ title: '每日次数', key: 'dailyLimit', minWidth: 90 }, |
|
|
|
{ title: '体力消耗', key: 'staminaCost', minWidth: 90 }, |
|
|
|
{ title: '获得范围', minWidth: 120, render: (h, p) => h('span', `${p.row.minGain || 0} - ${p.row.maxGain || 0}`) }, |
|
|
|
{ title: '目标比例', key: 'targetBalanceRate', width: 90 }, |
|
|
|
{ title: '日获得上限', key: 'dailyGainLimit', width: 110 }, |
|
|
|
{ title: '目标比例', key: 'targetBalanceRate', minWidth: 90 }, |
|
|
|
{ title: '日获得上限', key: 'dailyGainLimit', minWidth: 110 }, |
|
|
|
{ title: '启用', minWidth: 70, render: (h, p) => this.enabledTag(h, p.row.enabled) }, |
|
|
|
this.operateActionColumn('search') |
|
|
|
] |
|
|
|
@ -783,6 +784,7 @@ |
|
|
|
mounted() { |
|
|
|
// 后台按登录代理商所属校区隔离:regionId 取自登录用户的 departmentId,不允许手动输入 |
|
|
|
this.regionId = this.resolveRegionId() |
|
|
|
this.regionName = JSON.parse(this.getStore('user')).departmentTitle |
|
|
|
if (this.regionId) { |
|
|
|
this.loadPool() |
|
|
|
} else { |
|
|
|
|