|
@@ -28,7 +28,7 @@
|
|
|
</div>
|
|
|
<div style="font-size: 14px;" class="fontColorB">积分可视化数据大屏,直观展现积分排名、积分快讯、运作情况,支持电脑投屏、会议平板直接访问。</div>
|
|
|
</div>
|
|
|
- <el-button type="primary" @click="isPz = true">
|
|
|
+ <el-button type="primary" @click="isPz = true" :disabled="list.length==10">
|
|
|
创建数据大屏
|
|
|
<i class="el-icon-setting el-icon--right"></i>
|
|
|
</el-button>
|
|
@@ -58,6 +58,7 @@
|
|
|
</template>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
+
|
|
|
<el-dialog :title="isCompile? '编辑数据大屏':'创建数据大屏'" :visible.sync="isPz" width="500px" class="dialog">
|
|
|
<el-form label-width="80px" :model="formData" ref="setForm" class="form">
|
|
|
<el-form-item
|
|
@@ -80,6 +81,7 @@
|
|
|
<el-button type="primary" :loading="setLoading" :disabled="setLoading" @click="saveFirst('setForm')">确定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
<el-dialog title="分享" :visible.sync="isPreview" width="500px" class="dialog">
|
|
|
<div>
|
|
|
<div>本机以外的其他设备可以通过链接访问数据大屏</div>
|
|
@@ -107,16 +109,10 @@
|
|
|
<div class="flex-box">
|
|
|
<div class="flex-4" style="padding-top: 50px;">
|
|
|
<div style="color: #222;font-weight: 700;font-size: 16px;padding-left: 8px;">点击下面模块,快速定位到设置项
|
|
|
- <el-popover
|
|
|
- placement="bottom-start"
|
|
|
- title="示例"
|
|
|
- width="500"
|
|
|
- trigger="hover">
|
|
|
- <div>
|
|
|
- <img src="@/assets/image/321.jpg" style="width: 100%;"/>
|
|
|
- </div>
|
|
|
- <span style="font-size:14px;cursor: pointer;" class="blue" slot="reference">示例</span>
|
|
|
- </el-popover>
|
|
|
+ <el-popover placement="bottom-start" title="示例" width="500" trigger="hover">
|
|
|
+ <div><img src="@/assets/image/321.jpg" style="width: 100%;"/></div>
|
|
|
+ <span style="font-size:14px;cursor: pointer;" class="blue" slot="reference">示例</span>
|
|
|
+ </el-popover>
|
|
|
</div>
|
|
|
<div class="flex-box-ce">
|
|
|
<div class="flex-1">
|
|
@@ -172,68 +168,124 @@
|
|
|
<div class="kuai">
|
|
|
<div class="formTitle">排行榜设置</div>
|
|
|
<div class="formBox">
|
|
|
- <el-form-item label="名称">
|
|
|
- <el-input class="width250" maxlength="10" show-word-limit v-model.trim="config.ranking.name" placeholder="请输入名称"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="时间">
|
|
|
- <el-select class="width250" v-model="config.ranking.condition.date" placeholder="请选择积分类型">
|
|
|
- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
- </el-select>
|
|
|
- <el-date-picker
|
|
|
- class="width250"
|
|
|
- v-if="config.ranking.condition.date == 1"
|
|
|
- v-model="config.ranking.condition.time"
|
|
|
- type="daterange"
|
|
|
- value-format="timestamp"
|
|
|
- @change="setTime"
|
|
|
- range-separator="至"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
- ></el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="部门">
|
|
|
- <el-cascader
|
|
|
- v-model="config.ranking.condition.deptArr"
|
|
|
- :options="dept_tree"
|
|
|
- :props="{ multiple : true,checkStrictly: true, value: 'id', label: 'name', children: '_child' }"
|
|
|
- class="width250"
|
|
|
- ref="dept1"
|
|
|
- filterable
|
|
|
- collapse-tags
|
|
|
- placeholder="全部部门"
|
|
|
- clearable
|
|
|
- ></el-cascader>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="人员">
|
|
|
- <el-select class="width250" v-model="config.ranking.condition.position" placeholder="请选择人员范围">
|
|
|
- <el-option v-for="item in roleOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="类型">
|
|
|
- <el-select class="width250" v-model="config.ranking.condition.point_id" placeholder="请选择积分类型">
|
|
|
- <el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value" v-if="item.value != 1"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="排除">
|
|
|
- <el-input class="width250" auto-complete="off" v-model="config.ranking.condition.employeeName" placeholder="请选择排除对象"></el-input>
|
|
|
- <div @click="noPersonnelListTips" style=" position: absolute; top: 0; right: 0; left: 0; bottom: 0; z-index: 9;"></div>
|
|
|
+ <el-form-item style="margin-bottom: 30px;">
|
|
|
+ <el-radio-group v-model="config.ranking_type">
|
|
|
+ <el-radio label="ranking">阶段排名</el-radio>
|
|
|
+ <el-radio label="ranking_total">累计排名</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <div style="position: absolute;z-index: 999;left: 0px;top: 30px;font-size: 12px;line-height: 14px;" class="fontColorC">
|
|
|
+ <span v-if="config.ranking_type=='ranking'">阶段排名仅统计时间区间内的积分数据<br/>不包含基础分和工龄分</span>
|
|
|
+ <span v-else>累计B分排名即员工从入职至今的所有B分总计<br/>包含基础分和工龄分</span>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
+ <div style="min-height: 362px;">
|
|
|
+ <template v-if="config.ranking_type=='ranking'">
|
|
|
+ <el-form-item label="名称">
|
|
|
+ <el-input class="width250" maxlength="10" show-word-limit v-model.trim="config.ranking.name" placeholder="请输入名称"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="时间">
|
|
|
+ <el-select class="width250" v-model="config.ranking.condition.date" placeholder="请选择积分类型">
|
|
|
+ <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-date-picker
|
|
|
+ class="width250"
|
|
|
+ v-if="config.ranking.condition.date == 1"
|
|
|
+ v-model="config.ranking.condition.time"
|
|
|
+ type="daterange"
|
|
|
+ value-format="timestamp"
|
|
|
+ @change="setTime"
|
|
|
+ :clearable="false"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ ></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="部门">
|
|
|
+ <template slot="label">
|
|
|
+ <el-tooltip effect="dark" placement="top">
|
|
|
+ <template slot="content">
|
|
|
+ 选择部门默认包含子部门
|
|
|
+ </template>
|
|
|
+ <span>部门 <i class="el-icon-warning"></i></span>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+ <el-cascader
|
|
|
+ v-model="config.ranking.condition.deptArr"
|
|
|
+ :options="dept_tree"
|
|
|
+ :props="{checkStrictly: true, multiple : true, value: 'id', label: 'name', children: '_child' }"
|
|
|
+ class="width250"
|
|
|
+ ref="dept1"
|
|
|
+ filterable
|
|
|
+ collapse-tags
|
|
|
+ placeholder="全公司"
|
|
|
+ clearable
|
|
|
+ ></el-cascader>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="人员">
|
|
|
+ <el-select class="width250" v-model="config.ranking.condition.position" placeholder="请选择人员范围">
|
|
|
+ <el-option v-for="item in roleOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="类型">
|
|
|
+ <el-select class="width250" v-model="config.ranking.condition.point_id" placeholder="请选择积分类型">
|
|
|
+ <el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value" v-if="item.value != 1"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="排除">
|
|
|
+ <el-input class="width250" auto-complete="off" v-model="config.ranking.condition.employeeName" placeholder="请选择排除对象"></el-input>
|
|
|
+ <div @click="noPersonnelListTips" style=" position: absolute; top: 0; right: 0; left: 0; bottom: 0; z-index: 9;"></div>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <el-form-item label="名称">
|
|
|
+ <el-input class="width250" maxlength="10" show-word-limit v-model.trim="config.ranking_total.name" placeholder="请输入名称"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="部门">
|
|
|
+ <template slot="label">
|
|
|
+ <el-tooltip effect="dark" placement="top">
|
|
|
+ <template slot="content">
|
|
|
+ 选择部门默认包含子部门
|
|
|
+ </template>
|
|
|
+ <span>部门 <i class="el-icon-warning"></i></span>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+ <el-cascader
|
|
|
+ v-model="config.ranking_total.condition.deptArr"
|
|
|
+ :options="dept_tree"
|
|
|
+ :props="{checkStrictly: true, multiple : true, value: 'id', label: 'name', children: '_child' }"
|
|
|
+ class="width250"
|
|
|
+ ref="dept6"
|
|
|
+ filterable
|
|
|
+ collapse-tags
|
|
|
+ placeholder="全公司"
|
|
|
+ clearable
|
|
|
+ ></el-cascader>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
<div class="kuai">
|
|
|
<div class="formTitle">今日积分数据设置</div>
|
|
|
<div class="formBox">
|
|
|
<el-form-item label="部门">
|
|
|
+ <template slot="label">
|
|
|
+ <el-tooltip effect="dark" placement="top">
|
|
|
+ <template slot="content">
|
|
|
+ 选择部门默认包含子部门
|
|
|
+ </template>
|
|
|
+ <span>部门 <i class="el-icon-warning"></i></span>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
<el-cascader
|
|
|
v-model="config.center.deptArr"
|
|
|
:options="dept_tree"
|
|
|
- :props="{ multiple : true,checkStrictly: true, value: 'id', label: 'name', children: '_child' }"
|
|
|
+ :props="{checkStrictly: true, multiple : true, value: 'id', label: 'name', children: '_child' }"
|
|
|
ref="dept2"
|
|
|
class="width250"
|
|
|
filterable
|
|
|
collapse-tags
|
|
|
- placeholder="全部部门"
|
|
|
+ placeholder="全公司"
|
|
|
clearable
|
|
|
></el-cascader>
|
|
|
</el-form-item>
|
|
@@ -251,18 +303,24 @@
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
<div class="formBox">
|
|
|
-<!-- <div style="color: #333;font-weight: 700;margin-bottom: 10px;">占比说明 </div>
|
|
|
- <div class="fontColorC" style="line-height: 23px;margin-bottom: 10px;">获得积分人员占比=获得积分的人数/参与积分的总人数</br>执行奖扣管理人员占比=有执行奖扣的人/总管理者人数</br>基准标尺为执行下限,要求活跃度在标尺之上执行才算执行到位</div> -->
|
|
|
<el-form-item label="部门">
|
|
|
+ <template slot="label">
|
|
|
+ <el-tooltip effect="dark" placement="top">
|
|
|
+ <template slot="content">
|
|
|
+ 选择部门默认包含子部门
|
|
|
+ </template>
|
|
|
+ <span>部门 <i class="el-icon-warning"></i></span>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
<el-cascader
|
|
|
v-model="config.active.deptArr"
|
|
|
:options="dept_tree"
|
|
|
- :props="{ multiple : true,checkStrictly : true, value: 'id', label: 'name', children: '_child' }"
|
|
|
+ :props="{checkStrictly: true, multiple : true, value: 'id', label: 'name', children: '_child' }"
|
|
|
ref="dept3"
|
|
|
class="width250"
|
|
|
filterable
|
|
|
collapse-tags
|
|
|
- placeholder="全部部门"
|
|
|
+ placeholder="全公司"
|
|
|
clearable
|
|
|
></el-cascader>
|
|
|
</el-form-item>
|
|
@@ -289,20 +347,28 @@
|
|
|
<el-input class="width250" maxlength="10" show-word-limit v-model.trim="config.event.name" placeholder="请输入名称"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="来源">
|
|
|
- <el-select class="width250" multiple v-model="config.event.source_type" placeholder="请选择来源">
|
|
|
+ <el-select class="width250" multiple v-model="config.event.source_type" placeholder="全部">
|
|
|
<el-option v-for="item in sourceOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="部门">
|
|
|
+ <template slot="label">
|
|
|
+ <el-tooltip effect="dark" placement="top">
|
|
|
+ <template slot="content">
|
|
|
+ 选择部门默认包含子部门
|
|
|
+ </template>
|
|
|
+ <span>部门 <i class="el-icon-warning"></i></span>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
<el-cascader
|
|
|
v-model="config.event.deptArr"
|
|
|
:options="dept_tree"
|
|
|
- :props="{ multiple : true,checkStrictly: true, value: 'id', label: 'name', children: '_child' }"
|
|
|
+ :props="{checkStrictly: true,multiple : true, value: 'id', label: 'name', children: '_child' }"
|
|
|
ref="dept4"
|
|
|
class="width250"
|
|
|
filterable
|
|
|
collapse-tags
|
|
|
- placeholder="全部部门"
|
|
|
+ placeholder="全公司"
|
|
|
clearable
|
|
|
></el-cascader>
|
|
|
</el-form-item>
|
|
@@ -431,7 +497,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
value: 10,
|
|
|
- label: '钉钉报告直接奖励'
|
|
|
+ label: '钉钉汇报(日志)奖扣分'
|
|
|
}
|
|
|
],
|
|
|
typeOptions: [
|
|
@@ -469,23 +535,32 @@ export default {
|
|
|
},
|
|
|
defaultConfig: {
|
|
|
//配置格式 不是删除则必填
|
|
|
+ ranking_type:'ranking',
|
|
|
company: {
|
|
|
name: this.$getUserData().company_info.name.slice(0, 10), //不超过十个字 公司名截断
|
|
|
logo: 'https://integralsys.oss-cn-shenzhen.aliyuncs.com/intesys/dd/17/2022/07/01/CaBis82ryBYbncxc3nehiSXkiwDbhbwi.png' //公司logo
|
|
|
},
|
|
|
title: '积分数据大屏', //不超过十个字
|
|
|
+ ranking_total: { //累计B分排名拿数据
|
|
|
+ name: "排行榜", //不超过十个字
|
|
|
+ condition: { //筛选条件
|
|
|
+ dept: [], //限定部门ID列表 空全公司
|
|
|
+ deptArr: [],
|
|
|
+ point_id: "2",//2AF 3BF,
|
|
|
+ position: "employee",//employee manager all//员工 管理员 全部
|
|
|
+ exclusion: [],//不参与排名用户ID数组,
|
|
|
+ }
|
|
|
+ },
|
|
|
ranking: {
|
|
|
//从阶段排名拿数据
|
|
|
name: '排行榜', //不超过十个字
|
|
|
- condition: {
|
|
|
- //筛选条件,
|
|
|
+ condition: {//筛选条件
|
|
|
time: [],
|
|
|
date: -3,
|
|
|
start_date: -3, //结束时间
|
|
|
end_date: -3, //开始时间
|
|
|
deptArr: [],
|
|
|
dept: [], //限定部门ID列表 空全公司
|
|
|
-
|
|
|
point_id: 3, //2AF 3BF,
|
|
|
position: 'all', //manager all//员工 管理员 全部
|
|
|
employeeName: '',
|
|
@@ -514,11 +589,22 @@ export default {
|
|
|
},
|
|
|
config: {
|
|
|
//配置格式 不是删除则必填
|
|
|
+ ranking_type:'ranking',
|
|
|
company: {
|
|
|
name: this.$getUserData().company_info.name.slice(0, 10), //不超过十个字 公司名截断
|
|
|
logo: 'https://integralsys.oss-cn-shenzhen.aliyuncs.com/intesys/dd/17/2022/07/01/CaBis82ryBYbncxc3nehiSXkiwDbhbwi.png' //公司logo
|
|
|
},
|
|
|
title: '积分数据大屏', //不超过十个字
|
|
|
+ ranking_total: { //累计B分排名拿数据
|
|
|
+ name: "累计B分排名", //不超过十个字
|
|
|
+ condition: { //筛选条件
|
|
|
+ dept: [], //限定部门ID列表 空全公司
|
|
|
+ deptArr: [],
|
|
|
+ point_id: "2",//2AF 3BF,
|
|
|
+ position: "employee",//employee manager all//员工 管理员 全部
|
|
|
+ exclusion: [],//不参与排名用户ID数组,
|
|
|
+ }
|
|
|
+ },
|
|
|
ranking: {
|
|
|
//从阶段排名拿数据
|
|
|
name: '排行榜', //不超过十个字
|
|
@@ -556,7 +642,7 @@ export default {
|
|
|
point_id: [2, 3], //积分类型 2AF 3BF
|
|
|
ptId: 1
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -569,11 +655,13 @@ export default {
|
|
|
},
|
|
|
'config.event.deptArr'(val) {
|
|
|
if(val.length>0){
|
|
|
- let dept_id = [];
|
|
|
- for (var i in val) {
|
|
|
- dept_id.push(val[i][val[i].length-1]);
|
|
|
- }
|
|
|
- this.config.event.dept = dept_id;
|
|
|
+ let dept_ids=[];
|
|
|
+ val.forEach((item)=>{
|
|
|
+ dept_ids.push(item[item.length-1]);
|
|
|
+ // dept_ids.push(...item);
|
|
|
+ })
|
|
|
+ let set =new Set(dept_ids);
|
|
|
+ this.config.event.dept = [...set];
|
|
|
}else{
|
|
|
this.config.event.dept=[];
|
|
|
}
|
|
@@ -581,11 +669,13 @@ export default {
|
|
|
},
|
|
|
'config.active.deptArr'(val) {
|
|
|
if(val.length>0){
|
|
|
- let dept_id = [];
|
|
|
- for (var i in val) {
|
|
|
- dept_id.push(val[i][val[i].length-1]);
|
|
|
- }
|
|
|
- this.config.active.dept = dept_id;
|
|
|
+ let dept_ids=[];
|
|
|
+ val.forEach((item)=>{
|
|
|
+ dept_ids.push(item[item.length-1]);
|
|
|
+ // dept_ids.push(...item);
|
|
|
+ })
|
|
|
+ let set =new Set(dept_ids);
|
|
|
+ this.config.active.dept = [...set];
|
|
|
}else{
|
|
|
this.config.active.dept=[];
|
|
|
}
|
|
@@ -593,11 +683,13 @@ export default {
|
|
|
},
|
|
|
'config.center.deptArr'(val) {
|
|
|
if(val.length>0){
|
|
|
- let dept_id = [];
|
|
|
- for (var i in val) {
|
|
|
- dept_id.push(val[i][val[i].length-1]);
|
|
|
- }
|
|
|
- this.config.center.dept = dept_id;
|
|
|
+ let dept_ids=[];
|
|
|
+ val.forEach((item)=>{
|
|
|
+ dept_ids.push(item[item.length-1]);
|
|
|
+ // dept_ids.push(...item);
|
|
|
+ })
|
|
|
+ let set =new Set(dept_ids);
|
|
|
+ this.config.center.dept = [...set];
|
|
|
}else{
|
|
|
this.config.center.dept=[];
|
|
|
}
|
|
@@ -605,16 +697,32 @@ export default {
|
|
|
},
|
|
|
'config.ranking.condition.deptArr'(val) {
|
|
|
if(val.length>0){
|
|
|
- let dept_id = [];
|
|
|
- for (var i in val) {
|
|
|
- dept_id.push(val[i][val[i].length-1]);
|
|
|
- }
|
|
|
- this.config.ranking.condition.dept = dept_id;
|
|
|
+ let dept_ids=[];
|
|
|
+ val.forEach((item)=>{
|
|
|
+ dept_ids.push(item[item.length-1]);
|
|
|
+ // dept_ids.push(...item);
|
|
|
+ })
|
|
|
+ let set =new Set(dept_ids);
|
|
|
+ this.config.ranking.condition.dept = [...set];
|
|
|
}else{
|
|
|
this.config.ranking.condition.dept=[];
|
|
|
}
|
|
|
this.closeDept()
|
|
|
},
|
|
|
+ 'config.ranking_total.condition.deptArr'(val) {
|
|
|
+ if(val.length>0){
|
|
|
+ let dept_ids=[];
|
|
|
+ val.forEach((item)=>{
|
|
|
+ dept_ids.push(item[item.length-1]);
|
|
|
+ // dept_ids.push(...item);
|
|
|
+ })
|
|
|
+ let set =new Set(dept_ids);
|
|
|
+ this.config.ranking_total.condition.dept = [...set];
|
|
|
+ }else{
|
|
|
+ this.config.ranking_total.condition.dept=[];
|
|
|
+ }
|
|
|
+ this.closeDept()
|
|
|
+ },
|
|
|
'config.ranking.condition.date'(val){
|
|
|
if(val!=1){
|
|
|
this.config.ranking.condition.start_date= val; //结束时间
|
|
@@ -651,7 +759,7 @@ export default {
|
|
|
this.getDepartment();
|
|
|
},
|
|
|
methods: {
|
|
|
- setTime(val){
|
|
|
+ setTime(val){
|
|
|
if(val&&val.length>0){
|
|
|
this.config.ranking.condition.start_date= val[0]; //结束时间
|
|
|
this.config.ranking.condition.end_date= val[1]+86399000; //结束时间
|
|
@@ -800,36 +908,52 @@ export default {
|
|
|
this.$message.error('请输入标题');
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
if (!this.config.company.name) {
|
|
|
this.$message.error('请输入组织名称和logo设置 “名称”');
|
|
|
return false;
|
|
|
}
|
|
|
- if (!this.config.ranking.name) {
|
|
|
- this.$message.error('请输入排行榜设置 “名称”');
|
|
|
- return false;
|
|
|
+
|
|
|
+ if(this.config.ranking_type=='ranking'){
|
|
|
+ if (!this.config.ranking.name) {
|
|
|
+ this.$message.error('请输入排行榜设置 “名称”');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if(!this.config.ranking_total.name){
|
|
|
+ this.config.ranking_total.name='累计B分排名'
|
|
|
+ }
|
|
|
+ if(this.config.ranking.condition.date == 1&&!this.config.ranking.condition.start_date){
|
|
|
+ if(this.config.ranking.condition.time.length!=0){
|
|
|
+ let time=this.config.ranking.condition.time
|
|
|
+ this.config.ranking.condition.start_date= time[0]; //结束时间
|
|
|
+ this.config.ranking.condition.end_date= time[1]+86399000; //结束时间
|
|
|
+ }else{
|
|
|
+ this.$message.error('请选择排行榜设置 “时间”');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if (!this.config.ranking_total.name) {
|
|
|
+ this.$message.error('请输入排行榜设置 “名称”');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if(!this.config.ranking.name){
|
|
|
+ this.config.ranking.name='排行榜'
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
if (!this.config.event.name) {
|
|
|
this.$message.error('请输入积分快讯设置 “名称”');
|
|
|
return false;
|
|
|
}
|
|
|
if (this.config.active.base_ratio>100) {
|
|
|
- this.$message.error('活跃度设置设置 “标尺” 不能超过100');
|
|
|
+ this.$message.error('活跃度设置 “标尺” 不能超过100');
|
|
|
return false;
|
|
|
}
|
|
|
if (!this.config.active.base_ratio) {
|
|
|
- this.$message.error('活跃度设置设置 “标尺” 不能为空,请输入1~100');
|
|
|
+ this.$message.error('活跃度设置 “标尺” 不能为空,请输入1~100');
|
|
|
return false;
|
|
|
}
|
|
|
- if(this.config.ranking.condition.date == 1&&!this.config.ranking.condition.start_date){
|
|
|
- if(this.config.ranking.condition.time.length!=0){
|
|
|
- let time=this.config.ranking.condition.time
|
|
|
- this.config.ranking.condition.start_date= time[0]; //结束时间
|
|
|
- this.config.ranking.condition.end_date= time[1]+86399000; //结束时间
|
|
|
- }else{
|
|
|
- this.$message.error('请选择排行榜设置 “时间”');
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
if (this.config.event.source_type.length==0) {
|
|
|
this.$message.error('请输入积分快讯设置 “来源” 至少选择一项');
|
|
|
return false;
|
|
@@ -842,6 +966,8 @@ export default {
|
|
|
remake_code: 0 ,//是否重新生成校验码 1 是 默认0
|
|
|
config:JSON.stringify(this.config)
|
|
|
}
|
|
|
+ // console.log(data)
|
|
|
+ // return false
|
|
|
this.$axios('post', '/api/integral/site/edit_screen', data).then(res => {
|
|
|
if (res.data.code == 1) {
|
|
|
this.$message.success("保存成功");
|
|
@@ -854,10 +980,25 @@ export default {
|
|
|
|
|
|
},
|
|
|
openSet(item) {
|
|
|
- this.config=item.config;
|
|
|
- this.selectItem=item;
|
|
|
- this.employee_selected.employee=item.config.ranking.condition.employee;
|
|
|
- this.dialogVisible = true;
|
|
|
+ if(!item.config.ranking_total){
|
|
|
+ item.config.ranking_total={
|
|
|
+ name: "累计B分排名", //不超过十个字
|
|
|
+ condition: { //筛选条件
|
|
|
+ dept: [], //限定部门ID列表 空全公司
|
|
|
+ deptArr: [],
|
|
|
+ point_id: "2",//2AF 3BF,
|
|
|
+ position: "employee",//employee manager all//员工 管理员 全部
|
|
|
+ exclusion: [],//不参与排名用户ID数组,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ item.config.ranking_type='ranking'
|
|
|
+ }
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.config=JSON.parse(JSON.stringify(item.config));
|
|
|
+ this.selectItem=item;
|
|
|
+ this.employee_selected.employee=item.config.ranking.condition.employee;
|
|
|
+ this.dialogVisible = true;
|
|
|
+ })
|
|
|
},
|
|
|
getList() {
|
|
|
this.loading = true;
|