Browse Source

Merge branch 'dev_ljj' of http://git.elinkit.com.cn:7070/r/tduck-front into dev_ljj

old
13176889840 4 years ago
parent
commit
6bb0a39fbd
  1. 6
      src/components/parser/Parser.vue
  2. 133
      src/views/form/setting/index.vue
  3. 50
      src/views/form/write/index.vue

6
src/components/parser/Parser.vue

@ -260,14 +260,12 @@ function setValueLabel (event, config, scheme) {
console.log(scheme) console.log(scheme)
// input // input
let tagOptionKey = processType[config.tag] let tagOptionKey = processType[config.tag]
debugger
if (tagOptionKey) { if (tagOptionKey) {
if (event instanceof Array) { if (event instanceof Array) {
//
//
if (!event.includes(0) && config.tag != 'el-cascader') { if (!event.includes(0) && config.tag != 'el-cascader') {
// other // other
this.$set(this[this.formConf.labelFormModel], `${scheme.__vModel__}other`, '') this.$set(this[this.formConf.labelFormModel], `${scheme.__vModel__}other`, '')

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

@ -1,41 +1,34 @@
<template> <template>
<el-form ref="setting" <el-form ref="setting"
:model="userProjectSettingData" :model="userProjectSettingData"
:rules="settingRules" :rules="settingRules">
>
<el-row align="top" <el-row align="top"
class="project-setting-container" class="project-setting-container"
justify="center" justify="center"
type="flex" type="flex">
>
<el-col :offset="3" <el-col :offset="3"
:span="5" :span="5"
class="project-setting-view" class="project-setting-view">
>
<p class="project-setting-title"> <p class="project-setting-title">
提交设置 提交设置
</p> </p>
<el-row align="middle" <el-row align="middle"
type="flex" 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>
<el-col :span="12"> <el-col :span="12">
<el-switch v-model="projectSetting.showPromptImg" <el-switch v-model="projectSetting.showPromptImg"
@change="()=>{this.userProjectSettingData.submitPromptImg=''}" @change="()=>{this.userProjectSettingData.submitPromptImg=''}" />
/>
</el-col> </el-col>
</el-row> </el-row>
<div v-if="projectSetting.showPromptImg"> <div v-if="projectSetting.showPromptImg">
<div class="block"> <div class="block">
<el-image :src="userProjectSettingData.submitPromptImg" <el-image :src="userProjectSettingData.submitPromptImg"
class="submit-prompt-img" class="submit-prompt-img"
fit="cover " fit="cover ">
>
<div slot="error" <div slot="error"
class="image-slot" class="image-slot">
>
<i class="el-icon-picture-outline" /> <i class="el-icon-picture-outline" />
</div> </div>
</el-image> </el-image>
@ -45,19 +38,16 @@
:headers="getUploadHeader" :headers="getUploadHeader"
:on-success="uploadSubmitPromptHandle" :on-success="uploadSubmitPromptHandle"
:show-file-list="false" :show-file-list="false"
accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP" accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP">
>
<el-button slot="trigger" <el-button slot="trigger"
size="small" size="small"
type="text" type="text">
>
请上传提示图片 * 请上传提示图片 *
</el-button> </el-button>
</el-upload> </el-upload>
</div> </div>
<el-row align="middle" <el-row align="middle"
type="flex" 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>
@ -66,19 +56,16 @@
@change="()=>{ @change="()=>{
this.userProjectSettingData.submitPromptText='' this.userProjectSettingData.submitPromptText=''
this.saveUserProjectSetting() this.saveUserProjectSetting()
}" }" />
/>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="projectSetting.showPromptText"> <el-row v-if="projectSetting.showPromptText">
<el-col :span="20" <el-col :span="20"
class="setting-input" class="setting-input">
>
<el-input v-model="userProjectSettingData.submitPromptText" <el-input v-model="userProjectSettingData.submitPromptText"
:maxlength="50" :maxlength="50"
:show-word-limit="true" :show-word-limit="true"
@change="saveUserProjectSetting" @change="saveUserProjectSetting" />
/>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row align="middle" <!-- <el-row align="middle"
@ -118,8 +105,7 @@
</el-row> --> </el-row> -->
</el-col> </el-col>
<el-col :span="6" <el-col :span="6"
class="project-setting-view text-center" class="project-setting-view text-center">
>
<p class="project-setting-title"> <p class="project-setting-title">
回收设置 回收设置
</p> </p>
@ -134,8 +120,7 @@
</el-col> </el-col>
</el-row> --> </el-row> -->
<el-row align="middle" <el-row align="middle"
type="flex" 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>
@ -146,14 +131,12 @@
this.clearFieldHandle(['timedCollectionBeginTime','timedCollectionEndTime' this.clearFieldHandle(['timedCollectionBeginTime','timedCollectionEndTime'
,'timedNotEnabledPromptText','timedDeactivatePromptText']) ,'timedNotEnabledPromptText','timedDeactivatePromptText'])
this.saveUserProjectSetting() this.saveUserProjectSetting()
}" }" />
/>
</el-col> </el-col>
</el-row> </el-row>
<div v-if="projectSetting.timingCollectForm"> <div v-if="projectSetting.timingCollectForm">
<el-row align="middle" <el-row align="middle"
type="flex" 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>
@ -165,8 +148,7 @@
style="width: 100%; border: none;" style="width: 100%; border: none;"
type="datetime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@change="saveUserProjectSetting" @change="saveUserProjectSetting" />
/>
</el-col> </el-col>
<el-col :span="1"><span> </span></el-col> <el-col :span="1"><span> </span></el-col>
<el-col :span="8"> <el-col :span="8">
@ -177,13 +159,11 @@
style="width: 100%; border: none;" style="width: 100%; border: none;"
type="datetime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@change="saveUserProjectSetting" @change="saveUserProjectSetting" />
/>
</el-col> </el-col>
</el-row> </el-row>
<el-row align="middle" <el-row align="middle"
type="flex" 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>
@ -193,13 +173,11 @@
:show-word-limit="true" :show-word-limit="true"
class="setting-input" class="setting-input"
style="width: 80%;" style="width: 80%;"
@change="saveUserProjectSetting" @change="saveUserProjectSetting" />
/>
</el-col> </el-col>
</el-row> </el-row>
<el-row align="middle" <el-row align="middle"
type="flex" 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>
@ -209,14 +187,12 @@
:show-word-limit="true" :show-word-limit="true"
class="setting-input" class="setting-input"
style="width: 80%;" style="width: 80%;"
@change="saveUserProjectSetting" @change="saveUserProjectSetting" />
/>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<el-row align="middle" <el-row align="middle"
type="flex" 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>
@ -227,14 +203,12 @@
this.clearFieldHandle(['timedCollectionBeginTime','timedCollectionEndTime' this.clearFieldHandle(['timedCollectionBeginTime','timedCollectionEndTime'
,'timedNotEnabledPromptText','timedDeactivatePromptText','timedQuantitativeQuantity','timedEndPromptText']) ,'timedNotEnabledPromptText','timedDeactivatePromptText','timedQuantitativeQuantity','timedEndPromptText'])
this.saveUserProjectSetting() this.saveUserProjectSetting()
}" }" />
/>
</el-col> </el-col>
</el-row> </el-row>
<div v-if="projectSetting.timingQuantitativeForm"> <div v-if="projectSetting.timingQuantitativeForm">
<el-row align="middle" <el-row align="middle"
type="flex" 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>
@ -246,8 +220,7 @@
style="width: 100%; border: none;" style="width: 100%; border: none;"
type="datetime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@change="saveUserProjectSetting" @change="saveUserProjectSetting" />
/>
</el-col> </el-col>
<el-col :span="1"><span> </span></el-col> <el-col :span="1"><span> </span></el-col>
<el-col :span="8"> <el-col :span="8">
@ -258,13 +231,11 @@
style="width: 100%; border: none;" style="width: 100%; border: none;"
type="datetime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@change="saveUserProjectSetting" @change="saveUserProjectSetting" />
/>
</el-col> </el-col>
</el-row> </el-row>
<el-row align="middle" <el-row align="middle"
type="flex" 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>
@ -274,13 +245,11 @@
:show-word-limit="true" :show-word-limit="true"
class="setting-input" class="setting-input"
style="width: 80%;" style="width: 80%;"
@change="saveUserProjectSetting" @change="saveUserProjectSetting" />
/>
</el-col> </el-col>
</el-row> </el-row>
<el-row align="middle" <el-row align="middle"
type="flex" 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>
@ -290,14 +259,12 @@
:show-word-limit="true" :show-word-limit="true"
class="setting-input" class="setting-input"
style="width: 80%;" style="width: 80%;"
@change="saveUserProjectSetting" @change="saveUserProjectSetting" />
/>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="projectSetting.timingQuantitativeForm" <el-row v-if="projectSetting.timingQuantitativeForm"
align="middle" align="middle"
type="flex" 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>
@ -306,15 +273,13 @@
class="setting-input" class="setting-input"
oninput="value=value.replace(/[^\d]/g,'')" oninput="value=value.replace(/[^\d]/g,'')"
style="width: 80%;" 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 align="middle" <el-row align="middle"
type="flex" 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>
@ -324,8 +289,7 @@
:show-word-limit="true" :show-word-limit="true"
class="setting-input" class="setting-input"
style="width: 80%;" style="width: 80%;"
@change="saveUserProjectSetting" @change="saveUserProjectSetting" />
/>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -346,24 +310,21 @@
</el-col> </el-col>
</el-row> --> </el-row> -->
<el-row align="middle" <el-row align="middle"
type="flex" type="flex">
>
<el-col :span="12"> <el-col :span="12">
<p class="project-setting-label "> <p class="project-setting-label ">
每人限制填写1次用户id 每人限制填写1次用户id
<el-tooltip class="item" <el-tooltip class="item"
content="根据用户ID限制填写" content="根据用户ID限制填写"
effect="dark" effect="dark"
placement="top-start" placement="top-start">
>
<i class="el-icon-warning" /> <i class="el-icon-warning" />
</el-tooltip> </el-tooltip>
</p> </p>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-switch v-model="userProjectSettingData.everyoneWriteOnceByUId" <el-switch v-model="userProjectSettingData.everyoneWriteOnceByUId"
@change="saveUserProjectSetting" @change="saveUserProjectSetting" />
/>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row align="middle" <!-- <el-row align="middle"
@ -385,18 +346,16 @@
</el-col> </el-col>
</el-row> --> </el-row> -->
<el-row align="middle" <el-row align="middle"
type="flex" 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>
<el-col :span="12"> <el-col :span="12">
<el-switch v-model="userProjectSettingData.everyoneDayWriteOnce" <el-switch v-model="userProjectSettingData.everyoneDayWriteOnce"
@change="saveUserProjectSetting" @change="saveUserProjectSetting" />
/>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row v-if="userProjectSettingData.everyoneWriteOnceByUId||userProjectSettingData.everyoneWriteOnceByIp||userProjectSettingData.everyoneWriteOnce" <el-row v-if="userProjectSettingData.everyoneWriteOnceByUId||userProjectSettingData.everyoneWriteOnceByIp||userProjectSettingData.everyoneWriteOnce"
align="middle" align="middle"
type="flex"> type="flex">
<el-col :span="8"> <el-col :span="8">
@ -410,7 +369,7 @@
style="width: 80%;" style="width: 80%;"
@change="saveUserProjectSetting" /> @change="saveUserProjectSetting" />
</el-col> </el-col>
</el-row> --> </el-row>
<!-- <el-row align="middle" <!-- <el-row align="middle"
type="flex"> type="flex">
<el-col :span="12"> <el-col :span="12">
@ -491,12 +450,10 @@
</div> --> </div> -->
<el-dialog :visible.sync="dialogSubNotifyVisible" <el-dialog :visible.sync="dialogSubNotifyVisible"
title="微信扫描二维码订阅" title="微信扫描二维码订阅"
width="400px" width="400px">
>
<el-image :src="subNotifyWxQrCode" <el-image :src="subNotifyWxQrCode"
fit="fill" fit="fill"
style="width: 150px; height: 150px;" style="width: 150px; height: 150px;" />
/>
</el-dialog> </el-dialog>
<!-- <el-row align="middle" <!-- <el-row align="middle"
type="flex"> type="flex">

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

@ -1,22 +1,24 @@
<template> <template>
<div class="write-container"> <div class="write-container">
<h1 id="inActiveTime" style="display: none;" /> <h1 id="inActiveTime"
<div v-if="writeStatus==0" class="title-icon-view"> style="display: none;" />
<div v-if="writeStatus==0"
class="title-icon-view">
<div class="icon-view"> <div class="icon-view">
<i class="el-icon-check success-icon" /> <i class="el-icon-check success-icon" />
</div> </div>
<p v-if="writeNotStartPrompt" style="text-align: center;"> <p v-if="writeNotStartPrompt"
style="text-align: center;">
<span v-if="writeNotStartPrompt">{{ writeNotStartPrompt }}</span> <span v-if="writeNotStartPrompt">{{ writeNotStartPrompt }}</span>
</p> </p>
</div> </div>
<div v-if="writeStatus==1"> <div v-if="writeStatus==1">
<project-form <project-form v-if="projectConfig.projectKey"
v-if="projectConfig.projectKey"
:project-config="projectConfig" :project-config="projectConfig"
@submit="submitForm" @submit="submitForm" />
/>
</div> </div>
<div v-if="writeStatus==2" class="title-icon-view"> <div v-if="writeStatus==2"
class="title-icon-view">
<div class="icon-view"> <div class="icon-view">
<i class="el-icon-check success-icon" /> <i class="el-icon-check success-icon" />
</div> </div>
@ -25,13 +27,13 @@
<span v-else>{{ globalDefaultValue.projectSubmitPromptText }}</span> <span v-else>{{ globalDefaultValue.projectSubmitPromptText }}</span>
</p> </p>
<div> <div>
<el-image <el-image v-if="userProjectSetting.submitPromptImg"
v-if="userProjectSetting.submitPromptImg"
:src="userProjectSetting.submitPromptImg" :src="userProjectSetting.submitPromptImg"
fit="cover" fit="cover" />
/>
</div> </div>
<el-button v-if="userProjectSetting.publicResult" type="primary" @click="openPublicResultHandle"> <el-button v-if="userProjectSetting.publicResult"
type="primary"
@click="openPublicResultHandle">
查看数据 查看数据
</el-button> </el-button>
</div> </div>
@ -73,7 +75,14 @@ export default {
wxAuthorizationUrl: '', wxAuthorizationUrl: '',
wxAuthorizationCode: '', wxAuthorizationCode: '',
wxUserInfo: {}, wxUserInfo: {},
wxSignature: {} wxSignature: {},
//
clientType: '',//:gov:resi:oper
orgId: '',//Id(agencyId;deptId;gridId)
orgName: '',//---
orgType: '',//(:agency;:dept;:grid)
realName: '',//
} }
}, },
metaInfo: { metaInfo: {
@ -85,6 +94,12 @@ export default {
] ]
}, },
async created () { async created () {
this.clientType = this.$route.query.clientType
this.orgId = this.$route.query.orgId
this.orgName = this.$route.query.orgName
this.orgType = this.$route.query.orgType
this.realName = this.$route.query.realName
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')
@ -272,7 +287,12 @@ export default {
'wxUserInfo': this.wxUserInfo, 'wxUserInfo': this.wxUserInfo,
'wxOpenId': this.wxUserInfo ? this.wxUserInfo.openid : '', 'wxOpenId': this.wxUserInfo ? this.wxUserInfo.openid : '',
'originalData': data.formModel, 'originalData': data.formModel,
'processData': data.labelFormModel 'processData': data.labelFormModel,
'clientType': this.clientType,//:gov:resi:oper
'orgId': this.orgId,//Id(agencyId;deptId;gridId)
'orgName': this.orgName,//---
'orgType': this.orgType,//(:agency;:dept;:grid)
'realName': this.realName,//
}).then(() => { }).then(() => {
this.writeStatus = 2 this.writeStatus = 2
if (this.userProjectSetting.submitJumpUrl) { if (this.userProjectSetting.submitJumpUrl) {

Loading…
Cancel
Save