Commit d744af56 by xinla

--no commit message

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