|
|
@@ -1,172 +1,129 @@
|
|
|
-<template xmlns="http://www.w3.org/1999/html">
|
|
|
+<template>
|
|
|
<div class="app-container">
|
|
|
- <el-row :gutter="24" >
|
|
|
+ <el-row :gutter="24">
|
|
|
<el-col :span="6">
|
|
|
- <div class="block">
|
|
|
+ <div class="head-container">
|
|
|
<el-date-picker
|
|
|
v-model="yearValue"
|
|
|
type="year" value-format="yyyy" format="yyyy"
|
|
|
- placeholder="选择年查询" size="small" @change="queryPerformanceDate">
|
|
|
+ placeholder="选择年查询" size="small" @change="getData">
|
|
|
</el-date-picker>
|
|
|
- <el-button style="margin-left: 5px;" v-if="false" type="primary" @click="queryPerformanceDate">查询</el-button>
|
|
|
- <el-button style="margin-left: 25px;" type="success" @click="addScoreWin">创建评分</el-button>
|
|
|
+ <el-button type="primary" plain icon="el-icon-plus" style="margin-left: 20px" @click="addScoreWin">创建评分
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
- <div style="margin-top: 15px">
|
|
|
- <el-tree ref="dateTree" node-key="id" :default-expand-all="true" highlight-current :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
|
|
|
+ <div>
|
|
|
+ <el-tree ref="dateTree" node-key="id" :default-expand-all="true" highlight-current :data="data"
|
|
|
+ :props="defaultProps" @node-click="handleNodeClick"></el-tree>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
- <el-col :span="18" >
|
|
|
- <el-header v-show="showFlag">
|
|
|
- <div style="margin-top: 5px;font-size: 16px;font-weight: 700; display: inline-block">{{title}}</div>
|
|
|
- <el-form label-width="120px" style="display: inline-block">
|
|
|
- <el-form-item label="被评分人:" >
|
|
|
- <el-input v-model="editForm.scoreUsers" :readonly="true" style="width: 350px">
|
|
|
- <el-button @click="openUsers1()" icon="el-icon-search" type="primary" slot="append"> </el-button>
|
|
|
- </el-input>
|
|
|
- <el-button style="margin-left: 15px" type="primary" @click="getPerformanceScoreLists">查询</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <div style="display: inline-block;margin-left: 15px">
|
|
|
- <el-button type="success" @click="exportOutPerformanceScore">导出绩效评分</el-button>
|
|
|
- </div>
|
|
|
- </el-header>
|
|
|
- <el-main v-show="showFlag1">
|
|
|
- <el-collapse v-model="activeNames" @change="handleCollapseClick">
|
|
|
- <div v-for="(item,index) in taskDatas" :key="index" >
|
|
|
- <el-collapse-item :name="index" >
|
|
|
- <template slot="title">
|
|
|
- <div>{{index+1}}、
|
|
|
- <span v-if="item.userName.length===2">
|
|
|
- {{item.userName}}
|
|
|
- </span>
|
|
|
- <span v-else>
|
|
|
- {{item.userName}}
|
|
|
- </span>
|
|
|
-
|
|
|
- 本周总计
|
|
|
- <span v-if="item.totalWorkTime<10">
|
|
|
- {{item.totalWorkTime}}
|
|
|
- </span>
|
|
|
- <span v-else>
|
|
|
- {{item.totalWorkTime}}
|
|
|
- </span>
|
|
|
|
|
|
- 工时,任务数量
|
|
|
- <span v-if="item.totalTaskNum<10">
|
|
|
- {{item.totalTaskNum}}
|
|
|
- </span>
|
|
|
- <span v-else>
|
|
|
- {{item.totalTaskNum}}
|
|
|
- </span>
|
|
|
+ <el-col :span="18">
|
|
|
+ <el-form :model="queryParams" :inline="true">
|
|
|
+ <el-form-item>
|
|
|
+ <div style="font-weight: 700">{{ title }}</div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="被评分人:" label-width="120px">
|
|
|
+ <dept-user-tree ref="dut" :userList="userList" :multiple="true" :placeholder="'请选择被评分人'"
|
|
|
+ @selected="(val)=>queryParams.scoreUsers=val" style="width: 350px"></dept-user-tree>
|
|
|
|
|
|
- ,已完成
|
|
|
- <span v-if="item.completeTaskNum<10">
|
|
|
- {{item.completeTaskNum}}
|
|
|
- </span>
|
|
|
- <span v-else>
|
|
|
- {{item.completeTaskNum}}
|
|
|
- </span>
|
|
|
+ <!-- <el-input v-model="editForm.scoreUsers" :readonly="true" style="width: 350px">-->
|
|
|
+ <!-- <el-button @click="openUsers1" icon="el-icon-search" type="primary" slot="append"></el-button>-->
|
|
|
+ <!-- </el-input>-->
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="getPerformanceScoreLists">查询</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button icon="el-icon-download" @click="exportOutPerformanceScore">导出绩效评分</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
|
|
|
+ <el-collapse v-model="activeNames" accordion>
|
|
|
+ <template v-for="(item,index) in taskDatas">
|
|
|
+ <el-collapse-item :name="index">
|
|
|
+ <template slot="title">
|
|
|
+ <div style="display: flex;justify-content:start">
|
|
|
+ <div>{{ index + 1 }}、</div>
|
|
|
+ <div style="width: 100px"> {{ item.userName }}</div>
|
|
|
+ <div>总计工时:</div>
|
|
|
+ <div style="width: 40px;text-align: center;font-weight: 600"> {{ item.totalWorkTime }}</div>
|
|
|
+ <div>小时,任务数量:</div>
|
|
|
+ <div style="width: 30px;text-align: center;font-weight: 600">{{ item.totalTaskNum }}</div>
|
|
|
+ <div> ,已完成</div>
|
|
|
+ <div style="width: 30px;text-align: center;font-weight: 600">{{ item.completeTaskNum }}</div>
|
|
|
</div>
|
|
|
- <div style="margin-left: 200px; width: 350px">
|
|
|
-
|
|
|
+ <div style="margin-left: 100px">
|
|
|
评分:
|
|
|
- <el-input-number size="mini" v-model="item.workScore" :min="0" :max="10" :step="0.5" :precision="2" style="width: 150px" @change="userWorkScore(item,index)">
|
|
|
- <el-button v-if="false" size="mini" type="primary" slot="append" @click="userWorkScore(item)">评分</el-button>
|
|
|
+ <el-input-number size="mini" v-model="item.workScore" :min="0" :max="10" :step="0.1" :precision="2"
|
|
|
+ :controls="false" style="width: 100px" @change="userWorkScore(item,index)">
|
|
|
+ <el-button v-if="false" size="mini" type="primary" slot="append" @click="userWorkScore(item)">评分
|
|
|
+ </el-button>
|
|
|
</el-input-number>
|
|
|
-
|
|
|
</div>
|
|
|
+
|
|
|
</template>
|
|
|
|
|
|
- <el-table :data="item.tasks" style="width: 100%" stripe>
|
|
|
- <el-table-column label="序号" width="60" type="index"></el-table-column>
|
|
|
- <el-table-column prop="taskName" label="任务名称" width="250" :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <el-table :data="item.tasks" size="mini">
|
|
|
+ <el-table-column label="序号" width="50" type="index"></el-table-column>
|
|
|
+ <el-table-column prop="taskName" label="任务名称" width="250"
|
|
|
+ :show-overflow-tooltip="true"></el-table-column>
|
|
|
<el-table-column prop="remark" label="任务详情" :show-overflow-tooltip="true">
|
|
|
<template slot-scope="scope">
|
|
|
<div v-html="scope.row.description"></div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="times" label="开始结束时间" width="180">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>{{scope.row.beginDate}}-{{scope.row.endDate}}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="usedWorkTime" label="已用工时" width="80">
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column prop="beginDate" label="开始时间" width="100"/>
|
|
|
+ <el-table-column prop="endDate" label="结束时间" width="100"/>
|
|
|
+ <el-table-column prop="usedWorkTime" label="已用工时" width="80"/>
|
|
|
<el-table-column prop="taskStatus" label="任务状态" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <div v-if="scope.row.taskStatus==='4'" style="color: green">
|
|
|
- 已完成
|
|
|
- </div>
|
|
|
- <div v-else style="color: red">
|
|
|
- 进行中
|
|
|
- </div>
|
|
|
+ <el-tag size="mini" :type="statusMap[scope.row.taskStatus].type">
|
|
|
+ {{ statusMap[scope.row.taskStatus].name }}
|
|
|
+ </el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</el-collapse-item>
|
|
|
- <br>
|
|
|
- </div>
|
|
|
- </el-collapse>
|
|
|
- </el-main>
|
|
|
+ </template>
|
|
|
+ </el-collapse>
|
|
|
+
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
<!--评分日期规则-->
|
|
|
- <el-dialog title="创建评分日期规则" :visible.sync="editFormVisible" center width="30%" @click="closeDialog" :close-on-click-modal="false">
|
|
|
- <el-form label-width="120px" ref="editForm" :model="editForm" size="mini">
|
|
|
+ <el-dialog title="创建评分日期规则" :visible.sync="editFormVisible" center width="400px" @click="closeDialog"
|
|
|
+ :close-on-click-modal="false">
|
|
|
+ <el-form label-width="100px" ref="editForm" :model="editForm" :rules="rules" size="mini">
|
|
|
<el-form-item label="评分名称:" prop="name">
|
|
|
- <el-input size="mini" v-model="editForm.name" placeholder="" style="width: 250px"></el-input>
|
|
|
+ <el-input size="mini" v-model="editForm.name" placeholder="" style="width: 220px"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="评分方式:">
|
|
|
+ <el-form-item label="评分类型:" prop="scoreType">
|
|
|
<el-radio v-model="editForm.scoreType" label="0">周度评分</el-radio>
|
|
|
<el-radio v-model="editForm.scoreType" label="1">月度评分</el-radio>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="被评分人:" v-if="false">
|
|
|
- <el-input type="textarea" autosize size="mini" v-model="editForm.scoreUsers" :readonly="true" style="width: 250px">
|
|
|
- </el-input>
|
|
|
- <el-button @click="openUsers1()" style="margin-left: 5px;" icon="el-icon-search" type="primary"></el-button>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="评分年月:">
|
|
|
- <el-select style="width: 250px" size="mini" clearable filterable v-model="editForm.dateId" placeholder="请选择评分年月">
|
|
|
- <el-option v-for="(item,index) in dateDatas" :key="index" :label="item.year+'年'+item.month+'月'" :value="item.id"></el-option>
|
|
|
- </el-select>
|
|
|
+ <el-form-item label="评分年月:" prop="yearMonth">
|
|
|
+ <el-date-picker v-model="editForm.yearMonth"
|
|
|
+ type="month" value-format="yyyy-MM" format="yyyy-MM">
|
|
|
+ </el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="开始日期:">
|
|
|
+
|
|
|
+ <el-form-item label="开始日期:" prop="beginDate">
|
|
|
<el-date-picker v-model="editForm.beginDate" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd"
|
|
|
- placeholder="请选择评分开始日期" style="width: 250px">
|
|
|
+ placeholder="请选择评分开始日期">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="结束日期:">
|
|
|
+ <el-form-item label="结束日期:" prop="endDate">
|
|
|
<el-date-picker v-model="editForm.endDate" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd"
|
|
|
- placeholder="请选择评分结束日期" style="width: 250px">
|
|
|
+ placeholder="请选择评分结束日期">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button size="mini" @click="closeDialog">取消</el-button>
|
|
|
- <el-button size="mini" type="primary" class="title" @click="submitForm()">保存</el-button>
|
|
|
+ <el-button size="mini" type="primary" class="title" @click="submitForm">保存</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog title="选择人员" :visible.sync="users1Visble" width="30%" @click="closeUser1Dialog"
|
|
|
- :close-on-click-modal="false">
|
|
|
- <el-input placeholder="输入关键字进行过滤" v-model="filterText">
|
|
|
- </el-input>
|
|
|
- <el-tree
|
|
|
- ref="dept1"
|
|
|
- :data="userList"
|
|
|
- node-key="id"
|
|
|
- :props="{label:'name'}"
|
|
|
- :default-expand-all="false"
|
|
|
- show-checkbox
|
|
|
- :filter-node-method="filterNode">
|
|
|
- </el-tree>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button size="mini" @click="closeUser1Dialog">取消</el-button>
|
|
|
- <el-button size="mini" type="primary" class="title" @click="submitUser1Form('editForm')">确定</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -175,13 +132,18 @@ import {
|
|
|
addPerformanceScoreSet, editPerformanceScore,
|
|
|
getDateDataList,
|
|
|
getDateListByYear,
|
|
|
- getPerformanceScoreList
|
|
|
+ getPerformanceScoreList,
|
|
|
+ exportPerformanceScore
|
|
|
} from '@/api/performance/performance'
|
|
|
-import { getDeptUserTree } from '@/api/system/user'
|
|
|
-import { exportPerformanceScore } from '@/api/file/file'
|
|
|
+import {getDeptUserTree} from '@/api/system/user'
|
|
|
+import task from "@/views/mixins/task";
|
|
|
+import DateUtil from '@/utils/date'
|
|
|
+import DeptUserTree from "@/components/DeptUserTree"
|
|
|
|
|
|
export default {
|
|
|
name: 'performance',
|
|
|
+ mixins: [task],
|
|
|
+ components: {DeptUserTree},
|
|
|
watch: {
|
|
|
filterText(val) {
|
|
|
this.$refs.dept1.filter(val);
|
|
|
@@ -189,41 +151,52 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- yearValue:'2024',
|
|
|
- editFormVisible:false,
|
|
|
- activeNames: ['1'],
|
|
|
- title:'',
|
|
|
- editForm:{
|
|
|
- id:null,
|
|
|
- name:'',
|
|
|
- scoreType:'0',
|
|
|
- scoreUsers:null,
|
|
|
- scoreUserss:null,
|
|
|
- beginDate:null,
|
|
|
- endDate:null,
|
|
|
- dateId:null,
|
|
|
- year:null,
|
|
|
- month:null
|
|
|
+ yearValue: DateUtil.year(),
|
|
|
+ editFormVisible: false,
|
|
|
+ activeNames: undefined,
|
|
|
+ title: '',
|
|
|
+ editForm: {
|
|
|
+ id: null,
|
|
|
+ name: '',
|
|
|
+ scoreType: '0',
|
|
|
+ yearMonth: null,
|
|
|
+ beginDate: null,
|
|
|
+ endDate: null,
|
|
|
+ dateSetId: null,
|
|
|
+ year: null,
|
|
|
+ month: null
|
|
|
},
|
|
|
- searchForm:{
|
|
|
- beginDate:null,
|
|
|
- endDate:null,
|
|
|
- dateId:null,
|
|
|
+ queryParams: {
|
|
|
+ scoreSetId: undefined,
|
|
|
+ scoreUsers: undefined
|
|
|
},
|
|
|
- users1Visble:false,
|
|
|
- filterText: '',
|
|
|
- userList:[],
|
|
|
- dateDatas:[],
|
|
|
- monthDatas:[],
|
|
|
+
|
|
|
+ userList: [],
|
|
|
data: [],
|
|
|
- showFlag:false,
|
|
|
- showFlag1:false,
|
|
|
defaultProps: {
|
|
|
- id:'id',
|
|
|
+ id: 'id',
|
|
|
children: 'children',
|
|
|
label: 'label'
|
|
|
},
|
|
|
- taskDatas:[]
|
|
|
+ taskDatas: [],
|
|
|
+
|
|
|
+ rules: {
|
|
|
+ name: [
|
|
|
+ {required: true, message: "评分名称不能为空", trigger: "blur"}
|
|
|
+ ],
|
|
|
+ scoreType: [
|
|
|
+ {required: true, message: "评分类型不能为空", trigger: "change"}
|
|
|
+ ],
|
|
|
+ yearMonth: [
|
|
|
+ {required: true, message: "评分年月不能为空", trigger: "blur"}
|
|
|
+ ],
|
|
|
+ beginDate: [
|
|
|
+ {required: true, message: "开始日期不能为空", trigger: "blur"}
|
|
|
+ ],
|
|
|
+ endDate: [
|
|
|
+ {required: true, message: "结束日期不能为空", trigger: "blur"}
|
|
|
+ ]
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -231,237 +204,154 @@ export default {
|
|
|
this.getData()
|
|
|
},
|
|
|
methods: {
|
|
|
- getUsers(){
|
|
|
+ getUsers() {
|
|
|
getDeptUserTree('1').then(res => {
|
|
|
this.userList = res.data
|
|
|
});
|
|
|
},
|
|
|
- getData(){
|
|
|
- let year=this.yearValue
|
|
|
- getDateListByYear(year).then(res =>{
|
|
|
- this.data=res.data
|
|
|
- if(this.data.length>0){
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.dateTree.setCurrentKey(this.data[0].children[0].children[0].id)
|
|
|
- })
|
|
|
- }
|
|
|
- this.handleDefaultNodeClick(this.data)
|
|
|
+ getData() {
|
|
|
+ let year = this.yearValue
|
|
|
+ getDateListByYear(year).then(res => {
|
|
|
+ this.data = res.data
|
|
|
+ // if (this.data.length > 0) {
|
|
|
+ // this.$nextTick(() => {
|
|
|
+ // this.$refs.dateTree.setCurrentKey(this.data[0].children[0].children[0].id)
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // this.handleDefaultNodeClick(this.data)
|
|
|
});
|
|
|
},
|
|
|
- handleDefaultNodeClick(data){
|
|
|
- let d=data;
|
|
|
- if(data.length>0){
|
|
|
- d=data[0];
|
|
|
- this.showFlag=true
|
|
|
- this.showFlag1=true
|
|
|
- this.title=d.children[0].children[0].label
|
|
|
- }else{
|
|
|
- this.showFlag=false
|
|
|
- this.showFlag1=false
|
|
|
- this.title=''
|
|
|
-
|
|
|
+ handleDefaultNodeClick(data) {
|
|
|
+ let d = data;
|
|
|
+ if (data.length > 0) {
|
|
|
+ d = data[0];
|
|
|
+ this.title = d.children[0].children[0].label
|
|
|
+ } else {
|
|
|
+ this.title = ''
|
|
|
}
|
|
|
},
|
|
|
handleNodeClick(data, n, component) {
|
|
|
- let node = this.$refs.dateTree.getCurrentNode();
|
|
|
- if(node.json===null || node.json===''){
|
|
|
-
|
|
|
- }else{
|
|
|
- this.title=node.label
|
|
|
- this.showFlag1=false
|
|
|
+ if (!data.json) {
|
|
|
+ this.queryParams.scoreSetId = undefined
|
|
|
+ return
|
|
|
}
|
|
|
-
|
|
|
+ if (this.queryParams.scoreSetId === data.id) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.queryParams.scoreSetId = data.id
|
|
|
+ this.title = data.label
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.taskDatas = []
|
|
|
+ })
|
|
|
},
|
|
|
- queryPerformanceDate(){
|
|
|
- let year=this.yearValue
|
|
|
+
|
|
|
+ addScoreWin() {
|
|
|
this.getData()
|
|
|
+ this.editFormVisible = true;
|
|
|
},
|
|
|
- addScoreWin(){
|
|
|
- this.getDateDataLists();
|
|
|
- this.editForm.scoreUsers = null
|
|
|
- this.editForm.scoreUserss = null
|
|
|
- this.editFormVisible=true;
|
|
|
- },
|
|
|
- closeDialog(){
|
|
|
- this.editFormVisible=false;
|
|
|
- },
|
|
|
- getDateDataLists(){
|
|
|
- getDateDataList().then(res=>{
|
|
|
- this.dateDatas=res.data
|
|
|
- let data=res.data
|
|
|
- let currentDate = new Date();
|
|
|
- let currentYear = currentDate.getFullYear();
|
|
|
- let currentMonth = currentDate.getMonth() + 1;
|
|
|
- for(let i=0;i<data.length;i++){
|
|
|
- let d=data[i]
|
|
|
- if(d.year===currentYear && d.month===currentMonth){
|
|
|
- this.editForm.dateId=d.id;
|
|
|
- this.editForm.year=d.year
|
|
|
- this.editForm.month=d.month
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ closeDialog() {
|
|
|
+ this.editForm = {
|
|
|
+ id: null,
|
|
|
+ name: '',
|
|
|
+ scoreType: '0',
|
|
|
+ yearMonth: null,
|
|
|
+ beginDate: null,
|
|
|
+ endDate: null,
|
|
|
+ dateSetId: null,
|
|
|
+ year: null,
|
|
|
+ month: null
|
|
|
+ }
|
|
|
+ this.resetForm("editForm");
|
|
|
+ this.editFormVisible = false;
|
|
|
},
|
|
|
openUsers1() {
|
|
|
- this.users1Visble = true
|
|
|
+ this.users1Visible = true
|
|
|
},
|
|
|
- closeUser1Dialog(){
|
|
|
- this.users1Visble = false
|
|
|
+ closeUser1Dialog() {
|
|
|
+ this.users1Visible = false
|
|
|
},
|
|
|
- submitUser1Form() {
|
|
|
- //获取选中的节点
|
|
|
- let node = this.$refs.dept1.getCheckedNodes();
|
|
|
- if (node == undefined || node == null || node.length === 0) {
|
|
|
- this.$message({
|
|
|
- message: '请选择人员数据!',
|
|
|
- type: 'warning'
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- let userList = []
|
|
|
- let userName = ''
|
|
|
- let saveUsers = []
|
|
|
- node.forEach(item => {
|
|
|
- if (item.type === 'u') {
|
|
|
- userList.push(item);
|
|
|
- userName += item.name + '、';
|
|
|
- saveUsers.push({
|
|
|
- id: item.id,
|
|
|
- name: item.name
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- userName = userName.substring(0, userName.length - 1);
|
|
|
- if (userList.length === 0) {
|
|
|
- this.$message({
|
|
|
- message: '请选择人员!',
|
|
|
- type: 'warning'
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- this.editForm.scoreUsers = userName
|
|
|
- this.editForm.scoreUserss = saveUsers
|
|
|
- this.closeUser1Dialog();
|
|
|
- },
|
|
|
- submitForm(){
|
|
|
+ submitForm() {
|
|
|
let editForm = this.editForm
|
|
|
- let name=editForm.name
|
|
|
- if(name===null || name===''){
|
|
|
- this.$message.warning("请输入评分名称!")
|
|
|
- return
|
|
|
- }
|
|
|
- /* let scoreUsers=editForm.scoreUsers
|
|
|
- if(scoreUsers===null || scoreUsers===''){
|
|
|
- this.$message.warning("请选择被评分人员!")
|
|
|
- return
|
|
|
- } */
|
|
|
- let dateId=editForm.dateId
|
|
|
- if(dateId===null){
|
|
|
- this.$message.warning("请选择评分年月!")
|
|
|
- return
|
|
|
- }
|
|
|
- let beginDate=editForm.beginDate
|
|
|
- if(beginDate===null || beginDate===''){
|
|
|
- this.$message.warning("请选择评分开始日期!")
|
|
|
- return
|
|
|
- }
|
|
|
- let endDate=editForm.endDate
|
|
|
- if(endDate===null || endDate===''){
|
|
|
- this.$message.warning("请选择评分结束日期!")
|
|
|
- return
|
|
|
- }
|
|
|
//提交表单
|
|
|
- addPerformanceScoreSet(editForm).then(res=>{
|
|
|
+ addPerformanceScoreSet(editForm).then(res => {
|
|
|
this.$message.success("操作成功!")
|
|
|
- this.editFormVisible=false;
|
|
|
- this.editForm.scoreUsers = null
|
|
|
- this.editForm.scoreUserss = null
|
|
|
+ this.closeDialog()
|
|
|
this.getData()
|
|
|
});
|
|
|
-
|
|
|
},
|
|
|
- filterNode(value, data) {
|
|
|
- if (!value) {
|
|
|
- return true
|
|
|
- };
|
|
|
- return data.name.indexOf(value) !== -1;
|
|
|
- },
|
|
|
- exportOutPerformanceScore(){
|
|
|
- let node = this.$refs.dateTree.getCurrentNode();
|
|
|
- if(node.json===undefined || node.json===null || node.json===''){
|
|
|
- this.$message.error("请选择带有时间段的节点数据!")
|
|
|
- return
|
|
|
- }
|
|
|
- let json=JSON.parse(node.json)
|
|
|
- let beginDate=json.beginDate
|
|
|
- let date=beginDate
|
|
|
- window.location.href=exportPerformanceScore(date)
|
|
|
- //exportPerformanceScore(date);
|
|
|
|
|
|
+ exportOutPerformanceScore() {
|
|
|
+ // let node = this.$refs.dateTree.getCurrentNode();
|
|
|
+ // if (node.json === undefined || node.json === null || node.json === '') {
|
|
|
+ // this.$message.error("请选择带有时间段的节点数据!")
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ if (!this.queryParams.scoreSetId) {
|
|
|
+ this.$message.error("请选择评分日期!")
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // if (!this.queryParams.scoreUsers) {
|
|
|
+ // this.$message.error("请选择被评分人!")
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ let data = {
|
|
|
+ scoreSetId: this.queryParams.scoreSetId,
|
|
|
+ userIdStr: this.queryParams.scoreUsers.join(',')
|
|
|
+ }
|
|
|
+ exportPerformanceScore(data);
|
|
|
},
|
|
|
- handleCollapseClick(){
|
|
|
- let a= event.target.tagName.toUpperCase();
|
|
|
- if(a==='|' || a==='INPUT' ){
|
|
|
- event.stop()
|
|
|
- }
|
|
|
|
|
|
- },
|
|
|
- userWorkScore(row,index){
|
|
|
+ userWorkScore(row, index) {
|
|
|
let node = this.$refs.dateTree.getCurrentNode();
|
|
|
- let dateId=node.id
|
|
|
- let score=row.workScore
|
|
|
- if(score===undefined || score===null){
|
|
|
+ let scoreSetId = node.id
|
|
|
+ let score = row.workScore
|
|
|
+ if (score === undefined || score === null) {
|
|
|
this.$message.error('请输入评分!')
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- let id=row.workScoreId
|
|
|
- if(id===undefined){
|
|
|
- id=null;
|
|
|
+ let id = row.workScoreId
|
|
|
+ if (id === undefined) {
|
|
|
+ id = null;
|
|
|
}
|
|
|
- let data={
|
|
|
- id:id,
|
|
|
- userId:row.userId,
|
|
|
- userName:row.userName,
|
|
|
- score:score,
|
|
|
- dataId:dateId
|
|
|
+ let data = {
|
|
|
+ id: id,
|
|
|
+ userId: row.userId,
|
|
|
+ userName: row.userName,
|
|
|
+ score: score,
|
|
|
+ scoreSetId: scoreSetId
|
|
|
}
|
|
|
- editPerformanceScore(data).then(res=>{
|
|
|
+ editPerformanceScore(data).then(res => {
|
|
|
this.$message.success('操作成功!')
|
|
|
this.getPerformanceScoreLists()
|
|
|
});
|
|
|
},
|
|
|
- getPerformanceScoreLists(){
|
|
|
- let node = this.$refs.dateTree.getCurrentNode();
|
|
|
- let title=this.title
|
|
|
- if(node===undefined || node===null || title===''){
|
|
|
- this.$message.error("请选择查询评分日期!")
|
|
|
- return
|
|
|
- }
|
|
|
- if(node.json===undefined || node.json===null || node.json===''){
|
|
|
- this.$message.error("请选择正确的评分节点!")
|
|
|
- return
|
|
|
+ getPerformanceScoreLists() {
|
|
|
+ if (!this.queryParams.scoreSetId) {
|
|
|
+ this.$message.error("请选择评分日期!")
|
|
|
+ return;
|
|
|
}
|
|
|
+ let node = this.$refs.dateTree.getCurrentNode();
|
|
|
|
|
|
- let peoples=this.editForm.scoreUserss
|
|
|
- if(peoples===null || peoples===''){
|
|
|
- this.$message.error("请选择被评分的人!")
|
|
|
+ // if (node.json === undefined || node.json === null || node.json === '') {
|
|
|
+ // this.$message.error("请选择正确的评分节点!")
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ if (!this.queryParams.scoreUsers) {
|
|
|
+ this.$message.error("请选择被评分人!")
|
|
|
return
|
|
|
}
|
|
|
- let json=JSON.parse(node.json)
|
|
|
- let beginDate=json.beginDate
|
|
|
- let endDate=json.endDate
|
|
|
- let dateId=node.id
|
|
|
- let searchParam={
|
|
|
- dataId:dateId,
|
|
|
- beginDate:beginDate,
|
|
|
- endDate:endDate,
|
|
|
- users:peoples
|
|
|
+ let json = JSON.parse(node.json)
|
|
|
+ let beginDate = json.beginDate
|
|
|
+ let endDate = json.endDate
|
|
|
+ let searchParam = {
|
|
|
+ scoreSetId: this.queryParams.scoreSetId,
|
|
|
+ beginDate: beginDate,
|
|
|
+ endDate: endDate,
|
|
|
+ userIds: this.queryParams.scoreUsers
|
|
|
}
|
|
|
- this.showFlag=true
|
|
|
- this.showFlag1=true
|
|
|
- getPerformanceScoreList(searchParam).then(res=>{
|
|
|
- this.taskDatas=res.data
|
|
|
+ getPerformanceScoreList(searchParam).then(res => {
|
|
|
+ this.taskDatas = res.data
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
@@ -469,5 +359,9 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
-
|
|
|
+.head-container {
|
|
|
+ display: flex;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
</style>
|