Commit 576ba03d by xiaohai

解决标签部分的bug

parent e7c8ce24
......@@ -131,7 +131,21 @@
<el-table-column label="操作">
<template slot-scope="scope" >
<el-button v-if="!scope.row.editAble" type="text" size="small" :disabled="!scope.row.enterpriseId? true: false" class="" @click="toEditCate(scope.$index,scope.row)">编辑</el-button>
<el-button v-if="!scope.row.editAble" type="text" size="small" :disabled="!scope.row.enterpriseId? true: false" class="" @click="toDelCate(scope.$index,scope.row)">删除</el-button>
<el-popover
v-if="!scope.row.editAble"
placement="top"
width="160"
v-model="scope.row.popVisible">
<p style="line-height: 1.5; padding: 10px 10px 20px;">确认删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="cancelDelTag(scope.$index,scope.row)">取消</el-button>
<el-button type="primary" size="mini" @click="toDelCate(scope.$index,scope.row)">确定</el-button>
</div>
<!-- <el-button slot="reference" class="p-l-20" type="text">
删除
</el-button> -->
<el-button slot="reference" type="text" size="small" :disabled="!scope.row.enterpriseId? true: false" class="">删除</el-button>
</el-popover>
<el-button v-if="scope.row.editAble" type="text" @click.stop="confirmEdit(scope.$index,scope.row)">确认</el-button>
<el-button v-if="scope.row.editAble" type="text" @click.stop="cancleEdit(scope.$index,scope.row)">取消</el-button>
......@@ -405,6 +419,7 @@
* 删除当前标签 -- 取消
*/
toDelTag(index,row) {
console.log(row);
const that = this
that.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
confirmButtonText: '确定',
......@@ -435,6 +450,12 @@
that.tagTableData.splice(index,1)
showMsg.showmsg('删除成功','success');
return;
} else if (resData.errorCode == 100005) {
that.$message.error({
duration: 1000,
message: '该标签正在被会员分组使用,无法删除!'
});
return;
}
errMsg.errorMsg(resData)
......@@ -597,6 +618,12 @@
that.$refs.tagCategoryCom.refreshData();
showMsg.showmsg('删除成功','success')
return;
} else if (resData.errorCode == 200001) {
that.$message.error({
duration: 1000,
message: '该标签被会员分组使用,无法删除!'
});
return;
}
errMsg.errorMsg(resData)
......
......@@ -35,7 +35,7 @@
value-format="yyyy-MM-dd HH:mm:ss"
default-time="23:59:59"
:picker-options="pickerOptions">
</el-date-picker><label class="p-l-8">*人群有效期需早于所用标签的最早有效期,且最长不超过365天</label>
</el-date-picker><label class="p-l-8">*分组有效期需早于所用标签的最早有效期,且最长不超过365天</label>
</el-form-item>
<el-form-item label="" prop="describle" class="w-548">
<div class="memberGroupEdit-wrap__item__title">分组描述</div>
......@@ -694,6 +694,13 @@
if (!!that.$route.query.memberTagGroupId) {
that.ruleForm.memberTagGroupId = that.$route.query.memberTagGroupId;
that.getGroupData();
} else {
let date = new Date(new Date().getTime() + 365 * 24 * 3600 * 1000);
let Y = date.getFullYear() + '-';
let M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
let D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' ';
that.ruleForm.effectiveDateTmp = that.effectiveDateTmp = Y + M + D + '23:59:59';
console.log(that.effectiveDateTmp);
}
},
components: {
......
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