Commit 9c8b210b authored by 王启林's avatar 王启林

parent 9d4d487a
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
:default-expand-all="expand" :default-expand-all="expand"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
height="630px"
> >
<el-table-column <el-table-column
......
...@@ -26,11 +26,11 @@ ...@@ -26,11 +26,11 @@
<fc-designer style="height: 79vh;" ref="designer"> <fc-designer style="height: 79vh;" ref="designer">
<template slot="handle"> <template slot="handle">
<ElButton style="margin-left: 10px;" icon="el-icon-upload" type="primary" size="small" <ElButton style="margin-left: 10px;" icon="el-icon-upload" type="primary" size="small"
@click="issueBtn" round>问卷发布 @click="issueBtn" round>问卷配置发布
</ElButton>
<ElButton style="margin-left: 10px;" icon="el-icon-position" type="warning" size="small"
@click="outsideBtn" round>外部链接发布
</ElButton> </ElButton>
<!-- <ElButton style="margin-left: 10px;" icon="el-icon-position" type="warning" size="small"
@click="issueBtn" round>外部链接
</ElButton> -->
<ElButton icon="el-icon-view" type="success" size="small" @click="showDrawer" round>手机预览 <ElButton icon="el-icon-view" type="success" size="small" @click="showDrawer" round>手机预览
</ElButton> </ElButton>
</template> </template>
...@@ -50,6 +50,9 @@ ...@@ -50,6 +50,9 @@
<!-- 问卷发布弹出框 --> <!-- 问卷发布弹出框 -->
<el-dialog title="问卷发布" :visible.sync="issueDialog" width="30%" top="25vh"> <el-dialog title="问卷发布" :visible.sync="issueDialog" width="30%" top="25vh">
<el-form :model="issueForm" :rules="issueRules" ref="issueForm"> <el-form :model="issueForm" :rules="issueRules" ref="issueForm">
<el-form-item label="链接地址:" label-width="125px" prop="webUrl" v-if="weblink">
<el-input v-model="issueForm.webUrl" placeholder="请输入链接地址"></el-input>
</el-form-item>
<el-form-item label="问卷封面:" label-width="125px"> <el-form-item label="问卷封面:" label-width="125px">
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
<img style="width:80px; height: 80px; margin-right: 10px;cursor: pointer;" <img style="width:80px; height: 80px; margin-right: 10px;cursor: pointer;"
...@@ -161,6 +164,10 @@ export default { ...@@ -161,6 +164,10 @@ export default {
issueRules: { issueRules: {
time: [ time: [
{ required: true, message: '请输入选择反馈期限', trigger: 'blur' }, { required: true, message: '请输入选择反馈期限', trigger: 'blur' },
],
webUrl: [
{ required: true, message: '请输入链接地址', trigger: 'blur' },
{ pattern: /^https?:\/\/((.)+(\.)?)*(:\d+)?(\/((\.)?(\?)?=?&?.(\?)?)*)*$/i, message: '请输入正确的链接 例:https://www.baidu.com', trigger: 'change' }
] ]
}, },
treeData: [], treeData: [],
...@@ -178,7 +185,17 @@ export default { ...@@ -178,7 +185,17 @@ export default {
editStyle: false, editStyle: false,
loadingstate: false, loadingstate: false,
ImgUrl: process.env.VUE_APP_API_BASE_URL, ImgUrl: process.env.VUE_APP_API_BASE_URL,
coverImg: [] coverImg: [],
weblink: 0,
webUrl: '',
}
},
watch: {
issueDialog(val) { //监听关闭外联状态
if (!val) {
this.weblink = 0
}
} }
}, },
mounted() { mounted() {
...@@ -202,6 +219,10 @@ export default { ...@@ -202,6 +219,10 @@ export default {
this.getFile() this.getFile()
}, },
methods: { methods: {
outsideBtn() {
this.weblink = 1
this.issueDialog = 1
},
handleUploadSuccess(res) { handleUploadSuccess(res) {
console.log(res) console.log(res)
this.coverImg.push(res) this.coverImg.push(res)
...@@ -253,7 +274,6 @@ export default { ...@@ -253,7 +274,6 @@ export default {
console.log(file) console.log(file)
} }
}, },
//获取问卷封面 //获取问卷封面
getFile() { getFile() {
this.$post('/feedback/file/list', { page: 1, size: 3 }).then(res => { this.$post('/feedback/file/list', { page: 1, size: 3 }).then(res => {
...@@ -360,12 +380,12 @@ export default { ...@@ -360,12 +380,12 @@ export default {
return JSON.stringify(FcDesignerOptions) return JSON.stringify(FcDesignerOptions)
}, },
issueFormBtn(formName) { issueFormBtn(formName) {
if (this.checkedUser.length < 1) {
this.$message.warning('请选择人员后发布问卷')
return
}
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
if (this.checkedUser.length < 1) {
this.$message.warning('请选择人员后发布问卷')
return
}
console.log(this.issueForm) console.log(this.issueForm)
this.Frule.forEach(i => { this.Frule.forEach(i => {
i.remark = i.field i.remark = i.field
...@@ -384,7 +404,8 @@ export default { ...@@ -384,7 +404,8 @@ export default {
}) })
let sub = { let sub = {
weblink: this.weblink,
webUrl: this.issueForm.webUrl,
staffList: this.checkedUser, staffList: this.checkedUser,
id: this.feedbackId, id: this.feedbackId,
...this.titleForm, ...this.titleForm,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment