bug整改:亲子活动、活动申报、经费预算管理、费用报销管理、新闻投稿、职工建家
This commit is contained in:
@@ -27,11 +27,11 @@ import java.util.Map;
|
|||||||
@IocBean
|
@IocBean
|
||||||
public class SmsJshvcServiceImpl implements SmsService {
|
public class SmsJshvcServiceImpl implements SmsService {
|
||||||
|
|
||||||
private static final String APPID = "1430576717768122368";
|
private static final String APPID = "";
|
||||||
private static final String APP_SECRET = "19A0ACB03FBQHL4R4XQD";
|
private static final String APP_SECRET = "";
|
||||||
private static final String TOKEN_URL = "https://gateway.jshvc.edu.cn/token/gateway/accessToken";
|
private static final String TOKEN_URL = "";
|
||||||
private static final String MSG_URL = "https://gateway.jshvc.edu.cn/mp/restful/v2/message/send";
|
private static final String MSG_URL = "";
|
||||||
private static final String REDIS_KEY_MSG_ACCESS_TOKEN = "msg:token:";
|
private static final String REDIS_KEY_MSG_ACCESS_TOKEN = "";
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private RedisService redisService;
|
private RedisService redisService;
|
||||||
|
|||||||
+2
-2
@@ -273,8 +273,8 @@ public class FamilyActivityServiceImpl extends BaseServiceImpl<FamilyActivity> i
|
|||||||
dao().insert(familyUser);
|
dao().insert(familyUser);
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(familyUser.getActivityCourseId())) {
|
if (StrUtil.isNotBlank(familyUser.getActivityCourseId())) {
|
||||||
TrainSignUpActivityCourse fetch = dao().fetch(TrainSignUpActivityCourse.class, familyUser.getActivityCourseId());
|
FamilyActivityCourse fetch = dao().fetch(FamilyActivityCourse.class, familyUser.getActivityCourseId());
|
||||||
TrainSignUpUserCourse userCourse = new TrainSignUpUserCourse();
|
FamilyUserCourse userCourse = new FamilyUserCourse();
|
||||||
userCourse.setActivityId(familyUser.getActivityId());
|
userCourse.setActivityId(familyUser.getActivityId());
|
||||||
userCourse.setCourseId(familyUser.getCourseId());
|
userCourse.setCourseId(familyUser.getCourseId());
|
||||||
userCourse.setUserId(familyUser.getUserId());
|
userCourse.setUserId(familyUser.getUserId());
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ layout("/layouts/platform.html"){
|
|||||||
.el-row--flex {
|
.el-row--flex {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.header-left {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ layout("/layouts/platform.html"){
|
|||||||
dicts: ["ARTICLE_ORIGIN"],
|
dicts: ["ARTICLE_ORIGIN"],
|
||||||
computed: {
|
computed: {
|
||||||
origins() {
|
origins() {
|
||||||
|
console.log(this.dict,'this.dict')
|
||||||
if (this.dict?.type?.ARTICLE_ORIGIN && this.permission && this.permission.roles) {
|
if (this.dict?.type?.ARTICLE_ORIGIN && this.permission && this.permission.roles) {
|
||||||
return this.dict.type.ARTICLE_ORIGIN.filter((item) => this.permission && this.permission.roles.includes(item.code))
|
return this.dict.type.ARTICLE_ORIGIN.filter((item) => this.permission && this.permission.roles.includes(item.code))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,6 +52,118 @@ layout("/layouts/platform.html"){
|
|||||||
<kpi-form ref="kpiFormRef" @refresh="doSearch"></kpi-form>
|
<kpi-form ref="kpiFormRef" @refresh="doSearch"></kpi-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<style nonce="${cspNonce!}">
|
||||||
|
#app .kpi-plus .kpi-table-wrap {
|
||||||
|
width: 100%;
|
||||||
|
max-height: 50vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app .kpi-plus .kpi-content-table {
|
||||||
|
width: 100% !important;
|
||||||
|
min-width: 100%;
|
||||||
|
table-layout: fixed;
|
||||||
|
border-collapse: collapse;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app .kpi-plus .kpi-content-table thead {
|
||||||
|
background: #fafafa;
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app .kpi-plus .kpi-content-table thead th {
|
||||||
|
color: rgb(107 114 128);
|
||||||
|
background: #fafafa;
|
||||||
|
font-weight: 600;
|
||||||
|
padding: 14px 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app .kpi-plus .kpi-content-table tbody td {
|
||||||
|
padding: 14px 20px;
|
||||||
|
color: rgb(17 24 39);
|
||||||
|
line-height: 20px;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app .kpi-plus .kpi-content-table tbody td.item-content {
|
||||||
|
border-bottom: 1px solid rgb(229 231 235);
|
||||||
|
text-align: left;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app .kpi-plus .kpi-content-table tbody .category-split td,
|
||||||
|
#app .kpi-plus .kpi-content-table tbody td[rowspan] {
|
||||||
|
border-bottom: 1px solid rgb(33 40 53) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app .kpi-plus .kpi-content-table tbody tr:last-child {
|
||||||
|
position: sticky;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: white;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app .kpi-plus .kpi-content-table .category-name-cell,
|
||||||
|
#app .kpi-plus .kpi-content-table .score-total-cell {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app .kpi-plus .kpi-add-category-btn.el-button--primary {
|
||||||
|
background-color: #1f6db8;
|
||||||
|
border-color: #1f6db8;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app .kpi-plus .kpi-add-category-btn.el-button--primary:hover,
|
||||||
|
#app .kpi-plus .kpi-add-category-btn.el-button--primary:focus {
|
||||||
|
background-color: #1b61a4;
|
||||||
|
border-color: #1b61a4;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app .kpi-plus .td-extra {
|
||||||
|
margin-top: 4px;
|
||||||
|
transition: opacity 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app .kpi-plus .td-extra i {
|
||||||
|
margin-right: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app .kpi-plus .td-extra .edit {
|
||||||
|
color: #0a84ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app .kpi-plus .td-extra .edit:hover {
|
||||||
|
color: #1375d8;
|
||||||
|
transform: scale(1.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
#app .kpi-plus .td-extra .delete {
|
||||||
|
color: #ff3b30;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app .kpi-plus .td-extra .delete:hover {
|
||||||
|
color: #ec2216;
|
||||||
|
transform: scale(1.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
#app .kpi-plus .td-extra .add {
|
||||||
|
color: rgb(17 24 39);
|
||||||
|
}
|
||||||
|
|
||||||
|
#app .kpi-plus .td-extra .add:hover {
|
||||||
|
color: #0a84ff;
|
||||||
|
transform: scale(1.2);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<script nonce="${cspNonce!}">
|
<script nonce="${cspNonce!}">
|
||||||
<!--#include('kpiForm.js'){}#-->
|
<!--#include('kpiForm.js'){}#-->
|
||||||
|
|
||||||
|
|||||||
+184
-70
@@ -28,73 +28,81 @@ const kpiForm = {
|
|||||||
<div class="process-title">考核内容</div>
|
<div class="process-title">考核内容</div>
|
||||||
<div class="kpi-plus">
|
<div class="kpi-plus">
|
||||||
<el-row type="flex" justify="space-between" class="mb20">
|
<el-row type="flex" justify="space-between" class="mb20">
|
||||||
<el-button type="primary" icon="el-icon-plus" size="small" @click="showAddCategoryDialog">新增考核项目
|
<el-button class="kpi-add-category-btn" type="primary" icon="el-icon-plus" size="small" style="background-color: #1f6db8; border-color: #1f6db8;" @click="showAddCategoryDialog">新增考核项目
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<div>
|
<div class="kpi-table-wrap" style="width: 100%;">
|
||||||
<table>
|
<table class="kpi-content-table" style="width: 100%; min-width: 100%; table-layout: fixed; border-collapse: collapse;">
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 10%">
|
||||||
|
<col style="width: 15%">
|
||||||
|
<col style="width: 50%">
|
||||||
|
<col style="width: 10%">
|
||||||
|
<col style="width: 10%">
|
||||||
|
<col style="width: 5%">
|
||||||
|
</colgroup>
|
||||||
<thead class="bg-gray-50">
|
<thead class="bg-gray-50">
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 10%">序号</th>
|
<th>序号</th>
|
||||||
<th style="width: 10%">考核项目名称</th>
|
<th>考核项目名称</th>
|
||||||
<th style="width: 50%">考核内容详情</th>
|
<th>考核内容详情</th>
|
||||||
<th style="width: 10%">单项分</th>
|
<th>单项分</th>
|
||||||
<th style="width: 10%">分值</th>
|
<th>分值</th>
|
||||||
<th style="width: 10%">操作</th>
|
<th>操作</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody ref="categoryList" style="height: 50vh;overflow-y: auto;display: table;width: 100%">
|
<tbody ref="categoryList">
|
||||||
<template v-for="(category,categoryIndex) in formData.categoryList">
|
<template v-for="(category,categoryIndex) in formData.categoryList">
|
||||||
<tr v-for="(item,itemIndex) in category.items"
|
<tr v-for="(item,itemIndex) in category.items"
|
||||||
:class="{'category-split':itemIndex+1===category.items.length}">
|
:class="{'category-split':itemIndex+1===category.items.length}">
|
||||||
<td v-if="itemIndex===0" :rowspan="category.items.length" class="text-center" style="width: 10%">
|
<td v-if="itemIndex===0" :rowspan="category.items.length" class="text-center">
|
||||||
<div>{{categoryIndex+1}}</div>
|
<div>{{categoryIndex+1}}</div>
|
||||||
</td>
|
</td>
|
||||||
<td v-if="itemIndex===0" :rowspan="category.items.length" style="width: 10%">
|
<td v-if="itemIndex===0" :rowspan="category.items.length" class="category-name-cell">
|
||||||
<span v-if="category?.$edit_status?.name === false">
|
<span v-if="!isCategoryNameEditing(category)">
|
||||||
{{category.name}}
|
{{category.name}}
|
||||||
</span>
|
</span>
|
||||||
<el-input v-model="category.name" v-else
|
<el-input v-model="category.name" v-else
|
||||||
@blur="$set(category['$edit_status'],'name',false)"></el-input>
|
@blur="setCategoryNameEditing(category,false)"></el-input>
|
||||||
|
|
||||||
<div class="td-extra" v-if="category?.$edit_status?.name === false">
|
<div class="td-extra" v-if="!isCategoryNameEditing(category)">
|
||||||
<i class="fa fa-pencil edit" aria-hidden="true"
|
<i class="fa fa-pencil edit" aria-hidden="true"
|
||||||
@click="$set(category['$edit_status'],'name',true)"></i>
|
@click="setCategoryNameEditing(category,true)"></i>
|
||||||
<i class="fa fa-times delete" aria-hidden="true"
|
<i class="fa fa-times delete" aria-hidden="true"
|
||||||
@click="onDeleteCategory(categoryIndex)"></i>
|
@click="onDeleteCategory(categoryIndex)"></i>
|
||||||
<i class="fa fa-plus" aria-hidden="true"
|
<i class="fa fa-plus add" aria-hidden="true"
|
||||||
@click="addNewItem(categoryIndex)"></i>
|
@click="addNewItem(categoryIndex)"></i>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="item-content" style="width: 50%">
|
<td class="item-content">
|
||||||
<span v-if="item?.$edit_status?.content === false">
|
<span v-if="!isItemEditing(item,'content')">
|
||||||
{{item.content}}
|
{{item.content}}
|
||||||
</span>
|
</span>
|
||||||
<el-input v-else v-model="item.content" type="textarea" :rows="2"
|
<el-input v-else v-model="item.content" type="textarea" :rows="2"
|
||||||
@blur="$set(item['$edit_status'],'content',false)"></el-input>
|
@blur="setItemEditing(item,'content',false)"></el-input>
|
||||||
<div class="td-extra" v-if="item?.$edit_status?.content === false">
|
<div class="td-extra" v-if="!isItemEditing(item,'content')">
|
||||||
<i class="fa fa-pencil edit" aria-hidden="true"
|
<i class="fa fa-pencil edit" aria-hidden="true"
|
||||||
@click="$set(item['$edit_status'],'content',true)"></i>
|
@click="setItemEditing(item,'content',true)"></i>
|
||||||
<i class="fa fa-times delete" aria-hidden="true"
|
<i class="fa fa-times delete" aria-hidden="true"
|
||||||
@click="onDeleteItem(categoryIndex,itemIndex)"></i>
|
@click="onDeleteItem(categoryIndex,itemIndex)"></i>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 10%">
|
<td>
|
||||||
<span v-if="item?.$edit_status?.score === false">
|
<span v-if="!isItemEditing(item,'score')">
|
||||||
{{item.score}}
|
{{item.score}}
|
||||||
</span>
|
</span>
|
||||||
<el-input-number v-else v-model="item.score" :min="1"
|
<el-input-number v-else v-model="item.score" :min="1"
|
||||||
@blur="$set(item['$edit_status'],'score',false)"></el-input-number>
|
@blur="setItemEditing(item,'score',false)"></el-input-number>
|
||||||
<div class="td-extra" v-if="item?.$edit_status?.score === false">
|
<div class="td-extra" v-if="!isItemEditing(item,'score')">
|
||||||
<i class="fa fa-pencil edit" aria-hidden="true"
|
<i class="fa fa-pencil edit" aria-hidden="true"
|
||||||
@click="$set(item['$edit_status'],'score',true)"></i>
|
@click="setItemEditing(item,'score',true)"></i>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td v-if="itemIndex===0" :rowspan="category.items.length" style="width: 10%">
|
<td v-if="itemIndex===0" :rowspan="category.items.length" class="score-total-cell">
|
||||||
{{category.items.reduce((sum, item) => sum + (item.score || 0), 0)}}
|
{{getCategoryScore(category)}}
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 10%">
|
<td>
|
||||||
<div class="td-extra" style="opacity: 1!important;">
|
<div class="td-extra" style="opacity: 1!important;">
|
||||||
<i class="fa fa-times delete" aria-hidden="true"
|
<i class="fa fa-times delete" aria-hidden="true"
|
||||||
@click="onDeleteItem(categoryIndex,itemIndex)"></i>
|
@click="onDeleteItem(categoryIndex,itemIndex)"></i>
|
||||||
@@ -111,11 +119,12 @@ const kpiForm = {
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td :colspan="2">
|
<td>
|
||||||
<span style="font-weight: bold">
|
<span style="font-weight: bold">
|
||||||
{{formData.categoryList.flatMap(v=>v.items).map(v=>v.score || 0).reduce((sum, v) => sum + v, 0)}}
|
{{getTotalScore()}}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -248,8 +257,14 @@ const kpiForm = {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//每个考核内容至少要有分数
|
// 考核内容详情不能为空,防止删除最后一行后保存出空明细。
|
||||||
const hasNoneScore = this.formData.categoryList.flatMap((v) => v.items).some((v) => !v.score)
|
const hasNoneContent = this.getAllItems().some((v) => !v.content || !String(v.content).trim())
|
||||||
|
if (hasNoneContent) {
|
||||||
|
this.$message.error("考核内容详情不能为空")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 每条考核内容详情都必须有单项分,避免汇总分值和保存明细不一致。
|
||||||
|
const hasNoneScore = this.getAllItems().some((v) => !v.score)
|
||||||
if (hasNoneScore) {
|
if (hasNoneScore) {
|
||||||
this.$message.error("考核内容需要设置分数")
|
this.$message.error("考核内容需要设置分数")
|
||||||
return
|
return
|
||||||
@@ -298,18 +313,32 @@ const kpiForm = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
initStatus() {
|
initStatus() {
|
||||||
|
if (!this.formData.categoryList || !Array.isArray(this.formData.categoryList)) {
|
||||||
|
this.$set(this.formData, "categoryList", [])
|
||||||
|
}
|
||||||
|
if (!this.formData.scoreLevels || !Array.isArray(this.formData.scoreLevels)) {
|
||||||
|
this.$set(this.formData, "scoreLevels", [])
|
||||||
|
}
|
||||||
this.formData.categoryList.forEach((category) => {
|
this.formData.categoryList.forEach((category) => {
|
||||||
|
// 编辑状态只服务于弹窗内联编辑,不提交到后端业务字段。
|
||||||
this.$set(category, "$edit_status", {
|
this.$set(category, "$edit_status", {
|
||||||
name: false // 初始化 name 的编辑状态
|
name: false
|
||||||
})
|
})
|
||||||
if (category.items && Array.isArray(category.items)) {
|
if (!category.items || !Array.isArray(category.items) || category.items.length === 0) {
|
||||||
category.items.forEach((item) => {
|
this.$set(category, "items", [this.createItem(category, 0, true)])
|
||||||
this.$set(item, "$edit_status", {
|
|
||||||
content: false, // 控制 item.content 的编辑状态
|
|
||||||
score: false // 控制 item.score 的编辑状态
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
category.items.forEach((item, itemIndex) => {
|
||||||
|
if (!item.categoryId) {
|
||||||
|
this.$set(item, "categoryId", category.id)
|
||||||
|
}
|
||||||
|
if (!item.sortOrder) {
|
||||||
|
this.$set(item, "sortOrder", itemIndex + 1)
|
||||||
|
}
|
||||||
|
this.$set(item, "$edit_status", {
|
||||||
|
content: false,
|
||||||
|
score: false
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -319,7 +348,7 @@ const kpiForm = {
|
|||||||
name: "",
|
name: "",
|
||||||
code: "",
|
code: "",
|
||||||
sortOrder: this.formData.categoryList.length + 1,
|
sortOrder: this.formData.categoryList.length + 1,
|
||||||
items: [{}]
|
items: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -331,25 +360,16 @@ const kpiForm = {
|
|||||||
|
|
||||||
const cateGoryId = Date.now()
|
const cateGoryId = Date.now()
|
||||||
|
|
||||||
|
// 新增考核项目时默认放入一条可编辑明细,方便继续录入多个考核内容详情。
|
||||||
const category = {
|
const category = {
|
||||||
id: cateGoryId,
|
id: cateGoryId,
|
||||||
name: this.newCategory.name,
|
name: this.newCategory.name,
|
||||||
code: this.newCategory.code,
|
code: this.newCategory.code,
|
||||||
sortOrder: this.newCategory.sortOrder,
|
sortOrder: this.newCategory.sortOrder,
|
||||||
items: [
|
items: [],
|
||||||
{
|
|
||||||
categoryId: cateGoryId,
|
|
||||||
content: null,
|
|
||||||
score: 1,
|
|
||||||
sortOrder: 1,
|
|
||||||
$edit_status: {
|
|
||||||
content: true,
|
|
||||||
score: false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
$edit_status: { name: false }
|
$edit_status: { name: false }
|
||||||
}
|
}
|
||||||
|
category.items.push(this.createItem(category, 0, true))
|
||||||
|
|
||||||
this.formData.categoryList.push(category)
|
this.formData.categoryList.push(category)
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false
|
||||||
@@ -358,18 +378,67 @@ const kpiForm = {
|
|||||||
|
|
||||||
addNewItem(categoryIndex) {
|
addNewItem(categoryIndex) {
|
||||||
const category = this.formData.categoryList[categoryIndex]
|
const category = this.formData.categoryList[categoryIndex]
|
||||||
const newItem = {
|
category.items.push(this.createItem(category, category.items.length, true))
|
||||||
|
},
|
||||||
|
|
||||||
|
createItem(category, itemIndex, editContent) {
|
||||||
|
return {
|
||||||
id: Date.now(),
|
id: Date.now(),
|
||||||
categoryId: category.id,
|
categoryId: category.id,
|
||||||
content: "",
|
content: "",
|
||||||
score: 1,
|
score: 1,
|
||||||
sortOrder: category.items.length + 1,
|
sortOrder: itemIndex + 1,
|
||||||
$edit_status: {
|
$edit_status: {
|
||||||
content: true,
|
content: editContent,
|
||||||
score: false
|
score: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
category.items.push(newItem)
|
},
|
||||||
|
|
||||||
|
getAllItems() {
|
||||||
|
const list = []
|
||||||
|
const categoryList = this.formData.categoryList || []
|
||||||
|
categoryList.forEach((category) => {
|
||||||
|
const items = category.items || []
|
||||||
|
items.forEach((item) => {
|
||||||
|
list.push(item)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
return list
|
||||||
|
},
|
||||||
|
|
||||||
|
getCategoryScore(category) {
|
||||||
|
return (category.items || []).reduce((sum, item) => {
|
||||||
|
return sum + Number(item.score || 0)
|
||||||
|
}, 0)
|
||||||
|
},
|
||||||
|
|
||||||
|
getTotalScore() {
|
||||||
|
return (this.formData.categoryList || []).reduce((sum, category) => {
|
||||||
|
return sum + this.getCategoryScore(category)
|
||||||
|
}, 0)
|
||||||
|
},
|
||||||
|
|
||||||
|
isCategoryNameEditing(category) {
|
||||||
|
return !!(category.$edit_status && category.$edit_status.name)
|
||||||
|
},
|
||||||
|
|
||||||
|
setCategoryNameEditing(category, status) {
|
||||||
|
if (!category.$edit_status) {
|
||||||
|
this.$set(category, "$edit_status", {})
|
||||||
|
}
|
||||||
|
this.$set(category.$edit_status, "name", status)
|
||||||
|
},
|
||||||
|
|
||||||
|
isItemEditing(item, field) {
|
||||||
|
return !!(item.$edit_status && item.$edit_status[field])
|
||||||
|
},
|
||||||
|
|
||||||
|
setItemEditing(item, field, status) {
|
||||||
|
if (!item.$edit_status) {
|
||||||
|
this.$set(item, "$edit_status", {})
|
||||||
|
}
|
||||||
|
this.$set(item.$edit_status, field, status)
|
||||||
},
|
},
|
||||||
|
|
||||||
// 删除考核项目
|
// 删除考核项目
|
||||||
@@ -386,7 +455,7 @@ const kpiForm = {
|
|||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 删除考核内容
|
// 删除当前行的考核内容详情和单项分;最后一行被删除时保留空白行,避免项目名称行消失。
|
||||||
onDeleteItem(cateGoryIndex, itemIndex) {
|
onDeleteItem(cateGoryIndex, itemIndex) {
|
||||||
this.$confirm("确认删除该考核内容吗?", "提示", {
|
this.$confirm("确认删除该考核内容吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
@@ -394,7 +463,14 @@ const kpiForm = {
|
|||||||
type: "warning"
|
type: "warning"
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.formData.categoryList[cateGoryIndex].items.splice(itemIndex, 1)
|
const category = this.formData.categoryList[cateGoryIndex]
|
||||||
|
category.items.splice(itemIndex, 1)
|
||||||
|
if (category.items.length === 0) {
|
||||||
|
category.items.push(this.createItem(category, 0, true))
|
||||||
|
}
|
||||||
|
category.items.forEach((item, index) => {
|
||||||
|
item.sortOrder = index + 1
|
||||||
|
})
|
||||||
this.$message.success("删除成功")
|
this.$message.success("删除成功")
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
@@ -405,28 +481,45 @@ const kpiForm = {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.kpi-table-wrap {
|
||||||
|
width: 100%;
|
||||||
|
max-height: 50vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kpi-plus .kpi-content-table {
|
||||||
|
min-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kpi-add-category-btn {
|
||||||
|
background-color: #1f6db8;
|
||||||
|
border-color: #1f6db8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kpi-add-category-btn:hover,
|
||||||
|
.kpi-add-category-btn:focus {
|
||||||
|
background-color: #1b61a4;
|
||||||
|
border-color: #1b61a4;
|
||||||
|
}
|
||||||
|
|
||||||
.kpi-plus table {
|
.kpi-plus table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
|
table-layout: fixed;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.kpi-plus table thead {
|
.kpi-plus table thead {
|
||||||
background: #fafafa;
|
background: #fafafa;
|
||||||
display: table;
|
position: sticky;
|
||||||
table-layout: fixed;
|
top: 0;
|
||||||
width: calc(100% - 1em);
|
z-index: 1;
|
||||||
}
|
|
||||||
|
|
||||||
.kpi-plus table tbody {
|
|
||||||
display: block;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.kpi-plus thead th,
|
.kpi-plus thead th,
|
||||||
.kpi-plus tbody td {
|
.kpi-plus tbody td {
|
||||||
width: auto;
|
|
||||||
min-width: 100px;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.kpi-plus table thead th {
|
.kpi-plus table thead th {
|
||||||
@@ -441,6 +534,7 @@ const kpiForm = {
|
|||||||
position: sticky;
|
position: sticky;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.kpi-plus table tbody tr td {
|
.kpi-plus table tbody tr td {
|
||||||
@@ -463,6 +557,7 @@ const kpiForm = {
|
|||||||
.kpi-plus table tbody td.item-content {
|
.kpi-plus table tbody td.item-content {
|
||||||
border-bottom: 1px solid rgb(229 231 235);
|
border-bottom: 1px solid rgb(229 231 235);
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.kpi-plus table tbody .category-split td {
|
.kpi-plus table tbody .category-split td {
|
||||||
@@ -473,6 +568,11 @@ const kpiForm = {
|
|||||||
border-bottom: 1px solid rgb(33 40 53);
|
border-bottom: 1px solid rgb(33 40 53);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.kpi-plus .category-name-cell,
|
||||||
|
.kpi-plus .score-total-cell {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
.kpi-plus .score-levels-table .el-input-number{
|
.kpi-plus .score-levels-table .el-input-number{
|
||||||
width: unset!important;
|
width: unset!important;
|
||||||
}
|
}
|
||||||
@@ -481,9 +581,14 @@ const kpiForm = {
|
|||||||
.td-extra {
|
.td-extra {
|
||||||
/*display: none;*/
|
/*display: none;*/
|
||||||
/*opacity: 0;*/
|
/*opacity: 0;*/
|
||||||
|
margin-top: 4px;
|
||||||
transition: opacity 0.3s ease;
|
transition: opacity 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.td-extra i {
|
||||||
|
margin-right: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
.td-extra .edit {
|
.td-extra .edit {
|
||||||
color: #0a84ff;
|
color: #0a84ff;
|
||||||
}
|
}
|
||||||
@@ -502,6 +607,15 @@ const kpiForm = {
|
|||||||
transform: scale(1.2);
|
transform: scale(1.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.td-extra .add {
|
||||||
|
color: rgb(17 24 39);
|
||||||
|
}
|
||||||
|
|
||||||
|
.td-extra .add:hover {
|
||||||
|
color: #0a84ff;
|
||||||
|
transform: scale(1.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ layout("/layouts/platform.html"){
|
|||||||
<search-item label="预算年度">
|
<search-item label="预算年度">
|
||||||
<el-select placeholder="请选择预算年度" v-model="pageForm.outlayManageId"
|
<el-select placeholder="请选择预算年度" v-model="pageForm.outlayManageId"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
filterable @change="">
|
filterable @change="getApplyMoney">
|
||||||
<el-option v-for="item in outlayManageList"
|
<el-option v-for="item in outlayManageList"
|
||||||
:label="item.year"
|
:label="item.year"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
|||||||
@@ -177,6 +177,7 @@ const apply = {
|
|||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
this.formData = clone(applyRow)
|
this.formData = clone(applyRow)
|
||||||
this.$set(this.formData, 'applyTime', this.formData.startTime + '-' + this.formData.endTime)
|
this.$set(this.formData, 'applyTime', this.formData.startTime + '-' + this.formData.endTime)
|
||||||
|
console.log(this.$store.state.user.sex, 'this.$store.state.user.sex');
|
||||||
this.$set(this.formData, 'sex', this.$store.state.user.sex)
|
this.$set(this.formData, 'sex', this.$store.state.user.sex)
|
||||||
await this.queryTimesByDay()
|
await this.queryTimesByDay()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user