|
@@ -12,15 +12,16 @@
|
|
</div>
|
|
</div>
|
|
<div class="flex-box-end" style="margin-top: 20px;">
|
|
<div class="flex-box-end" style="margin-top: 20px;">
|
|
<el-button v-if="$authoritys() != 'dept_manager' && $authoritys() != 'employee'" plain @click="isShowLog = true">刷新汇报记录</el-button>
|
|
<el-button v-if="$authoritys() != 'dept_manager' && $authoritys() != 'employee'" plain @click="isShowLog = true">刷新汇报记录</el-button>
|
|
- <el-button type="primary" @click="add()">添加日志模板</el-button>
|
|
|
|
|
|
+ <el-button type="primary" plain @click="add()">添加日志模板</el-button>
|
|
|
|
+ <el-button type="primary" @click="isPz = true">设置<i class="el-icon-setting el-icon--right"></i></el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<el-table ref="multipleTable" :data="list" tooltip-effect="dark" align="center" v-loading="loading">
|
|
<el-table ref="multipleTable" :data="list" tooltip-effect="dark" align="center" v-loading="loading">
|
|
<el-table-column label="序号" align="left" type="index"></el-table-column>
|
|
<el-table-column label="序号" align="left" type="index"></el-table-column>
|
|
<el-table-column label="日志名称" prop="name"></el-table-column>
|
|
<el-table-column label="日志名称" prop="name"></el-table-column>
|
|
- <el-table-column label="日志积分规则">
|
|
|
|
|
|
+ <el-table-column label="日志积分规则" min-width="300">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span>{{ getMoney(scope.row.interval) }}汇报,每次奖{{ scope.row.config.point }} B分</span>
|
|
|
|
|
|
+ <span>{{ getMoney(scope.row.interval) }}汇报,每次奖{{ scope.row.config.point }} B分,汇报超过{{scope.row.config.point}}次不再奖励积分</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="状态">
|
|
<el-table-column label="状态">
|
|
@@ -47,7 +48,17 @@
|
|
</template>
|
|
</template>
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
- <el-dialog title="设置" :visible.sync="dialogVisible" top="25vh" width="520px" class="dialog">
|
|
|
|
|
|
+ <el-dialog title="日志配置" :visible.sync="isPz" top="25vh" width="520px" class="dialog">
|
|
|
|
+ <el-alert class="el-dialog__body" title="日志配置适用所有日志" type="warning" :closable="false" show-icon></el-alert>
|
|
|
|
+ <el-form label-width="170px" ref="setForm" class="form">
|
|
|
|
+ <el-form-item label="是否允许查看日志内容"><el-switch v-model="see_log" :active-value="1" :inactive-value="0"></el-switch></el-form-item>
|
|
|
|
+ <el-form-item style="text-align: right; margin-bottom: 0">
|
|
|
|
+ <el-button @click="isPz = false">取消</el-button>
|
|
|
|
+ <el-button type="primary" :loading="setLoading" :disabled="setLoading" @click="saveFirst()">确定</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ <el-dialog title="添加日志模板" :visible.sync="dialogVisible" top="25vh" width="520px" class="dialog">
|
|
<el-alert class="el-dialog__body" title="日志名称必须与钉钉日志模板名称一致,否则设置无效,不会产生积分" type="warning" :closable="false" show-icon></el-alert>
|
|
<el-alert class="el-dialog__body" title="日志名称必须与钉钉日志模板名称一致,否则设置无效,不会产生积分" type="warning" :closable="false" show-icon></el-alert>
|
|
<el-form label-width="110px" :model="selectItem" ref="setForm" class="form">
|
|
<el-form label-width="110px" :model="selectItem" ref="setForm" class="form">
|
|
<el-form-item style="margin-bottom: 0px;" label="日志名称">
|
|
<el-form-item style="margin-bottom: 0px;" label="日志名称">
|
|
@@ -141,6 +152,7 @@ export default {
|
|
ding_enable: true,
|
|
ding_enable: true,
|
|
list: [],
|
|
list: [],
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
|
|
+ isPz:false,
|
|
pickerOptions: {
|
|
pickerOptions: {
|
|
disabledDate(time) {
|
|
disabledDate(time) {
|
|
return time.getTime() > Date.now() - 8.64e7;
|
|
return time.getTime() > Date.now() - 8.64e7;
|
|
@@ -179,7 +191,9 @@ export default {
|
|
logData: {
|
|
logData: {
|
|
type: 1,
|
|
type: 1,
|
|
target_date: ''
|
|
target_date: ''
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ configData:{},
|
|
|
|
+ see_log:1
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -200,8 +214,32 @@ export default {
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.getList();
|
|
this.getList();
|
|
|
|
+ this.cheakAx();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ saveFirst(name) {
|
|
|
|
+ this.configData.see_log=this.see_log
|
|
|
|
+ this.$axios('post', '/api/integral/site/config', this.configData)
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data.code == 1) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.data.msg,
|
|
|
|
+ type: 'success'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .finally(() => {
|
|
|
|
+ this.isPz=false;
|
|
|
|
+ this.cheakAx('first');
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ cheakAx() {
|
|
|
|
+ this.$axios('get', '/api/integral/site/config').then(res => {
|
|
|
|
+ this.$store.dispatch('setConfig', res.data.data);
|
|
|
|
+ this.configData = res.data.data;
|
|
|
|
+ this.see_log=res.data.data.see_log;
|
|
|
|
+ })
|
|
|
|
+ },
|
|
refresh(fromName) {
|
|
refresh(fromName) {
|
|
this.$refs[fromName].validate(valid => {
|
|
this.$refs[fromName].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
@@ -324,7 +362,6 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
openSet(item) {
|
|
openSet(item) {
|
|
- console.log(item);
|
|
|
|
var jsonItem = JSON.stringify(item);
|
|
var jsonItem = JSON.stringify(item);
|
|
this.selectItem = JSON.parse(jsonItem);
|
|
this.selectItem = JSON.parse(jsonItem);
|
|
this.selectItem.enable = this.selectItem.enable == 0 ? false : true;
|
|
this.selectItem.enable = this.selectItem.enable == 0 ? false : true;
|