Commit f6d36a1f by member

合并master

parents 893b9972 6fdddcce
<template>
<el-dialog title="批量操作分组数据" width="340px" top="30vh" :visible.sync="batchDialog" center :modal-append-to-body="false" :before-close="closeBatch">
<el-dialog title="" width="400px" top="30vh" custom-class="cre-dialog" :visible.sync="batchDialog" center :modal-append-to-body="false" :before-close="closeBatch">
<p class="tips" slot="title">提示</p>
<div class="batch-content">
<div v-if="operNum == 0">
<div class="el-message-box__status el-icon-warning"></div>
......@@ -10,7 +12,10 @@
<p class="batch-txt">是否确定批量删除分组!</p>
</div>
<div v-if="operNum == 2">
我的会员分组
<p class="title">
我的会员分组
</p>
<ul class="batch-ul">
<li v-for="item in groupList" :key="item.memberTagGroupClassifyId" class="batch-li" @click="chooseGroup(item)">
{{ item.classifyName }}
......@@ -20,10 +25,14 @@
</div>
</div>
<span slot="footer" class="dialog-footer">
<div class="cre-btn">
<el-button @click="closeBatch">取 消</el-button>
<el-button type="primary" @click="confirmBatch">确 定</el-button>
</div>
<!-- <span slot="footer" class="dialog-footer">
<el-button @click="closeBatch">取 消</el-button>
<el-button type="primary" @click="confirmBatch">确 定</el-button>
</span>
</span> -->
</el-dialog>
</template>
......@@ -120,8 +129,8 @@ export default {
})
.then(res => {
if (res.errorCode === 1) {
this.groupList = res.result.map(el => ({
...el,
this.groupList = res.result.filter(el => el.classifyName != '未分类').map(item => ({
...item,
edit: false
}));
}
......@@ -159,6 +168,10 @@ export default {
padding-left: 35px;
padding-top: 7px;
}
.batch-title {
color: #333;
font-size: 18px;
}
.batch-ul {
margin-top: 10px;
.batch-li {
......
......@@ -82,11 +82,15 @@ export default {
handleSave() {
const ret = this.$refs.tagConfig.getTemplateData();
this.templateData = JSON.parse(JSON.stringify(ret));
this.tagId = this.tagDataAssgin.tagId;
this.$refs.tagConfig.saveConfirm().then(_ => {
this.$emit('update:showEditTagPop', false);
this.$emit('refersh', this.tagDataAssgin);
this.$refs.tagConfig.saveConfirm().then(res => {
if (res) {
this.$emit('update:showEditTagPop', false);
this.$emit('refersh', this.tagDataAssgin);
}
});
},
returnTagData(list) {
......
......@@ -317,6 +317,7 @@ export default {
this.showEditTagPop = true;
this.$nextTick(() => {
this.tagData = Object.assign({}, this.tagData, this.ruleForm.selectedTags[this.activeTagsGroupIndex][this.activeTagIndex]);
this.tagData.editCondition = true;
});
},
......@@ -324,6 +325,7 @@ export default {
selectedTag(tagData) {
this.showEditTagPop = true;
this.tagData = Object.assign({}, this.tagData, tagData);
this.tagData.editCondition = false;
},
// 保存选择的标签数据
returnTagData(data) {
......
......@@ -16,7 +16,7 @@
<el-option key="" label="全部" value=""> </el-option>
</el-select>
<div class="batch-option">
<el-select v-model="batchSelect" @change="batchHandleSelect" style="width: 150px;" placeholder="批量操作" class="w-220 m-l-0">
<el-select v-model="batchSelect" @change="batchHandleSelect" @focus="handleFocus" style="width: 150px;" placeholder="批量操作" class="w-220 m-l-0">
<el-option :key="0" label="失效" :value="0"> </el-option>
<el-option :key="1" label="删除" :value="1"> </el-option>
<el-option :key="2" label="修改所属分类" :value="2"> </el-option>
......@@ -375,16 +375,28 @@ export default {
/**
* 批量操作
*/
handleFocus() {
if (!this.multipleSelection.length) {
this.batchSelect = '';
this.$message.warning({
message: '请先勾选分组',
duration: 2000
});
return false;
}
},
batchHandleSelect(val) {
this.operateNumber = val;
if (!this.multipleSelection.length) {
this.batchSelect = '';
this.$message.warning({
message: '请先勾选分组',
duration: 2000
});
return;
return false;
} else {
this.operateNumber = val;
this.batchVisiable = true;
}
this.batchVisiable = true;
},
setRowClassName({ row, rowIndex }) {
......
......@@ -18,7 +18,12 @@
<div class="tag-all">
<p class="tag-name">
{{ tagName }}
<span v-if="tagName == '全部标签'">
{{ tagName }}
</span>
<span v-else>
{{ tagName }} 】搜索结果
</span>
<el-button type="primary" class="add-newtag" @click="addNewTag" v-show="handTag == 1">新增标签</el-button>
</p>
......
......@@ -71,4 +71,19 @@
li {
background-color: #f7faff;
}
}
.cre-dialog {
.el-dialog__body {
padding: 10px 20px;
}
.cre-btn {
padding-top: 20px;
text-align: right;
}
.tips {
text-align: left;
font-size: 18px;
color: #303133;
}
}
\ 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