Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-outbound
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 5dc54061
authored
Nov 10, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交11月需求
1 parent
4000a051
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
77 deletions
src/views/questionnaire/add.vue
src/views/questionnaire/components/StepTwo/index.vue
src/views/questionnaire/index.vue
src/views/questionnaire/add.vue
View file @
5dc5406
...
@@ -162,8 +162,6 @@ export default {
...
@@ -162,8 +162,6 @@ export default {
itemValue
:
type
==
2
||
type
==
5
?
[]
:
''
itemValue
:
type
==
2
||
type
==
5
?
[]
:
''
})
})
})
})
console
.
log
(
stepTwo
.
questionsList
)
},
},
handleCancel
()
{
handleCancel
()
{
const
{
step
}
=
this
const
{
step
}
=
this
...
@@ -187,8 +185,7 @@ export default {
...
@@ -187,8 +185,7 @@ export default {
try
{
try
{
const
params
=
{
const
params
=
{
...
stepOne
.
configForm
,
...
stepOne
.
configForm
,
...
stepTwo
.
configForm
,
...
stepTwo
.
configForm
status
:
0
}
}
if
(
fromId
)
params
.
id
=
fromId
if
(
fromId
)
params
.
id
=
fromId
const
res
=
await
this
.
$apis
.
questionnaire
[
apiName
](
params
)
const
res
=
await
this
.
$apis
.
questionnaire
[
apiName
](
params
)
...
...
src/views/questionnaire/components/StepTwo/index.vue
View file @
5dc5406
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
class=
"item move"
class=
"item move"
:ref=
"`item-$
{index}`"
:ref=
"`item-$
{index}`"
>
>
<div
:class=
"['label',
{ required: i.required }]">
<div
:class=
"['label',
{ required: i.required }
,{'label-center':i.type == 4 || i.type == 5}
]">
{{
i
.
text
}}
{{
i
.
text
}}
<span>
:
</span>
<span>
:
</span>
</div>
</div>
...
@@ -74,7 +74,10 @@
...
@@ -74,7 +74,10 @@
</el-radio-group>
</el-radio-group>
</template>
</template>
<
template
v-if=
"i.type == 2"
>
<
template
v-if=
"i.type == 2"
>
<el-checkbox-group
v-model=
"i.itemValue"
class=
"resize"
>
<el-checkbox-group
v-model=
"i.itemValue"
class=
"resize"
>
<template
v-for=
"(item, ind) in i.data"
>
<template
v-for=
"(item, ind) in i.data"
>
<template>
<template>
<el-checkbox
<el-checkbox
...
@@ -101,7 +104,7 @@
...
@@ -101,7 +104,7 @@
<el-select
<el-select
v-model=
"i.itemValue"
v-model=
"i.itemValue"
placeholder=
"请选择"
placeholder=
"请选择"
style=
"width:432px;
"
class=
"w432
"
>
>
<el-option
<el-option
v-for=
"(item, ind) in i.data"
v-for=
"(item, ind) in i.data"
...
@@ -115,7 +118,7 @@
...
@@ -115,7 +118,7 @@
<el-cascader
<el-cascader
v-model=
"i.itemValue"
v-model=
"i.itemValue"
:options=
"i.data"
:options=
"i.data"
style=
"width:432px;
"
class=
"w432
"
></el-cascader>
></el-cascader>
</
template
>
</
template
>
<div
class=
"control-box"
>
<div
class=
"control-box"
>
...
@@ -321,8 +324,7 @@ export default {
...
@@ -321,8 +324,7 @@ export default {
5
:
LENGTH
-
1
5
:
LENGTH
-
1
}[
targetIndex
],
}[
targetIndex
],
elementToMove
=
array
[
originalIndex
],
elementToMove
=
array
[
originalIndex
],
items
=
[],
items
=
[]
moveUP
=
targetIndex
<
4
if
(
moveElement
)
{
if
(
moveElement
)
{
const
refs
=
this
.
$refs
const
refs
=
this
.
$refs
...
@@ -335,36 +337,23 @@ export default {
...
@@ -335,36 +337,23 @@ export default {
const
originalEl
=
items
[
originalIndex
],
const
originalEl
=
items
[
originalIndex
],
targetEl
=
items
[
newIndex
],
targetEl
=
items
[
newIndex
],
originalOffsetTop
=
originalEl
.
offsetTop
,
originalOffsetTop
=
originalEl
.
offsetTop
,
targetOffsetTop
=
targetEl
.
offsetTop
,
originalOffsetHeight
=
originalEl
.
offsetHeight
+
marginBottom
,
originalOffsetHeight
=
originalEl
.
offsetHeight
+
marginBottom
,
targetOffsetHeight
=
targetEl
.
offsetHeight
+
marginBottom
targetOffsetHeight
=
targetEl
.
offsetHeight
+
marginBottom
if
(
targetIndex
<
4
)
{
if
(
originalOffsetTop
>
targetOffsetTop
)
{
originalEl
.
style
.
transform
=
translateY
((
targetIndex
==
2
?
'-'
:
''
)
+
targetOffsetHeight
)
if
(
moveUP
)
{
targetEl
.
style
.
transform
=
translateY
((
targetIndex
==
2
?
''
:
'-'
)
+
originalOffsetHeight
)
//上移
originalEl
.
style
.
transform
=
translateY
(
-
targetOffsetHeight
)
targetEl
.
style
.
transform
=
translateY
(
originalOffsetHeight
)
}
else
{
}
else
{
//最前
let
moveNum
=
0
if
(
targetIndex
==
4
)
{
for
(
let
i
=
0
;
i
<
originalIndex
;
i
++
)
{
for
(
let
i
=
0
;
i
<
originalIndex
;
i
++
)
{
items
[
i
].
style
.
transform
=
translateY
(
originalOffsetHeight
)
items
[
i
].
style
.
transform
=
translateY
(
originalOffsetHeight
)
}
}
originalEl
.
style
.
transform
=
translateY
(
-
originalOffsetTop
)
moveNum
=
-
originalOffsetTop
}
}
else
for
(
let
i
=
originalIndex
+
1
;
i
<
LENGTH
;
i
++
)
{
}
else
{
if
(
moveUP
)
{
// 下移
originalEl
.
style
.
transform
=
translateY
(
targetOffsetHeight
)
targetEl
.
style
.
transform
=
translateY
(
-
originalOffsetHeight
)
}
else
{
//最后
let
lastMove
=
0
for
(
let
i
=
originalIndex
+
1
;
i
<
LENGTH
;
i
++
)
{
items
[
i
].
style
.
transform
=
translateY
(
-
originalOffsetHeight
)
items
[
i
].
style
.
transform
=
translateY
(
-
originalOffsetHeight
)
lastMove
+=
(
items
[
i
].
offsetHeight
+
marginBottom
)
moveNum
+=
(
items
[
i
].
offsetHeight
+
marginBottom
)
}
originalEl
.
style
.
transform
=
translateY
(
lastMove
)
}
}
originalEl
.
style
.
transform
=
translateY
(
moveNum
)
}
}
}
}
await
delay
(
600
)
await
delay
(
600
)
...
@@ -387,7 +376,9 @@ export default {
...
@@ -387,7 +376,9 @@ export default {
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
.w432{
width
:
432px
;
}
/
deep
/
.el-scrollbar__wrap
{
/
deep
/
.el-scrollbar__wrap
{
&::-webkit-scrollbar
{
&::-webkit-scrollbar
{
width
:
0
;
width
:
0
;
...
@@ -426,10 +417,19 @@ export default {
...
@@ -426,10 +417,19 @@ export default {
word-break
:
break-all
;
word-break
:
break-all
;
white-space
:
break-spaces
;
white-space
:
break-spaces
;
}
}
/
deep
/
.el-radio__label
{
.label-center
{
align-items
:
center
;
}
.el-radio
,
.el-checkbox
{
word-break
:
break-all
;
word-break
:
break-all
;
white-space
:
break-spaces
;
white-space
:
break-spaces
;
display
:
inline-flex
;
align-items
:
center
;
}
}
//
.el-radio
{
//
line-height
:
24px
;
//
}
.required
{
.required
{
&::before
{
&::before
{
content
:
'*'
;
content
:
'*'
;
...
@@ -439,8 +439,10 @@ export default {
...
@@ -439,8 +439,10 @@ export default {
}
}
}
}
.resize
{
.resize
{
line-height
:
20px
;
display
:
inline-flex
;
font-size
:
14px
;
align-items
:
center
;
flex-wrap
:
wrap
;
line-height
:
24px
;
}
}
}
}
.del
{
.del
{
...
...
src/views/questionnaire/index.vue
View file @
5dc5406
...
@@ -102,33 +102,36 @@
...
@@ -102,33 +102,36 @@
@
onCancel
=
"copyParmas.show = false"
@
onCancel
=
"copyParmas.show = false"
:
visible
.
sync
=
"copyParmas.show"
:
visible
.
sync
=
"copyParmas.show"
mode
=
"small"
mode
=
"small"
hasFooter
>
>
<
template
#
default
>
<
template
#
default
>
<
div
class
=
"over-box"
>
<
div
class
=
"over-box"
>
<
div
class
=
"flex"
>
<
div
class
=
"flex"
>
<
div
class
=
"label"
>
问卷名称:
<
/div
>
<
div
class
=
"input"
>
<
div
class
=
"input"
>
<
el
-
form
ref
=
"copyFormRef"
inline
:
model
=
"copyParmas"
>
<
el
-
form
-
item
label
=
"问卷名称"
prop
=
"name"
:
rules
=
"
[{
required
:
true
,
message
:
'请输入问卷名称'
}
]
">
<el-input
<el-input
placeholder="
请输入
"
placeholder="
请输入
"
size="
small
"
size="
small
"
v
-
model
=
"test
"
v-model="
copyParmas
.
name
"
maxlength="
50
"
maxlength="
50
"
>
>
</el-input>
</el-input>
<
el
-
button
class
=
"tips"
type
=
"text"
@
click
=
"test = copyParmas.name"
>
使用原问卷名称
<
/el-button
>
</el-form-item>
</el-form>
</div>
</div>
<el-button class="
tips
" type="
text
" @click="
copyParmas
.
name
=
copyParmas
.
data
.
name
">使用原问卷名称</el-button>
</div>
</div>
</div>
</div>
</template>
</template>
<template #footer>
<template #footer>
<
div
>
<el-button
<el-button
type="
primary
"
type="
primary
"
:
size
=
"btnSize
"
size="
small
"
@click="
copyQiestion
"
@click="
copyQiestion
"
>
提交
<
/el-button
>
>
提交
<
/el-button
>
<
/div
>
<
/template
>
<
/template
>
<
/GLDialog
>
<
/GLDialog
>
<
/div
>
<
/div
>
...
@@ -221,7 +224,10 @@ export default {
...
@@ -221,7 +224,10 @@ export default {
}
,
}
,
condition
:
row
=>
row
.
status
!=
0
,
condition
:
row
=>
row
.
status
!=
0
,
listeners
:
{
listeners
:
{
click
:
row
=>
this
.
openData
(
row
)
click
:
row
=>
this
.
dataObj
=
{
show
:
true
,
...
row
}
}
}
}
,
}
,
{
{
...
@@ -237,8 +243,8 @@ export default {
...
@@ -237,8 +243,8 @@ export default {
id
:
row
.
id
,
id
:
row
.
id
,
title
:
'结束'
,
title
:
'结束'
,
status
:
-
1
,
status
:
-
1
,
text
:
'请确认是否结束该调查问卷?'
,
text
:
'请确认是否结束该调查问卷?'
,
tips
:
'结束后,客户点击将提示:问卷活动已结束'
tips
:
'结束后,客户点击将提示:问卷活动已结束'
}
}
}
}
}
,
}
,
...
@@ -255,7 +261,7 @@ export default {
...
@@ -255,7 +261,7 @@ export default {
id
:
row
.
id
,
id
:
row
.
id
,
title
:
'发布问卷'
,
title
:
'发布问卷'
,
status
:
1
,
status
:
1
,
text
:
'请确认是否发布以下调查问卷?'
,
text
:
'请确认是否发布以下调查问卷?'
,
tips
:
`问卷名称:${row.name
}
`
tips
:
`问卷名称:${row.name
}
`
}
}
}
}
...
@@ -278,13 +284,18 @@ export default {
...
@@ -278,13 +284,18 @@ export default {
type
:
'text'
,
type
:
'text'
,
}
,
}
,
listeners
:
{
listeners
:
{
click
:
row
=>
{
click
:
async
row
=>
{
const
data
=
await
this
.
$apis
.
questionnaire
.
getQuestionnaireDetail
({
id
:
row
.
id
}
)
if
(
data
)
{
this
.
copyParmas
=
{
this
.
copyParmas
=
{
show
:
true
,
show
:
true
,
id
:
row
.
id
,
data
,
name
:
row
.
name
name
:
''
}
}
this
.
test
=
''
this
.
$nextTick
(()
=>
this
.
$refs
?.
copyFormRef
?.
clearValidate
(
'name'
))
}
else
this
.
$message
.
error
(
'复制失败,请重试!'
)
}
}
}
}
}
,
}
,
...
@@ -304,9 +315,9 @@ export default {
...
@@ -304,9 +315,9 @@ export default {
show
:
false
show
:
false
}
,
}
,
copyParmas
:
{
copyParmas
:
{
show
:
false
show
:
false
,
name
:
''
}
,
}
,
test
:
''
}
}
}
,
}
,
mounted
()
{
mounted
()
{
...
@@ -319,29 +330,45 @@ export default {
...
@@ -319,29 +330,45 @@ export default {
this
.
searchForm
=
this
.
$options
.
data
.
call
(
this
).
searchForm
this
.
searchForm
=
this
.
$options
.
data
.
call
(
this
).
searchForm
this
.
handleSearch
()
this
.
handleSearch
()
}
,
}
,
openData
(
row
)
{
updateQiestionStatus
()
{
this
.
dataObj
=
{
const
{
id
,
status
}
=
this
.
updateParams
show
:
true
,
this
.
Interceptor
(
async
()
=>
await
this
.
$apis
.
questionnaire
.
updateQuestionnaireStatus
({
id
,
status
}
),
{
...
row
target
:
'updateParams'
,
successText
:
'操作成功!'
,
errorText
:
'操作失败,请重试。'
}
)
}
,
copyQiestion
()
{
const
{
data
,
name
}
=
this
.
copyParmas
this
.
$refs
.
copyFormRef
.
validate
(
valid
=>
{
if
(
valid
)
{
delete
data
.
id
delete
data
.
status
data
.
name
=
name
this
.
Interceptor
(
async
()
=>
await
this
.
$apis
.
questionnaire
.
addQuestionnaire
(
data
),
{
target
:
'copyParmas'
,
successText
:
'复制成功!'
,
errorText
:
'复制失败!'
}
)
}
}
}
)
}
,
}
,
async
updateQiestionStatus
()
{
async
Interceptor
(
fun
,
params
)
{
const
{
id
,
status
}
=
this
.
updateParams
,
let
loading
=
this
.
$loading
()
res
=
await
this
.
$apis
.
questionnaire
.
updateQuestionnaireStatus
({
id
,
status
}
)
try
{
const
res
=
await
fun
()
if
(
res
)
{
if
(
res
)
{
this
.
updateParams
=
{
show
:
false
}
this
.
$message
({
this
.
$message
({
message
:
'操作成功'
,
message
:
params
.
successText
,
type
:
'success'
type
:
'success'
}
)
}
)
this
[
params
.
target
]
=
this
.
$options
.
data
.
call
(
this
)[
params
.
target
]
loading
.
close
()
this
.
handleSearch
()
this
.
handleSearch
()
}
else
this
.
$message
.
error
(
'操作失败,请重试。'
)
}
else
throw
params
.
errorText
}
,
}
catch
(
error
)
{
async
copyQiestion
()
{
loading
.
close
()
this
.
copyParmas
=
{
if
(
error
)
this
.
$message
.
error
(
error
)
show
:
false
}
}
}
,
}
,
handleExport
()
{
handleExport
()
{
...
@@ -448,19 +475,13 @@ export default {
...
@@ -448,19 +475,13 @@ export default {
.
flex
{
.
flex
{
font
-
size
:
14
px
;
font
-
size
:
14
px
;
color
:
#
333333
;
color
:
#
333333
;
transform
:
translateY
(
-
50
%
);
.
input
{
.
input
{
position
:
relative
;
width
:
284
px
;
height
:
32
px
;
height
:
32
px
;
transform
:
translateY
(
-
4
px
);
}
.
tips
{
.
tips
{
position
:
absolute
;
font
-
size
:
12
px
;
font
-
size
:
12
px
;
color
:
#
5850
ff
;
color
:
#
5850
ff
;
margin
-
top
:
8
px
;
left
:
0
;
top
:
32
px
;
}
}
}
}
}
}
}
...
...
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