diff --git a/.eslintignore b/.eslintignore
index 14ae794..f488173 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -3,8 +3,5 @@ node_modules/
babel.config.js
vue.config.js
.eslintrc.js
-src/components/echarts/china.js
-src/components/render/
-src/components/verifition/
-src/components/tinymce/
-src/views/form/editor/RightPanel.vue
+src
+
diff --git a/package.json b/package.json
index 0ee7564..aee15fd 100644
--- a/package.json
+++ b/package.json
@@ -71,5 +71,19 @@
"hooks": {
"pre-commit": "lint-staged"
}
+ },
+ "eslintConfig": {
+ "root": true,
+ "env": {
+ "node": true
+ },
+ "extends": [
+ "plugin:vue/essential"
+ ],
+ "rules": {},
+ "parserOptions": {
+ "parser": "babel-eslint"
+ }
}
+
}
diff --git a/src/components/generator/config.js b/src/components/generator/config.js
index 87d25ac..1d1898a 100644
--- a/src/components/generator/config.js
+++ b/src/components/generator/config.js
@@ -22,6 +22,8 @@ export const inputComponents = [
// 组件的自定义配置
typeId: 'INPUT',
__config__: {
+ name: 'input',
+ moduleType: 'input',
label: '单行文本',
labelWidth: null,
showLabel: true,
@@ -55,6 +57,8 @@ export const inputComponents = [
{
typeId: 'TEXTAREA',
__config__: {
+ name: 'textarea',
+ moduleType: 'input',
label: '多行文本',
labelWidth: null,
showLabel: true,
@@ -83,6 +87,8 @@ export const inputComponents = [
{
typeId: 'NUMBER_INPUT',
__config__: {
+ name: 'number',
+ moduleType: 'input',
label: '计数器',
showLabel: true,
changeTag: true,
@@ -112,6 +118,8 @@ export const selectComponents = [
{
typeId: 'SELECT',
__config__: {
+ name: 'select',
+ moduleType: 'choose',
label: '下拉选择',
showLabel: true,
labelWidth: null,
@@ -143,6 +151,8 @@ export const selectComponents = [
{
typeId: 'CASCADER',
__config__: {
+ name: 'cascader',
+ moduleType: 'choose',
label: '级联选择',
url: 'https://www.fastmock.site/mock/f8d7a54fb1e60561e2f720d5a810009d/fg/cascaderList',
method: 'get',
@@ -189,6 +199,8 @@ export const selectComponents = [
{
typeId: 'RADIO',
__config__: {
+ name: 'radio',
+ moduleType: 'choose',
label: '单选框组',
labelWidth: null,
showLabel: true,
@@ -221,6 +233,8 @@ export const selectComponents = [
{
typeId: 'CHECKBOX',
__config__: {
+ name: 'checkbox',
+ moduleType: 'choose',
label: '多选框组',
tag: 'el-checkbox-group',
tagIcon: 'checkbox',
@@ -255,10 +269,13 @@ export const selectComponents = [
{
typeId: 'SWITCH',
__config__: {
+ name: 'switch',
+ moduleType: 'choose',
label: '开关',
tag: 'el-switch',
tagIcon: 'switch',
defaultValue: false,
+ showDefaultValue: false,
span: 24,
showRegList: false,
showLabel: true,
@@ -276,11 +293,15 @@ export const selectComponents = [
'active-color': null,
'inactive-color': null,
'active-value': true,
- 'inactive-value': false
+ 'show-active-value': false,
+ 'inactive-value': false,
+ 'show-inactive-value': false
},
{
typeId: 'SLIDER',
__config__: {
+ name: 'slider',
+ moduleType: 'choose',
label: '滑块',
tag: 'el-slider',
tagIcon: 'slider',
@@ -305,6 +326,8 @@ export const selectComponents = [
{
typeId: 'TIME',
__config__: {
+ name: 'time',
+ moduleType: 'choose',
label: '时间选择',
tag: 'el-time-picker',
tagIcon: 'time',
@@ -332,6 +355,8 @@ export const selectComponents = [
{
typeId: 'TIME_RANGE',
__config__: {
+ name: 'timeRange',
+ moduleType: 'choose',
label: '时间范围',
tag: 'el-time-picker',
tagIcon: 'time-range',
@@ -358,6 +383,8 @@ export const selectComponents = [
{
typeId: 'DATE',
__config__: {
+ name: 'date',
+ moduleType: 'choose',
label: '日期选择',
tag: 'el-date-picker',
tagIcon: 'date',
@@ -383,6 +410,8 @@ export const selectComponents = [
{
typeId: 'DATE_RANGE',
__config__: {
+ name: 'dateRange',
+ moduleType: 'choose',
label: '日期范围',
tag: 'el-date-picker',
tagIcon: 'date-range',
@@ -411,6 +440,8 @@ export const selectComponents = [
{
typeId: 'RATE',
__config__: {
+ name: 'rate',
+ moduleType: 'choose',
label: '评分',
tag: 'el-rate',
tagIcon: 'rate',
@@ -428,6 +459,7 @@ export const selectComponents = [
style: {},
max: 5,
'allow-half': false,
+ 'show-allow-half': false,
'show-text': false,
'show-score': false,
disabled: false
@@ -435,6 +467,8 @@ export const selectComponents = [
{
typeId: 'COLOR',
__config__: {
+ name: 'color',
+ moduleType: 'choose',
label: '颜色选择',
tag: 'el-color-picker',
tagIcon: 'color',
@@ -457,6 +491,8 @@ export const selectComponents = [
{
typeId: 'UPLOAD',
__config__: {
+ name: 'upload',
+ moduleType: 'choose',
label: '上传',
tag: 'el-upload',
tagIcon: 'upload',
@@ -494,6 +530,8 @@ export const imageComponents = [
{
typeId: 'IMAGE',
__config__: {
+ name: 'image',
+ moduleType: 'image',
label: '图片展示',
showLabel: false,
displayType: true,
@@ -521,6 +559,8 @@ export const imageComponents = [
{
typeId: 'IMAGE_CAROUSEL',
__config__: {
+ name: 'imageCarousel',
+ moduleType: 'image',
label: '图片轮播',
showLabel: false,
displayType: true,
@@ -549,6 +589,8 @@ export const imageComponents = [
{
typeId: 'IMAGE_SELECT',
__config__: {
+ name: 'imageSelect',
+ moduleType: 'image',
label: '图片选择',
showLabel: true,
labelWidth: null,
@@ -579,6 +621,8 @@ export const assistComponents = [
{
typeId: 'DESC_TEXT',
__config__: {
+ name: 'descText',
+ moduleType: 'assist',
label: '文字描述',
defaultValue: '描述文字',
displayType: true,
@@ -601,6 +645,8 @@ export const assistComponents = [
{
typeId: 'DIVIDER',
__config__: {
+ name: 'divider',
+ moduleType: 'assist',
label: '分割线',
defaultValue: '',
displayType: true,
@@ -624,6 +670,8 @@ export const assistComponents = [
{
typeId: 'SIGN_PAD',
__config__: {
+ name: 'signPad',
+ moduleType: 'assist',
label: '手写签名',
defaultValue: '',
showLabel: true,
@@ -646,6 +694,8 @@ export const assistComponents = [
{
typeId: 'PAGINATION',
__config__: {
+ name: 'page',
+ moduleType: 'assist',
label: '分页',
defaultValue: '分页',
displayType: true,
@@ -676,6 +726,8 @@ export const personalInfoComponents = [
{
typeId: 'INPUT',
__config__: {
+ name: 'phone',
+ moduleType: 'concat',
label: '手机号',
labelWidth: null,
showLabel: true,
@@ -712,6 +764,8 @@ export const personalInfoComponents = [
{
typeId: 'INPUT',
__config__: {
+ name: 'email',
+ moduleType: 'concat',
label: '邮箱',
labelWidth: null,
showLabel: true,
@@ -748,6 +802,8 @@ export const personalInfoComponents = [
{
typeId: 'INPUT',
__config__: {
+ name: 'idCard',
+ moduleType: 'concat',
label: '身份证',
labelWidth: null,
showLabel: true,
@@ -784,6 +840,8 @@ export const personalInfoComponents = [
{
typeId: 'PROVINCE_CITY',
__config__: {
+ name: 'provinceCity',
+ moduleType: 'concat',
label: '省市联动',
labelWidth: null,
showLabel: true,
@@ -804,6 +862,8 @@ export const personalInfoComponents = [
{
typeId: 'INPUT_MAP',
__config__: {
+ name: 'location',
+ moduleType: 'concat',
label: '地理位置',
labelWidth: null,
showLabel: true,
diff --git a/src/utils/convert.js b/src/utils/convert.js
index 4973d88..4c36c6c 100644
--- a/src/utils/convert.js
+++ b/src/utils/convert.js
@@ -17,6 +17,8 @@ import {
*/
export function formItemConvertData(item, projectKey) {
let data = {
+ 'itemKey': item.__config__.name,
+ 'moduleType': item.__config__.moduleType,
'type': item.typeId,
'formItemId': item.__config__.formId,
'label': item.__config__.label,
@@ -72,6 +74,8 @@ export function dbDataConvertForItemJson(data) {
jsonItem.sort = data.sort
jsonItem.typeId = data.type
jsonItem.displayType = data.displayType
+ jsonItem.__config__.name = data.itemKey
+ jsonItem.__config__.moduleType = data.moduleType
jsonItem.__config__.span = data.span
jsonItem.__config__.formId = data.formItemId
jsonItem.__config__.label = data.label
diff --git a/src/views/form/editor/RightPanel.vue b/src/views/form/editor/RightPanel.vue
index c86f86f..a936fb9 100644
--- a/src/views/form/editor/RightPanel.vue
+++ b/src/views/form/editor/RightPanel.vue
@@ -219,6 +219,7 @@
恭喜您,发布成功!
+提交设置
-显示提示图片
显示提示文字
跳转网页地址
-回收设置
-只在微信中填写
-定时收集表单
收集时间:
未启用提示语:
停用后提示语:
定时定量表单
收集时间:
未启用提示语:
停用后提示语:
定量表单填写数量:
收集完成后提示:
- 每个微信仅填写一次 -
-
每人限制填写1次(用户id)
-
- 每人限制填写1次(IP地址)
-
每人每天限制填写1次
-
+ 每人限制填写1次(IP地址)
+
重复填写后提示:
-新反馈提醒我
+每人每天限制填写1次
发邮件提醒我
-记录微信用户个人信息
-- 分享设置 +
创建时间:{{ p.createdTime | formatDate }}