wangqing 4 years ago
parent
commit
9f9307109b
  1. BIN
      src/assets/images/form-bg.png
  2. 2
      src/assets/styles/form/home.scss
  3. 3
      src/components/generator/config.js
  4. 45
      src/components/parser/Parser.vue
  5. 39
      src/views/form/editor/RightPanel.vue
  6. 36
      src/views/form/editor/index.vue
  7. 29
      src/views/form/index.vue
  8. 32
      src/views/form/publish/index.vue
  9. 295
      src/views/form/setting/index.vue
  10. 27
      src/views/form/statistics/item.vue
  11. 40
      src/views/form/statistics/list.vue
  12. 17
      src/views/form/write/index.vue
  13. 4
      src/views/project/my/index.vue

BIN
src/assets/images/form-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

2
src/assets/styles/form/home.scss

@ -87,7 +87,7 @@ $lighterBlue: #1890ff;
} }
.empty-info { .empty-info {
position: absolute; position: absolute;
top: 46%; top: 36%;
left: 0; left: 0;
right: 0; right: 0;
text-align: center; text-align: center;

3
src/components/generator/config.js

@ -795,6 +795,7 @@ export const personalInfoComponents = [
layout: 'colFormItem', layout: 'colFormItem',
span: 24, span: 24,
showRegList: false, showRegList: false,
regList: [],
document: 'https://element.eleme.cn/#/zh-CN/component/input' document: 'https://element.eleme.cn/#/zh-CN/component/input'
}, },
placeholder: '请选择省市县', placeholder: '请选择省市县',
@ -814,6 +815,7 @@ export const personalInfoComponents = [
layout: 'colFormItem', layout: 'colFormItem',
span: 24, span: 24,
showRegList: false, showRegList: false,
regList: [],
document: 'https://element.eleme.cn/#/zh-CN/component/input' document: 'https://element.eleme.cn/#/zh-CN/component/input'
}, },
placeholder: '请选择位置', placeholder: '请选择位置',
@ -833,6 +835,7 @@ export const personalInfoComponents = [
layout: 'colFormItem', layout: 'colFormItem',
span: 24, span: 24,
showRegList: false, showRegList: false,
regList: [],
document: 'https://element.eleme.cn/#/zh-CN/component/input' document: 'https://element.eleme.cn/#/zh-CN/component/input'
}, },
placeholder: '请验证手机号', placeholder: '请验证手机号',

45
src/components/parser/Parser.vue

