Commit d744af56 by xinla

--no commit message

1 parent 6795963c
......@@ -28,7 +28,7 @@
</div>
<el-table ref="table" row-key="id" :data="list" v-loading="loading">
<el-table-column label="" width="50" align="left">
<svg-icon icon="dragIcon" style="cursor: move;" />
<svg-icon icon="dragIcon" style="cursor: move" />
</el-table-column>
<el-table-column label="信息项名称" align="center" prop="labelName"></el-table-column>
<el-table-column label="信息项类型" align="center">
......@@ -71,15 +71,14 @@
<el-form ref="form" :rules="rules" :model="form" label-position="left" label-width="120px">
<el-form-item label="信息项名称" prop="labelName">
<el-input
style="width: 250px;"
style="width: 250px"
v-model="form.labelName"
placeholder="请输入信息项名称"
maxlength="10"
show-word-limit
></el-input>
show-word-limit></el-input>
</el-form-item>
<el-form-item label="选择标签">
<div class="sub-des">引导新客户扫码时添加以下任意成员为好友</div>
<div class="sub-des">选择后则打上此标签的客户会增加此信息项供成员填写,如为空则全部客户都增加此信息项</div>
<template v-for="(item, index) in tagList" :key="index">
<el-tag v-if="item.name">{{ item.name }}</el-tag>
</template>
......@@ -109,7 +108,7 @@
</el-tag>
</template>
<el-input
style="margin-left: 10px; width: 200px;"
style="margin-left: 10px; width: 200px"
class="input-new-tag"
v-if="visibleAdd"
v-model.trim="newInput"
......@@ -117,9 +116,8 @@
maxlength="10"
show-word-limit
@keyup.enter="newInputConfirm"
@blur="newInputConfirm"
></el-input>
<el-button v-else style="margin-left: 10px;" type="primary" plain class="button-new-tag" @click="showInput">
@blur="newInputConfirm"></el-input>
<el-button v-else style="margin-left: 10px" type="primary" plain class="button-new-tag" @click="showInput">
+ 添加内容项
</el-button>
</el-form-item>
......@@ -139,18 +137,17 @@
title="选择标签"
:defaultValues="tagList"
@success="submitSelectTag"
:isSingle="true"
></SelectTag>
:isSingle="true"></SelectTag>
</div>
</template>
<script>
import Sortable from 'sortablejs'
import SelectTag from '@/components/SelectTag'
import { getList, addField, updateField, deleteField, multiField } from '@/api/customer/defineAttr.js'
export default {
import Sortable from 'sortablejs'
import SelectTag from '@/components/SelectTag'
import { getList, addField, updateField, deleteField, multiField } from '@/api/customer/defineAttr.js'
export default {
name: 'define-customer-attr',
components: {
SelectTag
SelectTag,
},
data() {
return {
......@@ -160,18 +157,18 @@
infoType: [
{ name: '文本', key: 1 },
{ name: '时间', key: 2 },
{ name: '勾选项', key: 3 }
{ name: '勾选项', key: 3 },
],
query: {
labelName: '',
type: null,
visualTagIds: ''
visualTagIds: '',
},
list: [],
dialog: {
title: '新建信息项',
state: 'add',
show: false
show: false,
},
tagList: [],
showSelectTag: false,
......@@ -181,7 +178,7 @@
visualTagIds: '',
type: 1,
// typeSub: 1,
otherContent: []
otherContent: [],
},
visibleAdd: false,
newInput: '',
......@@ -190,31 +187,31 @@
{
required: true,
message: '信息项名称不能为空',
trigger: 'blur'
}
trigger: 'blur',
},
],
type: [
{
required: true,
message: '信息项属性不能为空',
trigger: 'blur'
}
trigger: 'blur',
},
],
typeSub: [
{
required: true,
message: '勾选项性质不能为空',
trigger: 'blur'
}
trigger: 'blur',
},
],
otherContent: [
{
required: true,
message: '勾选项内容不能为空',
trigger: 'blur'
}
]
}
trigger: 'blur',
},
],
},
}
},
methods: {
......@@ -240,7 +237,7 @@
this.list.splice(e.newIndex, 0, targetRow)
this.updateSort()
}
}
},
})
},
setValue(data) {
......@@ -256,7 +253,7 @@
this.$confirm('是否确认删除当前画像信息项?该操作不可恢复,请谨慎操作。', '删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
type: 'warning',
})
.then(() => {
deleteField(data.id).then((res) => {
......@@ -271,8 +268,8 @@
this.tagList = [
{
tagId: this.form.visualTagIds,
name: this.form.visualTagName
}
name: this.form.visualTagName,
},
]
}
this.dialog.show = true
......@@ -305,7 +302,7 @@
businessType: 1,
visualTagIds: '',
type: 1,
otherContent: []
otherContent: [],
}
this.tagList = []
this.dialog.show = true
......@@ -367,7 +364,7 @@
this.updateSort()
}
})
}
},
},
mounted() {
this.getList('init')
......@@ -376,16 +373,16 @@
this.$store.setBusininessDesc(
`
<div>可自定义修改企业客户的画像信息项供企业个性化使用</div>
`
`,
)
}
}
},
}
</script>
<style lang="scss" scoped>
.sub-des {
.sub-des {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: var(--font-black-6);
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!