Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-operate-sys-cscec
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fulixin
dsk-operate-sys-cscec
Commits
5f4811ac
Commit
5f4811ac
authored
Jan 12, 2024
by
tianhongyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增邮箱联想组件
parent
0a35751c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
92 additions
and
16 deletions
+92
-16
package.json
dsk-operate-ui/package.json
+1
-0
index.vue
dsk-operate-ui/src/components/DskEmailInput/index.vue
+45
-0
custom-design-options.js
dsk-operate-ui/src/utils/generator/custom-design-options.js
+22
-13
CustomFormDesign.vue
...ent/components/CustomForm/components/CustomFormDesign.vue
+3
-0
SubfieldItem.vue
...agement/components/CustomForm/components/SubfieldItem.vue
+12
-3
SubfieldModule.vue
...ement/components/CustomForm/components/SubfieldModule.vue
+9
-0
No files found.
dsk-operate-ui/package.json
View file @
5f4811ac
...
...
@@ -29,6 +29,7 @@
"@form-create/element-ui"
:
"^2.5.33"
,
"@riophae/vue-treeselect"
:
"0.4.0"
,
"@vue/composition-api"
:
"^1.7.2"
,
"async-validator"
:
"^4.2.5"
,
"axios"
:
"0.24.0"
,
"clipboard"
:
"2.0.8"
,
"core-js"
:
"^3.32.2"
,
...
...
dsk-operate-ui/src/components/DskEmailInput/index.vue
0 → 100644
View file @
5f4811ac
<
template
>
<div
class=
"dsk-email-input-container"
>
</div>
</
template
>
<
script
>
export
default
{
name
:
"dskEmailInput"
,
props
:
{
emailValue
:
{
required
:
true
,
type
:
String
,
default
:
""
}
},
model
:
{
prop
:
"emailValue"
,
event
:
"update:emailValue"
},
data
()
{
return
{
};
},
//可访问data属性
created
()
{
},
//计算集
computed
:
{
},
//方法集
methods
:
{
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.dsk-email-input-container
{
height
:
32px
;
width
:
100%
;
position
:
relative
;
}
</
style
>
dsk-operate-ui/src/utils/generator/custom-design-options.js
View file @
5f4811ac
...
...
@@ -8,7 +8,7 @@ export const subfieldModuleTemplate = {
defaultSubfieldModuleName
:
""
,
subfieldModuleName
:
""
,
subfieldModuleNameRules
:
{
trigger
:
[
"blur"
,
"change"
],
trigger
:
[
"blur"
],
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
&&
!
value
?.
toString
()?.
trim
())
{
return
callback
(
new
Error
(
"请输入分栏名称"
));
...
...
@@ -41,7 +41,8 @@ export const defaultComOptions = [
// 展示label
label
:
"单行文本"
,
// 组件宽度
width
:
100
width
:
100
,
isError
:
false
},
// 组件属性
componentAttribute
:
{
...
...
@@ -70,7 +71,8 @@ export const defaultComOptions = [
// 展示label
label
:
"多行文本"
,
// 组件宽度
width
:
100
width
:
100
,
isError
:
false
},
// 组件属性
componentAttribute
:
{
...
...
@@ -106,7 +108,8 @@ export const defaultComOptions = [
width
:
100
,
selectOptions
:
[],
// 是否多选
isMultiple
:
false
isMultiple
:
false
,
isError
:
false
},
// 组件属性
componentAttribute
:
{
...
...
@@ -135,7 +138,8 @@ export const defaultComOptions = [
// 展示label
label
:
"日期/时间"
,
// 组件宽度
width
:
100
width
:
100
,
isError
:
false
},
// 组件属性
componentAttribute
:
{
...
...
@@ -157,7 +161,7 @@ export const defaultComOptions = [
formAttribute
:
{
// 验证规则
rules
:
{
trigger
:
[
"blur"
,
"change"
],
trigger
:
[
"blur"
],
validator
:
(
rule
,
value
,
callback
)
=>
{
const
phoneReg
=
/^1
[
3-9
]\d{9}
$/
;
if
(
value
&&
!
phoneReg
.
test
(
value
))
{
...
...
@@ -167,7 +171,7 @@ export const defaultComOptions = [
}
},
requiredRules
:
{
trigger
:
[
"blur"
,
"change"
],
trigger
:
[
"blur"
],
validator
:
(
rule
,
value
,
callback
)
=>
{
const
phoneReg
=
/^1
[
3-9
]\d{9}
$/
;
if
(
!
value
&&
!
value
?.
toString
()?.
trim
())
{
...
...
@@ -186,7 +190,8 @@ export const defaultComOptions = [
// 展示label
label
:
"电话"
,
// 组件宽度
width
:
100
width
:
100
,
isError
:
false
},
// 组件属性
componentAttribute
:
{
...
...
@@ -208,8 +213,9 @@ export const defaultComOptions = [
formAttribute
:
{
// 验证规则
rules
:
{
trigger
:
[
"blur"
,
"change"
],
trigger
:
[
"blur"
],
validator
:
(
rule
,
value
,
callback
)
=>
{
console
.
log
(
"value"
,
value
);
if
(
value
&&
!
validEmail
(
value
))
{
return
callback
(
new
Error
(
`请输入正确的电子邮箱`
));
}
...
...
@@ -217,7 +223,7 @@ export const defaultComOptions = [
}
},
requiredRules
:
{
trigger
:
[
"blur"
,
"change"
],
trigger
:
[
"blur"
],
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
&&
!
value
?.
toString
()?.
trim
())
{
return
callback
(
new
Error
(
`请输入电子邮箱`
));
...
...
@@ -235,7 +241,8 @@ export const defaultComOptions = [
// 展示label
label
:
"电子邮箱"
,
// 组件宽度
width
:
100
width
:
100
,
isError
:
false
},
// 组件属性
componentAttribute
:
{
...
...
@@ -266,7 +273,8 @@ export const defaultComOptions = [
width
:
100
,
limit
:
-
1
,
astrict
:
false
,
fileList
:
[]
fileList
:
[],
isError
:
false
},
// 组件属性
componentAttribute
:
{
...
...
@@ -297,7 +305,8 @@ export const defaultComOptions = [
width
:
100
,
limit
:
-
1
,
astrict
:
false
,
fileList
:
[]
fileList
:
[],
isError
:
false
},
// 组件属性
componentAttribute
:
{
...
...
dsk-operate-ui/src/views/consultingOrgManagement/components/CustomForm/components/CustomFormDesign.vue
View file @
5f4811ac
...
...
@@ -132,6 +132,9 @@ export default {
//可访问data属性
created
()
{
this
.
initModule
();
}
,
beforeDestroy
()
{
}
,
//计算集
computed
:
{
...
...
dsk-operate-ui/src/views/consultingOrgManagement/components/CustomForm/components/SubfieldItem.vue
View file @
5f4811ac
...
...
@@ -2,7 +2,7 @@
<div
class=
"subfield-item-container"
:class=
"classCreate(comChildModuleInfo.comType)"
:style=
"styles"
@
click=
"activeSubfieldItem"
>
<img
src=
"@/assets/images/consultingAgencyManagement/customForm/icon_drag@2x.png"
alt=
""
class=
"subfield-module-item-dragg-target-icon"
>
<el-form-item
class=
"subfield-module-form-item"
:class=
"
{'is-required': comChildModuleInfo.formAttribute.required}"
:label="comChildModuleInfo.formAttribute.label" :
rules="comChildModuleInfo.formAttribute.rules" :
prop="propValue">
:label="comChildModuleInfo.formAttribute.label" :prop="propValue">
<!-- 单行文本类型 -->
<el-input
v-model=
"comChildModuleInfo.componentAttribute.value"
:placeholder=
"comChildModuleInfo.componentAttribute.placeholder"
clearable
v-if=
"comChildModuleInfo.comType == 'text'"
:disabled=
"isDisabled"
></el-input>
...
...
@@ -24,8 +24,8 @@
<el-input
v-model=
"comChildModuleInfo.componentAttribute.value"
:placeholder=
"comChildModuleInfo.componentAttribute.placeholder"
clearable
v-if=
"comChildModuleInfo.comType == 'phone'"
:disabled=
"isDisabled"
></el-input>
<!-- 电子邮箱类型 -->
<
el-input
v-model=
"comChildModuleInfo.componentAttribute.value"
:placeholder=
"comChildModuleInfo.componentAttribute.placeholder"
clearable
v-if=
"comChildModuleInfo.comType == 'email'"
:disabled=
"isDisabled"
></e
l-input>
<
dsk-email-input
v-model=
"comChildModuleInfo.componentAttribute.value"
:placeholder=
"comChildModuleInfo.componentAttribute.placeholder"
clearable
:disabled=
"isDisabled"
v-if=
"comChildModuleInfo.comType == 'email'"
></dsk-emai
l-input>
<!-- 图片类型 -->
</el-form-item>
...
...
@@ -36,8 +36,13 @@
</
template
>
<
script
>
import
{
cloneDeep
}
from
"lodash-es"
;
import
Schema
from
"async-validator"
;
import
DskEmailInput
from
"@/components/DskEmailInput"
;
export
default
{
name
:
"subfieldItem"
,
components
:
{
DskEmailInput
},
props
:
{
childModuleInfo
:
Object
,
parentUid
:
String
,
...
...
@@ -205,6 +210,10 @@ export default {
.el-form-item__label
{
line-height
:
22px
;
}
.el-form-item__content
{
line-height
:
32px
;
height
:
unset
;
}
.el-textarea
{
.el-textarea__inner
{
resize
:
unset
;
...
...
dsk-operate-ui/src/views/consultingOrgManagement/components/CustomForm/components/SubfieldModule.vue
View file @
5f4811ac
...
...
@@ -150,6 +150,15 @@ export default {
flex
:
1
;
.el-form-item__content
{
line-height
:
32px
;
height
:
32px
;
.el-input
{
line-height
:
32px
;
height
:
32px
;
.el-input__suffix
{
display
:
flex
;
align-items
:
center
;
}
}
}
.el-input
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment