Commit e44e30c2 by liuchenxi

update: 标签

parent 6a48920b
......@@ -118,7 +118,7 @@ export default {
right: 29px;
bottom: 370px;
height: 44px;
z-index: 2;
z-index: 10;
display: flex;
flex-wrap: nowrap;
font-size: 14px;
......@@ -131,7 +131,7 @@ export default {
width: 46px;
.trashIcon {
display: block;
font-size: 28px;
font-size: 24px;
margin: 0 8px 0 10px;
}
span {
......
......@@ -219,11 +219,14 @@
:remote-method="remoteMethod"
@focus="remoteMethodFocus($event, parent, pindex)"
@change="changeRemoteMethod(parent)"
@remove-tag="val => removeRemoteMethod(val, parent)"
class="el-select--small"
>
<el-option class="options" v-for="item in parent.searchOptions" :key="item.key" :label="item.value" :value="item.key">
<p>{{ item.value || '--' }}</p>
<p>{{ item.clerkCode || '--' }}</p>
<div :class="parent.addSelectTags.some(el => el.clerkId == item.key) && 'active'">
<p>{{ item.value || '--' }}</p>
<p>{{ item.clerkCode || '--' }}{{ parent.addSelectTags }}</p>
</div>
</el-option>
</el-select>
</div>
......@@ -1946,6 +1949,7 @@ export default {
});
}
this.templateData[i].searchModel.push(selectVal[inx]);
this.templateData[i].addSelectTags = value.map(el => ({clerkId: el}));
});
}
}
......@@ -2603,11 +2607,17 @@ export default {
}
.el-select-dropdown__list .options.el-select-dropdown__item {
height: 52px !important;
padding: 8px 12px 7px;
.active p{
color: #2f54eb !important;
}
p{
line-height: 24px;
line-height: 20px;
color: #303133;
&:last-of-type {
color: #909399;
font-size: 12px;
line-height: 17px;
}
}
}
......
......@@ -1462,20 +1462,23 @@ export default {
},
/* eslint-disable */
changeRemoteMethod(item) {
let tagsMap = null;
if (!!item.addSelectTags.length) {
tagsMap = item.addSelectTags.map(item => item.value);
}
item.searchOptions.forEach(function(ele, index) {
if (!!tagsMap && tagsMap.indexOf(ele.value) != -1) {
return false;
}
if (item.searchModel.indexOf(ele.key) != -1) {
item.addSelectTags.push(ele);
}
});
// let tagsMap = null;
item.addSelectTags = item.searchOptions.filter(el => item.searchModel.includes(el.clerkId));
// if (!!item.addSelectTags.length) {
// tagsMap = item.addSelectTags.map(item => item.value);
// }
// item.searchOptions.forEach(function(ele, index) {
// if (!!tagsMap && tagsMap.indexOf(ele.value) != -1) {
// return false;
// }
// if (item.searchModel.indexOf(ele.key) != -1) {
// item.addSelectTags.push(ele);
// }
// });
},
removeRemoteMethod(val, item) {
item.addSelectTags = item.addSelectTags.filter(el => el.clerkId != val);
},
/**
* 获取 导购 --- api
*/
......
<template>
<div>
<!-- 添加标签、编辑标签 -->
<el-dialog :title="title" :visible.sync="showEditTagPop" top="10vh" width="900px" :before-close="handleClose" custom-class="edit-tag" :close-on-click-modal="false" append-to-body>
<el-dialog :title="title" :visible.sync="showEditTagPop" top="10vh" width="600px" :before-close="handleClose" custom-class="edit-tag" :close-on-click-modal="false" append-to-body>
<div class="dialog-box">
<div class="tag-info">
<p class="tag-name">
......@@ -107,7 +107,8 @@ export default {
display: flex;
align-items: center;
margin-bottom: 8px;
font-weight: 600;
font-weight: 500;
font-size: 16px;
color: #303133;
.tag-flag {
margin-left: 6px;
......
......@@ -921,7 +921,7 @@ export default {
overflow: hidden;
.tag-list {
overflow-y: auto;
flex: 0 0 370px;
flex: 0 0 360px;
height: 100%;
border-right: 1px solid #ebeef5;
.user-info {
......
......@@ -318,7 +318,6 @@ export default {
line-height: 26px;
min-height: 26px;
padding-left: 24px;
padding-top: 4px;
overflow: hidden;
.name {
position: relative;
......@@ -343,6 +342,7 @@ export default {
}
.third-list {
margin-left: 90px;
font-size: 0;
.tag-item {
display: inline-block;
line-height: 22px;
......@@ -355,11 +355,11 @@ export default {
border-radius: 2px;
color: #303133;
&:hover {
background: #EBEFFE;
color: #2f54eb;
}
}
.light-active {
background: #EBEFFE;
color: #2f54eb;
}
.icon-next- {
......
......@@ -2,7 +2,7 @@
<!-- 具体标签 -->
<div class="tag-some-list">
<el-table :data="tableData" style="width: 100%">
<el-table-column label="标签名称" prop="tagName" min-width="100">
<el-table-column label="标签名称" prop="tagName" min-width="130">
<template slot-scope="scope">
<span class="tag-name">{{ scope.row.tagName }}</span>
<el-tooltip class="item" effect="dark" content="添加标签" placement="top">
......@@ -10,7 +10,7 @@
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="是否实时" prop="isActive" min-width="80">
<el-table-column label="是否实时" prop="isActive" min-width="60">
<template slot-scope="scope">
<span :class="['base', scope.row.isActive == 1 ? 'keep-active' : 'no-active']"> {{ scope.row.isActive == 1 ? '实时' : '非实时' }} </span>
</template>
......
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