新增临时角色页面
This commit is contained in:
@@ -1,23 +1,61 @@
|
||||
<template>
|
||||
<div class="home">
|
||||
<el-container style="height: 100vh;">
|
||||
<el-main>
|
||||
<el-row :gutter="20">
|
||||
<!-- 右侧展示区域 -->
|
||||
<el-col :span="18" class="content-area">
|
||||
<announcements />
|
||||
<financial-charts />
|
||||
</el-col>
|
||||
<div v-if="currentRole.roleKey==='temp'">
|
||||
<div class="onboarding-homepage">
|
||||
<!-- 提示信息 -->
|
||||
<el-alert
|
||||
title="欢迎加入,请尽快补充您的必要信息!"
|
||||
type="info"
|
||||
show-icon>
|
||||
</el-alert>
|
||||
|
||||
<!-- 数据补充表单 -->
|
||||
<el-form :model="employeeData" class="employee-form" label-width="80px">
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="employeeData.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱">
|
||||
<el-input v-model="employeeData.email"></el-input>
|
||||
</el-form-item>
|
||||
<!-- 根据实际需求添加更多字段 -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 流程图 -->
|
||||
<div class="flow-chart">
|
||||
<el-steps :active="activeStep" finish-status="success">
|
||||
<el-step title="填写信息"></el-step>
|
||||
<el-step title="审批中"></el-step>
|
||||
<el-step title="完成"></el-step>
|
||||
</el-steps>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-container style="height: 100vh;">
|
||||
<el-main>
|
||||
<el-row :gutter="20">
|
||||
<!-- 右侧展示区域 -->
|
||||
<el-col :span="18" class="content-area">
|
||||
<announcements />
|
||||
<financial-charts />
|
||||
</el-col>
|
||||
|
||||
<!-- 左侧功能区域 -->
|
||||
<el-col :span="6" class="sidebar">
|
||||
<quick-access />
|
||||
<inventory />
|
||||
<project-management />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
|
||||
|
||||
<!-- 左侧功能区域 -->
|
||||
<el-col :span="6" class="sidebar">
|
||||
<quick-access />
|
||||
<inventory />
|
||||
<project-management />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -30,6 +68,7 @@ import Inventory from "../components/Inventory/index.vue";
|
||||
import Announcements from "../components/Announcements/index.vue";
|
||||
import ProjectManagement from "../components/ProjectManagement/index.vue";
|
||||
import FinancialCharts from "../components/FinancialCharts/index.vue";
|
||||
import {currentRole} from "@/api/system/role";
|
||||
|
||||
export default {
|
||||
name: "Index",
|
||||
@@ -42,6 +81,14 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 新员工填写的信息
|
||||
employeeData: {
|
||||
name: "",
|
||||
email: "",
|
||||
// 其他必要字段
|
||||
},
|
||||
// 当前步骤,从 0 开始计数
|
||||
activeStep: 0,
|
||||
version: "0.8.3",
|
||||
commandstats: null,
|
||||
usedmemory: null,
|
||||
@@ -53,13 +100,29 @@ export default {
|
||||
noticeTitle: '',
|
||||
noticeContent: '',
|
||||
drawer: false,
|
||||
currentRole:{}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getCurrentUserRole();
|
||||
this.getList();
|
||||
this.getListNotice();
|
||||
},
|
||||
methods: {
|
||||
submitForm() {
|
||||
// 这里可以加入表单验证与提交逻辑
|
||||
// 模拟提交后进入下一流程(例如审批中)
|
||||
this.activeStep = 1;
|
||||
this.$message({
|
||||
message: "表单提交成功,进入审批流程!",
|
||||
type: "success"
|
||||
});
|
||||
},
|
||||
getCurrentUserRole(){
|
||||
currentRole().then(res => {
|
||||
this.currentRole = res.data;
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
getCache().then((response) => {
|
||||
this.cache = response.data;
|
||||
@@ -88,7 +151,18 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.onboarding-homepage {
|
||||
max-width: 800px;
|
||||
margin: 20px auto;
|
||||
padding: 20px;
|
||||
}
|
||||
.employee-form {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.flow-chart {
|
||||
margin-top: 30px;
|
||||
}
|
||||
/* 栅格列样式 */
|
||||
.content-area {
|
||||
background: #fff;
|
||||
|
||||
@@ -575,7 +575,6 @@ export default {
|
||||
this.loading = true;
|
||||
listOaAttendance(this.queryParams).then(res => {
|
||||
this.userList = res.rows;
|
||||
console.log(this.userList);
|
||||
this.dateLength = res.total;
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
@@ -251,7 +251,7 @@ export default {
|
||||
})
|
||||
},
|
||||
co(){
|
||||
console.log(this.files)
|
||||
|
||||
},
|
||||
|
||||
// 添加新的一行
|
||||
|
||||
@@ -403,7 +403,6 @@ export default {
|
||||
getOaClaim(this.$route.params.claimId).then(res => {
|
||||
this.form = res.data;
|
||||
this.detailList = res.data.detailList
|
||||
console.log(this.detailList)
|
||||
this.initData();
|
||||
this.loading=false
|
||||
})
|
||||
|
||||
@@ -237,7 +237,6 @@ export default {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listOaClaim(this.queryParams).then(response => {
|
||||
console.log(response.rows)
|
||||
this.oaClaimList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
|
||||
@@ -89,7 +89,6 @@ export default {
|
||||
//排序
|
||||
this.stepsList = res.data.data.taskList.sort((a, b) => parseInt(a.dictValue) - parseInt(b.dictValue));
|
||||
this.active = res.data.data.active;
|
||||
console.log(this.stepsList)
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
@@ -891,7 +891,7 @@ export default {
|
||||
|
||||
//核算弹出层
|
||||
handleCheck(row) {
|
||||
console.log(3333, row)
|
||||
|
||||
this.openCheck = true;
|
||||
this.titleCheck = "项目核算";
|
||||
this.projectName = row.projectName;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-loading="loading">
|
||||
<el-tabs v-model="activeName" style="margin-left: 10px;">
|
||||
<el-tab-pane label="休假日历" name="first">
|
||||
<el-tab-pane label="休假日历" name="first" >
|
||||
<el-calendar>
|
||||
<template slot="dateCell" slot-scope="{date, data}">
|
||||
<div :class="{'is-selected': data.isSelected, 'blue-background': isHoliday(data.day)}" style="height: 100%"
|
||||
@@ -99,6 +99,7 @@
|
||||
|
||||
<script>
|
||||
import {listOaHoliday, updateOaHoliday,queryListHoliday} from "@/api/oa/oaHoliday";
|
||||
import {currentRole} from "@/api/system/role";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -135,6 +136,7 @@ export default {
|
||||
holidayTime: undefined,
|
||||
name: undefined,
|
||||
},
|
||||
currentRole:{},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
@@ -161,6 +163,11 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getCurrentUserRole() {
|
||||
currentRole().then(res => {
|
||||
this.currentRole = res.data;
|
||||
})
|
||||
},
|
||||
fetchHolidayData() {
|
||||
this.loading = true;
|
||||
listOaHoliday({}).then(response => {
|
||||
@@ -172,7 +179,6 @@ export default {
|
||||
}));
|
||||
this.loading = false;
|
||||
}).catch(error => {
|
||||
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
@@ -185,11 +191,11 @@ export default {
|
||||
return holiday ? holiday.name : '';
|
||||
},
|
||||
handleCellClick(data) {
|
||||
|
||||
const holiday = this.holidays.find(holiday => holiday.date === data.day);
|
||||
this.currentHoliday = {...holiday.fullData, type: holiday.type};
|
||||
this.dialogVisible = true;
|
||||
|
||||
if (this.currentRole.roleKey==='doctor'){
|
||||
const holiday = this.holidays.find(holiday => holiday.date === data.day);
|
||||
this.currentHoliday = {...holiday.fullData, type: holiday.type};
|
||||
this.dialogVisible = true;
|
||||
}
|
||||
},
|
||||
updateHoliday() {
|
||||
updateOaHoliday(this.currentHoliday).then(response => {
|
||||
@@ -198,7 +204,6 @@ export default {
|
||||
this.$message.success("假期类型更新成功");
|
||||
|
||||
}).catch(error => {
|
||||
console.error("Error updating holiday data:", error);
|
||||
this.$message.error("更新失败");
|
||||
});
|
||||
},
|
||||
@@ -314,6 +319,7 @@ export default {
|
||||
|
||||
},
|
||||
created() {
|
||||
this.getCurrentUserRole();
|
||||
this.fetchHolidayData();
|
||||
this.getList();
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ export default {
|
||||
this.loading = true;
|
||||
listOnboarding(this.queryParams).then(response => {
|
||||
this.onboardingList = response.rows;
|
||||
console.log(this.onboardingList)
|
||||
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
@@ -822,7 +822,7 @@ export default {
|
||||
}
|
||||
listProject(this.queryParams).then(response => {
|
||||
this.projectList = response.rows;
|
||||
console.log(this.projectList)
|
||||
|
||||
//项目周期
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
|
||||
@@ -1390,7 +1390,7 @@ export default {
|
||||
getTaskByDictType(pid).then(res => {
|
||||
//排序
|
||||
this.stepsList = res.data.data.taskList.sort((a, b) => parseInt(b.dictValue) - parseInt(a.dictValue));
|
||||
console.log(this.stepsList)
|
||||
|
||||
this.active = res.data.data.active;
|
||||
})
|
||||
},
|
||||
@@ -1576,7 +1576,7 @@ export default {
|
||||
getProject(projectId).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
console.log(this.form)
|
||||
|
||||
this.bail = response.data.bail == null ? this.bail : JSON.parse(response.data.bail);
|
||||
let period = [];
|
||||
period.push(response.data.beginTime);
|
||||
|
||||
@@ -153,7 +153,6 @@ export default {
|
||||
}else {
|
||||
this.finishedList =response.rows;
|
||||
}
|
||||
console.log(this.finishedList)
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
@@ -165,7 +165,6 @@ export default {
|
||||
},
|
||||
// 跳转到处理页面
|
||||
handleProcess(row) {
|
||||
console.log(row)
|
||||
this.$router.push({
|
||||
path: '/workflow/process/detail/' + row.procInsId,
|
||||
query: {
|
||||
|
||||
Reference in New Issue
Block a user