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
9d78a339
Commit
9d78a339
authored
Jan 15, 2024
by
tianhongyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
6a7365db
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
22 deletions
+75
-22
custom-design-options.js
dsk-operate-ui/src/utils/generator/custom-design-options.js
+17
-9
CustomFormDesign.vue
...ent/components/CustomForm/components/CustomFormDesign.vue
+54
-8
SetFieldOption.vue
...ement/components/CustomForm/components/SetFieldOption.vue
+1
-2
projectDetail.vue
...gement/components/EnterpriseList/detail/projectDetail.vue
+3
-3
No files found.
dsk-operate-ui/src/utils/generator/custom-design-options.js
View file @
9d78a339
...
...
@@ -42,7 +42,8 @@ export const defaultComOptions = [
label
:
"单行文本"
,
// 组件宽度
width
:
100
,
isError
:
false
isError
:
false
,
allowDefaultValue
:
true
},
// 组件属性
componentAttribute
:
{
...
...
@@ -72,7 +73,8 @@ export const defaultComOptions = [
label
:
"多行文本"
,
// 组件宽度
width
:
100
,
isError
:
false
isError
:
false
,
allowDefaultValue
:
true
},
// 组件属性
componentAttribute
:
{
...
...
@@ -109,7 +111,8 @@ export const defaultComOptions = [
selectOptions
:
[],
// 是否多选
isMultiple
:
false
,
isError
:
false
isError
:
false
,
allowDefaultValue
:
false
},
// 组件属性
componentAttribute
:
{
...
...
@@ -139,7 +142,8 @@ export const defaultComOptions = [
label
:
"日期/时间"
,
// 组件宽度
width
:
100
,
isError
:
false
isError
:
false
,
allowDefaultValue
:
false
},
// 组件属性
componentAttribute
:
{
...
...
@@ -191,7 +195,8 @@ export const defaultComOptions = [
label
:
"电话"
,
// 组件宽度
width
:
100
,
isError
:
false
isError
:
false
,
allowDefaultValue
:
false
},
// 组件属性
componentAttribute
:
{
...
...
@@ -242,7 +247,8 @@ export const defaultComOptions = [
label
:
"电子邮箱"
,
// 组件宽度
width
:
100
,
isError
:
false
isError
:
false
,
allowDefaultValue
:
false
},
// 组件属性
componentAttribute
:
{
...
...
@@ -273,7 +279,8 @@ export const defaultComOptions = [
width
:
100
,
limit
:
-
1
,
astrict
:
false
,
isError
:
false
isError
:
false
,
allowDefaultValue
:
false
},
// 组件属性
componentAttribute
:
{
...
...
@@ -284,7 +291,7 @@ export const defaultComOptions = [
}
},
{
//
图片
类型
//
文件
类型
comType
:
"file"
,
// 组件展示图标
comShowIcon
:
"icon_attachments@2x.png"
,
...
...
@@ -304,7 +311,8 @@ export const defaultComOptions = [
width
:
100
,
limit
:
-
1
,
astrict
:
false
,
isError
:
false
isError
:
false
,
allowDefaultValue
:
false
},
// 组件属性
componentAttribute
:
{
...
...
dsk-operate-ui/src/views/consultingOrgManagement/components/CustomForm/components/CustomFormDesign.vue
View file @
9d78a339
...
...
@@ -89,6 +89,7 @@ import { v4 } from 'uuid';
import
{
getCustomFormDetailApi
,
addCustomFormDataApi
}
from
"@/api/consultingOrgManagement"
;
import
{
cloneDeep
}
from
"lodash-es"
;
import
serialize
from
"serialize-javascript"
;
import
Schema
from
"async-validator"
;
export
default
{
name
:
"customFormDesign"
,
components
:
{
...
...
@@ -105,6 +106,7 @@ export default {
// 中间编辑的模块
subfieldModuleList
:
[],
}
,
olduSbfieldModuleList
:
[],
// 删除分栏提示
removeSubFiledModuleDialog
:
false
,
// 要删除的分栏信息
...
...
@@ -144,11 +146,54 @@ export default {
}
,
//方法集
methods
:
{
saveOptions
()
{
async
saveOptions
()
{
try
{
if
(
this
.
activeUid
&&
!
this
.
activeItemData
?.
checkedAllow
)
{
elementMessageSingleton
(
"warning"
,
"请先保存字段设置"
);
return
false
;
}
/**
* @type {Array<{
* defaultSubfieldModuleName : string;
* subfieldModuleName : string;
* edit : boolean;
* children : Array<any>
*
}
>
}
*/
const
_templateTemp
=
cloneDeep
(
this
.
subfieldModuleForm
);
let
finllyRules
=
{
subfieldModuleList
:
{
type
:
"array"
,
required
:
true
,
defaultField
:
{
type
:
"object"
,
fields
:
{
subfieldModuleName
:
{
type
:
"string"
,
required
:
true
,
message
:
"分栏名称不能为空"
}
,
edit
:
{
type
:
"enum"
,
enum
:
[
true
],
required
:
true
,
message
:
"请先保存芬兰名称,当前不能处于编辑状态"
}
,
children
:
{
type
:
"array"
,
required
:
true
,
defaultField
:
{
formAttribute
:
{
type
:
"object"
,
fields
:
{
fieldName
:
{
type
:
"string"
,
required
:
true
}
}
}
}
}
}
}
}
}
;
const
validatorIns
=
new
Schema
(
finllyRules
);
const
flag
=
await
validatorIns
.
validate
(
_templateTemp
);
}
catch
(
error
)
{
console
.
log
(
error
);
}
}
,
cancelCreate
()
{
this
.
$set
(
this
.
subfieldModuleForm
,
"subfieldModuleList"
,
cloneDeep
(
this
.
olduSbfieldModuleList
));
}
,
generateRandomLowerCaseLetter
()
{
const
alphabet
=
'abcdefghijklmnopqrstuvwxyz'
;
...
...
@@ -168,11 +213,11 @@ export default {
}
,
async
initModule
()
{
try
{
const
result
=
await
this
.
getCustomFormDetail
();
if
(
result
.
length
)
{
// 有模板数据 进行回显
return
;
}
//
const result = await this.getCustomFormDetail();
//
if (result.length)
{
//
// 有模板数据 进行回显
//
return;
//
}
// 模块初始化
this
.
addSubfieldModule
();
const
component
=
cloneDeep
(
defaultComOptions
[
0
]);
...
...
@@ -183,6 +228,7 @@ export default {
this
.
activeModuleId
=
this
.
subfieldModuleForm
.
subfieldModuleList
[
0
].
uid
;
this
.
activeUid
=
component
.
uid
;
this
.
subfieldModuleForm
.
subfieldModuleList
[
0
].
children
.
push
(
component
);
this
.
olduSbfieldModuleList
=
cloneDeep
(
this
.
subfieldModuleForm
.
subfieldModuleList
);
}
catch
(
error
)
{
}
...
...
dsk-operate-ui/src/views/consultingOrgManagement/components/CustomForm/components/SetFieldOption.vue
View file @
9d78a339
...
...
@@ -35,7 +35,7 @@
</
template
>
<!-- 默认值 -->
<
template
v-if=
"
defaultValueContain.includes(comActiveFieldData.comType)
"
>
<
template
v-if=
"
comActiveFieldData.formAttribute.allowDefaultValue
"
>
<el-form-item
label=
"默认值"
class=
"set-field-option-item"
prop=
"componentAttribute.value"
v-if=
"comActiveFieldData.componentAttribute"
>
<el-input
v-model=
"comActiveFieldData.componentAttribute.value"
placeholder=
"请输入默认值"
clearable
></el-input>
</el-form-item>
...
...
@@ -182,7 +182,6 @@ export default {
fieldName
:
[{
required
:
true
,
trigger
:
[
"blur"
,
"change"
],
validator
:
fieldNameValidor
}],
limit
:
[{
required
:
true
,
type
:
"number"
,
trigger
:
[
"blur"
,
"change"
],
validator
:
limitValidor
}]
},
defaultValueContain
:
[
"text"
,
"textarea"
],
placeholderContain
:
[
"text"
,
"textarea"
,
"select"
,
"date"
,
"phone"
,
"email"
],
limitContain
:
[
"photo"
,
"file"
]
};
...
...
dsk-operate-ui/src/views/consultingOrgManagement/components/EnterpriseList/detail/projectDetail.vue
View file @
9d78a339
...
...
@@ -36,8 +36,8 @@
<!-- 工程基本信息 -->
<basic-engineering-information
v-if=
"currentList === 'project'"
:projectDetailInfo=
"projectDetailInfo"
></basic-engineering-information>
<!-- 咨询机构结算信息 -->
<consulting-agency
v-if=
"currentList === 'consultingAgency'"
:projectKey=
"projectKey"
:projectDetailInfo=
"projectDetailInfo"
:isModify=
"isModify"
ref=
"consultingAgency"
@
editComProjectDetailSuccess=
"editComProjectDetailSuccess"
<consulting-agency
v-if=
"currentList === 'consultingAgency'"
:projectKey=
"projectKey"
:projectDetailInfo=
"projectDetailInfo"
:isModify=
"isModify"
ref=
"consultingAgency"
@
editComProjectDetailSuccess=
"editComProjectDetailSuccess"
@
searchLoadingChange=
"searchLoadingChange"
></consulting-agency>
</div>
...
...
@@ -126,7 +126,7 @@ export default {
if
(
result
.
code
)
{
this
.
$message
.
success
(
"更新咨询机构结算信息成功"
);
this
.
isModify
=
false
;
this
.
$
router
.
push
({
this
.
$
tab
.
closeOpenPage
({
path
:
`/redirect/
${
"consultingOrgManagement/projectDetail"
}
`
,
query
:
{
projectKey
:
this
.
projectKey
,
...
...
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