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 160fca2f
authored
Jan 18, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加共用表单禁用详情数据展示样式,短链部分修改
1 parent
87576c4f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
148 additions
and
100 deletions
linkwe-pc/src/styles/element-ui.scss
linkwe-pc/src/views/intelligentShortLink/addEdit.vue
linkwe-pc/src/views/intelligentShortLink/components/Add.vue
linkwe-pc/src/views/intelligentShortLink/components/PhonePreview.vue
linkwe-pc/src/views/intelligentShortLink/detail.vue
linkwe-pc/src/views/intelligentShortLink/index.vue
linkwe-pc/src/styles/element-ui.scss
View file @
160fca2
...
@@ -221,3 +221,42 @@
...
@@ -221,3 +221,42 @@
border-radius
:
0
;
border-radius
:
0
;
}
}
}
}
// 表单禁用详情数据展示
.form-detail
{
.el-input.is-disabled
.el-input__inner
,
.el-textarea.is-disabled
.el-textarea__inner
{
background-color
:
transparent
;
// border-color: transparent;
color
:
inherit
;
cursor
:
default
;
// &:hover {
// border-color: transparent;
// }
}
.el-radio__input.is-disabled
{
.el-radio__inner
{
background-color
:
#fff
;
border-color
:
#dcdfe6
;
cursor
:
default
;
}
+
span
.el-radio__label
{
color
:
inherit
;
cursor
:
default
;
}
&
.is-checked
.el-radio__inner
{
background-color
:
$blue
;
border-color
:
$blue
;
cursor
:
default
;
&
:
:
after
{
background-color
:
#fff
;
}
}
}
// 必填红 * 隐藏
.el-form-item.is-required
:not
(
.is-no-asterisk
)
>
.el-form-item__label
:before
{
display
:
none
;
}
}
linkwe-pc/src/views/intelligentShortLink/addEdit.vue
View file @
160fca2
...
@@ -128,13 +128,11 @@ export default {
...
@@ -128,13 +128,11 @@ export default {
</el-form>
</el-form>
<div
v-show=
"currentActive == 1"
class=
"fxbw ais mt10"
style=
"overflow: auto"
>
<div
v-show=
"currentActive == 1"
class=
"fxbw ais mt10"
style=
"overflow: auto"
>
<div
class=
"g-card g-pad20
"
style=
"width: 58%
"
>
<div
class=
"g-card g-pad20
mr10"
style=
"flex: auto
"
>
<Add
ref=
"add"
:form=
"form"
/>
<Add
ref=
"add"
:form=
"form"
/>
</div>
</div>
<div
style=
"width: 40%"
>
<PhonePreview
:data=
"form"
/>
<PhonePreview
:data=
"form"
/>
</div>
</div>
</div>
<div
v-show=
"currentActive == 2"
class=
"g-card g-pad20 ac"
>
<div
v-show=
"currentActive == 2"
class=
"g-card g-pad20 ac"
>
...
...
linkwe-pc/src/views/intelligentShortLink/components/Add.vue
View file @
160fca2
...
@@ -38,7 +38,11 @@ export default {
...
@@ -38,7 +38,11 @@ export default {
}),
}),
}
}
},
},
computed
:
{},
computed
:
{
isDetail
()
{
return
this
.
$route
.
path
.
endsWith
(
'/detail'
)
},
},
watch
:
{},
watch
:
{},
created
()
{},
created
()
{},
mounted
()
{},
mounted
()
{},
...
@@ -48,7 +52,14 @@ export default {
...
@@ -48,7 +52,14 @@ export default {
<
template
>
<
template
>
<div>
<div>
<el-form
ref=
"form"
:model=
"form"
label-suffix=
":"
label-width=
"140px"
:rules=
"rules"
>
<el-form
:class=
"isDetail && 'form-detail'"
:disabled=
"isDetail"
ref=
"form"
:model=
"form"
label-suffix=
":"
label-width=
"140px"
:rules=
"rules"
>
<el-form-item
label=
"短链类型"
>
<el-form-item
label=
"短链类型"
>
<span>
{{
touchTypeDict
[
form
.
type
].
allName
}}
</span>
<span>
{{
touchTypeDict
[
form
.
type
].
allName
}}
</span>
</el-form-item>
</el-form-item>
...
@@ -57,10 +68,17 @@ export default {
...
@@ -57,10 +68,17 @@ export default {
</el-form-item>
</el-form-item>
<!-- 公众号文章 -->
<!-- 公众号文章 -->
<el-form-item
prop=
"longLink"
label=
"公众号文章链接"
v-if=
"form.type == 0"
>
<template
v-if=
"form.type == 0"
>
<el-input
clearable
v-model=
"form.longLink"
placeholder=
"请输入"
></el-input>
<el-form-item
prop=
"longLink"
label=
"公众号文章链接"
>
<div
class=
"tips"
>
请在公众号后台文章发布列表页中获取并复制文章的永久链接
</div>
<!--
<template
v-if=
"isDetail"
>
</el-form-item>
{{
form
.
longLink
}}
</
template
>
<
template
v-else
>
</
template
>
-->
<el-input
clearable
v-model=
"form.longLink"
placeholder=
"请输入"
></el-input>
<div
v-if=
"!isDetail"
class=
"tips"
>
请在公众号后台文章发布列表页中获取并复制文章的永久链接
</div>
</el-form-item>
</template>
<!-- 公众号二维码,个人二维码,群二维码,小程序二维码 -->
<!-- 公众号二维码,个人二维码,群二维码,小程序二维码 -->
<
template
v-else-if=
"Object.keys(prefixFormLabel).includes(form.type + '')"
>
<
template
v-else-if=
"Object.keys(prefixFormLabel).includes(form.type + '')"
>
...
...
linkwe-pc/src/views/intelligentShortLink/components/PhonePreview.vue
View file @
160fca2
...
@@ -24,9 +24,9 @@ export default {
...
@@ -24,9 +24,9 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<div>
<div
class=
"g-card"
style=
"margin-top: 0"
>
<div
class=
"g-title"
>
预览
</div>
<div
class=
"g-title"
>
预览
</div>
<div
class=
"g-
card g-
pad20"
>
<div
class=
"g-pad20"
>
<PhoneTemplate
v-if=
"touchTypeDict[data.type]"
:title=
"touchTypeDict[data.type].previewMobileTitle"
>
<PhoneTemplate
v-if=
"touchTypeDict[data.type]"
:title=
"touchTypeDict[data.type].previewMobileTitle"
>
<template
v-if=
"data.type == 0"
>
<template
v-if=
"data.type == 0"
>
<div
class=
"mask"
style=
"position: absolute"
>
<div
class=
"mask"
style=
"position: absolute"
>
...
...
linkwe-pc/src/views/intelligentShortLink/detail.vue
View file @
160fca2
...
@@ -13,6 +13,7 @@ export default {
...
@@ -13,6 +13,7 @@ export default {
return
{
return
{
loading
:
false
,
loading
:
false
,
data
:
{},
data
:
{},
cardData
:
[],
xData
:
[],
xData
:
[],
series
:
[],
series
:
[],
}
}
...
@@ -21,7 +22,7 @@ export default {
...
@@ -21,7 +22,7 @@ export default {
watch
:
{},
watch
:
{},
created
()
{
created
()
{
let
id
=
this
.
$route
.
query
.
id
let
id
=
this
.
$route
.
query
.
id
this
.
get
List
(
id
)
this
.
get
Detail
(
id
)
this
.
getAnalysis
(
id
)
this
.
getAnalysis
(
id
)
},
},
mounted
()
{},
mounted
()
{},
...
@@ -30,7 +31,7 @@ export default {
...
@@ -30,7 +31,7 @@ export default {
this
.
loading
=
true
this
.
loading
=
true
getDetail
(
id
)
getDetail
(
id
)
.
then
(({
data
})
=>
{
.
then
(({
data
})
=>
{
this
.
form
=
data
this
.
data
=
data
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{})
.
finally
(()
=>
{
.
finally
(()
=>
{
...
@@ -107,29 +108,28 @@ export default {
...
@@ -107,29 +108,28 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<div>
<div
class=
"fxbw ais"
>
<div
class=
"fxbw"
>
<div
class=
"pr10"
style=
"flex: auto; overflow: hidden"
>
<div
style=
"width: 58%"
>
<div
class=
"g-title fxbw"
>
<div
class=
"g-title"
>
短链内容
</div>
短链内容
<div
class=
"g-card g-pad20"
>
<el-button
type=
"primary"
class=
"fr"
@
click=
"$router.push(
{ path: './addEdit', query: { id: data.id } })">
<Add
:form=
"data"
/>
编辑
</div>
</el-button>
<div
class=
"g-title"
>
数据趋势
</div>
<div
class=
"g-card g-pad20"
>
<CardGroupIndex
:data=
"cardData"
></CardGroupIndex>
<div>
<TimeSearchTitle
@
search=
"getLineAnalysis"
></TimeSearchTitle>
</div>
<ChartLine
:xData=
"xData"
:legend=
"['访问总数(pv)', '访问总人数(uv)', '小程序打开数']"
:series=
"series"
></ChartLine>
</div>
</div>
</div>
<div
style=
"width: 40%"
>
<div
class=
"g-card g-pad20"
>
<PhonePreview
:data=
"data"
/>
<Add
:form=
"data"
/>
</div>
<div
class=
"g-title mt20 mb10"
>
数据趋势
</div>
<CardGroupIndex
:data=
"cardData"
></CardGroupIndex>
<div
class=
"g-card g-pad20"
style=
"margin-top: 0"
>
<TimeSearchTitle
@
search=
"getLineAnalysis"
></TimeSearchTitle>
<ChartLine
:xData=
"xData"
:legend=
"['访问总数(pv)', '访问总人数(uv)', '小程序打开数']"
:series=
"series"
></ChartLine>
</div>
</div>
</div>
</div>
<PhonePreview
:data=
"data"
/>
</div>
</div>
</
template
>
</
template
>
...
...
linkwe-pc/src/views/intelligentShortLink/index.vue
View file @
160fca2
<
script
>
<
script
>
import
{
getList
,
getAnalysis
,
remove
}
from
'@/api/intelligentShortLink'
import
{
getList
,
getAnalysis
,
remove
}
from
'@/api/intelligentShortLink'
import
{
touchTypeDict
}
from
'./components/mixin'
export
default
{
export
default
{
name
:
''
,
name
:
''
,
components
:
{
components
:
{
...
@@ -14,19 +15,7 @@ export default {
...
@@ -14,19 +15,7 @@ export default {
pageSize
:
10
,
pageSize
:
10
,
pageNum
:
1
,
pageNum
:
1
,
},
},
dictTouchType
:
Object
.
freeze
({
touchTypeDict
,
0
:
'跳入微信-公众号-文章'
,
1
:
'跳入微信-公众号-二维码'
,
2
:
'跳入微信-个人微信-个人二维码'
,
3
:
'跳入微信-个人微信-群二维码'
,
4
:
'跳入微信-企业微信-员工活码'
,
5
:
'跳入微信-企业微信-客群活码'
,
6
:
'跳入微信-企业微信-门店导购码'
,
8
:
'跳入微信-企业微信-门店群活码'
,
7
:
'跳入微信-小程序-个人小程序'
,
9
:
'跳入微信-小程序-企业小程序'
,
10
:
'跳入微信-小程序-小程序二维码'
,
}),
dictStatus
:
Object
.
freeze
({
dictStatus
:
Object
.
freeze
({
1
:
'启用'
,
1
:
'启用'
,
2
:
'关闭'
,
2
:
'关闭'
,
...
@@ -145,64 +134,68 @@ export default {
...
@@ -145,64 +134,68 @@ export default {
<div>
<div>
<CardGroupIndex
:data=
"cardData"
></CardGroupIndex>
<CardGroupIndex
:data=
"cardData"
></CardGroupIndex>
<div
class=
"table-content"
>
<el-form
ref=
"queryForm"
:inline=
"true"
:model=
"query"
class=
"top-search"
>
<el-form
ref=
"queryForm"
:inline=
"true"
:model=
"query"
class=
"top-search"
>
<el-form-item
label=
""
prop=
"shortLinkName"
>
<el-form-item
label=
""
prop=
"shortLinkName"
>
<el-input
clearable
v-model=
"query.shortLinkName"
placeholder=
"请输入"
></el-input>
<el-input
clearable
v-model=
"query.shortLinkName"
placeholder=
"请输入"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
""
prop=
"type"
>
<el-form-item
label=
""
prop=
"touchType"
>
<el-select
clearable
v-model=
"query.type"
placeholder=
"请选择"
>
<el-select
clearable
v-model=
"query.touchType"
placeholder=
"请选择"
>
<el-option
<el-option
v-for=
"(item, index) in dictTouchType"
:key=
"index"
:label=
"item"
:value=
"index"
></el-option>
v-for=
"(item, index) in touchTypeDict"
</el-select>
:key=
"index"
</el-form-item>
:label=
"item.allName"
<el-form-item
label=
""
prop=
"status"
>
:value=
"+index"
></el-option>
<el-select
clearable
v-model=
"query.status"
placeholder=
"请选择"
>
</el-select>
<el-option
v-for=
"(item, index) in dictStatus"
:key=
"index"
:label=
"item"
:value=
"index"
></el-option>
</el-form-item>
</el-select>
<el-form-item
label=
""
prop=
"status"
>
</el-form-item>
<el-select
clearable
v-model=
"query.status"
placeholder=
"请选择"
>
<el-option
v-for=
"(item, index) in dictStatus"
:key=
"index"
:label=
"item"
:value=
"+index"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
" "
>
<el-form-item
label=
""
>
<el-button
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button>
<el-button
type=
"success"
@
click=
"resetForm()"
>
重置
</el-button>
<el-button
type=
"success"
@
click=
"resetForm()"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-form>
<
div
class=
"mid-action
"
>
<
el-form-item
class=
"fr
"
>
<el-button
type=
"primary"
class=
"mr10"
@
click=
"goRoute()"
>
新建短链
</el-button>
<el-button
type=
"primary"
class=
"mr10"
@
click=
"goRoute()"
>
新建短链
</el-button>
<el-button
:disabled=
"!ids.length"
type=
"danger"
@
click=
"remove()"
>
批量删除
</el-button>
<el-button
:disabled=
"!ids.length"
type=
"danger"
@
click=
"remove()"
>
批量删除
</el-button>
</div>
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"(val) => (ids = val.map((e) => e.id))"
>
<el-table-column
label=
"短链名称"
align=
"center"
min-width=
"100"
prop=
"shortLinkName"
show-overflow-tooltip
/>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
></el-table-column>
<el-table-column
label=
"类型"
align=
"center"
prop=
"touchType"
min-width=
"100"
>
<el-table-column
label=
"短链名称"
align=
"center"
prop=
"shortLinkName"
show-overflow-tooltip
/>
<template
slot-scope=
"
{ row }">
{{
dictTouchType
[
row
.
touchType
+
''
]
}}
</
template
>
<el-table-column
label=
"类型"
align=
"center"
prop=
"type"
>
</el-table-column>
<template
slot-scope=
"
{ row }">
{{
touchTypeDict
[
row
.
type
+
''
].
allName
}}
</
template
>
<el-table-column
label=
"短链地址"
align=
"center"
prop=
"consultTotalCnt"
min-width=
"100"
show-overflow-tooltip
>
</el-table-column>
<
template
slot-scope=
"{ row }"
>
<el-table-column
label=
"短链地址"
align=
"center"
prop=
"consultTotalCnt"
show-overflow-tooltip
>
<span>
{{
row
.
shortLink
}}
</span>
<
template
slot-scope=
"{ row }"
>
<i
class=
"el-icon-copy-document copy-btn ml20 cp"
:data-clipboard-text=
"row.shortLink"
></i>
<span>
{{
row
.
shortLink
}}
</span>
</
template
>
<i
class=
"el-icon-copy-document copy-btn ml20 cp"
title=
"复制"
:data-clipboard-text=
"row.shortLink"
></i>
</el-table-column>
</
template
>
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
min-width=
"100"
>
</el-table-column>
<
template
slot-scope=
"{ row }"
>
{{
dictStatus
[
row
.
status
+
''
]
}}
</
template
>
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
>
</el-table-column>
<
template
slot-scope=
"{ row }"
>
{{
dictStatus
[
row
.
status
+
''
]
}}
</
template
>
<el-table-column
</el-table-column>
label=
"最后更新时间"
<el-table-column
label=
"最后更新时间"
align=
"center"
prop=
"updateTime"
show-overflow-tooltip
></el-table-column>
align=
"center"
<el-table-column
label=
"操作"
align=
"center"
>
prop=
"tdVisitCnt"
<
template
slot-scope=
"{ row }"
>
min-width=
"100"
<el-button
type=
"text"
@
click=
"goRoute(row, 'detail')"
>
详情|统计
</el-button>
show-overflow-tooltip
></el-table-column>
<el-button
type=
"text"
@
click=
"goRoute(row)"
>
编辑
</el-button>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-button
@
click=
"remove(row.id)"
type=
"text"
>
删除
</el-button>
<
template
slot-scope=
"{ row }"
>
</
template
>
<el-button
type=
"text"
@
click=
"goRoute(row, 'detail')"
>
详情|统计
</el-button>
</el-table-column>
<el-button
type=
"text"
@
click=
"goRoute(row)"
>
编辑
</el-button>
</el-table>
<el-button
@
click=
"remove(row.id)"
type=
"text"
>
删除
</el-button>
<pagination
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
</
template
>
</el-table-column>
</el-table>
<pagination
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
</div>
</div>
</div>
</template>
</template>
<
style
lang=
"less"
scoped
></
style
>
<
style
lang=
"scss"
scoped
>
.el-icon-copy-document
{
&:hover
{
color
:
$
blue
;
}
}
</
style
>
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