Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
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 7614eb7f
authored
Mar 16, 2024
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
更换门店弹窗
1 parent
4811da74
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
112 additions
and
26 deletions
src/views/contentManager/components/preview/index.vue
src/views/contentManager/components/uploadPdf/index.vue
src/views/contentManager/contentAdd.vue
src/views/contentManager/components/preview/index.vue
View file @
7614eb7
...
...
@@ -122,7 +122,9 @@ export default {
},
data
()
{
return
{
dialogVisibleImg
:
false
dialogVisibleImg
:
false
,
dialogSrc
:
""
,
dialogType
:
""
}
},
methods
:
{
...
...
src/views/contentManager/components/uploadPdf/index.vue
View file @
7614eb7
...
...
@@ -42,15 +42,6 @@
/>
</div>
</
template
>
<el-dialog
class=
"image-dialog"
:visible
.
sync=
"dialogVisibleImg"
:append-to-body=
"true"
width=
"50%"
>
<img
:src=
"dialogSrc"
width=
"100%"
v-if=
"dialogType == 'img'"
/>
<!-- <video width="100%" autoplay controls :src="dialogSrc" v-else></video> -->
</el-dialog>
</div>
</template>
<
script
>
...
...
@@ -160,12 +151,6 @@ export default {
})
}
},
// 预览图文
handleEnlarge
(
src
,
type
)
{
this
.
dialogVisibleImg
=
true
this
.
dialogSrc
=
src
this
.
dialogType
=
type
?
type
:
"img"
},
// 删除图片/视频
delFile
(
index
)
{
this
.
imageUrlArr
.
splice
(
index
,
1
)
...
...
src/views/contentManager/contentAdd.vue
View file @
7614eb7
...
...
@@ -204,13 +204,64 @@
>
</div>
</div>
<merchantDialog
<
!--
<
merchantDialog
v-if=
"merchantVisible"
:dialogVisible=
"merchantVisible"
:config=
"
{ scene: formData.scene, type: formData.showMerchant }"
@confirmDialogFn="confirmDialogFn"
@closeDialogFn="closeDialogFn"
>
</merchantDialog>
>
</merchantDialog>
-->
<relate-store-dialog
v-if=
"relateStoreVisible"
ref=
"formRelateStore"
:relate-store-visible=
"relateStoreVisible"
:store-api=
"
[1, 2, 3].includes(formData.scene) ? getList : getAccountMerchantList
"
:store-search-form=
"storeSearchForm"
:store-selected=
"storeSelected"
:selected-scene=
"formData.scene"
@
handleRelateStoreConfirm=
"handleRelateStoreConfirm"
@
handleRelateStoreClose=
"handleRelateStoreClose"
>
<el-row
slot
>
<el-form
:model=
"storeSearchForm"
ref=
"relate"
:inline=
"true"
>
<el-form-item
label=
"门店名称:"
>
<el-input
v-model
.
trim=
"storeSearchForm.merchantName"
placeholder=
"门店名称"
@
keydown
.
native=
"handleStoreInput"
clearable
/>
</el-form-item>
<el-form-item
label=
"门店商户号:"
>
<el-input
v-model
.
trim=
"storeSearchForm.merchantId"
placeholder=
"门店商户号"
@
keydown
.
native=
"handleStoreInput"
clearable
/>
</el-form-item>
<el-form-item
label=
"服务对接:"
>
<el-input
v-model
.
trim=
"storeSearchForm.yqMerchantName"
placeholder=
"服务对接"
@
keydown
.
native=
"handleStoreInput"
clearable
/>
</el-form-item>
<el-form-item
label=
"服务对接商户号:"
>
<el-input
v-model
.
trim=
"storeSearchForm.yqMerchantId"
placeholder=
"服务对接商户号"
@
keydown
.
native=
"handleStoreInput"
clearable
/>
</el-form-item>
<el-button
type=
"primary"
@
click=
"handleSearchStore"
>
搜索
</el-button>
</el-form>
</el-row>
</relate-store-dialog>
<brandDialog
v-if=
"brandVisible"
:dialogVisible=
"brandVisible"
...
...
@@ -229,7 +280,9 @@ import { SCENE_OPTIONS } from "./constant"
import
preview
from
"./components/preview"
import
uploadPdf
from
"./components/uploadPdf"
import
merchantDialog
from
"./components/merchantDialog"
import
relateStoreDialog
from
"@/views/goods/grounding/components/relateStoreDialog.vue"
import
brandDialog
from
"./components/brandDialog"
import
{
getList
,
getAccountMerchantList
}
from
"@/api/merchant"
import
{
addContent
,
updateContent
,
...
...
@@ -241,10 +294,21 @@ export default {
glsxPreview
:
preview
,
uploadPdf
,
merchantDialog
:
merchantDialog
,
brandDialog
:
brandDialog
brandDialog
:
brandDialog
,
relateStoreDialog
},
data
()
{
return
{
getList
,
getAccountMerchantList
,
relateStoreVisible
:
false
,
storeSearchForm
:
{
merchantName
:
""
,
merchantId
:
""
,
yqMerchantName
:
""
,
yqMerchantId
:
""
},
storeSelected
:
[],
merchantVisible
:
false
,
brandVisible
:
false
,
tableData
:
[],
...
...
@@ -348,7 +412,7 @@ export default {
},
{
label
:
"园区店号"
,
prop
:
"merchant
No
"
prop
:
"merchant
Id
"
}
]
},
...
...
@@ -382,7 +446,7 @@ export default {
if
(
res
)
{
for
(
const
key
in
this
.
formData
)
{
if
(
key
==
"cover"
)
{
this
.
formData
[
key
]
=
[
res
[
key
]
]
this
.
formData
[
key
]
=
res
[
key
]
?
[
res
[
key
]]
:
[
]
}
else
if
(
key
==
"imageList"
)
{
if
(
res
.
type
!=
2
)
{
this
.
formData
[
key
]
=
res
.
detailInfos
?.
map
((
item
)
=>
item
.
image
)
...
...
@@ -393,7 +457,21 @@ export default {
this
.
formData
[
key
]
=
res
[
key
]
}
}
this
.
tableData
=
res
?.
assignInfos
||
[]
if
(
res
.
showMerchant
)
{
this
.
tableData
=
res
?.
assignInfos
.
map
((
item
)
=>
{
const
{
assignId
,
assignName
}
=
item
return
res
.
showMerchant
==
2
?
{
merchantId
:
assignId
,
merchantName
:
assignName
}
:
{
id
:
assignId
,
label
:
assignName
}
})
||
[]
}
}
})
},
...
...
@@ -408,7 +486,7 @@ export default {
return
{
assignName
:
params
.
showMerchant
==
2
?
item
.
merchantName
:
item
.
label
,
assignId
:
params
.
showMerchant
==
2
?
item
.
merchant
No
:
item
.
id
assignId
:
params
.
showMerchant
==
2
?
item
.
merchant
Id
:
item
.
id
}
})
params
.
assignInfoList
=
list
...
...
@@ -426,7 +504,7 @@ export default {
return
params
},
confirmAdd
(
type
)
{
this
.
$confirm
(
"
删除后内容不可恢复
"
,
"提示"
,
{
this
.
$confirm
(
"
是否确认保存
"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
...
...
@@ -446,7 +524,9 @@ export default {
const
params
=
this
.
getParams
(
type
)
addContent
(
params
).
then
((
res
)
=>
{
if
(
res
)
{
this
.
$message
.
success
(
`
${
params
.
id
?
"修改"
:
"新增"
}
成功`
)
this
.
$message
.
success
(
`
${
!
type
?
"保存草稿"
:
params
.
id
?
"修改"
:
"新增"
}
成功`
)
this
.
handleCancel
()
}
})
...
...
@@ -462,11 +542,30 @@ export default {
if
(
this
.
formData
.
showMerchant
==
1
)
{
this
.
brandVisible
=
true
}
else
{
this
.
merchantVisible
=
true
this
.
storeSelected
=
deepClone
(
this
.
tableData
)
this
.
relateStoreVisible
=
true
}
},
handleRelateStoreConfirm
(
selectedData
)
{
if
(
!
selectedData
.
length
)
{
return
this
.
$message
.
error
(
"请选择门店"
)
}
this
.
$refs
.
channelForm
.
clearValidate
(
"showMerchant"
)
this
.
tableData
=
selectedData
this
.
relateStoreVisible
=
false
},
handleRelateStoreClose
()
{
this
.
relateStoreVisible
=
false
},
handleStoreInput
(
e
)
{
e
.
keyCode
===
13
&&
this
.
handleSearchStore
()
},
handleSearchStore
()
{
this
.
$refs
.
formRelateStore
.
handleCurrentChange
(
1
)
},
confirmDialogFn
(
e
)
{
this
.
closeDialogFn
()
this
.
$refs
.
channelForm
.
clearValidate
(
"showMerchant"
)
this
.
$nextTick
(()
=>
{
this
.
tableData
=
e
||
[]
})
...
...
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