Commit 54c2ef84 by crushh

update: dist

parent 84409a12
...@@ -24,4 +24,20 @@ const clipboard = { ...@@ -24,4 +24,20 @@ const clipboard = {
el.removeEventListener('click', el.handler); el.removeEventListener('click', el.handler);
} }
}; };
export default { clipboard }; const linkMap = {
code: 'https://www.yuque.com/exnmlu/oo64hg/thm172#w4sOg',
link: 'https://www.yuque.com/exnmlu/oo64hg/lggf7q#eV2NM'
};
const jumpLink = {
bind(el, binding) {
const { arg } = binding;
el.handler = function() {
window.open(linkMap[arg]);
};
el.addEventListener('click', el.handler);
},
unbind: function(el) {
el.removeEventListener('click', el.handler);
}
};
export default { clipboard, jumpLink };
import Vue from 'vue' import Vue from 'vue';
import Clipboard from 'clipboard' import Clipboard from 'clipboard';
function clipboardSuccess() { function clipboardSuccess() {
Vue.prototype.$message({ Vue.prototype.$message({
message: 'Copy successfully', message: 'Copy successfully',
type: 'success', type: 'success',
duration: 1500 duration: 1500
}) });
} }
function clipboardError() { function clipboardError() {
Vue.prototype.$message({ Vue.prototype.$message({
message: 'Copy failed', message: 'Copy failed',
type: 'error' type: 'error'
}) });
} }
export default function handleClipboard(text, event) { export default function handleClipboard(text, event) {
const clipboard = new Clipboard(event.target, { const clipboard = new Clipboard(event.target, {
text: () => text text: () => text
}) });
clipboard.on('success', () => { clipboard.on('success', () => {
clipboardSuccess() clipboardSuccess();
clipboard.off('error') clipboard.off('error');
clipboard.off('success') clipboard.off('success');
clipboard.destroy() clipboard.destroy();
}) });
clipboard.on('error', () => { clipboard.on('error', () => {
clipboardError() clipboardError();
clipboard.off('error') clipboard.off('error');
clipboard.off('success') clipboard.off('success');
clipboard.destroy() clipboard.destroy();
}) });
clipboard.onClick(event) clipboard.onClick(event);
} }
/*设置cookie*/ /*设置cookie*/
export function setCookie(c_name,value,expire) { export function setCookie(c_name, value, expire) {
var date=new Date(); var date = new Date();
date.setSeconds(date.getSeconds()+expire); date.setSeconds(date.getSeconds() + expire);
document.cookie = c_name + "="+ encodeURI(value)+"; expires="+date.toGMTString(); document.cookie = c_name + '=' + encodeURI(value) + '; expires=' + date.toGMTString();
} }
/*获取cookie*/ /*获取cookie*/
export function getCookie(c_name){ export function getCookie(c_name) {
if(document.cookie.length>0){ if (document.cookie.length > 0) {
var name = encodeURI(c_name); var name = encodeURI(c_name);
var allcookies = document.cookie; var allcookies = document.cookie;
name += "="; name += '=';
var pos = allcookies.indexOf(name); var pos = allcookies.indexOf(name);
if(pos != -1){ if (pos != -1) {
var start = pos + name.length; var start = pos + name.length;
var end = allcookies.indexOf(";",start); var end = allcookies.indexOf(';', start);
if(end == -1){ if (end == -1) {
end = allcookies.length; end = allcookies.length;
} }
var value = allcookies.substring(start,end); var value = allcookies.substring(start, end);
return decodeURI(value); return decodeURI(value);
} else{ } else {
return ""; return '';
} }
} }
} }
/*删除cookie*/ /*删除cookie*/
export function delCookie(c_name){ export function delCookie(c_name) {
setCookie(c_name, "", -1); setCookie(c_name, '', -1);
} }
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<dm-sub-title class="m-b-10"> <dm-sub-title class="m-b-10">
<div class="title"> <div class="title">
<span>引流加入</span> <span>引流加入</span>
<el-button type="text"><i class="iconfont-hb3 iconzhibiaoshuoming info-icon"></i>指标说明</el-button> <el-button type="text" v-jumpLink:link><i class="iconfont-hb3 iconzhibiaoshuoming m-r-6"></i>指标说明</el-button>
</div> </div>
</dm-sub-title> </dm-sub-title>
<!-- <el-tabs v-model="activeName" @tab-click="handleClick"> <!-- <el-tabs v-model="activeName" @tab-click="handleClick">
...@@ -284,9 +284,6 @@ export default { ...@@ -284,9 +284,6 @@ export default {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.info-icon {
margin-right: 8px;
}
} }
.overFlow { .overFlow {
overflow: hidden; overflow: hidden;
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<dm-sub-title> <dm-sub-title>
<div class="title"> <div class="title">
<span>概览</span> <span>概览</span>
<el-button type="text"><i class="iconfont-hb3 iconzhibiaoshuoming info-icon"></i>指标说明</el-button> <el-button type="text" v-jumpLink:link><i class="iconfont-hb3 iconzhibiaoshuoming m-r-6"></i>指标说明</el-button>
</div> </div>
</dm-sub-title> </dm-sub-title>
<el-row :gutter="20"> <el-row :gutter="20">
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<dm-sub-title> <dm-sub-title>
<div class="title"> <div class="title">
<span>查看明细</span> <span>查看明细</span>
<el-button type="text"><i class="iconfont-hb3 iconzhibiaoshuoming info-icon"></i>指标说明</el-button> <el-button type="text" v-jumpLink:link><i class="iconfont-hb3 iconzhibiaoshuoming m-r-6"></i>指标说明</el-button>
</div> </div>
</dm-sub-title> </dm-sub-title>
<data-detail :id="linkId" typeT="link" :api="statisticsClerk" class="m-t-15"></data-detail> <data-detail :id="linkId" typeT="link" :api="statisticsClerk" class="m-t-15"></data-detail>
...@@ -345,9 +345,6 @@ export default { ...@@ -345,9 +345,6 @@ export default {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.info-icon {
margin-right: 8px;
}
} }
.justify-end { .justify-end {
justify-content: flex-end; justify-content: flex-end;
......
...@@ -7,8 +7,7 @@ ...@@ -7,8 +7,7 @@
<span class="font-w-500 color-303133">概览</span> <span class="font-w-500 color-303133">概览</span>
</div> </div>
<div class="flex"> <div class="flex">
<i class="iconfont-hb3 iconzhibiaoshuoming color-1890ff"></i> <el-button type="text" v-jumpLink:code><i class="iconfont-hb3 iconzhibiaoshuoming m-r-6"></i>指标说明</el-button>
<div class="color-1890ff font-14 p-l-6" @click="explain('https://www.yuque.com/exnmlu/oo64hg/thm172#OoBcf')">指标说明</div>
</div> </div>
</div> </div>
<ul class="flex"> <ul class="flex">
...@@ -52,8 +51,7 @@ ...@@ -52,8 +51,7 @@
<span class="font-w-500 color-303133">查看明细</span> <span class="font-w-500 color-303133">查看明细</span>
</div> </div>
<div class="flex"> <div class="flex">
<i class="iconfont-hb3 iconzhibiaoshuoming color-1890ff"></i> <el-button type="text" v-jumpLink:code><i class="iconfont-hb3 iconzhibiaoshuoming m-r-6"></i>指标说明</el-button>
<div class="color-1890ff font-14 p-l-6" @click="explain('https://www.yuque.com/exnmlu/oo64hg/thm172#OoBcf')">指标说明</div>
</div> </div>
</div> </div>
<data-detail :id="hmId"></data-detail> <data-detail :id="hmId"></data-detail>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<dm-sub-title text="配置标签" class="m-b-10"> <dm-sub-title text="配置标签" class="m-b-10">
<div class="title"> <div class="title">
<span>员工活码</span> <span>员工活码</span>
<span class="info-content cur-po"><i class="iconfont-hb3 iconzhibiaoshuoming info-icon"></i>指标说明</span> <el-button type="text" v-jumpLink:code><i class="iconfont-hb3 iconzhibiaoshuoming m-r-6"></i>指标说明</el-button>
</div> </div>
</dm-sub-title> </dm-sub-title>
<act-code-table :currentGroupId="currentGroupId"></act-code-table> <act-code-table :currentGroupId="currentGroupId"></act-code-table>
...@@ -83,13 +83,6 @@ export default { ...@@ -83,13 +83,6 @@ export default {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.info-content {
color: #2f54eb;
font-size: 14px;
}
.info-icon {
margin-right: 8px;
}
} }
.cur-po { .cur-po {
cursor: pointer; cursor: pointer;
......
...@@ -515,6 +515,9 @@ input:focus { ...@@ -515,6 +515,9 @@ input:focus {
.m-t-46 { .m-t-46 {
margin-top: 46px; margin-top: 46px;
} }
.m-r-6{
margin-right: 6px !important;
}
.m-r-10 { .m-r-10 {
margin-right: 10px; margin-right: 10px;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment