修复错误,以及本地化
This commit is contained in:
parent
e3cda00ff2
commit
612becc4eb
2
pom.xml
2
pom.xml
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<name>ry-xinli</name>
|
||||
<url>http://www.ddnai.com</url>
|
||||
<description>DDNAI心理健康测评系统</description>
|
||||
<description>DDNAIAI心理健康测评系统</description>
|
||||
|
||||
<properties>
|
||||
<ruoyi.version>1.0.0</ruoyi.version>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class XinliApplication
|
|||
public ApplicationRunner applicationRunner()
|
||||
{
|
||||
return args -> {
|
||||
System.out.println("\n(♥◠‿◠)ノ゙ 心理健康测评系统启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||
System.out.println("\n(♥◠‿◠)ノ゙ AI心理健康测评系统启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||
" .-------. ____ __ \n" +
|
||||
" | _ _ \\ \\ \\ / / \n" +
|
||||
" | ( ' ) | \\ _. / ' \n" +
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# 项目相关配置
|
||||
ruoyi:
|
||||
# 名称
|
||||
name: 心理健康测评系统
|
||||
name: AI心理健康测评系统
|
||||
# 版本
|
||||
version: 1.0.0
|
||||
# 版权年份
|
||||
|
|
|
|||
|
|
@ -20,5 +20,5 @@ Spring Boot Version: ${spring-boot.version}
|
|||
// ========`-.____`-.___\_____/___.-`____.-'======== //
|
||||
// `=---=' //
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
|
||||
// 心理健康测评系统 永不宕机 永无BUG //
|
||||
// AI心理健康测评系统 永不宕机 永无BUG //
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -22,76 +22,73 @@ public class PsyUserProfile extends BaseEntity
|
|||
private Long userId;
|
||||
|
||||
/** 档案类型(如:standard标准 child儿童 adult成人 senior老年) */
|
||||
@Excel(name = "档案类型", readConverterExp = "standard=标准,child=儿童,adult=成人,senior=老年")
|
||||
private String profileType;
|
||||
|
||||
/** 头像 */
|
||||
private String avatar;
|
||||
|
||||
/** 身份证号 */
|
||||
@Excel(name = "身份证号")
|
||||
private String idCard;
|
||||
|
||||
/** 档案数据(JSON格式) */
|
||||
private String profileData;
|
||||
|
||||
/** 姓名 */
|
||||
@Excel(name = "姓名")
|
||||
@Excel(name = "罪犯姓名", sort = 2)
|
||||
private String userName;
|
||||
|
||||
/** 电话 */
|
||||
@Excel(name = "电话")
|
||||
private String phone;
|
||||
|
||||
/** 生日 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "生日", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private java.util.Date birthday;
|
||||
|
||||
/** 监狱 */
|
||||
@Excel(name = "监狱")
|
||||
@Excel(name = "监狱", sort = 3)
|
||||
private String prison;
|
||||
|
||||
/** 监区 */
|
||||
@Excel(name = "监区")
|
||||
@Excel(name = "监区", sort = 4)
|
||||
private String prisonArea;
|
||||
|
||||
/** 性别 */
|
||||
@Excel(name = "性别", readConverterExp = "0=男,1=女,2=未知")
|
||||
@Excel(name = "性别", sort = 5, readConverterExp = "0=男,1=女,2=未知")
|
||||
private String gender;
|
||||
|
||||
/** 民族 */
|
||||
@Excel(name = "民族")
|
||||
@Excel(name = "民族", sort = 6)
|
||||
private String nation;
|
||||
|
||||
/** 文化程度 */
|
||||
@Excel(name = "文化程度")
|
||||
@Excel(name = "文化程度", sort = 7)
|
||||
private String educationLevel;
|
||||
|
||||
/** 罪名 */
|
||||
@Excel(name = "罪名")
|
||||
@Excel(name = "罪名", sort = 8)
|
||||
private String crimeName;
|
||||
|
||||
/** 刑期 */
|
||||
@Excel(name = "刑期")
|
||||
@Excel(name = "刑期", sort = 9)
|
||||
private String sentenceTerm;
|
||||
|
||||
/** 刑期起日 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "刑期起日", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@Excel(name = "刑期起日", sort = 10, width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private java.util.Date sentenceStartDate;
|
||||
|
||||
/** 刑期止日 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "刑期止日", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@Excel(name = "刑期止日", sort = 11, width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private java.util.Date sentenceEndDate;
|
||||
|
||||
/** 入监时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "入监时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@Excel(name = "入监时间", sort = 12, width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private java.util.Date entryDate;
|
||||
|
||||
/** 用户状态(0正常 1停用) */
|
||||
/** 用户状态(0在押 1释放 2外出 3假释) */
|
||||
@Excel(name = "状态", sort = 13, readConverterExp = "0=在押,1=释放,2=外出,3=假释")
|
||||
private String status;
|
||||
|
||||
/** 部门ID */
|
||||
|
|
@ -101,7 +98,7 @@ public class PsyUserProfile extends BaseEntity
|
|||
private String deptName;
|
||||
|
||||
/** 信息编号 */
|
||||
@Excel(name = "信息编号")
|
||||
@Excel(name = "信息编号", sort = 1)
|
||||
private String infoNumber;
|
||||
|
||||
public Long getProfileId()
|
||||
|
|
|
|||
|
|
@ -176,6 +176,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="sentenceEndDate != null">sentence_end_date = #{sentenceEndDate}, </if>
|
||||
<if test="entryDate != null">entry_date = #{entryDate}, </if>
|
||||
<if test="infoNumber != null">info_number = #{infoNumber}, </if>
|
||||
<if test="status != null and status != ''">status = #{status}, </if>
|
||||
<if test="updateBy != null">update_by = #{updateBy}, </if>
|
||||
<if test="remark != null">remark = #{remark}, </if>
|
||||
update_time = sysdate()
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,2 +1,2 @@
|
|||
VUE_APP_BASE_API=/dev-api
|
||||
VUE_APP_TITLE=心理健康测评系统
|
||||
VUE_APP_TITLE=AI心理健康测评系统
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# 页面标题
|
||||
VUE_APP_TITLE = 心理健康测评系统
|
||||
VUE_APP_TITLE = AI心理健康测评系统
|
||||
|
||||
# 生产环境配置
|
||||
ENV = 'production'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# 页面标题
|
||||
VUE_APP_TITLE = 心理健康测评系统
|
||||
VUE_APP_TITLE = AI心理健康测评系统
|
||||
|
||||
BABEL_ENV = production
|
||||
|
||||
|
|
|
|||
|
|
@ -34,4 +34,4 @@ npm run build:prod
|
|||
本项目基于-Vue框架定制开发,已进行以下定制化改造:
|
||||
- 项目包名:com.ruoyi.* → com.ddnai.*
|
||||
- 模块命名:ruoyi-* → ry-xinli-*
|
||||
- 品牌标识:全面更换为"心理健康测评系统"
|
||||
- 品牌标识:全面更换为"AI心理健康测评系统"
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "ry-xinli",
|
||||
"version": "1.0.0",
|
||||
"description": "心理健康测评系统",
|
||||
"description": "AI心理健康测评系统",
|
||||
"author": "wanxiubin",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* 通用css样式布局处理
|
||||
* 心理健康测评系统
|
||||
* AI心理健康测评系统
|
||||
* Copyright (c) 2025
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* v-dialogDrag 弹窗拖拽
|
||||
* 心理健康测评系统
|
||||
* AI心理健康测评系统
|
||||
* Copyright (c) 2025
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* v-dialogDragWidth 可拖动弹窗高度(右下角)
|
||||
* 心理健康测评系统
|
||||
* AI心理健康测评系统
|
||||
* Copyright (c) 2025
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* v-dialogDragWidth 可拖动弹窗宽度(右侧边)
|
||||
* 心理健康测评系统
|
||||
* AI心理健康测评系统
|
||||
* Copyright (c) 2025
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* v-clipboard 文字复制剪贴
|
||||
* 心理健康测评系统
|
||||
* AI心理健康测评系统
|
||||
* Copyright (c) 2025
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* v-hasPermi 操作权限处理
|
||||
* 心理健康测评系统
|
||||
* AI心理健康测评系统
|
||||
* Copyright (c) 2025
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* v-hasRole 角色权限处理
|
||||
* 心理健康测评系统
|
||||
* AI心理健康测评系统
|
||||
* Copyright (c) 2025
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -52,5 +52,5 @@ module.exports = {
|
|||
/**
|
||||
* 底部版权文本内容
|
||||
*/
|
||||
footerContent: 'Copyright © 2025 心理健康测评系统. All Rights Reserved.'
|
||||
footerContent: 'Copyright © 2025 AI心理健康测评系统. All Rights Reserved.'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* 通用js方法封装处理
|
||||
* 心理健康测评系统
|
||||
* AI心理健康测评系统
|
||||
* Copyright (c) 2025
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
</el-form>
|
||||
<!-- 底部 -->
|
||||
<div class="el-login-footer">
|
||||
<span>Copyright © 2025 心理健康测评系统. All Rights Reserved.</span>
|
||||
<span>Copyright © 2025 AI心理健康测评系统. All Rights Reserved.</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="app-container home">
|
||||
<el-row :gutter="20" class="mb20">
|
||||
<el-col :sm="24" :lg="16" class="intro">
|
||||
<h2>心理健康测评系统</h2>
|
||||
<h2>AI心理健康测评系统</h2>
|
||||
<p>欢迎来到心理网站内容中心。这里展示了管理员在「心理网站管理」中发布的公告、文章与资讯,您可以随时查看并留下宝贵评论。</p>
|
||||
<p class="tips">
|
||||
<i class="el-icon-info" />
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="login">
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" :class="['login-form', { 'admin-mode': isAdminMode }]">
|
||||
<h1 style="text-align: center; color: #1890ff;">心理健康测评系统</h1>
|
||||
<h1 style="text-align: center; color: #1890ff;">AI心理健康测评系统</h1>
|
||||
<h3 class="title">{{ isAdminMode ? '管理员登录' : '学员登录' }}</h3>
|
||||
|
||||
<!-- 学员登录表单 -->
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
</el-form>
|
||||
<!-- 底部 -->
|
||||
<div class="el-login-footer">
|
||||
<span>Copyright © 2025 心理健康测评系统. All Rights Reserved.</span>
|
||||
<span>Copyright © 2025 AI心理健康测评系统. All Rights Reserved.</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -122,12 +122,12 @@ export default {
|
|||
// 确保默认是学员登录模式
|
||||
this.isAdminMode = false
|
||||
// 设置浏览器标题
|
||||
document.title = '学员登录 - 心理健康测评系统'
|
||||
document.title = '学员登录 - AI心理健康测评系统'
|
||||
},
|
||||
watch: {
|
||||
// 监听登录模式变化,更新浏览器标题
|
||||
isAdminMode(newVal) {
|
||||
document.title = newVal ? '管理员登录 - 心理健康测评系统' : '学员登录 - 心理健康测评系统'
|
||||
document.title = newVal ? '管理员登录 - AI心理健康测评系统' : '学员登录 - AI心理健康测评系统'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
|
|||
|
|
@ -19,9 +19,11 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="用户状态" clearable>
|
||||
<el-option label="正常" value="0" />
|
||||
<el-option label="停用" value="1" />
|
||||
<el-select v-model="queryParams.status" placeholder="档案状态" clearable>
|
||||
<el-option label="在押" value="0" />
|
||||
<el-option label="释放" value="1" />
|
||||
<el-option label="外出" value="2" />
|
||||
<el-option label="假释" value="3" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="档案类型" prop="profileType">
|
||||
|
|
@ -103,23 +105,10 @@
|
|||
|
||||
<el-table ref="profileTable" v-loading="loading" :data="profileList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" prop="profileId" width="80" />
|
||||
<!-- 用户ID列已隐藏,只显示信息编号 -->
|
||||
<el-table-column label="信息编号" align="center" prop="infoNumber" width="120" />
|
||||
<el-table-column label="档案类型" align="center" prop="profileType" width="120">
|
||||
<el-table-column label="罪犯姓名" align="center" prop="userName" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.profileType === 'standard'">标准</span>
|
||||
<span v-else-if="scope.row.profileType === 'child'">儿童</span>
|
||||
<span v-else-if="scope.row.profileType === 'adult'">成人</span>
|
||||
<span v-else-if="scope.row.profileType === 'senior'">老年</span>
|
||||
<span v-else>{{ scope.row.profileType }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="姓名" align="center" prop="userName" width="100" />
|
||||
<el-table-column label="电话" align="center" prop="phone" width="120" />
|
||||
<el-table-column label="生日" align="center" prop="birthday" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.birthday, '{y}-{m}-{d}') }}</span>
|
||||
<span style="color: #409EFF;">{{ scope.row.userName || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="监狱" align="center" prop="prison" width="120" />
|
||||
|
|
@ -129,32 +118,69 @@
|
|||
<span v-if="scope.row.gender === '0'">男</span>
|
||||
<span v-else-if="scope.row.gender === '1'">女</span>
|
||||
<span v-else-if="scope.row.gender === '2'">未知</span>
|
||||
<span v-else>{{ scope.row.gender }}</span>
|
||||
<span v-else>{{ scope.row.gender || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="民族" align="center" prop="nation" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.nation || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="文化程度" align="center" prop="educationLevel" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.educationLevel || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="罪名" align="center" prop="crimeName" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.crimeName || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="刑期" align="center" prop="sentenceTerm" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.sentenceTerm || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="刑期起日" align="center" prop="sentenceStartDate" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.sentenceStartDate, '{y}-{m}-{d}') || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="刑期止日" align="center" prop="sentenceEndDate" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.sentenceEndDate, '{y}-{m}-{d}') || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="民族" align="center" prop="nation" width="80" />
|
||||
<el-table-column label="文化程度" align="center" prop="educationLevel" width="100" />
|
||||
<el-table-column label="罪名" align="center" prop="crimeName" width="120" />
|
||||
<el-table-column label="刑期" align="center" prop="sentenceTerm" width="100" />
|
||||
<el-table-column label="入监时间" align="center" prop="entryDate" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.entryDate, '{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.entryDate, '{y}-{m}-{d}') || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<el-table-column label="状态" align="center" prop="status" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
<el-select
|
||||
v-model="scope.row.status"
|
||||
size="mini"
|
||||
@change="handleStatusChange(scope.row)"
|
||||
placeholder="请选择状态"
|
||||
style="width: 100px;"
|
||||
>
|
||||
<el-option label="在押" value="0" />
|
||||
<el-option label="释放" value="1" />
|
||||
<el-option label="外出" value="2" />
|
||||
<el-option label="假释" value="3" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="280">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-document"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['psychology:profile:edit']"
|
||||
>档案</el-button>
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
|
@ -162,6 +188,20 @@
|
|||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['psychology:profile:remove']"
|
||||
>删除</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-document"
|
||||
@click="handleChangeRecord(scope.row)"
|
||||
v-hasPermi="['psychology:profile:edit']"
|
||||
>变更记录</el-button>
|
||||
<el-dropdown trigger="click" @command="(cmd) => handleMoreCommand(cmd, scope.row)">
|
||||
<el-button size="mini" type="text" icon="el-icon-more">更多</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="detail">查看详情</el-dropdown-item>
|
||||
<el-dropdown-item command="export">导出档案</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -177,21 +217,6 @@
|
|||
<!-- 添加或修改档案对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="档案类型" prop="profileType">
|
||||
<el-select v-model="form.profileType" placeholder="请选择档案类型">
|
||||
<el-option label="标准" value="standard" />
|
||||
<el-option label="儿童" value="child" />
|
||||
<el-option label="成人" value="adult" />
|
||||
<el-option label="老年" value="senior" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- 用户ID已隐藏,会通过信息编号自动填充 -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="信息编号" prop="infoNumber">
|
||||
|
|
@ -204,7 +229,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名" prop="userName">
|
||||
<el-form-item label="罪犯姓名" prop="userName">
|
||||
<el-input
|
||||
v-model="form.userName"
|
||||
placeholder="请输入姓名(仅汉字)"
|
||||
|
|
@ -214,31 +239,6 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="电话" prop="phone">
|
||||
<el-input v-model="form.phone" placeholder="请输入电话" maxlength="11" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="身份证号" prop="idCard">
|
||||
<el-input v-model="form.idCard" placeholder="请输入身份证号" maxlength="18" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="生日" prop="birthday">
|
||||
<el-date-picker
|
||||
v-model="form.birthday"
|
||||
type="date"
|
||||
placeholder="选择生日"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="监狱" prop="prison">
|
||||
|
|
@ -331,12 +331,6 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="头像">
|
||||
<el-input v-model="form.avatar" placeholder="请输入头像URL" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" type="textarea" :rows="2" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
|
|
@ -518,16 +512,17 @@ export default {
|
|||
{ required: true, message: "档案类型不能为空", trigger: "change" }
|
||||
],
|
||||
infoNumber: [
|
||||
{ required: true, message: "信息编号不能为空", trigger: "blur" },
|
||||
{ pattern: /^\d+$/, message: "信息编号只能输入数字", trigger: "blur" }
|
||||
],
|
||||
userName: [
|
||||
{ required: true, message: "姓名不能为空", trigger: "blur" },
|
||||
{ required: true, message: "罪犯姓名不能为空", trigger: "blur" },
|
||||
{ pattern: /^[\u4e00-\u9fa5]+$/, message: "姓名只能输入汉字", trigger: "blur" }
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: "电话不能为空", trigger: "blur" },
|
||||
{ pattern: /^1[3-9]\d{9}$/, message: "请输入正确的手机号码", trigger: "blur" }
|
||||
prison: [
|
||||
{ required: true, message: "监狱不能为空", trigger: "blur" }
|
||||
],
|
||||
prisonArea: [
|
||||
{ required: true, message: "监区不能为空", trigger: "blur" }
|
||||
]
|
||||
},
|
||||
// 用户表单校验
|
||||
|
|
@ -553,8 +548,7 @@ export default {
|
|||
],
|
||||
phonenumber: [
|
||||
{
|
||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||
message: "请输入正确的手机号码",
|
||||
validator: this.validatePhonenumber,
|
||||
trigger: "blur"
|
||||
}
|
||||
]
|
||||
|
|
@ -588,7 +582,16 @@ export default {
|
|||
getList() {
|
||||
this.loading = true
|
||||
listProfile(this.queryParams).then(response => {
|
||||
this.profileList = response.rows || []
|
||||
const rows = response.rows || []
|
||||
// 为状态设置默认值,确保是字符串类型
|
||||
rows.forEach(row => {
|
||||
if (row.status === null || row.status === undefined || row.status === '') {
|
||||
row.status = '0' // 默认为"在押"
|
||||
} else {
|
||||
row.status = String(row.status) // 确保是字符串类型
|
||||
}
|
||||
})
|
||||
this.profileList = rows
|
||||
this.total = response.total || 0
|
||||
this.selectedRows = []
|
||||
this.ids = []
|
||||
|
|
@ -617,11 +620,7 @@ export default {
|
|||
userId: undefined,
|
||||
profileType: "standard",
|
||||
infoNumber: undefined,
|
||||
avatar: undefined,
|
||||
idCard: undefined,
|
||||
userName: undefined,
|
||||
phone: undefined,
|
||||
birthday: undefined,
|
||||
prison: undefined,
|
||||
prisonArea: undefined,
|
||||
gender: undefined,
|
||||
|
|
@ -631,8 +630,7 @@ export default {
|
|||
sentenceTerm: undefined,
|
||||
sentenceStartDate: undefined,
|
||||
sentenceEndDate: undefined,
|
||||
entryDate: undefined,
|
||||
remark: undefined
|
||||
entryDate: undefined
|
||||
}
|
||||
this.resetForm("form")
|
||||
},
|
||||
|
|
@ -697,6 +695,18 @@ export default {
|
|||
this.$modal.msgError("获取用户创建所需信息失败")
|
||||
})
|
||||
},
|
||||
validatePhonenumber(rule, value, callback) {
|
||||
if (!value || !String(value).trim()) {
|
||||
callback()
|
||||
return
|
||||
}
|
||||
const phonePattern = /^1[3-9]\d{9}$/
|
||||
if (!phonePattern.test(value)) {
|
||||
callback(new Error("请输入正确的手机号码"))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
/** 编辑用户按钮 */
|
||||
handleEditUser(row) {
|
||||
const userId = row && row.userId ? row.userId : (this.ids && this.ids.length === 1 ? this.ids[0] : null)
|
||||
|
|
@ -838,17 +848,17 @@ export default {
|
|||
userId: userId,
|
||||
profileType: "standard",
|
||||
infoNumber: (row && row.infoNumber) || undefined,
|
||||
avatar: undefined,
|
||||
idCard: undefined,
|
||||
userName: (row && row.userName) || undefined,
|
||||
phone: (row && row.phone) || undefined,
|
||||
birthday: undefined,
|
||||
education: undefined,
|
||||
occupation: undefined,
|
||||
address: undefined,
|
||||
emergencyContact: undefined,
|
||||
emergencyPhone: undefined,
|
||||
remark: undefined
|
||||
prison: (row && row.prison) || undefined,
|
||||
prisonArea: (row && row.prisonArea) || undefined,
|
||||
gender: (row && row.gender) || undefined,
|
||||
nation: (row && row.nation) || undefined,
|
||||
educationLevel: (row && row.educationLevel) || undefined,
|
||||
crimeName: (row && row.crimeName) || undefined,
|
||||
sentenceTerm: (row && row.sentenceTerm) || undefined,
|
||||
sentenceStartDate: undefined,
|
||||
sentenceEndDate: undefined,
|
||||
entryDate: undefined
|
||||
}
|
||||
this.open = true
|
||||
this.title = "添加用户档案"
|
||||
|
|
@ -861,17 +871,17 @@ export default {
|
|||
userId: userId,
|
||||
profileType: "standard",
|
||||
infoNumber: (row && row.infoNumber) || undefined,
|
||||
avatar: undefined,
|
||||
idCard: undefined,
|
||||
userName: (row && row.userName) || undefined,
|
||||
phone: (row && row.phone) || undefined,
|
||||
birthday: undefined,
|
||||
education: undefined,
|
||||
occupation: undefined,
|
||||
address: undefined,
|
||||
emergencyContact: undefined,
|
||||
emergencyPhone: undefined,
|
||||
remark: undefined
|
||||
prison: (row && row.prison) || undefined,
|
||||
prisonArea: (row && row.prisonArea) || undefined,
|
||||
gender: (row && row.gender) || undefined,
|
||||
nation: (row && row.nation) || undefined,
|
||||
educationLevel: (row && row.educationLevel) || undefined,
|
||||
crimeName: (row && row.crimeName) || undefined,
|
||||
sentenceTerm: (row && row.sentenceTerm) || undefined,
|
||||
sentenceStartDate: undefined,
|
||||
sentenceEndDate: undefined,
|
||||
entryDate: undefined
|
||||
}
|
||||
this.open = true
|
||||
this.title = "添加用户档案"
|
||||
|
|
@ -983,6 +993,131 @@ export default {
|
|||
return
|
||||
}
|
||||
this.$refs.upload.submit()
|
||||
},
|
||||
/** 状态变更 */
|
||||
handleStatusChange(row) {
|
||||
const statusMap = {
|
||||
'0': '在押',
|
||||
'1': '释放',
|
||||
'2': '外出',
|
||||
'3': '假释'
|
||||
}
|
||||
|
||||
// 确保状态是字符串类型,并验证有效性
|
||||
const newStatus = String(row.status || '0')
|
||||
if (!['0', '1', '2', '3'].includes(newStatus)) {
|
||||
this.$modal.msgError("无效的状态值")
|
||||
// 恢复为默认值
|
||||
row.status = '0'
|
||||
return
|
||||
}
|
||||
|
||||
const statusText = statusMap[newStatus] || '未知'
|
||||
const oldStatus = row._oldStatus !== undefined ? row._oldStatus : String(row.status || '0')
|
||||
|
||||
// 如果状态没有变化,直接返回
|
||||
if (newStatus === oldStatus) {
|
||||
return
|
||||
}
|
||||
|
||||
// 保存旧状态,用于取消时恢复
|
||||
row._oldStatus = oldStatus
|
||||
row.status = newStatus
|
||||
|
||||
// 检查必要字段
|
||||
if (!row.profileId) {
|
||||
this.$modal.msgError("档案ID不能为空")
|
||||
row.status = oldStatus
|
||||
delete row._oldStatus
|
||||
return
|
||||
}
|
||||
|
||||
this.$modal.confirm('确认将状态修改为"' + statusText + '"?').then(() => {
|
||||
// 先获取完整的档案信息,确保有所有必要字段
|
||||
return getProfile(row.profileId).then(response => {
|
||||
if (!response || !response.data) {
|
||||
throw new Error("获取档案信息失败,请确认档案是否存在")
|
||||
}
|
||||
|
||||
const profileData = response.data
|
||||
|
||||
// 确保传递必要的字段
|
||||
const updateData = {
|
||||
profileId: row.profileId,
|
||||
userId: profileData.userId || row.userId,
|
||||
status: newStatus,
|
||||
infoNumber: profileData.infoNumber || row.infoNumber,
|
||||
userName: profileData.userName || row.userName
|
||||
}
|
||||
|
||||
// 再次验证必要字段
|
||||
if (!updateData.userId) {
|
||||
const error = new Error("用户ID不能为空,请先完善档案信息")
|
||||
row.status = oldStatus
|
||||
delete row._oldStatus
|
||||
throw error
|
||||
}
|
||||
|
||||
if (!updateData.infoNumber) {
|
||||
const error = new Error("信息编号不能为空,请先完善档案信息")
|
||||
row.status = oldStatus
|
||||
delete row._oldStatus
|
||||
throw error
|
||||
}
|
||||
|
||||
return updateProfile(updateData)
|
||||
})
|
||||
}).then(response => {
|
||||
this.$modal.msgSuccess("状态修改成功")
|
||||
delete row._oldStatus
|
||||
this.getList()
|
||||
}).catch(error => {
|
||||
// 如果是用户取消操作(Element UI confirm 取消时会 reject,但没有错误信息)
|
||||
// 检查是否是取消操作:没有 response 且没有 message,或者 message 为空
|
||||
const isCancel = !error.response && (!error.message || error.message === '')
|
||||
|
||||
if (isCancel) {
|
||||
// 用户取消,恢复状态,不显示错误
|
||||
row.status = oldStatus
|
||||
delete row._oldStatus
|
||||
return
|
||||
}
|
||||
|
||||
// 真正的错误,显示错误信息
|
||||
console.error("状态修改失败:", error)
|
||||
const errorMsg = error.response?.data?.msg || error.message || "状态修改失败"
|
||||
this.$modal.msgError(errorMsg)
|
||||
// 恢复原状态
|
||||
row.status = oldStatus
|
||||
delete row._oldStatus
|
||||
// 刷新列表以恢复状态显示
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
})
|
||||
})
|
||||
},
|
||||
/** 变更记录 */
|
||||
handleChangeRecord(row) {
|
||||
this.$modal.msgInfo("变更记录功能开发中,敬请期待")
|
||||
// TODO: 实现变更记录功能
|
||||
// this.$router.push(`/psychology/profile/change-record/${row.profileId}`)
|
||||
},
|
||||
/** 更多操作 */
|
||||
handleMoreCommand(command, row) {
|
||||
switch (command) {
|
||||
case 'detail':
|
||||
// 查看详情
|
||||
this.handleUpdate(row)
|
||||
break
|
||||
case 'export':
|
||||
// 导出档案
|
||||
this.download('psychology/profile/export', {
|
||||
profileId: row.profileId
|
||||
}, `profile_${row.profileId}_${new Date().getTime()}.xlsx`)
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,10 +66,13 @@
|
|||
<el-table-column label="规则名称" align="center" prop="ruleName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="预警等级" align="center" prop="warningLevel" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.warningLevel === 'low'" type="info">低</el-tag>
|
||||
<el-tag v-else-if="scope.row.warningLevel === 'medium'" type="warning">中</el-tag>
|
||||
<el-tag v-else-if="scope.row.warningLevel === 'high'" type="danger">高</el-tag>
|
||||
<el-tag v-else-if="scope.row.warningLevel === 'critical'" type="danger">严重</el-tag>
|
||||
<el-tag
|
||||
v-if="getWarningLevelMeta(scope.row.warningLevel)"
|
||||
:type="getWarningLevelMeta(scope.row.warningLevel).type"
|
||||
>
|
||||
{{ getWarningLevelMeta(scope.row.warningLevel).label }}
|
||||
</el-tag>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分值范围" align="center" width="150">
|
||||
|
|
@ -341,6 +344,20 @@ export default {
|
|||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 预警等级展示映射 */
|
||||
getWarningLevelMeta(level) {
|
||||
if (!level) {
|
||||
return null;
|
||||
}
|
||||
const normalized = String(level).toLowerCase();
|
||||
const map = {
|
||||
low: { label: "低", type: "info" },
|
||||
medium: { label: "中", type: "warning" },
|
||||
high: { label: "高", type: "danger" },
|
||||
critical: { label: "严重", type: "danger" }
|
||||
};
|
||||
return map[normalized] || { label: level, type: "info" };
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.ruleId);
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
</el-form>
|
||||
<!-- 底部 -->
|
||||
<div class="el-register-footer">
|
||||
<span>Copyright © 2025 心理健康测评系统. All Rights Reserved.</span>
|
||||
<span>Copyright © 2025 AI心理健康测评系统. All Rights Reserved.</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -384,8 +384,7 @@ export default {
|
|||
],
|
||||
phonenumber: [
|
||||
{
|
||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||
message: "请输入正确的手机号码",
|
||||
validator: this.validatePhonenumber,
|
||||
trigger: "blur"
|
||||
}
|
||||
]
|
||||
|
|
@ -676,6 +675,18 @@ export default {
|
|||
return
|
||||
}
|
||||
this.$refs.upload.submit()
|
||||
},
|
||||
validatePhonenumber(rule, value, callback) {
|
||||
if (!value || !String(value).trim()) {
|
||||
callback()
|
||||
return
|
||||
}
|
||||
const phonePattern = /^1[3-9]\d{9}$/
|
||||
if (!phonePattern.test(value)) {
|
||||
callback(new Error("请输入正确的手机号码"))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ function resolve(dir) {
|
|||
|
||||
const CompressionPlugin = require('compression-webpack-plugin')
|
||||
|
||||
const name = process.env.VUE_APP_TITLE || '心理健康测评系统' // 网页标题
|
||||
const name = process.env.VUE_APP_TITLE || 'AI心理健康测评系统' // 网页标题
|
||||
|
||||
// 后端接口地址配置
|
||||
// 本地开发环境:使用 localhost:30081
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# 心理健康测评系统 - 使用指南总览
|
||||
# AI心理健康测评系统 - 使用指南总览
|
||||
|
||||
## 📚 文档导航
|
||||
|
||||
|
|
@ -221,7 +221,7 @@
|
|||
|
||||
- **最后更新**:2025-01-XX
|
||||
- **文档版本**:v1.0
|
||||
- **适用系统版本**:心理健康测评系统 v1.0
|
||||
- **适用系统版本**:AI心理健康测评系统 v1.0
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# 心理健康测评系统 - 普通用户使用指南
|
||||
# AI心理健康测评系统 - 普通用户使用指南
|
||||
|
||||
## 📋 目录
|
||||
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
## 系统概述
|
||||
|
||||
心理健康测评系统是一个专业的心理测评平台,您可以通过该系统进行各种心理量表测评,查看测评报告,了解自己的心理健康状况。
|
||||
AI心理健康测评系统是一个专业的心理测评平台,您可以通过该系统进行各种心理量表测评,查看测评报告,了解自己的心理健康状况。
|
||||
|
||||
### 主要功能
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# 心理健康测评系统 - 注册用户使用指南
|
||||
# AI心理健康测评系统 - 注册用户使用指南
|
||||
|
||||
## 📋 目录
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# 心理健康测评系统 - 系统管理员使用指南
|
||||
# AI心理健康测评系统 - 系统管理员使用指南
|
||||
|
||||
## 📋 目录
|
||||
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
## 系统概述
|
||||
|
||||
心理健康测评系统是一个基于Web的心理测评管理平台,支持量表测评、自定义问卷、用户档案管理、预警管理等功能。
|
||||
AI心理健康测评系统是一个基于Web的心理测评管理平台,支持量表测评、自定义问卷、用户档案管理、预警管理等功能。
|
||||
|
||||
### 主要功能模块
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user