Compare commits
10 Commits
494e3ee248
...
019ed28d37
| Author | SHA1 | Date | |
|---|---|---|---|
| 019ed28d37 | |||
| 95d43746f6 | |||
|
|
963b239333 | ||
|
|
aa56030cbd | ||
|
|
08f83ed015 | ||
|
|
726bb3c163 | ||
|
|
e6caabbba8 | ||
|
|
25864fb449 | ||
|
|
6452b887dc | ||
|
|
aac8dc687d |
@@ -1,3 +1,3 @@
|
|||||||
VITE_APP_NAME=后台管理系统
|
VITE_APP_NAME=后台管理系统
|
||||||
VITE_API_URL=http://127.0.0.1:10041/api
|
VITE_API_URL=http://127.0.0.1:10051/api
|
||||||
#VITE_API_URL=http://1.14.159.185:10041/api
|
#VITE_API_URL=https://tuanwei-api.gxwebsoft.com/api
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
VITE_APP_NAME=后台管理系统
|
VITE_APP_NAME=后台管理系统
|
||||||
VITE_API_URL=http://1.14.159.185:10041/api
|
VITE_API_URL=https://tuanwei-api.gxwebsoft.com/api
|
||||||
|
|||||||
52
docs/sql/gxmu_college_class.sql
Normal file
52
docs/sql/gxmu_college_class.sql
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
-- 学院管理、班级管理建表脚本
|
||||||
|
-- 班级绑定在学院下,一学院对应多班级
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `gxmu_class`;
|
||||||
|
DROP TABLE IF EXISTS `gxmu_college`;
|
||||||
|
|
||||||
|
CREATE TABLE `gxmu_college` (
|
||||||
|
`id` INT NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||||
|
`college_code` VARCHAR(64) NOT NULL COMMENT '学院编码',
|
||||||
|
`college_name` VARCHAR(100) NOT NULL COMMENT '学院名称',
|
||||||
|
`short_name` VARCHAR(100) DEFAULT NULL COMMENT '学院简称',
|
||||||
|
`leader_name` VARCHAR(50) DEFAULT NULL COMMENT '负责人',
|
||||||
|
`leader_phone` VARCHAR(30) DEFAULT NULL COMMENT '负责人电话',
|
||||||
|
`sort_number` INT DEFAULT 0 COMMENT '排序号',
|
||||||
|
`status` TINYINT DEFAULT 1 COMMENT '状态:1启用 0停用',
|
||||||
|
`remark` VARCHAR(500) DEFAULT NULL COMMENT '备注',
|
||||||
|
`tenant_id` INT DEFAULT NULL COMMENT '租户ID',
|
||||||
|
`create_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
`deleted` TINYINT DEFAULT 0 COMMENT '删除标记:0未删 1已删',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
UNIQUE KEY `uk_gxmu_college_code_tenant` (`college_code`, `tenant_id`),
|
||||||
|
UNIQUE KEY `uk_gxmu_college_name_tenant` (`college_name`, `tenant_id`),
|
||||||
|
KEY `idx_gxmu_college_status` (`status`),
|
||||||
|
KEY `idx_gxmu_college_sort` (`sort_number`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='学院管理表';
|
||||||
|
|
||||||
|
CREATE TABLE `gxmu_class` (
|
||||||
|
`id` INT NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||||
|
`college_id` INT NOT NULL COMMENT '学院ID',
|
||||||
|
`class_code` VARCHAR(64) NOT NULL COMMENT '班级编码',
|
||||||
|
`class_name` VARCHAR(100) NOT NULL COMMENT '班级名称',
|
||||||
|
`grade_year` INT DEFAULT NULL COMMENT '年级',
|
||||||
|
`counselor_name` VARCHAR(50) DEFAULT NULL COMMENT '辅导员姓名',
|
||||||
|
`counselor_phone` VARCHAR(30) DEFAULT NULL COMMENT '辅导员电话',
|
||||||
|
`student_count` INT DEFAULT 0 COMMENT '学生人数',
|
||||||
|
`sort_number` INT DEFAULT 0 COMMENT '排序号',
|
||||||
|
`status` TINYINT DEFAULT 1 COMMENT '状态:1启用 0停用',
|
||||||
|
`remark` VARCHAR(500) DEFAULT NULL COMMENT '备注',
|
||||||
|
`tenant_id` INT DEFAULT NULL COMMENT '租户ID',
|
||||||
|
`create_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
`deleted` TINYINT DEFAULT 0 COMMENT '删除标记:0未删 1已删',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
UNIQUE KEY `uk_gxmu_class_code_tenant` (`class_code`, `tenant_id`),
|
||||||
|
UNIQUE KEY `uk_gxmu_class_name_college_tenant` (`college_id`, `class_name`, `tenant_id`),
|
||||||
|
KEY `idx_gxmu_class_college_id` (`college_id`),
|
||||||
|
KEY `idx_gxmu_class_status` (`status`),
|
||||||
|
KEY `idx_gxmu_class_grade_year` (`grade_year`),
|
||||||
|
CONSTRAINT `fk_gxmu_class_college_id`
|
||||||
|
FOREIGN KEY (`college_id`) REFERENCES `gxmu_college` (`id`) ON UPDATE CASCADE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='班级管理表';
|
||||||
25
docs/sql/gxmu_declare_migration.sql
Normal file
25
docs/sql/gxmu_declare_migration.sql
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
-- /gxmu/declare 挑战杯配置多值化迁移
|
||||||
|
-- 目标:
|
||||||
|
-- 1. 申报管理中的 project_type / project_group 支持保存多个自定义值
|
||||||
|
-- 2. 存储格式采用 JSON 数组字符串,尽量减少后端实体和前端兼容成本
|
||||||
|
|
||||||
|
ALTER TABLE `gxmu_declare`
|
||||||
|
MODIFY COLUMN `project_type` TEXT NULL COMMENT '挑战杯项目类型(JSON数组字符串)',
|
||||||
|
MODIFY COLUMN `project_group` TEXT NULL COMMENT '挑战杯项目分组(JSON数组字符串)';
|
||||||
|
|
||||||
|
-- 历史单值数据迁移为 JSON 数组字符串,仅处理挑战杯模块记录
|
||||||
|
UPDATE `gxmu_declare`
|
||||||
|
SET `project_type` = JSON_ARRAY(`project_type`)
|
||||||
|
WHERE `module` = 'gxmu_tzbcy_form'
|
||||||
|
AND `project_type` IS NOT NULL
|
||||||
|
AND `project_type` <> ''
|
||||||
|
AND JSON_VALID(`project_type`) = 0;
|
||||||
|
|
||||||
|
UPDATE `gxmu_declare`
|
||||||
|
SET `project_group` = JSON_ARRAY(`project_group`)
|
||||||
|
WHERE `module` = 'gxmu_tzbcy_form'
|
||||||
|
AND `project_group` IS NOT NULL
|
||||||
|
AND `project_group` <> ''
|
||||||
|
AND JSON_VALID(`project_group`) = 0;
|
||||||
|
|
||||||
|
-- 挑战杯申报表 gxmu_tzbcy_form 的 project_type / project_group 仍为单值字段,无需改表。
|
||||||
490
docs/sql/gxmu_mysql.sql
Normal file
490
docs/sql/gxmu_mysql.sql
Normal file
@@ -0,0 +1,490 @@
|
|||||||
|
-- 基于 src/views/gxmu 各模块页面字段推导的 MySQL 建表脚本
|
||||||
|
-- 说明:/gxmu/declare 中挑战杯的 project_type / project_group 多值配置迁移脚本见 docs/sql/gxmu_declare_migration.sql
|
||||||
|
-- 说明:
|
||||||
|
-- 1. 页面中大量“日期/数量/金额”字段当前是自由文本输入,示例值包含“2022年6月”“1000人”“400元”“5次”等单位。
|
||||||
|
-- 为兼容现有前端录入方式,这些字段优先保留为 VARCHAR,而不是 DATE / INT / DECIMAL。
|
||||||
|
-- 2. 若后续需要做严格统计分析,建议在后端增加字段校验后,再把对应列调整为数值或日期类型。
|
||||||
|
-- 3. 复杂模块 TZBCY / WXXZX 已拆成主表 + 明细子表,便于查询、导出和扩展。
|
||||||
|
|
||||||
|
SET NAMES utf8mb4;
|
||||||
|
SET FOREIGN_KEY_CHECKS = 0;
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `gxmu_wxxzx_review_member`;
|
||||||
|
DROP TABLE IF EXISTS `gxmu_wxxzx_budget`;
|
||||||
|
DROP TABLE IF EXISTS `gxmu_wxxzx_applicant`;
|
||||||
|
DROP TABLE IF EXISTS `gxmu_wxxzx_guidance_teacher`;
|
||||||
|
DROP TABLE IF EXISTS `gxmu_wxxzx_project`;
|
||||||
|
DROP TABLE IF EXISTS `gxmu_tzbcy_advisor`;
|
||||||
|
DROP TABLE IF EXISTS `gxmu_tzbcy_team_member`;
|
||||||
|
DROP TABLE IF EXISTS `gxmu_tzbcy_project`;
|
||||||
|
DROP TABLE IF EXISTS `gxmu_wshqtzb`;
|
||||||
|
DROP TABLE IF EXISTS `gxmu_wshqtw`;
|
||||||
|
DROP TABLE IF EXISTS `gxmu_yxgqtdgb`;
|
||||||
|
DROP TABLE IF EXISTS `gxmu_yxgqty`;
|
||||||
|
DROP TABLE IF EXISTS `gxmu_sjtbzbsj`;
|
||||||
|
DROP TABLE IF EXISTS `gxmu_sjqn`;
|
||||||
|
DROP TABLE IF EXISTS `gxmu_qmgc_form`;
|
||||||
|
DROP TABLE IF EXISTS `gxmu_tygl_form`;
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `gxmu_sjqn`;
|
||||||
|
CREATE TABLE `gxmu_sjqn` (
|
||||||
|
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
|
`apply_type` VARCHAR(64) NOT NULL COMMENT '申报类别',
|
||||||
|
`name` VARCHAR(64) NOT NULL COMMENT '姓名',
|
||||||
|
`gender` VARCHAR(16) DEFAULT NULL COMMENT '性别',
|
||||||
|
`birth_month` VARCHAR(32) DEFAULT NULL COMMENT '出生年月',
|
||||||
|
`nation` VARCHAR(32) DEFAULT NULL COMMENT '民族',
|
||||||
|
`politics` VARCHAR(32) DEFAULT NULL COMMENT '政治面貌',
|
||||||
|
`education` VARCHAR(32) DEFAULT NULL COMMENT '学历',
|
||||||
|
`position` VARCHAR(128) DEFAULT NULL COMMENT '职务',
|
||||||
|
`job_title` VARCHAR(128) DEFAULT NULL COMMENT '职称',
|
||||||
|
`unit_name` VARCHAR(255) DEFAULT NULL COMMENT '所在单位',
|
||||||
|
`awards` TEXT COMMENT '近三年曾获校级及以上奖励',
|
||||||
|
`experience` TEXT COMMENT '工作(学习)经历',
|
||||||
|
`main_story` TEXT COMMENT '主要事迹',
|
||||||
|
`league_opinion` TEXT COMMENT '所在二级团组织意见',
|
||||||
|
`party_opinion` TEXT COMMENT '所在单位党组织意见',
|
||||||
|
`school_opinion` TEXT COMMENT '校团委意见',
|
||||||
|
`submit_status` TINYINT NOT NULL DEFAULT 0 COMMENT '提交状态:0草稿 1已提交',
|
||||||
|
`sort_no` INT NOT NULL DEFAULT 0 COMMENT '排序号',
|
||||||
|
`remark` VARCHAR(500) DEFAULT NULL COMMENT '备注',
|
||||||
|
`user_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '用户ID',
|
||||||
|
`tenant_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '租户ID',
|
||||||
|
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
`deleted` TINYINT NOT NULL DEFAULT 0 COMMENT '删除标记:0未删 1已删',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `idx_gxmu_sjqn_name` (`name`),
|
||||||
|
KEY `idx_gxmu_sjqn_apply_type` (`apply_type`),
|
||||||
|
KEY `idx_gxmu_sjqn_unit_name` (`unit_name`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='共青模块-十佳青年';
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `gxmu_sjtbzbsj`;
|
||||||
|
CREATE TABLE `gxmu_sjtbzbsj` (
|
||||||
|
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
|
`name` VARCHAR(64) NOT NULL COMMENT '姓名',
|
||||||
|
`gender` VARCHAR(16) DEFAULT NULL COMMENT '性别',
|
||||||
|
`birth_month` VARCHAR(32) DEFAULT NULL COMMENT '出生年月',
|
||||||
|
`nation` VARCHAR(32) DEFAULT NULL COMMENT '民族',
|
||||||
|
`politics` VARCHAR(32) DEFAULT NULL COMMENT '政治面貌',
|
||||||
|
`college_class` VARCHAR(255) DEFAULT NULL COMMENT '学院班级/单位科室',
|
||||||
|
`branch_name` VARCHAR(255) DEFAULT NULL COMMENT '所在团支部',
|
||||||
|
`edu_eval` VARCHAR(64) DEFAULT NULL COMMENT '2024年度团员教育评议等次',
|
||||||
|
`awards` TEXT COMMENT '近三年曾获校级及以上奖励',
|
||||||
|
`experience` TEXT COMMENT '工作(学习)经历',
|
||||||
|
`main_story` TEXT COMMENT '主要事迹',
|
||||||
|
`league_opinion` TEXT COMMENT '所在二级团组织意见',
|
||||||
|
`party_opinion` TEXT COMMENT '所在单位党组织意见',
|
||||||
|
`school_opinion` TEXT COMMENT '校团委意见',
|
||||||
|
`submit_status` TINYINT NOT NULL DEFAULT 0 COMMENT '提交状态:0草稿 1已提交',
|
||||||
|
`sort_no` INT NOT NULL DEFAULT 0 COMMENT '排序号',
|
||||||
|
`remark` VARCHAR(500) DEFAULT NULL COMMENT '备注',
|
||||||
|
`user_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '用户ID',
|
||||||
|
`tenant_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '租户ID',
|
||||||
|
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
`deleted` TINYINT NOT NULL DEFAULT 0 COMMENT '删除标记:0未删 1已删',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `idx_gxmu_sjtbzbsj_name` (`name`),
|
||||||
|
KEY `idx_gxmu_sjtbzbsj_branch_name` (`branch_name`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='共青模块-十佳团支部书记';
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `gxmu_yxgqty`;
|
||||||
|
CREATE TABLE `gxmu_yxgqty` (
|
||||||
|
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
|
`name` VARCHAR(64) NOT NULL COMMENT '姓名',
|
||||||
|
`gender` VARCHAR(16) DEFAULT NULL COMMENT '性别',
|
||||||
|
`nation` VARCHAR(32) DEFAULT NULL COMMENT '民族',
|
||||||
|
`politics` VARCHAR(32) DEFAULT NULL COMMENT '政治面貌',
|
||||||
|
`birth_month` VARCHAR(32) DEFAULT NULL COMMENT '出生年月',
|
||||||
|
`join_time` VARCHAR(32) DEFAULT NULL COMMENT '入团时间',
|
||||||
|
`college_major_class` VARCHAR(255) DEFAULT NULL COMMENT '所在学院、专业、班级',
|
||||||
|
`position` VARCHAR(128) DEFAULT NULL COMMENT '职务',
|
||||||
|
`volunteer_reg_time` VARCHAR(32) DEFAULT NULL COMMENT '成为注册志愿者时间',
|
||||||
|
`edu_eval_2024` VARCHAR(64) DEFAULT NULL COMMENT '2024年团员教育评议等次',
|
||||||
|
`smart_system` VARCHAR(16) DEFAULT NULL COMMENT '是否已登录智慧团建系统',
|
||||||
|
`contact` VARCHAR(32) DEFAULT NULL COMMENT '联系电话',
|
||||||
|
`total_volunteer_hours` VARCHAR(64) DEFAULT NULL COMMENT '累计志愿服务时长',
|
||||||
|
`volunteer_hours_2024` VARCHAR(64) DEFAULT NULL COMMENT '2024年志愿服务时长',
|
||||||
|
`member_no` VARCHAR(64) DEFAULT NULL COMMENT '发展团员编号',
|
||||||
|
`honors_five_years` TEXT COMMENT '近五年获得荣誉情况',
|
||||||
|
`main_story` TEXT COMMENT '主要事迹',
|
||||||
|
`league_opinion` TEXT COMMENT '学生社团指导教师意见/所在单位团委',
|
||||||
|
`party_opinion` TEXT COMMENT '业务指导单位意见/所在单位党组织',
|
||||||
|
`school_opinion` TEXT COMMENT '校团委意见',
|
||||||
|
`submit_status` TINYINT NOT NULL DEFAULT 0 COMMENT '提交状态:0草稿 1已提交',
|
||||||
|
`sort_no` INT NOT NULL DEFAULT 0 COMMENT '排序号',
|
||||||
|
`remark` VARCHAR(500) DEFAULT NULL COMMENT '备注',
|
||||||
|
`user_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '用户ID',
|
||||||
|
`tenant_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '租户ID',
|
||||||
|
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
`deleted` TINYINT NOT NULL DEFAULT 0 COMMENT '删除标记:0未删 1已删',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `idx_gxmu_yxgqty_name` (`name`),
|
||||||
|
KEY `idx_gxmu_yxgqty_member_no` (`member_no`),
|
||||||
|
KEY `idx_gxmu_yxgqty_contact` (`contact`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='共青模块-优秀共青团员';
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `gxmu_yxgqtdgb`;
|
||||||
|
CREATE TABLE `gxmu_yxgqtdgb` (
|
||||||
|
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
|
`name` VARCHAR(64) NOT NULL COMMENT '姓名',
|
||||||
|
`gender` VARCHAR(16) DEFAULT NULL COMMENT '性别',
|
||||||
|
`nation` VARCHAR(32) DEFAULT NULL COMMENT '民族',
|
||||||
|
`birth_month` VARCHAR(32) DEFAULT NULL COMMENT '出生年月',
|
||||||
|
`politics` VARCHAR(32) DEFAULT NULL COMMENT '政治面貌',
|
||||||
|
`position` VARCHAR(128) DEFAULT NULL COMMENT '职务',
|
||||||
|
`identity_type` VARCHAR(64) DEFAULT NULL COMMENT '身份',
|
||||||
|
`organization` VARCHAR(255) DEFAULT NULL COMMENT '所在团组织',
|
||||||
|
`contact` VARCHAR(32) DEFAULT NULL COMMENT '联系方式',
|
||||||
|
`member_no` VARCHAR(64) DEFAULT NULL COMMENT '发展团员编号',
|
||||||
|
`current_duty_time` VARCHAR(32) DEFAULT NULL COMMENT '任现团内职务时间',
|
||||||
|
`cadre_years` VARCHAR(32) DEFAULT NULL COMMENT '担任团干部年限',
|
||||||
|
`assessment_2024` VARCHAR(64) DEFAULT NULL COMMENT '2024年度工作考核结果',
|
||||||
|
`volunteer_reg_time` VARCHAR(32) DEFAULT NULL COMMENT '成为注册志愿者时间',
|
||||||
|
`cadre_experience` TEXT COMMENT '从事团干部经历',
|
||||||
|
`honors_five_years` TEXT COMMENT '近五年获得校级及以上荣誉情况',
|
||||||
|
`main_story` TEXT COMMENT '主要事迹',
|
||||||
|
`league_opinion` TEXT COMMENT '所在单位团组织意见',
|
||||||
|
`party_opinion` TEXT COMMENT '所在单位党组织意见',
|
||||||
|
`submit_status` TINYINT NOT NULL DEFAULT 0 COMMENT '提交状态:0草稿 1已提交',
|
||||||
|
`sort_no` INT NOT NULL DEFAULT 0 COMMENT '排序号',
|
||||||
|
`remark` VARCHAR(500) DEFAULT NULL COMMENT '备注',
|
||||||
|
`user_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '用户ID',
|
||||||
|
`tenant_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '租户ID',
|
||||||
|
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
`deleted` TINYINT NOT NULL DEFAULT 0 COMMENT '删除标记:0未删 1已删',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `idx_gxmu_yxgqtdgb_name` (`name`),
|
||||||
|
KEY `idx_gxmu_yxgqtdgb_organization` (`organization`),
|
||||||
|
KEY `idx_gxmu_yxgqtdgb_contact` (`contact`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='共青模块-优秀共青团干部';
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `gxmu_wshqtw`;
|
||||||
|
CREATE TABLE `gxmu_wshqtw` (
|
||||||
|
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
|
`org_name` VARCHAR(255) NOT NULL COMMENT '二级团组织全称',
|
||||||
|
`leader` VARCHAR(64) DEFAULT NULL COMMENT '负责人',
|
||||||
|
`phone` VARCHAR(32) DEFAULT NULL COMMENT '联系电话',
|
||||||
|
`member_total` VARCHAR(64) DEFAULT NULL COMMENT '现有团员总数',
|
||||||
|
`member_developed_2024` VARCHAR(64) DEFAULT NULL COMMENT '2024年发展团员人数',
|
||||||
|
`smart_system_login` VARCHAR(16) DEFAULT NULL COMMENT '是否已登录智慧团建系统',
|
||||||
|
`committee_count` VARCHAR(64) DEFAULT NULL COMMENT '团委委员人数',
|
||||||
|
`fulltime_cadre_count` VARCHAR(128) DEFAULT NULL COMMENT '专职团干部数',
|
||||||
|
`parttime_cadre_count` VARCHAR(128) DEFAULT NULL COMMENT '兼职团干部数',
|
||||||
|
`last_election_time` VARCHAR(32) DEFAULT NULL COMMENT '团委最近一次换届时间',
|
||||||
|
`fee_receivable_2024` VARCHAR(64) DEFAULT NULL COMMENT '2024年应收团费',
|
||||||
|
`fee_received_2024` VARCHAR(64) DEFAULT NULL COMMENT '2024年实收团费',
|
||||||
|
`fee_payable_2024` VARCHAR(64) DEFAULT NULL COMMENT '2024年应上缴团费',
|
||||||
|
`fee_paid_2024` VARCHAR(64) DEFAULT NULL COMMENT '2024年实际上缴团费',
|
||||||
|
`branch_count` VARCHAR(64) DEFAULT NULL COMMENT '团支部数',
|
||||||
|
`standardized_work_2024` VARCHAR(16) DEFAULT NULL COMMENT '是否开展规范化建设工作',
|
||||||
|
`recommend_activist_2024` VARCHAR(64) DEFAULT NULL COMMENT '推荐入党积极分子人数',
|
||||||
|
`activist_confirmed` VARCHAR(64) DEFAULT NULL COMMENT '确定为入党积极分子数',
|
||||||
|
`recommend_dev_target_2024` VARCHAR(64) DEFAULT NULL COMMENT '推荐党的发展对象人数',
|
||||||
|
`dev_target_confirmed` VARCHAR(64) DEFAULT NULL COMMENT '确定为党的发展对象数',
|
||||||
|
`honors_five_years` TEXT COMMENT '近五年获得校级及以上荣誉情况',
|
||||||
|
`work_summary_three_years` TEXT COMMENT '近三年开展的主要工作及取得的效果',
|
||||||
|
`party_opinion` TEXT COMMENT '所在单位党组织意见',
|
||||||
|
`school_opinion` TEXT COMMENT '校团委意见',
|
||||||
|
`submit_status` TINYINT NOT NULL DEFAULT 0 COMMENT '提交状态:0草稿 1已提交',
|
||||||
|
`sort_no` INT NOT NULL DEFAULT 0 COMMENT '排序号',
|
||||||
|
`remark` VARCHAR(500) DEFAULT NULL COMMENT '备注',
|
||||||
|
`user_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '用户ID',
|
||||||
|
`tenant_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '租户ID',
|
||||||
|
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
`deleted` TINYINT NOT NULL DEFAULT 0 COMMENT '删除标记:0未删 1已删',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `idx_gxmu_wshqtw_org_name` (`org_name`),
|
||||||
|
KEY `idx_gxmu_wshqtw_leader` (`leader`),
|
||||||
|
KEY `idx_gxmu_wshqtw_phone` (`phone`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='共青模块-五四红旗团委';
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `gxmu_wshqtzb`;
|
||||||
|
CREATE TABLE `gxmu_wshqtzb` (
|
||||||
|
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
|
`branch_name` VARCHAR(255) NOT NULL COMMENT '团支部全称',
|
||||||
|
`second_org` VARCHAR(255) DEFAULT NULL COMMENT '所属二级团组织',
|
||||||
|
`secretary` VARCHAR(64) DEFAULT NULL COMMENT '团支部书记',
|
||||||
|
`politics` VARCHAR(32) DEFAULT NULL COMMENT '政治面貌',
|
||||||
|
`contact` VARCHAR(32) DEFAULT NULL COMMENT '联系方式',
|
||||||
|
`establish_time` VARCHAR(32) DEFAULT NULL COMMENT '成立时间',
|
||||||
|
`last_election_time` VARCHAR(32) DEFAULT NULL COMMENT '最近一次换届时间',
|
||||||
|
`smart_system_login` VARCHAR(16) DEFAULT NULL COMMENT '是否已登录智慧团建系统',
|
||||||
|
`member_total` VARCHAR(64) DEFAULT NULL COMMENT '现有团员总数',
|
||||||
|
`member_developed_2024` VARCHAR(64) DEFAULT NULL COMMENT '2024年发展团员数',
|
||||||
|
`fee_receivable_2024` VARCHAR(64) DEFAULT NULL COMMENT '2024年应收团费',
|
||||||
|
`fee_received_2024` VARCHAR(64) DEFAULT NULL COMMENT '2024年实收团费',
|
||||||
|
`fee_payable_2024` VARCHAR(64) DEFAULT NULL COMMENT '2024年应上缴团费',
|
||||||
|
`fee_paid_2024` VARCHAR(64) DEFAULT NULL COMMENT '2024年实际上缴团费',
|
||||||
|
`recommend_activist_2024` VARCHAR(64) DEFAULT NULL COMMENT '推荐入党积极分子人数',
|
||||||
|
`activist_confirmed` VARCHAR(64) DEFAULT NULL COMMENT '确定为入党积极分子数',
|
||||||
|
`recommend_dev_target_2024` VARCHAR(64) DEFAULT NULL COMMENT '推荐党的发展对象人数',
|
||||||
|
`dev_target_confirmed` VARCHAR(64) DEFAULT NULL COMMENT '确定为党的发展对象数',
|
||||||
|
`branch_committee_meeting_count` VARCHAR(64) DEFAULT NULL COMMENT '团支部委员会会议召开次数',
|
||||||
|
`branch_member_meeting_count` VARCHAR(64) DEFAULT NULL COMMENT '团支部团员大会召开次数',
|
||||||
|
`edu_eval_done` VARCHAR(16) DEFAULT NULL COMMENT '是否开展团员教育评议',
|
||||||
|
`annual_reg_done` VARCHAR(16) DEFAULT NULL COMMENT '是否开展团员年度团籍注册',
|
||||||
|
`class_count` VARCHAR(64) DEFAULT NULL COMMENT '开展团课次数',
|
||||||
|
`smart_system_100` VARCHAR(16) DEFAULT NULL COMMENT '是否100%录入智慧团建',
|
||||||
|
`honors_five_years` TEXT COMMENT '近五年获得院级及以上荣誉情况',
|
||||||
|
`work_summary_three_years` TEXT COMMENT '近三年开展的主要工作及取得的效果',
|
||||||
|
`league_opinion` TEXT COMMENT '所在二级团组织意见',
|
||||||
|
`party_opinion` TEXT COMMENT '所在单位党组织意见',
|
||||||
|
`school_opinion` TEXT COMMENT '校团委意见',
|
||||||
|
`submit_status` TINYINT NOT NULL DEFAULT 0 COMMENT '提交状态:0草稿 1已提交',
|
||||||
|
`sort_no` INT NOT NULL DEFAULT 0 COMMENT '排序号',
|
||||||
|
`remark` VARCHAR(500) DEFAULT NULL COMMENT '备注',
|
||||||
|
`user_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '用户ID',
|
||||||
|
`tenant_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '租户ID',
|
||||||
|
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
`deleted` TINYINT NOT NULL DEFAULT 0 COMMENT '删除标记:0未删 1已删',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `idx_gxmu_wshqtzb_branch_name` (`branch_name`),
|
||||||
|
KEY `idx_gxmu_wshqtzb_second_org` (`second_org`),
|
||||||
|
KEY `idx_gxmu_wshqtzb_secretary` (`secretary`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='共青模块-五四红旗团支部';
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `gxmu_tzbcy_form`;
|
||||||
|
CREATE TABLE `gxmu_tzbcy_form` (
|
||||||
|
`id` INT NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||||
|
`province_city` VARCHAR(128) DEFAULT NULL COMMENT '所在省市',
|
||||||
|
`school_name` VARCHAR(255) DEFAULT NULL COMMENT '学校名称',
|
||||||
|
`project_name` VARCHAR(255) DEFAULT NULL COMMENT '项目名称',
|
||||||
|
`project_type` VARCHAR(64) DEFAULT NULL COMMENT '项目类型',
|
||||||
|
`project_group` VARCHAR(128) DEFAULT NULL COMMENT '项目分组',
|
||||||
|
`leader` VARCHAR(64) DEFAULT NULL COMMENT '负责人',
|
||||||
|
`phone` VARCHAR(32) DEFAULT NULL COMMENT '联系电话',
|
||||||
|
`team_members` LONGTEXT COMMENT '团队成员(JSON字符串)',
|
||||||
|
`advisors` LONGTEXT COMMENT '指导教师(JSON字符串)',
|
||||||
|
`project_brief` TEXT COMMENT '项目简介',
|
||||||
|
`social_value` TEXT COMMENT '社会价值',
|
||||||
|
`practice_process` TEXT COMMENT '实践过程',
|
||||||
|
`innovation_meaning` TEXT COMMENT '创新意义',
|
||||||
|
`development_prospect` TEXT COMMENT '发展前景',
|
||||||
|
`team_cooperation` TEXT COMMENT '团队协作',
|
||||||
|
`project_materials` TEXT COMMENT '项目介绍材料',
|
||||||
|
`other_proofs` TEXT COMMENT '其他证明材料',
|
||||||
|
`project_summary` TEXT COMMENT '项目摘要/我们的项目',
|
||||||
|
`team_intro` TEXT COMMENT '团队介绍/我们的团队',
|
||||||
|
`team_slogan` VARCHAR(255) DEFAULT NULL COMMENT '团队口号',
|
||||||
|
`practice_log` TEXT COMMENT '实践日志',
|
||||||
|
`user_id` INT DEFAULT NULL COMMENT '用户ID',
|
||||||
|
`deleted` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否删除',
|
||||||
|
`tenant_id` INT DEFAULT NULL COMMENT '租户ID',
|
||||||
|
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `idx_tzbcy_form_project_name` (`project_name`),
|
||||||
|
KEY `idx_tzbcy_form_school_name` (`school_name`),
|
||||||
|
KEY `idx_tzbcy_form_leader` (`leader`),
|
||||||
|
KEY `idx_tzbcy_form_user_id` (`user_id`),
|
||||||
|
KEY `idx_tzbcy_form_tenant_id` (`tenant_id`),
|
||||||
|
KEY `idx_tzbcy_form_deleted` (`deleted`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='挑战杯创业计划竞赛申报表';
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `gxmu_wxxzx_project`;
|
||||||
|
CREATE TABLE `gxmu_wxxzx_project` (
|
||||||
|
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
|
`topic_name` VARCHAR(255) NOT NULL COMMENT '课题名称',
|
||||||
|
`leader` VARCHAR(64) DEFAULT NULL COMMENT '课题负责人',
|
||||||
|
`college_grade_class` VARCHAR(255) DEFAULT NULL COMMENT '学院、年级、班别',
|
||||||
|
`phone` VARCHAR(32) DEFAULT NULL COMMENT '联系电话',
|
||||||
|
`advisor` VARCHAR(64) DEFAULT NULL COMMENT '指导老师',
|
||||||
|
`topic_type` VARCHAR(32) DEFAULT NULL COMMENT '课题类型',
|
||||||
|
`rationale` TEXT COMMENT '立论依据',
|
||||||
|
`teacher_opinion` TEXT COMMENT '指导老师意见',
|
||||||
|
`teacher_sign` VARCHAR(64) DEFAULT NULL COMMENT '指导老师签字',
|
||||||
|
`review_opinion` TEXT COMMENT '评审小组意见',
|
||||||
|
`review_score` VARCHAR(32) DEFAULT NULL COMMENT '评审分数',
|
||||||
|
`review_leader_sign` VARCHAR(64) DEFAULT NULL COMMENT '评审组长签字',
|
||||||
|
`college_opinion` TEXT COMMENT '学院意见',
|
||||||
|
`school_opinion` TEXT COMMENT '校团委意见',
|
||||||
|
`promise_signer` VARCHAR(64) DEFAULT NULL COMMENT '承诺书签名人',
|
||||||
|
`review_college` VARCHAR(255) DEFAULT NULL COMMENT '评审名单-学院',
|
||||||
|
`review_reporter` VARCHAR(64) DEFAULT NULL COMMENT '评审名单-填报人',
|
||||||
|
`review_date` VARCHAR(32) DEFAULT NULL COMMENT '评审名单-填报时间',
|
||||||
|
`funding_budget_file` VARCHAR(500) DEFAULT NULL COMMENT '经费预算表',
|
||||||
|
`funding_allocation_file` VARCHAR(500) DEFAULT NULL COMMENT '经费划拨明细表',
|
||||||
|
`midterm_remark` TEXT COMMENT '中期检查说明',
|
||||||
|
`midterm_materials` LONGTEXT COMMENT '中期检查材料(JSON字符串)',
|
||||||
|
`final_remark` TEXT COMMENT '结题说明',
|
||||||
|
`final_materials` LONGTEXT COMMENT '结题材料(JSON字符串)',
|
||||||
|
`archive_awards` TEXT COMMENT '获奖情况',
|
||||||
|
`archive_proofs` LONGTEXT COMMENT '获奖佐证材料(JSON字符串)',
|
||||||
|
`submit_status` TINYINT NOT NULL DEFAULT 0 COMMENT '提交状态:0草稿 1已提交',
|
||||||
|
`sort_no` INT NOT NULL DEFAULT 0 COMMENT '排序号',
|
||||||
|
`remark` VARCHAR(500) DEFAULT NULL COMMENT '备注',
|
||||||
|
`user_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '用户ID',
|
||||||
|
`tenant_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '租户ID',
|
||||||
|
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
`deleted` TINYINT NOT NULL DEFAULT 0 COMMENT '删除标记:0未删 1已删',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `idx_gxmu_wxxzx_topic_name` (`topic_name`),
|
||||||
|
KEY `idx_gxmu_wxxzx_leader` (`leader`),
|
||||||
|
KEY `idx_gxmu_wxxzx_college_grade_class` (`college_grade_class`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='共青模块-未来学术之星课题';
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `gxmu_wxxzx_guidance_teacher`;
|
||||||
|
CREATE TABLE `gxmu_wxxzx_guidance_teacher` (
|
||||||
|
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
|
`project_id` BIGINT UNSIGNED NOT NULL COMMENT '课题ID',
|
||||||
|
`teacher_order` INT NOT NULL DEFAULT 0 COMMENT '指导教师排序',
|
||||||
|
`name` VARCHAR(64) DEFAULT NULL COMMENT '姓名',
|
||||||
|
`gender` VARCHAR(16) DEFAULT NULL COMMENT '性别',
|
||||||
|
`job_title` VARCHAR(128) DEFAULT NULL COMMENT '专业技术职称',
|
||||||
|
`department_name` VARCHAR(255) DEFAULT NULL COMMENT '所在部门',
|
||||||
|
`sign_name` VARCHAR(64) DEFAULT NULL COMMENT '签名',
|
||||||
|
`user_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '用户ID',
|
||||||
|
`tenant_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '租户ID',
|
||||||
|
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
`deleted` TINYINT NOT NULL DEFAULT 0 COMMENT '删除标记:0未删 1已删',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `idx_gxmu_wxxzx_guidance_teacher_project_id` (`project_id`),
|
||||||
|
CONSTRAINT `fk_gxmu_wxxzx_guidance_teacher_project_id`
|
||||||
|
FOREIGN KEY (`project_id`) REFERENCES `gxmu_wxxzx_project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='共青模块-未来学术之星指导教师';
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `gxmu_wxxzx_applicant`;
|
||||||
|
CREATE TABLE `gxmu_wxxzx_applicant` (
|
||||||
|
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
|
`project_id` BIGINT UNSIGNED NOT NULL COMMENT '课题ID',
|
||||||
|
`applicant_order` INT NOT NULL DEFAULT 0 COMMENT '申请人排序',
|
||||||
|
`name` VARCHAR(64) DEFAULT NULL COMMENT '姓名',
|
||||||
|
`grade` VARCHAR(32) DEFAULT NULL COMMENT '年级',
|
||||||
|
`class_name` VARCHAR(64) DEFAULT NULL COMMENT '班别',
|
||||||
|
`gender` VARCHAR(16) DEFAULT NULL COMMENT '性别',
|
||||||
|
`major` VARCHAR(128) DEFAULT NULL COMMENT '专业',
|
||||||
|
`role_desc` VARCHAR(255) DEFAULT NULL COMMENT '在课题中的作用',
|
||||||
|
`user_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '用户ID',
|
||||||
|
`tenant_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '租户ID',
|
||||||
|
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
`deleted` TINYINT NOT NULL DEFAULT 0 COMMENT '删除标记:0未删 1已删',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `idx_gxmu_wxxzx_applicant_project_id` (`project_id`),
|
||||||
|
CONSTRAINT `fk_gxmu_wxxzx_applicant_project_id`
|
||||||
|
FOREIGN KEY (`project_id`) REFERENCES `gxmu_wxxzx_project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='共青模块-未来学术之星课题申请人';
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `gxmu_wxxzx_budget`;
|
||||||
|
CREATE TABLE `gxmu_wxxzx_budget` (
|
||||||
|
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
|
`project_id` BIGINT UNSIGNED NOT NULL COMMENT '课题ID',
|
||||||
|
`budget_order` INT NOT NULL DEFAULT 0 COMMENT '预算排序',
|
||||||
|
`expense_item` VARCHAR(255) DEFAULT NULL COMMENT '支出科目',
|
||||||
|
`amount` VARCHAR(64) DEFAULT NULL COMMENT '金额',
|
||||||
|
`reason` VARCHAR(500) DEFAULT NULL COMMENT '计算根据及理由',
|
||||||
|
`user_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '用户ID',
|
||||||
|
`tenant_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '租户ID',
|
||||||
|
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
`deleted` TINYINT NOT NULL DEFAULT 0 COMMENT '删除标记:0未删 1已删',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `idx_gxmu_wxxzx_budget_project_id` (`project_id`),
|
||||||
|
CONSTRAINT `fk_gxmu_wxxzx_budget_project_id`
|
||||||
|
FOREIGN KEY (`project_id`) REFERENCES `gxmu_wxxzx_project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='共青模块-未来学术之星经费预算';
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `gxmu_wxxzx_review_member`;
|
||||||
|
CREATE TABLE `gxmu_wxxzx_review_member` (
|
||||||
|
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
|
`project_id` BIGINT UNSIGNED NOT NULL COMMENT '课题ID',
|
||||||
|
`member_order` INT NOT NULL DEFAULT 0 COMMENT '评审成员排序',
|
||||||
|
`name` VARCHAR(64) DEFAULT NULL COMMENT '姓名',
|
||||||
|
`gender` VARCHAR(16) DEFAULT NULL COMMENT '性别',
|
||||||
|
`nation` VARCHAR(32) DEFAULT NULL COMMENT '民族',
|
||||||
|
`politics` VARCHAR(32) DEFAULT NULL COMMENT '政治面貌',
|
||||||
|
`birth_month` VARCHAR(32) DEFAULT NULL COMMENT '出生年月',
|
||||||
|
`job_title` VARCHAR(128) DEFAULT NULL COMMENT '职称',
|
||||||
|
`duty` VARCHAR(128) DEFAULT NULL COMMENT '职务',
|
||||||
|
`department_name` VARCHAR(255) DEFAULT NULL COMMENT '所在教研室/科室',
|
||||||
|
`remark` VARCHAR(255) DEFAULT NULL COMMENT '备注',
|
||||||
|
`user_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '用户ID',
|
||||||
|
`tenant_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '租户ID',
|
||||||
|
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
`deleted` TINYINT NOT NULL DEFAULT 0 COMMENT '删除标记:0未删 1已删',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `idx_gxmu_wxxzx_review_member_project_id` (`project_id`),
|
||||||
|
CONSTRAINT `fk_gxmu_wxxzx_review_member_project_id`
|
||||||
|
FOREIGN KEY (`project_id`) REFERENCES `gxmu_wxxzx_project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='共青模块-未来学术之星评审小组名单';
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `gxmu_qmgc_form`;
|
||||||
|
CREATE TABLE `gxmu_qmgc_form` (
|
||||||
|
`id` INT NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||||
|
`name` VARCHAR(64) DEFAULT NULL COMMENT '姓名',
|
||||||
|
`gender` VARCHAR(16) DEFAULT NULL COMMENT '性别',
|
||||||
|
`nation` VARCHAR(32) DEFAULT NULL COMMENT '民族',
|
||||||
|
`photo` VARCHAR(500) DEFAULT NULL COMMENT '电子版照片',
|
||||||
|
`birth_month` VARCHAR(32) DEFAULT NULL COMMENT '出生年月',
|
||||||
|
`politics` VARCHAR(32) DEFAULT NULL COMMENT '政治面貌',
|
||||||
|
`native_place` VARCHAR(64) DEFAULT NULL COMMENT '籍贯',
|
||||||
|
`phone` VARCHAR(32) DEFAULT NULL COMMENT '手机号码',
|
||||||
|
`wechat` VARCHAR(64) DEFAULT NULL COMMENT '微信号',
|
||||||
|
`email` VARCHAR(128) DEFAULT NULL COMMENT '电子邮箱',
|
||||||
|
`qq` VARCHAR(32) DEFAULT NULL COMMENT 'QQ号',
|
||||||
|
`id_card_no` VARCHAR(32) DEFAULT NULL COMMENT '身份证号',
|
||||||
|
`hobby` VARCHAR(255) DEFAULT NULL COMMENT '爱好特长',
|
||||||
|
`willing_to_work_in_guangxi` VARCHAR(16) DEFAULT NULL COMMENT '是否有志到基层一线和艰苦边远地区工作',
|
||||||
|
`school_info` VARCHAR(255) DEFAULT NULL COMMENT '学校、院系、年级、专业',
|
||||||
|
`league_position` VARCHAR(255) DEFAULT NULL COMMENT '担任团学职务情况',
|
||||||
|
`resume` TEXT COMMENT '个人简历',
|
||||||
|
`awards` TEXT COMMENT '奖惩情况',
|
||||||
|
`academic_performance` TEXT COMMENT '综合成绩情况',
|
||||||
|
`secondary_league_opinion` TEXT COMMENT '二级团组织意见',
|
||||||
|
`secondary_league_opinion_date` VARCHAR(32) DEFAULT NULL COMMENT '二级团组织意见日期',
|
||||||
|
`secondary_party_opinion` TEXT COMMENT '二级党组织意见',
|
||||||
|
`secondary_party_opinion_date` VARCHAR(32) DEFAULT NULL COMMENT '二级党组织意见日期',
|
||||||
|
`school_league_opinion` TEXT COMMENT '学校团委意见',
|
||||||
|
`school_league_opinion_date` VARCHAR(32) DEFAULT NULL COMMENT '学校团委意见日期',
|
||||||
|
`user_id` INT DEFAULT NULL COMMENT '用户ID',
|
||||||
|
`deleted` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否删除',
|
||||||
|
`tenant_id` INT DEFAULT NULL COMMENT '租户ID',
|
||||||
|
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `idx_qmgc_form_name` (`name`),
|
||||||
|
KEY `idx_qmgc_form_phone` (`phone`),
|
||||||
|
KEY `idx_qmgc_form_school_info` (`school_info`),
|
||||||
|
KEY `idx_qmgc_form_user_id` (`user_id`),
|
||||||
|
KEY `idx_qmgc_form_tenant_id` (`tenant_id`),
|
||||||
|
KEY `idx_qmgc_form_deleted` (`deleted`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='青年马克思主义者培养工程培训班学员登记表';
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `gxmu_tygl_form`;
|
||||||
|
CREATE TABLE `gxmu_tygl_form` (
|
||||||
|
`id` INT NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||||
|
`serial_no` INT DEFAULT NULL COMMENT '序号',
|
||||||
|
`name` VARCHAR(64) DEFAULT NULL COMMENT '姓名',
|
||||||
|
`gender` VARCHAR(16) DEFAULT NULL COMMENT '性别',
|
||||||
|
`nation` VARCHAR(32) DEFAULT NULL COMMENT '民族',
|
||||||
|
`phone` VARCHAR(32) DEFAULT NULL COMMENT '手机号码',
|
||||||
|
`league_position` VARCHAR(128) DEFAULT NULL COMMENT '团内职务',
|
||||||
|
`archive_in_current_org` VARCHAR(16) DEFAULT NULL COMMENT '团籍是否在本组织',
|
||||||
|
`join_month` VARCHAR(32) DEFAULT NULL COMMENT '入团年月',
|
||||||
|
`member_records` LONGTEXT COMMENT '团员记录(JSON字符串)',
|
||||||
|
`growth_archives` LONGTEXT COMMENT '成长档案(JSON字符串)',
|
||||||
|
`user_id` INT DEFAULT NULL COMMENT '用户ID',
|
||||||
|
`deleted` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否删除',
|
||||||
|
`tenant_id` INT DEFAULT NULL COMMENT '租户ID',
|
||||||
|
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `idx_tygl_form_serial_no` (`serial_no`),
|
||||||
|
KEY `idx_tygl_form_name` (`name`),
|
||||||
|
KEY `idx_tygl_form_phone` (`phone`),
|
||||||
|
KEY `idx_tygl_form_league_position` (`league_position`),
|
||||||
|
KEY `idx_tygl_form_user_id` (`user_id`),
|
||||||
|
KEY `idx_tygl_form_tenant_id` (`tenant_id`),
|
||||||
|
KEY `idx_tygl_form_deleted` (`deleted`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='团员管理';
|
||||||
|
|
||||||
|
SET FOREIGN_KEY_CHECKS = 1;
|
||||||
6971
package-lock.json
generated
6971
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
30
package.json
30
package.json
@@ -17,29 +17,48 @@
|
|||||||
"@bytemd/plugin-gfm": "^1.17.2",
|
"@bytemd/plugin-gfm": "^1.17.2",
|
||||||
"@bytemd/plugin-highlight": "^1.17.4",
|
"@bytemd/plugin-highlight": "^1.17.4",
|
||||||
"@bytemd/plugin-highlight-ssr": "^1.20.2",
|
"@bytemd/plugin-highlight-ssr": "^1.20.2",
|
||||||
|
"@kjgl77/datav-vue3": "^1.7.3",
|
||||||
|
"@types/file-saver": "^2.0.7",
|
||||||
|
"@vue-office/docx": "^1.6.3",
|
||||||
|
"@vue-office/excel": "^1.7.14",
|
||||||
|
"@vueuse/integrations": "^11.0.3",
|
||||||
|
"@wangeditor/editor": "^5.1.23",
|
||||||
|
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||||
"@wecom/jssdk": "^1.3.1",
|
"@wecom/jssdk": "^1.3.1",
|
||||||
"ant-design-vue": "^3.2.11",
|
"ali-oss": "^6.18.0",
|
||||||
|
"ant-design-vue": "^3.2.20",
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
"bytemd": "^1.17.2",
|
"bytemd": "^1.17.2",
|
||||||
"countup.js": "^2.3.2",
|
"countup.js": "^2.3.2",
|
||||||
"cropperjs": "^1.5.12",
|
"cropperjs": "^1.5.12",
|
||||||
|
"crypto-js": "^4.2.0",
|
||||||
"dayjs": "^1.11.5",
|
"dayjs": "^1.11.5",
|
||||||
"echarts": "^5.3.3",
|
"echarts": "^5.3.3",
|
||||||
"echarts-wordcloud": "^2.0.0",
|
"echarts-wordcloud": "^2.0.0",
|
||||||
"ele-admin-pro": "^1.10.1",
|
"ele-admin-pro": "1.10.1",
|
||||||
"exceljs": "^4.3.0",
|
"exceljs": "^4.3.0",
|
||||||
"github-markdown-css": "^5.1.0",
|
"github-markdown-css": "^5.1.0",
|
||||||
|
"highlight.js": "^11.9.0",
|
||||||
|
"js-cookie": "^3.0.5",
|
||||||
"js-md5": "^0.7.3",
|
"js-md5": "^0.7.3",
|
||||||
"jsbarcode": "^3.11.5",
|
"jsbarcode": "^3.11.5",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
|
"mitt": "^3.0.1",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"pinia": "^2.0.21",
|
"pinia": "^2.1.7",
|
||||||
|
"sass": "^1.97.2",
|
||||||
|
"socket.io-client": "^4.7.1",
|
||||||
"sortablejs": "^1.15.0",
|
"sortablejs": "^1.15.0",
|
||||||
"tinymce": "^5.10.5",
|
"tinymce": "^5.10.5",
|
||||||
"vue": "3.2.38",
|
"vue": "3.4.27",
|
||||||
"vue-echarts": "^6.2.3",
|
"vue-echarts": "^6.2.3",
|
||||||
"vue-i18n": "^9.2.2",
|
"vue-i18n": "^9.2.2",
|
||||||
|
"vue-qr": "^4.0.9",
|
||||||
|
"vue-qrcode": "^2.2.2",
|
||||||
"vue-router": "^4.1.5",
|
"vue-router": "^4.1.5",
|
||||||
|
"vue-split-table": "^1.0.1",
|
||||||
|
"vue-tianditu": "^2.7.6",
|
||||||
|
"vue3-tree-org": "^4.2.2",
|
||||||
"vuedraggable": "^4.1.0",
|
"vuedraggable": "^4.1.0",
|
||||||
"xgplayer": "^2.31.7",
|
"xgplayer": "^2.31.7",
|
||||||
"xlsx": "^0.18.5"
|
"xlsx": "^0.18.5"
|
||||||
@@ -59,7 +78,10 @@
|
|||||||
"eslint-define-config": "^1.7.0",
|
"eslint-define-config": "^1.7.0",
|
||||||
"eslint-plugin-prettier": "^4.2.1",
|
"eslint-plugin-prettier": "^4.2.1",
|
||||||
"eslint-plugin-vue": "^9.4.0",
|
"eslint-plugin-vue": "^9.4.0",
|
||||||
|
"file-saver": "^2.0.5",
|
||||||
|
"html-docx-js-typescript": "^0.1.5",
|
||||||
"less": "^4.1.3",
|
"less": "^4.1.3",
|
||||||
|
"postcss": "^8.4.16",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^2.7.1",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"terser": "^5.15.0",
|
"terser": "^5.15.0",
|
||||||
|
|||||||
19
public/404.html
Normal file
19
public/404.html
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>页面跳转中</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
(function () {
|
||||||
|
var pathname = window.location.pathname.replace(/\/+$/, '');
|
||||||
|
var search = window.location.search || '';
|
||||||
|
var hash = window.location.hash || '';
|
||||||
|
var targetPath = pathname && pathname !== '/404.html' ? pathname : '/';
|
||||||
|
window.location.replace('/#' + targetPath + search + hash);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
13
public/ai/index.html
Normal file
13
public/ai/index.html
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>页面跳转中</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
window.location.replace('/#/ai' + (window.location.search || '') + (window.location.hash || ''));
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
13
public/forget/index.html
Normal file
13
public/forget/index.html
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>页面跳转中</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
window.location.replace('/#/forget' + (window.location.search || '') + (window.location.hash || ''));
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
13
public/home/index.html
Normal file
13
public/home/index.html
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>页面跳转中</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
window.location.replace('/#/home' + (window.location.search || '') + (window.location.hash || ''));
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
13
public/index/index.html
Normal file
13
public/index/index.html
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>页面跳转中</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
window.location.replace('/#/index' + (window.location.search || '') + (window.location.hash || ''));
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
13
public/login/index.html
Normal file
13
public/login/index.html
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>页面跳转中</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
window.location.replace('/#/login' + (window.location.search || '') + (window.location.hash || ''));
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
13
public/wx-work-login/index.html
Normal file
13
public/wx-work-login/index.html
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>页面跳转中</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
window.location.replace('/#/wx-work-login' + (window.location.search || '') + (window.location.hash || ''));
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
86
src/App.vue
86
src/App.vue
@@ -6,6 +6,12 @@
|
|||||||
>
|
>
|
||||||
<a-config-provider :locale="antLocale">
|
<a-config-provider :locale="antLocale">
|
||||||
<router-view />
|
<router-view />
|
||||||
|
<button v-if="showAiEntry" class="ai-entry" type="button" @click="goAi">
|
||||||
|
<span class="ant-back-top-icon">
|
||||||
|
<img src="@/assets/logo-main.png" alt="AI团宝" />
|
||||||
|
</span>
|
||||||
|
<span class="ai-entry__text">AI团宝</span>
|
||||||
|
</button>
|
||||||
</a-config-provider>
|
</a-config-provider>
|
||||||
</ele-config-provider>
|
</ele-config-provider>
|
||||||
</template>
|
</template>
|
||||||
@@ -13,6 +19,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { unref, computed } from "vue";
|
import { unref, computed } from "vue";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { useThemeStore } from "@/store/modules/theme";
|
import { useThemeStore } from "@/store/modules/theme";
|
||||||
import {
|
import {
|
||||||
MAP_KEY,
|
MAP_KEY,
|
||||||
@@ -23,6 +30,8 @@ import {
|
|||||||
import { useSetDocumentTitle } from "@/utils/document-title-util";
|
import { useSetDocumentTitle } from "@/utils/document-title-util";
|
||||||
import { useLocale } from "@/i18n/use-locale";
|
import { useLocale } from "@/i18n/use-locale";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
const themeStore = useThemeStore();
|
const themeStore = useThemeStore();
|
||||||
const { showTabs } = storeToRefs(themeStore);
|
const { showTabs } = storeToRefs(themeStore);
|
||||||
|
|
||||||
@@ -37,7 +46,84 @@ const { antLocale } = useLocale();
|
|||||||
|
|
||||||
// 用于内链 iframe 组件获取 KeepAlive
|
// 用于内链 iframe 组件获取 KeepAlive
|
||||||
const keepAlive = computed(() => TAB_KEEP_ALIVE && unref(showTabs));
|
const keepAlive = computed(() => TAB_KEEP_ALIVE && unref(showTabs));
|
||||||
|
const showAiEntry = computed(() => route.path !== "/ai");
|
||||||
|
|
||||||
|
const goAi = () => {
|
||||||
|
router.push("/ai");
|
||||||
|
};
|
||||||
|
|
||||||
window._AMapSecurityConfig = {
|
window._AMapSecurityConfig = {
|
||||||
securityJsCode: MAP_CODE
|
securityJsCode: MAP_CODE
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.ai-entry {
|
||||||
|
position: fixed;
|
||||||
|
right: 0;
|
||||||
|
bottom: 10%;
|
||||||
|
z-index: 1000;
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 14px 10px 12px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 20px 0 0 20px;
|
||||||
|
background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(235, 246, 255, 0.96));
|
||||||
|
box-shadow: 0 18px 34px rgba(30, 96, 181, 0.2);
|
||||||
|
cursor: pointer;
|
||||||
|
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-entry:hover {
|
||||||
|
transform: translate(-4px, -50%);
|
||||||
|
box-shadow: 0 22px 38px rgba(30, 96, 181, 0.24);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-entry :deep(.ant-back-top-icon) {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 54px;
|
||||||
|
height: 54px;
|
||||||
|
border-radius: 18px;
|
||||||
|
background: linear-gradient(135deg, #1d85ff, #6fc8ff);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-entry :deep(.ant-back-top-icon img) {
|
||||||
|
width: 38px;
|
||||||
|
height: 38px;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-entry__text {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #15539a;
|
||||||
|
line-height: 1;
|
||||||
|
//writing-mode: vertical-rl;
|
||||||
|
text-orientation: mixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 640px) {
|
||||||
|
.ai-entry {
|
||||||
|
padding: 12px 8px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-entry :deep(.ant-back-top-icon) {
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-entry :deep(.ant-back-top-icon img) {
|
||||||
|
width: 34px;
|
||||||
|
height: 34px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-entry__text {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
21
src/api/ai/activityOutlineGen/index.ts
Normal file
21
src/api/ai/activityOutlineGen/index.ts
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult } from '@/api';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
import type {
|
||||||
|
ActivityOutlineGenParams,
|
||||||
|
ActivityOutlineGenResponse
|
||||||
|
} from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动策划大纲生成
|
||||||
|
*/
|
||||||
|
export async function activityOutlineGen(data: ActivityOutlineGenParams) {
|
||||||
|
const res = await request.post<ApiResult<ActivityOutlineGenResponse>>(
|
||||||
|
MODULES_API_URL + '/ai/activityOutlineGen',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message || '生成失败'));
|
||||||
|
}
|
||||||
17
src/api/ai/activityOutlineGen/model/index.ts
Normal file
17
src/api/ai/activityOutlineGen/model/index.ts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
export interface ActivityOutlineGenParams {
|
||||||
|
event_theme: string;
|
||||||
|
people: string;
|
||||||
|
event_time: string;
|
||||||
|
event_funding: string;
|
||||||
|
event_type?: string;
|
||||||
|
event_location?: string;
|
||||||
|
event_meme?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ActivityOutlineGenResponse {
|
||||||
|
answer?: string;
|
||||||
|
conversationId?: string;
|
||||||
|
messageId?: string;
|
||||||
|
raw?: Record<string, any>;
|
||||||
|
[key: string]: any;
|
||||||
|
}
|
||||||
106
src/api/ai/aiChatHistory/index.ts
Normal file
106
src/api/ai/aiChatHistory/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { AiChatHistory, AiChatHistoryParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
export async function pageAiChatHistory(params: AiChatHistoryParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<AiChatHistory>>>(
|
||||||
|
MODULES_API_URL + '/ai/ai-chat-history/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
export async function listAiChatHistory(params?: AiChatHistoryParam) {
|
||||||
|
const res = await request.get<ApiResult<AiChatHistory[]>>(
|
||||||
|
MODULES_API_URL + '/ai/ai-chat-history',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*/
|
||||||
|
export async function addAiChatHistory(data: AiChatHistory) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/ai/ai-chat-history',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
export async function updateAiChatHistory(data: AiChatHistory) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/ai/ai-chat-history',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
export async function removeAiChatHistory(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/ai/ai-chat-history/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
export async function removeBatchAiChatHistory(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/ai/ai-chat-history/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*/
|
||||||
|
export async function getAiChatHistory(id: number) {
|
||||||
|
const res = await request.get<ApiResult<AiChatHistory>>(
|
||||||
|
MODULES_API_URL + '/ai/ai-chat-history/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
44
src/api/ai/aiChatHistory/model/index.ts
Normal file
44
src/api/ai/aiChatHistory/model/index.ts
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface AiChatHistory {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
//
|
||||||
|
chatId?: number;
|
||||||
|
//
|
||||||
|
conversationId?: string;
|
||||||
|
//
|
||||||
|
userId?: number;
|
||||||
|
//
|
||||||
|
content?: string;
|
||||||
|
//
|
||||||
|
reply?: string;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 注册时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface AiChatHistoryParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
chatId?: number;
|
||||||
|
conversationId?: string;
|
||||||
|
userId?: number;
|
||||||
|
content?: string;
|
||||||
|
reply?: string;
|
||||||
|
status?: number;
|
||||||
|
deleted?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { TowerSafety, TowerSafetyParam } from './model';
|
import type { AiChatList, AiChatListParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询安全巡检部位
|
* 分页查询
|
||||||
*/
|
*/
|
||||||
export async function pageTowerSafety(params: TowerSafetyParam) {
|
export async function pageAiChatList(params: AiChatListParam) {
|
||||||
const res = await request.get<ApiResult<PageResult<TowerSafety>>>(
|
const res = await request.get<ApiResult<PageResult<AiChatList>>>(
|
||||||
'/tower/tower-safety/page',
|
MODULES_API_URL + '/ai/ai-chat-list/page',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -19,11 +20,11 @@ export async function pageTowerSafety(params: TowerSafetyParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询安全巡检部位列表
|
* 查询列表
|
||||||
*/
|
*/
|
||||||
export async function listTowerSafety(params?: TowerSafetyParam) {
|
export async function listAiChatList(params?: AiChatListParam) {
|
||||||
const res = await request.get<ApiResult<TowerSafety[]>>(
|
const res = await request.get<ApiResult<AiChatList[]>>(
|
||||||
'/tower/tower-safety',
|
MODULES_API_URL + '/ai/ai-chat-list',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -35,11 +36,11 @@ export async function listTowerSafety(params?: TowerSafetyParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加安全巡检部位
|
* 添加
|
||||||
*/
|
*/
|
||||||
export async function addTowerSafety(data: TowerSafety) {
|
export async function addAiChatList(data: AiChatList) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/tower/tower-safety',
|
MODULES_API_URL + '/ai/ai-chat-list',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -49,11 +50,11 @@ export async function addTowerSafety(data: TowerSafety) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改安全巡检部位
|
* 修改
|
||||||
*/
|
*/
|
||||||
export async function updateTowerSafety(data: TowerSafety) {
|
export async function updateAiChatList(data: AiChatList) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
'/tower/tower-safety',
|
MODULES_API_URL + '/ai/ai-chat-list',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -63,11 +64,11 @@ export async function updateTowerSafety(data: TowerSafety) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除安全巡检部位
|
* 删除
|
||||||
*/
|
*/
|
||||||
export async function removeTowerSafety(id?: number) {
|
export async function removeAiChatList(id?: number) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/tower/tower-safety/' + id
|
MODULES_API_URL + '/ai/ai-chat-list/' + id
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
@@ -76,11 +77,11 @@ export async function removeTowerSafety(id?: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除安全巡检部位
|
* 批量删除
|
||||||
*/
|
*/
|
||||||
export async function removeBatchTowerSafety(data: (number | undefined)[]) {
|
export async function removeBatchAiChatList(data: (number | undefined)[]) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/tower/tower-safety/batch',
|
MODULES_API_URL + '/ai/ai-chat-list/batch',
|
||||||
{
|
{
|
||||||
data
|
data
|
||||||
}
|
}
|
||||||
@@ -92,21 +93,14 @@ export async function removeBatchTowerSafety(data: (number | undefined)[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查IP是否存在
|
* 根据id查询
|
||||||
*/
|
*/
|
||||||
export async function checkExistence(
|
export async function getAiChatList(id: number) {
|
||||||
field: string,
|
const res = await request.get<ApiResult<AiChatList>>(
|
||||||
value: string,
|
MODULES_API_URL + '/ai/ai-chat-list/' + id
|
||||||
id?: number
|
|
||||||
) {
|
|
||||||
const res = await request.get<ApiResult<unknown>>(
|
|
||||||
'/tower/tower-safety/existence',
|
|
||||||
{
|
|
||||||
params: { field, value, id }
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0 && res.data.data) {
|
||||||
return res.data.message;
|
return res.data.data;
|
||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.data.message));
|
||||||
}
|
}
|
||||||
47
src/api/ai/aiChatList/model/index.ts
Normal file
47
src/api/ai/aiChatList/model/index.ts
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface AiChatList {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
//
|
||||||
|
conversationId?: string;
|
||||||
|
//
|
||||||
|
userId?: number;
|
||||||
|
//
|
||||||
|
roleId?: number;
|
||||||
|
//
|
||||||
|
roleName?: string;
|
||||||
|
//
|
||||||
|
roleDesc?: string;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 注册时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
//
|
||||||
|
title?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface AiChatListParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
conversationId?: string;
|
||||||
|
userId?: number;
|
||||||
|
roleId?: number;
|
||||||
|
roleName?: string;
|
||||||
|
roleDesc?: string;
|
||||||
|
status?: number;
|
||||||
|
deleted?: number;
|
||||||
|
title?: string;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
46
src/api/ai/competitionHistory/index.ts
Normal file
46
src/api/ai/competitionHistory/index.ts
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult } from '@/api';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
import type {
|
||||||
|
ChallengeCupDocumentListResult,
|
||||||
|
ChallengeCupDocumentParam,
|
||||||
|
CompetitionHistoryPreprocessResult
|
||||||
|
} from './model';
|
||||||
|
|
||||||
|
export async function preprocessCompetitionHistoryFiles(
|
||||||
|
files: File[],
|
||||||
|
scoreFile?: File,
|
||||||
|
manualText?: string
|
||||||
|
) {
|
||||||
|
const formData = new FormData();
|
||||||
|
files.forEach((file) => {
|
||||||
|
formData.append('files', file);
|
||||||
|
});
|
||||||
|
if (scoreFile) {
|
||||||
|
formData.append('scoreFile', scoreFile);
|
||||||
|
}
|
||||||
|
if (manualText?.trim()) {
|
||||||
|
formData.append('manualText', manualText.trim());
|
||||||
|
}
|
||||||
|
const res = await request.post<ApiResult<CompetitionHistoryPreprocessResult>>(
|
||||||
|
MODULES_API_URL + '/ai/competition-history/preprocess',
|
||||||
|
formData
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message || '历史竞赛文件预处理失败'));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function listChallengeCupDocuments(
|
||||||
|
params?: ChallengeCupDocumentParam
|
||||||
|
) {
|
||||||
|
const res = await request.get<ApiResult<ChallengeCupDocumentListResult>>(
|
||||||
|
MODULES_API_URL + '/ai/knowledge-base/challenge-cup/documents',
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message || '获取知识库文档失败'));
|
||||||
|
}
|
||||||
48
src/api/ai/competitionHistory/model/index.ts
Normal file
48
src/api/ai/competitionHistory/model/index.ts
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
export interface AiUploadedFile {
|
||||||
|
id?: string | number;
|
||||||
|
upload_file_id?: string | number;
|
||||||
|
name?: string;
|
||||||
|
size?: number;
|
||||||
|
extension?: string;
|
||||||
|
mime_type?: string;
|
||||||
|
created_by?: string;
|
||||||
|
created_at?: number;
|
||||||
|
[key: string]: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CompetitionHistoryPreprocessResult {
|
||||||
|
answer?: string;
|
||||||
|
taskId?: string;
|
||||||
|
workflowRunId?: string;
|
||||||
|
outputs?: Record<string, any>;
|
||||||
|
raw?: Record<string, any>;
|
||||||
|
[key: string]: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ChallengeCupDocument {
|
||||||
|
id: string;
|
||||||
|
name?: string;
|
||||||
|
data_source_type?: string;
|
||||||
|
display_status?: string;
|
||||||
|
indexing_status?: string;
|
||||||
|
enabled?: boolean;
|
||||||
|
word_count?: number;
|
||||||
|
created_at?: number;
|
||||||
|
updated_at?: number;
|
||||||
|
archived?: boolean;
|
||||||
|
[key: string]: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ChallengeCupDocumentListResult {
|
||||||
|
data: ChallengeCupDocument[];
|
||||||
|
has_more?: boolean;
|
||||||
|
limit?: number;
|
||||||
|
total?: number;
|
||||||
|
page?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ChallengeCupDocumentParam {
|
||||||
|
page?: number;
|
||||||
|
limit?: number;
|
||||||
|
keyword?: string;
|
||||||
|
}
|
||||||
45
src/api/ai/creativeAssistant/index.ts
Normal file
45
src/api/ai/creativeAssistant/index.ts
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { AxiosRequestConfig } from 'axios';
|
||||||
|
import type { ApiResult } from '@/api';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
import type { FileRecord } from '@/api/system/file/model';
|
||||||
|
import type {
|
||||||
|
CreativeAssistantRequest,
|
||||||
|
CreativeAssistantResponse
|
||||||
|
} from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AI文件上传
|
||||||
|
*/
|
||||||
|
export async function uploadAiFile(file: File) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
const res = await request.post<ApiResult<FileRecord>>(
|
||||||
|
MODULES_API_URL + '/ai/file/upload',
|
||||||
|
formData
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message || '上传失败'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AI创意助手
|
||||||
|
* 说明:接口路径根据当前项目命名规则按 /ai/creativeAssistant 约定,
|
||||||
|
* 若后端实际路径不同,可直接在这里调整。
|
||||||
|
*/
|
||||||
|
export async function creativeAssistant(
|
||||||
|
data: CreativeAssistantRequest,
|
||||||
|
config?: AxiosRequestConfig
|
||||||
|
) {
|
||||||
|
const res = await request.post<ApiResult<CreativeAssistantResponse>>(
|
||||||
|
MODULES_API_URL + '/ai/creativeAssistant',
|
||||||
|
data,
|
||||||
|
config
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message || '执行失败'));
|
||||||
|
}
|
||||||
27
src/api/ai/creativeAssistant/model/index.ts
Normal file
27
src/api/ai/creativeAssistant/model/index.ts
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import type { FileRecord } from '@/api/system/file/model';
|
||||||
|
|
||||||
|
export interface CreativeAssistantUploadFile {
|
||||||
|
transfer_method: 'local_file';
|
||||||
|
type: 'image' | 'document' | 'audio' | 'video';
|
||||||
|
upload_file_id?: number;
|
||||||
|
url: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CreativeAssistantRequest {
|
||||||
|
user_content?: string;
|
||||||
|
user_contentString?: string;
|
||||||
|
user_files?: CreativeAssistantUploadFile[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CreativeAssistantOutputs {
|
||||||
|
video_result?: Partial<FileRecord>[];
|
||||||
|
video_message?: string;
|
||||||
|
Script_result?: string;
|
||||||
|
photo_files?: Partial<FileRecord>[];
|
||||||
|
photo_message?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CreativeAssistantResponse {
|
||||||
|
outputs?: CreativeAssistantOutputs;
|
||||||
|
[key: string]: any;
|
||||||
|
}
|
||||||
18
src/api/ai/knowledgeBase/index.ts
Normal file
18
src/api/ai/knowledgeBase/index.ts
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult } from '@/api';
|
||||||
|
import type { KnowledgeBaseListResult, KnowledgeBaseParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 知识库列表
|
||||||
|
*/
|
||||||
|
export async function listKnowledgeBase(params?: KnowledgeBaseParam) {
|
||||||
|
const res = await request.get<ApiResult<KnowledgeBaseListResult>>(
|
||||||
|
MODULES_API_URL + '/ai/knowledge-base/list',
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
49
src/api/ai/knowledgeBase/model/index.ts
Normal file
49
src/api/ai/knowledgeBase/model/index.ts
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
/**
|
||||||
|
* 知识库
|
||||||
|
*/
|
||||||
|
export interface KnowledgeBase {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
description?: string;
|
||||||
|
provider?: string;
|
||||||
|
permission?: string;
|
||||||
|
data_source_type?: string;
|
||||||
|
indexing_technique?: string;
|
||||||
|
app_count?: number;
|
||||||
|
document_count?: number;
|
||||||
|
word_count?: number;
|
||||||
|
created_by?: string;
|
||||||
|
author_name?: string;
|
||||||
|
created_at?: number;
|
||||||
|
updated_by?: string;
|
||||||
|
updated_at?: number;
|
||||||
|
embedding_model?: string;
|
||||||
|
embedding_model_provider?: string;
|
||||||
|
embedding_available?: boolean;
|
||||||
|
enable_api?: boolean;
|
||||||
|
total_documents?: number;
|
||||||
|
total_available_documents?: number;
|
||||||
|
is_multimodal?: boolean;
|
||||||
|
is_published?: boolean;
|
||||||
|
tags?: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 知识库列表响应
|
||||||
|
*/
|
||||||
|
export interface KnowledgeBaseListResult {
|
||||||
|
data: KnowledgeBase[];
|
||||||
|
has_more: boolean;
|
||||||
|
limit: number;
|
||||||
|
total: number;
|
||||||
|
page: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface KnowledgeBaseParam {
|
||||||
|
page?: number;
|
||||||
|
limit?: number;
|
||||||
|
keyword?: string;
|
||||||
|
}
|
||||||
23
src/api/ai/manuscriptGen/index.ts
Normal file
23
src/api/ai/manuscriptGen/index.ts
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { AxiosRequestConfig } from 'axios';
|
||||||
|
import type { ApiResult } from '@/api';
|
||||||
|
import type { ManuscriptGenParams, ManuscriptGenResult } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AI内容创作
|
||||||
|
*/
|
||||||
|
export async function manuscriptGen(
|
||||||
|
data: ManuscriptGenParams,
|
||||||
|
config?: AxiosRequestConfig
|
||||||
|
) {
|
||||||
|
const res = await request.post<ApiResult<ManuscriptGenResult>>(
|
||||||
|
MODULES_API_URL + '/ai/manuscriptGen',
|
||||||
|
data,
|
||||||
|
config
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message || '生成失败'));
|
||||||
|
}
|
||||||
15
src/api/ai/manuscriptGen/model/index.ts
Normal file
15
src/api/ai/manuscriptGen/model/index.ts
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import type { FileRecord } from '@/api/system/file/model';
|
||||||
|
|
||||||
|
export interface ManuscriptGenParams {
|
||||||
|
docType?: string;
|
||||||
|
eventType?: string;
|
||||||
|
theme?: string;
|
||||||
|
time?: string;
|
||||||
|
location?: string;
|
||||||
|
participants?: string;
|
||||||
|
highlights?: string;
|
||||||
|
number?: number;
|
||||||
|
files?: Partial<FileRecord>[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ManuscriptGenResult = string | Record<string, any>;
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
import request from '@/utils/request';
|
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
|
||||||
import type { BCAgent, BCAgentParam } from '@/api/apps/bc/agent/model';
|
|
||||||
/**
|
|
||||||
* 分页查询设备
|
|
||||||
*/
|
|
||||||
export async function pageBCAgent(params: BCAgentParam) {
|
|
||||||
const res = await request.get<ApiResult<PageResult<BCAgent>>>(
|
|
||||||
'/apps/bc-agent/page',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询设备列表
|
|
||||||
*/
|
|
||||||
export async function listBCAgent(params?: BCAgentParam) {
|
|
||||||
const res = await request.get<ApiResult<BCAgent[]>>('/apps/bc-agent', {
|
|
||||||
params
|
|
||||||
});
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加设备
|
|
||||||
*/
|
|
||||||
export async function addBCAgent(data: BCAgent) {
|
|
||||||
const res = await request.post<ApiResult<unknown>>('/apps/bc-agent', data);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改设备
|
|
||||||
*/
|
|
||||||
export async function updateBCAgent(data: BCAgent) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>('/apps/bc-agent', data);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 绑定设备
|
|
||||||
*/
|
|
||||||
export async function bindBCAgent(data: BCAgent) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
|
||||||
'/apps/bc-agent/bind',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除设备
|
|
||||||
*/
|
|
||||||
export async function removeBCAgent(id?: number) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>('/apps/bc-agent/' + id);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除设备
|
|
||||||
*/
|
|
||||||
export async function removeBatchBCAgent(data: (number | undefined)[]) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>('/apps/bc-agent/batch', {
|
|
||||||
data
|
|
||||||
});
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 代理报餐
|
|
||||||
*/
|
|
||||||
export interface BCAgent {
|
|
||||||
agentId?: number;
|
|
||||||
userId?: number;
|
|
||||||
parentId?: number;
|
|
||||||
sortNumber?: number;
|
|
||||||
status?: number;
|
|
||||||
comments?: string;
|
|
||||||
createTime?: string;
|
|
||||||
tenantId?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单搜索条件
|
|
||||||
*/
|
|
||||||
export interface BCAgentParam extends PageParam {
|
|
||||||
status?: number;
|
|
||||||
userId?: number;
|
|
||||||
}
|
|
||||||
@@ -1,142 +0,0 @@
|
|||||||
import request from '@/utils/request';
|
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
|
||||||
import type { BcEquipment, BcEquipmentParam } from './model';
|
|
||||||
/**
|
|
||||||
* 分页查询设备
|
|
||||||
*/
|
|
||||||
export async function pageBcEquipment(params: BcEquipmentParam) {
|
|
||||||
const res = await request.get<ApiResult<PageResult<BcEquipment>>>(
|
|
||||||
'/apps/bc-equipment/page',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询设备列表
|
|
||||||
*/
|
|
||||||
export async function listBcEquipment(params?: BcEquipmentParam) {
|
|
||||||
const res = await request.get<ApiResult<BcEquipment[]>>(
|
|
||||||
'/apps/bc-equipment',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加设备
|
|
||||||
*/
|
|
||||||
export async function addBcEquipment(data: BcEquipment) {
|
|
||||||
const merchantCode = localStorage.getItem('merchantCode');
|
|
||||||
console.log(merchantCode);
|
|
||||||
if (merchantCode !== null && merchantCode != '') {
|
|
||||||
console.log(merchantCode);
|
|
||||||
data.merchantCode = String(merchantCode);
|
|
||||||
}
|
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
|
||||||
'/apps/bc-equipment',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改设备
|
|
||||||
*/
|
|
||||||
export async function updateBcEquipment(data: BcEquipment) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>('/apps/bc-equipment', data);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 绑定设备
|
|
||||||
*/
|
|
||||||
export async function bindBcEquipment(data: BcEquipment) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
|
||||||
'/apps/bc-equipment/bind',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除设备
|
|
||||||
*/
|
|
||||||
export async function removeBcEquipment(id?: number) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
'/apps/bc-equipment/' + id
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除设备
|
|
||||||
*/
|
|
||||||
export async function removeBatchBcEquipment(data: (number | undefined)[]) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
'/apps/bc-equipment/batch',
|
|
||||||
{
|
|
||||||
data
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 检查IP是否存在
|
|
||||||
*/
|
|
||||||
export async function checkExistence(
|
|
||||||
field: string,
|
|
||||||
value: string,
|
|
||||||
id?: number
|
|
||||||
) {
|
|
||||||
const res = await request.get<ApiResult<unknown>>(
|
|
||||||
'/apps/bc-equipment/existence',
|
|
||||||
{
|
|
||||||
params: { field, value, id }
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 发送企业微信消息推送
|
|
||||||
*/
|
|
||||||
export async function addSend(data: BcEquipment) {
|
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
|
||||||
'/apps/bc-equipment/addSend',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备
|
|
||||||
*/
|
|
||||||
export interface BcEquipment {
|
|
||||||
bcEquipmentId?: number;
|
|
||||||
equipmentName?: string;
|
|
||||||
equipmentCode?: string;
|
|
||||||
gear?: number;
|
|
||||||
describe?: string;
|
|
||||||
sortNumber?: number;
|
|
||||||
status?: number;
|
|
||||||
comments?: string;
|
|
||||||
createTime?: string;
|
|
||||||
tenantId?: number;
|
|
||||||
content?: string;
|
|
||||||
merchantCode?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单搜索条件
|
|
||||||
*/
|
|
||||||
export interface BcEquipmentParam extends PageParam {
|
|
||||||
bcEquipmentId?: number;
|
|
||||||
equipmentName?: string;
|
|
||||||
equipmentCode?: string;
|
|
||||||
status?: number;
|
|
||||||
merchantCode?: string;
|
|
||||||
userId?: number;
|
|
||||||
}
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
import request from '@/utils/request';
|
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
|
||||||
import type { BcExport, BcExportParam } from '@/api/apps/bc/export/model';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页查询计划
|
|
||||||
*/
|
|
||||||
export async function pageBcExport(params: BcExportParam) {
|
|
||||||
const res = await request.get<ApiResult<PageResult<BcExport>>>(
|
|
||||||
'/apps/bc-export/page',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询计划列表
|
|
||||||
*/
|
|
||||||
export async function listBcExport(params?: BcExportParam) {
|
|
||||||
const res = await request.get<ApiResult<BcExport[]>>('/apps/bc-export', {
|
|
||||||
params
|
|
||||||
});
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加计划
|
|
||||||
*/
|
|
||||||
export async function addBcExport(data: BcExport) {
|
|
||||||
const res = await request.post<ApiResult<unknown>>('/apps/bc-export', data);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改计划
|
|
||||||
*/
|
|
||||||
export async function updateBcExport(data: BcExport) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>('/apps/bc-export', data);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 绑定计划
|
|
||||||
*/
|
|
||||||
export async function bindBcExport(data: BcExport) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
|
||||||
'/apps/bc-export/bind',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除计划
|
|
||||||
*/
|
|
||||||
export async function removeBcExport(id?: number) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>('/apps/bc-export/' + id);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除计划
|
|
||||||
*/
|
|
||||||
export async function removeBatchBcExport(data: (number | undefined)[]) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
'/apps/bc-export/batch',
|
|
||||||
{
|
|
||||||
data
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
export interface BcExport {
|
|
||||||
exportId?: number;
|
|
||||||
organizationName?: string;
|
|
||||||
nickname?: string;
|
|
||||||
breakfastPost?: number;
|
|
||||||
breakfastSign?: number;
|
|
||||||
lunchPost?: number;
|
|
||||||
lunchSign?: number;
|
|
||||||
dinnerPost?: number;
|
|
||||||
dinnerSign?: number;
|
|
||||||
createTime?: string;
|
|
||||||
tenantId?: number;
|
|
||||||
expendMoney?: number;
|
|
||||||
userId?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 搜索条件
|
|
||||||
*/
|
|
||||||
export interface BcExportParam extends PageParam {
|
|
||||||
exportId?: number;
|
|
||||||
organizationName?: string;
|
|
||||||
organizationId?: number;
|
|
||||||
dayTime?: string;
|
|
||||||
week?: number;
|
|
||||||
status?: number;
|
|
||||||
userId?: number;
|
|
||||||
deliveryTime?: string;
|
|
||||||
createTimeStart?: string;
|
|
||||||
createTimeEnd?: string;
|
|
||||||
deliveryTimeStart?: string;
|
|
||||||
deliveryTimeEnd?: string;
|
|
||||||
}
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
import request from '@/utils/request';
|
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
|
||||||
import type { BCFood, BCFoodParam } from '@/api/apps/bc/food/model';
|
|
||||||
/**
|
|
||||||
* 分页查询计划
|
|
||||||
*/
|
|
||||||
export async function pageBCFood(params: BCFoodParam) {
|
|
||||||
const res = await request.get<ApiResult<PageResult<BCFood>>>(
|
|
||||||
'/apps/bc-food/page',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询计划列表
|
|
||||||
*/
|
|
||||||
export async function listBCFood(params?: BCFoodParam) {
|
|
||||||
const res = await request.get<ApiResult<BCFood[]>>('/apps/bc-food', {
|
|
||||||
params
|
|
||||||
});
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加计划
|
|
||||||
*/
|
|
||||||
export async function addBCFood(data: BCFood) {
|
|
||||||
const res = await request.post<ApiResult<unknown>>('/apps/bc-food', data);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改计划
|
|
||||||
*/
|
|
||||||
export async function updateBCFood(data: BCFood) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>('/apps/bc-food', data);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 绑定计划
|
|
||||||
*/
|
|
||||||
export async function bindBCFood(data: BCFood) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>('/apps/bc-food/bind', data);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除计划
|
|
||||||
*/
|
|
||||||
export async function removeBCFood(id?: number) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>('/apps/bc-food/' + id);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除计划
|
|
||||||
*/
|
|
||||||
export async function removeBatchBCFood(data: (number | undefined)[]) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>('/apps/bc-food/batch', {
|
|
||||||
data
|
|
||||||
});
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
export interface BCFood {
|
|
||||||
temporaryId?: number;
|
|
||||||
userId?: number;
|
|
||||||
parentId?: number;
|
|
||||||
sortNumber?: number;
|
|
||||||
status?: number;
|
|
||||||
comments?: string;
|
|
||||||
expirationTime?: string;
|
|
||||||
createTime?: string;
|
|
||||||
tenantId?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 搜索条件
|
|
||||||
*/
|
|
||||||
export interface BCFoodParam extends PageParam {
|
|
||||||
status?: number;
|
|
||||||
userId?: number;
|
|
||||||
}
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
import request from '@/utils/request';
|
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
|
||||||
import type { BCPlan, BCPlanParam } from '@/api/apps/bc/plan/model';
|
|
||||||
/**
|
|
||||||
* 分页查询计划
|
|
||||||
*/
|
|
||||||
export async function pageBCPlan(params: BCPlanParam) {
|
|
||||||
const res = await request.get<ApiResult<PageResult<BCPlan>>>(
|
|
||||||
'/apps/bc-plan/page',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询计划列表
|
|
||||||
*/
|
|
||||||
export async function listBCPlan(params?: BCPlanParam) {
|
|
||||||
const res = await request.get<ApiResult<BCPlan[]>>('/apps/bc-plan', {
|
|
||||||
params
|
|
||||||
});
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加计划
|
|
||||||
*/
|
|
||||||
export async function addBCPlan(data: BCPlan) {
|
|
||||||
const res = await request.post<ApiResult<unknown>>('/apps/bc-plan', data);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改计划
|
|
||||||
*/
|
|
||||||
export async function updateBCPlan(data: BCPlan) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>('/apps/bc-plan', data);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 绑定计划
|
|
||||||
*/
|
|
||||||
export async function bindBCPlan(data: BCPlan) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>('/apps/bc-plan/bind', data);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除计划
|
|
||||||
*/
|
|
||||||
export async function removeBCPlan(id?: number) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>('/apps/bc-plan/' + id);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除计划
|
|
||||||
*/
|
|
||||||
export async function removeBatchBCPlan(data: (number | undefined)[]) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>('/apps/bc-plan/batch', {
|
|
||||||
data
|
|
||||||
});
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
export interface BCPlan {
|
|
||||||
bcPlanId?: number;
|
|
||||||
dayTime?: any;
|
|
||||||
oldTime?: string;
|
|
||||||
type?: string;
|
|
||||||
userId?: number;
|
|
||||||
goodsIds?: any;
|
|
||||||
status?: number;
|
|
||||||
period?: string;
|
|
||||||
comments?: string;
|
|
||||||
createTime?: string;
|
|
||||||
tenantId?: number;
|
|
||||||
isRepeat?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 搜索条件
|
|
||||||
*/
|
|
||||||
export interface BCPlanParam extends PageParam {
|
|
||||||
bcPlanId?: number;
|
|
||||||
dayTime?: string;
|
|
||||||
week?: number;
|
|
||||||
status?: number;
|
|
||||||
userId?: number;
|
|
||||||
oldTime?: string;
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 代理报餐
|
|
||||||
*/
|
|
||||||
export interface BCTemporary {
|
|
||||||
temporaryId?: number;
|
|
||||||
userId?: number;
|
|
||||||
parentId?: number;
|
|
||||||
sortNumber?: number;
|
|
||||||
applyStatus?: number;
|
|
||||||
status?: number;
|
|
||||||
comments?: string;
|
|
||||||
expirationTime?: string;
|
|
||||||
createTime?: string;
|
|
||||||
tenantId?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单搜索条件
|
|
||||||
*/
|
|
||||||
export interface BCTemporaryParam extends PageParam {
|
|
||||||
status?: number;
|
|
||||||
userId?: number;
|
|
||||||
}
|
|
||||||
@@ -1,115 +0,0 @@
|
|||||||
import request from '@/utils/request';
|
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
|
||||||
import type { EquipmentAlarm, EquipmentAlarmParam } from './model';
|
|
||||||
/**
|
|
||||||
* 分页查询电池报警
|
|
||||||
*/
|
|
||||||
export async function pageEquipmentAlarm(params: EquipmentAlarmParam) {
|
|
||||||
const res = await request.get<ApiResult<PageResult<EquipmentAlarm>>>(
|
|
||||||
'/apps/equipment-alarm/page',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询电池报警列表
|
|
||||||
*/
|
|
||||||
export async function listEquipmentAlarm(params?: EquipmentAlarmParam) {
|
|
||||||
const res = await request.get<ApiResult<EquipmentAlarm[]>>(
|
|
||||||
'/apps/equipment-alarm',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加电池报警
|
|
||||||
*/
|
|
||||||
export async function addEquipmentAlarm(data: EquipmentAlarm) {
|
|
||||||
const merchantCode = localStorage.getItem('merchantCode');
|
|
||||||
if (merchantCode !== 'null') {
|
|
||||||
data.merchantCode = String(merchantCode);
|
|
||||||
}
|
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-alarm',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改电池报警
|
|
||||||
*/
|
|
||||||
export async function updateEquipmentAlarm(data: EquipmentAlarm) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-alarm',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除电池报警
|
|
||||||
*/
|
|
||||||
export async function removeEquipmentAlarm(id?: number) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-alarm/' + id
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除电池报警
|
|
||||||
*/
|
|
||||||
export async function removeBatchEquipmentAlarm(data: (number | undefined)[]) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-alarm/batch',
|
|
||||||
{
|
|
||||||
data
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 检查IP是否存在
|
|
||||||
*/
|
|
||||||
export async function checkExistence(
|
|
||||||
field: string,
|
|
||||||
value: string,
|
|
||||||
id?: number
|
|
||||||
) {
|
|
||||||
const res = await request.get<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-alarm/existence',
|
|
||||||
{
|
|
||||||
params: { field, value, id }
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电池报警
|
|
||||||
*/
|
|
||||||
export interface EquipmentAlarm {
|
|
||||||
id?: number;
|
|
||||||
equipmentCode?: string;
|
|
||||||
alarmType?: number;
|
|
||||||
handleTime?: string;
|
|
||||||
image?: string;
|
|
||||||
sortNumber?: number;
|
|
||||||
status?: number;
|
|
||||||
comments?: string;
|
|
||||||
createTime?: string;
|
|
||||||
tenantId?: number;
|
|
||||||
merchantCode?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单搜索条件
|
|
||||||
*/
|
|
||||||
export interface EquipmentAlarmParam extends PageParam {
|
|
||||||
id?: number;
|
|
||||||
equipmentCode?: string;
|
|
||||||
alarmType?: string;
|
|
||||||
status?: number;
|
|
||||||
merchantCode?: string;
|
|
||||||
}
|
|
||||||
@@ -1,115 +0,0 @@
|
|||||||
import request from '@/utils/request';
|
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
|
||||||
import type { EquipmentFault, EquipmentFaultParam } from './model';
|
|
||||||
/**
|
|
||||||
* 分页查询故障电池
|
|
||||||
*/
|
|
||||||
export async function pageEquipmentFault(params: EquipmentFaultParam) {
|
|
||||||
const res = await request.get<ApiResult<PageResult<EquipmentFault>>>(
|
|
||||||
'/apps/equipment-fault/page',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询故障电池列表
|
|
||||||
*/
|
|
||||||
export async function listEquipmentFault(params?: EquipmentFaultParam) {
|
|
||||||
const res = await request.get<ApiResult<EquipmentFault[]>>(
|
|
||||||
'/apps/equipment-fault',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加故障电池
|
|
||||||
*/
|
|
||||||
export async function addEquipmentFault(data: EquipmentFault) {
|
|
||||||
const merchantCode = localStorage.getItem('merchantCode');
|
|
||||||
if (merchantCode !== 'null') {
|
|
||||||
data.merchantCode = String(merchantCode);
|
|
||||||
}
|
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-fault',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改故障电池
|
|
||||||
*/
|
|
||||||
export async function updateEquipmentFault(data: EquipmentFault) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-fault',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除故障电池
|
|
||||||
*/
|
|
||||||
export async function removeEquipmentFault(id?: number) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-fault/' + id
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除故障电池
|
|
||||||
*/
|
|
||||||
export async function removeBatchEquipmentFault(data: (number | undefined)[]) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-fault/batch',
|
|
||||||
{
|
|
||||||
data
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 检查IP是否存在
|
|
||||||
*/
|
|
||||||
export async function checkExistence(
|
|
||||||
field: string,
|
|
||||||
value: string,
|
|
||||||
id?: number
|
|
||||||
) {
|
|
||||||
const res = await request.get<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-fault/existence',
|
|
||||||
{
|
|
||||||
params: { field, value, id }
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 故障电池
|
|
||||||
*/
|
|
||||||
export interface EquipmentFault {
|
|
||||||
id?: number;
|
|
||||||
equipmentCode?: string;
|
|
||||||
faultType?: number;
|
|
||||||
handleTime?: string;
|
|
||||||
image?: string;
|
|
||||||
sortNumber?: number;
|
|
||||||
status?: number;
|
|
||||||
comments?: string;
|
|
||||||
createTime?: string;
|
|
||||||
tenantId?: number;
|
|
||||||
merchantCode?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单搜索条件
|
|
||||||
*/
|
|
||||||
export interface EquipmentFaultParam extends PageParam {
|
|
||||||
id?: number;
|
|
||||||
equipmentCode?: string;
|
|
||||||
faultType?: string;
|
|
||||||
status?: number;
|
|
||||||
merchantCode?: string;
|
|
||||||
}
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电池商品
|
|
||||||
*/
|
|
||||||
export interface EquipmentGoods {
|
|
||||||
equipmentCategory?: string;
|
|
||||||
goodsId?: number;
|
|
||||||
goodsName?: string;
|
|
||||||
goodsCode?: string;
|
|
||||||
categoryId?: number;
|
|
||||||
fullName?: string;
|
|
||||||
logo?: string;
|
|
||||||
qrcode?: string;
|
|
||||||
describe?: string;
|
|
||||||
logoImageId?: number;
|
|
||||||
isRecycle?: number;
|
|
||||||
sortNumber?: number;
|
|
||||||
status?: number;
|
|
||||||
comments?: string;
|
|
||||||
createTime?: string;
|
|
||||||
tenantId?: number;
|
|
||||||
specType?: number;
|
|
||||||
deliveryType?: number;
|
|
||||||
batteryModel?: string;
|
|
||||||
content?: string;
|
|
||||||
deliveryId?: number;
|
|
||||||
image?: string;
|
|
||||||
files?: string;
|
|
||||||
goodsPriceMin?: number;
|
|
||||||
linePriceMin?: number;
|
|
||||||
sellingPoint?: string;
|
|
||||||
purchaseLimit?: number;
|
|
||||||
deductStockType?: number;
|
|
||||||
salesActual?: number;
|
|
||||||
goodsWeight?: number;
|
|
||||||
stockTotal?: number;
|
|
||||||
merchantCode?: string;
|
|
||||||
batteryRent?: number;
|
|
||||||
batteryDeposit?: number;
|
|
||||||
batteryInsurance?: number;
|
|
||||||
batteryPrice?: number;
|
|
||||||
userId?: number;
|
|
||||||
// 首付款
|
|
||||||
downPayment?: number;
|
|
||||||
// 分期期数
|
|
||||||
periods?: number;
|
|
||||||
// 每期还款
|
|
||||||
repayment?: number;
|
|
||||||
// 手续费
|
|
||||||
serviceCharges?: number;
|
|
||||||
// 分期方式
|
|
||||||
periodsType?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单搜索条件
|
|
||||||
*/
|
|
||||||
export interface EquipmentGoodsParam extends PageParam {
|
|
||||||
goodsId?: number;
|
|
||||||
goodsName?: string;
|
|
||||||
goodsCode?: string;
|
|
||||||
listType?: string;
|
|
||||||
status?: number;
|
|
||||||
stockTotal?: number;
|
|
||||||
merchantCode?: string;
|
|
||||||
}
|
|
||||||
@@ -1,120 +0,0 @@
|
|||||||
import request from '@/utils/request';
|
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
|
||||||
import type { Equipment, EquipmentParam } from './model';
|
|
||||||
/**
|
|
||||||
* 分页查询设备
|
|
||||||
*/
|
|
||||||
export async function pageEquipment(params: EquipmentParam) {
|
|
||||||
const res = await request.get<ApiResult<PageResult<Equipment>>>(
|
|
||||||
'/apps/equipment/page',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询设备列表
|
|
||||||
*/
|
|
||||||
export async function listEquipment(params?: EquipmentParam) {
|
|
||||||
const res = await request.get<ApiResult<Equipment[]>>('/apps/equipment', {
|
|
||||||
params
|
|
||||||
});
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加设备
|
|
||||||
*/
|
|
||||||
export async function addEquipment(data: Equipment) {
|
|
||||||
const merchantCode = localStorage.getItem('merchantCode');
|
|
||||||
console.log(merchantCode);
|
|
||||||
if (merchantCode !== null && merchantCode != '') {
|
|
||||||
console.log(merchantCode);
|
|
||||||
data.merchantCode = String(merchantCode);
|
|
||||||
}
|
|
||||||
const res = await request.post<ApiResult<unknown>>('/apps/equipment', data);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改设备
|
|
||||||
*/
|
|
||||||
export async function updateEquipment(data: Equipment) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>('/apps/equipment', data);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 绑定设备
|
|
||||||
*/
|
|
||||||
export async function bindEquipment(data: Equipment) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment/bind',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除设备
|
|
||||||
*/
|
|
||||||
export async function removeEquipment(id?: number) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>('/apps/equipment/' + id);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除设备
|
|
||||||
*/
|
|
||||||
export async function removeBatchEquipment(data: (number | undefined)[]) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment/batch',
|
|
||||||
{
|
|
||||||
data
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 检查IP是否存在
|
|
||||||
*/
|
|
||||||
export async function checkExistence(
|
|
||||||
field: string,
|
|
||||||
value: string,
|
|
||||||
id?: number
|
|
||||||
) {
|
|
||||||
const res = await request.get<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment/existence',
|
|
||||||
{
|
|
||||||
params: { field, value, id }
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备
|
|
||||||
*/
|
|
||||||
export interface Equipment {
|
|
||||||
equipmentType?: number;
|
|
||||||
equipmentId?: number;
|
|
||||||
equipmentName?: string;
|
|
||||||
equipmentCode?: string;
|
|
||||||
batteryModel?: string;
|
|
||||||
equipmentCategory?: string;
|
|
||||||
categoryId?: number;
|
|
||||||
bms?: string;
|
|
||||||
isCtive?: string;
|
|
||||||
workingStatus?: string;
|
|
||||||
leaseStatus?: string;
|
|
||||||
batteryStatus?: string;
|
|
||||||
batteryPower?: string;
|
|
||||||
isOnline?: string;
|
|
||||||
totalVoltage?: string;
|
|
||||||
bmsBrand?: string;
|
|
||||||
surplusCapacity?: string;
|
|
||||||
iccid?: string;
|
|
||||||
ctiveTime?: string;
|
|
||||||
batteryDeliveryTime?: string;
|
|
||||||
fullName?: string;
|
|
||||||
logo?: string;
|
|
||||||
describe?: string;
|
|
||||||
logoImageId?: number;
|
|
||||||
isRecycle?: number;
|
|
||||||
sortNumber?: number;
|
|
||||||
status?: number;
|
|
||||||
comments?: string;
|
|
||||||
createTime?: string;
|
|
||||||
tenantId?: number;
|
|
||||||
specType?: number;
|
|
||||||
deliveryType?: number;
|
|
||||||
content?: string;
|
|
||||||
deliveryId?: number;
|
|
||||||
image?: string;
|
|
||||||
files?: string;
|
|
||||||
equipmentPriceMin?: number;
|
|
||||||
linePriceMin?: number;
|
|
||||||
sellingPoint?: string;
|
|
||||||
purchaseLimit?: number;
|
|
||||||
deductStockType?: number;
|
|
||||||
salesActual?: number;
|
|
||||||
equipmentWeight?: number;
|
|
||||||
stockTotal?: number;
|
|
||||||
merchantCode?: string;
|
|
||||||
orderId?: number;
|
|
||||||
batteryRent?: number;
|
|
||||||
batteryDeposit?: number;
|
|
||||||
batteryInsurance?: number;
|
|
||||||
batteryPrice?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单搜索条件
|
|
||||||
*/
|
|
||||||
export interface EquipmentParam extends PageParam {
|
|
||||||
equipmentId?: number;
|
|
||||||
orderId?: number;
|
|
||||||
equipmentName?: string;
|
|
||||||
equipmentCode?: string;
|
|
||||||
listType?: string;
|
|
||||||
status?: number;
|
|
||||||
stockTotal?: number;
|
|
||||||
merchantCode?: string;
|
|
||||||
userId?: number;
|
|
||||||
}
|
|
||||||
@@ -1,118 +0,0 @@
|
|||||||
import request from '@/utils/request';
|
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
|
||||||
import type { EquipmentOrderGoods, EquipmentOrderGoodsParam } from './model';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页查询商品
|
|
||||||
*/
|
|
||||||
export async function pageEquipmentOrderGoods(
|
|
||||||
params: EquipmentOrderGoodsParam
|
|
||||||
) {
|
|
||||||
const res = await request.get<ApiResult<PageResult<EquipmentOrderGoods>>>(
|
|
||||||
'/apps/equipment-order-goods/page',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询商品列表
|
|
||||||
*/
|
|
||||||
export async function listEquipmentOrderGoods(
|
|
||||||
params?: EquipmentOrderGoodsParam
|
|
||||||
) {
|
|
||||||
const res = await request.get<ApiResult<EquipmentOrderGoods[]>>(
|
|
||||||
'/apps/equipment-order-goods',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加商品
|
|
||||||
*/
|
|
||||||
export async function addEquipmentOrderGoods(data: EquipmentOrderGoods) {
|
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-order-goods',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改商品
|
|
||||||
*/
|
|
||||||
export async function updateEquipmentOrderGoods(data: EquipmentOrderGoods) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-order-goods',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除商品
|
|
||||||
*/
|
|
||||||
export async function removeEquipmentOrderGoods(id?: number) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-order-goods/' + id
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除商品
|
|
||||||
*/
|
|
||||||
export async function removeBatchEquipmentOrderGoods(
|
|
||||||
data: (number | undefined)[]
|
|
||||||
) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-order-goods/batch',
|
|
||||||
{
|
|
||||||
data
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 检查IP是否存在
|
|
||||||
*/
|
|
||||||
export async function checkExistence(
|
|
||||||
field: string,
|
|
||||||
value: string,
|
|
||||||
id?: number
|
|
||||||
) {
|
|
||||||
const res = await request.get<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-order-goods/existence',
|
|
||||||
{
|
|
||||||
params: { field, value, id }
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电池订单商品
|
|
||||||
*/
|
|
||||||
export interface EquipmentOrderGoods {
|
|
||||||
equipmentCategory?: string;
|
|
||||||
goodsId?: number;
|
|
||||||
goodsName?: string;
|
|
||||||
goodsCode?: string;
|
|
||||||
categoryId?: number;
|
|
||||||
fullName?: string;
|
|
||||||
logo?: string;
|
|
||||||
qrcode?: string;
|
|
||||||
describe?: string;
|
|
||||||
logoImageId?: number;
|
|
||||||
isRecycle?: number;
|
|
||||||
sortNumber?: number;
|
|
||||||
status?: number;
|
|
||||||
comments?: string;
|
|
||||||
createTime?: string;
|
|
||||||
tenantId?: number;
|
|
||||||
specType?: number;
|
|
||||||
deliveryType?: number;
|
|
||||||
batteryModel?: string;
|
|
||||||
content?: string;
|
|
||||||
deliveryId?: number;
|
|
||||||
image?: string;
|
|
||||||
files?: string;
|
|
||||||
goodsPriceMin?: number;
|
|
||||||
linePriceMin?: number;
|
|
||||||
sellingPoint?: string;
|
|
||||||
purchaseLimit?: number;
|
|
||||||
deductStockType?: number;
|
|
||||||
salesActual?: number;
|
|
||||||
goodsWeight?: number;
|
|
||||||
stockTotal?: number;
|
|
||||||
merchantCode?: string;
|
|
||||||
batteryRent?: number;
|
|
||||||
batteryDeposit?: number;
|
|
||||||
batteryInsurance?: number;
|
|
||||||
batteryPrice?: number;
|
|
||||||
userId?: number;
|
|
||||||
orderId?: number;
|
|
||||||
// 首付款
|
|
||||||
downPayment?: number;
|
|
||||||
// 分期期数
|
|
||||||
periods?: number;
|
|
||||||
// 每期还款
|
|
||||||
repayment?: number;
|
|
||||||
// 手续费
|
|
||||||
serviceCharges?: number;
|
|
||||||
// 分期方式
|
|
||||||
periodsType?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单搜索条件
|
|
||||||
*/
|
|
||||||
export interface EquipmentOrderGoodsParam extends PageParam {
|
|
||||||
goodsId?: number;
|
|
||||||
goodsName?: string;
|
|
||||||
goodsCode?: string;
|
|
||||||
listType?: string;
|
|
||||||
status?: number;
|
|
||||||
stockTotal?: number;
|
|
||||||
merchantCode?: string;
|
|
||||||
orderId?: number;
|
|
||||||
}
|
|
||||||
@@ -1,115 +0,0 @@
|
|||||||
import request from '@/utils/request';
|
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
|
||||||
import type { EquipmentRecord, EquipmentRecordParam } from './model';
|
|
||||||
/**
|
|
||||||
* 分页查询前世今生
|
|
||||||
*/
|
|
||||||
export async function pageEquipmentRecord(params: EquipmentRecordParam) {
|
|
||||||
const res = await request.get<ApiResult<PageResult<EquipmentRecord>>>(
|
|
||||||
'/apps/equipment-record/page',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询前世今生列表
|
|
||||||
*/
|
|
||||||
export async function listEquipmentRecord(params?: EquipmentRecordParam) {
|
|
||||||
const res = await request.get<ApiResult<EquipmentRecord[]>>(
|
|
||||||
'/apps/equipment-record',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加前世今生
|
|
||||||
*/
|
|
||||||
export async function addEquipmentRecord(data: EquipmentRecord) {
|
|
||||||
const merchantCode = localStorage.getItem('merchantCode');
|
|
||||||
if (merchantCode !== 'null') {
|
|
||||||
data.merchantCode = String(merchantCode);
|
|
||||||
}
|
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-record',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改前世今生
|
|
||||||
*/
|
|
||||||
export async function updateEquipmentRecord(data: EquipmentRecord) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-record',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除前世今生
|
|
||||||
*/
|
|
||||||
export async function removeEquipmentRecord(id?: number) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-record/' + id
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除前世今生
|
|
||||||
*/
|
|
||||||
export async function removeBatchEquipmentRecord(data: (number | undefined)[]) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-record/batch',
|
|
||||||
{
|
|
||||||
data
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 检查IP是否存在
|
|
||||||
*/
|
|
||||||
export async function checkExistence(
|
|
||||||
field: string,
|
|
||||||
value: string,
|
|
||||||
id?: number
|
|
||||||
) {
|
|
||||||
const res = await request.get<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-record/existence',
|
|
||||||
{
|
|
||||||
params: { field, value, id }
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电池前世今生
|
|
||||||
*/
|
|
||||||
export interface EquipmentRecord {
|
|
||||||
id?: number;
|
|
||||||
equipmentCode?: string;
|
|
||||||
eventType?: number;
|
|
||||||
params?: string;
|
|
||||||
sortNumber?: number;
|
|
||||||
status?: number;
|
|
||||||
comments?: string;
|
|
||||||
createTime?: string;
|
|
||||||
tenantId?: number;
|
|
||||||
merchantCode?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单搜索条件
|
|
||||||
*/
|
|
||||||
export interface EquipmentRecordParam extends PageParam {
|
|
||||||
id?: number;
|
|
||||||
equipmentCode?: string;
|
|
||||||
orderId?: number;
|
|
||||||
userId?: number;
|
|
||||||
eventType?: string;
|
|
||||||
status?: number;
|
|
||||||
merchantCode?: string;
|
|
||||||
}
|
|
||||||
@@ -1,114 +0,0 @@
|
|||||||
import request from '@/utils/request';
|
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
|
||||||
// @ts-ignore
|
|
||||||
import type { HualalaCardBenefits, HualalaCardBenefitsParam } from './model';
|
|
||||||
/**
|
|
||||||
* 分页查询会员权益
|
|
||||||
*/
|
|
||||||
export async function pageHualalaCardBenefits(
|
|
||||||
params: HualalaCardBenefitsParam
|
|
||||||
) {
|
|
||||||
const res = await request.get<ApiResult<PageResult<HualalaCardBenefits>>>(
|
|
||||||
'/apps/hualala-card-benefits/page',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询会员权益列表
|
|
||||||
*/
|
|
||||||
export async function listHualalaCardBenefits(
|
|
||||||
params?: HualalaCardBenefitsParam
|
|
||||||
) {
|
|
||||||
const res = await request.get<ApiResult<HualalaCardBenefits[]>>(
|
|
||||||
'/apps/hualala-card-benefits',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加会员权益
|
|
||||||
*/
|
|
||||||
export async function addHualalaCardBenefits(data: HualalaCardBenefits) {
|
|
||||||
const merchantCode = localStorage.getItem('merchantCode');
|
|
||||||
if (merchantCode !== 'null') {
|
|
||||||
data.merchantCode = String(merchantCode);
|
|
||||||
}
|
|
||||||
const res = await request.post<ApiResult<unknown>>('/apps/hualala-card-benefits', data);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改会员权益
|
|
||||||
*/
|
|
||||||
export async function updateHualalaCardBenefits(data: HualalaCardBenefits) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>('/apps/hualala-card-benefits', data);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除会员权益
|
|
||||||
*/
|
|
||||||
export async function removeHualalaCardBenefits(id?: number) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>('/apps/hualala-card-benefits/' + id);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除会员权益
|
|
||||||
*/
|
|
||||||
export async function removeBatchHualalaCardBenefits(
|
|
||||||
data: (number | undefined)[]
|
|
||||||
) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
'/apps/hualala-card-benefits/batch',
|
|
||||||
{
|
|
||||||
data
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 检查IP是否存在
|
|
||||||
*/
|
|
||||||
export async function checkExistence(
|
|
||||||
field: string,
|
|
||||||
value: string,
|
|
||||||
id?: number
|
|
||||||
) {
|
|
||||||
const res = await request.get<ApiResult<unknown>>(
|
|
||||||
'/apps/hualala-card-benefits/existence',
|
|
||||||
{
|
|
||||||
params: { field, value, id }
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 会员权益
|
|
||||||
*/
|
|
||||||
export interface HualalaCardBenefits {
|
|
||||||
hualalaCardBenefitsId?: number;
|
|
||||||
equipmentType?: number;
|
|
||||||
equipmentId?: number;
|
|
||||||
equipmentName?: string;
|
|
||||||
equipmentCode?: string;
|
|
||||||
batteryModel?: string;
|
|
||||||
equipmentCategory?: string;
|
|
||||||
categoryId?: number;
|
|
||||||
bms?: string;
|
|
||||||
isCtive?: string;
|
|
||||||
workingStatus?: string;
|
|
||||||
leaseStatus?: string;
|
|
||||||
batteryStatus?: string;
|
|
||||||
batteryPower?: string;
|
|
||||||
isOnline?: string;
|
|
||||||
totalVoltage?: string;
|
|
||||||
bmsBrand?: string;
|
|
||||||
surplusCapacity?: string;
|
|
||||||
iccid?: string;
|
|
||||||
ctiveTime?: string;
|
|
||||||
batteryDeliveryTime?: string;
|
|
||||||
fullName?: string;
|
|
||||||
logo?: string;
|
|
||||||
describe?: string;
|
|
||||||
logoImageId?: number;
|
|
||||||
isRecycle?: number;
|
|
||||||
sortNumber?: number;
|
|
||||||
status?: number;
|
|
||||||
comments?: string;
|
|
||||||
createTime?: string;
|
|
||||||
tenantId?: number;
|
|
||||||
specType?: number;
|
|
||||||
deliveryType?: number;
|
|
||||||
content?: string;
|
|
||||||
deliveryId?: number;
|
|
||||||
image?: string;
|
|
||||||
files?: string;
|
|
||||||
equipmentPriceMin?: number;
|
|
||||||
linePriceMin?: number;
|
|
||||||
sellingPoint?: string;
|
|
||||||
purchaseLimit?: number;
|
|
||||||
deductStockType?: number;
|
|
||||||
salesActual?: number;
|
|
||||||
equipmentWeight?: number;
|
|
||||||
stockTotal?: number;
|
|
||||||
merchantCode?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单搜索条件
|
|
||||||
*/
|
|
||||||
export interface HualalaCardBenefitsParam extends PageParam {
|
|
||||||
id?: number;
|
|
||||||
cardLevelName?: string;
|
|
||||||
name?: string;
|
|
||||||
status?: number;
|
|
||||||
merchantCode?: string;
|
|
||||||
}
|
|
||||||
@@ -1,113 +0,0 @@
|
|||||||
import request from '@/utils/request';
|
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
|
||||||
// @ts-ignore
|
|
||||||
import type { HualalaCard, HualalaCardParam } from './model';
|
|
||||||
/**
|
|
||||||
* 分页查询会员卡
|
|
||||||
*/
|
|
||||||
export async function pageHualalaCard(params: HualalaCardParam) {
|
|
||||||
const res = await request.get<ApiResult<PageResult<HualalaCard>>>(
|
|
||||||
'/apps/hualala-card/page',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询会员卡列表
|
|
||||||
*/
|
|
||||||
export async function listHualalaCard(params?: HualalaCardParam) {
|
|
||||||
const res = await request.get<ApiResult<HualalaCard[]>>(
|
|
||||||
'/apps/hualala-card',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加会员卡
|
|
||||||
*/
|
|
||||||
export async function addHualalaCard(data: HualalaCard) {
|
|
||||||
const merchantCode = localStorage.getItem('merchantCode');
|
|
||||||
if (merchantCode !== 'null') {
|
|
||||||
data.merchantCode = String(merchantCode);
|
|
||||||
}
|
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
|
||||||
'/apps/hualala-card',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改会员卡
|
|
||||||
*/
|
|
||||||
export async function updateHualalaCard(data: HualalaCard) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>('/apps/hualala-card', data);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除会员卡
|
|
||||||
*/
|
|
||||||
export async function removeHualalaCard(id?: number) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
'/apps/hualala-card/' + id
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除会员卡
|
|
||||||
*/
|
|
||||||
export async function removeBatchHualalaCard(data: (number | undefined)[]) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
'/apps/hualala-card/batch',
|
|
||||||
{
|
|
||||||
data
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 检查IP是否存在
|
|
||||||
*/
|
|
||||||
export async function checkExistence(
|
|
||||||
field: string,
|
|
||||||
value: string,
|
|
||||||
id?: number
|
|
||||||
) {
|
|
||||||
const res = await request.get<ApiResult<unknown>>(
|
|
||||||
'/apps/hualala-card/existence',
|
|
||||||
{
|
|
||||||
params: { field, value, id }
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 会员卡
|
|
||||||
*/
|
|
||||||
export interface HualalaCard {
|
|
||||||
cardid?: number;
|
|
||||||
merchantCode?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单搜索条件
|
|
||||||
*/
|
|
||||||
export interface HualalaCardParam extends PageParam {
|
|
||||||
cardid?: number;
|
|
||||||
status?: number;
|
|
||||||
merchantCode?: string;
|
|
||||||
}
|
|
||||||
106
src/api/cms/articleCollect/index.ts
Normal file
106
src/api/cms/articleCollect/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { ArticleCollect, ArticleCollectParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
export async function pageArticleCollect(params: ArticleCollectParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<ArticleCollect>>>(
|
||||||
|
MODULES_API_URL + '/cms/article-collect/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
export async function listArticleCollect(params?: ArticleCollectParam) {
|
||||||
|
const res = await request.get<ApiResult<ArticleCollect[]>>(
|
||||||
|
MODULES_API_URL + '/cms/article-collect',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*/
|
||||||
|
export async function addArticleCollect(data: ArticleCollect) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/cms/article-collect',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
export async function updateArticleCollect(data: ArticleCollect) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/cms/article-collect',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
export async function removeArticleCollect(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/cms/article-collect/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
export async function removeBatchArticleCollect(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/cms/article-collect/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*/
|
||||||
|
export async function getArticleCollect(id: number) {
|
||||||
|
const res = await request.get<ApiResult<ArticleCollect>>(
|
||||||
|
MODULES_API_URL + '/cms/article-collect/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
31
src/api/cms/articleCollect/model/index.ts
Normal file
31
src/api/cms/articleCollect/model/index.ts
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface ArticleCollect {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
//
|
||||||
|
articleId?: number;
|
||||||
|
//
|
||||||
|
userId?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 注册时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface ArticleCollectParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
src/api/cms/articleComment/index.ts
Normal file
106
src/api/cms/articleComment/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { ArticleComment, ArticleCommentParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
export async function pageArticleComment(params: ArticleCommentParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<ArticleComment>>>(
|
||||||
|
MODULES_API_URL + '/cms/article-comment/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
export async function listArticleComment(params?: ArticleCommentParam) {
|
||||||
|
const res = await request.get<ApiResult<ArticleComment[]>>(
|
||||||
|
MODULES_API_URL + '/cms/article-comment',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*/
|
||||||
|
export async function addArticleComment(data: ArticleComment) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/cms/article-comment',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
export async function updateArticleComment(data: ArticleComment) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/cms/article-comment',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
export async function removeArticleComment(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/cms/article-comment/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
export async function removeBatchArticleComment(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/cms/article-comment/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*/
|
||||||
|
export async function getArticleComment(id: number) {
|
||||||
|
const res = await request.get<ApiResult<ArticleComment>>(
|
||||||
|
MODULES_API_URL + '/cms/article-comment/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
33
src/api/cms/articleComment/model/index.ts
Normal file
33
src/api/cms/articleComment/model/index.ts
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface ArticleComment {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
//
|
||||||
|
articleId?: number;
|
||||||
|
//
|
||||||
|
userId?: number;
|
||||||
|
//
|
||||||
|
content?: string;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 注册时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface ArticleCommentParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
src/api/cms/manuscript/index.ts
Normal file
106
src/api/cms/manuscript/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { Manuscript, ManuscriptParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询稿件
|
||||||
|
*/
|
||||||
|
export async function pageManuscript(params: ManuscriptParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<Manuscript>>>(
|
||||||
|
MODULES_API_URL + '/cms/manuscript/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询稿件列表
|
||||||
|
*/
|
||||||
|
export async function listManuscript(params?: ManuscriptParam) {
|
||||||
|
const res = await request.get<ApiResult<Manuscript[]>>(
|
||||||
|
MODULES_API_URL + '/cms/manuscript',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加稿件
|
||||||
|
*/
|
||||||
|
export async function addManuscript(data: Manuscript) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/cms/manuscript',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改稿件
|
||||||
|
*/
|
||||||
|
export async function updateManuscript(data: Manuscript) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/cms/manuscript',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除稿件
|
||||||
|
*/
|
||||||
|
export async function removeManuscript(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/cms/manuscript/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除稿件
|
||||||
|
*/
|
||||||
|
export async function removeBatchManuscript(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/cms/manuscript/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询稿件
|
||||||
|
*/
|
||||||
|
export async function getManuscript(id: number) {
|
||||||
|
const res = await request.get<ApiResult<Manuscript>>(
|
||||||
|
MODULES_API_URL + '/cms/manuscript/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
39
src/api/cms/manuscript/model/index.ts
Normal file
39
src/api/cms/manuscript/model/index.ts
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import type { PageParam } from "@/api";
|
||||||
|
import { ReviewList } from "@/api/gxmu/reviewList/model";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 稿件
|
||||||
|
*/
|
||||||
|
export interface Manuscript {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
//
|
||||||
|
title?: string;
|
||||||
|
//
|
||||||
|
content?: string;
|
||||||
|
//
|
||||||
|
cover?: string;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
//
|
||||||
|
userId?: number;
|
||||||
|
//
|
||||||
|
sortNumber?: number;
|
||||||
|
// 待审核
|
||||||
|
status?: string;
|
||||||
|
reviewList?: ReviewList[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 稿件搜索条件
|
||||||
|
*/
|
||||||
|
export interface ManuscriptParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
17
src/api/goods/goodsPhoneModel/index.ts
Normal file
17
src/api/goods/goodsPhoneModel/index.ts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品
|
||||||
|
*/
|
||||||
|
export interface GoodsPhoneModel {
|
||||||
|
id?: number;
|
||||||
|
goodsId?: number;
|
||||||
|
modelId?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单搜索条件
|
||||||
|
*/
|
||||||
|
export interface GoodsPhoneModelParam extends PageParam {
|
||||||
|
goodsId?: number;
|
||||||
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
import type { PageParam } from '@/api';
|
import type { PageParam } from "@/api";
|
||||||
|
import { GoodsPhoneModel } from "@/api/goods/goodsPhoneModel";
|
||||||
|
import { GoodsPrice } from "@/api/order/goodsPrice/model";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品
|
* 商品
|
||||||
@@ -37,6 +39,9 @@ export interface Goods {
|
|||||||
salesActual?: number;
|
salesActual?: number;
|
||||||
goodsWeight?: number;
|
goodsWeight?: number;
|
||||||
stockTotal?: number;
|
stockTotal?: number;
|
||||||
|
goodsPhoneModelList?: Array<GoodsPhoneModel>;
|
||||||
|
goodsPrice?: GoodsPrice,
|
||||||
|
cost: number
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { EquipmentGoods, EquipmentGoodsParam } from './model';
|
import type { ArticleCollect, ArticleCollectParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询商品
|
* 分页查询
|
||||||
*/
|
*/
|
||||||
export async function pageEquipmentGoods(params: EquipmentGoodsParam) {
|
export async function pageArticleCollect(params: ArticleCollectParam) {
|
||||||
const res = await request.get<ApiResult<PageResult<EquipmentGoods>>>(
|
const res = await request.get<ApiResult<PageResult<ArticleCollect>>>(
|
||||||
'/apps/equipment-goods/page',
|
MODULES_API_URL + '/gx/article-collect/page',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -19,11 +20,11 @@ export async function pageEquipmentGoods(params: EquipmentGoodsParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询商品列表
|
* 查询列表
|
||||||
*/
|
*/
|
||||||
export async function listEquipmentGoods(params?: EquipmentGoodsParam) {
|
export async function listArticleCollect(params?: ArticleCollectParam) {
|
||||||
const res = await request.get<ApiResult<EquipmentGoods[]>>(
|
const res = await request.get<ApiResult<ArticleCollect[]>>(
|
||||||
'/apps/equipment-goods',
|
MODULES_API_URL + '/gx/article-collect',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -35,11 +36,11 @@ export async function listEquipmentGoods(params?: EquipmentGoodsParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加商品
|
* 添加
|
||||||
*/
|
*/
|
||||||
export async function addEquipmentGoods(data: EquipmentGoods) {
|
export async function addArticleCollect(data: ArticleCollect) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/apps/equipment-goods',
|
MODULES_API_URL + '/gx/article-collect',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -49,11 +50,11 @@ export async function addEquipmentGoods(data: EquipmentGoods) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改商品
|
* 修改
|
||||||
*/
|
*/
|
||||||
export async function updateEquipmentGoods(data: EquipmentGoods) {
|
export async function updateArticleCollect(data: ArticleCollect) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
'/apps/equipment-goods',
|
MODULES_API_URL + '/gx/article-collect',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -63,11 +64,11 @@ export async function updateEquipmentGoods(data: EquipmentGoods) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除商品
|
* 删除
|
||||||
*/
|
*/
|
||||||
export async function removeEquipmentGoods(id?: number) {
|
export async function removeArticleCollect(id?: number) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/apps/equipment-goods/' + id
|
MODULES_API_URL + '/gx/article-collect/' + id
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
@@ -76,11 +77,11 @@ export async function removeEquipmentGoods(id?: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除商品
|
* 批量删除
|
||||||
*/
|
*/
|
||||||
export async function removeBatchEquipmentGoods(data: (number | undefined)[]) {
|
export async function removeBatchArticleCollect(data: (number | undefined)[]) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/apps/equipment-goods/batch',
|
MODULES_API_URL + '/gx/article-collect/batch',
|
||||||
{
|
{
|
||||||
data
|
data
|
||||||
}
|
}
|
||||||
@@ -92,21 +93,14 @@ export async function removeBatchEquipmentGoods(data: (number | undefined)[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查IP是否存在
|
* 根据id查询
|
||||||
*/
|
*/
|
||||||
export async function checkExistence(
|
export async function getArticleCollect(id: number) {
|
||||||
field: string,
|
const res = await request.get<ApiResult<ArticleCollect>>(
|
||||||
value: string,
|
MODULES_API_URL + '/gx/article-collect/' + id
|
||||||
id?: number
|
|
||||||
) {
|
|
||||||
const res = await request.get<ApiResult<unknown>>(
|
|
||||||
'/apps/equipment-goods/existence',
|
|
||||||
{
|
|
||||||
params: { field, value, id }
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0 && res.data.data) {
|
||||||
return res.data.message;
|
return res.data.data;
|
||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.data.message));
|
||||||
}
|
}
|
||||||
31
src/api/gx/articleCollect/model/index.ts
Normal file
31
src/api/gx/articleCollect/model/index.ts
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface ArticleCollect {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
//
|
||||||
|
articleId?: number;
|
||||||
|
//
|
||||||
|
userId?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 注册时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface ArticleCollectParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
src/api/gx/gxChatHistory/index.ts
Normal file
106
src/api/gx/gxChatHistory/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { GxChatHistory, GxChatHistoryParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
export async function pageGxChatHistory(params: GxChatHistoryParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<GxChatHistory>>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-chat-history/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
export async function listGxChatHistory(params?: GxChatHistoryParam) {
|
||||||
|
const res = await request.get<ApiResult<GxChatHistory[]>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-chat-history',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*/
|
||||||
|
export async function addGxChatHistory(data: GxChatHistory) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-chat-history',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
export async function updateGxChatHistory(data: GxChatHistory) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-chat-history',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
export async function removeGxChatHistory(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-chat-history/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
export async function removeBatchGxChatHistory(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-chat-history/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*/
|
||||||
|
export async function getGxChatHistory(id: number) {
|
||||||
|
const res = await request.get<ApiResult<GxChatHistory>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-chat-history/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
39
src/api/gx/gxChatHistory/model/index.ts
Normal file
39
src/api/gx/gxChatHistory/model/index.ts
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface GxChatHistory {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
//
|
||||||
|
chatId?: number;
|
||||||
|
//
|
||||||
|
conversationId?: string;
|
||||||
|
//
|
||||||
|
userId?: number;
|
||||||
|
//
|
||||||
|
content?: string;
|
||||||
|
//
|
||||||
|
reply?: string;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 商户编码
|
||||||
|
merchantCode?: string;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 注册时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface GxChatHistoryParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
src/api/gx/gxChatList/index.ts
Normal file
106
src/api/gx/gxChatList/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { GxChatList, GxChatListParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
export async function pageGxChatList(params: GxChatListParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<GxChatList>>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-chat-list/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
export async function listGxChatList(params?: GxChatListParam) {
|
||||||
|
const res = await request.get<ApiResult<GxChatList[]>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-chat-list',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*/
|
||||||
|
export async function addGxChatList(data: GxChatList) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-chat-list',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
export async function updateGxChatList(data: GxChatList) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-chat-list',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
export async function removeGxChatList(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-chat-list/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
export async function removeBatchGxChatList(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-chat-list/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*/
|
||||||
|
export async function getGxChatList(id: number) {
|
||||||
|
const res = await request.get<ApiResult<GxChatList>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-chat-list/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
31
src/api/gx/gxChatList/model/index.ts
Normal file
31
src/api/gx/gxChatList/model/index.ts
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface GxChatList {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
//
|
||||||
|
conversationId?: string;
|
||||||
|
//
|
||||||
|
uid?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 注册时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface GxChatListParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
src/api/gx/gxCoinLog/index.ts
Normal file
106
src/api/gx/gxCoinLog/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { GxCoinLog, GxCoinLogParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询金币记录
|
||||||
|
*/
|
||||||
|
export async function pageGxCoinLog(params: GxCoinLogParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<GxCoinLog>>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-coin-log/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询金币记录列表
|
||||||
|
*/
|
||||||
|
export async function listGxCoinLog(params?: GxCoinLogParam) {
|
||||||
|
const res = await request.get<ApiResult<GxCoinLog[]>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-coin-log',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加金币记录
|
||||||
|
*/
|
||||||
|
export async function addGxCoinLog(data: GxCoinLog) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-coin-log',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改金币记录
|
||||||
|
*/
|
||||||
|
export async function updateGxCoinLog(data: GxCoinLog) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-coin-log',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除金币记录
|
||||||
|
*/
|
||||||
|
export async function removeGxCoinLog(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-coin-log/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除金币记录
|
||||||
|
*/
|
||||||
|
export async function removeBatchGxCoinLog(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-coin-log/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询金币记录
|
||||||
|
*/
|
||||||
|
export async function getGxCoinLog(id: number) {
|
||||||
|
const res = await request.get<ApiResult<GxCoinLog>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-coin-log/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
43
src/api/gx/gxCoinLog/model/index.ts
Normal file
43
src/api/gx/gxCoinLog/model/index.ts
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 金币记录
|
||||||
|
*/
|
||||||
|
export interface GxCoinLog {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
//
|
||||||
|
orderNo?: string;
|
||||||
|
//
|
||||||
|
userId?: number;
|
||||||
|
// +/-
|
||||||
|
type?: string;
|
||||||
|
//
|
||||||
|
num?: number;
|
||||||
|
// 描述
|
||||||
|
desc?: string;
|
||||||
|
//
|
||||||
|
sortNumber?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 注册时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
//
|
||||||
|
paidNo?: string;
|
||||||
|
// 0待支付 1已支付
|
||||||
|
status?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 金币记录搜索条件
|
||||||
|
*/
|
||||||
|
export interface GxCoinLogParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
// 用户id
|
||||||
|
userId?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
src/api/gx/gxFeedback/index.ts
Normal file
106
src/api/gx/gxFeedback/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { GxFeedback, GxFeedbackParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
export async function pageGxFeedback(params: GxFeedbackParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<GxFeedback>>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-feedback/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
export async function listGxFeedback(params?: GxFeedbackParam) {
|
||||||
|
const res = await request.get<ApiResult<GxFeedback[]>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-feedback',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*/
|
||||||
|
export async function addGxFeedback(data: GxFeedback) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-feedback',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
export async function updateGxFeedback(data: GxFeedback) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-feedback',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
export async function removeGxFeedback(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-feedback/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
export async function removeBatchGxFeedback(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-feedback/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*/
|
||||||
|
export async function getGxFeedback(id: number) {
|
||||||
|
const res = await request.get<ApiResult<GxFeedback>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-feedback/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
37
src/api/gx/gxFeedback/model/index.ts
Normal file
37
src/api/gx/gxFeedback/model/index.ts
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface GxFeedback {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
// 功能体验
|
||||||
|
funcExp?: string;
|
||||||
|
// 咨询体验
|
||||||
|
advisoryExp?: string;
|
||||||
|
//
|
||||||
|
comments?: string;
|
||||||
|
//
|
||||||
|
userId?: number;
|
||||||
|
//
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 注册时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface GxFeedbackParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
141
src/api/gx/gxRole/index.ts
Normal file
141
src/api/gx/gxRole/index.ts
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
import request from "@/utils/request";
|
||||||
|
import type { ApiResult, PageResult } from "@/api";
|
||||||
|
import type { GxRole, GxRoleParam } from "./model";
|
||||||
|
import { MODULES_API_URL } from "@/config/setting";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
export async function pageGxRole(params: GxRoleParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<GxRole>>>(
|
||||||
|
MODULES_API_URL + "/gx/gx-role/page",
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
export async function listGxRole(params?: GxRoleParam) {
|
||||||
|
const res = await request.get<ApiResult<GxRole[]>>(
|
||||||
|
MODULES_API_URL + "/gx/gx-role",
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*/
|
||||||
|
export async function addGxRole(data: GxRole) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + "/gx/gx-role",
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
export async function updateGxRole(data: GxRole) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + "/gx/gx-role",
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
export async function removeGxRole(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + "/gx/gx-role/" + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
export async function removeBatchGxRole(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + "/gx/gx-role/batch",
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*/
|
||||||
|
export async function getGxRole(id: number) {
|
||||||
|
const res = await request.get<ApiResult<GxRole>>(
|
||||||
|
MODULES_API_URL + "/gx/gx-role/" + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VoiceMakeParam {
|
||||||
|
voice: string;
|
||||||
|
text: string;
|
||||||
|
emo?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type VoiceMakeResult =
|
||||||
|
| string
|
||||||
|
| {
|
||||||
|
url?: string;
|
||||||
|
audioUrl?: string;
|
||||||
|
src?: string;
|
||||||
|
path?: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色音色试听
|
||||||
|
*/
|
||||||
|
export async function makeVoice(params: VoiceMakeParam) {
|
||||||
|
const { voice, text, emo } = params;
|
||||||
|
const res = await request.post<ApiResult<VoiceMakeResult | undefined>>(
|
||||||
|
`${MODULES_API_URL}/voice/make`,
|
||||||
|
{
|
||||||
|
text,
|
||||||
|
content: text,
|
||||||
|
emo,
|
||||||
|
voice
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
41
src/api/gx/gxRole/model/index.ts
Normal file
41
src/api/gx/gxRole/model/index.ts
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface GxRole {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
// 角色名称
|
||||||
|
roleName?: string;
|
||||||
|
// 提示词
|
||||||
|
prompt?: string;
|
||||||
|
// 角色描述
|
||||||
|
roleDesc?: string;
|
||||||
|
// 角色头像
|
||||||
|
avatar?: string;
|
||||||
|
// 背景图片
|
||||||
|
bgImage?: string;
|
||||||
|
// 音色
|
||||||
|
voice?: string;
|
||||||
|
// 情绪
|
||||||
|
emo?: string;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 注册时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface GxRoleParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
@@ -1,15 +1,14 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type {
|
import type { GxSignLog, GxSignLogParam } from './model';
|
||||||
BCTemporary,
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
BCTemporaryParam
|
|
||||||
} from '@/api/apps/bc/temporary/model';
|
|
||||||
/**
|
/**
|
||||||
* 分页查询设备
|
* 分页查询
|
||||||
*/
|
*/
|
||||||
export async function pageBCTemporary(params: BCTemporaryParam) {
|
export async function pageGxSignLog(params: GxSignLogParam) {
|
||||||
const res = await request.get<ApiResult<PageResult<BCTemporary>>>(
|
const res = await request.get<ApiResult<PageResult<GxSignLog>>>(
|
||||||
'/apps/bc-temporary/page',
|
MODULES_API_URL + '/gx/gx-sign-log/page',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -21,11 +20,11 @@ export async function pageBCTemporary(params: BCTemporaryParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询设备列表
|
* 查询列表
|
||||||
*/
|
*/
|
||||||
export async function listBCTemporary(params?: BCTemporaryParam) {
|
export async function listGxSignLog(params?: GxSignLogParam) {
|
||||||
const res = await request.get<ApiResult<BCTemporary[]>>(
|
const res = await request.get<ApiResult<GxSignLog[]>>(
|
||||||
'/apps/bc-temporary',
|
MODULES_API_URL + '/gx/gx-sign-log',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -37,11 +36,11 @@ export async function listBCTemporary(params?: BCTemporaryParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加设备
|
* 添加
|
||||||
*/
|
*/
|
||||||
export async function addBCTemporary(data: BCTemporary) {
|
export async function addGxSignLog(data: GxSignLog) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/apps/bc-temporary',
|
MODULES_API_URL + '/gx/gx-sign-log',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -51,22 +50,11 @@ export async function addBCTemporary(data: BCTemporary) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改设备
|
* 修改
|
||||||
*/
|
*/
|
||||||
export async function updateBCTemporary(data: BCTemporary) {
|
export async function updateGxSignLog(data: GxSignLog) {
|
||||||
const res = await request.put<ApiResult<unknown>>('/apps/bc-temporary', data);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 绑定设备
|
|
||||||
*/
|
|
||||||
export async function bindBCTemporary(data: BCTemporary) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
'/apps/bc-temporary/bind',
|
MODULES_API_URL + '/gx/gx-sign-log',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -76,11 +64,11 @@ export async function bindBCTemporary(data: BCTemporary) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除设备
|
* 删除
|
||||||
*/
|
*/
|
||||||
export async function removeBCTemporary(id?: number) {
|
export async function removeGxSignLog(id?: number) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/apps/bc-temporary/' + id
|
MODULES_API_URL + '/gx/gx-sign-log/' + id
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
@@ -89,11 +77,11 @@ export async function removeBCTemporary(id?: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除设备
|
* 批量删除
|
||||||
*/
|
*/
|
||||||
export async function removeBatchBCTemporary(data: (number | undefined)[]) {
|
export async function removeBatchGxSignLog(data: (number | undefined)[]) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/apps/bc-temporary/batch',
|
MODULES_API_URL + '/gx/gx-sign-log/batch',
|
||||||
{
|
{
|
||||||
data
|
data
|
||||||
}
|
}
|
||||||
@@ -103,3 +91,16 @@ export async function removeBatchBCTemporary(data: (number | undefined)[]) {
|
|||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.data.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*/
|
||||||
|
export async function getGxSignLog(id: number) {
|
||||||
|
const res = await request.get<ApiResult<GxSignLog>>(
|
||||||
|
MODULES_API_URL + '/gx/gx-sign-log/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
33
src/api/gx/gxSignLog/model/index.ts
Normal file
33
src/api/gx/gxSignLog/model/index.ts
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface GxSignLog {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
//
|
||||||
|
userId?: number;
|
||||||
|
//
|
||||||
|
date?: string;
|
||||||
|
//
|
||||||
|
sortNumber?: number;
|
||||||
|
// 状态, 0正常, 1冻结
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 注册时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface GxSignLogParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
79
src/api/gxmu/class/index.ts
Normal file
79
src/api/gxmu/class/index.ts
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { ClassInfo, ClassImportItem, ClassInfoParam } from './model';
|
||||||
|
|
||||||
|
export async function pageClassInfo(params: ClassInfoParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<ClassInfo>>>(
|
||||||
|
'/gxmu/class/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function listClassInfo(params?: ClassInfoParam) {
|
||||||
|
const res = await request.get<ApiResult<ClassInfo[]>>('/gxmu/class', {
|
||||||
|
params
|
||||||
|
});
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function getClassInfo(id: number) {
|
||||||
|
const res = await request.get<ApiResult<ClassInfo>>('/gxmu/class/' + id);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function addClassInfo(data: ClassInfo) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>('/gxmu/class', data);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function updateClassInfo(data: ClassInfo) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>('/gxmu/class', data);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function removeClassInfo(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>('/gxmu/class/' + id);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function removeBatchClassInfo(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>('/gxmu/class/batch', {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function importClassInfo(data: ClassImportItem[]) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/gxmu/class/import',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
41
src/api/gxmu/class/model/index.ts
Normal file
41
src/api/gxmu/class/model/index.ts
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
export interface ClassInfo {
|
||||||
|
id?: number;
|
||||||
|
collegeId?: number;
|
||||||
|
collegeName?: string;
|
||||||
|
classCode?: string;
|
||||||
|
className?: string;
|
||||||
|
gradeYear?: number;
|
||||||
|
counselorName?: string;
|
||||||
|
counselorPhone?: string;
|
||||||
|
studentCount?: number;
|
||||||
|
sortNumber?: number;
|
||||||
|
status?: number;
|
||||||
|
remark?: string;
|
||||||
|
createTime?: string;
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ClassImportItem {
|
||||||
|
collegeName?: string;
|
||||||
|
classCode?: string;
|
||||||
|
className?: string;
|
||||||
|
gradeYear?: number;
|
||||||
|
counselorName?: string;
|
||||||
|
counselorPhone?: string;
|
||||||
|
studentCount?: number;
|
||||||
|
sortNumber?: number;
|
||||||
|
status?: number;
|
||||||
|
remark?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ClassInfoParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
collegeId?: number;
|
||||||
|
classCode?: string;
|
||||||
|
className?: string;
|
||||||
|
gradeYear?: number;
|
||||||
|
status?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
68
src/api/gxmu/college/index.ts
Normal file
68
src/api/gxmu/college/index.ts
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { College, CollegeParam } from './model';
|
||||||
|
|
||||||
|
export async function pageCollege(params: CollegeParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<College>>>(
|
||||||
|
'/gxmu/college/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function listCollege(params?: CollegeParam) {
|
||||||
|
const res = await request.get<ApiResult<College[]>>('/gxmu/college', {
|
||||||
|
params
|
||||||
|
});
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function getCollege(id: number) {
|
||||||
|
const res = await request.get<ApiResult<College>>('/gxmu/college/' + id);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function addCollege(data: College) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>('/gxmu/college', data);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function updateCollege(data: College) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>('/gxmu/college', data);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function removeCollege(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>('/gxmu/college/' + id);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function removeBatchCollege(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>('/gxmu/college/batch', {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
24
src/api/gxmu/college/model/index.ts
Normal file
24
src/api/gxmu/college/model/index.ts
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
export interface College {
|
||||||
|
id?: number;
|
||||||
|
collegeCode?: string;
|
||||||
|
collegeName?: string;
|
||||||
|
shortName?: string;
|
||||||
|
leaderName?: string;
|
||||||
|
leaderPhone?: string;
|
||||||
|
sortNumber?: number;
|
||||||
|
status?: number;
|
||||||
|
remark?: string;
|
||||||
|
classCount?: number;
|
||||||
|
createTime?: string;
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CollegeParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
collegeCode?: string;
|
||||||
|
collegeName?: string;
|
||||||
|
status?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
55
src/api/gxmu/cross-school-activity-article/index.ts
Normal file
55
src/api/gxmu/cross-school-activity-article/index.ts
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type {
|
||||||
|
CrossSchoolActivityArticle,
|
||||||
|
CrossSchoolActivityArticleParam
|
||||||
|
} from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询跨校活动情报文章
|
||||||
|
*/
|
||||||
|
export async function pageCrossSchoolActivityArticle(
|
||||||
|
params: CrossSchoolActivityArticleParam
|
||||||
|
) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CrossSchoolActivityArticle>>>(
|
||||||
|
'/gxmu/cross-school-activity-article/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询跨校活动情报文章
|
||||||
|
*/
|
||||||
|
export async function listCrossSchoolActivityArticle(
|
||||||
|
params?: CrossSchoolActivityArticleParam
|
||||||
|
) {
|
||||||
|
const res = await request.get<ApiResult<CrossSchoolActivityArticle[]>>(
|
||||||
|
'/gxmu/cross-school-activity-article',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步跨校活动情报文章
|
||||||
|
*/
|
||||||
|
export async function syncCrossSchoolActivityArticle() {
|
||||||
|
const res = await request.post<ApiResult<number>>(
|
||||||
|
'/gxmu/cross-school-activity-article/sync'
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data ?? 0;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
38
src/api/gxmu/cross-school-activity-article/model/index.ts
Normal file
38
src/api/gxmu/cross-school-activity-article/model/index.ts
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跨校活动情报文章
|
||||||
|
*/
|
||||||
|
export interface CrossSchoolActivityArticle {
|
||||||
|
id?: number;
|
||||||
|
sourceKey?: string;
|
||||||
|
title?: string;
|
||||||
|
schoolName?: string;
|
||||||
|
category?: string;
|
||||||
|
heatLevel?: '高热' | '跟进' | '观察' | string;
|
||||||
|
sourceName?: string;
|
||||||
|
publishTime?: string;
|
||||||
|
summary?: string;
|
||||||
|
tags?: string;
|
||||||
|
coverImage?: string;
|
||||||
|
detailUrl?: string;
|
||||||
|
sourceUrl?: string;
|
||||||
|
highlight?: string;
|
||||||
|
contentText?: string;
|
||||||
|
lastSyncTime?: string;
|
||||||
|
createTime?: string;
|
||||||
|
updateTime?: string;
|
||||||
|
deleted?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跨校活动情报文章搜索条件
|
||||||
|
*/
|
||||||
|
export interface CrossSchoolActivityArticleParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
title?: string;
|
||||||
|
schoolName?: string;
|
||||||
|
category?: string;
|
||||||
|
heatLevel?: string;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
src/api/gxmu/declare/index.ts
Normal file
106
src/api/gxmu/declare/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { Declare, DeclareParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询申报管理
|
||||||
|
*/
|
||||||
|
export async function pageDeclare(params: DeclareParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<Declare>>>(
|
||||||
|
MODULES_API_URL + '/gxmu/declare/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询申报管理列表
|
||||||
|
*/
|
||||||
|
export async function listDeclare(params?: DeclareParam) {
|
||||||
|
const res = await request.get<ApiResult<Declare[]>>(
|
||||||
|
MODULES_API_URL + '/gxmu/declare',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加申报管理
|
||||||
|
*/
|
||||||
|
export async function addDeclare(data: Declare) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gxmu/declare',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改申报管理
|
||||||
|
*/
|
||||||
|
export async function updateDeclare(data: Declare) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gxmu/declare',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除申报管理
|
||||||
|
*/
|
||||||
|
export async function removeDeclare(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gxmu/declare/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除申报管理
|
||||||
|
*/
|
||||||
|
export async function removeBatchDeclare(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gxmu/declare/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询申报管理
|
||||||
|
*/
|
||||||
|
export async function getDeclare(id: number) {
|
||||||
|
const res = await request.get<ApiResult<Declare>>(
|
||||||
|
MODULES_API_URL + '/gxmu/declare/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
58
src/api/gxmu/declare/model/index.ts
Normal file
58
src/api/gxmu/declare/model/index.ts
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申报管理
|
||||||
|
*/
|
||||||
|
export interface Declare {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
//
|
||||||
|
title?: string;
|
||||||
|
//
|
||||||
|
year?: number;
|
||||||
|
//
|
||||||
|
module?: string;
|
||||||
|
// 挑战杯项目类型
|
||||||
|
projectType?: string | string[];
|
||||||
|
// 挑战杯项目分组
|
||||||
|
projectGroup?: string | string[];
|
||||||
|
// 挑战杯申报表项目类型
|
||||||
|
formProjectType?: string | string[];
|
||||||
|
// 挑战杯申报表项目分组
|
||||||
|
formProjectGroup?: string | string[];
|
||||||
|
// 挑战杯公开展示项目类型
|
||||||
|
publicProjectType?: string | string[];
|
||||||
|
// 挑战杯公开展示项目分组
|
||||||
|
publicProjectGroup?: string | string[];
|
||||||
|
//
|
||||||
|
startTime?: string;
|
||||||
|
//
|
||||||
|
endTime?: string;
|
||||||
|
// 用户ID
|
||||||
|
userId?: string;
|
||||||
|
// 租户ID
|
||||||
|
tenantId?: string;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 更新时间
|
||||||
|
updateTime?: string;
|
||||||
|
// 删除标记:0未删 1已删
|
||||||
|
deleted?: number;
|
||||||
|
// 是否可申报
|
||||||
|
usable?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申报管理搜索条件
|
||||||
|
*/
|
||||||
|
export interface DeclareParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
usable?: boolean;
|
||||||
|
projectType?: string;
|
||||||
|
projectGroup?: string;
|
||||||
|
formProjectType?: string;
|
||||||
|
formProjectGroup?: string;
|
||||||
|
publicProjectType?: string;
|
||||||
|
publicProjectGroup?: string;
|
||||||
|
}
|
||||||
19
src/api/gxmu/project-topic-semantic-search/index.ts
Normal file
19
src/api/gxmu/project-topic-semantic-search/index.ts
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult } from '@/api';
|
||||||
|
import type { WxxzxTopicSemanticSearchItem } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目主题语义检索
|
||||||
|
*/
|
||||||
|
export async function searchProjectTopics(keyword: string, module?: string) {
|
||||||
|
const res = await request.get<ApiResult<WxxzxTopicSemanticSearchItem[]>>(
|
||||||
|
'/gxmu/wxxzx-form/semantic-search',
|
||||||
|
{
|
||||||
|
params: { keyword, module }
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data || [];
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
10
src/api/gxmu/project-topic-semantic-search/model/index.ts
Normal file
10
src/api/gxmu/project-topic-semantic-search/model/index.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
export interface WxxzxTopicSemanticSearchItem {
|
||||||
|
id: number;
|
||||||
|
module?: string;
|
||||||
|
moduleName?: string;
|
||||||
|
topicName?: string;
|
||||||
|
topicType?: string;
|
||||||
|
rationale?: string;
|
||||||
|
snippet?: string;
|
||||||
|
score?: number;
|
||||||
|
}
|
||||||
123
src/api/gxmu/qmgc-form/index.ts
Normal file
123
src/api/gxmu/qmgc-form/index.ts
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { FileRecord } from '@/api/system/file/model';
|
||||||
|
import type { QmgcForm, QmgcFormParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询QmgcForm
|
||||||
|
*/
|
||||||
|
export async function pageQmgcForm(params: QmgcFormParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<QmgcForm>>>(
|
||||||
|
'/gxmu/qmgc-form/page',
|
||||||
|
{
|
||||||
|
params: { ...params, backendAccess: true }
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户分页查询QmgcForm
|
||||||
|
*/
|
||||||
|
export async function userPageQmgcForm(params: QmgcFormParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<QmgcForm>>>(
|
||||||
|
'/gxmu/qmgc-form/userPage',
|
||||||
|
{
|
||||||
|
params: { ...params, backendAccess: true }
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询QmgcForm列表
|
||||||
|
*/
|
||||||
|
export async function listQmgcForm(params?: QmgcFormParam) {
|
||||||
|
const res = await request.get<ApiResult<QmgcForm[]>>('/gxmu/qmgc-form', {
|
||||||
|
params
|
||||||
|
});
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询QmgcForm
|
||||||
|
*/
|
||||||
|
export async function getQmgcForm(id: number) {
|
||||||
|
const res = await request.get<ApiResult<QmgcForm>>('/gxmu/qmgc-form/' + id);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加QmgcForm
|
||||||
|
*/
|
||||||
|
export async function addQmgcForm(data: QmgcForm) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>('/gxmu/qmgc-form', data);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改QmgcForm
|
||||||
|
*/
|
||||||
|
export async function updateQmgcForm(data: QmgcForm) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>('/gxmu/qmgc-form', data);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除QmgcForm
|
||||||
|
*/
|
||||||
|
export async function removeQmgcForm(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>('/gxmu/qmgc-form/' + id);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除QmgcForm
|
||||||
|
*/
|
||||||
|
export async function removeBatchQmgcForm(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/gxmu/qmgc-form/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出QmgcForm
|
||||||
|
*/
|
||||||
|
export async function exportQmgcForm(params?: QmgcFormParam) {
|
||||||
|
const res = await request.post<ApiResult<FileRecord>>('/gxmu/qmgc-form/export', {
|
||||||
|
...params,
|
||||||
|
backendAccess: true
|
||||||
|
});
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
48
src/api/gxmu/qmgc-form/model/index.ts
Normal file
48
src/api/gxmu/qmgc-form/model/index.ts
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
import type { ReviewList } from '@/api/gxmu/reviewList/model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* QmgcForm
|
||||||
|
*/
|
||||||
|
export interface QmgcForm {
|
||||||
|
id?: number;
|
||||||
|
year?: string;
|
||||||
|
name?: string;
|
||||||
|
gender?: string;
|
||||||
|
nation?: string;
|
||||||
|
photo?: string;
|
||||||
|
birthMonth?: string;
|
||||||
|
politics?: string;
|
||||||
|
nativePlace?: string;
|
||||||
|
phone?: string;
|
||||||
|
wechat?: string;
|
||||||
|
email?: string;
|
||||||
|
qq?: string;
|
||||||
|
idCardNo?: string;
|
||||||
|
hobby?: string;
|
||||||
|
willingToWorkInGuangxi?: string;
|
||||||
|
schoolInfo?: string;
|
||||||
|
leaguePosition?: string;
|
||||||
|
resume?: string;
|
||||||
|
awards?: string;
|
||||||
|
academicPerformance?: string;
|
||||||
|
secondaryLeagueOpinion?: string;
|
||||||
|
secondaryLeagueOpinionDate?: string;
|
||||||
|
secondaryPartyOpinion?: string;
|
||||||
|
secondaryPartyOpinionDate?: string;
|
||||||
|
schoolLeagueOpinion?: string;
|
||||||
|
schoolLeagueOpinionDate?: string;
|
||||||
|
reviewList?: ReviewList[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* QmgcForm 搜索条件
|
||||||
|
*/
|
||||||
|
export interface QmgcFormParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
year?: string;
|
||||||
|
name?: string;
|
||||||
|
phone?: string;
|
||||||
|
schoolInfo?: string;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
106
src/api/gxmu/reviewFlow/index.ts
Normal file
106
src/api/gxmu/reviewFlow/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { ReviewFlow, ReviewFlowParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询审核流
|
||||||
|
*/
|
||||||
|
export async function pageReviewFlow(params: ReviewFlowParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<ReviewFlow>>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-flow/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询审核流列表
|
||||||
|
*/
|
||||||
|
export async function listReviewFlow(params?: ReviewFlowParam) {
|
||||||
|
const res = await request.get<ApiResult<ReviewFlow[]>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-flow',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加审核流
|
||||||
|
*/
|
||||||
|
export async function addReviewFlow(data: ReviewFlow) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-flow',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改审核流
|
||||||
|
*/
|
||||||
|
export async function updateReviewFlow(data: ReviewFlow) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-flow',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除审核流
|
||||||
|
*/
|
||||||
|
export async function removeReviewFlow(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-flow/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除审核流
|
||||||
|
*/
|
||||||
|
export async function removeBatchReviewFlow(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-flow/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询审核流
|
||||||
|
*/
|
||||||
|
export async function getReviewFlow(id: number) {
|
||||||
|
const res = await request.get<ApiResult<ReviewFlow>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-flow/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
37
src/api/gxmu/reviewFlow/model/index.ts
Normal file
37
src/api/gxmu/reviewFlow/model/index.ts
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import type { PageParam } from "@/api";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核流
|
||||||
|
*/
|
||||||
|
export interface ReviewFlow {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
//
|
||||||
|
title?: string;
|
||||||
|
//
|
||||||
|
organizationId?: number;
|
||||||
|
//
|
||||||
|
level?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
reviewUserId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
//
|
||||||
|
userId?: number;
|
||||||
|
organizationName?: string;
|
||||||
|
flows?: ReviewFlow[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核流搜索条件
|
||||||
|
*/
|
||||||
|
export interface ReviewFlowParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
withGroup?: boolean;
|
||||||
|
}
|
||||||
106
src/api/gxmu/reviewFlowConfig/index.ts
Normal file
106
src/api/gxmu/reviewFlowConfig/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { ReviewFlowConfig, ReviewFlowConfigParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
export async function pageReviewFlowConfig(params: ReviewFlowConfigParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<ReviewFlowConfig>>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-flow-config/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
export async function listReviewFlowConfig(params?: ReviewFlowConfigParam) {
|
||||||
|
const res = await request.get<ApiResult<ReviewFlowConfig[]>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-flow-config',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*/
|
||||||
|
export async function addReviewFlowConfig(data: ReviewFlowConfig) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-flow-config',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
export async function updateReviewFlowConfig(data: ReviewFlowConfig) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-flow-config',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
export async function removeReviewFlowConfig(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-flow-config/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
export async function removeBatchReviewFlowConfig(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-flow-config/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*/
|
||||||
|
export async function getReviewFlowConfig(id: number) {
|
||||||
|
const res = await request.get<ApiResult<ReviewFlowConfig>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-flow-config/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
37
src/api/gxmu/reviewFlowConfig/model/index.ts
Normal file
37
src/api/gxmu/reviewFlowConfig/model/index.ts
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface ReviewFlowConfig {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
//
|
||||||
|
title?: string;
|
||||||
|
// 所属部门(机构)
|
||||||
|
organizationId?: number;
|
||||||
|
// 所属部门名称(后端可能返回)
|
||||||
|
organizationName?: string;
|
||||||
|
// 流id
|
||||||
|
flowId?: number;
|
||||||
|
// 模块
|
||||||
|
module?: string;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
//
|
||||||
|
userId?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface ReviewFlowConfigParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
122
src/api/gxmu/reviewList/index.ts
Normal file
122
src/api/gxmu/reviewList/index.ts
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { ReviewList, ReviewListParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询审核列表
|
||||||
|
*/
|
||||||
|
export async function pageReviewList(params: ReviewListParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<ReviewList>>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-list/page',
|
||||||
|
{
|
||||||
|
params: { ...params, backendAccess: true }
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询聚合后的审核列表
|
||||||
|
*/
|
||||||
|
export async function pageGroupReviewList(params: ReviewListParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<ReviewList>>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-list/groupPage',
|
||||||
|
{
|
||||||
|
params: { ...params, backendAccess: true }
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询审核列表列表
|
||||||
|
*/
|
||||||
|
export async function listReviewList(params?: ReviewListParam) {
|
||||||
|
const res = await request.get<ApiResult<ReviewList[]>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-list',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加审核列表
|
||||||
|
*/
|
||||||
|
export async function addReviewList(data: ReviewList) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-list',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改审核列表
|
||||||
|
*/
|
||||||
|
export async function updateReviewList(data: ReviewList) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-list',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除审核列表
|
||||||
|
*/
|
||||||
|
export async function removeReviewList(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-list/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除审核列表
|
||||||
|
*/
|
||||||
|
export async function removeBatchReviewList(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-list/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询审核列表
|
||||||
|
*/
|
||||||
|
export async function getReviewList(id: number) {
|
||||||
|
const res = await request.get<ApiResult<ReviewList>>(
|
||||||
|
MODULES_API_URL + '/gxmu/review-list/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
51
src/api/gxmu/reviewList/model/index.ts
Normal file
51
src/api/gxmu/reviewList/model/index.ts
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核列表
|
||||||
|
*/
|
||||||
|
export interface ReviewList {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
// 模块
|
||||||
|
module?: string;
|
||||||
|
// 模块名称
|
||||||
|
moduleName?: string;
|
||||||
|
// 业务名称
|
||||||
|
businessName?: string;
|
||||||
|
// 主键
|
||||||
|
pk?: number;
|
||||||
|
// 状态(0不通过 1通过)
|
||||||
|
status?: number;
|
||||||
|
// 审核意见
|
||||||
|
content?: string;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
//
|
||||||
|
userId?: number;
|
||||||
|
//
|
||||||
|
sortNumber?: number;
|
||||||
|
// 审核人信息
|
||||||
|
user?: {
|
||||||
|
realName?: string;
|
||||||
|
username?: string;
|
||||||
|
};
|
||||||
|
// 聚合后的审核流
|
||||||
|
reviewFlowList?: ReviewList[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核列表搜索条件
|
||||||
|
*/
|
||||||
|
export interface ReviewListParam extends PageParam {
|
||||||
|
backendAccess?: boolean;
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
module?: string;
|
||||||
|
pk?: number;
|
||||||
|
}
|
||||||
114
src/api/gxmu/sjqn-form/index.ts
Normal file
114
src/api/gxmu/sjqn-form/index.ts
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { FileRecord } from '@/api/system/file/model';
|
||||||
|
import type { SjqnForm, SjqnFormParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询SjqnForm
|
||||||
|
*/
|
||||||
|
export async function pageSjqnForm(params: SjqnFormParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<SjqnForm>>>('/gxmu/sjqn-form/page', {
|
||||||
|
params: { ...params, backendAccess: true }
|
||||||
|
});
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户分页查询SjqnForm
|
||||||
|
*/
|
||||||
|
export async function userPageSjqnForm(params: SjqnFormParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<SjqnForm>>>('/gxmu/sjqn-form/userPage', {
|
||||||
|
params: { ...params, backendAccess: true }
|
||||||
|
});
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询SjqnForm列表
|
||||||
|
*/
|
||||||
|
export async function listSjqnForm(params?: SjqnFormParam) {
|
||||||
|
const res = await request.get<ApiResult<SjqnForm[]>>('/gxmu/sjqn-form', {
|
||||||
|
params
|
||||||
|
});
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询SjqnForm
|
||||||
|
*/
|
||||||
|
export async function getSjqnForm(id: number) {
|
||||||
|
const res = await request.get<ApiResult<SjqnForm>>('/gxmu/sjqn-form/' + id);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加SjqnForm
|
||||||
|
*/
|
||||||
|
export async function addSjqnForm(data: SjqnForm) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>('/gxmu/sjqn-form', data);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改SjqnForm
|
||||||
|
*/
|
||||||
|
export async function updateSjqnForm(data: SjqnForm) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>('/gxmu/sjqn-form', data);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除SjqnForm
|
||||||
|
*/
|
||||||
|
export async function removeSjqnForm(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>('/gxmu/sjqn-form/' + id);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除SjqnForm
|
||||||
|
*/
|
||||||
|
export async function removeBatchSjqnForm(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>('/gxmu/sjqn-form/batch', {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出SjqnForm
|
||||||
|
*/
|
||||||
|
export async function exportSjqnForm(params?: SjqnFormParam) {
|
||||||
|
const res = await request.post<ApiResult<FileRecord>>('/gxmu/sjqn-form/export', {
|
||||||
|
...params,
|
||||||
|
backendAccess: true
|
||||||
|
});
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
40
src/api/gxmu/sjqn-form/model/index.ts
Normal file
40
src/api/gxmu/sjqn-form/model/index.ts
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
import type { ReviewList } from '@/api/gxmu/reviewList/model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SjqnForm
|
||||||
|
*/
|
||||||
|
export interface SjqnForm {
|
||||||
|
id?: number;
|
||||||
|
year?: string;
|
||||||
|
applyType?: string;
|
||||||
|
name?: string;
|
||||||
|
gender?: string;
|
||||||
|
birthMonth?: string;
|
||||||
|
nation?: string;
|
||||||
|
politics?: string;
|
||||||
|
education?: string;
|
||||||
|
position?: string;
|
||||||
|
title?: string;
|
||||||
|
unit?: string;
|
||||||
|
awards?: string;
|
||||||
|
experience?: string;
|
||||||
|
mainStory?: string;
|
||||||
|
leagueOpinion?: string;
|
||||||
|
partyOpinion?: string;
|
||||||
|
schoolOpinion?: string;
|
||||||
|
reviewList?: ReviewList[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SjqnForm搜索条件
|
||||||
|
*/
|
||||||
|
export interface SjqnFormParam extends PageParam {
|
||||||
|
backendAccess?: boolean;
|
||||||
|
id?: number;
|
||||||
|
year?: string;
|
||||||
|
name?: string;
|
||||||
|
unit?: string;
|
||||||
|
applyType?: string;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
114
src/api/gxmu/sjtbzbsj-form/index.ts
Normal file
114
src/api/gxmu/sjtbzbsj-form/index.ts
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { FileRecord } from '@/api/system/file/model';
|
||||||
|
import type { SjtbzbsjForm, SjtbzbsjFormParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询SjtbzbsjForm
|
||||||
|
*/
|
||||||
|
export async function pageSjtbzbsjForm(params: SjtbzbsjFormParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<SjtbzbsjForm>>>('/gxmu/sjtbzbsj-form/page', {
|
||||||
|
params: { ...params, backendAccess: true }
|
||||||
|
});
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户分页查询SjtbzbsjForm
|
||||||
|
*/
|
||||||
|
export async function userPageSjtbzbsjForm(params: SjtbzbsjFormParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<SjtbzbsjForm>>>('/gxmu/sjtbzbsj-form/userPage', {
|
||||||
|
params: { ...params, backendAccess: true }
|
||||||
|
});
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询SjtbzbsjForm列表
|
||||||
|
*/
|
||||||
|
export async function listSjtbzbsjForm(params?: SjtbzbsjFormParam) {
|
||||||
|
const res = await request.get<ApiResult<SjtbzbsjForm[]>>('/gxmu/sjtbzbsj-form', {
|
||||||
|
params
|
||||||
|
});
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询SjtbzbsjForm
|
||||||
|
*/
|
||||||
|
export async function getSjtbzbsjForm(id: number) {
|
||||||
|
const res = await request.get<ApiResult<SjtbzbsjForm>>('/gxmu/sjtbzbsj-form/' + id);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加SjtbzbsjForm
|
||||||
|
*/
|
||||||
|
export async function addSjtbzbsjForm(data: SjtbzbsjForm) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>('/gxmu/sjtbzbsj-form', data);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改SjtbzbsjForm
|
||||||
|
*/
|
||||||
|
export async function updateSjtbzbsjForm(data: SjtbzbsjForm) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>('/gxmu/sjtbzbsj-form', data);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除SjtbzbsjForm
|
||||||
|
*/
|
||||||
|
export async function removeSjtbzbsjForm(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>('/gxmu/sjtbzbsj-form/' + id);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除SjtbzbsjForm
|
||||||
|
*/
|
||||||
|
export async function removeBatchSjtbzbsjForm(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>('/gxmu/sjtbzbsj-form/batch', {
|
||||||
|
data
|
||||||
|
});
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出SjtbzbsjForm
|
||||||
|
*/
|
||||||
|
export async function exportSjtbzbsjForm(params?: SjtbzbsjFormParam) {
|
||||||
|
const res = await request.post<ApiResult<FileRecord>>('/gxmu/sjtbzbsj-form/export', {
|
||||||
|
...params,
|
||||||
|
backendAccess: true
|
||||||
|
});
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
37
src/api/gxmu/sjtbzbsj-form/model/index.ts
Normal file
37
src/api/gxmu/sjtbzbsj-form/model/index.ts
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
import type { ReviewList } from '@/api/gxmu/reviewList/model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SjtbzbsjForm
|
||||||
|
*/
|
||||||
|
export interface SjtbzbsjForm {
|
||||||
|
id?: number;
|
||||||
|
year?: string;
|
||||||
|
name?: string;
|
||||||
|
gender?: string;
|
||||||
|
birthMonth?: string;
|
||||||
|
nation?: string;
|
||||||
|
politics?: string;
|
||||||
|
collegeClass?: string;
|
||||||
|
branch?: string;
|
||||||
|
eduEval?: string;
|
||||||
|
awards?: string;
|
||||||
|
experience?: string;
|
||||||
|
mainStory?: string;
|
||||||
|
leagueOpinion?: string;
|
||||||
|
partyOpinion?: string;
|
||||||
|
schoolOpinion?: string;
|
||||||
|
reviewList?: ReviewList[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SjtbzbsjForm搜索条件
|
||||||
|
*/
|
||||||
|
export interface SjtbzbsjFormParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
year?: string;
|
||||||
|
name?: string;
|
||||||
|
collegeClass?: string;
|
||||||
|
branch?: string;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
169
src/api/gxmu/tygl-form/index.ts
Normal file
169
src/api/gxmu/tygl-form/index.ts
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { FileRecord } from '@/api/system/file/model';
|
||||||
|
import type {
|
||||||
|
TyglDataCenterRecord,
|
||||||
|
TyglDataCenterResult,
|
||||||
|
TyglForm,
|
||||||
|
TyglFormParam,
|
||||||
|
TyglGrowthArchive,
|
||||||
|
TyglMemberRecord
|
||||||
|
} from './model';
|
||||||
|
|
||||||
|
export interface TyglMemberRecordsPayload {
|
||||||
|
memberRecords?: TyglMemberRecord[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TyglGrowthArchivesPayload {
|
||||||
|
growthArchives?: TyglGrowthArchive[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询TyglForm
|
||||||
|
*/
|
||||||
|
export async function pageTyglForm(params: TyglFormParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<TyglForm>>>(
|
||||||
|
'/gxmu/tygl-form/page',
|
||||||
|
{
|
||||||
|
params: { ...params, backendAccess: true }
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询TyglForm列表
|
||||||
|
*/
|
||||||
|
export async function listTyglForm(params?: TyglFormParam) {
|
||||||
|
const res = await request.get<ApiResult<TyglForm[]>>('/gxmu/tygl-form', {
|
||||||
|
params
|
||||||
|
});
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询TyglForm
|
||||||
|
*/
|
||||||
|
export async function getTyglForm(id: number) {
|
||||||
|
const res = await request.get<ApiResult<TyglForm>>('/gxmu/tygl-form/' + id);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询团员青年数据分析中心明细
|
||||||
|
*/
|
||||||
|
export async function getTyglDataCenterRecords() {
|
||||||
|
const res = await request.get<ApiResult<TyglDataCenterResult>>(
|
||||||
|
'/gxmu/tygl-form/data-center'
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加TyglForm
|
||||||
|
*/
|
||||||
|
export async function addTyglForm(data: TyglForm) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>('/gxmu/tygl-form', data);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改TyglForm
|
||||||
|
*/
|
||||||
|
export async function updateTyglForm(data: TyglForm) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>('/gxmu/tygl-form', data);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新团员记录
|
||||||
|
*/
|
||||||
|
export async function updateTyglMemberRecords(
|
||||||
|
id: number,
|
||||||
|
data: TyglMemberRecordsPayload
|
||||||
|
) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/gxmu/tygl-form/member-records/' + id,
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新成长档案
|
||||||
|
*/
|
||||||
|
export async function updateTyglGrowthArchives(
|
||||||
|
id: number,
|
||||||
|
data: TyglGrowthArchivesPayload
|
||||||
|
) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/gxmu/tygl-form/growth-archives/' + id,
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除TyglForm
|
||||||
|
*/
|
||||||
|
export async function removeTyglForm(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>('/gxmu/tygl-form/' + id);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除TyglForm
|
||||||
|
*/
|
||||||
|
export async function removeBatchTyglForm(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
'/gxmu/tygl-form/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出TyglForm
|
||||||
|
*/
|
||||||
|
export async function exportTyglForm(params?: TyglFormParam) {
|
||||||
|
const res = await request.post<ApiResult<FileRecord>>('/gxmu/tygl-form/export', {
|
||||||
|
...params,
|
||||||
|
backendAccess: true
|
||||||
|
});
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user