@ -31,6 +31,7 @@ const layouts = {
let labelWidth = config.labelWidth ? `${config.labelWidth}px` : null let labelWidth = config.labelWidth ? `${config.labelWidth}px` : null
if (config.showLabel === false) labelWidth = '0' if (config.showLabel === false) labelWidth = '0'
let label = config.label let label = config.label
//
if (formConfCopy.showNumber) { if (formConfCopy.showNumber) {
label = scheme.serialNumber + ': ' + label label = scheme.serialNumber + ': ' + label
} }
@ -257,25 +258,35 @@ function setValueLabel(event, config, scheme) {
let tagOptionKey = processType[config.tag] let tagOptionKey = processType[config.tag]
if (tagOptionKey) { if (tagOptionKey) {
if (event instanceof Array) { if (event instanceof Array) {
//
let labelArr = new Array() let labelArr = new Array()
if(!event.includes(0)){
// other
this.$set(this[this.formConf.labelFormModel], `${scheme.__vModel__}other`, '')
//
document.querySelector('.'+config.tag).querySelector(".item-other-input").value = ""
}
event.forEach(item => { event.forEach(item => {
// //
if (item === 0) {
labelArr.push(this[this.formConf.labelFormModel][`${scheme.__vModel__}other`])
} else if (item) {
let {label} = getObject(_.get(scheme, tagOptionKey), 'value', item) let {label} = getObject(_.get(scheme, tagOptionKey), 'value', item)
labelArr.push(label) labelArr.push(label)
}
}) })
this.$set(this[this.formConf.labelFormModel], scheme.__vModel__, labelArr.join(',')) this.$set(this[this.formConf.labelFormModel], scheme.__vModel__, labelArr.join(','))
} else { } else {
// //
if (event == 0) { if (event == 0) {
console.log(this[this.formConf.labelFormModel][`${scheme.__vModel__}other`]) console.log(this[this.formConf.labelFormModel][`${scheme.__vModel__}other`])
this.$set(this[this.formConf.labelFormModel], `${scheme.__vModel__}`, this[this.formConf.labelFormModel][`${scheme.__vModel__}other`]) // labelfieldfieldother
let item = _.find(_.get(scheme, tagOptionKey), {'value': event})
this.$set(this[this.formConf.labelFormModel], scheme.__vModel__, item.label)
this.$set(this[this.formConf.labelFormModel], `${scheme.__vModel__}other`,this[this.formConf.labelFormModel][`${scheme.__vModel__}other`])
} else { } else {
let item = _.find(_.get(scheme, tagOptionKey), {'value': event}) let item = _.find(_.get(scheme, tagOptionKey), {'value': event})
this.$set(this[this.formConf.labelFormModel], scheme.__vModel__, item.label) this.$set(this[this.formConf.labelFormModel], scheme.__vModel__, item.label)
// other
this.$set(this[this.formConf.labelFormModel], `${scheme.__vModel__}other`,'')
//
document.querySelector('.'+config.tag).querySelector(".item-other-input").value = ""
} }
} }
} else if (config.tag === 'el-upload') { } else if (config.tag === 'el-upload') {
@ -404,7 +415,25 @@ export default {
}, trigger: 'change' }, trigger: 'change'
}) })
} }
//
const validateOtherInput = (rule, value, callback) => {
// 0
if (value == 0 || (Array.isArray(value) && value.includes(0))) {
if (!this[this.formConf.labelFormModel][`${rule.field}other`]) {
callback(new Error('请输入其他内容'))
} else {
callback()
}
} else {
callback()
}
}
if (Array.isArray(config.regList)) { if (Array.isArray(config.regList)) {
//
if (['RADIO', 'CHECKBOX'].includes(cur.typeId)) {
const required = {validator: validateOtherInput, message: cur.placeholder}
config.regList.push(required)
}
if (config.required) { if (config.required) {
const required = {required: config.required, message: cur.placeholder} const required = {required: config.required, message: cur.placeholder}
if (Array.isArray(config.defaultValue)) { if (Array.isArray(config.defaultValue)) {
@ -459,12 +488,14 @@ export default {
::v-deep .el-checkbox-group { ::v-deep .el-checkbox-group {
margin-left: 10px; margin-left: 10px;
} }
::v-deep .el-radio, ::v-deep .el-radio,
::v-deep .el-checkbox { ::v-deep .el-checkbox {
display: block; display: block;
min-height: 23px; min-height: 23px;
line-height: 23px; line-height: 23px;
} }
::v-deep .el-radio__label, ::v-deep .el-radio__label,
::v-deep .el-checkbox__label { ::v-deep .el-checkbox__label {
font-size: 14px; font-size: 14px;
@ -475,10 +506,12 @@ export default {
vertical-align: middle; vertical-align: middle;
display: inline-block; display: inline-block;
} }
::v-deep .item-other-input { ::v-deep .item-other-input {
margin-left: 20px !important; margin-left: 20px !important;
-webkit-tap-highlight-color: rgba(255, 255, 255, 0) !important; -webkit-tap-highlight-color: rgba(255, 255, 255, 0) !important;
} }
::v-deep .item-other-input:focus { ::v-deep .item-other-input:focus {
outline: none !important; outline: none !important;
} }

39
src/views/form/editor/RightPanel.vue

@ -933,12 +933,12 @@
> >
<el-switch v-model="activeData['step-strictly']" /> <el-switch v-model="activeData['step-strictly']" />
</el-form-item> </el-form-item>
<!-- <el-form-item--> <!-- <el-form-item-->
<!-- v-if="activeData.__config__.tag === 'el-cascader'"--> <!-- v-if="activeData.__config__.tag === 'el-cascader'"-->
<!-- label="任选层级"--> <!-- label="任选层级"-->
<!-- >--> <!-- >-->
<!-- <el-switch v-model="activeData.props.props.checkStrictly" />--> <!-- <el-switch v-model="activeData.props.props.checkStrictly" />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item <el-form-item
v-if="activeData.__config__.tag === 'el-cascader'" v-if="activeData.__config__.tag === 'el-cascader'"
label="是否多选" label="是否多选"
@ -990,12 +990,12 @@
> >
<el-switch v-model="activeData.readonly" /> <el-switch v-model="activeData.readonly" />
</el-form-item> </el-form-item>
<!-- <el-form-item--> <!-- <el-form-item-->
<!-- v-if="activeData.disabled !== undefined"--> <!-- v-if="activeData.disabled !== undefined"-->
<!-- label="是否禁用"--> <!-- label="是否禁用"-->
<!-- >--> <!-- >-->
<!-- <el-switch v-model="activeData.disabled" />--> <!-- <el-switch v-model="activeData.disabled" />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item <el-form-item
v-if="activeData.__config__.tag === 'el-select'" v-if="activeData.__config__.tag === 'el-select'"
label="能否搜索" label="能否搜索"
@ -1404,9 +1404,16 @@ export default {
addSelectItem() { addSelectItem() {
let lastItem = _.last(this.activeData.__slot__.options); let lastItem = _.last(this.activeData.__slot__.options);
this.activeData.__slot__.options.push({ this.activeData.__slot__.options.push({
label: '', label: "",
value: lastItem ? lastItem.value === 0 ? _.max(_.values(this.activeData.__slot__.options.map(item => value: lastItem
item.value))) + 1 : lastItem.value + 1 : 1 ? lastItem.value === 0
? _.max(
_.values(
this.activeData.__slot__.options.map((item) => item.value)
)
) + 1
: lastItem.value + 1
: 1,
}); });
}, },
async blukAddSelectItems() { async blukAddSelectItems() {
@ -1617,7 +1624,7 @@ export default {
.right-board { .right-board {
width: 350px; width: 350px;
position: absolute; position: absolute;
right: 17px; right: 0px;
top: 0; top: 0;
padding-top: 3px; padding-top: 3px;
background-color: #fff; background-color: #fff;

36
src/views/form/editor/index.vue

@ -37,7 +37,7 @@
<el-scrollbar class="center-scrollbar"> <el-scrollbar class="center-scrollbar">
<el-row v-if="formConf" :gutter="formConf.gutter" class="center-board-row"> <el-row v-if="formConf" :gutter="formConf.gutter" class="center-board-row">
<el-row align="middle" justify="center" type="flex"> <el-row align="middle" justify="center" type="flex">
<el-col :span="20" class="text-center"> <el-col class="form-head-title">
<h4 class="form-name-text" contenteditable="true" <h4 class="form-name-text" contenteditable="true"
@blur="(event)=>{ @blur="(event)=>{
this.formConf.title=event.target.innerText; this.formConf.title=event.target.innerText;
@ -48,7 +48,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row align="middle" justify="center" type="flex"> <el-row align="middle" justify="center" type="flex">
<el-col :span="23"> <el-col class="form-head-desc">
<Tinymce v-if="editDescription" v-model="formConf.description" <Tinymce v-if="editDescription" v-model="formConf.description"
placeholder="请输入表单描述" placeholder="请输入表单描述"
@blur="editDescription=false" @input="saveProjectInfo" @blur="editDescription=false" @input="saveProjectInfo"
@ -64,7 +64,7 @@
<!-- </p>--> <!-- </p>-->
</el-col> </el-col>
</el-row> </el-row>
<el-divider /> <el-divider class="form-head-divider" />
<el-form <el-form
:disabled="formConf.disabled" :disabled="formConf.disabled"
:label-position="formConf.labelPosition" :label-position="formConf.labelPosition"
@ -89,7 +89,8 @@
/> />
</draggable> </draggable>
<div v-show="!drawingList.length" class="empty-info"> <div v-show="!drawingList.length" class="empty-info">
从左侧拖入或点选组件进行表单设计 <img style="width: 20%" src="@/assets/images/form-bg.png">
<p>从左侧拖入或点选组件进行表单设计</p>
</div> </div>
</el-form> </el-form>
</el-row> </el-row>
@ -420,8 +421,33 @@ export default {
@import '@/assets/styles/form/index'; @import '@/assets/styles/form/index';
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.form-name-text:hover{
.center-board {
.center-board-row {
margin-right: 10px;
}
.form-head-title {
padding: 0 10px;
text-align: center;
.form-name-text:hover{
border: 1px dashed #7b7b7b; border: 1px dashed #7b7b7b;
min-height: 100px; min-height: 100px;
}
}
.form-head-desc {
padding: 0 10px;
}
.form-head-divider {
margin-right: 10px;
margin-left: 10px;
width: auto;
}
} }
</style> </style>

29
src/views/form/index.vue

@ -1,29 +1,22 @@
<template> <template>
<div class="form-index-container"> <div class="form-index-container">
<el-card class="header-container"> <el-card class="header-container">
<el-row align="middle" type="flex"> <el-row align="middle" type="flex" :gutter="5">
<el-col :span="2">
<i class="el-icon-back" @click="$router.back(-1)" /> <i class="el-icon-back" @click="$router.back(-1)" />
</el-col>
<el-col :span="3" :md="6">
<img class="header-logo" src="@/assets/images/indexLogo.svg" @click="$router.push({path:'/home'})"> <img class="header-logo" src="@/assets/images/indexLogo.svg" @click="$router.push({path:'/home'})">
</el-col> <el-col />
<el-col :span="1" :md="3">
<el-button type="primary" icon="el-icon-view" @click="previewDialogVisible=true"> <el-button type="primary" icon="el-icon-view" @click="previewDialogVisible=true">
预览 预览
</el-button> </el-button>
</el-col>
<el-col :span="2" :md="3">
<el-button type="success" icon="el-icon-folder-add" @click="saveProjectAsTemplateHandle"> <el-button type="success" icon="el-icon-folder-add" @click="saveProjectAsTemplateHandle">
保存为模板 保存为模板
</el-button> </el-button>
</el-col>
</el-row> </el-row>
</el-card> </el-card>
<div class="main-container"> <div class="main-container">
<div class="left-menu-container"> <div class="left-menu-container">
<el-menu :collapse="isCollapse" class="el-menu-vertical" <el-menu :collapse="isCollapse" :default-active="defaultActiveMenu"
:default-active="defaultActiveMenu" class="el-menu-vertical"
@select="menuSelectHandle" @select="menuSelectHandle"
> >
<el-menu-item v-for="menuItem in menuItemList" :key="menuItem.route" :index="menuItem.route"> <el-menu-item v-for="menuItem in menuItemList" :key="menuItem.route" :index="menuItem.route">
@ -40,20 +33,23 @@
</div> </div>
<el-dialog <el-dialog
:visible.sync="previewDialogVisible" :visible.sync="previewDialogVisible"
destroy-on-close
fullscreen fullscreen
> >
<pre-view :preview-qrcode="true" /> <pre-view :key="previewKey" :preview-qrcode="true" />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import PreView from '@/views/form/preview' import PreView from '@/views/form/preview'
export default { export default {
name: 'NewIndex', name: 'NewIndex',
components: {PreView}, components: {PreView},
data() { data() {
return { return {
previewKey: +new Date(),
previewDialogVisible: false, previewDialogVisible: false,
defaultActiveMenu: 'editor', defaultActiveMenu: 'editor',
projectKey: null, projectKey: null,
@ -99,6 +95,10 @@ export default {
menuSelectHandle(index) { menuSelectHandle(index) {
this.$router.replace({path: index, query: {key: this.projectKey}}) this.$router.replace({path: index, query: {key: this.projectKey}})
}, },
openPreviewHandle() {
this.previewKey = +new Date()
this.previewDialogVisible = true
},
saveProjectAsTemplateHandle() { saveProjectAsTemplateHandle() {
this.$api.post('/user/project/template/save', {key: this.projectKey}).then(() => { this.$api.post('/user/project/template/save', {key: this.projectKey}).then(() => {
this.msgSuccess('保存成功') this.msgSuccess('保存成功')
@ -132,13 +132,14 @@ export default {
.header-container { .header-container {
width: 100%; width: 100%;
height: 50px; height: 50px;
padding: 0 20px;
.el-icon-back { .el-icon-back {
font-size: 22px; font-size: 22px;
font-weight: 550; font-weight: 550;
cursor: pointer; cursor: pointer;
color: #000; color: #000;
margin-left: 40px; margin-right: 75px;
&:hover { &:hover {
color: rgb(32, 160, 255); color: rgb(32, 160, 255);
@ -192,7 +193,7 @@ export default {
} }
} }
::v-deep.preview-container{ ::v-deep.preview-container {
background-color: #ffffff; background-color: #ffffff;
} }
</style> </style>

32
src/views/form/publish/index.vue

@ -13,7 +13,22 @@
</div> </div>
<div v-if="publishStatus" class="publish-finish-view"> <div v-if="publishStatus" class="publish-finish-view">
<el-row :gutter="10" align="middle" type="flex"> <el-row :gutter="10" align="middle" type="flex">
<el-col :span="20"> <el-col>
<div>
<vue-qr v-if="writeLink" :callback="qrCodeGenSuccess" :size="194"
:text="writeLink"
/>
</div>
<div style="text-align: center;">
<el-link type="primary" @click="()=>{
this.downloadFile('qrcode.png',this.qrCodeUrl)
}"
>
下载分享二维码
</el-link>
</div>
</el-col>
<el-col style="margin-left: 75px;">
<div style="display: flex; justify-content: center;"> <div style="display: flex; justify-content: center;">
<div class="icon-view"> <div class="icon-view">
<i class="el-icon-check success-icon" /> <i class="el-icon-check success-icon" />
@ -52,21 +67,6 @@
</el-col> </el-col>
</el-row> </el-row>
</el-col> </el-col>
<el-col :span="6">
<div>
<vue-qr v-if="writeLink" :callback="qrCodeGenSuccess" :size="194"
:text="writeLink"
/>
</div>
<div style="text-align: center;">
<el-link type="primary" @click="()=>{
this.downloadFile('qrcode.png',this.qrCodeUrl)
}"
>
下载分享二维码
</el-link>
</div>
</el-col>
</el-row> </el-row>
</div> </div>
</div> </div>

295
src/views/form/setting/index.vue

@ -1,11 +1,11 @@
<template> <template>
<el-form ref="setting" :model="userProjectSettingData" :rules="settingRules"> <el-form ref="setting" :model="userProjectSettingData" :rules="settingRules">
<el-row class="project-setting-container" type="flex" justify="center" align="top"> <el-row align="top" class="project-setting-container" justify="center" type="flex">
<el-col :span="5" :offset="3" class="project-setting-view"> <el-col :offset="3" :span="5" class="project-setting-view">
<p class="project-setting-title"> <p class="project-setting-title">
提交设置 提交设置
</p> </p>
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="12"> <el-col :span="12">
<p class="project-setting-label">显示提示图片</p> <p class="project-setting-label">显示提示图片</p>
</el-col> </el-col>
@ -19,8 +19,8 @@
<div v-if="projectSetting.showPromptImg"> <div v-if="projectSetting.showPromptImg">
<div class="block"> <div class="block">
<el-image <el-image
class="submit-prompt-img"
:src="userProjectSettingData.submitPromptImg" :src="userProjectSettingData.submitPromptImg"
class="submit-prompt-img"
fit="cover " fit="cover "
> >
<div slot="error" class="image-slot"> <div slot="error" class="image-slot">
@ -30,16 +30,16 @@
</div> </div>
<el-upload <el-upload
ref="logoUpload" ref="logoUpload"
accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP" :action="getUploadUrl"
:headers="getUploadHeader" :headers="getUploadHeader"
:on-success="uploadSubmitPromptHandle" :on-success="uploadSubmitPromptHandle"
:action="getUploadUrl"
:show-file-list="false" :show-file-list="false"
accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP"
> >
<el-button slot="trigger" size="small" type="text">请上传提示图片 *</el-button> <el-button slot="trigger" size="small" type="text">请上传提示图片 *</el-button>
</el-upload> </el-upload>
</div> </div>
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="12"> <el-col :span="12">
<p class="project-setting-label">显示提示文字</p> <p class="project-setting-label">显示提示文字</p>
</el-col> </el-col>
@ -56,13 +56,13 @@
<el-row v-if="projectSetting.showPromptText"> <el-row v-if="projectSetting.showPromptText">
<el-col :span="20" class="setting-input"> <el-col :span="20" class="setting-input">
<el-input v-model="userProjectSettingData.submitPromptText" <el-input v-model="userProjectSettingData.submitPromptText"
:show-word-limit="true"
:maxlength="50" :maxlength="50"
:show-word-limit="true"
@change="saveUserProjectSetting" @change="saveUserProjectSetting"
/> />
</el-col> </el-col>
</el-row> </el-row>
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="12"> <el-col :span="12">
<p class="project-setting-label">跳转网页地址</p> <p class="project-setting-label">跳转网页地址</p>
</el-col> </el-col>
@ -80,14 +80,14 @@
<el-col :span="20" class="setting-input"> <el-col :span="20" class="setting-input">
<el-input <el-input
v-model="userProjectSettingData.submitJumpUrl" v-model="userProjectSettingData.submitJumpUrl"
placeholder="https://demo.tduckapp.com"
:show-word-limit="true"
:maxlength="50" :maxlength="50"
:show-word-limit="true"
placeholder="https://demo.tduckapp.com"
@change="saveUserProjectSetting" @change="saveUserProjectSetting"
/> />
</el-col> </el-col>
</el-row> </el-row>
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="12"> <el-col :span="12">
<p class="project-setting-label">公开反馈结果</p> <p class="project-setting-label">公开反馈结果</p>
</el-col> </el-col>
@ -105,7 +105,7 @@
<p class="project-setting-title"> <p class="project-setting-title">
回收设置 回收设置
</p> </p>
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="12"> <el-col :span="12">
<p class="project-setting-label">只在微信中填写</p> <p class="project-setting-label">只在微信中填写</p>
</el-col> </el-col>
@ -116,7 +116,7 @@
/> />
</el-col> </el-col>
</el-row> </el-row>
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="12"> <el-col :span="12">
<p class="project-setting-label">定时收集表单</p> <p class="project-setting-label">定时收集表单</p>
</el-col> </el-col>
@ -133,19 +133,19 @@
</el-col> </el-col>
</el-row> </el-row>
<div v-if="projectSetting.timingCollectForm"> <div v-if="projectSetting.timingCollectForm">
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="5"> <el-col :span="5">
<p class="project-setting-sub-label">收集时间</p> <p class="project-setting-sub-label">收集时间</p>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-date-picker <el-date-picker
v-model="userProjectSettingData.timedCollectionBeginTime" v-model="userProjectSettingData.timedCollectionBeginTime"
type="datetime"
style="width: 100%; border: none;"
align="center" align="center"
class="collection-date-picker" class="collection-date-picker"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择开始时间" placeholder="选择开始时间"
style="width: 100%; border: none;"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
@change="saveUserProjectSetting" @change="saveUserProjectSetting"
/> />
</el-col> </el-col>
@ -153,44 +153,44 @@
<el-col :span="8"> <el-col :span="8">
<el-date-picker <el-date-picker
v-model="userProjectSettingData.timedCollectionEndTime" v-model="userProjectSettingData.timedCollectionEndTime"
type="datetime"
align="center" align="center"
class="collection-date-picker" class="collection-date-picker"
placeholder="结束日期"
style="width: 100%; border: none;" style="width: 100%; border: none;"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="结束日期"
@change="saveUserProjectSetting" @change="saveUserProjectSetting"
/> />
</el-col> </el-col>
</el-row> </el-row>
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="8"> <el-col :span="8">
<p class="project-setting-sub-label">未启用提示语</p> <p class="project-setting-sub-label">未启用提示语</p>
</el-col> </el-col>
<el-col :span="15"> <el-col :span="15">
<el-input v-model="userProjectSettingData.timedNotEnabledPromptText" class="setting-input" <el-input v-model="userProjectSettingData.timedNotEnabledPromptText" :maxlength="50"
style="width: 80%;"
:show-word-limit="true" :show-word-limit="true"
:maxlength="50" class="setting-input"
style="width: 80%;"
@change="saveUserProjectSetting" @change="saveUserProjectSetting"
/> />
</el-col> </el-col>
</el-row> </el-row>
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="8"> <el-col :span="8">
<p class="project-setting-sub-label">停用后提示语</p> <p class="project-setting-sub-label">停用后提示语</p>
</el-col> </el-col>
<el-col :span="15"> <el-col :span="15">
<el-input v-model="userProjectSettingData.timedDeactivatePromptText" class="setting-input" <el-input v-model="userProjectSettingData.timedDeactivatePromptText" :maxlength="50"
style="width: 80%;"
:show-word-limit="true" :show-word-limit="true"
:maxlength="50" class="setting-input"
style="width: 80%;"
@change="saveUserProjectSetting" @change="saveUserProjectSetting"
/> />
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="12"> <el-col :span="12">
<p class="project-setting-label">定时定量表单</p> <p class="project-setting-label">定时定量表单</p>
</el-col> </el-col>
@ -207,19 +207,19 @@
</el-col> </el-col>
</el-row> </el-row>
<div v-if="projectSetting.timingQuantitativeForm"> <div v-if="projectSetting.timingQuantitativeForm">
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="5"> <el-col :span="5">
<p class="project-setting-sub-label">收集时间</p> <p class="project-setting-sub-label">收集时间</p>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-date-picker <el-date-picker
v-model="userProjectSettingData.timedCollectionBeginTime" v-model="userProjectSettingData.timedCollectionBeginTime"
type="datetime"
style="width: 100%; border: none;"
align="center" align="center"
class="collection-date-picker" class="collection-date-picker"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择开始时间" placeholder="选择开始时间"
style="width: 100%; border: none;"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
@change="saveUserProjectSetting" @change="saveUserProjectSetting"
/> />
</el-col> </el-col>
@ -227,73 +227,95 @@
<el-col :span="8"> <el-col :span="8">
<el-date-picker <el-date-picker
v-model="userProjectSettingData.timedCollectionEndTime" v-model="userProjectSettingData.timedCollectionEndTime"
type="datetime"
align="center" align="center"
class="collection-date-picker" class="collection-date-picker"
placeholder="结束日期"
style="width: 100%; border: none;" style="width: 100%; border: none;"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="结束日期"
@change="saveUserProjectSetting" @change="saveUserProjectSetting"
/> />
</el-col> </el-col>
</el-row> </el-row>
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="8"> <el-col :span="8">
<p class="project-setting-sub-label">未启用提示语</p> <p class="project-setting-sub-label">未启用提示语</p>
</el-col> </el-col>
<el-col :span="15"> <el-col :span="15">
<el-input v-model="userProjectSettingData.timedNotEnabledPromptText" class="setting-input" <el-input v-model="userProjectSettingData.timedNotEnabledPromptText" :maxlength="50"
style="width: 80%;"
:show-word-limit="true" :show-word-limit="true"
:maxlength="50" class="setting-input"
style="width: 80%;"
@change="saveUserProjectSetting" @change="saveUserProjectSetting"
/> />
</el-col> </el-col>
</el-row> </el-row>
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="8"> <el-col :span="8">
<p class="project-setting-sub-label">停用后提示语</p> <p class="project-setting-sub-label">停用后提示语</p>
</el-col> </el-col>
<el-col :span="15"> <el-col :span="15">
<el-input v-model="userProjectSettingData.timedDeactivatePromptText" class="setting-input" <el-input v-model="userProjectSettingData.timedDeactivatePromptText" :maxlength="50"
style="width: 80%;"
:show-word-limit="true" :show-word-limit="true"
:maxlength="50" class="setting-input"
style="width: 80%;"
@change="saveUserProjectSetting" @change="saveUserProjectSetting"
/> />
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="projectSetting.timingQuantitativeForm" type="flex" align="middle"> <el-row v-if="projectSetting.timingQuantitativeForm" align="middle" type="flex">
<el-col :span="8"> <el-col :span="8">
<p class="project-setting-sub-label">定量表单填写数量</p> <p class="project-setting-sub-label">定量表单填写数量</p>
</el-col> </el-col>
<el-col :span="15"> <el-col :span="15">
<el-input v-model="userProjectSettingData.timedQuantitativeQuantity" class="setting-input" <el-input v-model="userProjectSettingData.timedQuantitativeQuantity" class="setting-input"
style="width: 80%;"
oninput="value=value.replace(/[^\d]/g,'')" oninput="value=value.replace(/[^\d]/g,'')"
style="width: 80%;"
@change="saveUserProjectSetting" @change="saveUserProjectSetting"
/> />
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<div v-if="projectSetting.timingQuantitativeForm"> <div v-if="projectSetting.timingQuantitativeForm">
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="8"> <el-col :span="8">
<p class="project-setting-sub-label">收集完成后提示</p> <p class="project-setting-sub-label">收集完成后提示</p>
</el-col> </el-col>
<el-col :span="15"> <el-col :span="15">
<el-input v-model="userProjectSettingData.timedEndPromptText" class="setting-input" <el-input v-model="userProjectSettingData.timedEndPromptText" :maxlength="50"
style="width: 80%;"
:show-word-limit="true" :show-word-limit="true"
:maxlength="50" class="setting-input"
style="width: 80%;"
@change="saveUserProjectSetting" @change="saveUserProjectSetting"
/> />
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="12"> <el-col :span="12">
<p class="project-setting-label">每人限制填写1次</p> <p class="project-setting-label ">
每个微信仅填写一次
</p>
</el-col>
<el-col :span="12">
<el-switch
v-model="userProjectSettingData.wxWriteOnce"
@change="()=>{
this.userProjectSettingData.recordWxUser=true
this.userProjectSettingData.wxWrite=true
this.saveUserProjectSetting()
}"
/>
</el-col>
</el-row>
<el-row align="middle" type="flex">
<el-col :span="12">
<p class="project-setting-label ">
每人限制填写1次
<el-tooltip class="item" content="根据IP地址限制填写" effect="dark" placement="top-start">
<i class="el-icon-warning" />
</el-tooltip>
</p>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-switch <el-switch
@ -302,7 +324,7 @@
/> />
</el-col> </el-col>
</el-row> </el-row>
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="12"> <el-col :span="12">
<p class="project-setting-label">每人每天限制填写1次</p> <p class="project-setting-label">每人每天限制填写1次</p>
</el-col> </el-col>
@ -314,22 +336,22 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="userProjectSettingData.everyoneDayWriteOnce||userProjectSettingData.everyoneWriteOnce" <el-row v-if="userProjectSettingData.everyoneDayWriteOnce||userProjectSettingData.everyoneWriteOnce"
type="flex"
align="middle" align="middle"
type="flex"
> >
<el-col :span="8"> <el-col :span="8">
<p class="project-setting-sub-label">重复填写后提示</p> <p class="project-setting-sub-label">重复填写后提示</p>
</el-col> </el-col>
<el-col :span="15"> <el-col :span="15">
<el-input v-model="userProjectSettingData.writeOncePromptText" class="setting-input" <el-input v-model="userProjectSettingData.writeOncePromptText" :maxlength="50"
style="width: 80%;"
:show-word-limit="true" :show-word-limit="true"
:maxlength="50" class="setting-input"
style="width: 80%;"
@change="saveUserProjectSetting" @change="saveUserProjectSetting"
/> />
</el-col> </el-col>
</el-row> </el-row>
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="12"> <el-col :span="12">
<p class="project-setting-label">新反馈提醒我</p> <p class="project-setting-label">新反馈提醒我</p>
</el-col> </el-col>
@ -338,7 +360,7 @@
</el-col> </el-col>
</el-row> </el-row>
<div v-if="projectSetting.newFeedbackRemind"> <div v-if="projectSetting.newFeedbackRemind">
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="5"> <el-col :span="5">
<p class="project-setting-sub-label">发邮件提醒我</p> <p class="project-setting-sub-label">发邮件提醒我</p>
</el-col> </el-col>
@ -352,21 +374,21 @@
/> />
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="projectSetting.newFeedbackRemindEmail" type="flex" align="middle"> <el-row v-if="projectSetting.newFeedbackRemindEmail" align="middle" type="flex">
<el-col :span="5" :offset="3"> <el-col :offset="3" :span="5">
<p class="project-setting-sub-label">请填写邮箱</p> <p class="project-setting-sub-label">请填写邮箱</p>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item prop="newWriteNotifyEmail"> <el-form-item prop="newWriteNotifyEmail">
<el-input v-model="userProjectSettingData.newWriteNotifyEmail" class="setting-input" <el-input v-model="userProjectSettingData.newWriteNotifyEmail" class="setting-input"
style="width: 80%;"
placeholder="多个邮箱用 ; 隔开" placeholder="多个邮箱用 ; 隔开"
style="width: 80%;"
@change="saveUserProjectSetting" @change="saveUserProjectSetting"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="5"> <el-col :span="5">
<p class="project-setting-sub-label">发微信提醒我</p> <p class="project-setting-sub-label">发微信提醒我</p>
</el-col> </el-col>
@ -386,8 +408,8 @@
</p> </p>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="userProjectSettingData.newWriteNotifyWx" type="flex" align="middle"> <el-row v-if="userProjectSettingData.newWriteNotifyWx" align="middle" type="flex">
<el-col :span="5" :offset="3"> <el-col :offset="3" :span="5">
<p class="project-setting-sub-label">提醒人</p> <p class="project-setting-sub-label">提醒人</p>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -398,17 +420,17 @@
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<el-dialog title="微信扫描二维码订阅" <el-dialog :visible.sync="dialogSubNotifyVisible"
title="微信扫描二维码订阅"
width="400px" width="400px"
:visible.sync="dialogSubNotifyVisible"
> >
<el-image <el-image
style="width: 150px; height: 150px;"
:src="subNotifyWxQrCode" :src="subNotifyWxQrCode"
fit="fill" fit="fill"
style="width: 150px; height: 150px;"
/> />
</el-dialog> </el-dialog>
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="12"> <el-col :span="12">
<p class="project-setting-label">记录微信用户个人信息</p> <p class="project-setting-label">记录微信用户个人信息</p>
</el-col> </el-col>
@ -432,7 +454,7 @@
<p class="project-setting-title"> <p class="project-setting-title">
分享设置 分享设置
</p> </p>
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="12"> <el-col :span="12">
<p class="project-setting-label">自定义分享图标</p> <p class="project-setting-label">自定义分享图标</p>
</el-col> </el-col>
@ -443,7 +465,7 @@
/> />
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="projectSetting.customizeShareIcon" type="flex" align="middle"> <el-row v-if="projectSetting.customizeShareIcon" align="middle" type="flex">
<el-col :span="10"> <el-col :span="10">
<p class="project-setting-label"> <p class="project-setting-label">
请上传分享图片 * 请上传分享图片 *
@ -453,16 +475,16 @@
<el-col :span="12"> <el-col :span="12">
<el-upload <el-upload
ref="logoUpload" ref="logoUpload"
accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP" :action="getUploadUrl"
:headers="getUploadHeader" :headers="getUploadHeader"
:on-success="uploadShareImgHandle" :on-success="uploadShareImgHandle"
:action="getUploadUrl"
:show-file-list="false" :show-file-list="false"
accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP"
> >
<div class="block"> <div class="block">
<el-image <el-image
class="share-img"
:src="userProjectSettingData.shareImg" :src="userProjectSettingData.shareImg"
class="share-img"
fit="cover " fit="cover "
> >
<div slot="error" class="image-slot"> <div slot="error" class="image-slot">
@ -473,7 +495,7 @@
</el-upload> </el-upload>
</el-col> </el-col>
</el-row> </el-row>
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="12"> <el-col :span="12">
<p class="project-setting-label">自定义分享标题</p> <p class="project-setting-label">自定义分享标题</p>
</el-col> </el-col>
@ -484,8 +506,8 @@
/> />
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="projectSetting.customizeShareTitle" type="flex" <el-row v-if="projectSetting.customizeShareTitle" align="middle"
align="middle" type="flex"
> >
<el-col :span="8"> <el-col :span="8">
<p class="project-setting-sub-label">请输入标题</p> <p class="project-setting-sub-label">请输入标题</p>
@ -493,13 +515,13 @@
<el-col :span="15"> <el-col :span="15">
<el-input <el-input
v-model="userProjectSettingData.shareTitle" v-model="userProjectSettingData.shareTitle"
:show-word-limit="true"
:maxlength="50" :maxlength="50"
:show-word-limit="true"
class="setting-input" style="width: 80%;" @change="saveUserProjectSetting" class="setting-input" style="width: 80%;" @change="saveUserProjectSetting"
/> />
</el-col> </el-col>
</el-row> </el-row>
<el-row type="flex" align="middle"> <el-row align="middle" type="flex">
<el-col :span="12"> <el-col :span="12">
<p class="project-setting-label">自定义分享描述</p> <p class="project-setting-label">自定义分享描述</p>
</el-col> </el-col>
@ -507,8 +529,8 @@
<el-switch v-model="projectSetting.customizeShareDesc" /> <el-switch v-model="projectSetting.customizeShareDesc" />
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="projectSetting.customizeShareDesc" type="flex" <el-row v-if="projectSetting.customizeShareDesc" align="middle"
align="middle" type="flex"
> >
<el-col :span="8"> <el-col :span="8">
<p class="project-setting-sub-label">请输入描述</p> <p class="project-setting-sub-label">请输入描述</p>
@ -516,8 +538,8 @@
<el-col :span="15"> <el-col :span="15">
<el-input <el-input
v-model="userProjectSettingData.shareDesc" v-model="userProjectSettingData.shareDesc"
:show-word-limit="true"
:maxlength="50" :maxlength="50"
:show-word-limit="true"
class="setting-input" style="width: 80%;" @change="saveUserProjectSetting" class="setting-input" style="width: 80%;" @change="saveUserProjectSetting"
/> />
</el-col> </el-col>
@ -525,24 +547,27 @@
<div <div
v-if="userProjectSettingData.shareDesc||userProjectSettingData.shareTitle||userProjectSettingData.shareImg" v-if="userProjectSettingData.shareDesc||userProjectSettingData.shareTitle||userProjectSettingData.shareImg"
> >
<p>通知卡片预览</p>
<div class="share-preview"> <div class="share-preview">
<div style="flex: 1" />
<div class="share-preview-msg"> <div class="share-preview-msg">
<div> <div class="share-preview-msg-box">
<p class="share-preview-msg-title"> <p class="share-preview-msg-title">
{{ userProjectSettingData.shareTitle }} {{ userProjectSettingData.shareTitle }}
</p> </p>
<div class="share-preview-info">
<p class="share-preview-msg-desc"> <p class="share-preview-msg-desc">
{{ userProjectSettingData.shareDesc }} {{ userProjectSettingData.shareDesc }}
</p> </p>
<div class="share-preview-img-box">
<img v-if="userProjectSettingData.shareImg" :src="userProjectSettingData.shareImg" class="share-preview-img">
</div>
</div> </div>
<div>
<img v-if="userProjectSettingData.shareImg" :src="userProjectSettingData.shareImg"
class="share-preview-img"
>
</div> </div>
<div class="share-preview-msg-angle" />
</div> </div>
<div> <div class="share-preview-avatar">
<img class="share-user-avatar" :src="getUserInfo.avatar"> <img :src="getUserInfo.avatar" class="share-user-avatar">
</div> </div>
</div> </div>
</div> </div>
@ -582,6 +607,7 @@ export default {
}, },
userProjectSettingData: { userProjectSettingData: {
submitPromptImg: '', submitPromptImg: '',
wxWriteOnce: false,
submitPromptText: '提交成功 !', submitPromptText: '提交成功 !',
submitJumpUrl: '', submitJumpUrl: '',
wxWrite: false, wxWrite: false,
@ -731,6 +757,7 @@ export default {
margin: 0; margin: 0;
background-color: #f7f7f7; background-color: #f7f7f7;
} }
.project-setting-view { .project-setting-view {
height: 100%; height: 100%;
line-height: 20px; line-height: 20px;
@ -743,6 +770,7 @@ export default {
margin-right: 10px; margin-right: 10px;
padding: 10px; padding: 10px;
} }
.project-setting-title { .project-setting-title {
color: rgba(16, 16, 16, 100); color: rgba(16, 16, 16, 100);
font-size: 18px; font-size: 18px;
@ -750,12 +778,14 @@ export default {
font-weight: 550; font-weight: 550;
margin-left: 20px; margin-left: 20px;
} }
.project-setting-label { .project-setting-label {
color: rgba(16, 16, 16, 100); color: rgba(16, 16, 16, 100);
font-size: 14px; font-size: 14px;
text-align: left; text-align: left;
line-height: 20px; line-height: 20px;
} }
.project-setting-sub-label { .project-setting-sub-label {
color: rgba(144, 147, 149, 100); color: rgba(144, 147, 149, 100);
font-size: 14px; font-size: 14px;
@ -763,6 +793,7 @@ export default {
margin-left: 2px; margin-left: 2px;
line-height: 20px; line-height: 20px;
} }
.submit-prompt-img { .submit-prompt-img {
width: 80%; width: 80%;
height: 117px; height: 117px;
@ -772,14 +803,17 @@ export default {
justify-items: center; justify-items: center;
justify-content: center; justify-content: center;
} }
.sub-user-view { .sub-user-view {
position: relative; position: relative;
width: 60px; width: 60px;
cursor: pointer; cursor: pointer;
} }
.sub-user-view:hover .sub-user-delete { .sub-user-view:hover .sub-user-delete {
display: block; display: block;
} }
.sub-user-delete { .sub-user-delete {
position: absolute; position: absolute;
right: -6px; right: -6px;
@ -794,6 +828,7 @@ export default {
line-height: 18px; line-height: 18px;
display: none; display: none;
} }
.share-img { .share-img {
width: 123px; width: 123px;
height: 117px; height: 117px;
@ -803,68 +838,120 @@ export default {
justify-items: center; justify-items: center;
justify-content: center; justify-content: center;
} }
.share-preview { .share-preview {
width: 360px;
height: 162px; height: 162px;
margin: 0 auto; margin: 0 auto;
border-radius: 5px; border-radius: 5px;
background-color: rgba(210, 210, 210, 42); background-color: #0001;
border: 1px solid rgba(255, 255, 255, 100); border: 1px solid rgba(255, 255, 255, 100);
display: flex; display: flex;
align-content: center; align-content: center;
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
} }
.share-preview-msg { .share-preview-msg {
width: 210px; width: 210px;
height: 88px; margin-right: 25px;
border-radius: 5px; border-radius: 5px;
background-color: white; background-color: white;
color: rgba(16, 16, 16, 100); color: rgba(16, 16, 16, 100);
box-shadow: 0 0 3px 0 rgba(157, 158, 162, 100); box-shadow: 0 0 3px 0 rgba(157, 158, 162, 100);
padding: 5px; padding: 7px 10px 10px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-items: center; justify-items: center;
justify-content: center; justify-content: center;
position: relative; position: relative;
z-index: 1;
}
.share-preview-msg-box {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
overflow: hidden;
} }
.share-preview-msg::after {
.share-preview-msg::after,.share-preview-msg-angle {
content: ''; content: '';
border: 10px solid transparent; border: 8px solid transparent;
border-left-color: #fff; border-style: solid;
border-left-color: rgba(157, 158, 162, 0.397);
position: absolute; position: absolute;
right: -18px; right: -15px;
top: 5px; top: 16px;
width: 0; width: 0;
z-index: -1;
}
.share-preview-msg-angle {
border: 7px solid transparent;
border-left-color: #ffffff;
right: -13px;
top: 17px;
z-index: 1;
} }
.share-preview-msg-title { .share-preview-msg-title {
line-height: 22px; line-height: 22px;
height: 25px; margin: 0;
margin: 3px;
color: rgba(16, 16, 16, 100); color: rgba(16, 16, 16, 100);
font-size: 14px; font-size: 14px;
text-align: left; text-align: left;
overflow : hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
} }
.share-preview-info {
flex: 1;
display: flex;
margin-top: 5px;
}
.share-preview-msg-desc { .share-preview-msg-desc {
margin: 3px; flex: 1;
height: 100%;
margin: 0;
color: rgba(144, 147, 153, 100); color: rgba(144, 147, 153, 100);
font-size: 12px; font-size: 12px;
line-height: 20px; line-height: 20px;
height: 60px;
width: 155px;
text-align: left; text-align: left;
overflow : hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.share-preview-img-box {
display: flex;
align-items: flex-end;
margin-left: 5px;
} }
.share-preview-img { .share-preview-img {
width: 49px; width: 49px;
height: 46px; height: 46px;
margin-right: 5px;
} }
.share-preview-avatar {
margin-right: 30px;
margin-top: -35px;
}
.share-user-avatar { .share-user-avatar {
width: 49px; width: 49px;
height: 49px; height: 49px;
border-radius: 6px; border-radius: 6px;
} }
::v-deep .setting-input input { ::v-deep .setting-input input {
border: none; border: none;
border-bottom: 1px solid rgba(187, 187, 187, 100); border-bottom: 1px solid rgba(187, 187, 187, 100);
@ -872,11 +959,13 @@ export default {
line-height: 20px; line-height: 20px;
height: 20px; height: 20px;
} }
::v-deep .collection-date-picker input { ::v-deep .collection-date-picker input {
border: none; border: none;
border-bottom: 1px solid rgba(187, 187, 187, 100); border-bottom: 1px solid rgba(187, 187, 187, 100);
border-radius: 0; border-radius: 0;
} }
::v-deep .el-form-item--mini.el-form-item, ::v-deep .el-form-item--mini.el-form-item,
.el-form-item--small.el-form-item { .el-form-item--small.el-form-item {
margin: 0; margin: 0;

27
src/views/form/statistics/item.vue

@ -2,6 +2,15 @@
<div> <div>
<div v-if="projectItemData.type=='UPLOAD'"> <div v-if="projectItemData.type=='UPLOAD'">
<div v-if="getItemValue['files']"> <div v-if="getItemValue['files']">
<!-- 图片文件渲染图片栏 -->
<template v-if="getItemValue['type'] == 'image'">
<span v-for="file in getItemValue['files']" :key="JSON.stringify(file)">
<el-image class="item-thumbnail-image-preview" :src="file.url" :preview-src-list="getItemValue['files'].map( img => img.url)" lazy />
</span>
</template>
<!-- 其他文件渲染文件下载链接 -->
<template v-else>
<el-link <el-link
v-for="file in getItemValue['files']" v-for="file in getItemValue['files']"
@ -11,11 +20,15 @@
> >
<span> {{ file.fileName }}</span> <span> {{ file.fileName }}</span>
</el-link> </el-link>
</template>
</div> </div>
<span v-else>/</span> <span v-else>/</span>
</div> </div>
<div v-else-if="projectItemData.type=='SIGN_PAD'">
<el-image class="item-thumbnail-image-preview" :src="getItemValue || ''" :preview-src-list="[getItemValue || '']" lazy />
</div>
<div v-else> <div v-else>
{{ getItemValue ? getItemValue : '/' }} {{ getItemValue || '/' }}
</div> </div>
</div> </div>
</template> </template>
@ -43,6 +56,7 @@ export default {
}, },
computed: { computed: {
processData() { processData() {
console.log('数据', this.projectItemData)
return this.resultData ? this.resultData['processData'] : {} return this.resultData ? this.resultData['processData'] : {}
}, },
getItemValue() { getItemValue() {
@ -57,3 +71,14 @@ export default {
} }
</script> </script>
<style scoped>
.item-thumbnail-image-preview {
width: 106px;
height: 106px;
margin-right: 15px;
margin-bottom: 15px;
border: 1px solid #EBEEF5;
background: #0001;
}
</style>

40
src/views/form/statistics/list.vue

@ -47,6 +47,7 @@
{{ scope.row[col] }} {{ scope.row[col] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-for="col in otherCustomColumns" v-for="col in otherCustomColumns"
:key="col" :label="projectItemColumns[col]" :key="col" :label="projectItemColumns[col]"
@ -56,6 +57,16 @@
{{ scope.row['processData'][col] }} {{ scope.row['processData'][col] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
v-for="col in fixedFormTailColumns" :key="`t${col}`"
:label="fixedDefaultLabelFormTailColumn[col]"
>
<template slot-scope="scope">
{{ scope.row[col] }}
</template>
</el-table-column>
<el-table-column <el-table-column
:render-header="renderHeader" :render-header="renderHeader"
fixed="right" fixed="right"
@ -123,6 +134,14 @@
</el-col> </el-col>
</el-row> </el-row>
</el-checkbox-group> </el-checkbox-group>
<el-divider />
<el-checkbox-group v-model="checkedFixedTailCustomColumns">
<el-row>
<el-col v-for="(val, key) in fixedDefaultLabelFormTailColumn" :key="key" :span="4">
<el-checkbox :label="key">{{ val }}</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="customColumnDialogVisible = false"> </el-button> <el-button @click="customColumnDialogVisible = false"> </el-button>
<el-button type="primary" @click="saveStatisticsCheckedColumns"> </el-button> <el-button type="primary" @click="saveStatisticsCheckedColumns"> </el-button>
@ -139,8 +158,12 @@ import ResultItem from './item'
import DataFilter from './filter' import DataFilter from './filter'
import {getCheckedColumn, saveCheckedColumn} from '@/utils/db' import {getCheckedColumn, saveCheckedColumn} from '@/utils/db'
const fixedDefaultFormColumn = ['serialNumber', 'submitAddress', 'createTime'] //
const fixedDefaultLabelFormColumn = {serialNumber: '提交序号', submitAddress: '提交地址', createTime: '提交时间'} const fixedDefaultFormColumn = ['serialNumber']
const fixedDefaultLabelFormColumn = {serialNumber: '提交序号'}
//
const fixedDefaultFormTailColumn = ['submitAddress', 'createTime']
const fixedDefaultLabelFormTailColumn = { submitAddress: '提交地址', createTime: '提交时间'}
export default { export default {
name: 'ProjectStatisticsList', name: 'ProjectStatisticsList',
@ -156,9 +179,12 @@ export default {
checkedFilterColumns: [], checkedFilterColumns: [],
// //
fixedCustomColumns: fixedDefaultFormColumn, fixedCustomColumns: fixedDefaultFormColumn,
fixedFormTailColumns: fixedDefaultFormTailColumn,
// //
checkedFixedCustomColumns: fixedDefaultFormColumn, checkedFixedCustomColumns: fixedDefaultFormColumn,
fixedDefaultLabelFormColumn: fixedDefaultLabelFormColumn, fixedDefaultLabelFormColumn: fixedDefaultLabelFormColumn,
checkedFixedTailCustomColumns: fixedDefaultFormTailColumn,
fixedDefaultLabelFormTailColumn: fixedDefaultLabelFormTailColumn,
// //
checkOtherCustomColumns: [], checkOtherCustomColumns: [],
otherCustomColumns: [], otherCustomColumns: [],
@ -223,9 +249,11 @@ export default {
this.customColumnDialogVisible = false this.customColumnDialogVisible = false
this.fixedCustomColumns = this.checkedFixedCustomColumns this.fixedCustomColumns = this.checkedFixedCustomColumns
this.otherCustomColumns = this.checkOtherCustomColumns this.otherCustomColumns = this.checkOtherCustomColumns
this.fixedFormTailColumns = this.checkedFixedTailCustomColumns
saveCheckedColumn(this.projectKey, { saveCheckedColumn(this.projectKey, {
fixedCustomColumns: this.fixedCustomColumns, fixedCustomColumns: this.fixedCustomColumns,
otherCustomColumns: this.otherCustomColumns otherCustomColumns: this.otherCustomColumns,
fixedCustomTailColumns: this.fixedFormTailColumns
}) })
}, },
getDbCheckedColumns() { getDbCheckedColumns() {
@ -233,7 +261,7 @@ export default {
if (!checkedColumn) { if (!checkedColumn) {
return return
} }
let {fixedCustomColumns, otherCustomColumns} = checkedColumn let {fixedCustomColumns, otherCustomColumns, fixedCustomTailColumns} = checkedColumn
if (fixedCustomColumns) { if (fixedCustomColumns) {
this.fixedCustomColumns = fixedCustomColumns this.fixedCustomColumns = fixedCustomColumns
this.checkedFixedCustomColumns = fixedCustomColumns this.checkedFixedCustomColumns = fixedCustomColumns
@ -242,6 +270,10 @@ export default {
this.otherCustomColumns = otherCustomColumns this.otherCustomColumns = otherCustomColumns
this.checkOtherCustomColumns = otherCustomColumns this.checkOtherCustomColumns = otherCustomColumns
} }
if (fixedCustomTailColumns) {
this.fixedCustomTailColumns = fixedCustomTailColumns
this.checkedFixedTailCustomColumns = fixedCustomTailColumns
}
}, },
downloadProjectResultFile() { downloadProjectResultFile() {
if (!this.total) { if (!this.total) {

17
src/views/form/write/index.vue

@ -84,13 +84,13 @@ export default {
} }
] ]
}, },
created() { async created() {
let key = this.$route.query.key || this.$route.params.key let key = this.$route.query.key || this.$route.params.key
this.projectConfig.projectKey = key this.projectConfig.projectKey = key
let wxCode = getQueryString('code') let wxCode = getQueryString('code')
if (wxCode) { if (wxCode) {
this.wxAuthorizationCode = wxCode this.wxAuthorizationCode = wxCode
this.getWxAuthorizationUserInfo() await this.getWxAuthorizationUserInfo()
} }
this.getWxAuthorizationUrl() this.getWxAuthorizationUrl()
this.queryProjectSettingStatus() this.queryProjectSettingStatus()
@ -115,7 +115,12 @@ export default {
}, },
queryProjectSettingStatus() { queryProjectSettingStatus() {
// //
this.$api.get('/user/project/setting-status', {params: {projectKey: this.projectConfig.projectKey}}).then(res => { this.$api.get('/user/project/setting-status', {
params: {
projectKey: this.projectConfig.projectKey,
wxOpenId: this.wxUserInfo ? this.wxUserInfo.openid : ''
}
}).then(res => {
if (res.msg) { if (res.msg) {
this.writeNotStartPrompt = res.msg this.writeNotStartPrompt = res.msg
this.writeStatus = 0 this.writeStatus = 0
@ -125,14 +130,13 @@ export default {
getWxAuthorizationUserInfo() { getWxAuthorizationUserInfo() {
let wxAuthorizationCode = this.wxAuthorizationCode let wxAuthorizationCode = this.wxAuthorizationCode
// code // code
this.$api.get('/authorization/user/info', { this.$api.get('/wx/jsapi/authorization/user/info', {
params: { params: {
code: wxAuthorizationCode code: wxAuthorizationCode
} }
}).then(res => { }).then(res => {
if (res.data) { if (res.data) {
this.wxUserInfo = res.data this.wxUserInfo = res.data
alert(res.data)
} }
}) })
@ -233,7 +237,6 @@ export default {
if (res.data && res.data.wxWrite) { if (res.data && res.data.wxWrite) {
// //
if (res.data.recordWxUser && !this.wxAuthorizationCode) { if (res.data.recordWxUser && !this.wxAuthorizationCode) {
console.log(this.wxAuthorizationUrl)
location.href = this.wxAuthorizationUrl location.href = this.wxAuthorizationUrl
} else { } else {
this.onlyWxOpenHandle() this.onlyWxOpenHandle()
@ -266,6 +269,8 @@ export default {
'submitOs': ua.os.name, 'submitOs': ua.os.name,
'submitBrowser': ua.browser.name, 'submitBrowser': ua.browser.name,
'submitUa': ua, 'submitUa': ua,
'wxUserInfo': this.wxUserInfo,
'wxOpenId': this.wxUserInfo ? this.wxUserInfo.openid : '',
'originalData': data.formModel, 'originalData': data.formModel,
'processData': data.labelFormModel 'processData': data.labelFormModel
}).then(() => { }).then(() => {

4
src/views/project/my/index.vue

@ -105,7 +105,7 @@
</el-button> </el-button>
</el-popconfirm> </el-popconfirm>
<el-popconfirm <el-popconfirm
v-if="p.status==3" v-if="p.status!=2"
title="确定删除该项目吗?" title="确定删除该项目吗?"
@confirm="deleteProject(p.key)" @confirm="deleteProject(p.key)"
> >
@ -200,7 +200,7 @@
</el-button> </el-button>
</el-popconfirm> </el-popconfirm>
<el-popconfirm <el-popconfirm
v-if="scope.row.status==3" v-if="scope.row.status!=2"
title="确定删除该项目吗?" title="确定删除该项目吗?"
@confirm="deleteProject(scope.row.key)" @confirm="deleteProject(scope.row.key)"
> >

Loading…
Cancel
Save