| @ -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: 初始版本 | |||
| ========================================== | |||
| @ -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> | |||
| @ -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> | |||
| @ -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>--> | |||
| <!-- <!– 高级查询区域 –>--> | |||
| <!-- <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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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>--> | |||
| <!-- <!– 高级查询区域 –>--> | |||
| <!-- <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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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>--> | |||
| <!-- <!– 高级查询区域 –>--> | |||
| <!-- <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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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>--> | |||
| <!-- <!– 高级查询区域 –>--> | |||
| <!-- <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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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>--> | |||
| <!-- <!– 高级查询区域 –>--> | |||
| <!-- <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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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+ 环境下都能正常运行。 | |||