Browse Source

处理bug

master
前端-胡立永 8 months ago
parent
commit
e3452ce4dc
48 changed files with 1525 additions and 3816 deletions
  1. +361
    -0
      RuoYi-Vue-Plus-SpringAI技术方案.txt
  2. +358
    -0
      admin-pc/src/views/book/check/achievement.vue
  3. +309
    -0
      admin-pc/src/views/book/check/chapter.vue
  4. +43
    -33
      admin-pc/src/views/book/check/modules/AchievementForm.vue
  5. +5
    -5
      admin-pc/src/views/book/check/modules/AchievementModal.vue
  6. +45
    -41
      admin-pc/src/views/book/check/modules/CommonBookNovelForm.vue
  7. +4
    -4
      admin-pc/src/views/book/check/modules/CommonBookNovelModal.Style#Drawer.vue
  8. +0
    -0
      admin-pc/src/views/book/check/modules/TencentMapPicker.vue
  9. +0
    -383
      admin-pc/src/views/popularizeActivity/PopularizeActivityList.vue
  10. +0
    -255
      admin-pc/src/views/popularizeActivity/modules/PopularizeActivityForm.vue
  11. +0
    -84
      admin-pc/src/views/popularizeActivity/modules/PopularizeActivityModal.Style#Drawer.vue
  12. +0
    -60
      admin-pc/src/views/popularizeActivity/modules/PopularizeActivityModal.vue
  13. +0
    -267
      admin-pc/src/views/popularizeAuthentication/PopularizeAuthenticationList.vue
  14. +0
    -84
      admin-pc/src/views/popularizeAuthentication/modules/PopularizeAuthenticationModal.Style#Drawer.vue
  15. +0
    -60
      admin-pc/src/views/popularizeAuthentication/modules/PopularizeAuthenticationModal.vue
  16. +0
    -359
      admin-pc/src/views/popularizeOrder/PopularizeOrderList.vue
  17. +0
    -211
      admin-pc/src/views/popularizeOrder/modules/PopularizeOrderForm.vue
  18. +0
    -339
      admin-pc/src/views/popularizeRecruit/PopularizeRecruitList.vue
  19. +0
    -174
      admin-pc/src/views/popularizeRecruit/modules/PopularizeRecruitForm.vue
  20. +0
    -84
      admin-pc/src/views/popularizeRecruit/modules/PopularizeRecruitModal.Style#Drawer.vue
  21. +0
    -60
      admin-pc/src/views/popularizeRecruit/modules/PopularizeRecruitModal.vue
  22. +0
    -246
      admin-pc/src/views/popularizeRecruitLog/PopularizeRecruitLogList.vue
  23. +0
    -84
      admin-pc/src/views/popularizeRecruitLog/modules/PopularizeRecruitLogModal.Style#Drawer.vue
  24. +0
    -60
      admin-pc/src/views/popularizeRecruitLog/modules/PopularizeRecruitLogModal.vue
  25. +0
    -327
      admin-pc/src/views/popularizeTravel/PopularizeTravelList.vue
  26. +0
    -227
      admin-pc/src/views/popularizeTravel/modules/PopularizeTravelForm.vue
  27. +0
    -84
      admin-pc/src/views/popularizeTravel/modules/PopularizeTravelModal.Style#Drawer.vue
  28. +3
    -1
      module-base/base-core/src/main/java/org/jeecg/common/aspect/DictAspect.java
  29. +2
    -2
      module-common/src/main/java/org/jeecg/api/controller/AppletLoginController.java
  30. +0
    -4
      module-common/src/main/java/org/jeecg/api/controller/AppletMyBookController.java
  31. +4
    -0
      module-common/src/main/java/org/jeecg/api/service/AppletAchievementService.java
  32. +1
    -1
      module-common/src/main/java/org/jeecg/api/service/AppletLoginService.java
  33. +0
    -1
      module-common/src/main/java/org/jeecg/api/service/AppletOrderService.java
  34. +52
    -32
      module-common/src/main/java/org/jeecg/api/service/impl/AppletAchievementServiceImpl.java
  35. +19
    -11
      module-common/src/main/java/org/jeecg/api/service/impl/AppletIndexServiceImpl.java
  36. +4
    -3
      module-common/src/main/java/org/jeecg/api/service/impl/AppletLoginServiceImpl.java
  37. +2
    -1
      module-common/src/main/java/org/jeecg/api/service/impl/AppletMyBookServiceImpl.java
  38. +13
    -2
      module-common/src/main/java/org/jeecg/api/service/impl/AppletOrderServiceImpl.java
  39. +0
    -213
      module-common/src/main/java/org/jeecg/common/sms/JAVA8_COMPATIBILITY.md
  40. +24
    -0
      module-common/src/main/java/org/jeecg/modules/commonBookAchievement/controller/CommonBookAchievementController.java
  41. +127
    -0
      module-common/src/main/java/org/jeecg/modules/commonBookAchievementLog/controller/CommonBookAchievementLogController.java
  42. +2
    -1
      module-common/src/main/java/org/jeecg/modules/commonBookAchievementLog/entity/CommonBookAchievementLog.java
  43. +121
    -0
      module-common/src/main/java/org/jeecg/modules/commonBookNovel/controller/CommonBookNovelController.java
  44. +6
    -0
      module-common/src/main/java/org/jeecg/modules/commonBookNovel/entity/CommonBookNovel.java
  45. +2
    -0
      module-common/src/main/java/org/jeecg/modules/commonRanking/entity/CommonRanking.java
  46. +2
    -2
      module-common/src/main/java/org/jeecg/modules/commonRanking/service/ICommonRankingService.java
  47. +13
    -8
      module-common/src/main/java/org/jeecg/modules/commonRanking/service/impl/CommonRankingServiceImpl.java
  48. +3
    -3
      module-common/src/main/java/org/jeecg/modules/commonShop/entity/CommonShop.java

+ 361
- 0
RuoYi-Vue-Plus-SpringAI技术方案.txt View File

@ -0,0 +1,361 @@
RuoYi-Vue-Plus + Spring AI 技术方案
==========================================
1. 项目概述
==========================================
1.1 项目背景
- 基于RuoYi-Vue-Plus框架构建企业级管理系统
- 集成Spring AI提供智能化功能
- 支持AI对话、智能分析、自动化处理等能力
1.2 技术栈
前端技术栈:
- Vue 3 + TypeScript
- Ant Design Vue
- Vite构建工具
- Pinia状态管理
- Vue Router路由管理
后端技术栈:
- Spring Boot 3.x
- Spring AI 0.8.x
- MyBatis Plus
- Redis缓存
- MySQL数据库
- Spring Security安全框架
==========================================
2. 系统架构设计
==========================================
2.1 整体架构
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ 前端层 │ │ 网关层 │ │ 服务层 │
│ Vue3 + TS │───▶│ Gateway │───▶│ Spring Boot │
│ Ant Design │ │ 统一入口 │ │ Spring AI │
└─────────────────┘ └─────────────────┘ └─────────────────┘
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ 数据层 │ │ 缓存层 │ │ AI服务层 │
│ MySQL │◀───│ Redis │◀───│ Spring AI │
│ 主从分离 │ │ 分布式缓存 │ │ OpenAI API │
└─────────────────┘ └─────────────────┘ └─────────────────┘
2.2 模块划分
- admin-pc: 管理后台前端
- module-system: 系统管理模块
- module-common: 公共模块
- module-pay: 支付模块
- module-base: 基础模块
==========================================
3. Spring AI集成方案
==========================================
3.1 依赖配置
```xml
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-openai-spring-boot-starter</artifactId>
<version>0.8.0</version>
</dependency>
```
3.2 配置文件
```yaml
spring:
ai:
openai:
api-key: ${OPENAI_API_KEY}
base-url: https://api.openai.com/v1
chat:
options:
model: gpt-3.5-turbo
temperature: 0.7
max-tokens: 1000
```
3.3 AI服务层设计
```java
@Service
public class AIService {
@Autowired
private OpenAiChatClient chatClient;
// 智能对话
public String chat(String message) {
return chatClient.call(message);
}
// 智能分析
public AnalysisResult analyzeData(String data) {
// AI数据分析逻辑
}
// 智能推荐
public List<Recommendation> getRecommendations(String context) {
// AI推荐逻辑
}
}
```
==========================================
4. 功能模块设计
==========================================
4.1 智能对话模块
- 集成ChatGPT API
- 支持上下文对话
- 对话历史记录
- 多语言支持
4.2 智能分析模块
- 数据趋势分析
- 异常检测
- 预测分析
- 可视化展示
4.3 智能推荐模块
- 个性化推荐
- 内容推荐
- 用户行为分析
- 推荐算法优化
4.4 自动化处理模块
- 智能审批流程
- 自动分类
- 智能标签
- 自动化报告
==========================================
5. 数据库设计
==========================================
5.1 核心表结构
```sql
-- AI对话记录表
CREATE TABLE ai_chat_record (
id BIGINT PRIMARY KEY AUTO_INCREMENT,
user_id BIGINT NOT NULL,
session_id VARCHAR(64),
message TEXT NOT NULL,
response TEXT,
model VARCHAR(50),
tokens_used INT,
create_time DATETIME,
INDEX idx_user_id (user_id),
INDEX idx_session_id (session_id)
);
-- AI分析结果表
CREATE TABLE ai_analysis_result (
id BIGINT PRIMARY KEY AUTO_INCREMENT,
analysis_type VARCHAR(50),
data_source VARCHAR(100),
result_data JSON,
confidence DECIMAL(5,2),
create_time DATETIME,
INDEX idx_analysis_type (analysis_type)
);
-- 智能推荐表
CREATE TABLE ai_recommendation (
id BIGINT PRIMARY KEY AUTO_INCREMENT,
user_id BIGINT,
item_type VARCHAR(50),
item_id BIGINT,
score DECIMAL(5,2),
reason TEXT,
create_time DATETIME,
INDEX idx_user_id (user_id),
INDEX idx_item_type (item_type)
);
```
==========================================
6. 前端界面设计
==========================================
6.1 智能对话界面
- 聊天窗口设计
- 消息气泡样式
- 输入框和发送按钮
- 历史记录展示
6.2 数据分析面板
- 图表展示区域
- 筛选条件设置
- 实时数据更新
- 导出功能
6.3 推荐展示页面
- 推荐卡片布局
- 个性化展示
- 交互反馈
- 推荐理由说明
==========================================
7. 安全设计
==========================================
7.1 API安全
- API密钥管理
- 请求频率限制
- 数据加密传输
- 访问权限控制
7.2 数据安全
- 敏感数据脱敏
- 数据备份策略
- 审计日志记录
- 隐私保护措施
==========================================
8. 性能优化
==========================================
8.1 缓存策略
- Redis缓存热点数据
- 本地缓存AI模型
- 缓存更新策略
- 缓存穿透防护
8.2 并发处理
- 异步处理AI请求
- 线程池配置
- 负载均衡
- 限流措施
==========================================
9. 部署方案
==========================================
9.1 开发环境
- Docker容器化
- 本地开发环境
- 热部署配置
- 调试工具集成
9.2 生产环境
- 云服务器部署
- 负载均衡配置
- 监控告警
- 日志管理
==========================================
10. 测试策略
==========================================
10.1 单元测试
- 服务层测试
- 控制器测试
- 数据访问层测试
- AI功能测试
10.2 集成测试
- API接口测试
- 前后端联调
- 性能压力测试
- 安全测试
==========================================
11. 运维监控
==========================================
11.1 系统监控
- 服务器监控
- 应用性能监控
- 数据库监控
- 网络监控
11.2 日志管理
- 统一日志格式
- 日志收集分析
- 错误告警
- 日志归档
==========================================
12. 项目计划
==========================================
12.1 开发阶段
第一阶段(2周):基础框架搭建
- RuoYi-Vue-Plus环境搭建
- Spring AI集成
- 基础功能开发
第二阶段(3周):核心功能开发
- 智能对话模块
- 数据分析功能
- 推荐系统开发
第三阶段(2周):优化测试
- 性能优化
- 功能测试
- 安全加固
第四阶段(1周):部署上线
- 生产环境部署
- 监控配置
- 文档完善
12.2 里程碑
- M1: 基础框架完成
- M2: 核心功能完成
- M3: 测试通过
- M4: 正式上线
==========================================
13. 风险评估
==========================================
13.1 技术风险
- AI API稳定性
- 性能瓶颈
- 数据安全
- 技术债务
13.2 应对措施
- 多AI服务商备选
- 性能监控优化
- 安全审计加固
- 代码重构优化
==========================================
14. 成本估算
==========================================
14.1 开发成本
- 人力成本:8人月
- 服务器成本:月均2000元
- AI API成本:月均1000元
- 其他成本:5000元
14.2 运维成本
- 服务器运维:月均1000元
- 监控服务:月均500元
- 备份存储:月均300元
==========================================
15. 总结
==========================================
本技术方案基于RuoYi-Vue-Plus框架,集成Spring AI提供智能化功能,通过合理的架构设计、安全措施和性能优化,构建一个功能完善、安全可靠的企业级管理系统。
主要优势:
1. 成熟稳定的基础框架
2. 强大的AI能力集成
3. 完善的权限管理
4. 良好的扩展性
5. 丰富的功能模块
通过本方案的实施,可以快速构建一个具有AI能力的现代化管理系统,提升用户体验和业务效率。
==========================================
文档版本:v1.0
创建时间:2025年1月
更新记录:
- v1.0: 初始版本
==========================================

+ 358
- 0
admin-pc/src/views/book/check/achievement.vue View File

