|
@@ -8,7 +8,7 @@
|
|
|
<el-row style="min-width:1160px;">
|
|
|
<el-col :span="18" style="min-width:780px;">
|
|
|
<el-row class="home-left-header">
|
|
|
- <el-col :span="7" class="hlheader-user" v-loading="">
|
|
|
+ <el-col :span="7" class="hlheader-user">
|
|
|
<el-row :gutter="40">
|
|
|
<el-col :span="24" class="hlheader-user-info">
|
|
|
<div class="headimg" style=" margin-right: 0px;cursor:pointer;">
|
|
@@ -287,6 +287,13 @@
|
|
|
</el-row>
|
|
|
</el-col>
|
|
|
<el-col :span="6" style="min-width:280px;">
|
|
|
+ <el-row v-if="$supremeAuthority()!='employee'&&$supremeAuthority()!='creator'">
|
|
|
+ <div class="right-all-style flex-box-ce" style="background-color:#fff;padding:20px;;text-align:left;margin-bottom: 10px;cursor: pointer;" @click="ruleQRcode">
|
|
|
+ <img src="./assets/image/zq.png" style="width: 20px;height: 20px;margin-right: 10px;"/>
|
|
|
+ <div style="font-size: 15px;" class="zb flex-1">{{thisweek}} 积分周报</div>
|
|
|
+ <i class="el-icon-arrow-right" style="font-size: 18px;"></i>
|
|
|
+ </div>
|
|
|
+ </el-row>
|
|
|
<el-row v-if="!creatorJurisdiction">
|
|
|
<div class="right-all-style" style="background-color:#fff;padding:20px;;text-align:left;margin-bottom: 10px;">
|
|
|
<span class="title">常用</span>
|
|
@@ -439,12 +446,19 @@
|
|
|
<span slot="footer" class="dialog-footer"><el-button @click="$router.push({ path: '/update_notice' })" type="primary" round>查看详情</el-button></span>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
+ <el-dialog @close="closeCode" :visible.sync="innerVisible" width="444px">
|
|
|
+ <div style="border-radius: 15px;border: 1px solid #f1f1f1;padding: 10px; width: 346px;box-sizing: border-box;margin: 0 auto;">
|
|
|
+ <div id="qrcode" ref="qrcode"></div>
|
|
|
+ </div>
|
|
|
+ <div style="margin-top: 10px;text-align: center;color: #666;">请使用钉钉APP扫描二维码</div>
|
|
|
+ </el-dialog>
|
|
|
<examinePopup :title="'审核详情'" :id="detail_id" :show.sync="detailShow"></examinePopup>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
var bool = true; // 五秒执行一次变量
|
|
|
+import QRCode from 'qrcodejs2';
|
|
|
import examinePopup from '@/components/examinePopup';
|
|
|
import { contactAdminToUseApp } from 'dingtalk-design-libs';
|
|
|
export default {
|
|
@@ -557,7 +571,9 @@ export default {
|
|
|
// 待我审批模块
|
|
|
auditList: [],
|
|
|
detail_id: 0,
|
|
|
- detailShow: false
|
|
|
+ detailShow: false,
|
|
|
+ thisweek:'',
|
|
|
+ innerVisible:false
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -566,6 +582,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
+ console.log(this.$supremeAuthority())
|
|
|
if (this.employeeRout) {
|
|
|
this.inCommonUse = [];
|
|
|
this.inCommonUse.push(
|
|
@@ -582,7 +599,7 @@ export default {
|
|
|
}
|
|
|
var url = window.location.href;
|
|
|
var rUrl = this.GetRequest(url).url || '';
|
|
|
- console.log('url=' + rUrl);
|
|
|
+ // console.log('url=' + rUrl);
|
|
|
this.$nextTick(function() {
|
|
|
if (rUrl) {
|
|
|
setTimeout(() => {
|
|
@@ -590,8 +607,56 @@ export default {
|
|
|
}, 200);
|
|
|
}
|
|
|
});
|
|
|
+ this.setDate()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 关闭弹框,清除已经生成的二维码
|
|
|
+ closeCode() {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$refs.qrcode.innerHTML = '';
|
|
|
+ }, 150);
|
|
|
+ },
|
|
|
+ ruleQRcode() {
|
|
|
+ this.innerVisible = true;
|
|
|
+ // 使用$nextTick确保数据渲染
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.payOrder();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ payOrder () {// 展示二维码
|
|
|
+ let url = 'dingtalk://dingtalkclient/action/open_micro_app'
|
|
|
+ let appid = '?appId='+this.$appId
|
|
|
+ let corpId = '&corpId='+this.$getCache('corpId')
|
|
|
+ let page = '&page='+encodeURIComponent(`pages/reportBox/report/report?employee_id=${encodeURIComponent(this.$getUserData().id)}`)//encodeURIComponent('小米')
|
|
|
+ let urls = url+appid+corpId+page
|
|
|
+ var qrcode = new QRCode('qrcode', {
|
|
|
+ text: urls, // 二维码内容
|
|
|
+ width: 325,
|
|
|
+ height: 325,
|
|
|
+ render: 'table', // 设置渲染方式(有两种方式 table和canvas,默认是canvas)
|
|
|
+ colorDark: '#34373e', // 二维码色
|
|
|
+ colorLight: '#ffffff', // 背景色
|
|
|
+ correctLevel: QRCode.CorrectLevel.H // 容错等级,H是heigh,最高,所以二维码看起来很密
|
|
|
+ })
|
|
|
+ },
|
|
|
+ setDate() {
|
|
|
+ var thisweek = {};
|
|
|
+ var date = new Date();
|
|
|
+ // 本周一的日期
|
|
|
+ date.setDate(date.getDate() - date.getDay() + 1);
|
|
|
+ let month = (date.getMonth() + 1) < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)
|
|
|
+ let getDate = date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()
|
|
|
+ thisweek.start_day = month + "-" + getDate;
|
|
|
+ // thisweek.start_day = date.getFullYear() + "-" + month + "-" + getDate;
|
|
|
+
|
|
|
+ // 本周日的日期
|
|
|
+ date.setDate(date.getDate() + 6);
|
|
|
+ let month2 = (date.getMonth() + 1) < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)
|
|
|
+ let getDate2 = date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()
|
|
|
+ thisweek.end_day =month2 + "-" + getDate2;
|
|
|
+ // thisweek.end_day = date.getFullYear() + "-" + month2 + "-" + getDate2;
|
|
|
+ this.thisweek=thisweek.start_day+'~'+thisweek.end_day
|
|
|
+ },
|
|
|
GetRequest(urlStr) {
|
|
|
if (typeof urlStr == 'undefined') {
|
|
|
var url = decodeURI(location.search); //获取url中"?"符后的字符串
|
|
@@ -1342,6 +1407,9 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style scoped="scoped" lang="scss">
|
|
|
+.zb:hover{
|
|
|
+ color: #089fff;
|
|
|
+}
|
|
|
.ts {
|
|
|
height: 64px;
|
|
|
padding: 8px 16px;
|