Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-admin-IM
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-admin-IM
提交
282eae6a
提交
282eae6a
编写于
4月 04, 2019
作者:
huangwensu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
问卷接口联调
上级
9976b5fb
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
214 行增加
和
45 行删除
+214
-45
env-config.js
src/utils/env-config.js
+2
-2
filter.js
src/utils/filter.js
+10
-6
header.vue
src/views/layout/header.vue
+2
-1
question-list.vue
src/views/question-naire/question-list.vue
+200
-36
未找到文件。
src/utils/env-config.js
浏览文件 @
282eae6a
...
...
@@ -4,10 +4,10 @@
export
const
envConfig
=
{
development
:
{
// baseUrl: 'https://dev-sc.yunqueyi.com/',
baseUrl
:
'http://10.177.15.180:11902'
,
//
baseUrl: 'http://10.177.15.180:11902',
// // baseUrl: 'http://192.168.140.14:10201/',
//
baseUrl: 'https://dev-sc.yunqueyi.com',
baseUrl
:
'https://dev-sc.yunqueyi.com'
,
qiniuFileUrl
:
"http://localhost:10201/contents/admin/qiniu/token1"
,
qiniuResourceUrl
:
"https://test1-videos.yunqueyi.com"
,
qiniuImgUrl
:
"https://test1-file.yunqueyi.com"
,
...
...
src/utils/filter.js
浏览文件 @
282eae6a
...
...
@@ -155,16 +155,20 @@ const vueFilter = {
// 问卷
questionStatus
:
(
value
)
=>
{
if
(
value
==
1
)
{
return
'
未开通
'
return
'
下线
'
}
else
{
return
'
开通
'
return
'
上线
'
}
},
modifyType
:
(
value
,
data
)
=>
{
let
_index
=
data
.
findIndex
((
_value
,
index
,
arr
)
=>
{
return
value
==
_value
.
id
})
return
data
[
_index
].
userName
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
value
==
data
[
i
].
id
)
{
return
data
[
i
].
userName
}
else
{
return
''
}
}
}
}
export
default
vueFilter
\ No newline at end of file
src/views/layout/header.vue
浏览文件 @
282eae6a
...
...
@@ -37,7 +37,8 @@ let vm = null
export
default
{
props
:
{
userName
:
{
type
:
String
type
:
String
,
default
:
''
},
authList
:
{
type
:
Array
...
...
src/views/question-naire/question-list.vue
浏览文件 @
282eae6a
...
...
@@ -5,6 +5,31 @@
:curmbSecond=
"curmbSecond"
>
</bread-crumb>
<div
class=
"question-content screenSet"
id=
"screenSet"
>
<el-row
:gutter=
"30"
class=
"row"
type=
"flex"
style=
"margin-top: 10px;"
>
<el-form
ref=
"serchForm"
:model=
"searchParam"
label-width=
"75px"
label-suffix=
":"
style=
"width:100%;"
>
<el-col
:span=
"6"
>
<el-form-item
label=
"问卷名称"
>
<el-input
v-model=
"searchParam.name"
size=
"mini"
placeholder=
"请输入问卷名称"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
label=
"状态"
>
<el-select
clearable
v-model=
"searchParam.status"
size=
"mini"
placeholder=
"请选择问卷状态"
>
<el-option
v-for=
"(item,index) in statuSelect"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
style=
"text-align:right;padding:0 30px 15px 0;"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"search(1)"
>
查询
</el-button>
<el-button
type=
"default"
size=
"small"
@
click=
"reseat"
>
重置
</el-button>
</el-col>
</el-form>
</el-row>
<el-button
class=
"add-question"
type=
"primary"
size=
"small"
@
click=
"addQuestion"
>
新增问卷
</el-button>
<el-table
:data=
"tableData"
...
...
@@ -29,8 +54,8 @@
<el-table-column
label=
"操作"
fixed=
"right"
align=
"center"
min-width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"edit(scope.row)"
>
编辑
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"o
nLine(scope.row)"
>
上线
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"d
ownLine(scope.row)"
>
下线
</el-button>
<el-button
type=
"primary"
v-if=
"scope.row.status == 1"
size=
"small"
@
click=
"onAndDow
nLine(scope.row)"
>
上线
</el-button>
<el-button
type=
"primary"
v-if=
"scope.row.status == 2"
size=
"small"
@
click=
"onAndD
ownLine(scope.row)"
>
下线
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"reviewQuestion(scope.row)"
>
查看题库
</el-button>
</
template
>
</el-table-column>
...
...
@@ -55,6 +80,7 @@
</el-pagination>
</div>
</div>
<!-- 问卷新增(编辑) -->
<el-dialog
class=
"img-edit"
:title=
"questionTitle"
...
...
@@ -63,51 +89,100 @@
:close-on-press-escape=
"false"
>
<el-form
ref=
"questionForm"
:rules=
"rules"
:model=
"questionEditList"
label-width=
"220px"
label-suffix=
":"
size=
"mini"
>
<el-form-item>
<el-radio-group
v-model=
"questionEditList.showType"
>
<el-radio-group
v-model=
"questionEditList.showType"
style=
"margin-left: -65px;"
>
<el-radio
:label=
"1"
>
单题显示
</el-radio>
<el-radio
:label=
"2"
>
平铺显示
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"问卷标题"
>
<el-input
v-model=
"questionEditList.name"
placeholder=
"标题最多30字符"
></el-input>
<el-input
v-model=
"questionEditList.name"
placeholder=
"标题最多30字符"
style=
"width: 300px;"
></el-input>
</el-form-item>
<el-form-item
label=
"题库导入"
>
<el-input></el-input>
<el-button>
导入题库
</el-button>
<el-input
style=
"width: 300px;"
></el-input>
<el-button
type=
"primary"
>
导入题库
</el-button>
</el-form-item>
<
div
>
<
p>
下一题按钮
</p
>
<el-form-item
label=
"置灰不可点"
v-if=
"questionEditList.showType == 1"
>
<
el-form-item
label=
"下一题按钮"
v-if=
"questionEditList.showType == 1"
>
<
div
class=
"submit-btn"
>
<p>
置灰不可点
</p
>
<el-upload
v-model=
"questionEditList.nextDisableClickUrl"
class=
"avatar-uploader"
action=
"#"
:show-file-list=
"false"
:before-upload=
"beforeAvatarUpload"
>
<el-button
size=
"
small"
type=
"primary"
@
click=
"uploadImg(index)"
>
上传图片
</el-button>
:before-upload=
"beforeAvatarUpload
_1
"
>
<el-button
size=
"
mini"
type=
"primary"
@
click=
"uploadImg(index)"
>
上传
</el-button>
</el-upload>
<div
class=
"uploat-content"
>
<img
v-if=
"questionEditList.nextDisableClickUrl"
:src=
"questionEditList.nextDisableClickUrl"
class=
"bg-img"
>
<
!-- <img v-if="!questionEditList.nextDisableClickUrl" class="bg-img" src="../../../assets/image/default.png"> --
>
<
img
v-if=
"!questionEditList.nextDisableClickUrl"
class=
"bg-img"
src=
"../../assets/image/default.png"
>
</div>
</el-form-item>
<el-form-item
label=
"点亮可点"
v-if=
"questionEditList.showType == 1"
>
</div>
<div
class=
"submit-btn"
style=
"margin-left:20px;"
>
<p>
点亮可点
</p>
<el-upload
v-model=
"questionEditList.nextClickUrl"
v-model=
"questionEditList.next
Disable
ClickUrl"
class=
"avatar-uploader"
action=
"#"
:show-file-list=
"false"
:before-upload=
"beforeAvatarUpload"
>
<el-button
size=
"
small"
type=
"primary"
@
click=
"uploadImg(index)"
>
上传图片
</el-button>
:before-upload=
"beforeAvatarUpload
_2
"
>
<el-button
size=
"
mini"
type=
"primary"
@
click=
"uploadImg(index)"
>
上传
</el-button>
</el-upload>
<div
class=
"uploat-content"
>
<img
v-if=
"questionEditList.next
ClickUrl"
:src=
"questionEditList.next
ClickUrl"
class=
"bg-img"
>
<
!-- <img v-if="!questionEditList.nextClickUrl" class="bg-img" src="../../../assets/image/default.png"> --
>
<img
v-if=
"questionEditList.next
DisableClickUrl"
:src=
"questionEditList.nextDisable
ClickUrl"
class=
"bg-img"
>
<
img
v-if=
"!questionEditList.nextDisableClickUrl"
class=
"bg-img"
src=
"../../assets/image/default.png"
>
</div>
</el-form-item>
</div>
</el-form-item>
<el-form-item
label=
"头部样式"
v-if=
"questionEditList.showType == 2"
>
<el-radio-group
v-model=
"questionEditList.headStyle"
>
<el-radio
:label=
"1"
>
文字
</el-radio>
<el-radio
:label=
"2"
>
图片
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"副标题"
v-if=
"questionEditList.showType == 2 && questionEditList.headStyle == 1"
>
<el-input
v-model=
"questionEditList.subheading"
placeholder=
"副标题最多20字符"
style=
"width: 300px;"
></el-input>
</el-form-item>
<el-form-item
label=
"问卷导言"
v-if=
"questionEditList.showType == 2"
>
<el-input
v-model=
"questionEditList.questionIntro"
placeholder=
"最多210字符"
style=
"width: 300px;"
></el-input>
</el-form-item>
<div
v-if=
"questionEditList.showType == 2 && questionEditList.headStyle == 2"
>
<el-form-item
class=
"submit-btn"
label=
"头图"
>
<el-upload
v-model=
"questionEditList.headDiagramUrl"
class=
"avatar-uploader"
action=
"#"
:show-file-list=
"false"
:before-upload=
"beforeAvatarUpload_4"
>
<el-button
size=
"mini"
type=
"primary"
@
click=
"uploadImg(index)"
>
上传
</el-button>
</el-upload>
<div
class=
"uploat-content"
>
<img
v-if=
"questionEditList.headDiagramUrl"
:src=
"questionEditList.headDiagramUrl"
class=
"bg-img"
>
<img
v-if=
"!questionEditList.headDiagramUrl"
class=
"bg-img"
src=
"../../assets/image/default.png"
>
</div>
</el-form-item>
</div>
<el-form-item
class=
"submit-btn"
label=
"提交按钮"
>
<el-upload
v-model=
"questionEditList.submitButtomUrl"
class=
"avatar-uploader"
action=
"#"
:show-file-list=
"false"
:before-upload=
"beforeAvatarUpload_3"
>
<el-button
size=
"mini"
type=
"primary"
@
click=
"uploadImg(index)"
>
上传
</el-button>
</el-upload>
<div
class=
"uploat-content"
>
<img
v-if=
"questionEditList.submitButtomUrl"
:src=
"questionEditList.submitButtomUrl"
class=
"bg-img"
>
<img
v-if=
"!questionEditList.submitButtomUrl"
class=
"bg-img"
src=
"../../assets/image/default.png"
>
</div>
</el-form-item>
<el-form-item
label=
"问卷填写完毕提示文案"
>
<el-input
v-model=
"questionEditList.promptCopy"
style=
"width: 300px;"
></el-input>
<span
style=
"font-size:12px;"
>
标题最多40字符
</span>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align:center;"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"submitQuestion"
>
提交
</el-button>
</div>
</el-dialog>
</div>
</template>
...
...
@@ -135,13 +210,28 @@ export default {
pageNo
:
1
},
modifyArray
:
[],
rules
:
[]
,
rules
:
{}
,
questionEditList
:
{
showType
:
1
,
name
:
''
,
nextDisableClickUrl
:
''
,
nextClickUrl
:
''
}
nextClickUrl
:
''
,
submitButtomUrl
:
''
,
promptCopy
:
''
,
headDiagramUrl
:
''
,
headStyle
:
1
,
subheading
:
''
,
questionIntro
:
''
},
statuSelect
:
[
{
label
:
'下线'
,
value
:
1
},{
label
:
'上线'
,
value
:
2
}
]
}
},
created
()
{
...
...
@@ -155,7 +245,8 @@ export default {
},
methods
:
{
// 查询
search
()
{
search
(
flag
)
{
if
(
flag
)
vm
.
searchParam
.
pageNo
=
1
vm
.
GET
(
'/campaign/adminQuestionnaire/queryList'
,
vm
.
searchParam
).
then
((
res
)
=>
{
if
(
res
.
code
==
'000000'
)
{
vm
.
tableData
=
res
.
data
.
questionnaireList
...
...
@@ -163,6 +254,11 @@ export default {
}
})
},
reseat
()
{
vm
.
searchParam
.
name
=
''
vm
.
searchParam
.
status
=
''
vm
.
search
()
},
// 获取所有修改人
getAllModify
()
{
vm
.
GET
(
'/campaign/adminQuestionnaire/getAllUser'
).
then
((
res
)
=>
{
...
...
@@ -174,27 +270,74 @@ export default {
// 新增问卷
addQuestion
()
{
vm
.
discussEditVisible
=
true
vm
.
questionEditList
=
Object
.
assign
({},{
showType
:
1
,
name
:
''
,
nextDisableClickUrl
:
''
,
nextClickUrl
:
''
,
submitButtomUrl
:
''
,
promptCopy
:
''
,
headDiagramUrl
:
''
,
headStyle
:
1
,
subheading
:
''
,
questionIntro
:
''
})
},
// 编辑
edit
()
{
},
// 上线
onLine
()
{
edit
(
row
)
{
vm
.
discussEditVisible
=
true
vm
.
GET
(
'/campaign/adminQuestionnaire/getQuestionnaireById'
,{
id
:
row
.
id
}).
then
((
res
)
=>
{
if
(
res
.
code
==
'000000'
)
{
vm
.
questionEditList
=
Object
.
assign
({},
res
.
data
)
}
})
},
// 下线
downLine
()
{
// 上线/下线
onAndDownLine
(
row
)
{
let
req
=
null
if
(
row
.
status
==
1
)
{
req
=
{
id
:
row
.
id
,
status
:
2
}
}
else
{
req
=
{
id
:
row
.
id
,
status
:
1
}
}
vm
.
GET
(
'/campaign/adminQuestionnaire/upperOrLowerShip'
,
req
).
then
((
res
)
=>
{
if
(
res
.
code
==
'000000'
)
{
vm
.
search
()
}
})
},
// 查看题库
reviewQuestion
()
{
},
handleSizeChange
()
{
// 置灰不可点图片上传
beforeAvatarUpload_1
()
{
},
handleCurrentChange
()
{
// 点亮图片上传
beforeAvatarUpload_2
()
{
},
// 提交图片上传
beforeAvatarUpload_3
()
{
},
handleSizeChange
(
value
)
{
vm
.
searchParam
.
pageSize
=
value
vm
.
search
()
},
handleCurrentChange
(
value
)
{
vm
.
searchParam
.
pageNo
=
value
vm
.
search
()
},
// 提交
submitQuestion
()
{
}
}
...
...
@@ -217,6 +360,27 @@ export default {
}
}
}
.submit-btn
{
display
:
inline-block
;
overflow
:
hidden
;
p
{
font-size
:
12px
;
}
.avatar-uploader
{
float
:
right
;
.el-button
{
margin-top
:
48px
!
important
;
margin-left
:
10px
;
}
}
.uploat-content
{
float
:
left
;
.bg-img
{
width
:
80px
;
height
:
80px
;
}
}
}
}
</
style
>
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录