@ -0,0 +1,358 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="关联用户">
<j-search-select-tag placeholder="请选择用户" v-model="queryParam.userId" dict="han_hai_member,nick_name,id"/>
</a-form-item>
</a-col>
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="关联书籍">
<j-search-select-tag placeholder="请选择书籍" v-model="queryParam.bookId" dict="common_shop,name,id"/>
</a-form-item>
</a-col> -->
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="审核状态">
<j-dict-select-tag placeholder="请选择审核状态" v-model="queryParam.status" dictCode="achievement_log_status"/>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="一级成就名称">
<a-input placeholder="请输入一级成就名称" v-model="queryParam.oneName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="二级成就名称">
<a-input placeholder="请输入二级成就名称" v-model="queryParam.twoName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="三级成就名称">
<a-input placeholder="请输入三级成就名称" v-model="queryParam.threeName"></a-input>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('成就设置日志审核表')">导出</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="2" @click="batchApprove"><a-icon type="check"/>批量通过</a-menu-item>
<a-menu-item key="3" @click="batchReject"><a-icon type="close"/>批量拒绝</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a @click="handleApprove(record)" v-if="record.status === '0'">通过</a>
<a-divider type="vertical" v-if="record.status === '0'" />
<a @click="handleReject(record)" v-if="record.status === '0'">拒绝</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<achievement-modal ref="modalForm" @ok="modalFormOk"></achievement-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import AchievementModal from './modules/AchievementModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'AchievementCheckList',
mixins:[JeecgListMixin, mixinDevice],
components: {
AchievementModal
},
data () {
return {
description: '成就设置日志审核管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'创建人',
align:"center",
dataIndex: 'createBy'
},
{
title:'创建日期',
align:"center",
sorter: true,
dataIndex: 'createTime'
},
{
title:'关联用户',
align:"center",
dataIndex: 'userId_dictText'
},
// {
// title:'',
// align:"center",
// dataIndex: 'bookId_dictText'
// },
{
title:'一级成就名称',
align:"center",
dataIndex: 'oneName'
},
{
title:'一级达成人数',
align:"center",
dataIndex: 'oneNum'
},
{
title:'二级成就名称',
align:"center",
dataIndex: 'twoName'
},
{
title:'二级达成人数',
align:"center",
dataIndex: 'twoNum'
},
{
title:'三级成就名称',
align:"center",
dataIndex: 'threeName'
},
{
title:'三级达成人数',
align:"center",
dataIndex: 'threeNum'
},
{
title:'审核状态',
align:"center",
dataIndex: 'status',
customRender: (text) => {
if (text === '0') return '待审核';
if (text === '1') return '已通过';
if (text === '2') return '已拒绝';
return text;
}
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/commonBookAchievementLog/commonBookAchievementLog/listState",
delete: "/commonBookAchievementLog/commonBookAchievementLog/delete",
deleteBatch: "/commonBookAchievementLog/commonBookAchievementLog/deleteBatch",
exportXlsUrl: "/commonBookAchievementLog/commonBookAchievementLog/exportXls",
importExcelUrl: "commonBookAchievementLog/commonBookAchievementLog/importExcel",
approve: "/commonBookAchievementLog/commonBookAchievementLog/approve",
reject: "/commonBookAchievementLog/commonBookAchievementLog/reject",
batchApprove: "/commonBookAchievementLog/commonBookAchievementLog/batchApprove",
batchReject: "/commonBookAchievementLog/commonBookAchievementLog/batchReject",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
handleApprove(record) {
this.$confirm({
title: '确认通过',
content: '确定通过该成就设置日志审核吗?',
onOk: () => {
this.$http.post(this.url.approve, {id: record.id}).then((res) => {
if (res.success) {
this.$message.success('审核通过成功');
this.loadData();
} else {
this.$message.error(res.message || '操作失败');
}
});
}
});
},
handleReject(record) {
this.$confirm({
title: '确认拒绝',
content: '确定拒绝该成就设置日志审核吗?',
onOk: () => {
this.$http.post(this.url.reject, {id: record.id}).then((res) => {
if (res.success) {
this.$message.success('审核拒绝成功');
this.loadData();
} else {
this.$message.error(res.message || '操作失败');
}
});
}
});
},
batchApprove() {
if (this.selectedRowKeys.length === 0) {
this.$message.warning('请选择要审核的成就设置日志');
return;
}
this.$confirm({
title: '批量通过',
content: `确定通过选中的 ${this.selectedRowKeys.length} 个成就设置日志审核吗?`,
onOk: () => {
this.$http.post(this.url.batchApprove, {ids: this.selectedRowKeys}).then((res) => {
if (res.success) {
this.$message.success('批量审核通过成功');
this.onClearSelected();
this.loadData();
} else {
this.$message.error(res.message || '操作失败');
}
});
}
});
},
batchReject() {
if (this.selectedRowKeys.length === 0) {
this.$message.warning('请选择要审核的成就设置日志');
return;
}
this.$confirm({
title: '批量拒绝',
content: `确定拒绝选中的 ${this.selectedRowKeys.length} 个成就设置日志审核吗?`,
onOk: () => {
this.$http.post(this.url.batchReject, {ids: this.selectedRowKeys}).then((res) => {
if (res.success) {
this.$message.success('批量审核拒绝成功');
this.onClearSelected();
this.loadData();
} else {
this.$message.error(res.message || '操作失败');
}
});
}
});
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''})
fieldList.push({type:'datetime',value:'createTime',text:'创建日期'})
fieldList.push({type:'sel_search',value:'userId',text:'关联用户',dictTable:"han_hai_member", dictText:'nick_name', dictCode:'id'})
fieldList.push({type:'sel_search',value:'bookId',text:'关联书籍',dictTable:"common_shop", dictText:'name', dictCode:'id'})
fieldList.push({type:'string',value:'status',text:'审核状态',dictCode:'achievement_log_status'})
fieldList.push({type:'string',value:'oneName',text:'一级成就名称',dictCode:''})
fieldList.push({type:'int',value:'oneNum',text:'一级达成人数',dictCode:''})
fieldList.push({type:'string',value:'twoName',text:'二级成就名称',dictCode:''})
fieldList.push({type:'int',value:'twoNum',text:'二级达成人数',dictCode:''})
fieldList.push({type:'string',value:'threeName',text:'三级成就名称',dictCode:''})
fieldList.push({type:'int',value:'threeNum',text:'三级达成人数',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 309
- 0
admin-pc/src/views/book/check/chapter.vue View File

@ -0,0 +1,309 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="用户">
<j-search-select-tag placeholder="请选择用户" v-model="queryParam.userId" dict="han_hai_member,nick_name,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="书籍">
<j-search-select-tag placeholder="请选择书籍" v-model="queryParam.bookId" dict="common_shop,name,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('章节审核表')">导出</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="2" @click="batchApprove"><a-icon type="check"/>批量通过</a-menu-item>
<a-menu-item key="3" @click="batchReject"><a-icon type="close"/>批量拒绝</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a @click="handleApprove(record)">通过</a>
<a-divider type="vertical" />
<a @click="handleReject(record)">拒绝</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<common-book-novel-modal ref="modalForm" @ok="modalFormOk"></common-book-novel-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import CommonBookNovelModal from './modules/CommonBookNovelModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'ChapterCheckList',
mixins:[JeecgListMixin, mixinDevice],
components: {
CommonBookNovelModal
},
data () {
return {
description: '章节审核管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'用户标识',
align:"center",
dataIndex: 'userId_dictText'
},
{
title:'所属小说',
align:"center",
dataIndex: 'bookId_dictText'
},
{
title:'章节名称',
align:"center",
dataIndex: 'title'
},
{
title:'章节状态',
align:"center",
dataIndex: 'status_dictText'
},
{
title:'字数',
align:"center",
dataIndex: 'num'
},
{
title:'是否付费章节',
align:"center",
dataIndex: 'isPay',
customRender: (text) => (text ? filterMultiDictText(this.dictOptions['isPay'], text) : ''),
},
{
title:'审核状态',
align:"center",
dataIndex: 'state',
customRender: (text) => {
if (text === 0) return '待审核';
if (text === 1) return '已通过';
if (text === 2) return '已拒绝';
return text;
}
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/commonBookNovel/commonBookNovel/listState",
delete: "/commonBookNovel/commonBookNovel/delete",
deleteBatch: "/commonBookNovel/commonBookNovel/deleteBatch",
exportXlsUrl: "/commonBookNovel/commonBookNovel/exportXls",
importExcelUrl: "commonBookNovel/commonBookNovel/importExcel",
approve: "/commonBookNovel/commonBookNovel/approve",
reject: "/commonBookNovel/commonBookNovel/reject",
batchApprove: "/commonBookNovel/commonBookNovel/batchApprove",
batchReject: "/commonBookNovel/commonBookNovel/batchReject",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.$set(this.dictOptions, 'isPay', [{text:'是',value:'Y'},{text:'否',value:'N'}])
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
handleApprove(record) {
this.$confirm({
title: '确认通过',
content: '确定通过该章节审核吗?',
onOk: () => {
this.$http.post(this.url.approve, {id: record.id}).then((res) => {
if (res.success) {
this.$message.success('审核通过成功');
this.loadData();
} else {
this.$message.error(res.message || '操作失败');
}
});
}
});
},
handleReject(record) {
this.$confirm({
title: '确认拒绝',
content: '确定拒绝该章节审核吗?',
onOk: () => {
this.$http.post(this.url.reject, {id: record.id}).then((res) => {
if (res.success) {
this.$message.success('审核拒绝成功');
this.loadData();
} else {
this.$message.error(res.message || '操作失败');
}
});
}
});
},
batchApprove() {
if (this.selectedRowKeys.length === 0) {
this.$message.warning('请选择要审核的章节');
return;
}
this.$confirm({
title: '批量通过',
content: `确定通过选中的 ${this.selectedRowKeys.length} 个章节审核吗?`,
onOk: () => {
this.$http.post(this.url.batchApprove, {ids: this.selectedRowKeys}).then((res) => {
if (res.success) {
this.$message.success('批量审核通过成功');
this.onClearSelected();
this.loadData();
} else {
this.$message.error(res.message || '操作失败');
}
});
}
});
},
batchReject() {
if (this.selectedRowKeys.length === 0) {
this.$message.warning('请选择要审核的章节');
return;
}
this.$confirm({
title: '批量拒绝',
content: `确定拒绝选中的 ${this.selectedRowKeys.length} 个章节审核吗?`,
onOk: () => {
this.$http.post(this.url.batchReject, {ids: this.selectedRowKeys}).then((res) => {
if (res.success) {
this.$message.success('批量审核拒绝成功');
this.onClearSelected();
this.loadData();
} else {
this.$message.error(res.message || '操作失败');
}
});
}
});
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'userId',text:'用户标识',dictCode:''})
fieldList.push({type:'string',value:'bookId',text:'所属小说',dictCode:''})
fieldList.push({type:'string',value:'title',text:'章节名称',dictCode:''})
fieldList.push({type:'int',value:'status',text:'章节状态',dictCode:''})
fieldList.push({type:'string',value:'details',text:'章节内容',dictCode:''})
fieldList.push({type:'int',value:'num',text:'字数',dictCode:''})
fieldList.push({type:'switch',value:'isPay',text:'是否付费章节'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

admin-pc/src/views/popularizeRecruitLog/modules/PopularizeRecruitLogForm.vue → admin-pc/src/views/book/check/modules/AchievementForm.vue View File

@ -4,38 +4,48 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="用户信息" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<j-search-select-tag v-model="model.userId" dict="han_hai_member,nick_name,id" disabled/>
<a-form-model-item label="关联用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<j-search-select-tag v-model="model.userId" dict="han_hai_member,nick_name,id" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
<a-input v-model="model.name" placeholder="请输入姓名" disabled></a-input>
<a-form-model-item label="关联书籍" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bookId">
<j-search-select-tag v-model="model.bookId" dict="common_shop,name,id" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
<a-input v-model="model.phone" placeholder="请输入电话" disabled ></a-input>
<a-form-model-item label="一级成就名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="oneName">
<a-input v-model="model.oneName" placeholder="请输入一级成就名称" disabled></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="头像" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="headImage">
<j-image-upload isMultiple v-model="model.headImage" disabled></j-image-upload>
<a-form-model-item label="一级达成人数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="oneNum">
<a-input-number v-model="model.oneNum" placeholder="请输入一级达成人数" style="width: 100%" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="招募项目" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="recruitId">
<j-search-select-tag v-model="model.recruitId" dict="popularize_recruit,title,id" disabled/>
<a-form-model-item label="二级成就名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="twoName">
<a-input v-model="model.twoName" placeholder="请输入二级成就名称" disabled></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="项目时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="recruitTime">
<j-date placeholder="请选择项目时间" v-model="model.recruitTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" disabled/>
<a-form-model-item label="二级达成人数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="twoNum">
<a-input-number v-model="model.twoNum" placeholder="请输入二级达成人数" style="width: 100%" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="审核状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="state">
<j-dict-select-tag type="list" v-model="model.state" dictCode="recruit_state" placeholder="请选择审核状态" />
<a-form-model-item label="三级成就名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="threeName">
<a-input v-model="model.threeName" placeholder="请输入三级成就名称" disabled></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="三级达成人数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="threeNum">
<a-input-number v-model="model.threeNum" placeholder="请输入三级达成人数" style="width: 100%" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="审核状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
<j-dict-select-tag type="list" v-model="model.status" dictCode="achievement_log_status" placeholder="请选择审核状态" />
</a-form-model-item>
</a-col>
</a-row>
@ -50,21 +60,12 @@
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'PopularizeRecruitLogForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
name: 'AchievementForm',
data () {
return {
model:{
},
status: '0'
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
@ -75,21 +76,29 @@
},
confirmLoading: false,
validatorRules: {
status: [
{ required: true, message: '请选择审核状态!' }
]
},
url: {
add: "/popularizeRecruitLog/popularizeRecruitLog/add",
edit: "/popularizeRecruitLog/popularizeRecruitLog/edit",
queryById: "/popularizeRecruitLog/popularizeRecruitLog/queryById"
add: "/commonBookAchievementLog/commonBookAchievementLog/add",
edit: "/commonBookAchievementLog/commonBookAchievementLog/edit",
queryById: "/commonBookAchievementLog/commonBookAchievementLog/queryById"
}
}
},
props: {
disabled: {
default: false
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
@ -109,11 +118,13 @@
let httpurl = '';
let method = '';
if(!this.model.id){
//
httpurl+=this.url.add;
method = 'post';
}else{
//
httpurl+=this.url.edit;
method = 'put';
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
@ -126,9 +137,8 @@
that.confirmLoading = false;
})
}
})
},
}
}
</script>
</script>

admin-pc/src/views/popularizeOrder/modules/PopularizeOrderModal.vue → admin-pc/src/views/book/check/modules/AchievementModal.vue View File

@ -8,17 +8,17 @@
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<popularize-order-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></popularize-order-form>
<achievement-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></achievement-form>
</j-modal>
</template>
<script>
import PopularizeOrderForm from './PopularizeOrderForm'
import AchievementForm from './AchievementForm'
export default {
name: 'PopularizeOrderModal',
name: 'AchievementModal',
components: {
PopularizeOrderForm
AchievementForm
},
data () {
return {
@ -57,4 +57,4 @@
}
}
}
</script>
</script>

admin-pc/src/views/popularizeAuthentication/modules/PopularizeAuthenticationForm.vue → admin-pc/src/views/book/check/modules/CommonBookNovelForm.vue View File

