Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 58bf06e7
authored
Mar 09, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
--no commit message
1 parent
26c42343
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
120 additions
and
125 deletions
linkwe-pc/src/components/AddTag.vue
linkwe-pc/src/views/customerManage/defineCustomerAttr.vue
linkwe-pc/src/views/drainageCode/group/list.vue
linkwe-pc/src/views/drainageCode/group/realCode.vue
linkwe-pc/src/views/drainageCode/store/list.vue
linkwe-pc/src/components/AddTag.vue
View file @
58bf06e
<
script
>
<
script
>
import
*
as
api
from
'@/api/customer/tag'
import
*
as
api
from
'@/api/customer/tag'
export
default
{
export
default
{
name
:
'AddTag'
,
name
:
'AddTag'
,
components
:
{},
components
:
{},
props
:
{
props
:
{
// 添加标签显隐
// 添加标签显隐
visible
:
{
visible
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
,
},
// 表单参数
form
:
{
type
:
Object
,
default
:
()
=>
({
groupName
:
''
,
weTags
:
[]
})
}
},
},
data
()
{
// 表单参数
return
{
form
:
{
// 添加标签输入框
type
:
Object
,
newInput
:
''
,
default
:
()
=>
({
// 表单验证规则
groupName
:
''
,
rules
:
Object
.
freeze
({
weTags
:
[],
groupName
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
}),
weTags
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}]
}),
// 添加便签按钮显隐
visibleAdd
:
false
}
},
},
watch
:
{},
},
computed
:
{
data
()
{
Pvisible
:
{
return
{
get
()
{
// 添加标签输入框
if
(
this
.
visible
)
{
newInput
:
''
,
this
.
$nextTick
(()
=>
{
// 表单验证规则
this
.
$refs
[
'form'
].
clearValidate
()
rules
:
Object
.
freeze
({
})
groupName
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
}
weTags
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
return
this
.
visible
}),
},
// 添加便签按钮显隐
set
(
val
)
{
visibleAdd
:
false
,
this
.
$emit
(
'update:visible'
,
val
)
}
},
watch
:
{},
computed
:
{
Pvisible
:
{
get
()
{
if
(
this
.
visible
)
{
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'form'
].
clearValidate
()
})
}
}
}
return
this
.
visible
},
},
created
()
{},
set
(
val
)
{
mounted
()
{},
this
.
$emit
(
'update:visible'
,
val
)
methods
:
{
closeTag
(
tag
,
index
)
{
// if (tag.id) {
// tag.status = 1
// this.$forceUpdate()
// } else {
this
.
form
.
weTags
.
splice
(
index
,
1
)
// }
},
},
},
},
created
()
{},
mounted
()
{},
methods
:
{
closeTag
(
tag
,
index
)
{
// if (tag.id) {
// tag.status = 1
// this.$forceUpdate()
// } else {
this
.
form
.
weTags
.
splice
(
index
,
1
)
// }
},
showInput
()
{
showInput
()
{
this
.
visibleAdd
=
true
this
.
visibleAdd
=
true
this
.
$nextTick
((
_
)
=>
{
this
.
$nextTick
((
_
)
=>
{
this
.
$refs
.
saveTagInput
.
$refs
.
input
.
focus
()
this
.
$refs
.
saveTagInput
.
$refs
.
input
.
focus
()
})
},
newInputConfirm
()
{
let
name
=
this
.
newInput
if
(
name
)
{
Array
.
isArray
(
this
.
form
.
weTags
)
||
(
this
.
form
.
weTags
=
[])
let
isExist
=
this
.
form
.
weTags
.
some
((
e
)
=>
{
return
e
.
name
===
name
})
})
},
if
(
isExist
)
{
newInputConfirm
()
{
this
.
msgError
(
'标签名已存在,不可重复添加'
)
let
name
=
this
.
newInput
return
if
(
name
)
{
}
Array
.
isArray
(
this
.
form
.
weTags
)
||
(
this
.
form
.
weTags
=
[])
this
.
form
.
weTags
.
push
({
name
})
let
isExist
=
this
.
form
.
weTags
.
some
((
e
)
=>
{
}
return
e
.
name
===
name
this
.
visibleAdd
=
false
})
this
.
newInput
=
''
if
(
isExist
)
{
},
this
.
msgError
(
'标签名已存在,不可重复添加'
)
submit
()
{
if
(
!
this
.
visibleAdd
)
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
this
.
newInput
=
''
let
form
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
))
if
(
!
form
.
weTags
.
length
)
{
return
return
}
}
this
.
form
.
weTags
.
push
({
name
})
api
[
form
.
groupId
?
'update'
:
'add'
](
form
).
then
(()
=>
{
}
this
.
msgSuccess
(
'操作成功'
)
this
.
visibleAdd
=
false
this
.
Pvisible
=
false
this
.
newInput
=
''
this
.
$emit
(
'success'
)
},
submit
()
{
if
(
!
this
.
visibleAdd
)
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
this
.
newInput
=
''
let
form
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
))
if
(
!
form
.
weTags
.
length
)
{
return
}
api
[
form
.
groupId
?
'update'
:
'add'
](
form
).
then
(()
=>
{
this
.
msgSuccess
(
'操作成功'
)
this
.
Pvisible
=
false
this
.
$emit
(
'success'
)
})
})
})
}
}
)
}
}
}
},
}
},
}
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -108,16 +108,14 @@
...
@@ -108,16 +108,14 @@
:visible
.
sync=
"Pvisible"
:visible
.
sync=
"Pvisible"
width=
"500px"
width=
"500px"
append-to-body
append-to-body
:close-on-click-modal=
"false"
:close-on-click-modal=
"false"
>
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-form-item
label=
"标签组名称"
prop=
"groupName"
>
<el-form-item
label=
"标签组名称"
prop=
"groupName"
>
<el-input
<el-input
v-model
.
trim=
"form.groupName"
v-model
.
trim=
"form.groupName"
maxlength=
"15"
maxlength=
"15"
show-word-limit
show-word-limit
placeholder=
"请输入标签组名称,该名称不支持再次修改"
placeholder=
"请输入标签组名称,该名称不支持再次修改"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"标签"
prop=
"weTags"
>
<el-form-item
label=
"标签"
prop=
"weTags"
>
<template
v-for=
"(item, index) in form.weTags"
>
<template
v-for=
"(item, index) in form.weTags"
>
...
@@ -127,25 +125,25 @@
...
@@ -127,25 +125,25 @@
closable
closable
size=
"medium"
size=
"medium"
:key=
"index"
:key=
"index"
@
close=
"closeTag(item, index)"
@
close=
"closeTag(item, index)"
>
>
{{
item
.
name
}}
{{
item
.
name
}}
</el-tag>
</el-tag>
</
template
>
</
template
>
<el-input
<div>
class=
"input-new-tag"
<el-input
v-if=
"visibleAdd"
class=
"input-new-tag"
v-model
.
trim=
"newInput"
v-if=
"visibleAdd"
ref=
"saveTagInput"
v-model
.
trim=
"newInput"
size=
"mini"
ref=
"saveTagInput"
maxlength=
"10"
size=
"mini"
show-word-limit
maxlength=
"10"
@
keyup
.
enter
.
native=
"newInputConfirm"
show-word-limit
@
blur=
"newInputConfirm"
@
keyup
.
enter
.
native=
"newInputConfirm"
></el-input>
@
blur=
"newInputConfirm"
></el-input>
<el-button
v-else
type=
"primary"
plain
class=
"button-new-tag"
size=
"mini"
@
click=
"showInput"
<el-button
v-else
type=
"primary"
plain
class=
"button-new-tag"
size=
"mini"
@
click=
"showInput"
>
>
+ 添加标签
</el-button
添加标签
>
</el-button>
</div>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -156,12 +154,9 @@
...
@@ -156,12 +154,9 @@
</template>
</template>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.input-new-tag
{
.input-new-tag
{
width
:
auto
;
width
:
auto
;
margin-left
:
10px
;
margin-right
:
10px
;
vertical-align
:
bottom
;
vertical-align
:
bottom
;
}
}
.button-new-tag
{
margin-left
:
10px
;
}
</
style
>
</
style
>
linkwe-pc/src/views/customerManage/defineCustomerAttr.vue
View file @
58bf06e
...
@@ -55,8 +55,8 @@
...
@@ -55,8 +55,8 @@
</el-popover>
</el-popover>
</div>
</div>
<
template
#
default=
"{ row }"
>
<
template
#
default=
"{ row }"
>
<el-button
type=
"text"
size=
"mini"
:disabled=
"row.isDefault == 1"
@
click=
"editFn(row)"
>
编辑
</el-button>
<el-button
type=
"text"
:disabled=
"row.isDefault == 1"
@
click=
"editFn(row)"
>
编辑
</el-button>
<el-button
type=
"text"
size=
"mini"
:disabled=
"row.isDefault == 1"
@
click=
"deleteFn(row)"
>
删除
</el-button>
<el-button
type=
"text"
:disabled=
"row.isDefault == 1"
@
click=
"deleteFn(row)"
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
...
linkwe-pc/src/views/drainageCode/group/list.vue
View file @
58bf06e
...
@@ -112,8 +112,8 @@
...
@@ -112,8 +112,8 @@
">
">
统计
统计
</el-button>
</el-button>
<el-button
type=
"text"
size=
"mini"
@
click=
"handleDownload(row.id, row.activityName)"
>
下载
</el-button>
<el-button
type=
"text"
@
click=
"handleDownload(row.id, row.activityName)"
>
下载
</el-button>
<el-button
type=
"text"
size=
"mini"
class=
"copy-btn"
:data-clipboard-text=
"row.codeUrl"
>
复制
</el-button>
<el-button
type=
"text"
class=
"copy-btn"
:data-clipboard-text=
"row.codeUrl"
>
复制
</el-button>
<el-dropdown
style=
"margin-left: 10px"
>
<el-dropdown
style=
"margin-left: 10px"
>
<el-button
type=
"text"
>
<el-button
type=
"text"
>
<i
class=
"el-icon-more"
></i>
<i
class=
"el-icon-more"
></i>
...
@@ -136,7 +136,7 @@
...
@@ -136,7 +136,7 @@
</el-button>
</el-button>
</el-dropdown-item>
</el-dropdown-item>
<el-dropdown-item>
<el-dropdown-item>
<el-button
type=
"text"
size=
"mini"
@
click=
"handleRemove(row.id)"
>
删除
</el-button>
<el-button
type=
"text"
@
click=
"handleRemove(row.id)"
>
删除
</el-button>
</el-dropdown-item>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
...
...
linkwe-pc/src/views/drainageCode/group/realCode.vue
View file @
58bf06e
This diff is collapsed.
Click to expand it.
linkwe-pc/src/views/drainageCode/store/list.vue
View file @
58bf06e
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
复制链接
复制链接
</el-button>
</el-button>
</div>
</div>
<el-button
type=
"text"
size=
"mini"
@
click=
"goRoute('guideDetail')"
>
详情>>
</el-button>
<el-button
type=
"text"
@
click=
"goRoute('guideDetail')"
>
详情>>
</el-button>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
复制链接
复制链接
</el-button>
</el-button>
</div>
</div>
<el-button
type=
"text"
size=
"mini"
@
click=
"goRoute('storeDetail')"
>
详情>>
</el-button>
<el-button
type=
"text"
@
click=
"goRoute('storeDetail')"
>
详情>>
</el-button>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment