diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..0ae29b4
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,7 @@
+{
+ "workbench.colorCustomizations": {
+ "activityBar.background": "#46260E",
+ "titleBar.activeBackground": "#613514",
+ "titleBar.activeForeground": "#FDF9F6"
+ }
+}
\ No newline at end of file
diff --git a/src/api/module/home.ts b/src/api/module/home.ts
index 38cf547..2a5024c 100644
--- a/src/api/module/home.ts
+++ b/src/api/module/home.ts
@@ -205,6 +205,23 @@ export const userDataDel= function(date: any) {
}
+//考评时间tab (月)
+export const userEvaluationData= function(date: any) {
+ return Http.post('/api/backend/Monthly/getEvaluation', date)
+}
+//考评时间tab (季)
+export const userQuarterData= function(date: any) {
+ return Http.post('/api/backend/Quarter/getEvaluation', date)
+}
+//考评时间tab (年)
+export const userYearData= function(date: any) {
+ return Http.post('/api/backend/Year/getEvaluation', date)
+}
+
+
+
+
+
diff --git a/src/views/configuration/foundation.vue b/src/views/configuration/foundation.vue
index 6c31e42..a13c2a8 100644
--- a/src/views/configuration/foundation.vue
+++ b/src/views/configuration/foundation.vue
@@ -3,14 +3,15 @@
基础评分列表
+ 新增
-
- 年度
- 季度
- 月度
-
+
+
+
+
+
平级新增
@@ -26,22 +27,22 @@
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -121,17 +122,17 @@ const columns6 = [
width: "200px",
key: "base_score"
},
- {
- title: "项目代码",
- width: "100px",
- key: "project_code"
- },
- {
- title: "评分类型",
- width: "100px",
- customSlot: 'scoring_type',
- key: "scoring_type"
- },
+ // {
+ // title: "项目代码",
+ // width: "100px",
+ // key: "project_code"
+ // },
+ // {
+ // title: "评分类型",
+ // width: "100px",
+ // customSlot: 'scoring_type',
+ // key: "scoring_type"
+ // },
{
title: '操作',
width: '180px',
diff --git a/src/views/configuration/time.vue b/src/views/configuration/time.vue
index 370d4e6..5d80a7d 100644
--- a/src/views/configuration/time.vue
+++ b/src/views/configuration/time.vue
@@ -12,9 +12,9 @@
季度
月度
-
- 结束后
-
+
+
+
编辑
@@ -29,6 +29,9 @@
:area="['950px','100%']" :btn="addButton">
+
+
+
@@ -36,14 +39,14 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -53,17 +56,21 @@
allow-clear>
-
+
+
@@ -87,6 +94,43 @@ import {ref, watch, onMounted, reactive} from 'vue'
import {layer} from '@layui/layer-vue'
import {verificationImg} from "@/api/module/commone";
+
+const getCascader = (node) => {
+ console.log(node)
+}
+const selectedKpIds = ref([]);
+const getTreeKp = (node) => {
+ if (node.isChecked) {
+ // 选中逻辑:合并父链和子节点ID(原有逻辑)
+ const relatedIds = collectRelatedIds(node);
+ selectedKpIds.value = [...new Set([...selectedKpIds.value, ...relatedIds])];
+ } else {
+ // 取消选中逻辑分两步处理 --------------------------
+
+ // 第一步:移除当前节点及其所有子节点的ID
+ const childIds = collectChildIds(node);
+ selectedKpIds.value = selectedKpIds.value.filter(id => !childIds.includes(id));
+
+ // 第二步:检查父节点是否需要移除(逐级向上)
+ let parent = node.parentNode;
+ while (parent) {
+ // 判断父节点是否还有被选中的子节点
+ const hasOtherCheckedChild = parent.children.some(
+ child => child.id !== node.id && selectedKpIds.value.includes(child.id)
+ );
+
+ if (!hasOtherCheckedChild) {
+ // 无其他选中子节点,移除父节点ID
+ selectedKpIds.value = selectedKpIds.value.filter(id => id !== parent.id);
+ } else {
+ // 有其他选中子节点,终止向上检查
+ break;
+ }
+
+ parent = parent.parentNode; // 继续检查更上层父节点
+ }
+ }
+}
const selectedIds = ref([]);
// 处理取消选中时的逻辑优化
const getTree = (node) => {
@@ -169,8 +213,9 @@ const addData = reactive({
end_time: null,
time: 0,
rule_description: '',
- group_id: [],
- rules: []
+ user_group_id: [],
+ basic_rating_id: [],
+ title:'',
})
onMounted(() => {
getHierarchicalData()
@@ -194,8 +239,8 @@ const getContentList = () => {
})
}
const replaceFields = {
- label: 'name',
- value: 'id',
+ title: 'name',
+ id: 'id',
children: 'children'
}
const groupList = ref([]);
@@ -203,7 +248,6 @@ const getGroupList = () => {
userGroupData({}).then((res) => {
console.log(res)
if (res.code == 1) {
- res.data.unshift({name: '全部人员', id: 0, children: []});
groupList.value = res.data;
} else {
layer.msg(res.msg, {icon: 2})
@@ -230,6 +274,9 @@ const addShowMsd = () => {
addData.start_time = null;
addData.end_time = null;
addData.rule_description = '';
+ addData.user_group_id = [];
+ addData.basic_rating_id = [];
+ addData.title = '';
}
const editShowMsd = (data) => {
console.log(data);
@@ -241,6 +288,16 @@ const editShowMsd = (data) => {
addData.start_time = data.start_time;
addData.end_time = data.end_time;
addData.rule_description = data.rule_description;
+ addData.title = data.title;
+
+ addData.user_group_id = data.user_group_id.split(',').map(Number);
+ addData.basic_rating_id = data.basic_rating_id.split(',').map(Number);
+
+ selectedIds.value = addData.basic_rating_id;
+ selectedKpIds.value = addData.user_group_id;
+
+
+ console.log(addData)
addIsEdit.value = 2;
}
const delShowMsd = async (data) => {
@@ -254,23 +311,28 @@ const delShowMsd = async (data) => {
}
}
const columns6 = [
+ {
+ title: "考评标题",
+ width: "150px",
+ key: "title"
+ },
{
title: "考评类型",
width: "90px",
customSlot: 'evaluation_type',
key: "evaluation_type"
},
- {
- title: "考评开始类型",
- width: "90px",
- customSlot: 'evaluation_start_type',
- key: "evaluation_start_type"
- },
- {
- title: "时间(天)",
- width: "100px",
- key: "time",
- },
+ // {
+ // title: "考评开始类型",
+ // width: "90px",
+ // customSlot: 'evaluation_start_type',
+ // key: "evaluation_start_type"
+ // },
+ // {
+ // title: "时间(天)",
+ // width: "100px",
+ // key: "time",
+ // },
{
title: "规则描述",
width: "100px",
@@ -303,25 +365,46 @@ const addButton = ref([
callback: async () => {
console.log(addData);
console.log(selectedIds.value)
- return;
+ console.log(selectedKpIds.value)
+ if (addData.title=='') {
+ layer.msg('请输入标题!', {icon: 2, time: 1000})
+ return;
+ }
if (addData.evaluation_type == null || addData.evaluation_type == '') {
layer.msg('请选择考评类型!', {icon: 2, time: 1000})
+ return;
}
if (addData.time <= 0) {
layer.msg('请填写时间(天)!', {icon: 2, time: 1000})
+ return;
}
if (addData.evaluation_start_type == null) {
layer.msg('请选择考评开始类型!', {icon: 2, time: 1000})
+ return;
}
if (addData.start_time == null) {
layer.msg('请选择考评开始时间!', {icon: 2, time: 1000})
+ return;
}
if (addData.end_time == null) {
layer.msg('请选择考评结束时间!', {icon: 2, time: 1000})
+ return;
}
if (addData.rule_description == '') {
layer.msg('请填写规则描述!', {icon: 2, time: 1000})
+ return;
}
+ addData.user_group_id = selectedKpIds.value.join(',');
+ addData.basic_rating_id = selectedIds.value.join(',');
+ if (addData.user_group_id == '') {
+ layer.msg('请选择考评范围!', {icon: 2, time: 1000})
+ return;
+ }
+ if (addData.basic_rating_id == '') {
+ layer.msg('请选择考评内容!', {icon: 2, time: 1000})
+ return;
+ }
+ console.log(addData);
if (addIsEdit.value == 1) {
var res = await scheduleCreate(addData);
} else {
diff --git a/src/views/day_evaluation/index.vue b/src/views/day_evaluation/index.vue
index 1d6d108..49b2e8b 100644
--- a/src/views/day_evaluation/index.vue
+++ b/src/views/day_evaluation/index.vue
@@ -1,232 +1,347 @@
-
+
+
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
+
- 查询
- 重置
+ 查询
+ 重置
+
-
-
- 新增
- 删除
+
+ 个人记录列表
+ 新增记录
+
+
+
+ 待审核
+ 审核通过
-
- {{ data.username }}
-
-
- {{ data.password }}
-
-
- 修改
- 删除
-
-
- {{ selectedKeys }}
+
+
+ 详情
+ 编辑
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
diff --git a/src/views/month_evaluation/index.vue b/src/views/month_evaluation/index.vue
index a8e9374..2164e1b 100644
--- a/src/views/month_evaluation/index.vue
+++ b/src/views/month_evaluation/index.vue
@@ -6,8 +6,8 @@
-
-
+
@@ -27,31 +27,36 @@
月度自评列表
导出Excel
-
-
- {{ data.id }}
-
-
- {{ data.department_score==0?'-':data.department_score }}
-
-
- {{ data.username }}
-
-
- {{ data.password }}
-
-
- 详情
- 开始自评
-
-
+
+
+
+
+ {{ data.id }}
+
+
+ {{ data.department_score==0?'-':data.department_score }}
+
+
+ {{ data.username }}
+
+
+ {{ data.password }}
+
+
+ 详情
+ 开始自评
+
+
+
+
+
@@ -95,10 +100,12 @@ import {ref, onMounted} from 'vue'
import {layer} from '@layui/layer-vue'
import {
MonthlyList,
- MonthlyContent, MonthlyCreate,MonthlyInfo
+ MonthlyContent, MonthlyCreate,MonthlyInfo,userEvaluationData
} from '../../api/module/home'
import {useUserStore} from "@/store/user";
-
+import dayjs from "dayjs";
+const current1=ref(1);
+const tabList=ref([]);
const userStore = useUserStore()
const active = ref(-1);
const visible11 = ref(false);
@@ -110,13 +117,37 @@ const dataSource = ref([]);
const addIsInfo=ref(1);
onMounted(() => {
- getMonthlyList();
- getMonthlyContent();
+ //getMonthlyList();
+ //getMonthlyContent();
+ getUserEvaluationData();
})
+const openZp = (item) => {
+ visible11.value = true;
+ addIsInfo.value=1
+ getMonthlyContent();
+}
+const openTab = (d) => {
+ console.log(d)
+ current1.value=d;
+ dataSource.value=[];
+ getMonthlyList();
+}
+const getUserEvaluationData = () => {
+ userEvaluationData({}).then((res) => {
+ console.log(res)
+ if (res.code == 1) {
+ tabList.value = res.data;
+ current1.value=res.data[0].id;
+ getMonthlyList();
+ } else {
+ layer.msg(res.msg, {icon: 2})
+ }
+ })
+}
const getMonthlyInfo = (item) => {
visible11.value=true;
addIsInfo.value=2;
- MonthlyInfo({'user_id': userStore.userInfo.id, 'month': item.month}).then((res) => {
+ MonthlyInfo({'evaluation_schedule_id':current1.value,'user_id': userStore.userInfo.id, 'month': item.month}).then((res) => {
console.log(res)
if (res.code == 1) {
dataSource6.value = res.data;
@@ -125,8 +156,19 @@ const getMonthlyInfo = (item) => {
}
})
}
+function toSearch() {
+ console.log(searchAccount.value)
+ //layer.load(2, {time: 3000})
+ getMonthlyList();
+}
+
+const searchAccount = ref(dayjs().year())
+
+function toReset() {
+ searchAccount.value =dayjs().year()
+}
const getMonthlyList = () => {
- MonthlyList({'user_id': userStore.userInfo.id}).then((res) => {
+ MonthlyList({'id': current1.value,time:searchAccount.value}).then((res) => {
console.log(res)
if (res.code == 1) {
dataSource.value = res.data;
@@ -137,7 +179,7 @@ const getMonthlyList = () => {
}
const dataSource6 = ref([]);
const getMonthlyContent = () => {
- MonthlyContent({'type': 3}).then((res) => {
+ MonthlyContent({'id': current1.value}).then((res) => {
console.log(res)
if (res.code == 1) {
dataSource6.value = res.data;
@@ -184,7 +226,7 @@ const columns = [
title: '参评时间',
width: '180px',
align: 'center',
- key: 'currentMonth'
+ key: 'createtime'
},
{
title: '加分',
@@ -216,30 +258,20 @@ const columns = [
}
]
-function toSearch() {
- layer.load(2, {time: 3000})
-}
-const searchAccount = ref('')
-const searchEmail = ref('')
-
-function toReset() {
- searchAccount.value = ''
- searchEmail.value = ''
-}
const addButton = ref([
{
text: "确认",
callback: async () => {
var json = JSON.stringify(dataSource6.value);
- var res = await MonthlyCreate({'json': json,'user_id': userStore.userInfo.id});
+ var res = await MonthlyCreate({'json': json,'user_id': userStore.userInfo.id,evaluation_schedule_id: current1.value});
console.log(res)
if (res.code == 1) {
layer.msg('提交成功!', {icon: 1})
visible11.value = false;
getMonthlyList();
- getMonthlyContent();
+ //getMonthlyContent();
} else {
layer.msg(res.msg, {icon: 2})
}
diff --git a/src/views/season_evaluation/index.vue b/src/views/season_evaluation/index.vue
index 24889da..baad893 100644
--- a/src/views/season_evaluation/index.vue
+++ b/src/views/season_evaluation/index.vue
@@ -6,7 +6,7 @@
-
+
@@ -27,11 +27,14 @@
季度自评列表
导出Excel
+
+
+
@@ -94,10 +97,12 @@
import {ref, onMounted} from 'vue'
import {layer} from '@layui/layer-vue'
import {
- QuarterList, QuarterContent, QuarterCreate, QuarterInfo
+ QuarterList, QuarterContent, QuarterCreate, QuarterInfo, userEvaluationData, userQuarterData
} from '../../api/module/home'
import {useUserStore} from "@/store/user";
-
+import dayjs from "dayjs";
+const current1=ref(1);
+const tabList=ref([]);
const userStore = useUserStore()
const active = ref(-1);
const visible11 = ref(false);
@@ -111,13 +116,33 @@ const addIsInfo=ref(1);
const quarterName=ref('');
onMounted(() => {
- getQuarterList();
- getQuarterContent();
+ //getQuarterList();
+ //getQuarterContent();
+ getUserEvaluationData();
})
+const openTab = (d) => {
+ console.log(d)
+ current1.value=d;
+ dataSource.value=[];
+ getQuarterList();
+}
+const getUserEvaluationData = () => {
+ userQuarterData({}).then((res) => {
+ console.log(res)
+ if (res.code == 1) {
+ tabList.value = res.data;
+ current1.value=res.data[0].id;
+ getQuarterList();
+ } else {
+ layer.msg(res.msg, {icon: 2})
+ }
+ })
+}
const insZp = (item) => {
visible11.value = true;
addIsInfo.value=1;
quarterName.value=item.quarter;
+ getQuarterContent();
}
const getMonthlyInfo = (item) => {
visible11.value=true;
@@ -132,7 +157,7 @@ const getMonthlyInfo = (item) => {
})
}
const getQuarterList = () => {
- QuarterList({'user_id': userStore.userInfo.id}).then((res) => {
+ QuarterList({'id': current1.value,time:searchAccount.value}).then((res) => {
console.log(res)
if (res.code == 1) {
dataSource.value = res.data;
@@ -143,7 +168,7 @@ const getQuarterList = () => {
}
const dataSource6 = ref([]);
const getQuarterContent = () => {
- QuarterContent({'type': 2}).then((res) => {
+ QuarterContent({'id': current1.value}).then((res) => {
console.log(res)
if (res.code == 1) {
dataSource6.value = res.data;
@@ -223,29 +248,28 @@ const columns = [
]
function toSearch() {
- layer.load(2, {time: 3000})
+ console.log(searchAccount.value)
+ //layer.load(2, {time: 3000})
+ getQuarterList();
}
-const searchAccount = ref('')
-const searchEmail = ref('')
+const searchAccount = ref(dayjs().year())
function toReset() {
- searchAccount.value = ''
- searchEmail.value = ''
+ searchAccount.value =dayjs().year()
}
-
const addButton = ref([
{
text: "确认",
callback: async () => {
var json = JSON.stringify(dataSource6.value);
- var res = await QuarterCreate({'term':quarterName.value,'json': json,'user_id': userStore.userInfo.id});
+ var res = await QuarterCreate({'evaluation_schedule_id':current1.value,'term':quarterName.value,'json': json,'user_id': userStore.userInfo.id});
console.log(res)
if (res.code == 1) {
layer.msg('提交成功!', {icon: 1})
visible11.value = false;
getQuarterList();
- getQuarterContent();
+ //getQuarterContent();
} else {
layer.msg(res.msg, {icon: 2})
}
diff --git a/src/views/system/department.vue b/src/views/system/department.vue
index f90039f..4f11e46 100644
--- a/src/views/system/department.vue
+++ b/src/views/system/department.vue
@@ -14,8 +14,7 @@
平级新增
- 子级新增
+ 子级新增
编辑
删除
@@ -76,15 +75,11 @@ const openNew = () => {
addData.status = 1;
addShow.value = true;
}
-const getHierarchicalData = () => {
- userGroupData({}).then((res) => {
- console.log(res)
- if (res.code == 1) {
- dataSource6.value = res.data;
- } else {
- layer.msg(res.msg, { icon: 2 })
- }
- })
+const getHierarchicalData = async () => {
+ // 调用接口获取数据
+ // const res = await api.getList(page.current, page.limit)
+ // dataSource6.value = res.data.list
+ // page.total = res.data.total
}
const addShowMsd = (data, pid) => {
console.log(data);
diff --git a/src/views/year_evaluation/index.vue b/src/views/year_evaluation/index.vue
index c3dd746..6e8615a 100644
--- a/src/views/year_evaluation/index.vue
+++ b/src/views/year_evaluation/index.vue
@@ -27,31 +27,36 @@
年度自评列表
导出Excel
-
-
- {{ data.id }}
-
-
- {{ data.department_score==0?'-':data.department_score }}
-
-
- {{ data.username }}
-
-
- {{ data.password }}
-
-
- 详情
- 开始自评
-
-
+
+
+
+
+ {{ data.id }}
+
+
+ {{ data.department_score==0?'-':data.department_score }}
+
+
+ {{ data.username }}
+
+
+ {{ data.password }}
+
+
+ 详情
+ 开始自评
+
+
+
+
+
@@ -95,10 +100,12 @@ import {ref, onMounted} from 'vue'
import {layer} from '@layui/layer-vue'
import {
YearList,
- YearContent, YearCreate,YearInfo
+ YearContent, YearCreate, YearInfo, userYearData
} from '../../api/module/home'
import {useUserStore} from "@/store/user";
-
+import dayjs from "dayjs";
+const current1=ref(1);
+const tabList=ref([]);
const userStore = useUserStore()
const active = ref(-1);
const visible11 = ref(false);
@@ -112,19 +119,39 @@ const addIsInfo=ref(1);
const yearName=ref('');
onMounted(() => {
- getYearList();
- getYearContent();
+ //getYearList();
+ //getYearContent();
+ getUserEvaluationData();
})
+const getUserEvaluationData = () => {
+ userYearData({}).then((res) => {
+ console.log(res)
+ if (res.code == 1) {
+ tabList.value = res.data;
+ current1.value=res.data[0].id;
+ getYearList();
+ } else {
+ layer.msg(res.msg, {icon: 2})
+ }
+ })
+}
+const openTab = (d) => {
+ console.log(d)
+ current1.value=d;
+ dataSource.value=[];
+ getYearList();
+}
const insZp = (item) => {
visible11.value = true;
addIsInfo.value=1;
yearName.value=item.year;
+ getYearContent();
}
const getMonthlyInfo = (item) => {
visible11.value=true;
addIsInfo.value=2;
console.log(item)
- YearInfo({'user_id': userStore.userInfo.id, 'year': item.year}).then((res) => {
+ YearInfo({'evaluation_schedule_id':current1.value,'user_id': userStore.userInfo.id, 'year': item.year}).then((res) => {
console.log(res)
if (res.code == 1) {
dataSource6.value = res.data;
@@ -134,7 +161,7 @@ const getMonthlyInfo = (item) => {
})
}
const getYearList = () => {
- YearList({'user_id': userStore.userInfo.id}).then((res) => {
+ YearList({'id': current1.value,time:searchAccount.value}).then((res) => {
console.log(res)
if (res.code == 1) {
dataSource.value = res.data;
@@ -145,7 +172,7 @@ const getYearList = () => {
}
const dataSource6 = ref([]);
const getYearContent = () => {
- YearContent({'type': 1}).then((res) => {
+ YearContent({'id': current1.value}).then((res) => {
console.log(res)
if (res.code == 1) {
dataSource6.value = res.data;
@@ -225,15 +252,15 @@ const columns = [
]
function toSearch() {
- layer.load(2, {time: 3000})
+ console.log(searchAccount.value)
+ //layer.load(2, {time: 3000})
+ getYearList();
}
-const searchAccount = ref('')
-const searchEmail = ref('')
+const searchAccount = ref(dayjs().year())
function toReset() {
- searchAccount.value = ''
- searchEmail.value = ''
+ searchAccount.value =dayjs().year()
}
const addButton = ref([
@@ -241,13 +268,12 @@ const addButton = ref([
text: "确认",
callback: async () => {
var json = JSON.stringify(dataSource6.value);
- var res = await YearCreate({'term': yearName.value,'json': json,'user_id': userStore.userInfo.id});
+ var res = await YearCreate({'term': yearName.value,'json': json,'user_id': userStore.userInfo.id,evaluation_schedule_id: current1.value});
console.log(res)
if (res.code == 1) {
layer.msg('提交成功!', {icon: 1})
visible11.value = false;
getYearList();
- getYearContent();
} else {
layer.msg(res.msg, {icon: 2})
}
diff --git a/vite.config.ts b/vite.config.ts
index 8edcdb1..a7de925 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -20,7 +20,7 @@ export default defineConfig({
server: {
proxy: {
'/api': {
- target: 'http://yfyd.hschool.com.cn',
+ target: 'http://192.168.10.158/',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}