@ -4,48 +4,43 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="state">
<j-dict-select-tag type="list" v-model="model.state" dictCode="no_state_type" placeholder="请选择状态" />
<a-form-model-item label="作者" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<j-search-select-tag v-model="model.userId" dict="han_hai_member,nick_name,id"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
<a-input v-model="model.name" placeholder="请输入姓名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
<a-input v-model="model.phone" placeholder="请输入电话" ></a-input>
<!-- <a-col :span="24">
<a-form-model-item label="所属小说" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bookId">
<j-search-select-tag v-model="model.bookId" dict="common_shop,name,id"/>
</a-form-model-item>
</a-col>
</a-col> -->
<a-col :span="24">
<a-form-model-item label="身份证" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cardNo">
<a-input v-model="model.cardNo" placeholder="请输入身份证" ></a-input>
<a-form-model-item label="章节名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="title">
<a-input v-model="model.title" placeholder="请输入章节名称"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="简历附件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="image">
<j-upload v-model="model.image" ></j-upload>
<a-form-model-item label="章节状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
<j-dict-select-tag type="list" v-model="model.status" dictCode="book_status" placeholder="请选择章节状态"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<j-search-select-tag v-model="model.userId" dict="han_hai_member,nick_name,id" />
<a-form-model-item label="章节内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="details">
<a-textarea v-model="model.details" placeholder="请输入章节内容" :rows="10"></a-textarea>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="微信二维码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="img">
<j-image-upload isMultiple v-model="model.img" ></j-image-upload>
<a-form-model-item label="字数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
<a-input-number v-model="model.num" placeholder="请输入字数" style="width: 100%"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="主理人分数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
<a-input-number v-model="model.num" placeholder="请输入主理人分数" style="width: 100%" />
<a-form-model-item label="是否付费章节" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isPay">
<j-dict-select-tag type="list" v-model="model.isPay" dictCode="yn" placeholder="请选择是否付费章节"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="images">
<j-image-upload isMultiple v-model="model.images" ></j-image-upload>
<a-form-model-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sort">
<a-input-number v-model="model.sort" placeholder="请输入排序" style="width: 100%"/>
</a-form-model-item>
</a-col>
</a-row>
@ -60,21 +55,12 @@
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'PopularizeAuthenticationForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
name: 'CommonBookNovelForm',
data () {
return {
model:{
},
state: 0
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
@ -85,21 +71,38 @@
},
confirmLoading: false,
validatorRules: {
userId: [
{ required: true, message: '请选择用户标识!' }
],
bookId: [
{ required: true, message: '请选择所属小说!' }
],
title: [
{ required: true, message: '请输入章节名称!' }
],
status: [
{ required: true, message: '请选择章节状态!' }
]
},
url: {
add: "/popularizeAuthentication/popularizeAuthentication/add",
edit: "/popularizeAuthentication/popularizeAuthentication/edit",
queryById: "/popularizeAuthentication/popularizeAuthentication/queryById"
add: "/commonBookNovel/commonBookNovel/add",
edit: "/commonBookNovel/commonBookNovel/edit",
queryById: "/commonBookNovel/commonBookNovel/queryById"
}
}
},
props: {
disabled: {
default: false
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
@ -119,11 +122,13 @@
let httpurl = '';
let method = '';
if(!this.model.id){
//
httpurl+=this.url.add;
method = 'post';
}else{
//
httpurl+=this.url.edit;
method = 'put';
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
@ -136,7 +141,6 @@
that.confirmLoading = false;
})
}
})
},
}

admin-pc/src/views/popularizeOrder/modules/PopularizeOrderModal.Style#Drawer.vue → admin-pc/src/views/book/check/modules/CommonBookNovelModal.Style#Drawer.vue View File

@ -7,7 +7,7 @@
@close="close"
destroyOnClose
:visible="visible">
<popularize-order-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></popularize-order-form>
<common-book-novel-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></common-book-novel-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
@ -17,12 +17,12 @@
<script>
import PopularizeOrderForm from './PopularizeOrderForm'
import CommonBookNovelForm from './CommonBookNovelForm'
export default {
name: 'PopularizeOrderModal',
name: 'CommonBookNovelModal',
components: {
PopularizeOrderForm
CommonBookNovelForm
},
data () {
return {

admin-pc/src/views/popularizeActivity/modules/TencentMapPicker.vue → admin-pc/src/views/book/check/modules/TencentMapPicker.vue View File


+ 0
- 383
admin-pc/src/views/popularizeActivity/PopularizeActivityList.vue View File

@ -1,383 +0,0 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="中文-活动标题">
<a-input placeholder="请输入中文-活动标题" v-model="queryParam.title"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="英文-活动标题">
<a-input placeholder="请输入英文-活动标题" v-model="queryParam.enTitle"></a-input>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="活动类型">
<j-dict-select-tag placeholder="请选择活动类型" v-model="queryParam.type" dictCode="no_type"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="活动时间">
<j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择活动时间" v-model="queryParam.startTime"></j-date>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="中文-活动地址">
<a-input placeholder="请输入中文-活动地址" v-model="queryParam.address"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="英文-活动地址">
<a-input placeholder="请输入英文-活动地址" v-model="queryParam.enAddress"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="主理人">
<j-search-select-tag placeholder="请选择主理人" v-model="queryParam.adminUser" dict="han_hai_member,nick_name,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="是否上架">
<j-switch placeholder="请选择是否上架" v-model="queryParam.isOpen" query></j-switch>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="活动状态">
<j-dict-select-tag placeholder="请选择活动状态" v-model="queryParam.state" dictCode="no_state"/>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<!-- <a-button type="primary" icon="download" @click="handleExportXls('活动信息表')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<popularize-activity-modal ref="modalForm" @ok="modalFormOk"></popularize-activity-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import PopularizeActivityModal from './modules/PopularizeActivityModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'PopularizeActivityList',
mixins:[JeecgListMixin, mixinDevice],
components: {
PopularizeActivityModal
},
data () {
return {
description: '活动信息表管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'创建人',
align:"center",
dataIndex: 'createBy'
},
{
title:'创建日期',
align:"center",
sorter: true,
dataIndex: 'createTime'
},
{
title:'中文-活动标题',
align:"center",
dataIndex: 'title'
},
{
title:'英文-活动标题',
align:"center",
dataIndex: 'enTitle'
},
{
title:'活动类型',
align:"center",
dataIndex: 'type_dictText'
},
{
title:'活动封面',
align:"center",
dataIndex: 'image',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'活动时间',
align:"center",
dataIndex: 'startTime'
},
{
title:'中文-活动地址',
align:"center",
dataIndex: 'address'
},
{
title:'英文-活动地址',
align:"center",
dataIndex: 'enAddress'
},
{
title:'活动人数',
align:"center",
dataIndex: 'sum'
},
{
title:'报名人数',
align:"center",
dataIndex: 'num'
},
{
title:'虚拟订单下单人数',
align:"center",
sorter: true,
dataIndex: 'orderNum'
},
{
title:'报名费用',
align:"center",
dataIndex: 'price'
},
{
title:'主理人',
align:"center",
dataIndex: 'adminUser_dictText'
},
// {
// title:'',
// align:"center",
// dataIndex: 'openNum'
// },
{
title:'签到人数',
align:"center",
dataIndex: 'doNum'
},
{
title:'是否上架',
align:"center",
dataIndex: 'isOpen',
customRender: (text) => (text ? filterMultiDictText(this.dictOptions['isOpen'], text) : ''),
},
{
title:'活动状态',
align:"center",
dataIndex: 'state_dictText'
},
{
title:'早鸟票',
align:"center",
dataIndex: 'birdPrice'
},
{
title:'单人票',
align:"center",
dataIndex: 'personPrice'
},
{
title:'尊享票',
align:"center",
dataIndex: 'expensivePrice'
},
{
title:'经度',
align:"center",
dataIndex: 'longitude'
},
{
title:'纬度',
align:"center",
dataIndex: 'latitude'
},
{
title:'活动需知',
align:"center",
dataIndex: 'orderDetails',
scopedSlots: {customRender: 'htmlSlot'}
},
{
title:'活动城市',
align:"center",
dataIndex: 'cityId_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/popularizeActivity/popularizeActivity/list",
delete: "/popularizeActivity/popularizeActivity/delete",
deleteBatch: "/popularizeActivity/popularizeActivity/deleteBatch",
exportXlsUrl: "/popularizeActivity/popularizeActivity/exportXls",
importExcelUrl: "popularizeActivity/popularizeActivity/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.$set(this.dictOptions, 'isOpen', [{text:'是',value:'Y'},{text:'否',value:'N'}])
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''})
fieldList.push({type:'datetime',value:'createTime',text:'创建日期'})
fieldList.push({type:'Text',value:'title',text:'中文-活动标题',dictCode:''})
fieldList.push({type:'Text',value:'enTitle',text:'英文-活动标题',dictCode:''})
fieldList.push({type:'string',value:'type',text:'活动类型',dictCode:'no_type'})
fieldList.push({type:'Text',value:'image',text:'活动封面',dictCode:''})
fieldList.push({type:'datetime',value:'startTime',text:'活动时间'})
fieldList.push({type:'Text',value:'address',text:'中文-活动地址',dictCode:''})
fieldList.push({type:'Text',value:'enAddress',text:'英文-活动地址',dictCode:''})
fieldList.push({type:'int',value:'sum',text:'活动人数',dictCode:''})
fieldList.push({type:'int',value:'num',text:'报名人数',dictCode:''})
fieldList.push({type:'BigDecimal',value:'price',text:'报名费用',dictCode:''})
fieldList.push({type:'sel_search',value:'adminUser',text:'主理人',dictTable:"han_hai_member", dictText:'nick_name', dictCode:'id'})
fieldList.push({type:'int',value:'openNum',text:'签到人数',dictCode:''})
fieldList.push({type:'switch',value:'isOpen',text:'是否上架'})
fieldList.push({type:'int',value:'state',text:'活动状态',dictCode:'no_state'})
fieldList.push({type:'Text',value:'details',text:'活动详情',dictCode:''})
fieldList.push({type:'Text',value:'enDetails',text:'英文-活动详情',dictCode:''})
fieldList.push({type:'Text',value:'precautions',text:'中文-注意事项',dictCode:''})
fieldList.push({type:'Text',value:'enPrecautions',text:'英文-注意事项',dictCode:''})
fieldList.push({type:'BigDecimal',value:'birdPrice',text:'早鸟票',dictCode:''})
fieldList.push({type:'BigDecimal',value:'personPrice',text:'单人票',dictCode:''})
fieldList.push({type:'BigDecimal',value:'expensivePrice',text:'尊享票',dictCode:''})
fieldList.push({type:'string',value:'longitude',text:'经度',dictCode:''})
fieldList.push({type:'string',value:'latitude',text:'纬度',dictCode:''})
fieldList.push({type:'Text',value:'orderDetails',text:'活动需知',dictCode:''})
fieldList.push({type:'sel_search',value:'cityId',text:'活动城市',dictTable:"popularize_city", dictText:'city', dictCode:'id'})
fieldList.push({type:'int',value:'doNum',text:'签到人数',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 0
- 255
admin-pc/src/views/popularizeActivity/modules/PopularizeActivityForm.vue View File

@ -1,255 +0,0 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="中文-活动标题" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="title">
<a-input v-model="model.title" placeholder="请输入中文-活动标题" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="英文-活动标题" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enTitle">
<a-input v-model="model.enTitle" placeholder="请输入英文-活动标题" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="活动类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
<j-dict-select-tag type="list" v-model="model.type" dictCode="no_type" placeholder="请选择活动类型" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="活动封面" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="image">
<j-image-upload isMultiple v-model="model.image" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="活动时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime">
<j-date placeholder="请选择活动时间" v-model="model.startTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="中文-活动地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
<a-input v-model="model.address" placeholder="请输入中文-活动地址" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="英文-活动地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enAddress">
<a-input v-model="model.enAddress" placeholder="请输入英文-活动地址" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="活动人数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sum">
<a-input-number v-model="model.sum" placeholder="请输入活动人数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="报名人数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
<a-input-number v-model="model.num" placeholder="请输入报名人数" style="width: 100%" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="报名费用" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
<a-input-number v-model="model.price" placeholder="请输入报名费用" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="主理人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="adminUser">
<j-search-select-tag v-model="model.adminUser" dict="han_hai_member,nick_name,id,is_user='Y'" />
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="签到人数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="openNum">-->
<!-- <a-input-number v-model="model.openNum" placeholder="请输入签到人数" style="width: 100%" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-model-item label="签到人数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="doNum">
<a-input-number v-model="model.doNum" placeholder="请输入签到人数" style="width: 100%" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="虚拟订单下单人数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderNum">
<a-input-number v-model="model.orderNum" placeholder="虚拟订单下单人数" style="width: 100%"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="是否上架" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isOpen">
<j-switch v-model="model.isOpen" ></j-switch>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="活动状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="state">
<j-dict-select-tag type="list" v-model="model.state" dictCode="no_state" placeholder="请选择活动状态" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="活动详情" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="details">
<j-editor v-model="model.details" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="英文-活动详情" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enDetails">
<j-editor v-model="model.enDetails" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="中文-注意事项" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="precautions">
<j-editor v-model="model.precautions" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="英文-注意事项" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enPrecautions">
<j-editor v-model="model.enPrecautions" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="早鸟票" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="birdPrice">
<a-input-number v-model="model.birdPrice" placeholder="请输入早鸟票" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="单人票" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="personPrice">
<a-input-number v-model="model.personPrice" placeholder="请输入单人票" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="尊享票" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="expensivePrice">
<a-input-number v-model="model.expensivePrice" placeholder="请输入尊享票" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="经度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="longitude">
<a-input v-model="model.longitude" placeholder="请输入经度" disabled ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="纬度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="latitude">
<a-input v-model="model.latitude" placeholder="请输入纬度" disabled ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="地图选择位置" :labelCol="labelCol" :wrapperCol="wrapperCol">
<TencentMapPicker
:latitude="model.latitude"
:longitude="model.longitude"
@onLocationSelected="handleLocationSelected"
/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="活动需知" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderDetails">
<j-editor v-model="model.orderDetails" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="活动城市" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cityId">
<j-search-select-tag v-model="model.cityId" dict="popularize_city,city,id" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import TencentMapPicker from './TencentMapPicker.vue';
export default {
name: 'PopularizeActivityForm',
components: {
TencentMapPicker
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
adminUser: [
{ required: true, message: '请输入主理人!'},
],
},
url: {
add: "/popularizeActivity/popularizeActivity/add",
edit: "/popularizeActivity/popularizeActivity/edit",
queryById: "/popularizeActivity/popularizeActivity/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
handleLocationSelected({latitude, longitude}) {
console.log('event11',latitude, longitude)
this.model.latitude = latitude;
this.model.longitude = longitude;
},
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

+ 0
- 84
admin-pc/src/views/popularizeActivity/modules/PopularizeActivityModal.Style#Drawer.vue View File

@ -1,84 +0,0 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<popularize-activity-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></popularize-activity-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import PopularizeActivityForm from './PopularizeActivityForm'
export default {
name: 'PopularizeActivityModal',
components: {
PopularizeActivityForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 0
- 60
admin-pc/src/views/popularizeActivity/modules/PopularizeActivityModal.vue View File

@ -1,60 +0,0 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<popularize-activity-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></popularize-activity-form>
</j-modal>
</template>
<script>
import PopularizeActivityForm from './PopularizeActivityForm'
export default {
name: 'PopularizeActivityModal',
components: {
PopularizeActivityForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

+ 0
- 267
admin-pc/src/views/popularizeAuthentication/PopularizeAuthenticationList.vue View File

@ -1,267 +0,0 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="状态">
<j-dict-select-tag placeholder="请选择状态" v-model="queryParam.state" dictCode="no_state_type"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="姓名">
<a-input placeholder="请输入姓名" v-model="queryParam.name"></a-input>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="电话">
<a-input placeholder="请输入电话" v-model="queryParam.phone"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="身份证">
<a-input placeholder="请输入身份证" v-model="queryParam.cardNo"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="用户">
<j-search-select-tag placeholder="请选择用户" v-model="queryParam.userId" dict="han_hai_member,nick_name,id"/>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls('主理人认证')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">审核</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<popularize-authentication-modal ref="modalForm" @ok="modalFormOk"></popularize-authentication-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import PopularizeAuthenticationModal from './modules/PopularizeAuthenticationModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'PopularizeAuthenticationList',
mixins:[JeecgListMixin, mixinDevice],
components: {
PopularizeAuthenticationModal
},
data () {
return {
description: '主理人认证管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'创建日期',
align:"center",
sorter: true,
dataIndex: 'createTime'
},
{
title:'状态',
align:"center",
dataIndex: 'state_dictText'
},
{
title:'姓名',
align:"center",
dataIndex: 'name'
},
{
title:'电话',
align:"center",
dataIndex: 'phone'
},
{
title:'身份证',
align:"center",
dataIndex: 'cardNo'
},
{
title:'简历附件',
align:"center",
dataIndex: 'image',
scopedSlots: {customRender: 'fileSlot'}
},
{
title:'用户',
align:"center",
dataIndex: 'userId_dictText'
},
{
title:'微信二维码',
align:"center",
dataIndex: 'img',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'主理人分数',
align:"center",
dataIndex: 'num'
},
{
title:'图片',
align:"center",
dataIndex: 'images',
scopedSlots: {customRender: 'imgSlot'}
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/popularizeAuthentication/popularizeAuthentication/list",
delete: "/popularizeAuthentication/popularizeAuthentication/delete",
deleteBatch: "/popularizeAuthentication/popularizeAuthentication/deleteBatch",
exportXlsUrl: "/popularizeAuthentication/popularizeAuthentication/exportXls",
importExcelUrl: "popularizeAuthentication/popularizeAuthentication/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'datetime',value:'createTime',text:'创建日期'})
fieldList.push({type:'int',value:'state',text:'状态',dictCode:'no_state_type'})
fieldList.push({type:'string',value:'name',text:'姓名',dictCode:''})
fieldList.push({type:'string',value:'phone',text:'电话',dictCode:''})
fieldList.push({type:'string',value:'cardNo',text:'身份证',dictCode:''})
fieldList.push({type:'Text',value:'image',text:'简历附件',dictCode:''})
fieldList.push({type:'sel_search',value:'userId',text:'用户',dictTable:"han_hai_member", dictText:'nick_name', dictCode:'id'})
fieldList.push({type:'Text',value:'img',text:'微信二维码',dictCode:''})
fieldList.push({type:'int',value:'num',text:'主理人分数',dictCode:''})
fieldList.push({type:'Text',value:'images',text:'图片',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 0
- 84
admin-pc/src/views/popularizeAuthentication/modules/PopularizeAuthenticationModal.Style#Drawer.vue View File

@ -1,84 +0,0 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<popularize-authentication-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></popularize-authentication-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import PopularizeAuthenticationForm from './PopularizeAuthenticationForm'
export default {
name: 'PopularizeAuthenticationModal',
components: {
PopularizeAuthenticationForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 0
- 60
admin-pc/src/views/popularizeAuthentication/modules/PopularizeAuthenticationModal.vue View File

@ -1,60 +0,0 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<popularize-authentication-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></popularize-authentication-form>
</j-modal>
</template>
<script>
import PopularizeAuthenticationForm from './PopularizeAuthenticationForm'
export default {
name: 'PopularizeAuthenticationModal',
components: {
PopularizeAuthenticationForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

+ 0
- 359
admin-pc/src/views/popularizeOrder/PopularizeOrderList.vue View File

@ -1,359 +0,0 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="订单状态">
<j-dict-select-tag placeholder="请选择订单状态" v-model="queryParam.state" dictCode="order_state"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="订单标题">
<a-input placeholder="请输入订单标题" v-model="queryParam.title"></a-input>
</a-form-item>
</a-col>
<!-- <template v-if="toggleSearchStatus">-->
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="类型">
<j-dict-select-tag placeholder="请选择类型" v-model="queryParam.type" dictCode="order_type"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="地点">
<a-input placeholder="请输入地点" v-model="queryParam.address"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="是否签到">
<j-dict-select-tag placeholder="请选择是否签到" v-model="queryParam.open" dictCode="is_qd_open"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="用户标识">
<j-search-select-tag placeholder="请选择用户标识" v-model="queryParam.userId" dict="han_hai_member,nick_name,id"/>
</a-form-item>
</a-col>
<!-- </template>-->
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!-- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">-->
<!-- <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>-->
<!-- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>-->
<!-- <a @click="handleToggleSearch" style="margin-left: 8px">-->
<!-- {{ toggleSearchStatus ? '收起' : '展开' }}-->
<!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
<!-- </a>-->
<!-- </span>-->
<!-- </a-col>-->
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<!-- <a-button type="primary" icon="download" @click="handleExportXls('订单列表')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleDetail(record)" >详情</a>
<a-divider type="vertical" />
<a @click="handleEdit(record)" v-if="record.outTradeNo != null && record.state != 3">退款</a>
<!-- <a-dropdown>-->
<!-- <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item>-->
<!-- <a @click="handleDetail(record)">详情</a>-->
<!-- </a-menu-item>-->
<!-- <a-menu-item>-->
<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
<!-- <a>删除</a>-->
<!-- </a-popconfirm>-->
<!-- </a-menu-item>-->
<!-- </a-menu>-->
<!-- </a-dropdown>-->
</span>
</a-table>
</div>
<popularize-order-modal ref="modalForm" @ok="modalFormOk"></popularize-order-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import PopularizeOrderModal from './modules/PopularizeOrderModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'PopularizeOrderList',
mixins:[JeecgListMixin, mixinDevice],
components: {
PopularizeOrderModal
},
data () {
return {
description: '订单列表管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'创建日期',
align:"center",
sorter: true,
dataIndex: 'createTime'
},
{
title:'订单号',
align:"center",
dataIndex: 'id'
},
{
title:'订单状态',
align:"center",
dataIndex: 'state_dictText'
},
{
title:'订单标题',
align:"center",
dataIndex: 'title'
},
{
title:'订单图片',
align:"center",
dataIndex: 'image',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'类型',
align:"center",
dataIndex: 'type_dictText'
},
{
title:'时间',
align:"center",
dataIndex: 'startTime'
},
{
title:'地点',
align:"center",
dataIndex: 'address'
},
{
title:'价格',
align:"center",
dataIndex: 'price'
},
{
title:'是否签到',
align:"center",
dataIndex: 'open_dictText'
},
{
title:'溯源活动',
align:"center",
dataIndex: 'activityOrderId_dictText'
},
{
title:'溯源旅行',
align:"center",
dataIndex: 'travelOrderId_dictText'
},
{
title:'用户标识',
align:"center",
dataIndex: 'userId_dictText'
},
{
title:'支付金额',
align:"center",
dataIndex: 'payPrice'
},
{
title:'支付时间',
align:"center",
dataIndex: 'payTime'
},
{
title:'购票数量',
align:"center",
dataIndex: 'num'
},
{
title:'是否已开票',
align:"center",
dataIndex: 'isFp',
customRender: (text) => (text ? filterMultiDictText(this.dictOptions['isFp'], text) : ''),
},
{
title:'是否已评价',
align:"center",
dataIndex: 'isPj',
customRender: (text) => (text ? filterMultiDictText(this.dictOptions['isPj'], text) : ''),
},
{
title:'类型',
align:"center",
dataIndex: 'typePrice'
},
{
title:'姓名',
align:"center",
dataIndex: 'name'
},
{
title:'电话',
align:"center",
dataIndex: 'phone'
},
{
title:'邀请码',
align:"center",
dataIndex: 'code'
},
{
title:'微信订单号',
align:"center",
dataIndex: 'transactionId'
},
{
title:'微信商户订单号',
align:"center",
dataIndex: 'outTradeNo'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/popularizeOrder/popularizeOrder/list",
delete: "/popularizeOrder/popularizeOrder/delete",
deleteBatch: "/popularizeOrder/popularizeOrder/deleteBatch",
exportXlsUrl: "/popularizeOrder/popularizeOrder/exportXls",
importExcelUrl: "popularizeOrder/popularizeOrder/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.$set(this.dictOptions, 'isFp', [{text:'是',value:'Y'},{text:'否',value:'N'}])
this.$set(this.dictOptions, 'isPj', [{text:'是',value:'Y'},{text:'否',value:'N'}])
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'datetime',value:'createTime',text:'创建日期'})
fieldList.push({type:'string',value:'state',text:'订单状态',dictCode:'order_state'})
fieldList.push({type:'Text',value:'title',text:'订单标题',dictCode:''})
fieldList.push({type:'Text',value:'image',text:'订单图片',dictCode:''})
fieldList.push({type:'string',value:'type',text:'类型',dictCode:'order_type'})
fieldList.push({type:'datetime',value:'startTime',text:'时间'})
fieldList.push({type:'Text',value:'address',text:'地点',dictCode:''})
fieldList.push({type:'BigDecimal',value:'price',text:'价格',dictCode:''})
fieldList.push({type:'string',value:'open',text:'是否签到',dictCode:'is_qd_open'})
fieldList.push({type:'sel_search',value:'activityOrderId',text:'溯源活动',dictTable:"popularize_activity", dictText:'title', dictCode:'id'})
fieldList.push({type:'sel_search',value:'travelOrderId',text:'溯源旅行',dictTable:"popularize_travel", dictText:'title', dictCode:'id'})
fieldList.push({type:'sel_search',value:'userId',text:'用户标识',dictTable:"han_hai_member", dictText:'nick_name', dictCode:'id'})
fieldList.push({type:'BigDecimal',value:'payPrice',text:'支付金额',dictCode:''})
fieldList.push({type:'datetime',value:'payTime',text:'支付时间'})
fieldList.push({type:'int',value:'num',text:'购票数量',dictCode:''})
fieldList.push({type:'switch',value:'isFp',text:'是否已开票'})
fieldList.push({type:'switch',value:'isPj',text:'是否已评价'})
fieldList.push({type:'int',value:'typePrice',text:'类型',dictCode:''})
fieldList.push({type:'string',value:'name',text:'姓名',dictCode:''})
fieldList.push({type:'string',value:'phone',text:'电话',dictCode:''})
fieldList.push({type:'string',value:'code',text:'邀请码',dictCode:''})
fieldList.push({type:'string',value:'outTradeNo',text:'微信订单号',dictCode:''})
fieldList.push({type:'string',value:'transactionId',text:'微信商户订单号',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 0
- 211
admin-pc/src/views/popularizeOrder/modules/PopularizeOrderForm.vue View File

@ -1,211 +0,0 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="订单状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="state">
<j-dict-select-tag type="list" v-model="model.state" dictCode="order_state" placeholder="请选择订单状态" disabled />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="订单标题" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="title">
<a-input v-model="model.title" placeholder="请输入订单标题" disabled></a-input>
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="订单图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="image">-->
<!-- <j-image-upload isMultiple v-model="model.image" ></j-image-upload>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">-->
<!-- <j-dict-select-tag type="list" v-model="model.type" dictCode="order_type" placeholder="请选择类型" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime">-->
<!-- <j-date placeholder="请选择时间" v-model="model.startTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="地点" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">-->
<!-- <a-input v-model="model.address" placeholder="请输入地点" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="价格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">-->
<!-- <a-input-number v-model="model.price" placeholder="请输入价格" style="width: 100%" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="是否签到" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="open">-->
<!-- <j-dict-select-tag type="list" v-model="model.open" dictCode="is_qd_open" placeholder="请选择是否签到" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="溯源活动" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="activityOrderId">-->
<!-- <j-search-select-tag v-model="model.activityOrderId" dict="popularize_activity,title,id" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="溯源旅行" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="travelOrderId">-->
<!-- <j-search-select-tag v-model="model.travelOrderId" dict="popularize_travel,title,id" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="用户标识" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">-->
<!-- <j-search-select-tag v-model="model.userId" dict="han_hai_member,nick_name,id" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-model-item label="支付金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="payPrice">
<a-input-number v-model="model.payPrice" placeholder="请输入支付金额" style="width: 100%" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="已退款金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="payTuiPrice">
<a-input-number v-model="model.payTuiPrice" placeholder="请输入已退款金额" style="width: 100%" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="退款金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="payPrice">
<a-input-number v-model="model.tuiPrice" placeholder="请输入退款金额" style="width: 100%" />
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="支付时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="payTime">-->
<!-- <j-date placeholder="请选择支付时间" v-model="model.payTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-model-item label="购票数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
<a-input-number v-model="model.num" placeholder="请输入购票数量" style="width: 100%" disabled />
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="是否已开票" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isFp">-->
<!-- <j-switch v-model="model.isFp" ></j-switch>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="是否已评价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isPj">-->
<!-- <j-switch v-model="model.isPj" ></j-switch>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typePrice">-->
<!-- <a-input-number v-model="model.typePrice" placeholder="请输入类型" style="width: 100%" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">-->
<!-- <a-input v-model="model.name" placeholder="请输入姓名" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">-->
<!-- <a-input v-model="model.phone" placeholder="请输入电话" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="邀请码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="code">-->
<!-- <a-input v-model="model.code" placeholder="请输入邀请码" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'PopularizeOrderForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/popularizeOrder/popularizeOrder/add",
edit: "/popularizeOrder/popularizeOrder/edit",
queryById: "/popularizeOrder/popularizeOrder/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

+ 0
- 339
admin-pc/src/views/popularizeRecruit/PopularizeRecruitList.vue View File

@ -1,339 +0,0 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="招募状态">
<j-dict-select-tag placeholder="请选择招募状态" v-model="queryParam.stateOn" dictCode="state_on"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="中文-招募标题">
<a-input placeholder="请输入中文-招募标题" v-model="queryParam.title"></a-input>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="英文-招募标题">
<a-input placeholder="请输入英文-招募标题" v-model="queryParam.enTitle"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="中文-地址">
<a-input placeholder="请输入中文-地址" v-model="queryParam.address"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="英文-地址">
<a-input placeholder="请输入英文-地址" v-model="queryParam.enAddress"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="中文-标签">
<a-input placeholder="请输入中文-标签" v-model="queryParam.iconText"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="英文标签">
<a-input placeholder="请输入英文标签" v-model="queryParam.enIconText"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="是否成行">
<j-dict-select-tag placeholder="请选择是否成行" v-model="queryParam.state" dictCode="is_xc"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="活动">
<j-search-select-tag placeholder="请选择活动" v-model="queryParam.activityId" dict="popularize_activity,title,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="旅行">
<j-search-select-tag placeholder="请选择旅行" v-model="queryParam.travelId" dict="popularize_travel,title,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="类型">
<j-dict-select-tag placeholder="请选择类型" v-model="queryParam.type" dictCode="vo_type"/>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('招募信息')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<popularize-recruit-modal ref="modalForm" @ok="modalFormOk"></popularize-recruit-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import PopularizeRecruitModal from './modules/PopularizeRecruitModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'PopularizeRecruitList',
mixins:[JeecgListMixin, mixinDevice],
components: {
PopularizeRecruitModal
},
data () {
return {
description: '招募信息管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'创建人',
align:"center",
dataIndex: 'createBy'
},
{
title:'创建日期',
align:"center",
sorter: true,
dataIndex: 'createTime'
},
{
title:'招募状态',
align:"center",
dataIndex: 'stateOn_dictText'
},
{
title:'中文-招募标题',
align:"center",
dataIndex: 'title'
},
{
title:'英文-招募标题',
align:"center",
dataIndex: 'enTitle'
},
{
title:'图片',
align:"center",
dataIndex: 'image',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'时间',
align:"center",
dataIndex: 'startTime'
},
{
title:'中文-地址',
align:"center",
dataIndex: 'address'
},
{
title:'英文-地址',
align:"center",
dataIndex: 'enAddress'
},
{
title:'中文-标签',
align:"center",
dataIndex: 'iconText'
},
{
title:'英文标签',
align:"center",
dataIndex: 'enIconText'
},
{
title:'是否上架 ',
align:"center",
dataIndex: 'isOpen',
customRender: (text) => (text ? filterMultiDictText(this.dictOptions['isOpen'], text) : ''),
},
{
title:'是否成行',
align:"center",
dataIndex: 'state_dictText'
},
{
title:'参与人数',
align:"center",
dataIndex: 'num'
},
{
title:'活动',
align:"center",
dataIndex: 'activityId_dictText'
},
{
title:'旅行',
align:"center",
dataIndex: 'travelId_dictText'
},
{
title:'类型',
align:"center",
dataIndex: 'type_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/popularizeRecruit/popularizeRecruit/list",
delete: "/popularizeRecruit/popularizeRecruit/delete",
deleteBatch: "/popularizeRecruit/popularizeRecruit/deleteBatch",
exportXlsUrl: "/popularizeRecruit/popularizeRecruit/exportXls",
importExcelUrl: "popularizeRecruit/popularizeRecruit/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.$set(this.dictOptions, 'isOpen', [{text:'是',value:'Y'},{text:'否',value:'N'}])
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''})
fieldList.push({type:'datetime',value:'createTime',text:'创建日期'})
fieldList.push({type:'int',value:'stateOn',text:'招募状态',dictCode:'state_on'})
fieldList.push({type:'string',value:'title',text:'中文-招募标题',dictCode:''})
fieldList.push({type:'string',value:'enTitle',text:'英文-招募标题',dictCode:''})
fieldList.push({type:'Text',value:'image',text:'图片',dictCode:''})
fieldList.push({type:'datetime',value:'startTime',text:'时间'})
fieldList.push({type:'Text',value:'address',text:'中文-地址',dictCode:''})
fieldList.push({type:'Text',value:'enAddress',text:'英文-地址',dictCode:''})
fieldList.push({type:'Text',value:'iconText',text:'中文-标签',dictCode:''})
fieldList.push({type:'Text',value:'enIconText',text:'英文标签',dictCode:''})
fieldList.push({type:'switch',value:'isOpen',text:'是否上架 '})
fieldList.push({type:'int',value:'state',text:'是否成行',dictCode:'is_xc'})
fieldList.push({type:'int',value:'num',text:'参与人数',dictCode:''})
fieldList.push({type:'sel_search',value:'activityId',text:'活动',dictTable:"popularize_activity", dictText:'title', dictCode:'id'})
fieldList.push({type:'sel_search',value:'travelId',text:'旅行',dictTable:"popularize_travel", dictText:'title', dictCode:'id'})
fieldList.push({type:'string',value:'type',text:'类型',dictCode:'vo_type'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 0
- 174
admin-pc/src/views/popularizeRecruit/modules/PopularizeRecruitForm.vue View File

@ -1,174 +0,0 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="招募状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stateOn">
<j-dict-select-tag type="list" v-model="model.stateOn" dictCode="state_on" placeholder="请选择招募状态" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="中文-招募标题" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="title">
<a-input v-model="model.title" placeholder="请输入中文-招募标题" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="英文-招募标题" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enTitle">
<a-input v-model="model.enTitle" placeholder="请输入英文-招募标题" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="image">
<j-image-upload isMultiple v-model="model.image" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime">
<j-date placeholder="请选择时间" v-model="model.startTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="中文-地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
<a-input v-model="model.address" placeholder="请输入中文-地址" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="英文-地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enAddress">
<a-input v-model="model.enAddress" placeholder="请输入英文-地址" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="中文-标签" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="iconText">
<a-input v-model="model.iconText" placeholder="请输入中文-标签" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="英文标签" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enIconText">
<a-input v-model="model.enIconText" placeholder="请输入英文标签" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="是否上架 " :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isOpen">
<j-switch v-model="model.isOpen" ></j-switch>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="是否成行" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="state">
<j-dict-select-tag type="list" v-model="model.state" dictCode="is_xc" placeholder="请选择是否成行" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="参与人数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
<a-input-number v-model="model.num" placeholder="请输入参与人数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="活动" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="activityId">
<j-search-select-tag v-model="model.activityId" dict="popularize_activity,title,id" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="旅行" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="travelId">
<j-search-select-tag v-model="model.travelId" dict="popularize_travel,title,id" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
<j-dict-select-tag type="list" v-model="model.type" dictCode="vo_type" placeholder="请选择类型" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'PopularizeRecruitForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/popularizeRecruit/popularizeRecruit/add",
edit: "/popularizeRecruit/popularizeRecruit/edit",
queryById: "/popularizeRecruit/popularizeRecruit/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

+ 0
- 84
admin-pc/src/views/popularizeRecruit/modules/PopularizeRecruitModal.Style#Drawer.vue View File

@ -1,84 +0,0 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<popularize-recruit-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></popularize-recruit-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import PopularizeRecruitForm from './PopularizeRecruitForm'
export default {
name: 'PopularizeRecruitModal',
components: {
PopularizeRecruitForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 0
- 60
admin-pc/src/views/popularizeRecruit/modules/PopularizeRecruitModal.vue View File

@ -1,60 +0,0 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<popularize-recruit-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></popularize-recruit-form>
</j-modal>
</template>
<script>
import PopularizeRecruitForm from './PopularizeRecruitForm'
export default {
name: 'PopularizeRecruitModal',
components: {
PopularizeRecruitForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

+ 0
- 246
admin-pc/src/views/popularizeRecruitLog/PopularizeRecruitLogList.vue View File

@ -1,246 +0,0 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="用户信息">
<j-search-select-tag placeholder="请选择用户信息" v-model="queryParam.userId" dict="han_hai_member,nick_name,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="姓名">
<a-input placeholder="请输入姓名" v-model="queryParam.name"></a-input>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="电话">
<a-input placeholder="请输入电话" v-model="queryParam.phone"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="招募项目">
<j-search-select-tag placeholder="请选择招募项目" v-model="queryParam.recruitId" dict="popularize_recruit,title,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="审核状态">
<j-dict-select-tag placeholder="请选择审核状态" v-model="queryParam.state" dictCode="recruit_state"/>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls('招募报名日志')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
<!-- </a-menu>-->
<!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
<!-- </a-dropdown>-->
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)" v-if="record.state==1">审核</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)" >详情</a>
</a-menu-item>
<!-- <a-menu-item>-->
<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
<!-- <a>删除</a>-->
<!-- </a-popconfirm>-->
<!-- </a-menu-item>-->
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<popularize-recruit-log-modal ref="modalForm" @ok="modalFormOk"></popularize-recruit-log-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import PopularizeRecruitLogModal from './modules/PopularizeRecruitLogModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'PopularizeRecruitLogList',
mixins:[JeecgListMixin, mixinDevice],
components: {
PopularizeRecruitLogModal
},
data () {
return {
description: '招募报名日志管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'用户信息',
align:"center",
dataIndex: 'userId_dictText'
},
{
title:'姓名',
align:"center",
dataIndex: 'name'
},
{
title:'电话',
align:"center",
dataIndex: 'phone'
},
{
title:'头像',
align:"center",
dataIndex: 'headImage',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'招募项目',
align:"center",
dataIndex: 'recruitId_dictText'
},
{
title:'项目时间',
align:"center",
dataIndex: 'recruitTime'
},
{
title:'审核状态',
align:"center",
dataIndex: 'state_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/popularizeRecruitLog/popularizeRecruitLog/list",
delete: "/popularizeRecruitLog/popularizeRecruitLog/delete",
deleteBatch: "/popularizeRecruitLog/popularizeRecruitLog/deleteBatch",
exportXlsUrl: "/popularizeRecruitLog/popularizeRecruitLog/exportXls",
importExcelUrl: "popularizeRecruitLog/popularizeRecruitLog/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'sel_search',value:'userId',text:'用户信息',dictTable:"han_hai_member", dictText:'nick_name', dictCode:'id'})
fieldList.push({type:'string',value:'name',text:'姓名',dictCode:''})
fieldList.push({type:'string',value:'phone',text:'电话',dictCode:''})
fieldList.push({type:'Text',value:'headImage',text:'头像',dictCode:''})
fieldList.push({type:'sel_search',value:'recruitId',text:'招募项目',dictTable:"popularize_recruit", dictText:'title', dictCode:'id'})
fieldList.push({type:'datetime',value:'recruitTime',text:'项目时间'})
fieldList.push({type:'int',value:'state',text:'审核状态',dictCode:'recruit_state'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 0
- 84
admin-pc/src/views/popularizeRecruitLog/modules/PopularizeRecruitLogModal.Style#Drawer.vue View File

@ -1,84 +0,0 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<popularize-recruit-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></popularize-recruit-log-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import PopularizeRecruitLogForm from './PopularizeRecruitLogForm'
export default {
name: 'PopularizeRecruitLogModal',
components: {
PopularizeRecruitLogForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 0
- 60
admin-pc/src/views/popularizeRecruitLog/modules/PopularizeRecruitLogModal.vue View File

@ -1,60 +0,0 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<popularize-recruit-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></popularize-recruit-log-form>
</j-modal>
</template>
<script>
import PopularizeRecruitLogForm from './PopularizeRecruitLogForm'
export default {
name: 'PopularizeRecruitLogModal',
components: {
PopularizeRecruitLogForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

+ 0
- 327
admin-pc/src/views/popularizeTravel/PopularizeTravelList.vue View File

@ -1,327 +0,0 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="中文-旅行标题">
<a-input placeholder="请输入中文-旅行标题" v-model="queryParam.title"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="英文-旅行标题">
<a-input placeholder="请输入英文-旅行标题" v-model="queryParam.enTitle"></a-input>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="开始时间">
<j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" v-model="queryParam.startTime"></j-date>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="中文-旅行地址">
<a-input placeholder="请输入中文-旅行地址" v-model="queryParam.address"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="英文-旅行地址">
<a-input placeholder="请输入英文-旅行地址" v-model="queryParam.enAddress"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="主理人">
<j-search-select-tag placeholder="请选择主理人" v-model="queryParam.adminUser" dict="han_hai_member,nick_name,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="活动状态">
<j-dict-select-tag placeholder="请选择活动状态" v-model="queryParam.state" dictCode="no_state"/>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<!-- <a-button type="primary" icon="download" @click="handleExportXls('旅行信息表')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
<!-- </a-menu>-->
<!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
<!-- </a-dropdown>-->
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<popularize-travel-modal ref="modalForm" @ok="modalFormOk"></popularize-travel-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import PopularizeTravelModal from './modules/PopularizeTravelModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'PopularizeTravelList',
mixins:[JeecgListMixin, mixinDevice],
components: {
PopularizeTravelModal
},
data () {
return {
description: '旅行信息表管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'创建人',
align:"center",
dataIndex: 'createBy'
},
{
title:'创建日期',
align:"center",
sorter: true,
dataIndex: 'createTime'
},
{
title:'中文-旅行标题',
align:"center",
dataIndex: 'title'
},
{
title:'英文-旅行标题',
align:"center",
dataIndex: 'enTitle'
},
{
title:'旅行封面',
align:"center",
dataIndex: 'image',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'开始时间',
align:"center",
dataIndex: 'startTime'
},
{
title:'中文-旅行地址',
align:"center",
dataIndex: 'address'
},
{
title:'英文-旅行地址',
align:"center",
dataIndex: 'enAddress'
},
{
title:'活动人数',
align:"center",
sorter: true,
dataIndex: 'sum'
},
{
title:'报名人数',
align:"center",
sorter: true,
dataIndex: 'num'
},
{
title:'虚拟订单下单人数',
align:"center",
sorter: true,
dataIndex: 'orderNum'
},
{
title:'报名价格',
align:"center",
dataIndex: 'price'
},
{
title:'主理人',
align:"center",
dataIndex: 'adminUser_dictText'
},
{
title:'是否上架',
align:"center",
dataIndex: 'isOpen',
customRender: (text) => (text ? filterMultiDictText(this.dictOptions['isOpen'], text) : ''),
},
{
title:'活动状态',
align:"center",
dataIndex: 'state_dictText'
},
{
title:'签到人数',
align:"center",
sorter: true,
dataIndex: 'doNum'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/popularizeTravel/popularizeTravel/list",
delete: "/popularizeTravel/popularizeTravel/delete",
deleteBatch: "/popularizeTravel/popularizeTravel/deleteBatch",
exportXlsUrl: "/popularizeTravel/popularizeTravel/exportXls",
importExcelUrl: "popularizeTravel/popularizeTravel/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.$set(this.dictOptions, 'isOpen', [{text:'是',value:'Y'},{text:'否',value:'N'}])
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''})
fieldList.push({type:'datetime',value:'createTime',text:'创建日期'})
fieldList.push({type:'string',value:'title',text:'中文-旅行标题',dictCode:''})
fieldList.push({type:'string',value:'enTitle',text:'英文-旅行标题',dictCode:''})
fieldList.push({type:'Text',value:'image',text:'旅行封面',dictCode:''})
fieldList.push({type:'datetime',value:'startTime',text:'开始时间'})
fieldList.push({type:'Text',value:'address',text:'中文-旅行地址',dictCode:''})
fieldList.push({type:'Text',value:'enAddress',text:'英文-旅行地址',dictCode:''})
fieldList.push({type:'int',value:'sum',text:'活动人数',dictCode:''})
fieldList.push({type:'int',value:'num',text:'报名人数',dictCode:''})
fieldList.push({type:'BigDecimal',value:'price',text:'报名价格',dictCode:''})
fieldList.push({type:'sel_search',value:'adminUser',text:'主理人',dictTable:"han_hai_member", dictText:'nick_name', dictCode:'id'})
fieldList.push({type:'switch',value:'isOpen',text:'是否上架'})
fieldList.push({type:'int',value:'state',text:'活动状态',dictCode:'no_state'})
fieldList.push({type:'Text',value:'iconImage',text:'详情图',dictCode:''})
fieldList.push({type:'Text',value:'js',text:'中文-介绍说明',dictCode:''})
fieldList.push({type:'Text',value:'enJs',text:'英文-介绍说明',dictCode:''})
fieldList.push({type:'Text',value:'lx',text:'中文-路线说明',dictCode:''})
fieldList.push({type:'Text',value:'enLx',text:'英文-路线说明',dictCode:''})
fieldList.push({type:'Text',value:'fy',text:'中文-费用说明',dictCode:''})
fieldList.push({type:'Text',value:'enFy',text:'英文-费用说明',dictCode:''})
fieldList.push({type:'Text',value:'xz',text:'中文-需知说明',dictCode:''})
fieldList.push({type:'Text',value:'enXz',text:'英文-需知说明',dictCode:''})
fieldList.push({type:'Text',value:'dl',text:'中文-代理说明',dictCode:''})
fieldList.push({type:'Text',value:'enDl',text:'英文-代理说明',dictCode:''})
fieldList.push({type:'int',value:'doNum',text:'签到人数',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 0
- 227
admin-pc/src/views/popularizeTravel/modules/PopularizeTravelForm.vue View File

@ -1,227 +0,0 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="中文-旅行标题" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="title">
<a-input v-model="model.title" placeholder="请输入中文-旅行标题" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="英文-旅行标题" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enTitle">
<a-input v-model="model.enTitle" placeholder="请输入英文-旅行标题" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="旅行封面" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="image">
<j-image-upload isMultiple v-model="model.image" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime">
<j-date placeholder="请选择开始时间" v-model="model.startTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="中文-旅行地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
<a-input v-model="model.address" placeholder="请输入中文-旅行地址" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="英文-旅行地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enAddress">
<a-input v-model="model.enAddress" placeholder="请输入英文-旅行地址" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="活动人数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sum">
<a-input-number v-model="model.sum" placeholder="请输入活动人数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="报名人数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
<a-input-number v-model="model.num" placeholder="请输入报名人数" style="width: 100%" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="虚拟订单下单人数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderNum">
<a-input-number v-model="model.orderNum" placeholder="虚拟订单下单人数" style="width: 100%"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="报名价格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
<a-input-number v-model="model.price" placeholder="请输入报名价格" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="主理人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="adminUser">
<j-search-select-tag v-model="model.adminUser" dict="han_hai_member,nick_name,id" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="是否上架" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isOpen">
<j-switch v-model="model.isOpen" ></j-switch>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="活动状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="state">
<j-dict-select-tag type="list" v-model="model.state" dictCode="no_state" placeholder="请选择活动状态" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="详情图" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="iconImage">
<j-editor v-model="model.iconImage" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="中文-介绍说明" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="js">
<j-editor v-model="model.js" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="英文-介绍说明" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enJs">
<j-editor v-model="model.enJs" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="中文-路线说明" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lx">
<j-editor v-model="model.lx" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="英文-路线说明" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enLx">
<j-editor v-model="model.enLx" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="中文-费用说明" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fy">
<j-editor v-model="model.fy" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="英文-费用说明" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enFy">
<j-editor v-model="model.enFy" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="中文-需知说明" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xz">
<j-editor v-model="model.xz" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="英文-需知说明" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enXz">
<j-editor v-model="model.enXz" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="中文-代理说明" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dl">
<j-editor v-model="model.dl" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="英文-代理说明" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enDl">
<j-editor v-model="model.enDl" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="签到人数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="doNum">
<a-input-number v-model="model.doNum" placeholder="请输入签到人数" style="width: 100%" disabled/>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'PopularizeTravelForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
adminUser: [
{ required: true, message: '请输入主理人!'},
],
},
url: {
add: "/popularizeTravel/popularizeTravel/add",
edit: "/popularizeTravel/popularizeTravel/edit",
queryById: "/popularizeTravel/popularizeTravel/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

+ 0
- 84
admin-pc/src/views/popularizeTravel/modules/PopularizeTravelModal.Style#Drawer.vue View File

@ -1,84 +0,0 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<popularize-travel-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></popularize-travel-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import PopularizeTravelForm from './PopularizeTravelForm'
export default {
name: 'PopularizeTravelModal',
components: {
PopularizeTravelForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 3
- 1
module-base/base-core/src/main/java/org/jeecg/common/aspect/DictAspect.java View File

@ -49,7 +49,9 @@ public class DictAspect {
/**
* 定义切点Pointcut
*/
@Pointcut("execution(public * org.jeecg.modules..*.*Controller.*(..)) || @annotation(org.jeecg.common.aspect.annotation.AutoDict)")
@Pointcut("execution(public * org.jeecg.api..*.*Controller.*(..)) ||" +
"execution(public * org.jeecg.modules..*.*Controller.*(..)) || " +
"@annotation(org.jeecg.common.aspect.annotation.AutoDict)")
public void excudeService() {
}


+ 2
- 2
module-common/src/main/java/org/jeecg/api/controller/AppletLoginController.java View File

@ -61,8 +61,8 @@ public class AppletLoginController {
//pc端手机号码验证码登录
@ApiOperation(value="pc端手机号码验证码登录", notes="pc端手机号码验证码登录")
@GetMapping(value = "/phoneLogin")
public Result<Object> phoneLogin(String phone, String code){
return appletLoginService.phoneLogin(phone,code);
public Result<Object> phoneLogin(String phone, String code, String register){
return appletLoginService.phoneLogin(phone, code, register);
}


+ 0
- 4
module-common/src/main/java/org/jeecg/api/controller/AppletMyBookController.java View File

@ -57,10 +57,6 @@ public class AppletMyBookController {
}
//增加或修改作品章节
@ApiOperation(value="增加或修改作品章节", notes="增加或修改作品章节")
@PostMapping(value = "/saveOrUpdateShopNovel")


+ 4
- 0
module-common/src/main/java/org/jeecg/api/service/AppletAchievementService.java View File

@ -17,4 +17,8 @@ public interface AppletAchievementService {
Result<?> getAchievementByBookId(String token, String bookId);
void countBookAchievementLogNum(String author);
}

+ 1
- 1
module-common/src/main/java/org/jeecg/api/service/AppletLoginService.java View File

@ -34,7 +34,7 @@ public interface AppletLoginService {
//pc端手机号码验证码登录
Result<Object> phoneLogin(String phone, String code);
Result<Object> phoneLogin(String phone, String code, String register);
Result<Object> phoneSendCode(String phone);
}

+ 0
- 1
module-common/src/main/java/org/jeecg/api/service/AppletOrderService.java View File

@ -23,7 +23,6 @@ public interface AppletOrderService {
Object payNotify(String requestBody);
//创建支付套餐订单
Result<?> createPayPackageOrder(String token, String packageId, String payType);


+ 52
- 32
module-common/src/main/java/org/jeecg/api/service/impl/AppletAchievementServiceImpl.java View File

@ -3,6 +3,7 @@ package org.jeecg.api.service.impl;
import org.apache.commons.lang3.StringUtils;
import org.jeecg.api.service.AppletAchievementService;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.config.shiro.ShiroRealm;
import org.jeecg.modules.commonBookAchievement.entity.CommonBookAchievement;
import org.jeecg.modules.commonBookAchievement.service.ICommonBookAchievementService;
@ -50,19 +51,9 @@ public class AppletAchievementServiceImpl implements AppletAchievementService {
@Override
public Result<?> setAchievementName(String token, CommonBookAchievementLog bookAchievementLog){
HanHaiMember member = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
CommonBookAchievementLog one = commonBookAchievementLogService.lambdaQuery()
.eq(CommonBookAchievementLog::getUserId, member.getId())
.one();
if(one!=null){
bookAchievementLog.setId(one.getId());
commonBookAchievementLogService.save(bookAchievementLog);
return Result.OK("修改成功");
}else{
bookAchievementLog.setUserId(member.getId());
commonBookAchievementLogService.save(bookAchievementLog);
return Result.OK("设置成功");
}
bookAchievementLog.setUserId(member.getId());
commonBookAchievementLogService.saveOrUpdate(bookAchievementLog);
return Result.OK();
}
//
@ -70,27 +61,52 @@ public class AppletAchievementServiceImpl implements AppletAchievementService {
public Result<?> getAchievement(String token, String bookId){
HanHaiMember member = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
CommonBookAchievementLog one = commonBookAchievementLogService.lambdaQuery()
.eq(CommonBookAchievementLog::getUserId, member.getId())
.one();
//如果对象不为空
// List<CommonBookAchievement> list =commonBookAchievementService.list();
// if(one!=null){
// list.get(0).setName(one.getOneName());
// list.get(0).setOldName(one.getOneOldName());
// list.get(0).setNum(one.getOneNum());
//
// list.get(1).setName(one.getTwoName());
// list.get(1).setOldName(one.getTwoOldName());
// list.get(1).setNum(one.getTwoNum());
//
//
// list.get(2).setName(one.getThreeName());
// list.get(2).setOldName(one.getThreeOldName());
// list.get(2).setNum(one.getThreeNum());
// }
return Result.OK("查询成功",one);
if (one != null){
countBookAchievementLogNum(one);
}
return Result.OK("查询成功", one);
}
@Override
public void countBookAchievementLogNum(String author){
CommonBookAchievementLog one = commonBookAchievementLogService.lambdaQuery()
.eq(CommonBookAchievementLog::getUserId, author)
.one();
if (one != null){
countBookAchievementLogNum(one);
}
}
public void countBookAchievementLogNum(CommonBookAchievementLog one){
List<CommonBookAchievement> list = commonBookAchievementService.lambdaQuery()
.select(CommonBookAchievement::getId)
.orderByAsc(CommonBookAchievement::getNum)
.list();
for (int i = 0; i < list.size(); i++) {
CommonBookAchievement achievement = list.get(i);
Long count = commonRankingService.lambdaQuery()
.eq(CommonRanking::getAuthor, one.getUserId())
.eq(CommonRanking::getLevel, achievement.getId())
.count();
if (i == 0){
one.setOneNum(Math.toIntExact(count));
}else if (i == 1){
one.setTwoNum(Math.toIntExact(count));
}else if (i == 2){
one.setThreeNum(Math.toIntExact(count));
}
}
commonBookAchievementLogService.updateById(one);
}
@Override
@ -100,7 +116,11 @@ public class AppletAchievementServiceImpl implements AppletAchievementService {
CommonShop book = commonShopService.getById(bookId);
CommonRanking intimacyLevel = commonRankingService.getIntimacyLevel(member.getId(), bookId);
if (book == null){
throw new JeecgBootException("书籍不存在");
}
CommonRanking intimacyLevel = commonRankingService.getIntimacyLevel(member.getId(), bookId, book.getUserId());
intimacyLevel.setHanHaiMember(hanHaiMemberService.getById(intimacyLevel.getUserId()));
intimacyLevel.setCommonShop(book);


+ 19
- 11
module-common/src/main/java/org/jeecg/api/service/impl/AppletIndexServiceImpl.java View File

@ -139,8 +139,9 @@ public class AppletIndexServiceImpl implements AppletIndexService {
.lambdaQuery()
.like(StringUtils.isNotBlank(shopCion), CommonShop::getShopCion, shopCion)
.like(StringUtils.isNotBlank(shopClass), CommonShop::getShopClass, shopClass)
.eq(CommonShop::getToolStatus, 1)
.orderByDesc(CommonShop::getCreateTime);
.eq(CommonShop::getToolStatus,1)//设置审核通过
.eq(CommonShop::getBookStatus,0)//上架状态
.orderByDesc(CommonShop::getTuiNum);
//通过作者名称搜素
if (StringUtils.isNotBlank(name)){
@ -162,10 +163,7 @@ public class AppletIndexServiceImpl implements AppletIndexService {
IPage<CommonShop> commonBooks = qw.page(page);
//添加作者
commonBooks.getRecords().forEach(book -> {
HanHaiMember member = hanHaiMemberService.getById(book.getUserId());
book.setAuthor(member.getName());
});
commonBooks.getRecords().forEach(this::addAuthor);
return Result.OK("首页精品推荐小说列表", commonBooks);
}
@ -180,20 +178,29 @@ public class AppletIndexServiceImpl implements AppletIndexService {
.like(StringUtils.isNotBlank(name),CommonShop::getName,name)
.eq(StringUtils.isNotBlank(shopCion),CommonShop::getShopCion,shopCion)
.eq(StringUtils.isNotBlank(shopClass),CommonShop::getShopClass,shopClass)
.eq(CommonShop::getToolStatus,1)
.eq(CommonShop::getToolStatus,1)//设置审核通过
.eq(CommonShop::getBookStatus,0)//上架状态
.orderByDesc(CommonShop::getCreateTime)
.page(page);
//添加作者
commonBooks.getRecords().forEach(book -> {
HanHaiMember member = hanHaiMemberService.getById(book.getUserId());
book.setAuthor(member.getName());
});
commonBooks.getRecords().forEach(this::addAuthor);
return Result.OK("首页最新小说列表",commonBooks);
}
private void addAuthor(CommonShop book){
HanHaiMember member = hanHaiMemberService.lambdaQuery()
.select(HanHaiMember::getName)
.eq(HanHaiMember::getId, book.getUserId())
.one();
if(member != null){
book.setAuthor(member.getName());
}else {
book.setAuthor("无作者");
}
}
@Override
public Result<?> getBookAreaList(){
@ -277,6 +284,7 @@ public class AppletIndexServiceImpl implements AppletIndexService {
)
.eq(CommonBookNovel::getBookId,bookId)
.eq(CommonBookNovel::getStatus, 1)
.eq(CommonBookNovel::getState, 1)
// .orderBy(true, reverse == 0, CommonBookNovel::getSort, CommonBookNovel::getCreateTime)
.page(page);


+ 4
- 3
module-common/src/main/java/org/jeecg/api/service/impl/AppletLoginServiceImpl.java View File

@ -227,7 +227,7 @@ public class AppletLoginServiceImpl implements AppletLoginService {
//pc端手机号码验证码登录
@Override
public Result<Object> phoneLogin(String phone, String code){
public Result<Object> phoneLogin(String phone, String code, String register){
Result<Object> result = new Result<>();
Map<String, Object> map = new HashMap<>();
@ -256,8 +256,9 @@ public class AppletLoginServiceImpl implements AppletLoginService {
// redisUtil.del(cacheKey);
HanHaiMember member = memberService.lambdaQuery().eq(HanHaiMember::getPhone, phone).one();
// 判断用户是否存在
if (member == null) {
if("Y".equals(register) && member == null){
}else if (member == null) {// 判断用户是否存在
throw new JeecgBootException("电话号码不存在:"+phone);
}
// 生成token返回给小程序端


+ 2
- 1
module-common/src/main/java/org/jeecg/api/service/impl/AppletMyBookServiceImpl.java View File

@ -148,6 +148,7 @@ public class AppletMyBookServiceImpl implements AppletMyBookService {
}
commonBookNovel.setBookId(commonShop.getId());
commonBookNovel.setUserId(hanHaiMember.getId());
commonBookNovel.setState(0);
// 自动计算章节字数
if (StringUtils.isNotBlank(commonBookNovel.getDetails())) {
@ -182,7 +183,7 @@ public class AppletMyBookServiceImpl implements AppletMyBookService {
// 更新书籍总字数统计
updateBookTotalWords(commonShop.getId());
return Result.OK("编辑成功!");
return Result.OK(commonBookNovel);
}


+ 13
- 2
module-common/src/main/java/org/jeecg/api/service/impl/AppletOrderServiceImpl.java View File

@ -8,6 +8,7 @@ import com.github.binarywang.wxpay.bean.result.WxPayUnifiedOrderResult;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.jeecg.api.bean.PageBean;
import org.jeecg.api.service.AppletAchievementService;
import org.jeecg.api.service.AppletMoneyLogService;
import org.jeecg.api.service.AppletOrderService;
import org.jeecg.common.api.vo.Result;
@ -18,6 +19,7 @@ import org.jeecg.modules.CommonOrder.entity.CommonOrder;
import org.jeecg.modules.CommonOrder.service.ICommonOrderService;
import org.jeecg.modules.GiveGifts.entity.GiveGifts;
import org.jeecg.modules.GiveGifts.service.IGiveGiftsService;
import org.jeecg.modules.commonBookAchievementLog.entity.CommonBookAchievementLog;
import org.jeecg.modules.commonBookNovel.entity.CommonBookNovel;
import org.jeecg.modules.commonBookNovel.service.ICommonBookNovelService;
import org.jeecg.modules.commonConfig.service.ICommonConfigService;
@ -96,6 +98,9 @@ public class AppletOrderServiceImpl implements AppletOrderService {
@Autowired
private ICommonConfigService commonConfigService;
@Autowired
private AppletAchievementService appletAchievementService;
//查询互动打赏礼物信息列表
@Override
@ -298,7 +303,7 @@ public class AppletOrderServiceImpl implements AppletOrderService {
//增加亲密值
int i = gift.getIntimacyValue() == null ? 0 : gift.getIntimacyValue().intValue();
commonRankingService.addIntimacy(member.getId(), bookId, i);
commonRankingService.addIntimacy(member.getId(), bookId, i, shop.getUserId());
shop.setQmNum(shop.getQmNum() + i);
commonShopService.updateById(shop);
@ -312,6 +317,9 @@ public class AppletOrderServiceImpl implements AppletOrderService {
.userId(member.getId())
.build());
//更新数量统计
appletAchievementService.countBookAchievementLogNum(shop.getUserId());
return Result.OK("赠送礼物成功");
}
@ -400,7 +408,7 @@ public class AppletOrderServiceImpl implements AppletOrderService {
hanHaiMemberService.updateById(member);
//增加亲密值
commonRankingService.addIntimacy(member.getId(), bookId, totalCost);
commonRankingService.addIntimacy(member.getId(), bookId, totalCost, book.getUserId());
book.setQmNum(book.getQmNum() + totalCost);
commonShopService.updateById(book);
@ -415,6 +423,9 @@ public class AppletOrderServiceImpl implements AppletOrderService {
.userId(member.getId())
.build());
//更新数量统计
appletAchievementService.countBookAchievementLogNum(book.getUserId());
return Result.OK("批量购买成功,共订阅" + chaptersToSubscribe.size() + "个章节");
}


+ 0
- 213
module-common/src/main/java/org/jeecg/common/sms/JAVA8_COMPATIBILITY.md View File

@ -1,213 +0,0 @@
# Java 8 兼容性修改说明
## 问题描述
原始的短信服务类使用了 Java 11 的 `java.net.http` 包,导致在 Java 8 环境下编译失败:
```
java: 程序包java.net.http不存在
```
## 解决方案
### 1. 替换 HTTP 客户端
**原始代码(Java 11)**:
```java
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
private final HttpClient httpClient = HttpClient.newHttpClient();
private String sendHttpRequest(SmsRequest request) throws IOException, InterruptedException {
String jsonBody = objectMapper.writeValueAsString(request);
HttpRequest httpRequest = HttpRequest.newBuilder()
.uri(URI.create(smsConfig.getApiUrl()))
.header("Accept", "application/json")
.header("Content-Type", "application/json;charset=utf-8")
.POST(HttpRequest.BodyPublishers.ofString(jsonBody))
.build();
HttpResponse<String> response = httpClient.send(httpRequest, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() != 200) {
throw new IOException("HTTP请求失败,状态码:" + response.statusCode());
}
return response.body();
}
```
**修改后的代码(Java 8 兼容)**:
```java
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
private String sendHttpRequest(SmsRequest request) throws IOException {
String jsonBody = objectMapper.writeValueAsString(request);
URL url = new URL(smsConfig.getApiUrl());
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
try {
// 设置请求方法和属性
connection.setRequestMethod("POST");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("Content-Type", "application/json;charset=utf-8");
connection.setDoOutput(true);
connection.setDoInput(true);
connection.setUseCaches(false);
// 发送请求体
try (DataOutputStream os = new DataOutputStream(connection.getOutputStream())) {
byte[] input = jsonBody.getBytes(StandardCharsets.UTF_8);
os.write(input, 0, input.length);
os.flush();
}
// 检查响应状态码
int responseCode = connection.getResponseCode();
if (responseCode != 200) {
throw new IOException("HTTP请求失败,状态码:" + responseCode);
}
// 读取响应
try (BufferedReader br = new BufferedReader(
new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
StringBuilder response = new StringBuilder();
String responseLine;
while ((responseLine = br.readLine()) != null) {
response.append(responseLine.trim());
}
return response.toString();
}
} finally {
connection.disconnect();
}
}
```
### 2. 修改异常处理
**原始代码**:
```java
} catch (Exception e) {
logger.error("短信发送失败", e);
// ...
}
```
**修改后**:
```java
} catch (IOException e) {
logger.error("短信发送网络异常", e);
SmsResponse errorResponse = new SmsResponse();
errorResponse.setCode(-1);
errorResponse.setMessage("网络异常:" + e.getMessage());
return errorResponse;
} catch (Exception e) {
logger.error("短信发送失败", e);
// ...
}
```
## 主要变更
### ✅ 移除的 Java 11 特性
1. `java.net.http.HttpClient`
2. `java.net.http.HttpRequest`
3. `java.net.http.HttpResponse`
4. `InterruptedException` 异常处理
### ✅ 使用的 Java 8 兼容特性
1. `java.net.HttpURLConnection` - 传统的 HTTP 客户端
2. `java.io.*` 类进行流处理
3. `java.nio.charset.StandardCharsets` - UTF-8 编码
4. try-with-resources 语句(Java 7+)
## 兼容性说明
### ✅ 支持的 Java 版本
- Java 8+
- Java 11+
- Java 17+
### 📊 性能对比
| 特性 | Java 11 HttpClient | Java 8 HttpURLConnection |
|------|-------------------|---------------------------|
| **连接池** | 内置 | 需要手动管理 |
| **异步支持** | 原生支持 | 需要额外实现 |
| **HTTP/2** | 支持 | 不支持 |
| **内存使用** | 较高 | 较低 |
| **兼容性** | Java 11+ | Java 1.1+ |
### 🔧 功能保持
- ✅ POST 请求发送
- ✅ JSON 请求体
- ✅ HTTP 头设置
- ✅ 响应状态码检查
- ✅ 响应内容读取
- ✅ 连接管理
- ✅ 错误处理
## 测试建议
### 单元测试
```java
@Test
public void testSendSms() {
SmsService smsService = new SmsService();
SmsResponse response = smsService.sendSms("13800138000", "测试消息");
assertNotNull(response);
}
```
### 集成测试
1. 验证 HTTP 请求格式是否正确
2. 测试网络异常处理
3. 验证响应解析功能
## 后续升级建议
如果将来项目升级到 Java 11+,可以考虑以下优化:
### 1. 重新启用 Java 11 HttpClient
```java
// 可选:使用连接池提升性能
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
```
### 2. 异步发送支持
```java
// 异步发送短信
CompletableFuture<SmsResponse> future = smsService.sendSmsAsync(phone, content);
```
### 3. HTTP/2 支持
```java
// 启用 HTTP/2
HttpClient client = HttpClient.newBuilder()
.version(HttpClient.Version.HTTP_2)
.build();
```
## 注意事项
1. **连接管理**: 确保在 `finally` 块中调用 `connection.disconnect()`
2. **编码处理**: 使用 `StandardCharsets.UTF_8` 确保字符编码正确
3. **资源释放**: 使用 try-with-resources 自动关闭流
4. **超时设置**: 可以通过 `connection.setConnectTimeout()` 设置连接超时
## 总结
通过将 Java 11 的 `java.net.http` 替换为 Java 8 兼容的 `HttpURLConnection`,成功解决了编译错误,同时保持了所有原有功能。修改后的代码在 Java 8+ 环境下都能正常运行。

+ 24
- 0
module-common/src/main/java/org/jeecg/modules/commonBookAchievement/controller/CommonBookAchievementController.java View File

@ -72,6 +72,30 @@ public class CommonBookAchievementController extends JeecgController<CommonBookA
return Result.OK(pageList);
}
/**
* 分页列表查询只查询待审核状态
*
* @param commonBookAchievement
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "读者成就-分页列表查询(待审核)")
@ApiOperation(value="读者成就-分页列表查询(待审核)", notes="读者成就-分页列表查询(待审核)")
@GetMapping(value = "/listState")
public Result<IPage<CommonBookAchievement>> queryPageListState(CommonBookAchievement commonBookAchievement,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<CommonBookAchievement> queryWrapper = QueryGenerator.initQueryWrapper(commonBookAchievement, req.getParameterMap());
// 只查询待审核的成就
queryWrapper.eq("state", 0);
Page<CommonBookAchievement> page = new Page<CommonBookAchievement>(pageNo, pageSize);
IPage<CommonBookAchievement> pageList = commonBookAchievementService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*


+ 127
- 0
module-common/src/main/java/org/jeecg/modules/commonBookAchievementLog/controller/CommonBookAchievementLogController.java View File

@ -72,6 +72,30 @@ public class CommonBookAchievementLogController extends JeecgController<CommonBo
return Result.OK(pageList);
}
/**
* 分页列表查询只查询待审核状态
*
* @param commonBookAchievementLog
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "成就设置日志-分页列表查询(待审核)")
@ApiOperation(value="成就设置日志-分页列表查询(待审核)", notes="成就设置日志-分页列表查询(待审核)")
@GetMapping(value = "/listState")
public Result<IPage<CommonBookAchievementLog>> queryPageListState(CommonBookAchievementLog commonBookAchievementLog,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<CommonBookAchievementLog> queryWrapper = QueryGenerator.initQueryWrapper(commonBookAchievementLog, req.getParameterMap());
// 只查询待审核的成就设置日志
queryWrapper.eq("status", "0");
Page<CommonBookAchievementLog> page = new Page<CommonBookAchievementLog>(pageNo, pageSize);
IPage<CommonBookAchievementLog> pageList = commonBookAchievementLogService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
@ -168,4 +192,107 @@ public class CommonBookAchievementLogController extends JeecgController<CommonBo
return super.importExcel(request, response, CommonBookAchievementLog.class);
}
/**
* 审核通过
*
* @param id
* @return
*/
@AutoLog(value = "成就设置日志-审核通过")
@ApiOperation(value="成就设置日志-审核通过", notes="成就设置日志-审核通过")
@PostMapping(value = "/approve")
public Result<String> approve(@RequestBody Map<String, Object> params) {
String id = (String) params.get("id");
if (oConvertUtils.isEmpty(id)) {
return Result.error("参数错误");
}
CommonBookAchievementLog achievementLog = commonBookAchievementLogService.getById(id);
if (achievementLog == null) {
return Result.error("成就设置日志不存在");
}
achievementLog.setStatus("1"); // 设置为已通过
achievementLog.setOneOldName(achievementLog.getOneName());
achievementLog.setTwoOldName(achievementLog.getTwoName());
achievementLog.setThreeOldName(achievementLog.getThreeName());
commonBookAchievementLogService.updateById(achievementLog);
return Result.OK("审核通过成功!");
}
/**
* 审核拒绝
*
* @param id
* @return
*/
@AutoLog(value = "成就设置日志-审核拒绝")
@ApiOperation(value="成就设置日志-审核拒绝", notes="成就设置日志-审核拒绝")
@PostMapping(value = "/reject")
public Result<String> reject(@RequestBody Map<String, Object> params) {
String id = (String) params.get("id");
if (oConvertUtils.isEmpty(id)) {
return Result.error("参数错误");
}
CommonBookAchievementLog achievementLog = commonBookAchievementLogService.getById(id);
if (achievementLog == null) {
return Result.error("成就设置日志不存在");
}
achievementLog.setStatus("2"); // 设置为已拒绝
commonBookAchievementLogService.updateById(achievementLog);
return Result.OK("审核拒绝成功!");
}
/**
* 批量审核通过
*
* @param ids
* @return
*/
@AutoLog(value = "成就设置日志-批量审核通过")
@ApiOperation(value="成就设置日志-批量审核通过", notes="成就设置日志-批量审核通过")
@PostMapping(value = "/batchApprove")
public Result<String> batchApprove(@RequestBody Map<String, Object> params) {
List<String> ids = (List<String>) params.get("ids");
if (ids == null || ids.isEmpty()) {
return Result.error("参数错误");
}
List<CommonBookAchievementLog> achievementLogs = commonBookAchievementLogService.listByIds(ids);
for (CommonBookAchievementLog achievementLog : achievementLogs) {
achievementLog.setStatus("1"); // 设置为已通过
achievementLog.setOneOldName(achievementLog.getOneName());
achievementLog.setTwoOldName(achievementLog.getTwoName());
achievementLog.setThreeOldName(achievementLog.getThreeName());
}
commonBookAchievementLogService.updateBatchById(achievementLogs);
return Result.OK("批量审核通过成功!");
}
/**
* 批量审核拒绝
*
* @param ids
* @return
*/
@AutoLog(value = "成就设置日志-批量审核拒绝")
@ApiOperation(value="成就设置日志-批量审核拒绝", notes="成就设置日志-批量审核拒绝")
@PostMapping(value = "/batchReject")
public Result<String> batchReject(@RequestBody Map<String, Object> params) {
List<String> ids = (List<String>) params.get("ids");
if (ids == null || ids.isEmpty()) {
return Result.error("参数错误");
}
List<CommonBookAchievementLog> achievementLogs = commonBookAchievementLogService.listByIds(ids);
for (CommonBookAchievementLog achievementLog : achievementLogs) {
achievementLog.setStatus("2"); // 设置为已拒绝
}
commonBookAchievementLogService.updateBatchById(achievementLogs);
return Result.OK("批量审核拒绝成功!");
}
}

+ 2
- 1
module-common/src/main/java/org/jeecg/modules/commonBookAchievementLog/entity/CommonBookAchievementLog.java View File

@ -58,7 +58,8 @@ public class CommonBookAchievementLog implements Serializable {
@ApiModelProperty(value = "关联书籍")
private java.lang.String bookId;
/**审核状态*/
@Excel(name = "审核状态", width = 15)
@Excel(name = "审核状态", width = 15, dicCode = "achievement_log_status")
@Dict(dicCode = "achievement_log_status")
@ApiModelProperty(value = "审核状态")
private java.lang.String status;
/**一级成就名称*/


+ 121
- 0
module-common/src/main/java/org/jeecg/modules/commonBookNovel/controller/CommonBookNovelController.java View File

@ -49,6 +49,30 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class CommonBookNovelController extends JeecgController<CommonBookNovel, ICommonBookNovelService> {
@Autowired
private ICommonBookNovelService commonBookNovelService;
/**
* 分页列表查询
*
* @param commonBookNovel
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "小说章节表-分页列表查询")
@ApiOperation(value="小说章节表-分页列表查询", notes="小说章节表-分页列表查询")
@GetMapping(value = "/listState")
public Result<IPage<CommonBookNovel>> queryPageListsState(CommonBookNovel commonBookNovel,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<CommonBookNovel> queryWrapper = QueryGenerator.initQueryWrapper(commonBookNovel, req.getParameterMap());
// 只查询未审核的章节
queryWrapper.eq("state", 0);
Page<CommonBookNovel> page = new Page<CommonBookNovel>(pageNo, pageSize);
IPage<CommonBookNovel> pageList = commonBookNovelService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 分页列表查询
@ -67,6 +91,7 @@ public class CommonBookNovelController extends JeecgController<CommonBookNovel,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<CommonBookNovel> queryWrapper = QueryGenerator.initQueryWrapper(commonBookNovel, req.getParameterMap());
// 只查询未审核的章节
Page<CommonBookNovel> page = new Page<CommonBookNovel>(pageNo, pageSize);
IPage<CommonBookNovel> pageList = commonBookNovelService.page(page, queryWrapper);
return Result.OK(pageList);
@ -168,4 +193,100 @@ public class CommonBookNovelController extends JeecgController<CommonBookNovel,
return super.importExcel(request, response, CommonBookNovel.class);
}
/**
* 审核通过
*
* @param id
* @return
*/
@AutoLog(value = "小说章节表-审核通过")
@ApiOperation(value="小说章节表-审核通过", notes="小说章节表-审核通过")
@PostMapping(value = "/approve")
public Result<String> approve(@RequestBody Map<String, Object> params) {
String id = (String) params.get("id");
if (oConvertUtils.isEmpty(id)) {
return Result.error("参数错误");
}
CommonBookNovel novel = commonBookNovelService.getById(id);
if (novel == null) {
return Result.error("章节不存在");
}
novel.setState(1); // 设置为已通过
commonBookNovelService.updateById(novel);
return Result.OK("审核通过成功!");
}
/**
* 审核拒绝
*
* @param id
* @return
*/
@AutoLog(value = "小说章节表-审核拒绝")
@ApiOperation(value="小说章节表-审核拒绝", notes="小说章节表-审核拒绝")
@PostMapping(value = "/reject")
public Result<String> reject(@RequestBody Map<String, Object> params) {
String id = (String) params.get("id");
if (oConvertUtils.isEmpty(id)) {
return Result.error("参数错误");
}
CommonBookNovel novel = commonBookNovelService.getById(id);
if (novel == null) {
return Result.error("章节不存在");
}
novel.setState(2); // 设置为已拒绝
commonBookNovelService.updateById(novel);
return Result.OK("审核拒绝成功!");
}
/**
* 批量审核通过
*
* @param ids
* @return
*/
@AutoLog(value = "小说章节表-批量审核通过")
@ApiOperation(value="小说章节表-批量审核通过", notes="小说章节表-批量审核通过")
@PostMapping(value = "/batchApprove")
public Result<String> batchApprove(@RequestBody Map<String, Object> params) {
List<String> ids = (List<String>) params.get("ids");
if (ids == null || ids.isEmpty()) {
return Result.error("参数错误");
}
List<CommonBookNovel> novels = commonBookNovelService.listByIds(ids);
for (CommonBookNovel novel : novels) {
novel.setState(1); // 设置为已通过
}
commonBookNovelService.updateBatchById(novels);
return Result.OK("批量审核通过成功!");
}
/**
* 批量审核拒绝
*
* @param ids
* @return
*/
@AutoLog(value = "小说章节表-批量审核拒绝")
@ApiOperation(value="小说章节表-批量审核拒绝", notes="小说章节表-批量审核拒绝")
@PostMapping(value = "/batchReject")
public Result<String> batchReject(@RequestBody Map<String, Object> params) {
List<String> ids = (List<String>) params.get("ids");
if (ids == null || ids.isEmpty()) {
return Result.error("参数错误");
}
List<CommonBookNovel> novels = commonBookNovelService.listByIds(ids);
for (CommonBookNovel novel : novels) {
novel.setState(2); // 设置为已拒绝
}
commonBookNovelService.updateBatchById(novels);
return Result.OK("批量审核拒绝成功!");
}
}

+ 6
- 0
module-common/src/main/java/org/jeecg/modules/commonBookNovel/entity/CommonBookNovel.java View File

@ -51,10 +51,12 @@ public class CommonBookNovel implements Serializable {
/**用户标识*/
@Excel(name = "用户标识", width = 15)
@ApiModelProperty(value = "用户标识")
@Dict(dictTable = "han_hai_member", dicText = "nick_name", dicCode = "id")
private java.lang.String userId;
/**所属小说*/
@Excel(name = "所属小说", width = 15)
@ApiModelProperty(value = "所属小说")
@Dict(dictTable = "common_shop", dicText = "name", dicCode = "id")
private java.lang.String bookId;
/**章节名称*/
@Excel(name = "章节名称", width = 15)
@ -63,6 +65,7 @@ public class CommonBookNovel implements Serializable {
/**章节状态*/
@Excel(name = "章节状态", width = 15)
@ApiModelProperty(value = "章节状态")
@Dict(dicCode = "novel_status")
private java.lang.Integer status;
/**章节内容*/
@Excel(name = "章节内容", width = 15)
@ -81,6 +84,9 @@ public class CommonBookNovel implements Serializable {
@ApiModelProperty(value = "排序")
private java.lang.Integer sort;
@Dict(dicCode = "book_status")
private Integer state;//审核状态
@TableField(exist = false)
private Boolean pay;
}

+ 2
- 0
module-common/src/main/java/org/jeecg/modules/commonRanking/entity/CommonRanking.java View File

@ -75,6 +75,8 @@ public class CommonRanking implements Serializable {
@ApiModelProperty(value = "图标")
private java.lang.String icon;
private String author;//作者
//用户对象
@TableField (exist = false)


+ 2
- 2
module-common/src/main/java/org/jeecg/modules/commonRanking/service/ICommonRankingService.java View File

@ -18,12 +18,12 @@ public interface ICommonRankingService extends IService<CommonRanking> {
* @param bookId 书籍id
* @param intimacyValue 亲密值
*/
void addIntimacy(String userId, String bookId, Integer intimacyValue);
void addIntimacy(String userId, String bookId, Integer intimacyValue, String author);
/**
* 获取用户在该书的亲密等级
* @param userId 用户id
* @param bookId 书籍id
*/
CommonRanking getIntimacyLevel(String userId, String bookId);
CommonRanking getIntimacyLevel(String userId, String bookId, String author);
}

+ 13
- 8
module-common/src/main/java/org/jeecg/modules/commonRanking/service/impl/CommonRankingServiceImpl.java View File

@ -6,6 +6,7 @@ import org.jeecg.modules.commonBookAchievement.service.ICommonBookAchievementSer
import org.jeecg.modules.commonRanking.entity.CommonRanking;
import org.jeecg.modules.commonRanking.mapper.CommonRankingMapper;
import org.jeecg.modules.commonRanking.service.ICommonRankingService;
import org.jeecg.modules.commonShop.service.ICommonShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -24,6 +25,8 @@ public class CommonRankingServiceImpl extends ServiceImpl<CommonRankingMapper, C
@Autowired
private ICommonBookAchievementService commonBookAchievementService;
@Autowired
private ICommonShopService commonShopService;
/**
* 增加亲密值
@ -32,14 +35,14 @@ public class CommonRankingServiceImpl extends ServiceImpl<CommonRankingMapper, C
* @param intimacyValue 亲密值
*/
@Override
public void addIntimacy(String userId, String bookId, Integer intimacyValue) {
public void addIntimacy(String userId, String bookId, Integer intimacyValue, String author) {
CommonRanking one = lambdaQuery()
.eq(CommonRanking::getUserId, userId)
.eq(CommonRanking::getBookId, bookId).one();
if (ObjectUtils.isEmpty(one)){
one = getIntimacyLevel(userId, bookId);
one = getIntimacyLevel(userId, bookId, author);
}
one.setNum(one.getNum() + intimacyValue);
@ -60,11 +63,12 @@ public class CommonRankingServiceImpl extends ServiceImpl<CommonRankingMapper, C
throw new RuntimeException("成就等级为空");
}
// TODO 这里需要计算等级
CommonBookAchievement achievement = list.get(0);
one.setLevel(achievement.getId());
one.setIcon(achievement.getImage());
for (CommonBookAchievement achievement : list) {
if(achievement.getIntimacyValueCondition() <= one.getNum()){
one.setLevel(achievement.getId());
one.setIcon(achievement.getImage());
}
}
}
@ -74,7 +78,7 @@ public class CommonRankingServiceImpl extends ServiceImpl<CommonRankingMapper, C
* @param userId 用户id
* @param bookId 书籍id
*/
public CommonRanking getIntimacyLevel(String userId, String bookId){
public CommonRanking getIntimacyLevel(String userId, String bookId, String author){
CommonRanking one = lambdaQuery()
.eq(CommonRanking::getUserId, userId)
@ -85,6 +89,7 @@ public class CommonRankingServiceImpl extends ServiceImpl<CommonRankingMapper, C
one.setNum(0);//亲密值
one.setUserId(userId);
one.setBookId(bookId);
one.setAuthor(author);
calculateIntimacyLevel(one);
save(one);
}


+ 3
- 3
module-common/src/main/java/org/jeecg/modules/commonShop/entity/CommonShop.java View File

@ -71,7 +71,7 @@ public class CommonShop implements Serializable {
private java.lang.String image;
/**完结状态*/
@Excel(name = "完结状态", width = 15, dicCode = "book_my_status")
@Dict(dicCode = "book_my_status")
@Dict(dicCode = "book_end_status")
@ApiModelProperty(value = "完结状态")
private java.lang.Integer status;
/**标签说明*/
@ -101,10 +101,10 @@ public class CommonShop implements Serializable {
@ApiModelProperty(value = "设置状态")
private java.lang.Integer toolStatus;
/**作品状态*/
@Excel(name = "作品状态", width = 15, dicCode = "book_my_status")
@Excel(name = "作品状态", width = 15, dicCode = "book_end_status")
@Dict(dicCode = "book_my_status")
@ApiModelProperty(value = "作品状态")
private java.lang.Integer bookStatus;
private java.lang.Integer bookStatus;//0上架 1下架
@Excel(name = "是否原创", width = 15)
@ApiModelProperty(value = "是否原创")


Loading…
Cancel
Save