feat(project): 优化项目详情查看逻辑并完善用户信息存储

- 修改项目详情按钮点击事件,支持编辑和查看两种模式
- 根据项目状态决定打开编辑表单或详情抽屉
- 在订单详情中自动填充当前用户信息
- 修复分页排序参数处理逻辑
- 添加项目创建时默认填充当前用户为支持人员
- 扩展用户状态管理,增加邮箱和电话号码字段
- 登录时同步存储用户邮箱和电话号码信息
dev_1.0.0
chenhao 2025-11-25 16:59:24 +08:00
parent d745fe6de8
commit 9cbfbdbb55
5 changed files with 26 additions and 6 deletions

View File

@ -10,6 +10,8 @@ const user = {
name: '', name: '',
userName: '', userName: '',
avatar: '', avatar: '',
email:'',
phonenumber:'',
roles: [], roles: [],
permissions: [] permissions: []
}, },
@ -32,6 +34,12 @@ const user = {
}, },
SET_PERMISSIONS: (state, permissions) => { SET_PERMISSIONS: (state, permissions) => {
state.permissions = permissions state.permissions = permissions
} ,
SET_EMAIL: (state, email) => {
state.email = email
},
SET_PHONENUMBER: (state, phonenumber) => {
state.phonenumber = phonenumber
} }
}, },
@ -69,6 +77,8 @@ const user = {
commit('SET_ROLES', ['ROLE_DEFAULT']) commit('SET_ROLES', ['ROLE_DEFAULT'])
} }
commit('SET_ID', user.userId) commit('SET_ID', user.userId)
commit('SET_EMAIL', user.email)
commit('SET_PHONENUMBER', user.phonenumber)
commit('SET_NAME', user.loginName) commit('SET_NAME', user.loginName)
commit('SET_NICK_NAME', user.userName) commit('SET_NICK_NAME', user.userName)
commit('SET_AVATAR', avatar) commit('SET_AVATAR', avatar)

View File

@ -590,6 +590,8 @@ export default {
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.title = "添加项目管理"; this.title = "添加项目管理";
this.form.hzSupportUserName = this.$store.state.user.name;
this.form.hzSupportUser = this.$store.state.user.id;
}, },
handleUpdate() { handleUpdate() {
this.reset(); this.reset();

View File

@ -196,7 +196,7 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleView(scope.row)" @click="handleView(scope.row, 'edit')"
v-hasPermi="['sip:project:edit']" v-hasPermi="['sip:project:edit']"
>项目详情</el-button> >项目详情</el-button>
<el-button <el-button
@ -433,10 +433,17 @@ export default {
} }
return ''; return '';
}, },
/** 查看项目详情 */ /** 查看项目详情或编辑项目 */
handleView(row) { handleView(row, type) {
this.currentProjectId = row.id; if (type === 'edit' && row.canGenerate) {
this.drawerVisible = true; //
this.selectedProjectId = row.id;
this.projectFormVisible = true;
} else {
//
this.currentProjectId = row.id;
this.drawerVisible = true;
}
}, },
/** 生成订单 */ /** 生成订单 */
openOrder(id, canGenerate) { openOrder(id, canGenerate) {

View File

@ -384,6 +384,7 @@ export default {
if (this.uniqueContractVersions.length > 0) this.activeContractVersionTab = String(this.uniqueContractVersions[0]); if (this.uniqueContractVersions.length > 0) this.activeContractVersionTab = String(this.uniqueContractVersions[0]);
}); });
} else { } else {
this.form.duty = this.$store.state.user.id;
this.form.dutyName = this.$store.state.user.name; this.form.dutyName = this.$store.state.user.name;
this.form.dutyEmail = this.$store.state.user.email; this.form.dutyEmail = this.$store.state.user.email;
this.form.dutyPhone = this.$store.state.user.phonenumber; this.form.dutyPhone = this.$store.state.user.phonenumber;

View File

@ -30,7 +30,7 @@ public class PageDomain
{ {
return ""; return "";
} }
return StringUtils.toUnderScoreCase(orderByColumn) + " " + getIsAsc(); return StringUtils.toUnderScoreCase(orderByColumn) + " " + ((StringUtils.isEmpty(getIsAsc())) ? "" : getIsAsc());
} }