Commit 1be98d4e by zhangmeng

fix:人群筛选器的bug

parent e6e01073
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/app.9bc178d37e0be6750cece5e9d9e06bca.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/marketing/static/js/manifest.0a85049e489e85ac5f0a.js></script><script type=text/javascript src=/marketing/static/js/vendor.f92319ba928c5756eb44.js></script><script type=text/javascript src=/marketing/static/js/app.9f2a8b89c1d4172380ea.js></script></body></html> <!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/app.e0d1ced3c6a22ac266004670f550551a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/marketing/static/js/manifest.0a85049e489e85ac5f0a.js></script><script type=text/javascript src=/marketing/static/js/vendor.9ccab0703cb066fbeb2c.js></script><script type=text/javascript src=/marketing/static/js/app.aa441df94fd8ec2346ab.js></script></body></html>
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -241,3 +241,46 @@ ...@@ -241,3 +241,46 @@
.el-menu.el-menu--popup .el-menu-item.is-active label { .el-menu.el-menu--popup .el-menu-item.is-active label {
color: #fff; color: #fff;
} }
//游戏的样式
.game-tips__preview{
width:330px;
height:450px;
background:rgba(0,0,0,0.5);
overflow: hidden;
&__inner {
background: #fff;
border-radius: 10px;
width: 270px;
height: 380px;
margin: 30px 30px 40px 30px;
text-align: center;
}
&--title {
color:#000;
font-size: 16px;
letter-spacing: 1.0;
line-height: 22px;
text-align: center;
padding:10px 0;
}
&--img {
display: inline-block;
width: 200px;
height: 200px;
}
&--desc {
color: #000;
font-size: 12px;
width: 200px;
line-height:20px;
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-line-clamp:4;
-webkit-box-orient:vertical
}
}
...@@ -134,12 +134,28 @@ a:hover { ...@@ -134,12 +134,28 @@ a:hover {
.mb20{ .mb20{
margin-bottom: 20px!important; margin-bottom: 20px!important;
} }
.width50{ .width20{
width: 50%!important; width: 20%!important;
} }
.width30{ .width30{
width: 30%!important; width: 30%!important;
} }
.width40{
width: 40%!important;
}
.width50{
width: 50%!important;
}
.width60{
width: 60%!important;
}
.width70{
width: 70%!important;
}
.width80{
width: 80%!important;
}
.width-auto{ .width-auto{
width: auto!important; width: auto!important;
} }
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
:value="item.wechat_menu_dict_id"> :value="item.wechat_menu_dict_id">
</el-option> </el-option>
</el-select> </el-select>
<div v-show="leftUrl=='12'" class="fr select-shop"> <div v-show="leftUrl=='12'" class="fr select-shop">
<el-input @focus="dialogShopShow" suffix-icon="el-icon-arrow-down" v-model="selectShopUrl" placeholder="选择门店"></el-input> <el-input @focus="dialogShopShow" suffix-icon="el-icon-arrow-down" v-model="selectShopUrl" placeholder="选择门店"></el-input>
</div> </div>
...@@ -24,7 +23,7 @@ ...@@ -24,7 +23,7 @@
</div> </div>
<!-- 选择门店 --> <!-- 选择门店 -->
<div class="choose-wrap"> <div class="choose-wrap">
<vue-gic-store :showStoreDialog="showStoreDialog" @selectStore="selectStore"></vue-gic-store> <vue-gic-store :showStoreDialog="showStoreDialog" @selectStore="selectStore" :appendToBody="true"></vue-gic-store>
</div> </div>
</div> </div>
</template> </template>
...@@ -93,7 +92,6 @@ ...@@ -93,7 +92,6 @@
requestProject:'gic-web' requestProject:'gic-web'
})).then((res)=>{ })).then((res)=>{
var data = res.data; var data = res.data;
// console.log(data);
if(data.errorCode==0){ if(data.errorCode==0){
this.leftOptions = data.result; this.leftOptions = data.result;
}else{ }else{
...@@ -107,27 +105,6 @@ ...@@ -107,27 +105,6 @@
selectLeftUrl(val,valR){ // 选择左侧链接 获取右侧 selectLeftUrl(val,valR){ // 选择左侧链接 获取右侧
this.leftUrl = val; this.leftUrl = val;
this.rightUrl = valR; this.rightUrl = valR;
//console.log(this.leftUrl);
//console.log(this.rightUrl);
// if (leftUrl)
// let leftVal = '';
// this.leftOptions.map(v => {
// if (v.wechat_menu_dict_id == this.leftUrl) {
// leftVal = v.wechat_menu_dict_url
// }
// })
// // debugger
// console.log(this.leftOptions.map(v => v.wechat_menu_dict_url),leftVal)
// this.$emit('sendLeftUrl',this.leftUrl);
// this.$emit('sendRightUrl',this.rightUrl);
if(!this.defaultUrl){ if(!this.defaultUrl){
this.rightUrl = ''; this.rightUrl = '';
} }
...@@ -164,7 +141,7 @@ ...@@ -164,7 +141,7 @@
name = v.wechat_menu_dict_name name = v.wechat_menu_dict_name
} }
}) })
this.$emit('sendRightUrl',{name:name,url:val}); this.$emit('sendRightUrl',{name:name,url:val});
}, },
dialogShopShow(){ // 显示门店弹窗 dialogShopShow(){ // 显示门店弹窗
var that = this; var that = this;
...@@ -176,50 +153,8 @@ ...@@ -176,50 +153,8 @@
this.showStoreDialog = false; this.showStoreDialog = false;
this.selectShopUrl = val.storeName; this.selectShopUrl = val.storeName;
console.log(this.selectShopUrl); console.log(this.selectShopUrl);
this.$emit('sendShopData',{name:val.storeName,url:this.baseUrl + '?id='+val.storeId}); this.$emit('sendShopData',{name:val.storeName,url:this.baseUrl + '?id='+val.storeId});
}, }
// getShopList(){ // 获取门店列表
// this.axios.post('/api-admin/store-list-paging',qs.stringify({
// searchName:'',
// completeStatus:1,
// status:1,
// channelType:0,
// storeGroupId:'',
// pageSize:this.pageSize,
// currentPage:this.currentPage
// })).then((res)=>{
// var data = res.data;
// // console.log(data);
// if(data.errorCode==0){
// var result = data.result;
// this.tableData2 = result.list;
// this.totalCount = result.page.totalCount
// }else{
// this.$message({
// type:'error',
// message:data.message
// })
// }
// })
// },
// handleCurrentChangeSelectShop(val){ // 选择门店发生变化时触发
// this.radioShop = val.storeId;
// this.showShopDetail = val.storeName
// },
// chooseShopBtn(){ // 选择门店
// if(this.radioShop==''){
// this.dialogShop = false;
// } else {
// this.dialogShop = false;
// this.selectShopUrl = this.showShopDetail
// }
// },
// handleSizeChange(val){ // 选择分页符
// console.log(`每页 ${val} 条`);
// },
// handleCurrentChange(val) {
// console.log(`当前页: ${val}`);
// },
} }
} }
</script> </script>
...@@ -267,6 +202,6 @@ ...@@ -267,6 +202,6 @@
padding: 10px 20px; padding: 10px 20px;
} }
.choose-wrap /deep/ .el-dialog { .choose-wrap /deep/ .el-dialog {
height: auto!important; height: auto!important;
} }
</style> </style>
<!--
/**
* 链接小工具组件(页面内) by fairyly on 2018/06/15
* 组件调用
*/
<linktoolspage :showType="showType" :linkToolsVisible="linkToolsVisible" @linkSelect="linkSelect"/>
import Linktoolspage from 'components/linktools/linktoolspage.vue'
// 链接小工具参数
linkToolsVisible: false, //显示参数
showType: 0, // 显示类型,插件默认 0:显示全部 ,1: (底部导航);2: (公众号菜单:只有小程序的,没有h5)
// methods
// linktools
showLinkDialog() {
this.linkToolsVisible = true;
},
linkSelect(val) {
console.log(val)
// 关闭时隐藏
this.linkToolsVisible = false;
}
components: {
Linktools
}
-->
<template> <template>
<!-- 链接小工具 --> <!-- 链接小工具 -->
<div class="link-tools-contain"> <div class="link-tools-contain">
<div :class="activeName == 'first'? 'min-1028':'min-720'"> <div :class="activeName?'min-780':'min-1028'">
<div class="el-dialog" > <div class="el-dialog" >
<div class="el-dialog__body"> <div class="el-dialog__body">
<!-- 链接类型 --> <!-- 链接类型 -->
...@@ -225,11 +195,10 @@ import qs from 'qs'; ...@@ -225,11 +195,10 @@ import qs from 'qs';
export default { export default {
name: 'links', name: 'links',
props: ['linkToolsVisible','showType','projectName'], props: ['linkToolsVisible','showType','projectName','activeName'],
data () { data () {
return { return {
repProjectName: 'gic-web', // 项目名 repProjectName: 'gic-web', // 项目名
activeName: 'first',
linkShowType: 0, //传参数判断显示类型 linkShowType: 0, //传参数判断显示类型
// --------------------------- // ---------------------------
twoLevelVisible: false, // 二级下拉 twoLevelVisible: false, // 二级下拉
...@@ -1609,7 +1578,7 @@ export default { ...@@ -1609,7 +1578,7 @@ export default {
right: 0; right: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
line-height: 34px; line-height: 32px;
user-select: none; user-select: none;
pointer-events: none; pointer-events: none;
} }
...@@ -2178,7 +2147,7 @@ export default { ...@@ -2178,7 +2147,7 @@ export default {
} }
.goods-link-item { .goods-link-item {
display: inline-block; display: inline-block;
width: 310px; width: 227px;
padding: 10px 10px; padding: 10px 10px;
height: 110px; height: 110px;
border: 1px solid #e7e7eb; border: 1px solid #e7e7eb;
...@@ -2198,7 +2167,7 @@ export default { ...@@ -2198,7 +2167,7 @@ export default {
} }
.goods-message{ .goods-message{
width: 65%; width: 100px;
/*margin-top: 10px;*/ /*margin-top: 10px;*/
vertical-align: top; vertical-align: top;
margin-left: 5px; margin-left: 5px;
...@@ -2260,6 +2229,7 @@ export default { ...@@ -2260,6 +2229,7 @@ export default {
text-align: right; text-align: right;
font-size: 14px; font-size: 14px;
padding-right: 10px; padding-right: 10px;
vertical-align: middle;
} }
.el-select+.el-select{ .el-select+.el-select{
...@@ -2417,9 +2387,9 @@ export default { ...@@ -2417,9 +2387,9 @@ export default {
} }
} }
.min-720 { .min-780 {
.el-dialog { .el-dialog {
min-width: 720px; min-width: 780px;
} }
} }
...@@ -2454,13 +2424,13 @@ export default { ...@@ -2454,13 +2424,13 @@ export default {
font-size: 14px; font-size: 14px;
.vue-treeselect__control { .vue-treeselect__control {
height: 40px; height: 32px;
/*line-height: 36px;*/ line-height: 32px;
cursor: pointer; cursor: pointer;
} }
.vue-treeselect__placeholder { .vue-treeselect__placeholder {
line-height: 40px; line-height: 32px;
font-size: 13.3333px; font-size: 13.3333px;
} }
...@@ -2470,6 +2440,7 @@ export default { ...@@ -2470,6 +2440,7 @@ export default {
} }
.vue-treeselect div, .vue-treeselect span { .vue-treeselect div, .vue-treeselect span {
line-height: 32px;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
} }
......
...@@ -5,26 +5,18 @@ import store from './store' ...@@ -5,26 +5,18 @@ import store from './store'
import {axios} from './service/api/index' import {axios} from './service/api/index'
import directives from './directives' import directives from './directives'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css'
import vueGicHeader from '@gic-test/vue-gic-header' import vueGicHeader from '@gic-test/vue-gic-header'
import vueGicFooter from '@gic-test/vue-gic-footer' import vueGicFooter from '@gic-test/vue-gic-footer'
import vueGicAsideMenu from '@/components/aside-menu' import vueGicAsideMenu from '@/components/aside-menu'
import vueGicCard from '@gic-test/vue-gic-card' import vueGicCard from '@gic-test/vue-gic-card'
import vueGicStore from '@gic-test/vue-gic-store' import vueGicStore from '@gic-test/vue-gic-store'
import vueGicStoreLinkage from '@gic-test/vue-gic-store-linkage/src/lib' import vueGicStoreLinkage from '@gic-test/vue-gic-store-linkage/src/lib'
import vueGicStoreGroup from '@gic-test/vue-gic-store-group' import vueGicStoreGroup from '@gic-test/vue-gic-store-group'
import vueGicPeople from '@gic-test/vue-gic-people' import vueGicPeople from '@gic-test/vue-gic-people/src/lib'
import vueGicConfirmPeople from '@gic-test/vue-gic-confirm-people/src/lib' import vueGicConfirmPeople from '@gic-test/vue-gic-confirm-people/src/lib'
import vueGicImgPreview from '@gic-test/vue-gic-img-preview' import vueGicImgPreview from '@gic-test/vue-gic-img-preview'
// import vueGicMarketingEvent from '@gic-test/vue-gic-marketing-event'
import { gicStoreCard } from '@gic-test/vue-gic-store-new/src/lib' import { gicStoreCard } from '@gic-test/vue-gic-store-new/src/lib'
import packele from 'packele' import packele from 'packele'
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.use(packele) Vue.use(packele)
Vue.use(ElementUI) Vue.use(ElementUI)
...@@ -39,7 +31,6 @@ Vue.use(vueGicPeople) ...@@ -39,7 +31,6 @@ Vue.use(vueGicPeople)
Vue.use(vueGicConfirmPeople) Vue.use(vueGicConfirmPeople)
Vue.use(vueGicImgPreview) Vue.use(vueGicImgPreview)
Vue.use(gicStoreCard) Vue.use(gicStoreCard)
// Vue.use(vueGicMarketingEvent)
Vue.prototype.axios = axios; Vue.prototype.axios = axios;
Vue.prototype.axios.withCredentials = true Vue.prototype.axios.withCredentials = true
Object.keys(directives).map(item => Vue.directive(item, directives[item])); Object.keys(directives).map(item => Vue.directive(item, directives[item]));
......
...@@ -6,6 +6,7 @@ import storeNew from '@/test/example/store-new' ...@@ -6,6 +6,7 @@ import storeNew from '@/test/example/store-new'
import card from '@/test/example/card' import card from '@/test/example/card'
import linkTools from '@/test/example/link-tools' import linkTools from '@/test/example/link-tools'
import dmTable from '@/test/example/dm-table'; import dmTable from '@/test/example/dm-table';
import wxText from '@/test/example/wx-text';
export default { export default {
path: '/test', path: '/test',
...@@ -40,9 +41,14 @@ export default { ...@@ -40,9 +41,14 @@ export default {
}, },
{ {
path: 'table', path: 'table',
name: '链接小工具', name: '表格封装',
component: dmTable component: dmTable
}, },
{
path: 'wxtext',
name: '微信文本编辑器',
component: wxText
}
] ]
}; };
......
<template>
<el-dialog title="添加链接" :visible.sync="show" width="820px" :before-close="close">
<el-form label-width="80px">
<el-form-item label="文本内容">
<dm-input :maxlength="50" v-model="linkText" class="w300"></dm-input>
</el-form-item>
<el-tabs v-model="activeName" type="card">
<el-tab-pane label="H5链接" name="0">
<el-form-item label="链接类型">
<el-radio-group v-model="h5Type">
<el-radio :label="0">内部链接</el-radio>
<el-radio :label="1">网址</el-radio>
</el-radio-group>
</el-form-item>
<span class="pl20 pb10">已选择链接:{{url || '--'}}</span>
<innerUrl class="ml30" v-if="h5Type === 0" @sendRightUrl="getRightUrl" @sendLeftUrl="getLeftUrl" @sendShopData="getShopData"></innerUrl>
<div class="ml30 clearfix" v-if="h5Type === 1" >
<el-input v-model="url" class="w300" @blur="checkUrl"></el-input>
</div>
</el-tab-pane>
<el-tab-pane label="小程序链接" name="1">
<span class="pl20 pb10">已选择链接:{{url || '--'}}</span>
<linktoolspage ref="childlinktoolspage" :isWx="true" :activeName="true" :showType="2" @linkSelect="linkSelect"/>
</el-tab-pane>
</el-tabs>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="close">取 消</el-button>
<el-button type="primary" @click="submit">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
import Vue from 'vue';
import innerUrl from '@/components/innerUrl/innerUrl';
import linktoolspage from '@/components/linktools/linktoolspage.vue';
/**
* 验证是否为网址
*/
const checkUrl = function (urlString) {
if(urlString!=""){
var reg=/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/;
if(!reg.test(urlString)){
Vue.prototype.$message({type:"warning",message:"网址不规范,示例:http://www.domain.com"});
return true;
}
}else {
Vue.prototype.$message({type:"warning",message:"网址不规范,示例:http://www.domain.com"});
return true;
}
return false;
}
export default {
components:{
innerUrl,
linktoolspage
},
props: {
show: {
type:Boolean,
default:false
}
},
data() {
return {
linkText:'',
activeName:'0',
url:'',
h5Type:0
}
},
methods:{
close() {
this.$emit('update:show',false);
},
submit() {
this.close();
},
getRightUrl(data){
console.log(data);
},
getLeftUrl(data){
console.log(data);
},
getShopData(data){ // 获取选择的门店id
console.log(data)
},
// linktoolspage
linkSelect(val) { // 选择小程序链接的返回值
console.log(val)
},
checkUrl() {
if (this.h5Type === 1 && checkUrl(this.url)) {
this.url = 'http://www.domain.com';
return;
}
}
}
}
</script>
<style lang="scss" scoped>
.w300{
width: 300px;
}
.pb10 {
padding-bottom: 10px;
}
.pl20 {
padding-left: 20px;
}
</style>
<template>
<section class="wx-text">
<div class="wx-text__content">
<div v-html="textarea" ref="myTextarea" contenteditable=true></div>
</div>
<div class="wx-text__opt">
<a @click="addLink" class="iconfont icon-lianjie" title="添加链接"></a>
<a @click="removeLink" class="iconfont icon-duankailianjie" title="取消链接"></a>
<a @click="removeLink" class="iconfont icon-17" title="变量"></a>
<span>还可以输入300字,按下回车键换行</span>
</div>
<my-dialog :show.sync="dialogShow"></my-dialog>
</section>
</template>
<script>
import myDialog from './dialog';
export default {
name:'dm-text',
components:{
'my-dialog':myDialog
},
props:{
value:{
type:String,
default:''
}
},
watch:{
value:{
handler(val) {
this.textarea = val;
},
immediate:true
}
},
data() {
return {
textarea:'',
dialogShow:false
}
},
methods:{
// 添加链接
addLink() {
this.dialogShow = true;
},
// 去除链接
removeLink() {
},
// 获取内容
getTextValue() {
const reg = /<(?!(a|\/a|div|\/div|br)).*?>/img ; // 只保留a 和 div 标签
const hrefReg = /href=['"]([^"]*)['"].*?/g;
let text = this.$refs.myTextarea.innerHTML.replace(reg,"");
text = text.replace(/<\/div>|&nbsp;/g,"").replace(/<((div)).*?>/g,"<br>").split('<br>').filter(v=>v).join('<br>');
if(hrefReg.test(text)){
var hrefArr = text.match(hrefReg);
if(hrefArr.length > 1){
this.$message({type:'warning',message:'只能添加一个链接'});
return;
}
var href = text.match(hrefReg)[0];
text = text.replace(/<((a)).*?>/g,'<a '+href+'">'); // 获取 <a> 并替代
}
console.log(text)
this.$emit('update:value',text);
}
}
}
</script>
<style lang="scss" scoped>
.wx-text{
height: 200px;
width: 600px;
border: 1px solid #e7e7eb;
border-radius: 4px;
&__content {
height: 160px;
width: 600px;
& > div {
padding:10px;
height: 140px;
width: 580px;
overflow-x: hidden;
outline:0;
}
}
&__opt {
height: 40px;
line-height: 40px;
padding:0 20px;
border-top:1px solid #e7e7eb;
& > a {
padding-right: 10px;
cursor: pointer;
}
}
}
</style>
<template>
<section class="dm-wrap">
<wx-text ref="wxText" :value.sync="value"></wx-text>
<el-button @click="getValue">获取值</el-button>
<div>
{{value}}
</div>
</section>
</template>
<script>
import wxText from '../component/wx-text'
export default {
name:'dm-text-example',
components:{
'wx-text':wxText
},
data() {
return {
value:'dsdsdsd'
}
},
methods:{
getValue() {
this.$refs.wxText.getTextValue();
}
}
}
</script>
...@@ -7,8 +7,10 @@ ...@@ -7,8 +7,10 @@
<template slot="title">GIC后台组件</template> <template slot="title">GIC后台组件</template>
<el-menu-item index="1-1" @click="$router.push('/test/marketingEvent')">营销事件</el-menu-item> <el-menu-item index="1-1" @click="$router.push('/test/marketingEvent')">营销事件</el-menu-item>
<el-menu-item index="1-2" @click="$router.push('/test/storeNew')">门店组件</el-menu-item> <el-menu-item index="1-2" @click="$router.push('/test/storeNew')">门店组件</el-menu-item>
<el-menu-item index="1-2" @click="$router.push('/test/card')">卡券弹窗组件</el-menu-item> <el-menu-item index="1-3" @click="$router.push('/test/card')">卡券弹窗组件</el-menu-item>
<el-menu-item index="1-2" @click="$router.push('/test/linktools')">链接小工具组件</el-menu-item> <el-menu-item index="1-4" @click="$router.push('/test/linktools')">链接小工具组件</el-menu-item>
<el-menu-item index="1-5" @click="$router.push('/test/table')">表格封装</el-menu-item>
<el-menu-item index="1-6" @click="$router.push('/test/wxtext')">微信文本编辑器</el-menu-item>
<!-- <el-menu-item index="1-3">选项3</el-menu-item> --> <!-- <el-menu-item index="1-3">选项3</el-menu-item> -->
</el-submenu> </el-submenu>
<el-menu-item index="2" @click="$router.push('/test/staticcom')">静态组件 <el-menu-item index="2" @click="$router.push('/test/staticcom')">静态组件
......
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