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>
\ No newline at end of file
<!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
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 @@
.el-menu.el-menu--popup .el-menu-item.is-active label {
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 {
.mb20{
margin-bottom: 20px!important;
}
.width50{
width: 50%!important;
.width20{
width: 20%!important;
}
.width30{
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!important;
}
......
......@@ -9,7 +9,6 @@
:value="item.wechat_menu_dict_id">
</el-option>
</el-select>
<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>
</div>
......@@ -24,7 +23,7 @@
</div>
<!-- 选择门店 -->
<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>
</template>
......@@ -93,7 +92,6 @@
requestProject:'gic-web'
})).then((res)=>{
var data = res.data;
// console.log(data);
if(data.errorCode==0){
this.leftOptions = data.result;
}else{
......@@ -107,27 +105,6 @@
selectLeftUrl(val,valR){ // 选择左侧链接 获取右侧
this.leftUrl = val;
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){
this.rightUrl = '';
}
......@@ -164,7 +141,7 @@
name = v.wechat_menu_dict_name
}
})
this.$emit('sendRightUrl',{name:name,url:val});
this.$emit('sendRightUrl',{name:name,url:val});
},
dialogShopShow(){ // 显示门店弹窗
var that = this;
......@@ -176,50 +153,8 @@
this.showStoreDialog = false;
this.selectShopUrl = val.storeName;
console.log(this.selectShopUrl);
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}`);
// },
this.$emit('sendShopData',{name:val.storeName,url:this.baseUrl + '?id='+val.storeId});
}
}
}
</script>
......@@ -267,6 +202,6 @@
padding: 10px 20px;
}
.choose-wrap /deep/ .el-dialog {
height: auto!important;
height: auto!important;
}
</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>
<!-- 链接小工具 -->
<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__body">
<!-- 链接类型 -->
......@@ -225,11 +195,10 @@ import qs from 'qs';
export default {
name: 'links',
props: ['linkToolsVisible','showType','projectName'],
props: ['linkToolsVisible','showType','projectName','activeName'],
data () {
return {
repProjectName: 'gic-web', // 项目名
activeName: 'first',
linkShowType: 0, //传参数判断显示类型
// ---------------------------
twoLevelVisible: false, // 二级下拉
......@@ -1609,7 +1578,7 @@ export default {
right: 0;
bottom: 0;
left: 0;
line-height: 34px;
line-height: 32px;
user-select: none;
pointer-events: none;
}
......@@ -2178,7 +2147,7 @@ export default {
}
.goods-link-item {
display: inline-block;
width: 310px;
width: 227px;
padding: 10px 10px;
height: 110px;
border: 1px solid #e7e7eb;
......@@ -2198,7 +2167,7 @@ export default {
}
.goods-message{
width: 65%;
width: 100px;
/*margin-top: 10px;*/
vertical-align: top;
margin-left: 5px;
......@@ -2260,6 +2229,7 @@ export default {
text-align: right;
font-size: 14px;
padding-right: 10px;
vertical-align: middle;
}
.el-select+.el-select{
......@@ -2417,9 +2387,9 @@ export default {
}
}
.min-720 {
.min-780 {
.el-dialog {
min-width: 720px;
min-width: 780px;
}
}
......@@ -2454,13 +2424,13 @@ export default {
font-size: 14px;
.vue-treeselect__control {
height: 40px;
/*line-height: 36px;*/
height: 32px;
line-height: 32px;
cursor: pointer;
}
.vue-treeselect__placeholder {
line-height: 40px;
line-height: 32px;
font-size: 13.3333px;
}
......@@ -2470,6 +2440,7 @@ export default {
}
.vue-treeselect div, .vue-treeselect span {
line-height: 32px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
......
......@@ -5,26 +5,18 @@ import store from './store'
import {axios} from './service/api/index'
import directives from './directives'
import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css'
import vueGicHeader from '@gic-test/vue-gic-header'
import vueGicFooter from '@gic-test/vue-gic-footer'
import vueGicAsideMenu from '@/components/aside-menu'
import vueGicCard from '@gic-test/vue-gic-card'
import vueGicStore from '@gic-test/vue-gic-store'
import vueGicStoreLinkage from '@gic-test/vue-gic-store-linkage/src/lib'
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 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 packele from 'packele'
Vue.config.productionTip = false
Vue.use(packele)
Vue.use(ElementUI)
......@@ -39,7 +31,6 @@ Vue.use(vueGicPeople)
Vue.use(vueGicConfirmPeople)
Vue.use(vueGicImgPreview)
Vue.use(gicStoreCard)
// Vue.use(vueGicMarketingEvent)
Vue.prototype.axios = axios;
Vue.prototype.axios.withCredentials = true
Object.keys(directives).map(item => Vue.directive(item, directives[item]));
......
......@@ -6,6 +6,7 @@ import storeNew from '@/test/example/store-new'
import card from '@/test/example/card'
import linkTools from '@/test/example/link-tools'
import dmTable from '@/test/example/dm-table';
import wxText from '@/test/example/wx-text';
export default {
path: '/test',
......@@ -40,9 +41,14 @@ export default {
},
{
path: 'table',
name: '链接小工具',
name: '表格封装',
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 @@
<template slot="title">GIC后台组件</template>
<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/card')">卡券弹窗组件</el-menu-item>
<el-menu-item index="1-2" @click="$router.push('/test/linktools')">链接小工具组件</el-menu-item>
<el-menu-item index="1-3" @click="$router.push('/test/card')">卡券弹窗组件</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-submenu>
<el-menu-item index="2" @click="$router.push('/test/staticcom')">静态组件
......
......@@ -3,13 +3,13 @@
<section class="dm-form__wrap">
<h3 class="dm-title__label">游戏内容</h3>
<el-form-item label="游戏名称" prop="gameName" class="width50">
<dm-input v-model="form.gameName" class="w400" :disabled="queryDisabled" :maxlength="25"></dm-input>
<dm-input v-model="form.gameName" class="w400" :disabled="isInfo" :maxlength="25"></dm-input>
</el-form-item>
<el-form-item label="选择拼图" prop="puzzleImg" class="width50 is-required">
<dm-upload-avatar :model.sync="form.puzzleImg" label="上传图片" tips="图片建议尺寸:510px*680px" :disabled="queryDisabled"></dm-upload-avatar>
<dm-upload-avatar :model.sync="form.puzzleImg" label="上传图片" tips="图片建议尺寸:510px*680px" :disabled="isInfo"></dm-upload-avatar>
</el-form-item>
<el-form-item label="游戏时间" prop="dateTime" class="width50">
<el-date-picker class="w400" :disabled="queryDisabled"
<el-date-picker class="w400" :disabled="isInfo"
v-model="form.dateTime"
type="datetimerange" :default-time="['00:00:00', '23:59:59']"
range-separator="至"
......@@ -18,7 +18,7 @@
</el-date-picker>
</el-form-item>
<el-form-item label="游戏说明" prop="gameIntroduction">
<dm-input type="textarea" class="w400" :rows="4" v-model="form.gameIntroduction" :disabled="queryDisabled" :maxlength="200"></dm-input>
<dm-input type="textarea" class="w400" :rows="4" v-model="form.gameIntroduction" :disabled="isInfo" :maxlength="200"></dm-input>
</el-form-item>
<el-form-item label="奖品设置" class="el-form-item__margin-top14 pt20">
<el-table tooltipEffect="light" :data="tableList" style="width: 100%">
......@@ -29,17 +29,17 @@
</el-table-column>
<el-table-column prop="rankEnd" label="名次" align="left" width="220">
<template slot-scope="scope">
<el-input-number v-model="scope.row.rankEnd" :precision="0" :min="1" @change="comparePre(scope.$index,scope.row.rankEnd)" size="small" class="w150" :disabled="queryDisabled"></el-input-number>
<el-input-number v-model="scope.row.rankEnd" :precision="0" :min="1" @change="comparePre(scope.$index,scope.row.rankEnd)" size="small" class="w150" :disabled="isInfo"></el-input-number>
</template>
</el-table-column>
<el-table-column prop="prizeName" label="商品名称" align="left" :min-width="180">
<template slot-scope="scope">
<dm-input v-model="scope.row.prizeName" size="small" :disabled="queryDisabled" :maxlength="15"></dm-input>
<dm-input v-model="scope.row.prizeName" size="small" :disabled="isInfo" :maxlength="15"></dm-input>
</template>
</el-table-column>
<el-table-column prop="prizeImgFieldCode" label="商品图片(150*150)" align="center" :min-width="100">
<template slot-scope="scope">
<dm-upload-avatar :model.sync="scope.row.prizeImg" label="上传图片" width="40" height="40" tips="" class-name="block-center" :disabled="queryDisabled"></dm-upload-avatar>
<dm-upload-avatar :model.sync="scope.row.prizeImg" label="上传图片" width="40" height="40" tips="" class-name="block-center" :disabled="isInfo"></dm-upload-avatar>
</template>
</el-table-column>
<el-table-column prop="prizeQuantity" label="商品数量" align="left" width="80">
......@@ -54,11 +54,11 @@
</el-table-column>
<el-table-column prop="date" label="操作" align="left" width="60">
<template slot-scope="scope">
<el-button type="text" v-if="scope.$index>2" @click="delItem(scope.$index)" :disabled="queryDisabled">删除</el-button>
<el-button type="text" v-if="scope.$index>2" @click="delItem(scope.$index)" :disabled="isInfo">删除</el-button>
</template>
</el-table-column>
</el-table>
<div v-if="tableList.length<10 && !queryDisabled" class="dm-button--add" @click="addPrice">
<div v-if="tableList.length<10 && !isInfo" class="dm-button--add" @click="addPrice">
<i class="el-icon-plus">添加奖品</i>
</div>
</el-form-item>
......@@ -66,17 +66,52 @@
<section class="dm-form__wrap">
<h3 class="dm-title__label">页面设置</h3>
<el-form-item label="品牌logo" class="width50 is-required">
<dm-upload-avatar :model.sync="form.logoImg" label="上传图片" width="80" height="80" tips="请上传高度为85px的PNG透明背景图片" :disabled="queryDisabled"></dm-upload-avatar>
<dm-upload-avatar :model.sync="form.logoImg" label="上传图片" width="80" height="80" tips="请上传高度为85px的PNG透明背景图片" :disabled="isInfo"></dm-upload-avatar>
</el-form-item>
<el-form-item label="每次游戏消耗" prop="usedValue" class="width50">
<el-input-number controls-position="right" v-model="form.usedValue" :precision="0" :min="1" class="w300" placeholder="请输入正整数" @blur="nonnegative(form.usedValue)" :disabled="queryDisabled">
<el-input-number controls-position="right" v-model="form.usedValue" :precision="0" :min="1" class="w300" placeholder="请输入正整数" @blur="nonnegative(form.usedValue)" :disabled="isInfo">
</el-input-number> 体力
</el-form-item>
<el-form-item label="无体力可使用" prop="usedIntegral" class="width50">
<el-input-number controls-position="right" v-model="form.usedIntegral" :precision="0" :min="1" class="w300" placeholder="请输入正整数" @blur="nonnegative(form.usedIntegral)" :disabled="queryDisabled">
<el-input-number controls-position="right" v-model="form.usedIntegral" :precision="0" :min="1" class="w300" placeholder="请输入正整数" @blur="nonnegative(form.usedIntegral)" :disabled="isInfo">
</el-input-number> 积分
</el-form-item>
</section>
<section class="dm-form__wrap clearfix" >
<h3 class="dm-title__label">参与门槛
<i class="iconfont icon-xinxixianshi pl5 gray"></i>
<span class="gray fz13">满足参与门槛会员才可以参与游戏</span>
</h3>
<el-form-item label="参与门槛" prop="joinQua">
<el-radio-group v-model="form.joinQua">
<el-radio :label="1">所有用户</el-radio>
<el-radio :label="2">会员筛选</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="选择会员" v-if="form.joinQua === 2" class="w500">
<vue-gic-people :projectName="projectName" :useId="useId" :hasSearchData="hasSearchData" :sceneValue="sceneValue" ref="peopleFilter" @findFilter="findFilter" @getBackData="getBackData" @editHide= "editHide" @editShow="editShow" @hideBtn="hideBtn"/>
</el-form-item>
<div class="width60 fl">
<el-form-item label="提示图片" prop="tipsImg" v-if="form.joinQua === 2">
<dm-upload-avatar :model.sync="form.tipsImg" fileType="fileShare" label="上传图片" tips="图片建议尺寸:高度200px*200px" :disabled="isInfo"></dm-upload-avatar>
</el-form-item>
<el-form-item label="提示文字" prop="tipsText" v-if="form.joinQua === 2" >
<dm-input v-model="form.tipsText" type="textarea" :maxlength="60" class="w400" :rows="6"></dm-input>
</el-form-item>
</div>
<div class="width40 fr">
<div class="game-tips__preview">
<div class="game-tips__preview__inner">
<p class="game-tips__preview--title">你还未满足参与游戏条件!</p>
<img class="game-tips__preview--img" :src="form.tipsImg.imgUrl || defaultImg" alt="">
<p class="game-tips__preview--desc">预览文字预览文字预览文字预览文字预览文字预览文字预览文字预览文字预览文字预览文字提示文字预览文字
预览文字预览文字预览文字</p>
</div>
</div>
</div>
</section>
<section class="dm-form__wrap">
<h3 class="dm-title__label">分享设置</h3>
<el-form-item label="分享到朋友圈" class="width50 is-required">
......@@ -92,16 +127,16 @@
</el-radio-group>
</el-form-item>
<el-form-item label="分享图" class="width50 is-required">
<dm-upload-avatar :model.sync="form.shareImg" fileType="fileShare" label="上传图片" tips="图片建议尺寸:高度200px*200px" :disabled="queryDisabled"></dm-upload-avatar>
<dm-upload-avatar :model.sync="form.shareImg" fileType="fileShare" label="上传图片" tips="图片建议尺寸:高度200px*200px" :disabled="isInfo"></dm-upload-avatar>
</el-form-item>
<el-form-item label="分享标题" prop="shareTitle" class="width50">
<dm-input v-model="form.shareTitle" class="w400" placeholder="请输入分享标题" :disabled="queryDisabled" :maxlength="20"></dm-input>
<dm-input v-model="form.shareTitle" class="w400" placeholder="请输入分享标题" :disabled="isInfo" :maxlength="20"></dm-input>
</el-form-item>
<el-form-item label="分享描述" prop="shareTextInfo" class="width50">
<dm-input type="textarea" class="w400" :rows="4" v-model="form.shareTextInfo" placeholder="请输入分享描述" :disabled="queryDisabled" :maxlength="50"></dm-input>
<dm-input type="textarea" class="w400" :rows="4" v-model="form.shareTextInfo" placeholder="请输入分享描述" :disabled="isInfo" :maxlength="50"></dm-input>
</el-form-item>
</section>
<div class="btn-wrap_fixed" :class="{'on':asideShow}" v-if="!queryDisabled">
<div class="btn-wrap_fixed" :class="{'on':asideShow}" v-if="!isInfo">
<el-button type="primary" @click="savePtyx('form')">保 存</el-button>
<el-button @click="$router.go(-1)">返 回</el-button>
</div>
......@@ -115,13 +150,30 @@ import {numberToChinese,formateDateTimeByType} from '@/utils/index.js';
import dmUploadAvatar from '@/components/upload/avatar';
import dmUploadImg from '@/components/upload/img';
import nonnegative from '@/mixins/nonnegative.js'
let gameInfo = {};
export default {
mixins:[nonnegative],
data () {
return {
loading:false,
form:{gameName:'',puzzleImg:{imgUrl:'',code:''},gameIntroduction:'',dateTime:['',''],logoImg:{imgUrl:'',code:''},usedValue:'',usedIntegral:'',shareImg:{imgUrl:'',code:''},shareTitle:'',shareTextInfo:'',shareGroup:1,shareFriend:1},
defaultImg:require('../../../assets/img/loaderror.png'),
loading:false,
form:{gameName:'',
puzzleImg:{imgUrl:'',code:''},
gameIntroduction:'',
dateTime:['',''],
logoImg:{imgUrl:'',code:''},
usedValue:'',
usedIntegral:'',
shareImg:{imgUrl:'',code:''},
shareTitle:'',
shareTextInfo:'',
shareGroup:1,
shareFriend:1,
joinQua:2,
tipsImg:{imgUrl:'',code:''},
tipsText:''
},
rules:{
gameName:{required:true, message: '请输入游戏名', trigger: 'blur' },
dateTime:{required:true,type:'array', message: '请选择游戏时间', trigger: 'blur' },
......@@ -136,8 +188,16 @@ export default {
{awardName:'',rankEnd:0,prizeName:'', prizeImg: {code:'',imgUrl:''},prizeQuantity:''},
{awardName:'',rankEnd:0,prizeName:'', prizeImg: {code:'',imgUrl:''},prizeQuantity:''},
],
queryDisabled:this.$route.meta.type === 'query',
editDisabled:this.$route.meta.type === 'edit',
isInfo:this.$route.meta.type === 'query',
isEdit:this.$route.meta.type === 'edit',
// 人群筛选器可传参数
projectName: '', // 当前项目名
sceneValue: 'member', // 场景值
useId: '', // 模板id
hasSearchData: '' , // 当前页回显的数据(接口返回)
toggleTag: false, // 控制按钮显示的参数,仅供参考,可自行修改
getSaveData:'',
saveTag:false,
}
},
components:{
......@@ -303,7 +363,39 @@ export default {
return false;
}
})
}
},
/**---------人群筛选器的方法------------- */
getData() {
this.$refs.peopleFilter.confirmSet()
},
// 子组件触发父组件事件,返回过滤条件数据
findFilter(value){
console.log(value)
this.info.memberSearchDTO = value;
},
// 取消
cancelFilter(){
this.$refs.peopleFilter.cancelSet()
},
// 获取需要回显的数据, 供保存时候使用
getBackData(val) {
this.getSaveData = val;
},
// 显示编辑,保存按钮隐藏,确认按钮显示 (子组件会调用)
editShow() {
this.toggleTag = true
this.saveTag = false
},
// 显示保存按钮,隐藏确认按钮显示 (子组件会调用)
editHide() {
this.toggleTag = false
this.saveTag = true
},
// 隐藏保存按钮和确认按钮 (子组件会调用)
hideBtn() {
this.toggleTag = false;
this.saveTag = false
},
},
filters: {
numberToChinese(val) {
......
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