Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-presale
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 2bae02a2
authored
Dec 18, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改bug
1 parent
892c0ac9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
43 deletions
src/components/Editor/index.vue
src/components/Editor/parseAttachmentHtml.js
src/views/ContractManager/prodIndex.vue
src/views/config/index.vue
src/components/Editor/index.vue
View file @
2bae02a
<
template
>
<div
class=
"editor-ctnr"
>
<!--
<
el-button
@
click=
"insertNode"
>
插入元素
</el-button
>
<el-button
@
click=
"insertOtherNode"
>
插入其他元素
</el-button>
<
el-button
@
click=
"getData"
>
获取内容
</el-button
>
<el-button
@
click=
"setData"
>
设置内容
</el-button>
-->
<!--
<
div
class=
"extend-bar"
v-if=
"operateList && operateList.length"
>
<el-button
v-for=
"item in operateList"
:key=
"item.key"
class=
"el-icon-circle-plus extend-icon"
@
click=
"insertNodeFn(item)"
>
{{
item
.
name
}}
</el-button>
<
/div>
--
>
<label
v-if=
"label"
for=
""
:class=
"['content-label',
{ 'required-field': required }]">
{{
label
}}
</label>
<div
class=
"editor"
style=
"border: 1px solid #ccc;"
>
<Toolbar
v-if=
"hasTool"
style=
"border-bottom: 1px solid #ccc"
:editor=
"editor"
:defaultConfig=
"toolbarConfig"
:mode=
"mode"
/>
<Editor
style=
"min-height: 52px; overflow-y: hidden;"
@
onChange=
"onChange"
v-model=
"value"
:defaultConfig=
"editorConfig"
:mode=
"mode"
@
onCreated=
"onCreated"
/>
<div>
<div
class=
"editor"
style=
"border: 1px solid #ccc;"
>
<Toolbar
v-if=
"hasTool"
style=
"border-bottom: 1px solid #ccc"
:editor=
"editor"
:defaultConfig=
"toolbarConfig"
:mode=
"mode"
/>
<Editor
style=
"min-height: 52px; overflow-y: hidden;"
@
onChange=
"onChange"
v-model=
"value"
:defaultConfig=
"editorConfig"
:mode=
"mode"
@
onCreated=
"onCreated"
/>
</div>
<div
class=
"extend-bar"
v-if=
"operateList && operateList.length"
>
<el-button
v-for=
"item in operateList"
:key=
"item.key"
class=
"el-icon-circle-plus extend-icon"
@
click=
"insertNodeFn(item)"
>
{{
item
.
name
}}
</el-button>
</div>
</div>
</div>
</
template
>
...
...
@@ -96,29 +101,13 @@ export default Vue.extend({
onCreated
(
editor
)
{
this
.
editor
=
Object
.
seal
(
editor
)
// 一定要用 Object.seal() ,否则会报错
},
setData
()
{
this
.
editor
.
setHtml
(
`<p>模拟 Ajax 异步设置内容 HTML<span data-w-e-type="text" data-key="#{sadasd}" data-name="张三">张三</span>`
)
},
getData
()
{
const
toolbar
=
DomEditor
.
getToolbar
(
this
.
editor
)
const
curToolbarConfig
=
toolbar
.
getConfig
()
event
.
preventDefault
()
// return false
},
insertNode
()
{
event
.
preventDefault
()
// const dom = {
// // JS 语法
// type: 'text',
// name: '张三',
// key: '#{packagdasdasdiod}',
// children: [{ text: '' }]
// }
insertNodeFn
(
item
)
{
// event.preventDefault()
const
resume
=
{
// JS 语法
type
:
'text'
,
name
:
'张三'
,
key
:
'#{packagePeriod}'
,
name
:
item
.
name
,
key
:
item
.
key
,
children
:
[{
text
:
''
}]
}
this
.
editor
.
insertNode
(
resume
)
...
...
@@ -126,21 +115,6 @@ export default Vue.extend({
this
.
editor
.
focus
()
this
.
editor
.
move
(
1
)
},
300
)
},
insertOtherNode
()
{
event
.
preventDefault
()
const
dom
=
{
// JS 语法
type
:
'text'
,
name
:
'李四'
,
key
:
'#{packageP三生三世骚eriod}'
,
children
:
[{
text
:
''
}]
}
this
.
editor
.
insertNode
(
dom
)
setTimeout
(()
=>
{
this
.
editor
.
focus
()
this
.
editor
.
move
(
1
)
},
300
)
}
},
mounted
()
{},
...
...
@@ -178,4 +152,32 @@ export default Vue.extend({
}
}
}
.extend-bar
{
width
:
937px
;
padding
:
0
20px
;
line-height
:
40px
;
background
:
#fafbfe
;
border
:
1px
solid
#ccc
;
box-sizing
:
border-box
;
border-radius
:
0
0
4px
4px
;
border-top
:
none
;
/deep/
.el-button
{
border
:
none
;
padding
:
0
20px
;
background-color
:
transparent
;
&:hover
{
background-color
:
unset
;
}
}
.extend-icon
{
cursor
:
pointer
;
&::before
{
//
font-size
:
16px
;
margin-right
:
4px
;
}
font-size
:
14px
;
color
:
#3f3b3b
;
}
}
</
style
>
src/components/Editor/parseAttachmentHtml.js
View file @
2bae02a
export
function
parseAttachmentHtml
(
domElem
,
children
,
editor
)
{
const
key
=
domElem
.
getAttribute
(
'data-key'
)
||
''
const
name
=
domElem
.
getAttribute
(
'data-name'
)
||
''
console
.
log
(
domElem
,
children
,
editor
)
// 生成“附件”元素(按照此前约定的数据结构)
const
myResume
=
{
type
:
'text'
,
...
...
src/views/ContractManager/prodIndex.vue
View file @
2bae02a
...
...
@@ -11,6 +11,7 @@
</div>
</div>
<GLTable
ref=
"equityRef"
:getListApi=
"getListApi"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
:hasNum=
"false"
:expand-row-keys=
"expandArr"
>
<span
slot=
"numberSlot"
slot-scope=
"scope"
>
{{
scope
.
index
+
1
}}
</span>
<div
class=
"sub-tabel"
slot=
"labelRelationDetailDTOList"
slot-scope=
"scope"
v-if=
"scope.scope.skuPackageList && scope.scope.skuPackageList.length"
>
<GLTable
ref=
"sonTableRef"
:hasPage=
"false"
:tableData=
"scope.scope.skuPackageList"
:tableParams=
"sonTableParams"
:hasNum=
"false"
>
<span
slot=
"serviceItemSlot"
slot-scope=
"row"
:data=
"scope.scope"
>
{{
getServiceItemFn
(
scope
.
scope
.
packageType
,
row
.
scope
)
}}
</span>
...
...
@@ -190,6 +191,11 @@ export default {
addHtml
:
'labelRelationDetailDTOList'
},
{
label
:
'序号'
,
width
:
80
,
addHtml
:
'numberSlot'
},
{
label
:
'ID'
,
prop
:
'spuId'
},
...
...
@@ -237,6 +243,11 @@ export default {
formatter
:
cell
=>
' '
},
{
label
:
''
,
width
:
80
,
formatter
:
cell
=>
' '
},
{
label
:
'ID'
,
prop
:
'skuId'
},
...
...
src/views/config/index.vue
View file @
2bae02a
...
...
@@ -269,6 +269,7 @@ export default {
},
batchOpenSale
(){
const
data
=
this
.
$refs
.
table
?.
mutiSelectArr
?.[
this
.
tableParams
.
mutiSelectName
]
||
[]
if
(
!
data
?.
length
)
return
this
.
$message
.
error
(
'请选择需要开通的商户'
)
const
ids
=
data
.
map
(
item
=>
item
.
id
)
this
.
$apis
.
openconfig
.
batchOpenSaleModeApi
({
ids
,
saleMode
:
2
}).
then
(
res
=>
{
if
(
res
){
...
...
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