Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-easy-ui
Project
Project
Details
Activity
Releases
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
easyUI
hls-easy-ui
Commits
cdb88618
Commit
cdb88618
authored
Aug 21, 2024
by
王纵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加低代码测试页面
parent
add568f7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
271 additions
and
5 deletions
+271
-5
chance.js
src/pages/dynamicTest/chance.js
+51
-0
dynamicDetail.vue
src/pages/dynamicTest/dynamicDetail.vue
+212
-0
testDynamic.vue
src/pages/dynamicTest/testDynamic.vue
+5
-2
index.js
src/router/index.js
+3
-3
No files found.
src/pages/dynamicTest/chance.js
0 → 100644
View file @
cdb88618
/*
* @Author: zong.wang01@hand-china.com
* @Date: 2024-08-21 15:53:19
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-08-21 15:59:49
* @Version: 1.0.0
* @Description:
* @Copyright: Copyright (c) 2021, Hand-RongJing
*/
/*
* @Author: zong.wang01@hand-china.com
* @Date: 2024-08-16 09:38:58
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-08-21 14:58:34
* @Version: 1.0.0
* @Description:
* @Copyright: Copyright (c) 2021, Hand-RongJing
*/
import
hlsHttp
from
'../../Dynamic/utils/hlsHttp'
const
baseUrl
=
''
const
api
=
{
save
(
data
)
{
return
hlsHttp
.
post
(
`
${
baseUrl
}
/hlcn/v1/chances/0/detail/save`
,
data
)
},
checkApproval
(
chanceId
)
{
return
hlsHttp
.
get
(
`
${
baseUrl
}
/hlcn/v1/chances/0/choose/contact/notes/
${
chanceId
}
`
)
},
submit
(
params
)
{
return
hlsHttp
.
post
(
`
${
baseUrl
}
/hlcn/v1/chances/0/submit`
,
params
)
},
getEmpInfo
()
{
return
hlsHttp
.
get
(
`
${
baseUrl
}
/hlco/v1/0/company-attributes/getEmployeeInfo`
)
},
saveChanceHeader
(
data
)
{
return
hlsHttp
.
post
(
`
${
baseUrl
}
/hlcn/v1/chances/0/batch`
,
data
);
},
getAttachUUid
()
{
return
hlsHttp
.
get
(
`
${
baseUrl
}
/hfle/v1/0/files/uuid`
);
},
upload
(
params
)
{
return
hlsHttp
.
post
(
`
${
baseUrl
}
/hfle/v1/0/files/attachment/multipart`
,
params
);
},
// 查询附件
getAttachments
(
params
)
{
return
hlsHttp
.
get
(
`/hfle/v1/0/files/
${
params
.
attachmentUUID
}
/file`
,
params
);
}
}
export
default
api
\ No newline at end of file
src/pages/dynamicDetail.vue
→
src/pages/dynamic
Test/dynamic
Detail.vue
View file @
cdb88618
...
...
@@ -2,28 +2,41 @@
* @Author: zong.wang01@hand-china.com
* @Date: 2024-08-16 09:39:36
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-08-2
0 11:42:31
* @LastEditTime: 2024-08-2
1 15:54:30
* @Version: 1.0.0
* @Description: 商机维护详情
* @Copyright: Copyright (c) 2021, Hand-RongJing
-->
<
template
>
<Dynamic
layoutCode=
"CN001F1"
:showTitle=
"false"
:componentRenderers=
"componentRenderers"
:configLoadHandle=
"configLoadHandle"
:dataLoadHandle=
"dataLoadHandle"
:layoutButtons=
"layoutButtons"
ref=
"dynamicRef"
/>
<div>
<Dynamic
layoutCode=
"CN001F1"
:showTitle=
"false"
:componentRenderers=
"componentRenderers"
:configLoadHandle=
"configLoadHandle"
:dataLoadHandle=
"dataLoadHandle"
:layoutButtons=
"layoutButtons"
ref=
"dynamicRef"
/>
<van-popup
v-model=
"show"
style=
"width: 100%; height: 50%"
>
<DAttachment
:isNew=
"false"
:attachmentUuid=
"attachmentRecord.attachmentUuid"
bucketName=
"spfm-comp"
:canEdit=
"false"
v-if=
"show"
/>
</van-popup>
</div>
</
template
>
<
script
>
import
{
NavBar
,
Button
,
Search
,
List
,
Toast
,
Dialog
}
from
'vant'
;
import
Dynamic
from
'../Dynamic'
import
{
getFormValuesByTabCode
}
from
'../Dynamic/utils/utils'
// import chanceApi from '../api/chance'
import
{
NavBar
,
Button
,
Search
,
List
,
Toast
,
Dialog
,
Uploader
,
Popup
}
from
'vant'
;
import
{
Dynamic
,
DAttachment
,
DUtils
}
from
'../../Dynamic'
import
chanceApi
from
'./chance'
export
default
{
name
:
'DynamicDetail'
,
...
...
@@ -35,16 +48,33 @@ export default {
[
List
.
name
]:
List
,
[
Toast
.
name
]:
Toast
,
[
Dialog
.
name
]:
Dialog
,
[
Uploader
.
name
]:
Uploader
,
[
Popup
.
name
]:
Popup
,
DAttachment
},
data
()
{
return
{
config
:
{},
files
:
[],
componentRenderers
:
[
{
tabCode
:
'G_QUERY_RESULT'
,
columnName
:
'projectName'
,
renderer
:
(
record
,
index
)
=>
{
return
<
span
style
=
"color: #3789ff"
onClick
=
{()
=>
this
.
toDetail
(
record
)}
>
{
record
.
projectName
}
<
van
-
icon
name
=
"arrow"
/><
/span
>
tabCode
:
'G_ATTACHMENT'
,
columnName
:
'uploadDownload'
,
className
:
'attachment-class'
,
renderer
:
(
record
)
=>
{
return
<
a
onClick
=
{()
=>
this
.
showAttachment
(
record
)}
>
附件信息
<
/a
>
},
formRenderer
:
(
fileConfig
,
getData
)
=>
{
const
record
=
getData
?
getData
()
:
{};
return
<
DAttachment
isNew
=
{
record
.
_status
===
'create'
}
attachmentUuid
=
{
record
.
attachmentUuid
}
bucketName
=
"spfm-comp"
onGetUuidSuccess
=
{
this
.
getUuidSuccess
}
onUploadSuccess
=
{
this
.
uploadCallBack
}
onLoadAttachments
=
{
this
.
getAttachments
}
canEdit
=
{
fileConfig
.
readOnly
}
/
>
},
},
],
...
...
@@ -52,6 +82,8 @@ export default {
submit
:
this
.
submit
,
save
:
this
.
save
,
},
show
:
false
,
attachmentRecord
:
{}
}
},
methods
:
{
...
...
@@ -60,14 +92,32 @@ export default {
this
.
config
=
config
;
},
dataLoadHandle
(
data
,
tabCode
)
{
console
.
log
(
tabCode
,
data
);
// console.log(tabCode, data);
},
async
getUuidSuccess
(
uuid
)
{
const
tableRef
=
DUtils
.
getRefByTabCode
(
this
.
config
.
dataSetObject
,
'G_ATTACHMENT'
);
if
(
tableRef
&&
tableRef
.
$refs
.
dformRef
)
{
tableRef
.
$refs
.
dformRef
.
setFieldsValue
({
chanceId
:
this
.
config
.
queryParams
.
chanceId
,
attachmentUuid
:
uuid
});
}
},
uploadCallBack
(
file
,
files
)
{
console
.
log
(
file
,
files
)
},
getAttachments
(
files
)
{
console
.
log
(
files
)
},
change
(
val
)
{
console
.
log
(
'val===?'
,
val
)
},
async
save
()
{
let
saveValues
=
{};
const
saveDataSet
=
this
.
config
.
dataSetObject
;
const
basiceValues
=
await
getFormValuesByTabCode
(
saveDataSet
,
'F_BASIC'
);
const
basiceValues
=
await
DUtils
.
getFormValuesByTabCode
(
saveDataSet
,
'F_BASIC'
);
saveValues
=
{...
basiceValues
.
allValues
};
const
schemeValues
=
await
getFormValuesByTabCode
(
saveDataSet
,
'F_SCHEME'
);
const
schemeValues
=
await
DUtils
.
getFormValuesByTabCode
(
saveDataSet
,
'F_SCHEME'
);
saveValues
=
{...
saveValues
,
...
schemeValues
.
formValues
};
console
.
log
(
'saveValues'
,
saveValues
);
...
...
@@ -78,13 +128,13 @@ export default {
chanceAttachmentList
:
[]
};
//
let res = await chanceApi.save(datas);
//
Toast.success('操作成功!');
let
res
=
await
chanceApi
.
save
(
datas
);
Toast
.
success
(
'操作成功!'
);
},
async
submit
()
{
const
saveDataSet
=
this
.
config
.
dataSetObject
;
const
basiceValues
=
await
getFormValuesByTabCode
(
saveDataSet
,
'F_BASIC'
);
const
schemeValues
=
await
getFormValuesByTabCode
(
saveDataSet
,
'F_SCHEME'
);
const
basiceValues
=
await
DUtils
.
getFormValuesByTabCode
(
saveDataSet
,
'F_BASIC'
);
const
schemeValues
=
await
DUtils
.
getFormValuesByTabCode
(
saveDataSet
,
'F_SCHEME'
);
let
saveValues
=
{...
basiceValues
.
allValues
,
...
schemeValues
.
formValues
};
...
...
@@ -131,21 +181,32 @@ export default {
}
},
submitCallback
(
datas
)
{
//
const promise = chanceApi.submit(datas);
//
promise.then(
//
() => {
//
Toast.success('提交成功');
//
this.goBack();
//
},
//
err => {
//
Toast.fail(err.message);
//
}
//
);
const
promise
=
chanceApi
.
submit
(
datas
);
promise
.
then
(
()
=>
{
Toast
.
success
(
'提交成功'
);
this
.
goBack
();
},
err
=>
{
Toast
.
fail
(
err
.
message
);
}
);
},
showAttachment
(
record
)
{
this
.
show
=
true
;
this
.
attachmentRecord
=
record
;
}
},
};
</
script
>
<
style
lang=
"
stylus"
scoped
>
<
style
lang=
"
less"
>
.cn001f1-g_attachment-uploaddownload_form{
.d-url{
display: flex;
flex-direction: column;
align-items: baseline;
}
}
</
style
>
src/pages/testDynamic.vue
→
src/pages/
dynamicTest/
testDynamic.vue
View file @
cdb88618
...
...
@@ -2,7 +2,7 @@
* @Author: zong.wang01@hand-china.com
* @Date: 2024-08-16 09:39:36
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-08-2
0 11:41:44
* @LastEditTime: 2024-08-2
1 16:02:16
* @Version: 1.0.0
* @Description:
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -21,7 +21,7 @@
<
script
>
import
{
NavBar
,
Button
,
Search
,
List
,
Toast
}
from
'vant'
;
import
Dynamic
from
'
../Dynamic'
import
{
Dynamic
}
from
'../
../Dynamic'
export
default
{
name
:
'TestDynamic'
,
...
...
@@ -49,6 +49,9 @@ export default {
},
}
},
created
()
{
window
.
localStorage
.
access_token
=
'5a9de092-e1ad-42b7-9240-90c2d5acb34e'
},
methods
:
{
configLoadHandle
(
config
)
{
// 查询配置信息之后的回调
console
.
log
(
'configLoadHandle'
,
config
)
...
...
src/router/index.js
View file @
cdb88618
...
...
@@ -2,7 +2,7 @@
* @Author: zong.wang01@hand-china.com
* @Date: 2024-07-29 10:10:04
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-0
7-31 18:52:20
* @LastEditTime: 2024-0
8-21 15:54:17
* @Version: 1.0.0
* @Description:
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -14,8 +14,8 @@ import Router from 'vue-router'
import
Radio
from
'@/pages/radioTest'
import
Form
from
'@/pages/form'
const
TestDynamic
=
resolve
=>
require
.
ensure
([],
()
=>
{
resolve
(
require
(
'@/pages/testDynamic'
))
},
'testDynamic'
)
const
DynamicDetail
=
resolve
=>
require
.
ensure
([],
()
=>
{
resolve
(
require
(
'@/pages/dynamicDetail'
))
},
'dynamicDetail'
)
const
TestDynamic
=
resolve
=>
require
.
ensure
([],
()
=>
{
resolve
(
require
(
'@/pages/
dynamicTest/
testDynamic'
))
},
'testDynamic'
)
const
DynamicDetail
=
resolve
=>
require
.
ensure
([],
()
=>
{
resolve
(
require
(
'@/pages/dynamic
Test/dynamic
Detail'
))
},
'dynamicDetail'
)
const
Demo
=
resolve
=>
require
.
ensure
([],
()
=>
{
resolve
(
require
(
'@/pages/demo'
))
},
'demo'
)
const
Home
=
resolve
=>
require
.
ensure
([],
()
=>
{
resolve
(
require
(
'@/pages/home'
))
},
'home'
)
const
HlsPopup
=
resolve
=>
require
.
ensure
([],
()
=>
{
resolve
(
require
(
'@/pages/hlsPopup'
))
},
'hlsPopup'
)
...
...
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