Commit b7df0ef8 by member

add: 提交回家过年可能要使用

parent 61191db1
......@@ -3,5 +3,5 @@
["env", { "modules": false }],
"stage-3"
],
"plugins": ["transform-vue-jsx"]
"plugins": ["transform-vue-jsx", "transform-runtime"]
}
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.
{
"name": "@gic-test/vue-gic-people",
"description": "vue-gic-people Plugin",
"author": "fairyly <498745097@qq.com>",
"version": "1.4.2",
"author": "shiyao <syolmm@qq.com>",
"version": "1.8.91",
"license": "MIT",
"private": false,
"main": "dist/vue-gic-people.js",
......@@ -11,10 +11,15 @@
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
},
"dependencies": {
"@gic-test/vue-gic-datepicker": "^1.2.9",
"@gic-test/vue-gic-store-new": "^1.0.9",
"@gic-test/vue-gic-datepicker": "^1.3.8",
"@gic-test/vue-gic-people": "^1.7.0",
"@gic-test/vue-gic-store-new": "^1.3.1",
"@riophae/vue-treeselect": "0.0.35",
"axios": "^0.18.0",
"babel-plugin-transform-runtime": "^6.23.0",
"element-ui": "^2.4.11",
"less": "^3.9.0",
"less-loader": "^4.1.0",
"localforage": "^1.7.2",
"vue": "^2.5.11"
},
......
<template>
<div id="app">
<vue-gic-people :projectName="projectName" :useId="useId" :hasSearchData="hasSearchData" :sceneValue="sceneValue" ref="peopleFilter" @findFilter="findFilter" @getBackData="getBackData" @editHide= "editHide" @editShow="editShow" @hideBtn="hideBtn"></vue-gic-people>
<!-- <vue-gic-people :projectName="projectName" :useId="useId" :hasSearchData="hasSearchData" :sceneValue="sceneValue" ref="peopleFilter" @findFilter="findFilter" @getBackData="getBackData" @editHide= "editHide" @editShow="editShow" @hideBtn="hideBtn"></vue-gic-people>
<!-- // 按钮根据当前使用场景设置,有的无保存 -->
<!--
<div v-if="toggleTag">
<button @click="getData">确定</button>
<button @click="cancelFilter">取消</button>
</div>
<div v-else>
<button @click="saveTempData">保存</button>
</div>
</div> -->
<!-- <gicSelect></gicSelect> -->
</div>
</template>
<script>
import vueGicPeople from './lib/vue-gic-people'
import gicSelect from './lib/gic-select';
export default {
name: 'app',
......@@ -30,7 +33,7 @@ export default {
}
},
components: {
vueGicPeople
gicSelect
},
methods: {
// 父组件调用子组件方法,触发父组件事件
......@@ -92,11 +95,3 @@ export default {
},
}
</script>
<style lang="scss">
* {
margin: 0;
padding: 0;
}
</style>
<template>
<div class="birth-select">
<div class="start-date date-block">
<el-select v-model="startVal[0]" style="width: 100px" placeholder="月份" @change="handleStartMonthChange">
<el-option v-for="item in MonthList"
:value="item.value"
:key="item.key"
:label="item.label">
</el-option>
</el-select>
<span class="space"></span>
<el-select v-model="startVal[1]" style="width: 100px" placeholder="日期" @change="handleStartDateChange">
<el-option v-for="item in startDateList"
:value="item.value"
:key="item.key"
:label="item.label">
</el-option>
</el-select>
</div>
<span class="range"></span>
<div class="end-date date-block">
<el-select v-model="endVal[0]" style="width: 100px" placeholder="月份" @change="handleEndMonthChange">
<el-option v-for="item in MonthList"
:value="item.value"
:key="item.key"
:label="item.label">
</el-option>
</el-select>
<span class="space"></span>
<el-select v-model="endVal[1]" style="width: 100px" placeholder="日期" @change="handleEndDateChange">
<el-option v-for="item in endDateList"
:value="item.value"
:key="item.key"
:label="item.label">
</el-option>
</el-select>
</div>
</div>
</template>
<script>
export default {
name: 'GicSelect',
props: {
dateval: [String, Array]
},
data() {
return {
startVal: ['', ''],
endVal: ['', ''],
// 月份
MonthList: [
{ key: 1, value: '01', label: '1月' },
{ key: 2, value: '02', label: '2月' },
{ key: 3, value: '03', label: '3月' },
{ key: 4, value: '04', label: '4月' },
{ key: 5, value: '05', label: '5月' },
{ key: 6, value: '06', label: '6月' },
{ key: 7, value: '07', label: '7月' },
{ key: 8, value: '08', label: '8月' },
{ key: 9, value: '09', label: '9月' },
{ key: 10, value: '10', label: '10月' },
{ key: 11, value: '11', label: '11月' },
{ key: 12, value: '12', label: '12月' },
],
// 日期
daysList: [ ['01', '03', '05', '07', '08', '10', '12'], ['02'], ['04', '06', '09', '11'] ],
startDateList: [
{ key: 1, value: '01', label: '1日' },
{ key: 2, value: '02', label: '2日' },
{ key: 3, value: '03', label: '3日' },
{ key: 4, value: '04', label: '4日' },
{ key: 5, value: '05', label: '5日' },
{ key: 6, value: '06', label: '6日' },
{ key: 7, value: '07', label: '7日' },
{ key: 8, value: '08', label: '8日' },
{ key: 9, value: '09', label: '9日' },
{ key: 10, value: '10', label: '10日' },
{ key: 11, value: '11', label: '11日' },
{ key: 12, value: '12', label: '12日' },
{ key: 13, value: '13', label: '13日' },
{ key: 14, value: '14', label: '14日' },
{ key: 15, value: '15', label: '15日' },
{ key: 16, value: '16', label: '16日' },
{ key: 17, value: '17', label: '17日' },
{ key: 18, value: '18', label: '18日' },
{ key: 19, value: '19', label: '19日' },
{ key: 20, value: '20', label: '20日' },
{ key: 21, value: '21', label: '21日' },
{ key: 22, value: '22', label: '22日' },
{ key: 23, value: '23', label: '23日' },
{ key: 24, value: '24', label: '24日' },
{ key: 25, value: '25', label: '25日' },
{ key: 26, value: '26', label: '26日' },
{ key: 27, value: '27', label: '27日' },
{ key: 28, value: '28', label: '28日' },
{ key: 29, value: '29', label: '29日' },
{ key: 30, value: '30', label: '30日' },
{ key: 31, value: '31', label: '31日' }
],
endDateList: [
{ key: 1, value: '01', label: '1日' },
{ key: 2, value: '02', label: '2日' },
{ key: 3, value: '03', label: '3日' },
{ key: 4, value: '04', label: '4日' },
{ key: 5, value: '05', label: '5日' },
{ key: 6, value: '06', label: '6日' },
{ key: 7, value: '07', label: '7日' },
{ key: 8, value: '08', label: '8日' },
{ key: 9, value: '09', label: '9日' },
{ key: 10, value: '10', label: '10日' },
{ key: 11, value: '11', label: '11日' },
{ key: 12, value: '12', label: '12日' },
{ key: 13, value: '13', label: '13日' },
{ key: 14, value: '14', label: '14日' },
{ key: 15, value: '15', label: '15日' },
{ key: 16, value: '16', label: '16日' },
{ key: 17, value: '17', label: '17日' },
{ key: 18, value: '18', label: '18日' },
{ key: 19, value: '19', label: '19日' },
{ key: 20, value: '20', label: '20日' },
{ key: 21, value: '21', label: '21日' },
{ key: 22, value: '22', label: '22日' },
{ key: 23, value: '23', label: '23日' },
{ key: 24, value: '24', label: '24日' },
{ key: 25, value: '25', label: '25日' },
{ key: 26, value: '26', label: '26日' },
{ key: 27, value: '27', label: '27日' },
{ key: 28, value: '28', label: '28日' },
{ key: 29, value: '29', label: '29日' },
{ key: 30, value: '30', label: '30日' },
{ key: 31, value: '31', label: '31日' }
]
};
},
methods: {
//
handleMonthValue(position, val) {
const WM = this.daysList.findIndex((item, i) => {
return item.includes(val);
});
if (position == 'start') {
this.handleChangeData(this.startDateList, WM);
} else if ('end') {
this.handleChangeData(this.endDateList, WM);
}
},
handleChangeData(data, inx) {
const length = data.length; // 31 29 30
if (inx == 0) {
// 31天
this.handleLength(length, data, 0);
} else if (inx == 2) {
// 如果升级 30天
this.handleLength(length, data, 1);
} else {
// 29天
this.handleLength(length, data, 2);
}
},
handleLength(length, data, days) {
if (length == 31) {
if (days == 0) {
return;
} else if (days == 1) {
data.pop();
} else if (days == 2) {
data.splice(29, 2);
}
} else if (length == 30) {
if (days == 0) {
data.push({ key: 31, value: '31', label: '31日' });
} else if (days == 1) {
return;
} else if (days == 2) {
data.splice(29, 1);
}
} else if (length == 29) {
if (days == 0) {
data.push({ key: 30, value: '30', label: '30日' });
data.push({ key: 31, value: '31', label: '31日' });
} else if (days == 1) {
data.push({ key: 30, value: '30', label: '30日' });
} else if (days == 2) {
return;
}
}
},
// 开始月份
handleStartMonthChange(val) {
this.handleMonthValue('start', val);
this.handleDate();
this.$emit('change');
},
handleStartDateChange(val) {
this.handleDate();
this.$emit('change');
},
handleEndMonthChange(val) {
this.handleMonthValue('end', val);
this.handleDate();
this.$emit('change');
},
handleEndDateChange(val) {
this.handleDate();
this.$emit('change');
},
handleDate() {
if (!this.startVal[0] || !this.startVal[0] || !this.endVal[0] || !this.endVal[1]) {
return;
}
const start = this.startVal.join('');
const end = this.endVal.join('');
if (start - end > 0) {
this.$message.warning('开始生日日期不能大于结束日期');
this.$emit('update:dateval', '');
return;
}
const value = [start, end];
this.$emit('update:dateval', value);
},
// 回显数据
replay(start, end) {
this.startVal[0] = start.slice(0, 2);
this.startVal[1] = start.slice(2, 4);
this.endVal[0] = end.slice(0, 2);
this.endVal[1] = end.slice(2, 4);
}
},
created() {
if (this.dateval[0] && this.dateval[1]) {
this.replay(this.dateval[0], this.dateval[1]);
}
}
};
</script>
<style lang="scss" scoped>
.birth-select {
.date-block {
display: inline-block;
.space {
display: inline-block;
width: 10px;
}
}
.range {
display: inline-block;
vertical-align: middle;
width: 30px;
height: 32px;
line-height: 32px;
font-size: 12px;
text-align: center;
}
}
</style>
<template>
<p class="filtertxt">
<span v-if="singleTxt">{{singleTxt}}</span>
<span v-for="(txt, i) in templateArr" :key="i" v-if="templateArr && templateArr.length">
<div class="filtertxt" v-if="templateArr.length > 0">
<span v-if="templateArr.length === 1 && templateArr[0].length === 1">
<span>(</span>
<span v-for="(txt, i) in templateArr[0]" :key="'hash' + i.toString()" class="light-txt">{{txt}}</span>
<span>)</span>
</span>
<span v-if="templateArr.length === 1 && templateArr[0].length > 1">
<span>(</span>
<span v-for="(txt, i) in templateArr[0]" :key="'hash' + i.toString()">
<span v-if="i !== 0 && templateArr[0].length - 1 && txt">&nbsp;或者&nbsp;</span>
<span class='light-txt' v-if="txt">{{txt}}</span>
</span>
<span>)</span>
</span>
<span v-if="templateArr.length > 1 && templateArr[i][0]" v-for="(txt, i) in templateArr" :key="'hash' + i.toString()">
<span v-if="i !== 0">&nbsp;&nbsp;</span>
<span>(</span>
<span v-for="(item, index) in templateArr[i]" :key="'hashinner' + index.toString()">
<span v-if="index !== 0 && templateArr[i].length - 1 && item">&nbsp;或者&nbsp;</span>
<span class='light-txt' v-if="item">{{item}}</span>
</span>
<span>)</span>
</span>
<!-- <span v-for="(txt, i) in templateArr" :key="i" v-if="templateArr.length > 1">
<span v-if="i !== 0">&nbsp;&nbsp;</span>
<span v-for="(item, index) in templateArr[i]" :key="index">
<span v-if="index !== 0 && index !== templateArr[i].length - 1">&nbsp;&nbsp;</span>
<span :class="(index !== 0 && index !== templateArr[i].length - 1) ? 'light-txt' : ''">{{item}}</span>
</span>
</span>
</p>
</span> -->
</div>
<div v-else>
</div>
</template>
<script>
......@@ -23,39 +52,74 @@ export default {
data() {
return {
templateArr: [],
singleTxt: ''
singleTxt: '',
templateText: ''
}
},
beforeMount() {
let middletxt = this.templatetxt;
// 只有一条 没有或
methods: {
getText() {
let middletxt = this.templateText;
if (!middletxt) {
return;
}
// 只有括号
if (!middletxt.replace(/[\(|\)]/g, '')) {
return;
}
// 只有一条 没有或 没有且
// middletxt
if (!middletxt.includes('或') && !middletxt.includes('且')) {
this.singleTxt = middletxt;
middletxt = middletxt.replace(/[\(|\)]/g, '');
this.templateArr.push([middletxt]);
}
// 只有一条 有或 没有且
if (middletxt.includes('或') && !middletxt.includes('且')) {
middletxt = middletxt.replace(/\)/g, '').split('或');
middletxt.push(')');
this.templateArr = [middletxt];
middletxt = middletxt.replace(/[\(|\)]/g, '');
middletxt = middletxt.split('或');
this.templateArr.push(middletxt);
}
// 两条 有且 有或 没有 或
// (所属主门店包含自营...)且(会员开卡时间2018-11-09 00:00:00至2018-12-04 23:59:59)
if (middletxt.includes('且')) {
if (middletxt.includes('或')) {
// (年龄等于12且(所属主门店包含自营)
middletxt = middletxt.split('且');
middletxt = middletxt.map(ele => {
let eletxt = ele.replace(/\)/g, '');
let ret = eletxt.split('或');
ret.push(')');
return ret;
middletxt.forEach(ele => {
let txt = ele.replace(/[\(|\)]/g, '');
let txtArr = txt.split('或');
this.templateArr.push(txtArr);
});
this.templateArr = middletxt;
} else {
this.singleTxt = middletxt;
middletxt = middletxt.split('且');
middletxt.forEach(ele => {
let txt = ele.replace(/[\(|\)]/g, '');
this.templateArr.push([txt]);
});
}
}
console.log(this.templateArr);
}
},
watch: {
templatetxt: {
immediate: true,
handler(newval) {
this.templateArr = [];
this.templateText = newval;
this.getText();
}
}
}
};
</script>
<style>
......
......@@ -253,4 +253,7 @@ export default {
.vue-input-tag-wrapper.read-only {
cursor: default;
}
.new-tag::placeholder {
color: #ccc;
}
</style>
......@@ -2,43 +2,26 @@
<div class="people-content">
<!-- 选择模板 -->
<div class="people-temp-head">
<!-- <div class="temp-wrap">
<label class="member-templates-title">人群模板</label>
<el-select v-model="tempValue" class="temp-select" placeholder="请选择" @change="tempChangeList">
<el-option
v-for="item in tempOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div> -->
<!-- 模板内容 -->
<div class="condition-detail-contain" v-if="conditionDetailShow">
<div class="screening-condition">
<div class="detail" id="detail-tempcondition">
<!-- (<span class="bg_blue"><b>活跃于</b>最近30天</span>
<span class="word">或者</span>
<span class="bg_blue"><b>活跃于</b>最近30天</span>
<span class="word">或者</span>
<span class="bg_blue"><b>活跃于</b>最近30天</span>
<span class="word">或者</span>
<span class="bg_yellow">在新增后3天内<b>页面点击</b>次数&gt;=1</span>)
<span class="word"></span> (
<span class="bg_blue"><b>活跃于</b>2017-12-07到2017-12-13</span>
<span class="word">或者</span>
<span class="bg_blue"><b>新增于</b>最近30天</span>
<span class="word">或者</span>
<span class="bg_blue"><b>活跃于</b>最近30天</span>) -->
<filter-txt :templatetxt="templatetxt"></filter-txt>
</div>
<span class="el-icon-edit btn-edit-group" id="btn-edit-group-tempcondition" title="编辑用户群" @click="editTemp" style="display: inline-block;"></span>
<span class="el-icon-delete btn-cancel-group" id="btn-cancel-group-tempcondition" title="重置条件" @click="resetTemp"></span>
<span
class="el-icon-edit btn-edit-group"
id="btn-edit-group-tempcondition"
title="编辑用户群"
@click="editTemp"
style="display: inline-block;"
></span>
<span
class="el-icon-delete btn-cancel-group"
id="btn-cancel-group-tempcondition"
title="重置条件"
@click="resetTemp"
></span>
</div>
<!-- <div class="button-group marginLeft134 button-group-save" id="save-tempcondition">
<button class="gic-btn gic-btn-preserve gic-btn-save" @click="saveTemp">保存</button>
</div> -->
</div>
<!-- end -->
......@@ -50,12 +33,19 @@
<!-- 增加内容部分 -->
<div id="app1" class="rations">
<!-- 循环几行(并且)-->
<div class="condition-cell" v-for="(item, index) in conditionsList" v-if="item.children.length>0">
<div
class="condition-cell"
v-for="(item, index) in conditionsList"
v-if="item.children.length>0"
>
<div class="andlabels labelsbg_white" data-ration-id="index" v-if="index!=0">并且</div>
<div class="filter-box inline-block ration" data-ration-id="index" >
<div class="filter-box inline-block ration" data-ration-id="index">
<!-- 循环几行(或者) -->
<div class="group_combo" data-group-id="1" v-for="(cellItem, key) in item.children">
<div
class="group_combo"
data-group-id="1"
v-for="(cellItem, key) in item.children"
>
<div class="orlabels" v-if="key!=0">或者</div>
<!-- type="belong" -->
<div class="filter-message groupbox">
......@@ -64,68 +54,135 @@
<!-- 一行循环了几个 -->
<template v-for="(childCell,ind) in cellItem.children">
<div class="gic-select-wrap inline-block" v-if="childCell.templateCode == 'com001'&& storeFlag && childCell.widgetName ">
<vue-gic-store-new :options="childCell.storeOption" :uuid.sync="childCell.uuid"></vue-gic-store-new>
<div
class="gic-select-wrap inline-block"
:key="ind"
v-if="childCell.templateCode == 'com020'&& childCell.storeFlag"
>
<vue-gic-store-new
:options="childCell.storeOption"
:key="ind"
:uuid.sync="childCell.uuid"
:isAdd="childCell.operateType"
></vue-gic-store-new>
</div>
<!-- 下拉单选 -->
<!-- && !childCell.widgetName -->
<div class="gic-select-wrap inline-block" v-if="childCell.templateCode == 'com001' && !childCell.widgetName">
<div
class="gic-select-wrap inline-block"
v-if="childCell.templateCode == 'com001' && !childCell.widgetName"
>
<div class="gic-select">
<el-select v-model="childCell.levelModel" class="temp-select" placeholder="请选择" @focus="selectFocus(index,key,ind)" @change="tempChange(index,key,ind)">
<el-select
v-model="childCell.levelModel"
class="temp-select"
placeholder="请选择"
@focus="selectFocus(index,key,ind)"
@change="tempChange(index,key,ind)"
>
<el-option
v-for="item in childCell.levelOptions"
:label="item.value"
:key="item.key"
:value="item.key">
</el-option>
:value="item.key"
></el-option>
</el-select>
</div>
</div>
<!-- 下拉多选 最后控件-->
<div class="gic-select-wrap inline-block" v-if="childCell.templateCode == 'com002'">
<el-select v-model="childCell.levelModel" multiple class="temp-select" @focus="selectFocus(index,key,ind)" :placeholder="childCell" @change="tempChangeMultip($event,index,key,ind)">
<div
class="gic-select-wrap inline-block"
v-if="childCell.templateCode == 'com002'"
>
<el-select
v-model="childCell.levelModel"
multiple
class="temp-select"
@focus="selectFocus(index,key,ind)"
placeholder="请选择"
@change="tempChangeMultip($event,index,key,ind)"
>
<el-option
v-for="item in childCell.levelOptions"
:label="item.value"
:key="item.key"
:value="item.key">
</el-option>
:value="item.key"
></el-option>
</el-select>
</div>
<!-- 单选+输入框 -->
<!-- <div class="gic-select-wrap inline-block" v-if="childCell.templateCode == 'com003'">
<el-select v-model="childCell.levelModel" class="temp-select" @focus="selectFocus(index,key,ind)" placeholder="请选择" @change="tempChange(index,key,ind)">
<el-option
v-for="item in childCell.levelOptions"
:key="item.key"
:label="item.value"
:value="item.key">
</el-option>
</el-select>
</div> -->
<!-- 加输入框 最后控件-->
<div class="gic-select-wrap inline-block" v-if="childCell.templateCode == 'com003'">
<el-input v-model="childCell.levelModel" class="select-wrap-input" placeholder="请输入" @focus="selectFocus(index,key,ind)" @keyup.native="(value) => toInput(value,index,key,ind)"></el-input><label></label>
<div
class="gic-select-wrap inline-block"
v-if="childCell.templateCode == 'com003'"
>
<el-input
v-model="childCell.levelModel"
class="select-wrap-input"
placeholder="请输入"
@focus="selectFocus(index,key,ind)"
@keyup.native="(value) => toInput(value,index,key,ind)"
></el-input>
<label></label>
</div>
<!-- 加区间输入框 最后控件-->
<div class="gic-select-wrap inline-block" v-if="childCell.templateCode == 'com013'">
<el-input v-model="childCell.levelModel[0]" class="select-wrap-input" style="margin-right: 0;" :placeholder="childCell.widgetInstruction" @blur="blurFrom" @focus="selectFocus(index,key,ind)" ></el-input><!-- @keyup.native="(value) => toInputFrom(value)" -->
<label> - </label>
<el-input v-model="childCell.levelModel[1]" class="select-wrap-input" style="margin-right: 0;" :placeholder="childCell.widgetInstruction" @blur="blurTo" @focus="selectFocus(index,key,ind)" ></el-input><!-- @keyup.native="(value) => toInputTo(value)" -->
<div
class="gic-select-wrap inline-block"
v-if="childCell.templateCode == 'com013'"
>
<el-input
v-model="childCell.levelModel[0]"
class="select-wrap-input"
style="margin-right: 0;"
:placeholder="childCell.widgetInstruction"
@blur="blurFrom"
@focus="selectFocus(index,key,ind)"
></el-input>
<!-- @keyup.native="(value) => toInputFrom(value)" -->
<label>-</label>
<el-input
v-model="childCell.levelModel[1]"
class="select-wrap-input"
style="margin-right: 0;"
:placeholder="childCell.widgetInstruction"
@blur="blurTo"
@focus="selectFocus(index,key,ind)"
></el-input>
<!-- @keyup.native="(value) => toInputTo(value)" -->
</div>
<!-- 下拉树形结构 最后控件-->
<div class="gic-select-wrap inline-block" v-if="childCell.templateCode == 'com004'">
<treeselect v-model="childCell.levelModel" :multiple="true" placeholder="请选择" :options="childCell.levelOptions" noOptionsText="暂无数据" noResultsText="无数据" noChildrenText="无数据" :normalizer="normalizer" :value-consists-of="valueConsistsOf" :searchable="false" :clearable="false" @open="selectFocus(index,key,ind)" @select="selectTree($event,index,key,ind)" @deselect="deSelectTree($event,index,key,ind)"/><!-- :normalizer="normalizer" -->
<div
class="gic-select-wrap inline-block"
v-if="childCell.templateCode == 'com004'"
>
<treeselect
v-model="childCell.levelModel"
:multiple="true"
placeholder="请选择"
:options="childCell.levelOptions"
noOptionsText="暂无数据"
noResultsText="无数据"
noChildrenText="无数据"
:normalizer="normalizer"
:value-consists-of="valueConsistsOf"
:searchable="false"
:clearable="false"
@open="selectFocus(index,key,ind)"
@select="selectTree($event,index,key,ind)"
@deselect="deSelectTree($event,index,key,ind)"
/>
<!-- :normalizer="normalizer" -->
</div>
<!-- 搜索后出现下列 最后控件-->
<div class="gic-select-wrap inline-block input-search-select" v-if="childCell.templateCode == 'com005'">
<div
class="gic-select-wrap inline-block input-search-select"
v-if="childCell.templateCode == 'com005'"
>
<el-select
v-model="childCell.levelModel"
multiple
......@@ -142,13 +199,15 @@
v-for="item in childCell.levelOptions"
:key="item.key"
:label="item.value"
:value="item.key">
</el-option>
:value="item.key"
></el-option>
</el-select>
</div>
<!-- 时间区间年月日-年月日 最后控件-->
<div class="gic-select-wrap inline-block" v-if="childCell.templateCode == 'com006'">
<div
class="gic-select-wrap inline-block"
v-if="childCell.templateCode == 'com006'"
>
<el-date-picker
v-model="childCell.levelModel"
type="daterange"
......@@ -162,86 +221,112 @@
:picker-options="pickerOptions"
@focus="selectFocus(index,key,ind)"
@change="changeDate($event,index,key,ind)"
>
</el-date-picker>
></el-date-picker>
</div>
<!-- 下拉多选异步() 最后控件-->
<div class="gic-select-wrap inline-block" v-if="childCell.templateCode == 'com007'" @click="selectFocus(index,key,ind)">
<el-select v-model="childCell.levelModel" multiple class="temp-select" v-if="" @focus="selectFocus(index,key,ind)" placeholder="请选择" @change="tempChangeMultip($event,index,key,ind)">
<div
class="gic-select-wrap inline-block"
v-if="childCell.templateCode == 'com007'"
@click="selectFocus(index,key,ind)"
>
<el-select
v-model="childCell.levelModel"
multiple
class="temp-select"
v-if
@focus="selectFocus(index,key,ind)"
placeholder="请选择"
@change="tempChangeMultip($event,index,key,ind)"
>
<el-option
v-for="item in childCell.levelOptions"
:key="item.key"
:label="item.value"
:value="item.key">
</el-option>
:value="item.key"
></el-option>
</el-select>
</div>
<!-- 时间区间 月日- 月日 最后控件-->
<div class="gic-select-wrap inline-block" v-if="childCell.templateCode == 'com008'">
<vue-gic-datepicker
v-model="childCell.levelModel"
type="daterange"
:editable="false"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="MMdd"
value-format="MMdd"
:picker-options="pickerBirthOptions"
@focus="selectFocus(index,key,ind)"
@change="changeDate($event,index,key,ind)"
<div
class="gic-select-wrap inline-block"
v-if="childCell.templateCode == 'com008'"
>
</vue-gic-datepicker>
<gic-select
:dateval.sync="childCell.levelModel"
@change="changeGicSelectValue(index, key, ind)"
></gic-select>
</div>
<!-- 下拉单选异步 -->
<div class="gic-select-wrap inline-block" v-if="childCell.templateCode == 'com009'">
<div
class="gic-select-wrap inline-block"
v-if="childCell.templateCode == 'com009'"
>
<div class="gic-select">
<el-select v-model="childCell.levelModel" class="temp-select" placeholder="请选择" @focus="selectFocus(index,key,ind)" @change="tempChange(index,key,ind)">
<el-select
v-model="childCell.levelModel"
class="temp-select"
placeholder="请选择"
@focus="selectFocus(index,key,ind)"
@change="tempChange(index,key,ind)"
>
<el-option
v-for="item in childCell.levelOptions"
:key="item.key"
:label="item.value"
:value="item.key"><!-- :key="item.key" -->
:value="item.key"
>
<!-- :key="item.key" -->
</el-option>
</el-select>
</div>
</div>
<!-- input tag 最后控件-->
<div class="gic-select-wrap inline-block input-tags" v-if="childCell.templateCode == 'com010'">
<!-- <el-select
v-model="childCell.levelModel"
multiple
filterable
allow-create
default-first-option
:popper-append-to-body="false"
no-data-text= ' '
no-match-text=' '
placeholder="请输入"
@focus="selectFocus(index,key,ind)"
@change = "changeCreate($event,index,key,ind)">
<el-option
v-for="item in optionsNone"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select> -->
<tags :tags.sync="childCell.levelModel" @click="selectFocus(index,key,ind)" :placeholder="childCell.widgetInstruction" @tagsChange="changeCreate($event,index,key,ind)"/>
<div
class="gic-select-wrap inline-block input-tags"
v-if="childCell.templateCode == 'com010'"
>
<tags
:tags.sync="childCell.levelModel"
@click="selectFocus(index,key,ind)"
:placeholder="childCell.widgetInstruction"
@tagsChange="changeCreate($event,index,key,ind)"
/>
</div>
<!-- 门店区域省市县树形 最后控件-->
<div class="gic-select-wrap inline-block" v-if="childCell.templateCode == 'com011'">
<div
class="gic-select-wrap inline-block"
v-if="childCell.templateCode == 'com011'"
>
<!-- <vue-area-ab :projectName="projectName" :areaOptions="areaOptions" :index="index" :indexKey="key" :ind="ind" @selected="selected" @click="selectFocus(index,key,ind)"></vue-area-ab> -->
<treeselect v-model="childCell.levelModel" :multiple="true" placeholder="请选择" :options="childCell.levelOptions" noOptionsText="暂无数据" noResultsText="无数据" noChildrenText="无数据" :normalizer="normalizer" value-consists-of="BRANCH_PRIORITY" :searchable="true" :clearable="false" @open="selectFocus(index,key,ind)" @select="selectTree($event,index,key,ind)" @deselect="deSelectTree($event,index,key,ind)"/>
<treeselect
v-model="childCell.levelModel"
:multiple="true"
placeholder="请选择"
:options="childCell.levelOptions"
noOptionsText="暂无数据"
noResultsText="无数据"
noChildrenText="无数据"
:normalizer="normalizer"
value-consists-of="BRANCH_PRIORITY"
:searchable="true"
:clearable="false"
@open="selectFocus(index,key,ind)"
@select="selectTree($event,index,key,ind)"
@deselect="deSelectTree($event,index,key,ind)"
/>
</div>
<!-- 时间区间年月日时分秒-年月日时分秒 最后控件v-if="childCell.templateCode == 'com012'"-->
<div class="gic-select-wrap inline-block" v-if="childCell.templateCode == 'com012'"><!-- default-time="235900" -->
<div
class="gic-select-wrap inline-block"
v-if="childCell.templateCode == 'com012'"
>
<!-- default-time="235900" -->
<el-date-picker
v-model="childCell.levelModel"
type="daterange"
......@@ -255,24 +340,24 @@
:picker-options="pickerOptionsRange"
@focus="selectFocus(index,key,ind)"
@change="changeDate($event,index,key,ind)"
>
</el-date-picker>
></el-date-picker>
</div>
</template>
</div>
</div>
<!-- 或者条件 -->
<div class="add-or-box" v-if="item.children.length < orConditionLength">
<span class="add-or-words">或者</span>
<span class="add-or-type" id="">
<ul class="filter-button condition-type" id="">
<li data-flag="or" v-for="(orItem,cindex) in conditionTypeList" data-index="index" data-key="key" data-conditiontype="belong" @click="orConditionClick(index,'or',orItem)">{{orItem.chainNodeName}}</li>
<!-- <li data-flag="or" data-index="index" data-key="key" data-conditiontype="baseinfo" @click="orConditionClick(index,'or','baseinfo')">基本信息</li>
<li data-flag="or" data-index="index" data-key="key" data-conditiontype="meminfo" @click="orConditionClick(index,'or','meminfo')">会员信息</li>
<li data-flag="or" data-index="index" data-key="key" data-conditiontype="interact" @click="orConditionClick(index,'or','interact')">互动信息</li>
<li data-flag="or" data-index="index" data-key="key" data-conditiontype="consume" @click="orConditionClick(index,'or','consume')">消费行为</li> -->
<span class="add-or-type" id>
<ul class="filter-button condition-type" id>
<li
data-flag="or"
v-for="(orItem,cindex) in conditionTypeList"
data-index="index"
data-key="key"
data-conditiontype="belong"
@click="orConditionClick(index,'or',orItem)"
>{{orItem.chainNodeName}}</li>
</ul>
</span>
</div>
......@@ -280,42 +365,36 @@
<!-- 第一个end -->
</div>
</div>
<div class="filter-and add-and-box addAndConditions" v-if="conditionsList.length < andConditionLength">
<div
class="filter-and add-and-box addAndConditions"
v-if="conditionsList.length < andConditionLength"
>
<span class="and-words" v-if="conditionsList.length > 0">并且</span>
<span class="conditionTypes">
<ul class="filter-button condition-type">
<li data-flag="and" data-conditiontype="belong" v-for="(andItem,index) in conditionTypeList" @click="andConditionClick('and',andItem)">{{andItem.chainNodeName}}</li>
<!-- <li data-flag="and" data-conditiontype="baseinfo" @click="andConditionClick('and','baseinfo')">基本信息</li>
<li data-flag="and" data-conditiontype="meminfo" @click="andConditionClick('and','meminfo')">会员信息</li>
<li data-flag="and" data-conditiontype="interact" @click="andConditionClick('and','interact')">互动信息</li>
<li data-flag="and" data-conditiontype="consume" @click="andConditionClick('and','consume')">消费行为</li> -->
<li
data-flag="and"
data-conditiontype="belong"
v-for="(andItem,index) in conditionTypeList"
@click="andConditionClick('and',andItem)"
>{{andItem.chainNodeName}}</li>
</ul>
</span>
</div>
</div>
</div>
<!-- <div class="people-temp-btns" v-if="conditionsShow">
<el-button type="primary" @click="confirmSet">确定</el-button>
<el-button @click="cancelSet">取消</el-button>
</div> -->
</div>
<!-- end -->
</div>
<!-- 筛选条件 -->
<!-- end -->
</div>
</template>
<script>
import Vue from 'vue';
import Vue from "vue";
import qs from "qs";
import VueGicDatepicker from '@gic-test/vue-gic-datepicker';
import vueGicStoreNew from '@gic-test/vue-gic-store-new/src/lib/index.vue';
import VueGicDatepicker from "@gic-test/vue-gic-datepicker";
import VueGicStoreNew from "@gic-test/vue-gic-store-new";
// 使用树形插件
// import the component
import Treeselect from "@riophae/vue-treeselect";
......@@ -325,13 +404,25 @@ import FilterTxt from "./filter-txt";
// import vueAreaAb from './vue-area-ab'
import tags from "./tags";
import GicSelect from "./birth-select";
import localforage from "localforage";
import { _debounce } from "./public";
import { setTimeout } from "timers";
Vue.use(VueGicStoreNew);
export default {
name: "vue-gic-people",
props: {
isAdd: {
type: Boolean,
default: true
},
// 是否是触发重置按钮
triggerReset: {
type: Boolean,
default: false
},
projectName: String, // 项目名
sceneValue: String, // 场景值
useId: String, // 模板id
......@@ -340,6 +431,8 @@ export default {
},
data() {
return {
flagStore: false,
OperateType: "",
repProjectName: "gic-web", // 项目名
repSceneCode: "member", //场景值
repId: "", // 模板id
......@@ -374,19 +467,12 @@ export default {
function formatDig(num) {
return num > 9 ? "" + num : "0" + num;
}
console.log(date);
this.birthBegin =
formatDig(new Date(date.minDate).getMonth() + 1) +
formatDig(new Date(date.minDate).getDate());
this.birthEnd =
formatDig(new Date(date.maxDate).getMonth() + 1) +
formatDig(new Date(date.maxDate).getDate());
console.log(
new Date(date.minDate).getMonth(),
new Date(date.maxDate),
this.birthBegin,
this.birthEnd
);
}
},
......@@ -437,100 +523,7 @@ export default {
optionsNone: [],
// 条件数据
conditionsList: [
// {
// id: '',
// chainNodeName: '归属信息',
// children: [
// {
// id: '',
// chainNodeName: '归属信息',
// type: 'belong',
// children:[
// {
// levelModel: '',
// templateCode: 'com001',
// levelOptions: [
// {
// value: '选项1',
// key: '黄金糕'
// },
// {
// value: '选项2',
// key: '黄金糕2'
// }
// ],
// },
// {
// levelModel: '',
// templateCode: 'com001',
// levelOptions: [
// {
// value: '选项11',
// key: '黄金糕11'
// },
// {
// value: '选项22',
// key: '黄金糕22'
// }
// ],
// },
// {
// levelModel: '',
// templateCode: 'com001',
// levelOptions: [
// {
// value: '选项13',
// key: '黄金糕13'
// },
// {
// value: '选项23',
// key: '黄金糕23'
// }
// ],
// },
// {
// levelModel: '',
// templateCode: 'com001',
// levelOptions: [],
// },
// {
// levelModel: null, // tree: null /['aa']; select: ''
// templateCode: 'com004',
// levelOptions: [
// {
// id: 'aa',
// label: 'a',
// children: [
// {
// id: 'aaa',
// label: 'aa',
// }, {
// id: 'abab',
// label: 'ab',
// }
// ],
// }
// ],
// },
// {
// levelModel: '',
// templateCode: 'com001',
// levelOptions: []
// }
// ]
// }
// ]
// }
],
// normalizer(node) {
// return {
// id: node.value,
// label: node.key,
// children: node.subOptions,
// }
// },
conditionsList: [],
// tree
treeFlag: false,
nodeId: "0", //获取门店分组参数
......@@ -597,7 +590,7 @@ export default {
children: node.children
};
}
return {}
return {};
},
// 条件类别列表数据
......@@ -626,6 +619,12 @@ export default {
}
},
methods: {
// 接收生日时间范围值
changeGicSelectValue(i, j, k) {
this.conditionsList[i].children[j].columnValue = this.conditionsList[
i
].children[j].children[1].levelModel.toString();
},
// 过滤回显数据
filterPassValue(data = []) {
data = data.map((ele, index) => {
......@@ -636,23 +635,34 @@ export default {
let model = e.levelModel; // 用来对比
// model 有基本类型和引用类型
let filterArr = [];
if (Array.isArray(model)) {
// 树形结构
if (e && e.templateCode == 'com004') {
// let saveChild = e.levelOptions[0].children[0];
e.levelOptions[0].children.length = 0;
// let middle = e.levelOptions[0].children.push(saveChild);
filterArr.push(e.levelOptions[0].children);
}
if (Array.isArray(model) && model.length) {
// 树形结构 移出去了
// if (e && e.templateCode == 'com004') {
// // let saveChild = e.levelOptions[0].children[0];
// e.levelOptions[0].children.length = 0;
// // let middle = e.levelOptions[0].children.push(saveChild);
// filterArr.push(e.levelOptions[0].children);
// }
// 保存levelModel 的值
model.forEach(mel => {
let middle = e.levelOptions.find(val => val.key == mel);
if (e.levelOptions && e.levelOptions.length) {
let middle = e.levelOptions.find(val => {
if (val) {
return val.key == mel;
}
});
filterArr.push(middle);
}
});
} else {
filterArr =
e.levelOptions &&
e.levelOptions.filter(item => item.key == model);
if (e.levelOptions && e.levelOptions.length) {
filterArr = e.levelOptions.filter(item => {
if (item) {
return item.key == model;
}
});
}
}
e.levelOptions.length = 0;
e.levelOptions = filterArr;
......@@ -667,41 +677,30 @@ export default {
// 模板选择
tempChangeList(e) {
var that = this;
console.log(e);
},
// 选择方法后,获取下级数据,追加到当行数据
tempChange(index, key, order) {
var that = this;
this.storeFlag = false;
console.log(index, key, order);
console.log(this.conditionsList[index].children);
if (this.conditionsList[index].children[key].children[1]) {
this.conditionsList[index].children[key].children[1].storeFlag = false;
}
// 请求参数
var parentChainId =
that.conditionsList[index].children[key].children[order]
.esScreeningWidgetChainId;
var widgetFieldKey =
that.conditionsList[index].children[key].children[order].levelModel;
that.getNextData(parentChainId, widgetFieldKey);
that.getNextData(parentChainId, widgetFieldKey, {
index: index,
key: key,
order: order
});
},
// 下拉多选最后控件
tempChangeMultip(e, index, key, order) {
var that = this;
console.log(
"下拉多选:",
String(e),
e.join(" "),
index,
key,
order,
that.conditionsList[index].children[key].columnValue
);
console.log(that.conditionsList[index].children[key]);
console.log(that.conditionsList[index].children[key].children[order]);
console.log(
that.conditionsList[index].children[key].children[order].levelModel
);
that.conditionsList[index].children[key].columnValue = e.join(" ");
},
......@@ -717,7 +716,6 @@ export default {
qs.stringify(para)
)
.then(res => {
console.log(res, res.data, res.data.errorCode);
var resData = res.data;
if (resData.errorCode == 0) {
this.conditionTypeList = resData.result;
......@@ -729,8 +727,6 @@ export default {
});
})
.catch(function(error) {
console.log(error);
// that.toLogin()
this.$message.error({
duration: 1000,
message: error.message
......@@ -739,7 +735,7 @@ export default {
},
// 获取下级数据
getNextData(parentChainId, widgetFieldKey) {
getNextData(parentChainId, widgetFieldKey, indexObj) {
var that = this;
that.$forceUpdate();
var param = {
......@@ -754,18 +750,15 @@ export default {
qs.stringify(param)
)
.then(res => {
console.log(res, res.data, res.data.errorCode);
var resData = res.data;
if (resData.errorCode == 0) {
var data = resData.result;
if (!resData.result) {
console.log("zuihou: result-null");
this.$message.warning("没有此模板!");
return;
}
// 如果切换了不是特殊的 16 ,先删除
console.log(
that.conditionsList[that.andIndex].children[that.orIndex]
);
// sy 添加文本内容 根据property字段
if (
data.property != 16 &&
......@@ -776,16 +769,6 @@ export default {
delete that.conditionsList[that.andIndex].children[that.orIndex]
.dealKey;
}
// if (data.property == 8) {
// // "property" : "8", //属性:1、计算属性(>,=), 2、字段属性(搜索字段名称),4、值属性,8、不是属性 可以两两组合(比如,有事计算属性又是值属性,就是5
// that.conditionsList[that.andIndex].children[that.orIndex].columnKey = data.columnKey;
// that.conditionsList[that.andIndex].children[that.orIndex].computeCharacter = data.computeCharacter;
// that.conditionsList[that.andIndex].children[that.orIndex].columnValue = '';
// if (that.conditionsList[that.andIndex].children[that.orIndex].dealKey) {
// delete that.conditionsList[that.andIndex].children[that.orIndex].dealKey
// }
// console.log("data.property字段8:columnKey" ,data.property,data.columnKey,data.computeCharacter)
// }
// 计算
if (data.property == 1) {
......@@ -804,11 +787,6 @@ export default {
delete that.conditionsList[that.andIndex].children[that.orIndex]
.dealKey;
}
console.log(
"data.property计算: computeCharacter",
data.property,
data.computeCharacter
);
}
// 字段
if (data.property == 2) {
......@@ -829,11 +807,6 @@ export default {
delete that.conditionsList[that.andIndex].children[that.orIndex]
.dealKey;
}
console.log(
"data.property字段:columnKey",
data.property,
data.columnKey
);
}
// 计算属性+字段属性
if (data.property == 3) {
......@@ -854,11 +827,6 @@ export default {
delete that.conditionsList[that.andIndex].children[that.orIndex]
.dealKey;
}
console.log(
"data.property计算+字段:computeCharacter,columnKey",
data.computeCharacter,
data.columnKey
);
}
// 值属性
if (data.property == 4) {
......@@ -866,33 +834,32 @@ export default {
that.conditionsList[that.andIndex].children[
that.orIndex
].columnValue = data.columnValue;
console.log(
"data.property值属性:columnValue",
data.property,
data.columnValue
);
}
// 新的门店
// 门店
if (data.property && data.chainNodeName.indexOf('门店') > -1) {
this.conditionsList[this.andIndex].children[this.orIndex].dealKey = 'storeWidget';
console.log(this.conditionsList[this.andIndex].children[this.orIndex].dealKey);
}
// if ((data.property & 16) > 0) {
// that.conditionsList[that.andIndex].children[
// that.orIndex
// ].dealKey = data.dealKey;
// that.conditionsList[that.andIndex].children[that.orIndex].columnKey = data.columnKey;
// that.conditionsList[that.andIndex].children[that.orIndex].computeCharacter = data.computeCharacter;
// that.conditionsList[that.andIndex].children[
// that.orIndex
// ].columnValue = "";
// console.log("data.property门店:", data.property);
// }
if (data.property === 19 && data.widget.templateCode === "com020") {
this.conditionsList[this.andIndex].children[
this.orIndex
].dealKey = "storeWidget";
}
if ((data.property & 16) > 0) {
that.conditionsList[that.andIndex].children[
that.orIndex
].dealKey = data.dealKey;
that.conditionsList[that.andIndex].children[
that.orIndex
].columnKey = data.columnKey;
that.conditionsList[that.andIndex].children[
that.orIndex
].computeCharacter = data.computeCharacter;
that.conditionsList[that.andIndex].children[
that.orIndex
].columnValue = "";
}
// 判断是否把数据添加到下级组件中
that.addNextData(resData.result, widgetFieldKey);
that.addNextData(resData.result, widgetFieldKey, indexObj);
return;
}
that.$message.error({
......@@ -901,8 +868,6 @@ export default {
});
})
.catch(function(error) {
console.log(error);
// that.toLogin()
that.$message.error({
duration: 1000,
message: error.message
......@@ -911,30 +876,26 @@ export default {
},
// 添加数据到下级组件,需要先清空当前组件以后所有数据
addNextData(item, fieldKey) {
addNextData(item, fieldKey, indexObj) {
var that = this;
console.log("添加的下级数据:", item);
// 先清空当前组件以后所有数据
var arrList =
that.conditionsList[that.andIndex].children[that.orIndex].children;
var arrList = this.conditionsList[this.andIndex].children[this.orIndex]
.children;
for (var i = 0; i < arrList.length; i++) {
if (that.componentIndex < i) {
if (this.componentIndex < i) {
arrList.splice(i, 1);
--i;
}
}
// sourceFlag 如果是 url
if (!!item.widget && item.widget.sourceFlag == 1) {
console.log(":sourceFlag:", item.widget.sourceFlag);
item.widget.widgetParam = JSON.parse(item.widget.widgetParam);
console.log(item.widget.widgetParam[0]);
// 如果是搜索下拉多选
if (item.widget.templateCode == "com005") {
that.conditionsList[that.andIndex].children[that.orIndex].children[
that.componentIndex
].url = item.widget.widgetParam[0].value;
console.log(item.widget.widgetParam[0].value);
// 追加数据,显示下拉搜索双选组件,因为是多选,追加数据时候levelModel 是数组,不然选择时候报错 TypeError: value.push is not a function
that.pushData(item);
......@@ -960,31 +921,12 @@ export default {
item.widget.templateCode == "com013";
// 添加示范文本
let widgetName;
const storeOption = [0];
const storeOption = [0, 1, 2, 3, 4, 5];
const levelOptions = JSON.parse(item.widget.widgetValues);
// 门店组件 保存门店类型 传给门店组件
// 0 全部 1 门店类型 2门店标签 3 门店区域 4 门店分组 5 部分门店
const storeConf = [
{ key: 1, type: '门店类型' },
{ key: 2, type: '门店标签' },
{ key: 3, type: '门店区域' },
{ key: 4, type: '门店分组' },
{ key: 5, type: '部分门店' }
];
// sy
if (item.widget.widgetName.indexOf('门店') > -1) {
this.storeFlag = true;
if (item.property === 19 && item.widget.templateCode === "com020") {
widgetName = item.widget.widgetName;
levelOptions.forEach(el => {
storeConf.some(val => {
if (el.value == val.type) {
storeOption.push(val.key);
return true;
}
});
});
}
const newObj = {
......@@ -993,15 +935,18 @@ export default {
levelModel: conditionTag ? [] : "",
templateCode: item.widget.templateCode,
levelOptions: levelOptions,
widgetInstruction: item.widget.widgetInstruction,
widgetInstruction: item.widget.widgetInstruction
? item.widget.widgetInstruction
: "请选择",
widgetName: widgetName,
storeOption: storeOption,
uuid: ''
storeFlag: true,
operateType: true,
uuid: ""
};
console.log('当前数组', newObj);
that.conditionsList[that.andIndex].children[that.orIndex].children.push(newObj);
console.log(that.conditionsList[that.andIndex].children[that.orIndex].children, '门店数据结构');
that.conditionsList[that.andIndex].children[that.orIndex].children.push(
newObj
);
},
// 追加数据
......@@ -1014,22 +959,20 @@ export default {
levelModel: [],
templateCode: item.widget.templateCode,
levelOptions: [], //JSON.parse(item.widget.widgetValues),
widgetInstruction: item.widget.widgetInstruction,
widgetInstruction: item.widget.widgetInstruction
? item.widget.widgetInstruction
: "请选择",
widgetName: item.widget.widgetName
};
that.conditionsList[that.andIndex].children[that.orIndex].children.push(newObj);
that.conditionsList[that.andIndex].children[that.orIndex].children.push(
newObj
);
},
// 追加组件+数据
pushComData(item, options) {
var that = this;
// 如果是门店树形结构
// if (item.widget.templateCode=='com004') {
// options.forEach(function(ele,index) {
// // ele.id = ele.storeGroupId
// })
// }
var newObj = {};
newObj = {
esScreeningWidgetChainId: item.esScreeningWidgetChainId,
......@@ -1038,10 +981,7 @@ export default {
templateCode: item.widget.templateCode,
levelOptions: options //JSON.parse(item.widget.widgetValues),
};
console.log(
"当前数组:",
that.conditionsList[that.andIndex].children[that.orIndex].children
);
that.conditionsList[that.andIndex].children[that.orIndex].children.push(
newObj
);
......@@ -1049,7 +989,6 @@ export default {
// 获取请求的url,请求数据到下级
getUrlData(widgetParam, item, fieldKey) {
console.log("获取请求的url:", widgetParam, item);
var that = this;
var param = {
requestProject: that.repProjectName,
......@@ -1059,13 +998,11 @@ export default {
that.axios
.post(that.baseUrl + widgetParam[0].value, qs.stringify(param))
.then(res => {
console.log(res, res.data, res.data.errorCode);
var resData = res.data;
if (resData.errorCode == 0) {
// 判断省市县控件
if (item.widget.templateCode == "com011") {
console.log("省市县控件>>>>>>>>>>>");
resData.result.forEach(function(ele, index) {
ele.storeGroupId = ele.provinceId;
ele.storeGroupName = ele.provinceName;
......@@ -1077,7 +1014,6 @@ export default {
}
});
}
console.log("resData.result>>>>>", resData.result);
that.pushComData(item, resData.result);
return;
}
......@@ -1087,8 +1023,6 @@ export default {
});
})
.catch(function(error) {
console.log(error);
// that.toLogin()
that.$message.error({
duration: 1000,
message: error.message
......@@ -1099,14 +1033,32 @@ export default {
// input tag
changeCreate(e, index, key, ind) {
var that = this;
console.log("create input tag:", e, index, key, ind);
if (!this.conditionsList[index].children[key].children[ind].holderFlag) {
this.conditionsList[index].children[key].children[
ind
].holderFlag = false;
}
if (!this.conditionsList[index].children[key].children[ind].holderFlag) {
this.conditionsList[index].children[key].children[
ind
].holderFlag = true;
this.conditionsList[index].children[key].children[
ind
].middleHolder = this.conditionsList[index].children[key].children[
ind
].widgetInstruction;
}
this.conditionsList[index].children[key].children[
ind
].widgetInstruction = e.length
? ""
: this.conditionsList[index].children[key].children[ind].middleHolder;
that.conditionsList[index].children[key].columnValue = e.join(" ");
},
// 输入框输入的时候
toInput(e, index, key, ind) {
var that = this;
console.log("输入值:", e.target.value, index, key, ind);
var value = e.target.value;
that.conditionsList[that.andIndex].children[
that.orIndex
......@@ -1115,16 +1067,10 @@ export default {
blurFrom(e) {
var that = this;
console.log(
"输入值From:",
e.target.value,
that.conditionsList[that.andIndex].children[that.orIndex],
Number(e.target.value.replace(/[^\.\d]/g, ""))
);
var value = !Number(e.target.value.replace(/[^\.\d]/g, ""))
? Number(0)
: Number(e.target.value.replace(/[^\.\d]/g, ""));
console.log(value, Number(e.target.value.replace(/[^\.\d]/g, "")));
// 判断输入
let v1 =
......@@ -1134,7 +1080,6 @@ export default {
that.conditionsList[that.andIndex].children[that.orIndex].children[2]
.levelModel[1];
if (!Number(v2) || Number(v1) >= Number(v2)) {
console.log("输入值From:v2", Number(v1), v2, value);
that.conditionsList[that.andIndex].children[
that.orIndex
].children[2].levelModel[0] = value;
......@@ -1151,12 +1096,6 @@ export default {
].children[2].levelModel.join(",");
return;
}
// if (Number(v1) >= Number(v2)) {
// that.conditionsList[that.andIndex].children[that.orIndex].children[2].levelModel[1] = Number((!!Number(v1)? Number(v1):0) + 1)
// that.$forceUpdate();
// that.conditionsList[that.andIndex].children[that.orIndex].columnValue = that.conditionsList[that.andIndex].children[that.orIndex].children[2].levelModel.join(',')
// return;
// }
that.conditionsList[that.andIndex].children[
that.orIndex
......@@ -1171,15 +1110,10 @@ export default {
},
blurTo(e) {
var that = this;
console.log(
"输入值To:",
e.target.value,
that.conditionsList[that.andIndex].children[that.orIndex]
);
var value = !Number(e.target.value.replace(/[^\.\d]/g, ""))
? Number(0)
: Number(e.target.value.replace(/[^\.\d]/g, ""));
console.log(value);
let t1 =
that.conditionsList[that.andIndex].children[that.orIndex].children[2]
.levelModel[0];
......@@ -1219,13 +1153,6 @@ export default {
].children[2].levelModel.join(",");
return;
}
// if (Number(t1) >= Number(t2)) {
// console.log("输入值To:",Number(t1))
// that.conditionsList[that.andIndex].children[that.orIndex].children[2].levelModel[1] = Number(Number(t1) + 1)
// that.$forceUpdate();
// that.conditionsList[that.andIndex].children[that.orIndex].columnValue = that.conditionsList[that.andIndex].children[that.orIndex].children[2].levelModel.join(',')
// return
// }
that.conditionsList[that.andIndex].children[
that.orIndex
......@@ -1242,19 +1169,10 @@ export default {
// 输入框区间输入的时候
toInputFrom(e) {
var that = this;
console.log(
"输入值:",
e.target.value,
that.conditionsList[that.andIndex].children[that.orIndex]
);
var value = !Number(e.target.value.replace(/[^\d]/g, ""))
? "0"
: Number(e.target.value.replace(/[^\d]/g, ""));
console.log(
value,
Number(e.target.value.replace(/[^\d]/g, "")),
String(value).substr(String(value).length - 1, 1)
);
// 判断输入
let v1 =
......@@ -1289,11 +1207,7 @@ export default {
},
toInputTo(e) {
var that = this;
console.log(
"输入值:",
e.target.value,
that.conditionsList[that.andIndex].children[that.orIndex]
);
var value = !Number(e.target.value.replace(/[^\d]/g, ""))
? "0"
: Number(e.target.value.replace(/[^\d]/g, ""));
......@@ -1332,16 +1246,13 @@ export default {
// date 选择的时候
changeDate(e, index, key, ind) {
var that = this;
console.log("选择 date:", e, index, key, ind);
that.conditionsList[index].children[key].columnValue =
String(e) == "null" ? "" : String(e);
console.log(that.conditionsList[index].children[key].columnValue.length);
},
// 添加并且条件 flag: and, conditiontype: belong/baseinfo/meminfo/interact/consume
andConditionClick(flag, item) {
var that = this;
console.log("添加并且条件", flag, item);
// 显示确认取消按钮
that.$emit("editShow");
// 判断是不是通过 url 请求数据 sourceFlag 是 url请求
......@@ -1358,7 +1269,6 @@ export default {
// 添加或者条件 index: 第几个并条件;
orConditionClick(index, flag, item) {
var that = this;
console.log("添加或者条件:", index, flag, item);
// 显示确认取消按钮
that.$emit("editShow");
......@@ -1371,7 +1281,6 @@ export default {
that.conditionsList[index].children.push(
that.judgeOrConditionType(item, JSON.parse(item.widget.widgetValues))
);
console.log(that.conditionsList[index].children, '开卡信息');
},
// 点击下拉事件
......@@ -1379,20 +1288,6 @@ export default {
this.andIndex = index;
this.orIndex = key;
this.componentIndex = order;
console.log(
"第 " +
index +
" 个并条件中第 " +
key +
" 个或条件中第 " +
order +
" 个组件",
this.conditionsList[index].children[key].children[order]
);
console.log(
this.conditionsList[index].children[key].children[order].levelModel
);
const idCollection = this.conditionsList[index].children[key].children[
order
];
......@@ -1408,29 +1303,52 @@ export default {
)
.then(res => {
const result = res.data.result; // 返回的结果 从第一层开始
if (result.chainNodeName === '开卡信息' || result.widget.templateCode === 'com009') {
if (
result.chainNodeName === "开卡信息" ||
result.widget.templateCode === "com009"
) {
return;
}
const retArr = JSON.parse(result.widget.widgetValues);
const widgetParam = JSON.parse(result.widget.widgetParam);
// 根据order来判断
if (order == 0) {
this.spliceCollection(this.conditionsList[index].children[key].children[order].levelOptions, retArr);
this.spliceCollection(
this.conditionsList[index].children[key].children[order]
.levelOptions,
retArr
);
} else if (order == 1) {
// 各种模板太多了
if (result.widget.templateCode == 'com002' || result.widget.templateCode == 'com001') {
this.spliceCollection(this.conditionsList[index].children[key].children[order].levelOptions, retArr);
} else if (result.widget.templateCode == 'com007') {
this.getSecondFilterData(widgetParam[0].value, result.widgetFieldKey, { index: index, key: key, order: order }, result);
if (
result.widget.templateCode == "com002" ||
result.widget.templateCode == "com001"
) {
this.spliceCollection(
this.conditionsList[index].children[key].children[order]
.levelOptions,
retArr
);
} else if (result.widget.templateCode == "com007") {
this.getSecondFilterData(
widgetParam[0].value,
result.widgetFieldKey,
{ index: index, key: key, order: order },
result
);
}
} else if (order == 2) {
// 输入框
if (result.widget.templateCode == 'com003') {
if (result.widget.templateCode == "com003") {
return;
}
// 单选下拉
if (result.widget.templateCode == 'com001') {
this.spliceCollection(this.conditionsList[index].children[key].children[order].levelOptions, retArr);
if (result.widget.templateCode == "com001") {
this.spliceCollection(
this.conditionsList[index].children[key].children[order]
.levelOptions,
retArr
);
}
}
});
......@@ -1444,9 +1362,8 @@ export default {
* @param result 要传递给第二层要的参数
*/
getSecondFilterData(url, fieldKey, itemList, result) {
console.log(result);
const templateCode = result.widget.templateCode;
if (templateCode == 'com007' || templateCode == 'com002') {
if (templateCode == "com007" || templateCode == "com002") {
const param = {
requestProject: this.repProjectName,
key: fieldKey
......@@ -1456,9 +1373,13 @@ export default {
.then(res => {
// 下拉集合
const retList = res.data.result;
this.spliceCollection(this.conditionsList[itemList.index].children[itemList.key].children[itemList.order].levelOptions, retList);
this.spliceCollection(
this.conditionsList[itemList.index].children[itemList.key]
.children[itemList.order].levelOptions,
retList
);
});
} else if (templateCode == 'com001') {
} else if (templateCode == "com001") {
// 单选模板
const param = {
requestProject: this.repProjectName,
......@@ -1466,9 +1387,12 @@ export default {
widgetFieldKey: result.widgetFieldKey
};
// 单选获取接口
this.axios.post(`${this.baseUrl}/api-plug/get-screening-chain-detail`, qs.stringify(param)).then(res => {
console.log(res);
});
this.axios
.post(
`${this.baseUrl}/api-plug/get-screening-chain-detail`,
qs.stringify(param)
)
.then(res => {});
}
},
......@@ -1490,15 +1414,13 @@ export default {
// 选择搜索后的列表
changeRemote(e, index, key, ind) {
var that = this;
console.log(e, index, key, ind);
that.conditionsList[index].children[key].columnValue = e.join(" "); //String(e)
},
// 选择 tree 树形结构
selectTree(e, index, key, ind) {
var that = this;
console.log(e, index, key, ind);
// console.log(that.conditionsList[index].children[key].children[ind])
var arr = {};
setTimeout(function() {
arr = JSON.parse(
......@@ -1506,26 +1428,17 @@ export default {
that.conditionsList[index].children[key].children[ind].levelModel
)
);
console.log(
JSON.stringify(arr),
that.conditionsList[index].children[key].children[ind].levelModel
);
that.conditionsList[that.andIndex].children[
that.orIndex
].columnValue = arr.join(" "); //String(arr)
console.log(
that.conditionsList[that.andIndex].children[that.orIndex].columnValue
);
}, 100);
// var arr = {}
// arr = JSON.parse(JSON.stringify(that.conditionsList[index].children[key].children[ind]))
// console.log(JSON.stringify(arr),that.conditionsList[index].children[key].children[ind].levelModel)
},
// 不选tree
deSelectTree(e, index, key, ind) {
var that = this;
console.log(e, index, key, ind);
// console.log(that.conditionsList[index].children[key].children[ind])
var arr = {};
setTimeout(function() {
arr = JSON.parse(
......@@ -1533,11 +1446,9 @@ export default {
that.conditionsList[index].children[key].children[ind].levelModel
)
);
// console.log(JSON.stringify(arr),that.conditionsList[index].children[key].children[ind].levelModel)
that.conditionsList[that.andIndex].children[
that.orIndex
].columnValue = arr.join(" "); //String(arr)
// console.log(that.conditionsList[that.andIndex].children[that.orIndex].columnValue)
}, 100);
},
......@@ -1545,7 +1456,6 @@ export default {
// 搜索
remoteMethod: _debounce(function(query) {
var that = this;
console.log("query:", query);
var selectValue =
that.conditionsList[that.andIndex].children[that.orIndex].children[
that.componentIndex
......@@ -1554,7 +1464,6 @@ export default {
that.conditionsList[that.andIndex].children[that.orIndex].children[
that.componentIndex
].levelOptions;
// console.log(selectValue,selectLevelOptions,selectLevelOptions.length)
if (query !== "") {
var newOptions = [];
if (!!selectLevelOptions && !!selectLevelOptions.length) {
......@@ -1572,7 +1481,6 @@ export default {
that.conditionsList[that.andIndex].children[that.orIndex].children[
that.componentIndex - 1
].url;
// console.log("取到当前组前一个保存的",url)
that.getCurrentData(url, query);
// 获取搜索列表数据
......@@ -1585,7 +1493,6 @@ export default {
// 获取门店列表
getStoreList(query, threeLevelValue) {
var that = this;
// console.log(threeLevelValue)
var para = {
searchParam: query,
selectedIds: threeLevelValue ? String(threeLevelValue) : "",
......@@ -1599,7 +1506,6 @@ export default {
qs.stringify(para)
)
.then(res => {
// console.log(res,res.data,res.data.errorCode)
var resData = res.data;
if (resData.errorCode == 0) {
resData.result.forEach(function(ele, index) {
......@@ -1619,8 +1525,6 @@ export default {
});
})
.catch(function(error) {
console.log(error);
// that.toLogin()
that.$message.error({
duration: 1000,
message: error.message
......@@ -1638,11 +1542,6 @@ export default {
that.axios
.post(that.baseUrl + url, qs.stringify(para))
.then(res => {
console.log(
that.conditionsList[that.andIndex].children[that.orIndex].children[
that.componentIndex
].levelOptions
);
var resData = res.data;
if (resData.errorCode == 0) {
resData.result.forEach(function(ele, index) {
......@@ -1655,14 +1554,12 @@ export default {
].children[that.componentIndex].levelOptions.unshift(ele);
// that.conditionsList[that.andIndex].children[that.orIndex].children[that.componentIndex].levelOptions = tempOptions;//[...new Set(tempOptions)]
});
// console.log("##转换后:",[...new Set(that.conditionsList[that.andIndex].children[that.orIndex].children[that.componentIndex].levelOptions)])
let obj = {};
let person =
that.conditionsList[that.andIndex].children[that.orIndex]
.children[that.componentIndex].levelOptions;
person = person.reduce((cur, next) => {
// console.log(cur,next)
obj[next.key] ? "" : (obj[next.key] = true && cur.push(next));
return cur;
}, []); //设置cur默认类型为数组,并且初始值为空的数组
......@@ -1670,7 +1567,6 @@ export default {
that.componentIndex
].levelOptions = person;
// that.conditionsList[that.andIndex].children[that.orIndex].children[that.componentIndex].levelOptions = resData.result
console.log(person);
return;
}
......@@ -1680,8 +1576,6 @@ export default {
});
})
.catch(function(error) {
console.log(error);
// that.toLogin()
that.$message.error({
duration: 1000,
message: error.message
......@@ -1692,7 +1586,6 @@ export default {
// 省市县选择
selected(val) {
var that = this;
console.log(val);
if (val.country) {
that.conditionsList[val.index].children[val.indexKey].columnValue =
val.areaId;
......@@ -1701,18 +1594,29 @@ export default {
// 删除 cell 条件
deleteCell(index, key) {
var that = this;
console.log(index, key);
that.conditionsList[index].children.splice(key, 1);
if (that.conditionsList[index].children.length == 0) {
that.conditionsList.splice(index, 1);
this.conditionsList[index].children.splice(key, 1);
// 重新 再渲染一次
this.conditionsList.map(v => {
if (v.children instanceof Array) {
v.children.map(w => {
if (w.children[1] && w.children[1].uuid) {
w.children[1].storeFlag = false;
this.$nextTick(_ => {
w.children[1].storeFlag = true;
w.children[1].operateType = true;
});
}
console.log(that.conditionsList);
});
}
});
if (this.conditionsList[index].children.length == 0) {
this.conditionsList.splice(index, 1);
}
//判断隐藏/显示按钮
if (that.conditionsList.length === 0) {
that.$emit("hideBtn", 0);
if (this.conditionsList.length === 0) {
this.$emit("hideBtn", 0);
}
},
......@@ -1726,34 +1630,49 @@ export default {
},
returnFlag(data) {
var that = this;
var tag = true;
data.forEach(function(ele, index) {
ele.children.forEach(function(el, ind) {
if (!el.columnValue) {
el.children.forEach(item => {
el.columnValue = item.uuid ? item.uuid : '';
el.columnValue = item.uuid ? item.uuid : "";
});
console.log(el.columnValue);
if (el.columnValue) return;
that.showWarn("请完善筛选条件", "warning");
tag = false;
return;
}
});
});
return tag;
},
// 点击编辑模板
// sy 点击编辑模板
editTemp() {
if (this.repId && !this.confirm) {
this.getTempDetail();
} else {
this.conditionsList.map(v => {
if (v.children instanceof Array) {
v.children.map(w => {
w.children[1].storeFlag = false;
if (w.children[1] && w.children[1].uuid) {
w.children[1].operateType = false;
} else {
w.children[1].operateType = true;
}
this.$nextTick(_ => {
w.children[1].storeFlag = true;
});
});
}
});
this.$nextTick(_ => {
this.conditionDetailShow = false;
this.conditionsShow = true;
if (!!this.conditionsList.length) {
if (this.conditionsList.length) {
this.$emit("editShow");
} else {
this.$emit("hideBtn");
}
});
}
},
// 点击重置
......@@ -1761,29 +1680,58 @@ export default {
var that = this;
that.conditionDetailShow = false;
that.conditionsShow = true;
// 清空数据
// that.cancelSet()
// 清空所有的条件值
that.conditionsList = [];
that.templateData = [];
// 隐藏按钮
that.$emit("hideBtn");
// 传递查询数据空的
that.$emit("findFilter", "");
// 传递列表数据空的
that.$emit("getBackData", "");
// 是否 是重置按钮触发
if (this.triggerReset) {
this.$emit("getBackData", "remove");
} else {
this.$emit("getBackData", "");
}
},
// 确认设置
// sy 外层确认提交人群筛选器的信息
confirmSet() {
var that = this;
console.log(that.conditionsList);
var setData = JSON.parse(JSON.stringify(that.conditionsList));
this.confirm = true;
return new Promise((resolve, reject) => {
(async () => {
// 是否有空的
let emptyFlag;
this.conditionsList.forEach(list => {
list.children.forEach(item => {
if (item.children) {
emptyFlag = item.children.every(ele => {
// 门店组件是没有levelModel值的
if (ele.templateCode != "com020") {
return ele.levelModel != "";
} else {
return true;
}
});
}
});
});
if (!emptyFlag) {
this.$message.warning("请先完善筛选信息!");
return false;
}
var setData = JSON.parse(JSON.stringify(this.conditionsList));
this.newCardList = JSON.parse(JSON.stringify(this.conditionsList));
// {"list":[{"type":"or","list":[{"type":"data","data":{"key":"mainStoreId","compute":"in","value":"0","dealKey":"storeWidget"}}]}],"type":"and"}
// 发送数据 拼接
var sendData = {
list: [],
......@@ -1798,40 +1746,6 @@ export default {
return false;
}
// 存储模板数据到本地数据库
// that.saveIndexDb(setData)
// window.localStorage.setItem('temp',JSON.stringify(setData))
// localforage.setItem('tempData', setData).then(function (value) {
// // 当值被存储后,可执行其他操作
// console.log(value);
// }).catch(function(err) {
// // 当出错时,此处代码运行
// console.log(err);
// });
// setData.forEach(function(ele,index) {
// var obj = {
// type: "or",
// list: [
// ]
// }
// ele.children.forEach(function(el,index) {
// el.children.forEach(function(element,keys) {
// console.log(element.levelModel,keys)
// var ky = keys
// if (element.levelOptions) {
// element.levelOptions.forEach(function(child,k) {
// if (element.levelModel == child.key) {
// el[ky] = child.value
// }
// })
// }
// })
// })
// })
// console.log("setData:",JSON.stringify(setData))
// return;
var birthFlag = true;
setData.forEach(function(ele, index) {
//外层 and
......@@ -1847,7 +1761,12 @@ export default {
};
innerObj.data.key = el.columnKey;
innerObj.data.compute = el.computeCharacter;
// 主要的门店的uuid
if (el.dealKey === "storeWidget") {
innerObj.data.value = el.children && el.children[1] && el.children[1].uuid;
} else {
innerObj.data.value = el.columnValue;
}
if (el.dealKey) {
innerObj.data.dealKey = el.dealKey;
}
......@@ -1864,12 +1783,13 @@ export default {
el.children.forEach(function(child, key) {
let emptyArr = [];
if (child.templateCode == "com005") {
// console.log(child.levelOptions)
if (child.levelOptions && child.levelOptions.length) {
child.levelOptions.forEach(function(obj, k) {
if (child.levelModel.indexOf(obj.key) !== -1) {
emptyArr.push(obj);
}
});
}
child.levelOptions = emptyArr;
}
});
......@@ -1877,28 +1797,20 @@ export default {
});
sendData.list.push(obj);
});
// 过滤之后的数据
const filterData = this.filterPassValue(setData);
// 保存过滤的json
this.filterToEcho = JSON.parse(JSON.stringify(filterData));
console.log("filterData:>>>>>", JSON.stringify(filterData));
console.log("sendData:>>>>>", JSON.stringify(sendData));
that.selectDataList = sendData;
// that.calculateNum(sendData)
setTimeout(function() {
this.selectDataList = sendData;
if (!birthFlag) {
that.showWarn("生日不能跨年", "warning");
this.showWarn("生日不能跨年", "warning");
return false;
}
that.getAbInfo(sendData, filterData);
}, 100);
// 获取缩略信息
// 隐藏筛选条件 获取缩略信息后显示
// that.conditionsShow = false;
// that.conditionDetailShow = true;
await this.getAbInfo(sendData, filterData);
resolve();
})();
});
},
// 计算选择多少项数据的
......@@ -1913,12 +1825,12 @@ export default {
});
}
// that.$emit('getSelectNum',len)
return len;
},
// 获取缩略信息
getAbInfo(sendData, setData) {
return new Promise((resolve, reject) => {
var that = this;
var para = {
params: JSON.stringify(sendData),
......@@ -1926,13 +1838,12 @@ export default {
sceneCode: that.repSceneCode
};
that.axios
this.axios
.post(
that.baseUrl + "/api-plug/screening-show-back",
this.baseUrl + "/api-plug/screening-show-back",
qs.stringify(para)
)
.then(res => {
console.log(res, res.data, res.data.errorCode);
var resData = res.data;
if (resData.errorCode == 0) {
that.templateData = resData.result
......@@ -1947,43 +1858,51 @@ export default {
// 传递查询数据
that.$emit("findFilter", JSON.stringify(sendData));
// 传递列表数据
if (JSON.stringify(setData)) {
that.$emit("getBackData", JSON.stringify(setData));
}
// 按钮隐藏
that.$emit("editHide");
return;
resolve();
}
that.$message.error({
duration: 1000,
message: resData.message
});
})
.catch(function(error) {
console.log(error);
// that.toLogin()
that.$message.error({
this.$message.error({
duration: 1000,
message: error.message
});
});
});
},
// 取消设置
cancelSet() {
var that = this;
// that.conditionsShow = false;
// that.conditionDetailShow = true;
// sy 老的替换新的uuid 解决编辑 取消但是不保存
if (this.editList && this.editList.length) {
this.conditionsList.forEach((ele, i) => {
if (ele.children && ele.children.length) {
ele.children.forEach((e, index) => {
if (
e.children[1] &&
this.editList[i].children[index] &&
this.editList[i].children[index].children.length
) {
e.children[1].uuid = this.editList[i].children[
index
].children[1].uuid;
}
});
}
});
}
// that.$emit('cancelFilter')
this.OperateType = false;
if (!!that.templateData && !!that.templateData.length) {
that.conditionsShow = false;
that.conditionDetailShow = true;
that.$emit("editHide");
return;
} else {
// 清空所有的条件值
that.conditionsList = [];
......@@ -2011,32 +1930,45 @@ export default {
.then(res => {
var resData = res.data;
if (resData.errorCode == 0) {
if (!!resData.result) {
if (resData.result && resData.result.detail) {
const result = JSON.parse(resData.result.detail);
if (!!result && result.length) {
// 保存之后的第一次掉回显 防止取消的时候没有传上次的回显数据
this.filterToEcho = resData.result.detail;
if (result && result.length) {
result.forEach((ele, index) => {
ele.children.forEach((el, key) => {
if (el.esScreeningWidgetChainId =="8b0f770c72c24158bda1105b40d7336c") {
let maps = el.children[0] && el.children[0].levelOptions.map(
item => item.key
);
if (
el.esScreeningWidgetChainId ==
"8b0f770c72c24158bda1105b40d7336c"
) {
let maps =
el.children[0] &&
el.children[0].levelOptions.map(item => item.key);
// addObjKey 所有关联门店门店
if (maps.indexOf(this.addObjKey.key) == -1) {
el.children[0].levelOptions.push(this.addObjKey);
}
// 判断是不是门店类型
if (el.dealKey === 'storeWidget') {
if (el.dealKey === "storeWidget") {
const param = {
requestProject: this.repProjectName,
parentChainId: el.esScreeningWidgetChainId,
widgetFieldKey: el.children[0].levelModel
};
this.axios.post(this.baseUrl + "/api-plug/get-screening-chain-detail", qs.stringify(param)).then(res => {
this.axios
.post(
this.baseUrl +
"/api-plug/get-screening-chain-detail",
qs.stringify(param)
)
.then(res => {
const storeRes = res.data.result.widget;
const newObj = {
esScreeningWidgetChainId: storeRes.esScreeningWidgetChainId,
esScreeningWidgetChainId:
storeRes.esScreeningWidgetChainId,
property: storeRes.property,
levelModel: [],
templateCode: storeRes.templateCode,
......@@ -2044,7 +1976,9 @@ export default {
widgetInstruction: storeRes.widgetInstruction,
widgetName: storeRes.widgetName,
storeOption: el.children[1].storeOption,
uuid: el.children[1].uuid
uuid: el.children[1].uuid,
storeFlag: false,
operateType: true
};
el.children[1].levelOptions.push(newObj);
});
......@@ -2052,10 +1986,34 @@ export default {
}
});
});
this.storeFlag = true
// this.storeFlag = true
// sy 这里把过滤的数据 请求之后 返回回来 再赋值给conditionsList
this.conditionsList = result;
this.$emit("editHide");
this.conditionsList.map(v => {
if (v.children instanceof Array) {
v.children.map(w => {
w.children[1].storeFlag = false;
if (w.children[1] && w.children[1].uuid) {
w.children[1].operateType = false;
} else {
w.children[1].operateType = true;
}
this.$nextTick(_ => {
w.children[1].storeFlag = true;
});
});
}
});
this.$nextTick(_ => {
this.conditionDetailShow = false;
this.conditionsShow = true;
if (!!this.conditionsList.length) {
this.$emit("editShow");
} else {
this.$emit("hideBtn");
}
});
}
}
return;
......@@ -2066,8 +2024,6 @@ export default {
});
})
.catch(error => {
console.log(error);
// that.toLogin()
this.$message.error({
duration: 1000,
message: error.message
......@@ -2077,11 +2033,10 @@ export default {
// 判断并条件类型,添加数据
judgeConditionType(item, levelOptions) {
console.log('添加并且条件');
var addObj = {};
var length = this.conditionsList.length;
let widgetName;
if(item.widget.widgetName.indexOf('门店') > -1) {
if (item.property === 19 && item.widget.templateCode === "com020") {
widgetName = item.widget.widgetName;
}
......@@ -2109,7 +2064,6 @@ export default {
}
]
};
console.log(addObj);
return addObj;
},
......@@ -2119,7 +2073,9 @@ export default {
var para = {
requestProject: that.repProjectName
};
that.axios.post(that.baseUrl + url, qs.stringify(para)).then(res => {
that.axios
.post(that.baseUrl + url, qs.stringify(para))
.then(res => {
var resData = res.data;
if (resData.errorCode == 0) {
resData.result.forEach(function(ele, index) {
......@@ -2145,8 +2101,6 @@ export default {
});
})
.catch(function(error) {
console.log(error);
// that.toLogin()
that.$message.error({
duration: 1000,
message: error.message
......@@ -2159,7 +2113,7 @@ export default {
var that = this;
var addObj = {};
let widgetName;
if (item.widget.widgetName.indexOf('门店') > -1) {
if (item.widget.widgetName.indexOf("门店") > -1) {
widgetName = item.widget.widgetName;
}
addObj = {
......@@ -2183,8 +2137,17 @@ export default {
}
},
watch: {
conditionsList(nv, ov) {
console.log(nv, "conlist");
flag: {
immediate: true,
handler(newval) {
this.flagStore = newval;
}
},
isAdd: {
immediate: true,
handler(newval) {
this.OperateType = newval;
}
},
projectName: function(newData, oldData) {
var that = this;
......@@ -2194,14 +2157,13 @@ export default {
var that = this;
that.repSceneCode = newData || "member";
},
useId: function(newData, oldData) {
var that = this;
that.repId = newData;
that.getTempDetail();
},
// useId: function(newData, oldData) {
// var that = this;
// that.repId = newData;
// // that.getTempDetail();
// },
// sy 回显的数据 当接口返回的时候 newData就是一开始保存选中的数据
hasSearchData: function(newData, oldData) {
console.log("responseData:", newData);
if (!!newData) {
this.responseData = JSON.parse(newData);
this.getAbInfo(this.responseData);
......@@ -2215,12 +2177,10 @@ export default {
}
},
mounted() {
this.storeFlag = false;
this.getDataList();
// 项目名
this.repProjectName = this.projectName || "gic-web";
this.repSceneCode = this.sceneValue || "member"; // 获取场景值
this.repId = this.useId; // 获取模板 id
......@@ -2228,13 +2188,11 @@ export default {
this.$emit("hideBtn");
// 数据回显
if (!!this.repId) {
this.getTempDetail();
}
// if (!!this.repId) {
// this.getTempDetail();
// }
//
if (!!this.hasSearchData) {
console.log("hasSearchData//////////", this.hasSearchData);
this.responseData = JSON.parse(this.hasSearchData);
this.getAbInfo(this.responseData);
// 显示缩略 显示保存按钮
......@@ -2252,472 +2210,9 @@ export default {
tags,
FilterTxt,
VueGicDatepicker,
vueGicStoreNew
GicSelect
}
};
</script>
<style lang="scss" scoped>
.people-content {
width: 100%;
padding: 24px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
background: #f2f3f4;
.people-temp-head {
.member-templates-title {
display: inline-block;
width: 100px;
text-align: right;
margin-right: 30px;
line-height: 32px;
}
.el-select {
width: 195px;
/*height: 40px;*/
border-radius: 4px;
line-height: 32px;
/*border: 1px solid #e7e7eb;*/
position: relative;
cursor: pointer;
color: #888;
}
.input-search-select {
.el-select {
width: 375px;
overflow: hidden;
text-overflow: ellipsis;
/deep/.el-select__tags-text {
max-width: 262px;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
vertical-align: top;
}
}
}
}
.el-select .el-input__inner {
border: none !important;
border-radius: 2px !important;
}
}
/*去掉输入框右侧*/
.input-tags /deep/ {
.el-input__suffix-inner {
display: none;
}
}
.el-select > .el-input {
border: none;
}
.temp-select .el-input__inner {
border: none;
border-radius: 2px;
}
.screening-condition {
margin-left: 100px;
margin-top: 14px;
}
.screening-condition .btn-edit-group,
.screening-condition .btn-cancel-group {
color: #909399;
cursor: pointer;
display: inline-block;
font-size: 14px;
margin-left: 4px;
position: relative;
width: 14px;
height: 14px;
top: 1px;
/*background: url('../../images/14x14icon@2x.png') no-repeat center center;*/
}
.screening-condition .btn-edit-group:hover {
color: #1890ff;
}
.screening-condition .el-icon-delete:hover {
color: #f56c6c;
}
.screening-condition .btn-edit-group {
background-position: 0 -355px;
}
.screening-condition .btn-cancel-group {
background-position: -59px -298px;
}
.detail {
display: inline;
cursor: pointer;
/*margin-top: 14px;*/
font-size: 14px;
color: #858585;
line-height: 20px;
}
.detail span {
font-size: 14px;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.detail .bg_blue {
display: inline-block;
background: #effcff;
padding: 6px 7px;
border-radius: 3px;
color: #858585;
margin: 0 5px 5px 5px;
height: 18px;
}
.detail .word {
margin: 0px 10px;
}
.detail .bg_yellow {
display: inline-block;
background: #fffeeb;
padding: 6px 7px;
border-radius: 3px;
color: #858585;
margin: 0 5px 5px 5px;
height: 18px;
}
.gic-btn {
height: 36px;
line-height: 36px;
color: #fff;
padding: 0 24px;
font-size: 14px;
border-radius: 2px;
background: #1890ff;
border: none;
outline: none;
cursor: pointer;
margin-top: 30px;
&:hover {
/*background: #fceb88;*/
}
}
/* 筛选条件 */
@media screen and (min-width: 1131px) {
.ration .groupbox {
/*min-width: 1241px;*/
min-width: 750px;
padding-right: 30px;
}
}
@media screen and (max-width: 1131px) {
.ration .groupbox {
/*min-width: 1241px;*/
min-width: 750px;
padding-right: 30px;
}
}
.el-input__inner {
/*border: 0px solid #dcdfe6;*/
}
.filter-message {
position: relative;
background: #fff;
padding: 10px 30px;
}
.filter-content {
margin-top: 0;
min-width: 1100px;
position: relative;
}
.filter-content .member-templates-condition-title {
width: 80px;
vertical-align: top;
position: absolute;
left: 0;
top: 0;
text-align: right;
margin: 0px;
z-index: 2;
font-size: 14px;
line-height: 28px;
color: #303133;
}
.filter-box {
border-left: 10px solid #1890ff;
}
.filter-message {
position: relative;
background: #fff;
padding-left: 30px;
padding-bottom: 10px;
font-size: 0;
}
.fliter-message-title {
margin-right: 7px;
line-height: 32px;
height: 32px;
font-size: 14px;
margin: 0;
}
.marginLeft134 {
margin-left: 100px;
}
.inline-block {
display: inline-block;
vertical-align: top;
}
.filter-or {
display: inline-block;
margin-right: 20px;
}
.filter-button li {
padding: 8px 15px;
display: inline-block;
background: #e3e7ee;
border-radius: 20px;
font-size: 12px;
line-height: 12px;
margin-right: 10px;
cursor: pointer;
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.filter-button li:hover {
background: #1890ff;
color: #fff;
}
.filter-button .filter-active {
background: #1890ff;
color: #fff;
}
.filter-and {
display: flex;
margin: 10px 10px 10px -10px;
font-size: 14px;
}
.filter-close {
color: #909399;
cursor: pointer;
position: absolute;
right: 10px;
top: 20px;
font-size: 14px;
}
.filter-close:hover {
color: #f56c6c;
}
.filter-button {
margin: 0px 10px 0px 15px;
}
.add-or-box {
display: flex;
margin: 10px 0 0 16px;
}
.add-or-box .add-or-words {
margin-right: 16px;
padding: 3px 0 0;
/*line-height: 30px;*/
font-size: 14px;
}
.andlabels {
margin: 10px 10px 10px -10px;
font-size: 14px;
}
.group_combo > .orlabels {
height: 30px;
line-height: 30px;
margin-left: 15px;
color: #292929;
font-size: 14px;
}
.gic-select-wrap {
position: relative;
margin-left: 8px;
}
/* btns */
.people-temp-btns {
width: 100%;
margin-top: 20px;
display: inline-block;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding-left: 130px;
}
/*tree*/
.el-tree-out {
position: absolute;
left: 0;
}
.el-tree-contain {
position: relative;
left: 0px;
width: 400px;
height: 300px;
z-index: 91008;
border: 1px solid #e4e7ed;
border-radius: 4px;
background: #fff;
-webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.el-tree {
position: absolute;
left: 0px;
min-width: 398px;
height: 230px;
overflow: auto;
z-index: 91008;
border-bottom: 1px solid #e4e7ed;
margin: 15px 0;
}
.tree-btns {
position: absolute;
left: 0px;
top: 251px;
min-width: 398px;
height: 50px;
text-align: right;
.el-button.el-button--primary {
margin-right: 30px;
}
}
.select-wrap-input {
width: 100px;
margin-right: 10px;
}
.vue-treeselect /deep/ {
width: 217px;
font-size: 12px;
/deep/ .vue-treeselect__control {
height: 32px;
/*line-height: 36px;*/
cursor: pointer;
}
/deep/ .vue-treeselect__multi-value-item {
color: #909399;
background: #f0f2f5;
}
/deep/ .vue-treeselect__value-remove {
color: #909399;
}
.vue-treeselect__placeholder {
line-height: 32px;
font-size: 13.3333px;
}
.vue-treeselect--searchable:not(.vue-treeselect--disabled)
.vue-treeselect__value-container {
cursor: pointer;
}
.vue-treeselect__control-arrow {
display: none;
}
.vue-treeselect__control-arrow-container {
position: relative;
}
/deep/.vue-treeselect__control-arrow-container:after,
.vue-treeselect__control-arrow-container:before {
border: 6px solid transparent;
border-left: 6px solid #fff;
width: 0;
height: 0;
position: absolute;
top: 50%;
left: 50%;
margin-left: -6px;
content: " ";
margin-top: -3px;
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-o-transform: rotate(90deg);
transform: rotate(90deg);
-webkit-transition: -webkit-transform 0.3s;
transition: -webkit-transform 0.3s;
transition: transform 0.3s;
transition: transform 0.3s, -webkit-transform 0.3s;
transition: transform 0.3s, -webkit-transform 0.3s;
}
/deep/ .vue-treeselect__control-arrow-container:before {
border-left-color: #c0c4cc;
top: 52%;
}
&.vue-treeselect--focused .vue-treeselect__control-arrow-container:after,
&.vue-treeselect--focused .vue-treeselect__control-arrow-container:before {
margin-top: -6px;
-webkit-transform: rotateZ(-90deg);
-moz-transform: rotateZ(-90deg);
-o-transform: rotateZ(-90deg);
transform: rotateZ(-90deg);
-webkit-transition: -webkit-transform 0.3s;
transition: -webkit-transform 0.3s;
transition: transform 0.3s;
transition: transform 0.3s, -webkit-transform 0.3s;
transition: transform 0.3s, -webkit-transform 0.3s;
}
&.vue-treeselect--focused .vue-treeselect__control-arrow-container:before {
border-left-color: #c0c4cc;
top: 47%;
}
.vue-treeselect--has-value .vue-treeselect__multi-value {
margin-bottom: 0;
}
}
.gic-select-wrap .el-input__inner {
/*border-width: 1px;*/
}
</style>
\ No newline at end of file
<style src="../style/people.less" lang="less" scoped></style>
import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui'
Vue.use(ElementUI);
new Vue({
el: '#app',
......
.people-content {
width: 100%;
padding: 24px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
background: #f2f3f4;
.people-temp-head {
.member-templates-title {
display: inline-block;
width: 100px;
text-align: right;
margin-right: 30px;
line-height: 32px;
}
.el-select {
width: 195px;
/*height: 40px;*/
border-radius: 4px;
line-height: 32px;
/*border: 1px solid #e7e7eb;*/
position: relative;
cursor: pointer;
color: #888;
}
.input-search-select {
.el-select {
width: 375px;
overflow: hidden;
text-overflow: ellipsis;
/deep/.el-select__tags-text {
max-width: 262px;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
vertical-align: top;
}
}
}
}
.el-select .el-input__inner {
border: none !important;
border-radius: 2px !important;
}
}
/*去掉输入框右侧*/
.input-tags /deep/ {
.el-input__suffix-inner {
display: none;
}
}
.el-select > .el-input {
border: none;
}
.temp-select .el-input__inner {
border: none;
border-radius: 2px;
}
.screening-condition {
margin-left: 100px;
margin-top: 14px;
}
.screening-condition .btn-edit-group,
.screening-condition .btn-cancel-group {
color: #909399;
cursor: pointer;
display: inline-block;
font-size: 14px;
margin-left: 4px;
position: relative;
width: 14px;
height: 14px;
top: 1px;
/*background: url('../../images/14x14icon@2x.png') no-repeat center center;*/
}
.screening-condition .btn-edit-group:hover {
color: #1890ff;
}
.screening-condition .el-icon-delete:hover {
color: #f56c6c;
}
.screening-condition .btn-edit-group {
background-position: 0 -355px;
}
.screening-condition .btn-cancel-group {
background-position: -59px -298px;
}
.detail {
display: inline;
cursor: pointer;
/*margin-top: 14px;*/
font-size: 14px;
color: #858585;
line-height: 20px;
}
.detail span {
font-size: 14px;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.detail .bg_blue {
display: inline-block;
background: #effcff;
padding: 6px 7px;
border-radius: 3px;
color: #858585;
margin: 0 5px 5px 5px;
height: 18px;
}
.detail .word {
margin: 0px 10px;
}
.detail .bg_yellow {
display: inline-block;
background: #fffeeb;
padding: 6px 7px;
border-radius: 3px;
color: #858585;
margin: 0 5px 5px 5px;
height: 18px;
}
.gic-btn {
height: 36px;
line-height: 36px;
color: #fff;
padding: 0 24px;
font-size: 14px;
border-radius: 2px;
background: #1890ff;
border: none;
outline: none;
cursor: pointer;
margin-top: 30px;
&:hover {
/*background: #fceb88;*/
}
}
/* 筛选条件 */
@media screen and (min-width: 1131px) {
.ration .groupbox {
/*min-width: 1241px;*/
min-width: 750px;
padding-right: 30px;
}
}
@media screen and (max-width: 1131px) {
.ration .groupbox {
/*min-width: 1241px;*/
min-width: 750px;
padding-right: 30px;
}
}
.el-input__inner {
/*border: 0px solid #dcdfe6;*/
}
.filter-message {
position: relative;
background: #fff;
padding: 10px 30px;
}
.filter-content {
margin-top: 0;
min-width: 1100px;
position: relative;
}
.filter-content .member-templates-condition-title {
width: 80px;
vertical-align: top;
position: absolute;
left: 0;
top: 0;
text-align: right;
margin: 0px;
z-index: 2;
font-size: 14px;
line-height: 28px;
color: #303133;
}
.filter-box {
border-left: 10px solid #1890ff;
}
.filter-message {
position: relative;
background: #fff;
padding-left: 30px;
padding-bottom: 10px;
font-size: 0;
}
.fliter-message-title {
margin-right: 7px;
line-height: 32px;
height: 32px;
font-size: 14px;
margin: 0;
}
.marginLeft134 {
margin-left: 100px;
}
.inline-block {
display: inline-block;
vertical-align: top;
}
.filter-or {
display: inline-block;
margin-right: 20px;
}
.filter-button li {
padding: 8px 15px;
display: inline-block;
background: #e3e7ee;
border-radius: 20px;
font-size: 12px;
line-height: 12px;
margin-right: 10px;
cursor: pointer;
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.filter-button li:hover {
background: #1890ff;
color: #fff;
}
.filter-button .filter-active {
background: #1890ff;
color: #fff;
}
.filter-and {
display: flex;
margin: 10px 10px 10px -10px;
font-size: 14px;
}
.filter-close {
color: #909399;
cursor: pointer;
position: absolute;
right: 10px;
top: 20px;
font-size: 14px;
}
.filter-close:hover {
color: #f56c6c;
}
.filter-button {
margin: 0px 10px 0px 15px;
}
.add-or-box {
display: flex;
margin: 10px 0 0 16px;
}
.add-or-box .add-or-words {
margin-right: 16px;
padding: 3px 0 0;
/*line-height: 30px;*/
font-size: 14px;
}
.andlabels {
margin: 10px 10px 10px -10px;
font-size: 14px;
}
.group_combo > .orlabels {
height: 30px;
line-height: 30px;
margin-left: 15px;
color: #292929;
font-size: 14px;
}
.gic-select-wrap {
position: relative;
margin-left: 8px;
}
/* btns */
.people-temp-btns {
width: 100%;
margin-top: 20px;
display: inline-block;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding-left: 130px;
}
/*tree*/
.el-tree-out {
position: absolute;
left: 0;
}
.el-tree-contain {
position: relative;
left: 0px;
width: 400px;
height: 300px;
z-index: 91008;
border: 1px solid #e4e7ed;
border-radius: 4px;
background: #fff;
-webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.el-tree {
position: absolute;
left: 0px;
min-width: 398px;
height: 230px;
overflow: auto;
z-index: 91008;
border-bottom: 1px solid #e4e7ed;
margin: 15px 0;
}
.tree-btns {
position: absolute;
left: 0px;
top: 251px;
min-width: 398px;
height: 50px;
text-align: right;
.el-button.el-button--primary {
margin-right: 30px;
}
}
.select-wrap-input {
width: 100px;
margin-right: 10px;
}
.vue-treeselect /deep/ {
width: 217px;
font-size: 12px;
/deep/ .vue-treeselect__control {
height: 32px;
/*line-height: 36px;*/
cursor: pointer;
}
/deep/ .vue-treeselect__multi-value-item {
color: #909399;
background: #f0f2f5;
}
/deep/ .vue-treeselect__value-remove {
color: #909399;
}
.vue-treeselect__placeholder {
line-height: 32px;
font-size: 13.3333px;
}
.vue-treeselect--searchable:not(.vue-treeselect--disabled)
.vue-treeselect__value-container {
cursor: pointer;
}
.vue-treeselect__control-arrow {
display: none;
}
.vue-treeselect__control-arrow-container {
position: relative;
}
/deep/.vue-treeselect__control-arrow-container:after,
.vue-treeselect__control-arrow-container:before {
border: 6px solid transparent;
border-left: 6px solid #fff;
width: 0;
height: 0;
position: absolute;
top: 50%;
left: 50%;
margin-left: -6px;
content: " ";
margin-top: -3px;
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-o-transform: rotate(90deg);
transform: rotate(90deg);
-webkit-transition: -webkit-transform 0.3s;
transition: -webkit-transform 0.3s;
transition: transform 0.3s;
transition: transform 0.3s, -webkit-transform 0.3s;
transition: transform 0.3s, -webkit-transform 0.3s;
}
/deep/ .vue-treeselect__control-arrow-container:before {
border-left-color: #c0c4cc;
top: 52%;
}
&.vue-treeselect--focused .vue-treeselect__control-arrow-container:after,
&.vue-treeselect--focused .vue-treeselect__control-arrow-container:before {
margin-top: -6px;
-webkit-transform: rotateZ(-90deg);
-moz-transform: rotateZ(-90deg);
-o-transform: rotateZ(-90deg);
transform: rotateZ(-90deg);
-webkit-transition: -webkit-transform 0.3s;
transition: -webkit-transform 0.3s;
transition: transform 0.3s;
transition: transform 0.3s, -webkit-transform 0.3s;
transition: transform 0.3s, -webkit-transform 0.3s;
}
&.vue-treeselect--focused .vue-treeselect__control-arrow-container:before {
border-left-color: #c0c4cc;
top: 47%;
}
.vue-treeselect--has-value .vue-treeselect__multi-value {
margin-bottom: 0;
}
}
.gic-select-wrap .el-input__inner {
/*border-width: 1px;*/
}
\ No newline at end of file
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