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
bf4c6742
Commit
bf4c6742
authored
Aug 21, 2024
by
王纵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表格增加数据更新功能
parent
73e66523
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
17 deletions
+38
-17
DAttachment.vue
...amic/ConfigRenderComponent/DForm/FormItem/DAttachment.vue
+2
-1
index.vue
src/Dynamic/ConfigRenderComponent/DTable/index.vue
+21
-11
service.js
src/Dynamic/service.js
+6
-1
dynamicDetail.vue
src/pages/dynamicTest/dynamicDetail.vue
+9
-4
No files found.
src/Dynamic/ConfigRenderComponent/DForm/FormItem/DAttachment.vue
View file @
bf4c6742
...
...
@@ -2,7 +2,7 @@
* @Author: zong.wang01@hand-china.com
* @Date: 2024-08-01 09:55:12
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-08-21 1
5:44:04
* @LastEditTime: 2024-08-21 1
7:34:41
* @Version: 1.0.0
* @Description: 动态渲染-附件组件
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -190,6 +190,7 @@ export default {
color: #383F45;
}
.file-info {
margin-top: 6px;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #33333350;
...
...
src/Dynamic/ConfigRenderComponent/DTable/index.vue
View file @
bf4c6742
...
...
@@ -2,7 +2,7 @@
* @Author: zong.wang01@hand-china.com
* @Date: 2024-07-29 10:51:56
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-08-2
0 22:56:42
* @LastEditTime: 2024-08-2
1 17:36:07
* @Version: 1.0.0
* @Description: 表格渲染
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -93,7 +93,7 @@ import DTitle from '../DTitle';
import
DForm
from
'../DForm'
;
import
DTableTd
from
'./DTableTd.jsx'
;
import
{
Checkbox
,
CheckboxGroup
,
Popup
,
Button
,
Icon
,
Toast
}
from
'vant'
;
import
{
getTableData
,
saveTableRecord
,
deleteTableRecords
}
from
'../../service'
;
import
{
getTableData
,
saveTableRecord
,
deleteTableRecords
,
updateTableRecord
}
from
'../../service'
;
import
{
getDataSetName
,
dateFormat
}
from
'../../utils/utils'
;
import
EventBus
from
'../../utils/eventBus'
;
...
...
@@ -238,9 +238,19 @@ export default {
}
return
val
;
},
async
saveRecord
()
{
async
saveRecord
()
{
//表格数据保存
const
{
allValues
}
=
await
this
.
$refs
.
dformRef
.
validate
();
saveTableRecord
(
this
.
tabInfo
.
createUrl
,
[{...
allValues
,
...
this
.
dynamicConfigInfo
.
queryParams
}]).
then
(()
=>
{
let
method
=
saveTableRecord
;
// 默认新增
let
url
=
this
.
tabInfo
.
createUrl
;
const
data
=
[{
...
allValues
,
...
this
.
dynamicConfigInfo
.
queryParams
}]
if
(
allValues
.
_status
===
'update'
)
{
// 更新
url
=
this
.
tabInfo
.
updateUrl
method
=
updateTableRecord
;
}
method
(
url
,
data
).
then
(()
=>
{
this
.
visible
=
false
;
Toast
.
success
(
'保存成功!'
);
this
.
init
();
...
...
@@ -268,17 +278,17 @@ export default {
this
.
showRecord
({},
-
1
);
break
;
case
'query'
:
console
.
log
(
'查询'
)
break
;
case
'export'
:
console
.
log
(
'导出'
)
this
.
refresh
();
break
;
// case 'export':
// console.log('导出')
// break;
case
'remove'
:
this
.
deleteRecords
();
break
;
case
'save'
:
console
.
log
(
'保存'
)
break
;
//
case 'save':
//
console.log('保存')
//
break;
default
:
}
}
...
...
src/Dynamic/service.js
View file @
bf4c6742
...
...
@@ -2,7 +2,7 @@
* @Author: zong.wang01@hand-china.com
* @Date: 2024-08-09 10:54:02
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-08-21 1
5:38:30
* @LastEditTime: 2024-08-21 1
7:35:15
* @Version: 1.0.0
* @Description: 页面配置请求
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -82,6 +82,11 @@ export function saveTableRecord(url, params) {
return
hlsHttp
.
post
(
url
,
params
);
}
// 表格单条数据更新
export
function
updateTableRecord
(
url
,
params
)
{
return
hlsHttp
.
put
(
url
,
params
);
}
// 表格删除
export
function
deleteTableRecords
(
destroyUrl
,
dataSetName
,
params
)
{
const
url
=
destroyUrl
||
...
...
src/pages/dynamicTest/dynamicDetail.vue
View file @
bf4c6742
...
...
@@ -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-21 17:
03:39
* @LastEditTime: 2024-08-21 17:
37:33
* @Version: 1.0.0
* @Description: 商机维护详情
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -19,8 +19,13 @@
ref=
"dynamicRef"
/>
<van-popup
v-model=
"show"
style=
"width: 100%; height: 50%"
>
<van-popup
v-model=
"show"
style=
"width: 100%; height: 50%; padding: 15px; box-sizing: border-box;"
position=
"bottom"
closeable
>
<div
style=
"text-align: center;margin-bottom: 15px"
>
附件信息
</div>
<DAttachment
:isNew=
"false"
:attachmentUuid=
"attachmentRecord.attachmentUuid"
...
...
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