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)
// input
let tagOptionKey = processType[config.tag]
debugger
if (tagOptionKey) {
if (event instanceof Array) {
//
//
if (!event.includes(0) && config.tag != 'el-cascader') {
// other
this.$set(this[this.formConf.labelFormModel], `${scheme.__vModel__}other`, '')

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

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

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

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

Loading…
Cancel
Save