|
@@ -2,36 +2,18 @@
|
|
|
<div>
|
|
|
<div class="diy_tip_bg" v-show="tips_show">
|
|
|
<el-alert class="diy-tip" @close="tips_close" type="success" description>
|
|
|
- <p>
|
|
|
- <b
|
|
|
- >阶段排名可通过月、季、年
|
|
|
- 3个时间段,利用不同的部门范围和积分筛选条件,从各个维度作积分对比和评优</b
|
|
|
- >
|
|
|
- </p>
|
|
|
- <li class="headLi">
|
|
|
- 阶段排名包含申请、奖扣、任务、审批、考勤、管理者奖扣目标、自动积分等来源的积分
|
|
|
- </li>
|
|
|
+ <p><b>阶段排名可通过月、季、年 3个时间段,利用不同的部门范围和积分筛选条件,从各个维度作积分对比和评优</b></p>
|
|
|
+ <li class="headLi">阶段排名包含申请、奖扣、任务、审批、考勤、管理者奖扣目标、自动积分等来源的积分</li>
|
|
|
<li class="headLi">阶段排名不包含基础分和工龄分</li>
|
|
|
- <li class="headLi">
|
|
|
- 导出时,额外支持自定义时间段排名、自动积分排名的导出(考勤相关排名请到【考勤】-【考勤分排名】导出)
|
|
|
- </li>
|
|
|
+ <!-- <li class="headLi">导出时,额外支持自定义时间段排名、自动积分排名的导出(考勤相关排名请到【考勤】-【考勤分排名】导出)</li> -->
|
|
|
</el-alert>
|
|
|
</div>
|
|
|
<div class="manager_statistics_box">
|
|
|
<el-form :inline="true">
|
|
|
<el-form-item label="时间">
|
|
|
<el-col :span="8">
|
|
|
- <el-select
|
|
|
- v-model="time_type"
|
|
|
- placeholder="请选择分类"
|
|
|
- style="width: 100px;"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in time_types"
|
|
|
- :key="item.label"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- ></el-option>
|
|
|
+ <el-select v-model="time_type" placeholder="请选择分类" style="width: 100px;">
|
|
|
+ <el-option v-for="item in time_types" :key="item.label" :label="item.label" :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-col>
|
|
|
|
|
@@ -53,22 +35,12 @@
|
|
|
placeholder="选择月份排名"
|
|
|
></el-date-picker>
|
|
|
|
|
|
- <season
|
|
|
- v-if="time_type == '3'"
|
|
|
- :isActive="true"
|
|
|
- class="date-picker-width"
|
|
|
- @confirm="export_quarter_confirm"
|
|
|
- ></season>
|
|
|
+ <season v-if="time_type == '3'" :isActive="true" class="date-picker-width" @confirm="export_quarter_confirm"></season>
|
|
|
</el-col>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="部门">
|
|
|
- <deptData
|
|
|
- deptStyle="height:24px;line-height:24px;margin-top:7px;"
|
|
|
- v-if="toPdept && toPdept != 0"
|
|
|
- :refsName="$refs.dept"
|
|
|
- :toPdept="toPdept"
|
|
|
- ></deptData>
|
|
|
+ <deptData deptStyle="height:24px;line-height:24px;margin-top:7px;" v-if="toPdept && toPdept != 0" :refsName="$refs.dept" :toPdept="toPdept"></deptData>
|
|
|
<el-cascader
|
|
|
class="date-picker-width"
|
|
|
v-model="dept_name"
|
|
@@ -81,12 +53,7 @@
|
|
|
placeholder="全公司"
|
|
|
>
|
|
|
<template slot-scope="{ node, data }">
|
|
|
- <span>
|
|
|
- <WWOpenData
|
|
|
- type="departmentName"
|
|
|
- :openid="data.name"
|
|
|
- ></WWOpenData>
|
|
|
- </span>
|
|
|
+ <span><WWOpenData type="departmentName" :openid="data.name"></WWOpenData></span>
|
|
|
<!-- <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span> -->
|
|
|
</template>
|
|
|
</el-cascader>
|
|
@@ -104,52 +71,19 @@
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="积分类型">
|
|
|
- <el-select
|
|
|
- v-model="formData.pt_id"
|
|
|
- clearable
|
|
|
- placeholder="请选择积分类型"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in point_type"
|
|
|
- :key="item.id"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"
|
|
|
- v-if="item.code != 'JX'"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
+ <el-select v-model="formData.pt_id" clearable placeholder="请选择积分类型">
|
|
|
+ <el-option v-for="item in point_type" :key="item.id" :label="item.name" :value="item.id" v-if="item.code != 'JX'"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="谁不参与排名" class="takePartInno">
|
|
|
- <div
|
|
|
- v-if="dropOuOfPerson.length > 0"
|
|
|
- class="dropOuOfPerson"
|
|
|
- @click="takePartInno"
|
|
|
- >
|
|
|
- <WWOpenData
|
|
|
- type="userName"
|
|
|
- :openid="dropOuOfPerson[0].currentLabel"
|
|
|
- ></WWOpenData
|
|
|
- ><span v-if="dropOuOfPerson.length > 1"
|
|
|
- > +{{ dropOuOfPerson.length - 1 }}</span
|
|
|
- >
|
|
|
+ <div v-if="dropOuOfPerson.length > 0" class="dropOuOfPerson" @click="takePartInno">
|
|
|
+ <WWOpenData type="userName" :openid="dropOuOfPerson[0].currentLabel"></WWOpenData>
|
|
|
+ <span v-if="dropOuOfPerson.length > 1"> +{{ dropOuOfPerson.length - 1 }}</span>
|
|
|
</div>
|
|
|
- <el-select
|
|
|
- ref="dropOuOfonref"
|
|
|
- v-model="formData.exclusion"
|
|
|
- multiple
|
|
|
- collapse-tags
|
|
|
- placeholder="请选择员工"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in employee_map"
|
|
|
- :key="item.id"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"
|
|
|
- >
|
|
|
- <span style="float: left"
|
|
|
- ><WWOpenData type="userName" :openid="item.name"></WWOpenData
|
|
|
- ></span>
|
|
|
+ <el-select ref="dropOuOfonref" v-model="formData.exclusion" multiple collapse-tags placeholder="请选择员工">
|
|
|
+ <el-option v-for="item in employee_map" :key="item.id" :label="item.name" :value="item.id">
|
|
|
+ <span style="float: left"><WWOpenData type="userName" :openid="item.name"></WWOpenData></span>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -170,41 +104,19 @@
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="人员">
|
|
|
- <el-select
|
|
|
- v-model="formData.position"
|
|
|
- style="width:150px"
|
|
|
- placeholder="请选择"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in positions"
|
|
|
- :key="item.id"
|
|
|
- :label="item.name"
|
|
|
- :value="item.age"
|
|
|
- ></el-option>
|
|
|
+ <el-select v-model="formData.position" style="width:150px" placeholder="请选择">
|
|
|
+ <el-option v-for="item in positions" :key="item.id" :label="item.name" :value="item.age"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item>
|
|
|
- <el-checkbox
|
|
|
- v-model="sort"
|
|
|
- size="medium"
|
|
|
- label="排名由低到高"
|
|
|
- border
|
|
|
- ></el-checkbox>
|
|
|
- <el-button type="primary" @click="selectBtn" style="margin-left:20px"
|
|
|
- >查询</el-button
|
|
|
- >
|
|
|
+ <el-checkbox v-model="sort" size="medium" label="排名由低到高" border></el-checkbox>
|
|
|
+ <el-button type="primary" @click="selectBtn" style="margin-left:20px">查询</el-button>
|
|
|
</el-form-item>
|
|
|
|
|
|
<br />
|
|
|
<el-form-item>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- @click="dialogVisibles"
|
|
|
- :disabled="deriveDis"
|
|
|
- >导出排名</el-button
|
|
|
- >
|
|
|
+ <!-- <el-button type="primary" plain @click="dialogVisibles" :disabled="deriveDis">导出排名</el-button> -->
|
|
|
<a :href="aherfUrl" ref="aherfClick"></a>
|
|
|
<!-- <el-button type="primary" plain @click="byRanking">轮播排名</el-button> -->
|
|
|
</el-form-item>
|
|
@@ -213,47 +125,19 @@
|
|
|
<el-table :data="list" style="width: 100%" v-loading="loading">
|
|
|
<el-table-column label="名次" width="80" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <img
|
|
|
- v-if="scope.row.rank === 1"
|
|
|
- src="static/images/statistics_NO1.png"
|
|
|
- alt
|
|
|
- />
|
|
|
- <img
|
|
|
- v-if="scope.row.rank === 2"
|
|
|
- src="static/images/statistics_NO2.png"
|
|
|
- alt
|
|
|
- />
|
|
|
- <img
|
|
|
- v-if="scope.row.rank === 3"
|
|
|
- src="static/images/statistics_NO3.png"
|
|
|
- alt
|
|
|
- />
|
|
|
+ <img v-if="scope.row.rank === 1" src="static/images/statistics_NO1.png" alt />
|
|
|
+ <img v-if="scope.row.rank === 2" src="static/images/statistics_NO2.png" alt />
|
|
|
+ <img v-if="scope.row.rank === 3" src="static/images/statistics_NO3.png" alt />
|
|
|
<span v-if="scope.row.rank > 3">{{ scope.row.rank }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="姓名" align="left">
|
|
|
<template slot-scope="scope">
|
|
|
- <userImage
|
|
|
- class="fl"
|
|
|
- :id="scope.row.employee_id"
|
|
|
- :user_name="scope.row.employee_name"
|
|
|
- :img_url="scope.row.employee_img_url"
|
|
|
- width="50px"
|
|
|
- height="50px"
|
|
|
- ></userImage>
|
|
|
- <span style="line-height: 50px; padding-left: 10px;"
|
|
|
- ><WWOpenData
|
|
|
- type="userName"
|
|
|
- :openid="scope.row.employee_name"
|
|
|
- ></WWOpenData
|
|
|
- ></span>
|
|
|
+ <userImage class="fl" :id="scope.row.employee_id" :user_name="scope.row.employee_name" :img_url="scope.row.employee_img_url" width="50px" height="50px"></userImage>
|
|
|
+ <span style="line-height: 50px; padding-left: 10px;"><WWOpenData type="userName" :openid="scope.row.employee_name"></WWOpenData></span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- :label="typeName"
|
|
|
- align="left"
|
|
|
- prop="point"
|
|
|
- ></el-table-column>
|
|
|
+ <el-table-column :label="typeName" align="left" prop="point"></el-table-column>
|
|
|
<template slot="empty">
|
|
|
<div class="nopoint_box">
|
|
|
<div class="noimg noperson"></div>
|
|
@@ -276,9 +160,7 @@
|
|
|
</div>
|
|
|
<!-- 导出弹窗 -->
|
|
|
<el-dialog title="导出排名" :visible.sync="dialogVisible" width="730px">
|
|
|
- <div style="font-size:15px;margin-top:20px;">
|
|
|
- 系统将按以下已选条件导出对应的排名报表
|
|
|
- </div>
|
|
|
+ <div style="font-size:15px;margin-top:20px;">系统将按以下已选条件导出对应的排名报表</div>
|
|
|
<el-form :inline="true">
|
|
|
<div class="picker_er">
|
|
|
<el-form-item label="时间">
|
|
@@ -294,27 +176,13 @@
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="人员" style="margin-left:30px">
|
|
|
- <el-select
|
|
|
- v-model="Dc_Data.DC_position"
|
|
|
- style="width:150px"
|
|
|
- placeholder="请选择"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in positions"
|
|
|
- :key="item.id"
|
|
|
- :label="item.name"
|
|
|
- :value="item.age"
|
|
|
- ></el-option>
|
|
|
+ <el-select v-model="Dc_Data.DC_position" style="width:150px" placeholder="请选择">
|
|
|
+ <el-option v-for="item in positions" :key="item.id" :label="item.name" :value="item.age"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<el-form-item label="部门">
|
|
|
- <deptData
|
|
|
- deptStyle="height:24px;line-height:24px;margin-top:7px;"
|
|
|
- v-if="toPdept2 && toPdept2 != 0"
|
|
|
- :refsName="$refs.dept2"
|
|
|
- :toPdept="toPdept2"
|
|
|
- ></deptData>
|
|
|
+ <deptData deptStyle="height:24px;line-height:24px;margin-top:7px;" v-if="toPdept2 && toPdept2 != 0" :refsName="$refs.dept2" :toPdept="toPdept2"></deptData>
|
|
|
<el-cascader
|
|
|
class="date-picker-width cascader_bm"
|
|
|
v-model="Dc_Data.dept_name"
|
|
@@ -327,30 +195,15 @@
|
|
|
placeholder="全公司"
|
|
|
>
|
|
|
<template slot-scope="{ node, data }">
|
|
|
- <span>
|
|
|
- <WWOpenData
|
|
|
- type="departmentName"
|
|
|
- :openid="data.name"
|
|
|
- ></WWOpenData>
|
|
|
- </span>
|
|
|
+ <span><WWOpenData type="departmentName" :openid="data.name"></WWOpenData></span>
|
|
|
<!-- <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span> -->
|
|
|
</template>
|
|
|
</el-cascader>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item style="margin-left:20px">
|
|
|
- <el-select
|
|
|
- v-model="newTaskFormType"
|
|
|
- style="width:110px;"
|
|
|
- filterable
|
|
|
- placeholder="请选择"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in pullrow"
|
|
|
- :key="item.id"
|
|
|
- :label="item.value"
|
|
|
- :value="item.id"
|
|
|
- ></el-option>
|
|
|
+ <el-select v-model="newTaskFormType" style="width:110px;" filterable placeholder="请选择">
|
|
|
+ <el-option v-for="item in pullrow" :key="item.id" :label="item.value" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
@@ -447,34 +300,34 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { getToken } from "@/utils/auth";
|
|
|
-import moment from "moment";
|
|
|
-import season from "@/components/season";
|
|
|
+import { getToken } from '@/utils/auth';
|
|
|
+import moment from 'moment';
|
|
|
+import season from '@/components/season';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
newTaskFormType: 1,
|
|
|
pullrow: [
|
|
|
{
|
|
|
- value: "规则分类",
|
|
|
+ value: '规则分类',
|
|
|
id: 1
|
|
|
},
|
|
|
{
|
|
|
- value: "自动积分",
|
|
|
+ value: '自动积分',
|
|
|
id: 2
|
|
|
}
|
|
|
],
|
|
|
- titleVals: "",
|
|
|
+ titleVals: '',
|
|
|
titleVal: {
|
|
|
- titleVal1: "",
|
|
|
- titleVal2: "",
|
|
|
- titleVal3: ""
|
|
|
+ titleVal1: '',
|
|
|
+ titleVal2: '',
|
|
|
+ titleVal3: ''
|
|
|
},
|
|
|
automaticIntegration: [],
|
|
|
Dc_Data: {
|
|
|
//导出数据
|
|
|
- value1: "", //时间
|
|
|
- DC_position: "全部", //人员
|
|
|
+ value1: '', //时间
|
|
|
+ DC_position: '全部', //人员
|
|
|
dept_name: [], //部门
|
|
|
rule_id: [] //规则
|
|
|
},
|
|
@@ -484,8 +337,8 @@ export default {
|
|
|
dept_tree: [],
|
|
|
loading: false,
|
|
|
formData: {
|
|
|
- dept_id: "0",
|
|
|
- sort: "DESC",
|
|
|
+ dept_id: '0',
|
|
|
+ sort: 'DESC',
|
|
|
pt_id: 3,
|
|
|
time_type: 1,
|
|
|
exclusion: [],
|
|
@@ -501,37 +354,27 @@ export default {
|
|
|
list: null,
|
|
|
point_type: [],
|
|
|
sort: false,
|
|
|
- time_types: [
|
|
|
- { label: "月份", value: "1" },
|
|
|
- { label: "年份", value: "2" },
|
|
|
- { label: "季度", value: "3" }
|
|
|
- ],
|
|
|
- props: { value: "id", label: "name", children: "child", multiple: true },
|
|
|
- time_type: "月份",
|
|
|
+ time_types: [{ label: '月份', value: '1' }, { label: '年份', value: '2' }, { label: '季度', value: '3' }],
|
|
|
+ props: { value: 'id', label: 'name', children: 'child', multiple: true },
|
|
|
+ time_type: '月份',
|
|
|
export_from: {
|
|
|
- year: "",
|
|
|
- month: moment().format("YYYY-MM"),
|
|
|
- quarter: ""
|
|
|
+ year: '',
|
|
|
+ month: moment().format('YYYY-MM'),
|
|
|
+ quarter: ''
|
|
|
},
|
|
|
- employee_map: JSON.parse(localStorage.getItem("SET_EMPLOYEE_MAP")),
|
|
|
- positions: [
|
|
|
- { id: 0, age: "all", name: "全部" },
|
|
|
- { id: 1, age: "manager", name: "管理者" },
|
|
|
- { id: 2, age: "employee", name: "员工" }
|
|
|
- ],
|
|
|
+ employee_map: JSON.parse(localStorage.getItem('SET_EMPLOYEE_MAP')),
|
|
|
+ positions: [{ id: 0, age: 'all', name: '全部' }, { id: 1, age: 'manager', name: '管理者' }, { id: 2, age: 'employee', name: '员工' }],
|
|
|
tips_show: false,
|
|
|
byRankingShow: false,
|
|
|
byRankingData: {
|
|
|
- month: moment().format("YYYY-MM"),
|
|
|
+ month: moment().format('YYYY-MM'),
|
|
|
dept_id: 0,
|
|
|
- position: "all"
|
|
|
+ position: 'all'
|
|
|
},
|
|
|
- byRankingDeptId: "",
|
|
|
+ byRankingDeptId: '',
|
|
|
byRankingDataRules: {
|
|
|
- month: [{ required: true, message: "请选择月份", trigger: "blur" }],
|
|
|
- position: [
|
|
|
- { required: true, message: "请选择人员范围", trigger: "blur" }
|
|
|
- ]
|
|
|
+ month: [{ required: true, message: '请选择月份', trigger: 'blur' }],
|
|
|
+ position: [{ required: true, message: '请选择人员范围', trigger: 'blur' }]
|
|
|
},
|
|
|
rule_list: [], //自动积分分类列表
|
|
|
toPdept: 0,
|
|
@@ -539,18 +382,18 @@ export default {
|
|
|
toPdept2: 0,
|
|
|
dropOuOfPerson: [],
|
|
|
|
|
|
- deriveJobId: "",
|
|
|
+ deriveJobId: '',
|
|
|
deriveJobIf: 0,
|
|
|
deriveDis: false,
|
|
|
- aherfUrl: "",
|
|
|
- typeName:'B分'
|
|
|
+ aherfUrl: '',
|
|
|
+ typeName: 'B分'
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
- "formData.exclusion"(val) {
|
|
|
+ 'formData.exclusion'(val) {
|
|
|
this.$nextTick(() => {
|
|
|
// .currentLabel
|
|
|
- this.dropOuOfPerson = this.$refs["dropOuOfonref"].selected;
|
|
|
+ this.dropOuOfPerson = this.$refs['dropOuOfonref'].selected;
|
|
|
});
|
|
|
},
|
|
|
newTaskFormType(val) {
|
|
@@ -566,9 +409,9 @@ export default {
|
|
|
},
|
|
|
sort(val) {
|
|
|
if (val) {
|
|
|
- this.formData.sort = "ASC";
|
|
|
+ this.formData.sort = 'ASC';
|
|
|
} else {
|
|
|
- this.formData.sort = "DESC";
|
|
|
+ this.formData.sort = 'DESC';
|
|
|
}
|
|
|
},
|
|
|
dept_name(val) {
|
|
@@ -595,7 +438,7 @@ export default {
|
|
|
this.toPdept1 = val[val.length - 1];
|
|
|
this.$refs.dept1.dropDownVisible = false;
|
|
|
},
|
|
|
- "Dc_Data.dept_name": function(val) {
|
|
|
+ 'Dc_Data.dept_name': function(val) {
|
|
|
this.toPdept2 = val[val.length - 1];
|
|
|
this.$refs.dept2.dropDownVisible = false;
|
|
|
}
|
|
@@ -614,7 +457,7 @@ export default {
|
|
|
components: { season },
|
|
|
methods: {
|
|
|
takePartInno() {
|
|
|
- this.$refs["dropOuOfonref"].visible = true;
|
|
|
+ this.$refs['dropOuOfonref'].visible = true;
|
|
|
},
|
|
|
ruleautomatic() {
|
|
|
let list = this.automaticIntegration;
|
|
@@ -626,10 +469,10 @@ export default {
|
|
|
this.Dc_Data.rule_id = ruleId;
|
|
|
},
|
|
|
ruleInquiredialog() {
|
|
|
- this.ruleUtif("derive");
|
|
|
+ this.ruleUtif('derive');
|
|
|
},
|
|
|
ruleInquire() {
|
|
|
- this.ruleUtif("ruleinquire");
|
|
|
+ this.ruleUtif('ruleinquire');
|
|
|
},
|
|
|
ruleUtif(rule) {
|
|
|
let ruleList = this.$refs[rule].getCheckedNodes();
|
|
@@ -637,21 +480,20 @@ export default {
|
|
|
ruleList.forEach(item => {
|
|
|
ruleId.push(item.value);
|
|
|
});
|
|
|
- if (rule == "ruleinquire") {
|
|
|
+ if (rule == 'ruleinquire') {
|
|
|
this.formData.rule_id = ruleId;
|
|
|
} else {
|
|
|
this.Dc_Data.rule_id = ruleId;
|
|
|
}
|
|
|
this.$nextTick(() => {
|
|
|
if (this.$refs[rule].presentTags[1]) {
|
|
|
- this.$refs[rule].presentTags[1].text =
|
|
|
- "+ " + (ruleId.length - 1).toString();
|
|
|
+ this.$refs[rule].presentTags[1].text = '+ ' + (ruleId.length - 1).toString();
|
|
|
} else {
|
|
|
if (ruleId.length > 1) {
|
|
|
let list = {
|
|
|
closable: false,
|
|
|
key: -1,
|
|
|
- text: "+ " + (ruleId.length - 1).toString()
|
|
|
+ text: '+ ' + (ruleId.length - 1).toString()
|
|
|
};
|
|
|
this.$refs[rule].presentTags[1] = list;
|
|
|
}
|
|
@@ -664,19 +506,19 @@ export default {
|
|
|
},
|
|
|
// 轮播页面跳转
|
|
|
swiperPage(formName) {
|
|
|
- if (this.titleVals != "") {
|
|
|
+ if (this.titleVals != '') {
|
|
|
this.titleVal.titleVal2 = this.titleVals;
|
|
|
- localStorage.setItem("titleVal", JSON.stringify(this.titleVal));
|
|
|
+ localStorage.setItem('titleVal', JSON.stringify(this.titleVal));
|
|
|
} else {
|
|
|
- this.titleVal.titleVal2 = "";
|
|
|
- localStorage.setItem("titleVal", JSON.stringify(this.titleVal));
|
|
|
+ this.titleVal.titleVal2 = '';
|
|
|
+ localStorage.setItem('titleVal', JSON.stringify(this.titleVal));
|
|
|
}
|
|
|
//拿到当前点击的部门id
|
|
|
- let byRankingDeptId_bl = "";
|
|
|
+ let byRankingDeptId_bl = '';
|
|
|
for (let i in this.byRankingDeptId) {
|
|
|
byRankingDeptId_bl = this.byRankingDeptId[i];
|
|
|
}
|
|
|
- if (byRankingDeptId_bl == "" || byRankingDeptId_bl == 0) {
|
|
|
+ if (byRankingDeptId_bl == '' || byRankingDeptId_bl == 0) {
|
|
|
byRankingDeptId_bl = 0;
|
|
|
}
|
|
|
this.byRankingData.dept_id = byRankingDeptId_bl;
|
|
@@ -684,10 +526,10 @@ export default {
|
|
|
this.$refs[formName].validate(valid => {
|
|
|
if (valid) {
|
|
|
var { href } = this.$router.resolve({
|
|
|
- path: "/deptRankSwiper",
|
|
|
+ path: '/deptRankSwiper',
|
|
|
query: {
|
|
|
month: this.byRankingData.month || 0,
|
|
|
- types: "2",
|
|
|
+ types: '2',
|
|
|
position: this.byRankingData.position,
|
|
|
dept_id: this.byRankingData.dept_id,
|
|
|
pt_id: 3
|
|
@@ -699,38 +541,38 @@ export default {
|
|
|
},
|
|
|
// // 轮播排名弹窗
|
|
|
byRanking() {
|
|
|
- if (localStorage.getItem("titleVal")) {
|
|
|
- this.titleVal = JSON.parse(localStorage.getItem("titleVal"));
|
|
|
+ if (localStorage.getItem('titleVal')) {
|
|
|
+ this.titleVal = JSON.parse(localStorage.getItem('titleVal'));
|
|
|
this.titleVals = this.titleVal.titleVal2;
|
|
|
} else {
|
|
|
- this.titleVals = "";
|
|
|
+ this.titleVals = '';
|
|
|
}
|
|
|
this.byRankingShow = true;
|
|
|
},
|
|
|
// 提示信息
|
|
|
tips_close() {
|
|
|
- localStorage.setItem("dept_rank_tips", "true");
|
|
|
+ localStorage.setItem('dept_rank_tips', 'true');
|
|
|
this.tips_show = false;
|
|
|
},
|
|
|
|
|
|
// 查询
|
|
|
selectBtn() {
|
|
|
switch (this.time_type) {
|
|
|
- case "1":
|
|
|
- this.$set(this.formData, "month", this.export_from.month);
|
|
|
- this.formData.month ? "" : delete this.formData.month;
|
|
|
+ case '1':
|
|
|
+ this.$set(this.formData, 'month', this.export_from.month);
|
|
|
+ this.formData.month ? '' : delete this.formData.month;
|
|
|
break;
|
|
|
- case "2":
|
|
|
- this.$set(this.formData, "year", this.export_from.year);
|
|
|
- this.formData.year ? "" : delete this.formData.year;
|
|
|
+ case '2':
|
|
|
+ this.$set(this.formData, 'year', this.export_from.year);
|
|
|
+ this.formData.year ? '' : delete this.formData.year;
|
|
|
break;
|
|
|
- case "月份":
|
|
|
- this.$set(this.formData, "month", this.export_from.month);
|
|
|
- this.formData.month ? "" : delete this.formData.month;
|
|
|
+ case '月份':
|
|
|
+ this.$set(this.formData, 'month', this.export_from.month);
|
|
|
+ this.formData.month ? '' : delete this.formData.month;
|
|
|
break;
|
|
|
- case "3":
|
|
|
- this.$set(this.formData, "quarter", this.export_from.quarter);
|
|
|
- this.formData.quarter ? "" : delete this.formData.quarter;
|
|
|
+ case '3':
|
|
|
+ this.$set(this.formData, 'quarter', this.export_from.quarter);
|
|
|
+ this.formData.quarter ? '' : delete this.formData.quarter;
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
@@ -763,7 +605,7 @@ export default {
|
|
|
} else if (this.time_type == 2) {
|
|
|
delete data.month;
|
|
|
delete data.quarter;
|
|
|
- } else if (this.time_type == "月份") {
|
|
|
+ } else if (this.time_type == '月份') {
|
|
|
delete data.year;
|
|
|
delete data.quarter;
|
|
|
} else if (this.time_type == 3) {
|
|
@@ -771,21 +613,16 @@ export default {
|
|
|
delete data.year;
|
|
|
}
|
|
|
if (bool) {
|
|
|
- data.month = moment().format("YYYY-MM");
|
|
|
+ data.month = moment().format('YYYY-MM');
|
|
|
}
|
|
|
let self = this;
|
|
|
self.loading = true;
|
|
|
- data ? "" : (data = this.formData);
|
|
|
- this.typeName=this.formData.pt_id==3? 'B分':'A分'
|
|
|
- data.position =
|
|
|
- data.position == "manager"
|
|
|
- ? "manager"
|
|
|
- : data.position == "employee"
|
|
|
- ? "employee"
|
|
|
- : "all";
|
|
|
+ data ? '' : (data = this.formData);
|
|
|
+ this.typeName = this.formData.pt_id == 3 ? 'B分' : 'A分';
|
|
|
+ data.position = data.position == 'manager' ? 'manager' : data.position == 'employee' ? 'employee' : 'all';
|
|
|
// let headers = { Accept: "application/vnd.test.v2+json" };
|
|
|
self
|
|
|
- .$http("get", "/api/integral/statistics/ranking", data, "v2")
|
|
|
+ .$http('get', '/api/integral/statistics/ranking', data, 'v2')
|
|
|
.then(res => {
|
|
|
if (res.data.code == 1) {
|
|
|
self.list = res.data.data.list;
|
|
@@ -802,7 +639,7 @@ export default {
|
|
|
get_rule_tree() {
|
|
|
let self = this;
|
|
|
self
|
|
|
- .$http("get", "/api/integral/rule/trees", { cycle_type: "1" })
|
|
|
+ .$http('get', '/api/integral/rule/trees', { cycle_type: '1' })
|
|
|
.then(res => {
|
|
|
if (res.data.code == 1) {
|
|
|
// let arr = res.data.data.tree
|
|
@@ -812,7 +649,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
.catch(e => {
|
|
|
- self.$message.error("获取积分规则失败");
|
|
|
+ self.$message.error('获取积分规则失败');
|
|
|
});
|
|
|
},
|
|
|
// 递归判断列表,把最后的children设为undefined
|
|
@@ -846,7 +683,7 @@ export default {
|
|
|
getEmployeeList() {
|
|
|
let self = this;
|
|
|
self
|
|
|
- .$http("get", "/api/employee/index", { dept_id: self.formData.dept_id,is_official: 1,page_size: 2000,page: 0, })
|
|
|
+ .$http('get', '/api/employee/index', { dept_id: self.formData.dept_id, is_official: 1, page_size: 2000, page: 0 })
|
|
|
.then(res => {
|
|
|
if (res.data.code == 1) {
|
|
|
this.employee_map = res.data.data.list;
|
|
@@ -868,12 +705,12 @@ export default {
|
|
|
},
|
|
|
downloadResult() {
|
|
|
if (this.deriveJobIf < 5) {
|
|
|
- this.$http("get", "/api/download/result", {
|
|
|
+ this.$http('get', '/api/download/result', {
|
|
|
job_id: this.deriveJobId
|
|
|
}).then(res => {
|
|
|
if (res.data.code == 1) {
|
|
|
this.aherfUrl = res.data.data.url;
|
|
|
- this.deriveJobId = "";
|
|
|
+ this.deriveJobId = '';
|
|
|
this.deriveDis = false;
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.aherfClick.click();
|
|
@@ -887,29 +724,23 @@ export default {
|
|
|
});
|
|
|
} else {
|
|
|
this.deriveJobIf = 0;
|
|
|
- this.deriveJobId = "";
|
|
|
+ this.deriveJobId = '';
|
|
|
this.deriveDis = false;
|
|
|
- this.aherfUrl = "";
|
|
|
- this.$message.warning("导出超时");
|
|
|
+ this.aherfUrl = '';
|
|
|
+ this.$message.warning('导出超时');
|
|
|
}
|
|
|
},
|
|
|
exportExcel() {
|
|
|
- this.aherfUrl = "";
|
|
|
- this.$confirm("确认导出排名?", "导出", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
+ this.aherfUrl = '';
|
|
|
+ this.$confirm('确认导出排名?', '导出', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
})
|
|
|
.then(() => {
|
|
|
//人员
|
|
|
this.Dc_Data.DC_position =
|
|
|
- this.Dc_Data.DC_position == "manager"
|
|
|
- ? "manager"
|
|
|
- : this.Dc_Data.DC_position == "employee"
|
|
|
- ? "employee"
|
|
|
- : this.Dc_Data.DC_position == "全部"
|
|
|
- ? "all"
|
|
|
- : "all";
|
|
|
+ this.Dc_Data.DC_position == 'manager' ? 'manager' : this.Dc_Data.DC_position == 'employee' ? 'employee' : this.Dc_Data.DC_position == '全部' ? 'all' : 'all';
|
|
|
|
|
|
//部门
|
|
|
let dept_name;
|
|
@@ -922,17 +753,11 @@ export default {
|
|
|
employee_id: this.$store.getters.user_info.id,
|
|
|
position: this.Dc_Data.DC_position
|
|
|
};
|
|
|
- this.Dc_Data.value1
|
|
|
- ? (params.start_date = this.Dc_Data.value1[0])
|
|
|
- : "";
|
|
|
- this.Dc_Data.value1 ? (params.end_date = this.Dc_Data.value1[1]) : "";
|
|
|
- this.Dc_Data.dept_name > 0
|
|
|
- ? (params.dept_id = this.Dc_Data.dept_name)
|
|
|
- : (params.dept_id = 0);
|
|
|
- this.Dc_Data.rule_id.length > 0
|
|
|
- ? (params.rule_id = this.Dc_Data.rule_id)
|
|
|
- : "";
|
|
|
- this.$http("get", "/api/download/ranking/v2", params).then(res => {
|
|
|
+ this.Dc_Data.value1 ? (params.start_date = this.Dc_Data.value1[0]) : '';
|
|
|
+ this.Dc_Data.value1 ? (params.end_date = this.Dc_Data.value1[1]) : '';
|
|
|
+ this.Dc_Data.dept_name > 0 ? (params.dept_id = this.Dc_Data.dept_name) : (params.dept_id = 0);
|
|
|
+ this.Dc_Data.rule_id.length > 0 ? (params.rule_id = this.Dc_Data.rule_id) : '';
|
|
|
+ this.$http('get', '/api/download/ranking/v2', params).then(res => {
|
|
|
if (res.data.code == 1) {
|
|
|
this.deriveJobId = res.data.data.job_id;
|
|
|
this.downloadResult();
|
|
@@ -946,30 +771,20 @@ export default {
|
|
|
|
|
|
return;
|
|
|
|
|
|
- let data = "";
|
|
|
+ let data = '';
|
|
|
if (this.Dc_Data.value1) {
|
|
|
- data += "&start_date=" + this.Dc_Data.value1[0];
|
|
|
- data += "&end_date=" + this.Dc_Data.value1[1];
|
|
|
+ data += '&start_date=' + this.Dc_Data.value1[0];
|
|
|
+ data += '&end_date=' + this.Dc_Data.value1[1];
|
|
|
}
|
|
|
- data += "&position=" + this.Dc_Data.DC_position;
|
|
|
+ data += '&position=' + this.Dc_Data.DC_position;
|
|
|
|
|
|
- this.Dc_Data.dept_name > 0
|
|
|
- ? (data += "&dept_id=" + this.Dc_Data.dept_name)
|
|
|
- : (data += "&dept_id=0");
|
|
|
+ this.Dc_Data.dept_name > 0 ? (data += '&dept_id=' + this.Dc_Data.dept_name) : (data += '&dept_id=0');
|
|
|
|
|
|
if (this.Dc_Data.rule_id.length > 0) {
|
|
|
- data += "&rule_id=" + this.Dc_Data.rule_id;
|
|
|
+ data += '&rule_id=' + this.Dc_Data.rule_id;
|
|
|
}
|
|
|
let token = this.$getToken ? this.$getToken : getToken();
|
|
|
- window.open(
|
|
|
- process.env.BASE_API +
|
|
|
- "/api/download/ranking/v2?pt_id=3&employee_id=" +
|
|
|
- this.$store.getters.user_info.id +
|
|
|
- data +
|
|
|
- "&token=" +
|
|
|
- token,
|
|
|
- "_blank"
|
|
|
- );
|
|
|
+ window.open(process.env.BASE_API + '/api/download/ranking/v2?pt_id=3&employee_id=' + this.$store.getters.user_info.id + data + '&token=' + token, '_blank');
|
|
|
this.dialogVisible = false;
|
|
|
},
|
|
|
// exportExcel() {
|
|
@@ -1006,7 +821,7 @@ export default {
|
|
|
get_rule_trees() {
|
|
|
let self = this;
|
|
|
self
|
|
|
- .$http("get", "/api/integral/rule/trees", { cycle_type: "2" })
|
|
|
+ .$http('get', '/api/integral/rule/trees', { cycle_type: '2' })
|
|
|
.then(res => {
|
|
|
if (res.data.code == 1) {
|
|
|
self.rule_list = this.getTreeData(res.data.data.rule_tree);
|
|
@@ -1016,17 +831,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.getEmployeeList()
|
|
|
- this.tips_show = JSON.parse(localStorage.getItem("dept_rank_tips"))
|
|
|
- ? false
|
|
|
- : true;
|
|
|
- if (localStorage.getItem("dept_tree")) {
|
|
|
- this.dept_tree = this.getTreeData(
|
|
|
- JSON.parse(localStorage.getItem("dept_tree"))
|
|
|
- );
|
|
|
+ this.getEmployeeList();
|
|
|
+ this.tips_show = JSON.parse(localStorage.getItem('dept_rank_tips')) ? false : true;
|
|
|
+ if (localStorage.getItem('dept_tree')) {
|
|
|
+ this.dept_tree = this.getTreeData(JSON.parse(localStorage.getItem('dept_tree')));
|
|
|
}
|
|
|
- if (localStorage.getItem("SET_POINT_TYPES")) {
|
|
|
- this.point_type = JSON.parse(localStorage.getItem("SET_POINT_TYPES"));
|
|
|
+ if (localStorage.getItem('SET_POINT_TYPES')) {
|
|
|
+ this.point_type = JSON.parse(localStorage.getItem('SET_POINT_TYPES'));
|
|
|
}
|
|
|
this.get_list(this.formData, true);
|
|
|
this.get_rule_tree();
|
|
@@ -1093,7 +904,7 @@ export default {
|
|
|
padding-left: 12px;
|
|
|
padding-right: 5px;
|
|
|
&:after {
|
|
|
- content: "";
|
|
|
+ content: '';
|
|
|
position: absolute;
|
|
|
margin-top: -2px;
|
|
|
top: 35%;
|
|
@@ -1109,7 +920,7 @@ export default {
|
|
|
position: relative;
|
|
|
padding-left: 12px;
|
|
|
&:after {
|
|
|
- content: "";
|
|
|
+ content: '';
|
|
|
position: absolute;
|
|
|
margin-top: -2px;
|
|
|
top: 35%;
|