fix: 评分表功能更改

This commit is contained in:
kun 2023-08-22 16:35:12 +08:00
parent b719d50402
commit 0babf2d325
11 changed files with 474 additions and 343 deletions

View File

@ -284,6 +284,14 @@ export const noScoreDetail = (params: any) => {
export const addScoreDetail = (params: any) => {
return http.post(BASEURL + `/gov/enterpriseScoreDetail/add`, params);
};
// 单位评分明细表(编辑打分)
export const updateScoreDetail = (params: any) => {
return http.post(BASEURL + `/gov/enterpriseScoreDetail/edit`, params);
};
// 单位评分明细表(清空打分)
export const deleteScoreDetail = (params: any) => {
return http.post(BASEURL + `/gov/enterpriseScoreDetail/deleteBatch`, params);
};
// 查看排行榜列表得分信息
export const rankScoreList = (params: any) => {
return http.post(BASEURL + `/gov/enterpriseScore/rankList`, params);

View File

@ -181,6 +181,7 @@
background: #1b2a54;
}
.leftProject {
width: 100%;
color: #333333;
font-size: 20px;
height: 40px;

View File

@ -25,6 +25,7 @@
height: 93%;
}
.leftProject {
width: 100%;
color: #333333;
font-size: 20px;
height: 40px;
@ -55,6 +56,9 @@
}
}
}
.addStyle {
display: none;
}
}
}
}

View File

@ -126,7 +126,7 @@ const formConfig = reactive({
{
label: "标准分",
prop: "standardScore",
type: "input"
type: "number"
}
// {
// label: "",
@ -179,7 +179,8 @@ const formConfig = reactive({
required: true,
message: "请输入",
trigger: "blur"
}
},
{ max: 100, message: "最大值不能超过100", trigger: "blur" }
]
}
});

View File

