Commit 10b7ade9 by xiaohai

issue fix 17:42

parent 43123253
......@@ -5,25 +5,24 @@
<div class="right-box">
<div class="manualTagEdit-wrap__form">
<div class="manualTagEdit-wrap__title">标签基本信息
<el-button
type="primary"
icon="el-icon-edit"
<i
class="el-icon-edit"
circle
class="fr"
@click.stop="changeEditFlag"
v-if="!tagEditFlag">
</el-button>
</i>
</div>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="110px" class="demo-ruleForm">
<el-form-item label="标签名称" prop="tagName" class="w-329">
<el-input class="w-220" v-model="ruleForm.tagName" @focus="focus('tagName',10)" @keyup.native="(value) => toInput(value)">
<el-input class="w-220" v-model="ruleForm.tagName" @focus="focus('tagName',10)" @keyup.native="(value) => toInput(value)" :disabled="!tagEditFlag">
</el-input>
<label class="input-label">{{inputNumObj.tagName}}/10</label>
</el-form-item>
<el-form-item label="所属分类" prop="tagLevelGroupId">
<el-select
:disabled="!tagEditFlag"
v-model="ruleForm.tagTwoLevelGroupId"
placeholder="请选择"
class="w-220"
......@@ -35,6 +34,7 @@
:value="item.tagLevelGroupId">
</el-option>
</el-select><el-select
:disabled="!tagEditFlag"
v-model="ruleForm.tagLevelGroupId"
placeholder="请选择" class="w-220 m-l-8">
<el-option
......@@ -46,15 +46,16 @@
</el-select>
</el-form-item>
<el-form-item label="标签描述" prop="tagDescribe" class="w-560">
<el-input class="w-447" type="textarea" v-model="ruleForm.tagDescribe" style="height: 96px;" @focus="focus('tagDescribe',200)" @keyup.native="(value) => toInput(value)">
<el-input
:disabled="!tagEditFlag" class="w-447" type="textarea" v-model="ruleForm.tagDescribe" style="height: 96px;" @focus="focus('tagDescribe',200)" @keyup.native="(value) => toInput(value)">
</el-input>
<template><label class="input-label textarea-label">{{inputNumObj.tagDescribe}}/200</label></template>
</el-form-item>
<el-form-item label="" class="">
<el-button type="primary" @click.stop="confirmSave('ruleForm')" v-if="tagEditFlag">保存</el-button>
<!-- <el-button @click.stop="cancelSave">取消</el-button> -->
<el-button @click.stop="cancelSave" v-if="tagEditFlag">取消</el-button>
</el-form-item>
<div class="full-div" v-if="!tagEditFlag"></div>
<!-- <div class="full-div" v-if="!tagEditFlag"></div> -->
</el-form>
</div>
<!-- 如果新增时候,设置标签值不显示 !!currentTagId-->
......@@ -83,18 +84,19 @@
</div>
<div class="manualTagEdit-wrap__table m-t-20">
<el-table :data="tagValTableData" height="275">
<el-table-column label="标签值" width="220px">
<el-table :data="tagValTableData"
border>
<el-table-column label="标签值" class-name="no-right-border">
<template slot-scope="scope">
{{ !scope.row.editAble? scope.row.tagItemName: ''}}
<el-input v-if="scope.row.editAble" size="small" class="h5-el-input w-200" v-model="scope.row.inputValue" type="text" placeholder="请输入标签值" @keyup.native="(value) => toEditInput(value,scope.$index,scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column label="操作" width="150px">
<el-table-column label="操作" width="200px">
<template slot-scope="scope" >
<el-button v-if="!scope.row.editAble && scope.row.status != 4" type="text" size="small" class="" @click="toEditTag(scope.$index,scope.row)">编辑</el-button>
<!-- <el-button v-if="!scope.row.editAble && scope.row.status != 4" type="text" size="small" class="" @click="toDelTag(scope.$index,scope.row)">删除</el-button> -->
<el-popover
<!-- <el-popover
v-if="!scope.row.editAble && scope.row.status != 4"
placement="top"
width="160"
......@@ -103,12 +105,12 @@
<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="toDelTag(scope.$index,scope.row)">确定</el-button>
</div>
</div> -->
<!-- <el-button slot="reference" class="p-l-20" type="text">
删除
</el-button> -->
<el-button slot="reference" type="text" size="small" class="">删除</el-button>
</el-popover>
<el-button type="text" size="small" class="" @click="confirmDel(scope.$index,scope.row)">删除</el-button>
<!-- </el-popover> -->
<el-button v-if="scope.row.status == 4" type="text" size="small" class="" >删除中</el-button>
<el-button v-if="scope.row.editAble" type="text" @click.stop="confirmEdit(scope.$index,scope.row)">确认</el-button>
......@@ -117,7 +119,7 @@
</el-table-column>
<el-table-column label=" ">
<el-table-column label=" " width="420px" class-name="no-right-border cell-border">
<template slot-scope="scope" >
<template >
<upload-excel-component
......@@ -164,7 +166,7 @@
</template>
</template>
</el-table-column>
<el-table-column label=" ">
<el-table-column label=" " width="220px" class-name="no-right-border">
<template slot-scope="scope" >
<el-checkbox v-model="scope.row.optType">清空已有标签会员</el-checkbox>
<el-tooltip class="item" effect="light" content="" placement="top">
......@@ -174,7 +176,7 @@
</el-tooltip>
</template>
</el-table-column>
<el-table-column label=" " width="150px">
<el-table-column label=" " width="100px">
<template slot-scope="scope" >
<el-button
type="primary"
......@@ -312,11 +314,29 @@
},
methods: {
/**
* 清空已有标签危险提示
*/
checkTip(obj) {
let that = this;
console.log(obj.optType);
if (obj.optType) {
that.$confirm('勾选此选项则清空之前有此标签会员身上的标签,以本次导入会员为准;否则本次导入和之前已有数据去重添加。请慎重选择!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
}).catch(() => {
obj.optType = false;
});
}
},
/**
* 点击取消
*/
cancelSave() {
const that = this;
that.tagEditFlag = false;
},
/**
......@@ -445,7 +465,6 @@
duration: 1000,
message: "标签值已存在"
})
return false;
}
......@@ -457,7 +476,8 @@
// upStatus: 0,
// })
that.addTagItem('',that.addInputValue)
that.addTagItem('',that.addInputValue);
that.addInputValue = "";
},
/**
......@@ -534,6 +554,20 @@
},
/**
* 确认删除标签弹窗
*/
confirmDel(index, item) {
console.log(index, item);
let that = this;
that.$confirm('删除标签后,符合该标签值的会员对应标签值将同步删除。一旦删除将无法恢复,确认要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.toDelTag(index,item);
});
},
/**
* 删除值
*/
toDelTag(index,item) {
......@@ -972,14 +1006,18 @@
}
}
</script>
<style lang="scss" scoped>
<style lang="scss">
.manualTagEdit-wrap__title {
width: 100%;
height: 68px;
line-height: 68px;
font-size: 18px;
color: #303133;
font-weight: bold;
margin-bottom: 24px;
.el-icon-edit {
cursor: pointer;
color: #1890ff;
margin-left: 8px;
}
}
.manualTagEdit-wrap__add {
......@@ -1023,6 +1061,15 @@
.el-table::before {
height: 0;
}
.no-right-border {
border-right: none;
}
.cell-border {
padding-right: 20px;
.cell {
border-right: 1px solid #EBEEF5;
}
}
}
.manualTagEdit-wrap__set {
......
......@@ -56,7 +56,7 @@
<template slot-scope="scope">
<router-link :to="{path:'/myTagDetail',query:{tagId:scope.row.tagId,addFlag:scope.row.isAdd,form:'notMyTag',navSign: 'manualTag'}}" class="edit-btn el-button--text">详情</router-link>
<router-link :to="{path:'/manualTagEdit',query:{tagId:scope.row.tagId}}" class="edit-btn el-button--text p-l-20">编辑</router-link>
<el-popover
<!-- <el-popover
placement="top"
width="160"
v-model="scope.row.popVisible">
......@@ -64,11 +64,11 @@
<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="toDelTag(scope.$index,scope.row)">确定</el-button>
</div>
<el-button slot="reference" class="p-l-20" type="text">
</div> -->
<el-button slot="reference" class="p-l-20" type="text" @click="toDelTag(scope.$index,scope.row)">
删除
</el-button>
</el-popover>
<!-- </el-popover> -->
<el-button
type="text"
size="small"
......@@ -133,7 +133,7 @@
<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-popover
<!-- <el-popover
v-if="!scope.row.editAble"
placement="top"
width="160"
......@@ -142,12 +142,12 @@
<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>
</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 slot="reference" type="text" size="small" :disabled="!scope.row.enterpriseId? true: false" class="" @click="toDelCate(scope.$index,scope.row)">删除</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>
......@@ -427,7 +427,7 @@
toDelTag(index,row) {
console.log(row);
const that = this
that.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
that.$confirm('删除标签后,符合该标签值的会员对应标签值将同步删除。一旦删除将无法恢复,确认要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
......@@ -601,7 +601,16 @@
toDelCate(index,item) {
const that = this;
console.log(index,item)
that.postDel(index,item)
that.$confirm('删除分类后,该分类下所有标签进入未分类,确认要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.postDel(index,item);
}).catch(() => {
});
},
......
......@@ -57,7 +57,7 @@
<el-button type="text" size="small" class="p-l-32" @click="addTemporary(scope.row.tagId)">添加至暂存架</el-button>
<!-- <el-button type="text" size="small" class="p-l-32" @click="toDelTag(scope.row.id)">删除</el-button> -->
<!-- 本期不做 -->
<el-popover
<!-- <el-popover
placement="top"
width="160"
v-model="scope.row.popVisible">
......@@ -65,11 +65,11 @@
<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="toDelTag(scope.$index,scope.row)">确定</el-button>
</div>
<el-button slot="reference" class="m-l-10" type="text">
</div> -->
<el-button slot="reference" class="m-l-10" type="text" @click="toDelTag(scope.$index,scope.row)">
删除
</el-button>
</el-popover>
<!-- </el-popover> -->
</template>
</el-table-column>
</el-table>
......@@ -308,7 +308,7 @@
*/
toDelTag(index,row) {
const that = this
that.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
that.$confirm('删除标签后,符合该标签值的会员对应标签值将同步删除。一旦删除将无法恢复,确认要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
......
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