|
@@ -7,7 +7,9 @@ import { ref, reactive, onMounted } from "vue";
|
|
|
import {
|
|
|
getAssessmentQuotaDetails,
|
|
|
delAssessmentObject,
|
|
|
- getAssessmentObjectDetails
|
|
|
+ getAssessmentObjectDetails,
|
|
|
+ postAddAssessmentObject,
|
|
|
+ updateAssessmentQuotaDetails
|
|
|
} from "@/api/assessment";
|
|
|
import { getTemplateInfoList } from "@/api/templateInfo";
|
|
|
import { useRouter } from "vue-router";
|
|
@@ -80,6 +82,7 @@ onMounted(() => {
|
|
|
const getAssessmentQuotaDetailsApi = async () => {
|
|
|
const res = await getAssessmentQuotaDetails(initParams.indexParams);
|
|
|
if (res.code === 200) {
|
|
|
+ console.log("指标分页查询", res);
|
|
|
initParams.Indexlist = res.data.records;
|
|
|
initParams.total1 = res.data.totalRow;
|
|
|
}
|
|
@@ -101,7 +104,8 @@ const addPersonParams = reactive({
|
|
|
assessmentId: "",
|
|
|
objectAddVoList: []
|
|
|
});
|
|
|
-const aaa = ref();
|
|
|
+// 添加被考核人
|
|
|
+const value1 = ref();
|
|
|
const delAssessmentObjectApi = async () => {
|
|
|
if (valSelection.value) {
|
|
|
ElMessageBox.confirm(
|
|
@@ -154,32 +158,6 @@ const changeSelection = val => {
|
|
|
};
|
|
|
const router = useRouter();
|
|
|
const activeName = ref("first");
|
|
|
-const tableData = [
|
|
|
- {
|
|
|
- date: "2016-05-03",
|
|
|
- name: "Tom",
|
|
|
- address: "No. 189, Grove St, Los Angeles",
|
|
|
- show: false
|
|
|
- },
|
|
|
- {
|
|
|
- date: "2016-05-02",
|
|
|
- name: "Tom",
|
|
|
- address: "No. 189, Grove St, Los Angeles",
|
|
|
- show: false
|
|
|
- },
|
|
|
- {
|
|
|
- date: "2016-05-04",
|
|
|
- name: "Tom",
|
|
|
- address: "No. 189, Grove St, Los Angeles",
|
|
|
- show: false
|
|
|
- },
|
|
|
- {
|
|
|
- date: "2016-05-01",
|
|
|
- name: "Tom",
|
|
|
- address: "No. 189, Grove St, Los Angeles",
|
|
|
- show: false
|
|
|
- }
|
|
|
-];
|
|
|
// 批量导入
|
|
|
const addsImport = () => {
|
|
|
router.push({ name: "importIndex", query: { ...messageData.value } });
|
|
@@ -195,6 +173,10 @@ const publish = () => {
|
|
|
// 添加被考核人
|
|
|
const dialogVisibleAdd = ref(false);
|
|
|
const handleRreeSelect = data => {
|
|
|
+ addPersonParams.objectAddVoList.push({
|
|
|
+ assessmentObjectId: data.userCode,
|
|
|
+ assessmentObjectName: data.userName
|
|
|
+ });
|
|
|
console.log("1111111", data);
|
|
|
};
|
|
|
const dialogVisibleAddShow = () => {
|
|
@@ -236,6 +218,37 @@ const handleCurrentIndexChange = (val: number) => {
|
|
|
initParams.indexParams.pageNumber = val;
|
|
|
getAssessmentQuotaDetailsApi();
|
|
|
};
|
|
|
+// 指标修改
|
|
|
+const updateAssessmentQuotaDetailsApi = async row => {
|
|
|
+ const { msg, code } = await updateAssessmentQuotaDetails({
|
|
|
+ relationId: row.relationId,
|
|
|
+ id: row.id,
|
|
|
+ dimId: row.dimId,
|
|
|
+ assessmentObjectId: row.assessmentObjectId,
|
|
|
+ assessmentModelId: row.assessmentModelId,
|
|
|
+ score: row.score,
|
|
|
+ finalValue: row.finalValue
|
|
|
+ });
|
|
|
+ if (code === 200) {
|
|
|
+ ElMessage.success("修改成功");
|
|
|
+ } else {
|
|
|
+ ElMessage.error(msg);
|
|
|
+ }
|
|
|
+};
|
|
|
+const tableVxeRef = ref();
|
|
|
+const editConfig = ref({
|
|
|
+ trigger: "click",
|
|
|
+ mode: "cell"
|
|
|
+});
|
|
|
+const editClosedEvent = ({ row, column }) => {
|
|
|
+ console.log("row", row);
|
|
|
+ const $table = tableVxeRef.value;
|
|
|
+ if ($table) {
|
|
|
+ updateAssessmentQuotaDetailsApi(row);
|
|
|
+ // Object.assign(indexOf, row);
|
|
|
+ // postUpdateApi();
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -384,12 +397,48 @@ const handleCurrentIndexChange = (val: number) => {
|
|
|
</Auth>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-table
|
|
|
+ <vxe-table
|
|
|
+ ref="tableVxeRef"
|
|
|
+ class="mt-3"
|
|
|
+ show-overflow
|
|
|
+ :edit-config="editConfig"
|
|
|
:data="initParams.Indexlist"
|
|
|
- style="width: 100%"
|
|
|
max-height="250"
|
|
|
+ @edit-closed="editClosedEvent"
|
|
|
@selection-change="changeSelection"
|
|
|
>
|
|
|
+ <vxe-column type="checkbox" width="60" />
|
|
|
+ <vxe-column field="realName" fixed title="人员" width="100" />
|
|
|
+ <vxe-column field="userName" fixed title="工号" width="180" />
|
|
|
+ <vxe-column field="deptName" fixed title="部门" width="180" />
|
|
|
+ <vxe-column field="name" fixed title="指标名称" width="180" />
|
|
|
+ <vxe-column field="scoreRule" fixed title="评价标准" width="180" />
|
|
|
+ <vxe-column field="source" fixed title="数据来源" width="180" />
|
|
|
+ <vxe-column field="targetValue" fixed title="目标值" width="180" />
|
|
|
+ <vxe-column
|
|
|
+ field="finalValue"
|
|
|
+ fixed
|
|
|
+ title="完成值"
|
|
|
+ :edit-render="{ name: 'input' }"
|
|
|
+ width="180"
|
|
|
+ />
|
|
|
+ <vxe-column
|
|
|
+ field="score"
|
|
|
+ fixed
|
|
|
+ title="得分"
|
|
|
+ :edit-render="{ name: 'input' }"
|
|
|
+ width="180"
|
|
|
+ />
|
|
|
+ <vxe-column field="updateTime" title="更新时间" sortable width="180">
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ dayjs(row.updateTime).format("YYYY-MM-DD HH:mm:ss") }}
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="updateTime" title="操作" fixed="right" width="180">
|
|
|
+ <template #default> - </template>
|
|
|
+ </vxe-column>
|
|
|
+ </vxe-table>
|
|
|
+ <!-- <el-table :data="initParams.Indexlist" style="width: 100%" max-height="250" @selection-change="changeSelection">
|
|
|
<el-table-column type="selection" width="55" />
|
|
|
<el-table-column prop="realName" label="人员" width="100" />
|
|
|
<el-table-column prop="userName" label="工号" width="180" />
|
|
@@ -400,22 +449,17 @@ const handleCurrentIndexChange = (val: number) => {
|
|
|
<el-table-column prop="targetValue" label="目标值" width="180" />
|
|
|
<el-table-column prop="finalValue" label="完成值" width="180" />
|
|
|
<el-table-column prop="score" label="得分" width="180" />
|
|
|
- <el-table-column
|
|
|
- prop="updateTime"
|
|
|
- label="更新时间"
|
|
|
- width="150"
|
|
|
- sortable
|
|
|
- >
|
|
|
+ <el-table-column prop="updateTime" label="更新时间" width="150" sortable>
|
|
|
<template #default="{ row }">
|
|
|
{{ dayjs(row.updateTime).format("YYYY-MM-DD HH:mm:ss") }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" width="200" fixed="right">
|
|
|
<template #default>
|
|
|
- <!-- <el-icon @click="GoView(row)"><View /></el-icon> -->-
|
|
|
+ -
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- </el-table>
|
|
|
+ </el-table> -->
|
|
|
<div class="flex justify-between item-center">
|
|
|
<div class="float-left mt-5 ml-2 total">
|
|
|
<!-- 共{{ initParams.total1 }}条数据 -->
|
|
@@ -441,7 +485,7 @@ const handleCurrentIndexChange = (val: number) => {
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
<!-- 添加被考核人 -->
|
|
|
- <el-dialog v-model="dialogVisibleAdd" title="添加被考核人" width="744">
|
|
|
+ <el-dialog v-model="dialogVisibleAdd" title="添加被考核人" width="500">
|
|
|
<div>
|
|
|
<el-form
|
|
|
ref="ruleFormRef"
|
|
@@ -451,20 +495,20 @@ const handleCurrentIndexChange = (val: number) => {
|
|
|
>
|
|
|
<el-form-item label="维度权重" label-position="top">
|
|
|
<el-tree-select
|
|
|
- v-model="aaa"
|
|
|
+ v-model="value1"
|
|
|
:data="treeDept"
|
|
|
multiple
|
|
|
:props="{
|
|
|
label: 'userName',
|
|
|
value: 'userCode',
|
|
|
- children: 'childrenRes'
|
|
|
+ children: 'children'
|
|
|
}"
|
|
|
:render-after-expand="false"
|
|
|
show-checkbox
|
|
|
check-strictly
|
|
|
check-on-click-node
|
|
|
style="width: 240px"
|
|
|
- @node-click="handleRreeSelect"
|
|
|
+ @check-change="handleRreeSelect"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-form>
|