@ -25,7 +25,7 @@
height: 93%;
}
.leftProject {
width: 52%;
width: 100%;
color: #333333;
font-size: 20px;
height: 40px;

View File

@ -31,13 +31,18 @@
<el-button v-auth="'unit_add'" class="btnStyle" v-if="companyType.isDefault != 'Y'" @click="handleAddItem()"
>新增</el-button
>
<el-button type="danger" v-auth="'unit_del'" v-if="companyType.isDefault != 'Y'" @click="handleDeleteItem()"
<el-button
type="danger"
:disabled="!scope.isSelected"
v-auth="'unit_del'"
v-if="companyType.isDefault != 'Y'"
@click="handleDeleteItem(scope)"
>删除</el-button
>
<!-- <el-button class="btnStyle" @click="openScore = true">评分表</el-button> -->
</template>
<!-- 表格操作 -->
<template #operation="{ row }">
<template #operation="{ row }" v-if="companyType.isDefault != 'Y'">
<!-- <el-button v-auth="'score_add'" class="btnStyle" type="primary" @click="openScoreTable(row)">
<img src="@/assets/images/tableIcon/configureIcon.png" alt="" class="configureIcon" />
<span>评分表</span>
@ -117,7 +122,7 @@ import { ColumnProps } from "@/components/ProTable/interface";
import ProTable from "@/components/ProTable/index.vue";
import { GlobalStore } from "@/stores";
import type { UploadProps, FormInstance } from "element-plus";
import { ElMessage } from "element-plus";
import { ElMessage, ElMessageBox } from "element-plus";
import DialogForm from "@/components/DialogForm/index.vue";
import scoreTable from "./components/scoreTable.vue";
import addCompany from "./components/addCompany.vue";
@ -240,6 +245,8 @@ const getEnterpriseList = async () => {
const res: any = await enterpriseList(requestData);
if (res && res.result && res.result.length > 0) {
enterpriseDataList.value = res.result;
} else {
enterpriseDataList.value = [];
}
console.log(res);
};
@ -316,12 +323,24 @@ const allScoreConfirm = () => {
proTable.value.getTableList();
};
//
const handleDeleteItem = async () => {
if (proTable.value.selectedListIds.length == 0) {
ElMessage.error("请先勾选要删除的数据");
const handleDeleteItem = async (data: any) => {
console.log(data);
let isHave = false;
data.selectedList.map(item => {
if (item.score || item.score == 0) {
isHave = true;
}
});
let ids = proTable.value.selectedListIds.join(",");
if (isHave) {
ElMessageBox.confirm("选中项中有已打分数据,确认删除选中项?", "温馨提示", { type: "warning" }).then(async () => {
const res = await scoreBatchDelete({ ids });
ElMessage.success("操作成功");
proTable.value.getTableList();
});
} else {
let ids = proTable.value.selectedListIds.join(",");
await useHandleData(scoreBatchDelete, { ids }, `删除选中项`);
ElMessage.success("操作成功");
proTable.value.getTableList();
}
};

View File

@ -53,70 +53,66 @@
<div class="table-head-six">
<div><span>优秀10良好8-9一般6-70-5</span></div>
</div>
<div class="table-head-six-add">
<div>
<el-button
class="btnStyle"
size="small"
type="primary"
v-for="(item, index) in categoryList"
:key="index"
@click="getDetails(item)"
>
{{ item }}
</el-button>
</div>
</div>
<div class="table-head-seven">
<div><span>考核项目</span></div>
<div><span>考核得分</span></div>
</div>
<div class="table-head-eight">
<div><span>类别</span></div>
<div><span>编号</span></div>
<div><span>考核内容</span></div>
<div><span>总分值</span></div>
<div><span>得分</span></div>
<div><span>扣分说明</span></div>
</div>
<div class="table-head-nine" v-for="(value, key, index) in recordData" :key="index">
<div class="table-head-nine-part1">
<div class="category-title">
<div class="table-head-combo" v-for="(value, key, index) in recordData" :key="index">
<div class="table-head-six-add">
<div>
<span>{{ key }}</span>
</div>
<div class="category-content">
<div v-for="(item, index2) in value.children" :key="index2">
<div>
<span>{{ index2 + 1 }}</span>
</div>
<div class="table-head-seven">
<div><span>考核项目</span></div>
<div><span>考核得分</span></div>
</div>
<div class="table-head-eight">
<div><span>类别</span></div>
<div><span>编号</span></div>
<div><span>考核内容</span></div>
<div><span>总分值</span></div>
<div><span>得分</span></div>
<div><span>扣分说明</span></div>
</div>
<div class="table-head-nine">
<div class="table-head-nine-part1" v-for="(value2, key2, index2) in value" :key="index2">
<div class="category-title">
<span>{{ key2 }}</span>
</div>
<div class="category-content">
<div v-for="(item, index3) in value2" :key="index3">
<div>
<span>{{ index3 + 1 }}</span>
</div>
<div>{{ item.scoreCriteria }}</div>
<div>
<span>{{ item.standardScore }}</span>
</div>
<div>
<el-select placeholder="请选择" class="form-element-select" v-model="item.score">
<el-option v-for="(item2, index) in item.standardScore + 1" :key="index" :label="index" :value="index" />
</el-select>
</div>
<div><el-input placeholder="请输入" v-model="item.punish" class="form-element-input" /></div>
</div>
<div>{{ item.scoreCriteria }}</div>
<div><span>10</span></div>
<div>
<el-select placeholder="请选择" class="form-element-select" v-model="item.score">
<el-option v-for="item in scoreOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
<div><el-input placeholder="请输入" v-model="item.punish" class="form-element-input" /></div>
</div>
</div>
</div>
<div class="table-head-nine-part2">
<div><span>小计</span></div>
<div><span>100</span></div>
<div>
<span>{{ sumAllScore(value.children) }}</span>
</div>
<div>
<!-- <div class="form-element">
<el-input placeholder="请输入" class="form-element-input" />
</div> -->
<div class="table-head-nine-part2">
<div><span>小计</span></div>
<div>
<span>{{ sumAllScore("all", value) }}</span>
</div>
<div>
<span>{{ sumAllScore("get", value) }}</span>
</div>
<div></div>
</div>
</div>
</div>
<div class="table-head-ten">
<div><span>考核总评分</span></div>
<div>
<span>{{ sumAllScoreCount() }}</span>
<span>{{ sumAllScoreCount("all") }}</span>
</div>
<div>
<span>{{ sumAllScoreCount("get") }}</span>
</div>
<div><span></span></div>
</div>
@ -131,7 +127,7 @@
import { onMounted, ref, watch, reactive } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import type { FormInstance, UploadProps } from "element-plus";
import { scoreSubItemList, scoreDetail, noScoreDetail, addScoreDetail } from "@/api/modules/huizhou";
import { scoreSubItemList, scoreDetail, noScoreDetail, addScoreDetail, updateScoreDetail } from "@/api/modules/huizhou";
const formData = ref({});
const emits = defineEmits(["confirm"]);
const props = defineProps(["relativeInfo"]);
@ -156,93 +152,131 @@ const saveScore = async () => {
console.log(formData.value);
let arr = [];
for (let i in recordData.value) {
recordData.value[i].children.map(item => {
item.scoreId = props.relativeInfo.id;
// delete item.id;
arr.push(item);
});
for (let x in recordData.value[i]) {
recordData.value[i][x].map(item => {
item.scoreId = props.relativeInfo.id;
// delete item.id;
arr.push(item);
});
}
}
let requestData = {
concatNumber: formData.value.concatNumber,
scoreTime: formData.value.scoreTime,
startTime: formData.value.timeRange ? formData.value.timeRange[0] : null,
endTime: formData.value.timeRange ? formData.value.timeRange[1] : null,
enterpriseScoreDetails: arr
};
console.log(recordData.value);
console.log(requestData);
console.log(arr);
const res = await addScoreDetail(arr);
if (props.relativeInfo.score) {
const res = await updateScoreDetail(requestData);
} else {
const res = await addScoreDetail(requestData);
}
ElMessage.success("操作成功");
visible1.value = false;
emits("confirm");
emits("confirm", false);
};
//
const cancelScore = () => {
emits("confirm", false);
};
const sumAllScoreCount = () => {
const sumAllScoreCount = (label: any) => {
let score = 0;
for (let i in recordData.value) {
recordData.value[i].children.map(item => {
score += item.score;
});
if (label == "all") {
for (let i in recordData.value) {
for (let x in recordData.value[i]) {
recordData.value[i][x].map(item => {
score += item.standardScore;
});
}
}
return score;
} else {
for (let i in recordData.value) {
for (let x in recordData.value[i]) {
recordData.value[i][x].map(item => {
score += item.score;
});
}
}
return score;
}
return score;
};
//
const sumAllScore = (arr: any) => {
const sumAllScore = (label: any, arr: any) => {
console.log(arr);
let score = 0;
arr.map(item => {
score += item.score;
});
return score;
if (label == "all") {
for (let i in arr) {
arr[i].map(item => {
score += item.standardScore;
});
}
return score;
} else {
for (let i in arr) {
arr[i].map(item => {
score += item.score;
});
}
return score;
}
};
const getDetails = async (obj?: any) => {
let categoryName = "";
let score = 0;
let recordDataCreate = {};
// let categoryName = "";
// let score = 0;
// let recordDataCreate = {};
recordData.value = {};
if (props.relativeInfo.score) {
let requestData = {
scoreId: props.relativeInfo.id,
category: obj ? obj : ""
scoreId: props.relativeInfo.id
};
const res = await scoreDetail(requestData);
console.log(res);
if (res && res.result) {
categoryName = res.result[0].category;
recordDataCreate[categoryName] = { children: [] };
res.result.map(item => {
item.score = 0;
score += item.standardScore;
if (item.category == categoryName) {
recordDataCreate[item.category].children.push(item);
} else {
categoryName = item.category;
recordDataCreate[categoryName] = { children: [] };
}
});
console.log(recordDataCreate);
recordData.value = recordDataCreate;
// categoryName = res.result[0].category;
// recordDataCreate[categoryName] = { children: [] };
// res.result.map(item => {
// score += item.standardScore;
// if (item.category == categoryName) {
// recordDataCreate[item.category].children.push(item);
// } else {
// categoryName = item.category;
// recordDataCreate[categoryName] = { children: [] };
// }
// });
// console.log(recordDataCreate);
recordData.value = res.result;
}
} else {
let requestData = {
enterpriseType: +props.relativeInfo.enterpriseType,
category: obj ? obj : ""
enterpriseType: +props.relativeInfo.enterpriseType
};
const res = await noScoreDetail(requestData);
console.log(res);
if (res && res.result) {
categoryName = res.result[0].category;
recordDataCreate[categoryName] = { children: [] };
res.result.map(item => {
item.score = 0;
score += item.standardScore;
if (item.category == categoryName) {
recordDataCreate[item.category].children.push(item);
} else {
categoryName = item.category;
recordDataCreate[categoryName] = { children: [] };
for (let i in res.result) {
for (let x in res.result[i]) {
res.result[i][x].map(item => {
item.score = 0;
});
}
});
console.log(recordDataCreate);
recordData.value = recordDataCreate;
}
recordData.value = res.result;
// categoryName = res.result[0].category;
// recordDataCreate[categoryName] = { children: [] };
// res.result.map(item => {
// item.score = 0;
// score += item.standardScore;
// if (item.category == categoryName) {
// recordDataCreate[item.category].children.push(item);
// } else {
// categoryName = item.category;
// recordDataCreate[categoryName] = { children: [] };
// }
// });
// console.log(recordDataCreate);
}
}
};
@ -253,13 +287,16 @@ const getScoreSubItemData = async () => {
const res = await scoreSubItemList(requestData);
if (res && res.result) {
categoryList.value = res.result;
getDetails(res.result[0]);
}
console.log(res);
};
onMounted(async () => {
await getScoreSubItemData();
await getDetails();
formData.value = { ...props.relativeInfo };
if (formData.value.startTime) {
formData.value.timeRange = [formData.value.startTime, formData.value.endTime];
}
console.log(formData.value);
});
</script>
@ -427,227 +464,213 @@ onMounted(async () => {
border-right: 2px solid #086d93;
}
}
.table-head-six-add {
display: flex;
font-size: 20px;
> div {
width: 100%;
border-bottom: 2px solid #086d93;
white-space: nowrap;
:deep() {
.el-button {
margin-left: 15px;
}
}
}
div:not(:last-child) {
border-right: 2px solid #086d93;
}
}
.table-head-seven {
display: flex;
align-items: center;
text-align: center;
color: var(--el-menu-text-color);
font-size: 20px;
> div:nth-child(1) {
width: 68%;
border-bottom: 2px solid #086d93;
white-space: nowrap;
}
> div:nth-child(2) {
width: 34%;
border-bottom: 2px solid #086d93;
white-space: nowrap;
}
div:not(:last-child) {
border-right: 2px solid #086d93;
}
}
.table-head-eight {
display: flex;
align-items: center;
text-align: center;
color: var(--el-menu-text-color);
font-size: 20px;
> div:nth-child(1) {
width: 17%;
border-bottom: 2px solid #086d93;
white-space: nowrap;
}
> div:nth-child(2) {
width: 5%;
border-bottom: 2px solid #086d93;
white-space: nowrap;
}
> div:nth-child(3) {
width: calc(46% - 4px);
border-bottom: 2px solid #086d93;
white-space: nowrap;
}
> div:nth-child(4) {
width: 11%;
border-bottom: 2px solid #086d93;
white-space: nowrap;
}
> div:nth-child(5) {
width: 11%;
border-bottom: 2px solid #086d93;
white-space: nowrap;
}
> div:nth-child(6) {
width: calc(12% - 4px);
border-bottom: 2px solid #086d93;
white-space: nowrap;
}
div:not(:last-child) {
border-right: 2px solid #086d93;
}
}
.table-head-nine {
.table-head-combo {
display: flex;
flex-direction: column;
.table-head-nine-part1 {
.table-head-six-add {
display: flex;
align-items: center;
// background-color: #fff;
text-align: center;
color: var(--el-menu-text-color);
font-size: 20px;
border-bottom: 1px solid #086d93;
.category-title {
width: calc(17% - 2px);
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
> div {
width: 100%;
border-bottom: 2px solid #086d93;
white-space: nowrap;
border-right: 2px solid #086d93;
}
.category-content {
width: calc(85% - 8px);
> div {
width: 100%;
display: flex;
> div:nth-child(1) {
width: 6%;
display: flex;
align-items: center;
justify-content: center;
white-space: nowrap;
}
> div:nth-child(2) {
width: 54%;
overflow-wrap: anywhere;
}
> div:nth-child(3) {
width: 13%;
display: flex;
align-items: center;
justify-content: center;
white-space: nowrap;
}
> div:nth-child(4) {
width: 13%;
display: flex;
align-items: center;
justify-content: center;
white-space: nowrap;
}
> div:nth-child(5) {
width: calc(14% - 2px);
display: flex;
align-items: center;
justify-content: center;
white-space: nowrap;
}
div:not(:last-child) {
border-right: 2px solid #086d93;
}
span {
margin-left: 15px;
}
> div:not(:last-child) {
> div:nth-child(1) {
border-bottom: 1px solid #086d93;
}
> div:nth-child(2) {
border-bottom: 1px solid #086d93;
}
> div:nth-child(3) {
border-bottom: 1px solid #086d93;
}
> div:nth-child(4) {
border-bottom: 1px solid #086d93;
}
> div:nth-child(5) {
border-bottom: 1px solid #086d93;
}
}
}
}
.table-head-nine-part2 {
display: flex;
align-items: center;
text-align: center;
color: var(--el-menu-text-color);
font-size: 20px;
border-bottom: 1px solid #086d93;
> div:nth-child(1) {
width: 68%;
display: flex;
flex-direction: column;
white-space: nowrap;
> span:not(:first-child) {
border-top: 1px solid #086d93;
}
}
> div:nth-child(2) {
width: 11%;
display: flex;
flex-direction: column;
white-space: nowrap;
> span:not(:first-child) {
border-top: 1px solid #086d93;
}
}
> div:nth-child(3) {
width: 11%;
display: flex;
flex-direction: column;
white-space: nowrap;
> span:not(:first-child) {
border-top: 1px solid #086d93;
}
}
> div:nth-child(4) {
width: calc(12% - 4px);
display: flex;
flex-direction: column;
white-space: nowrap;
// .form-element {
// display: flex;
// align-items: center;
// justify-content: center;
// &-input {
// width: 90%;
// :deep() {
// .el-input,
// .select-trigger {
// width: 100%;
// height: 100%;
// }
// }
// }
// }
// .form-element:not(:first-child) {
// border-top: 1px solid #086d93;
// }
}
div:not(:last-child) {
border-right: 2px solid #086d93;
}
}
.table-head-seven {
display: flex;
align-items: center;
text-align: center;
color: var(--el-menu-text-color);
font-size: 20px;
> div:nth-child(1) {
width: 68%;
border-bottom: 2px solid #086d93;
white-space: nowrap;
}
> div:nth-child(2) {
width: 34%;
border-bottom: 2px solid #086d93;
white-space: nowrap;
}
div:not(:last-child) {
border-right: 2px solid #086d93;
}
}
.table-head-eight {
display: flex;
align-items: center;
text-align: center;
color: var(--el-menu-text-color);
font-size: 20px;
> div:nth-child(1) {
width: 17%;
border-bottom: 2px solid #086d93;
white-space: nowrap;
}
> div:nth-child(2) {
width: 5%;
border-bottom: 2px solid #086d93;
white-space: nowrap;
}
> div:nth-child(3) {
width: calc(46% - 4px);
border-bottom: 2px solid #086d93;
white-space: nowrap;
}
> div:nth-child(4) {
width: 11%;
border-bottom: 2px solid #086d93;
white-space: nowrap;
}
> div:nth-child(5) {
width: 11%;
border-bottom: 2px solid #086d93;
white-space: nowrap;
}
> div:nth-child(6) {
width: calc(12% - 4px);
border-bottom: 2px solid #086d93;
white-space: nowrap;
}
div:not(:last-child) {
border-right: 2px solid #086d93;
}
}
.table-head-nine {
display: flex;
flex-direction: column;
.table-head-nine-part1 {
display: flex;
align-items: center;
// background-color: #fff;
text-align: center;
color: var(--el-menu-text-color);
font-size: 20px;
border-bottom: 1px solid #086d93;
.category-title {
width: calc(17% - 2px);
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
white-space: nowrap;
border-right: 2px solid #086d93;
}
.category-content {
width: calc(85% - 8px);
> div {
width: 100%;
display: flex;
> div:nth-child(1) {
width: 6%;
display: flex;
align-items: center;
justify-content: center;
white-space: nowrap;
}
> div:nth-child(2) {
width: 54%;
overflow-wrap: anywhere;
}
> div:nth-child(3) {
width: 13%;
display: flex;
align-items: center;
justify-content: center;
white-space: nowrap;
}
> div:nth-child(4) {
width: 13%;
display: flex;
align-items: center;
justify-content: center;
white-space: nowrap;
}
> div:nth-child(5) {
width: calc(14% - 2px);
display: flex;
align-items: center;
justify-content: center;
white-space: nowrap;
}
div:not(:last-child) {
border-right: 2px solid #086d93;
}
}
> div:not(:last-child) {
> div:nth-child(1) {
border-bottom: 1px solid #086d93;
}
> div:nth-child(2) {
border-bottom: 1px solid #086d93;
}
> div:nth-child(3) {
border-bottom: 1px solid #086d93;
}
> div:nth-child(4) {
border-bottom: 1px solid #086d93;
}
> div:nth-child(5) {
border-bottom: 1px solid #086d93;
}
}
}
}
.table-head-nine-part2 {
display: flex;
align-items: center;
text-align: center;
color: var(--el-menu-text-color);
font-size: 20px;
border-bottom: 1px solid #086d93;
> div:nth-child(1) {
width: 68%;
display: flex;
flex-direction: column;
white-space: nowrap;
> span:not(:first-child) {
border-top: 1px solid #086d93;
}
}
> div:nth-child(2) {
width: 11%;
display: flex;
flex-direction: column;
white-space: nowrap;
> span:not(:first-child) {
border-top: 1px solid #086d93;
}
}
> div:nth-child(3) {
width: 11%;
display: flex;
flex-direction: column;
white-space: nowrap;
> span:not(:first-child) {
border-top: 1px solid #086d93;
}
}
> div:nth-child(4) {
width: calc(12% - 4px);
display: flex;
flex-direction: column;
white-space: nowrap;
}
div:not(:last-child) {
border-right: 2px solid #086d93;
}
}
}
}
.table-head-ten {
display: flex;
align-items: center;
@ -655,7 +678,7 @@ onMounted(async () => {
color: var(--el-menu-text-color);
font-weight: 700;
font-size: 20px;
// border-bottom: 1px solid #086d93;
border-bottom: 1px solid #086d93;
> div:nth-child(1) {
width: 68%;
display: flex;
@ -666,7 +689,7 @@ onMounted(async () => {
}
}
> div:nth-child(2) {
width: calc(22% + 2px);
width: 11%;
display: flex;
flex-direction: column;
white-space: nowrap;
@ -675,7 +698,7 @@ onMounted(async () => {
}
}
> div:nth-child(3) {
width: calc(12% - 4px);
width: 11%;
display: flex;
flex-direction: column;
white-space: nowrap;
@ -683,6 +706,39 @@ onMounted(async () => {
border-top: 1px solid #086d93;
}
}
> div:nth-child(4) {
width: calc(12% - 4px);
display: flex;
flex-direction: column;
white-space: nowrap;
}
// > div:nth-child(1) {
// width: 68%;
// display: flex;
// flex-direction: column;
// white-space: nowrap;
// > span:not(:first-child) {
// border-top: 1px solid #086d93;
// }
// }
// > div:nth-child(2) {
// width: calc(22% + 2px);
// display: flex;
// flex-direction: column;
// white-space: nowrap;
// > span:not(:first-child) {
// border-top: 1px solid #086d93;
// }
// }
// > div:nth-child(3) {
// width: calc(12% - 4px);
// display: flex;
// flex-direction: column;
// white-space: nowrap;
// > span:not(:first-child) {
// border-top: 1px solid #086d93;
// }
// }
div:not(:last-child) {
border-right: 2px solid #086d93;
}

View File

@ -25,6 +25,7 @@
height: 93%;
}
.leftProject {
width: 100%;
color: #333333;
font-size: 20px;
height: 40px;
@ -56,6 +57,9 @@
}
}
}
.addStyle {
display: none;
}
}
}
}

View File

@ -27,17 +27,27 @@
background
:isShowSearch="false"
>
<!-- <template #formButton="scope">
<el-button v-auth="'unit_add'" class="btnStyle" v-if="companyType.isDefault != 'Y'" @click="handleAddItem()"
<template #formButton="scope">
<!-- <el-button v-auth="'unit_add'" class="btnStyle" v-if="companyType.isDefault != 'Y'" @click="handleAddItem()"
>新增</el-button
> -->
<el-button
type="primary"
v-auth="'score_del'"
:disabled="!scope.isSelected"
@click="clearScore(scope.selectedListIds)"
>清空评分</el-button
>
<el-button class="btnStyle" @click="openScore = true">评分表</el-button>
</template> -->
</template>
<!-- 表格操作 -->
<template #operation="{ row }">
<el-button v-auth="'score_add'" class="btnStyle" type="primary" @click="openScoreTable(row)">
<el-button v-if="!row.score" v-auth="'score_add'" class="btnStyle" type="primary" @click="openScoreTable(row)">
<!-- <img src="@/assets/images/tableIcon/configureIcon.png" alt="" class="configureIcon" /> -->
<span>评分表</span>
<span>新增打分</span>
</el-button>
<el-button v-else v-auth="'score_upddate'" class="btnStyle" type="primary" @click="openScoreTable(row)">
<!-- <img src="@/assets/images/tableIcon/configureIcon.png" alt="" class="configureIcon" /> -->
<span>编辑打分</span>
</el-button>
</template>
</ProTable>
@ -126,7 +136,8 @@ import scoreTable from "./components/scoreTable.vue";
import addCompany from "./components/addCompany.vue";
import scoreTableNew from "./components/scoreTableNew.vue";
import { getDicList } from "@/api/modules/jxjview";
import { scorePage, enterpriseList, engineerList, scoreAdd } from "@/api/modules/huizhou";
import { scorePage, enterpriseList, engineerList, scoreAdd, deleteScoreDetail } from "@/api/modules/huizhou";
import { useHandleData } from "@/hooks/useHandleData";
const relativeInfo = ref({});
const dicMainData = ref([]);
const openScore = ref(false);
@ -191,6 +202,16 @@ const columns: ColumnProps[] = [
prop: "engineeringName",
label: "项目名称"
},
{
prop: "scoreFlag",
label: "评分状态",
isShow: false,
search: { el: "select" },
enum: [
{ label: "已评分", value: 1 },
{ label: "未评分", value: 0 }
]
},
// {
// prop: "creditCode",
// label: ""
@ -203,7 +224,7 @@ const columns: ColumnProps[] = [
prop: "score",
label: "分数"
},
{ prop: "operation", label: "操作", width: 120, fixed: "right" }
{ prop: "operation", label: "操作", width: 150, fixed: "right" }
];
const imgOption = ref([
"../../../../../assets/images/hzImg/assessmentImg/dicIcon1.png",
@ -223,6 +244,14 @@ const companyType = ref({});
const proTable = ref();
const enterpriseDataList = ref<any>([]);
const engineerDataList = ref<any>([]);
//
const clearScore = async (ids: []) => {
console.log(ids);
let idString = ids.join(",");
await useHandleData(deleteScoreDetail, { ids: idString }, "清空所选打分明细");
proTable.value?.clearSelection();
proTable.value?.getTableList();
};
const confirmScore = (val: any) => {
console.log(val);
openScore.value = val;

View File

@ -264,8 +264,16 @@
border-radius: 50%;
}
:deep(.el-form .el-form-item__content .el-range-editor) {
width: 200px;
:deep() {
.el-form .el-form-item__content .el-range-editor {
width: 300px;
}
.el-range-separator {
color: var(--el-menu-text-color);
}
.el-range-input {
font-size: 18px;
}
}
:deep() {
.el-form-item__content > :not(button) {

View File

@ -71,7 +71,7 @@
</div>
<div class="img_bottom">
<!-- <div class="position" style="font-size: 12px">位置{{ item.deviceName }}</div> -->
<div style="font-size: 16px">时间{{ item.createTime }}</div>
<div style="font-size: 16px">时间{{ item.uploadTime }}</div>
</div>
</div>
</div>
@ -358,8 +358,9 @@ const getVideoData = async () => {
const handleCurrentChange = async (page: number) => {};
// form
const onDatePicker = () => {
form.value.startTime = form.value.createTime[0];
form.value.endTime = form.value.createTime[1];
console.log(form.value.createTime);
form.value.startTime = form.value.createTime ? form.value.createTime[0] : null;
form.value.endTime = form.value.createTime ? form.value.createTime[1] : null;
};
//
const getProPage = async () => {