Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sample-form-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
sample-form-platform
Commits
f52e9412
Commit
f52e9412
authored
Oct 25, 2023
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 优化弹窗
parent
2708b35b
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
58 additions
and
41 deletions
+58
-41
sample-form-manager-ui/admin/src/main.js
sample-form-manager-ui/admin/src/main.js
+3
-0
sample-form-manager-ui/admin/src/pages/hardware/modal/AddDevice.vue
...m-manager-ui/admin/src/pages/hardware/modal/AddDevice.vue
+6
-3
sample-form-manager-ui/admin/src/pages/software/materials/modal/AddFolders.vue
...i/admin/src/pages/software/materials/modal/AddFolders.vue
+9
-9
sample-form-manager-ui/admin/src/pages/software/materials/modal/AddMaterials.vue
...admin/src/pages/software/materials/modal/AddMaterials.vue
+12
-11
sample-form-manager-ui/admin/src/pages/software/matter/modal/AddMatter.vue
...er-ui/admin/src/pages/software/matter/modal/AddMatter.vue
+6
-5
sample-form-manager-ui/admin/src/pages/system/parameter/modal/AddParameter.vue
...i/admin/src/pages/system/parameter/modal/AddParameter.vue
+6
-5
sample-form-manager-ui/admin/src/pages/system/task/modal/AddTask.vue
...-manager-ui/admin/src/pages/system/task/modal/AddTask.vue
+6
-5
sample-form-manager-ui/admin/src/store/index.js
sample-form-manager-ui/admin/src/store/index.js
+3
-3
sample-form-manager-ui/admin/src/utils/index.js
sample-form-manager-ui/admin/src/utils/index.js
+7
-0
No files found.
sample-form-manager-ui/admin/src/main.js
View file @
f52e9412
...
...
@@ -21,6 +21,9 @@ Vue.use(ElementUI);
import
{
message
}
from
"
@/utils/resetMessage
"
;
Vue
.
prototype
.
$message
=
message
;
import
{
resetForm
}
from
"
@/utils
"
;
Vue
.
prototype
.
resetForm
=
resetForm
;
// 表格生成
import
plugins
from
"
./components/formDes/index
"
;
Vue
.
use
(
plugins
);
...
...
sample-form-manager-ui/admin/src/pages/hardware/modal/AddDevice.vue
View file @
f52e9412
...
...
@@ -255,7 +255,7 @@ export default {
},
methods
:
{
handleReset
()
{
this
.
$refs
.
form
.
resetFields
(
);
this
.
resetForm
(
"
form
"
);
},
handleOk
()
{
this
.
$refs
.
form
.
validate
(
async
(
valid
)
=>
{
...
...
@@ -277,9 +277,12 @@ export default {
},
// 编辑
onEdit
(
row
)
{
setTimeout
(()
=>
{
this
.
form
=
{
...
row
};
},
10
);
},
handleClose
()
{
this
.
resetForm
(
"
form
"
);
this
.
Visible
=
false
;
},
},
...
...
sample-form-manager-ui/admin/src/pages/software/materials/modal/AddFolders.vue
View file @
f52e9412
...
...
@@ -5,7 +5,6 @@
:visible.sync=
"Visible"
width=
"30%"
@
close=
"handleClose"
:destroy-on-close=
"true"
:close-on-click-modal=
"false"
>
<el-form
...
...
@@ -54,7 +53,7 @@
</div>
</
template
>
<
script
>
<
script
>
import
{
addMatterFolder
}
from
"
@/api/matter
"
;
export
default
{
props
:
{
...
...
@@ -120,21 +119,22 @@ export default {
},
// 编辑
onEdit
(
row
)
{
setTimeout
(()
=>
{
this
.
form
=
{
...
row
};
},
10
);
},
// 重置
handleRest
()
{
this
.
$refs
.
form
.
resetFields
(
);
this
.
resetForm
(
"
form
"
);
},
// 关闭
handleClose
()
{
this
.
loading
=
false
;
this
.
$refs
.
form
.
resetFields
(
);
this
.
resetForm
(
"
form
"
);
this
.
Visible
=
false
;
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
</
style
>
\ No newline at end of file
<
style
lang=
"less"
scoped
></
style
>
sample-form-manager-ui/admin/src/pages/software/materials/modal/AddMaterials.vue
View file @
f52e9412
...
...
@@ -5,7 +5,6 @@
:visible.sync=
"Visible"
width=
"30%"
@
close=
"handleClose"
:destroy-on-close=
"true"
:close-on-click-modal=
"false"
>
<el-form
...
...
@@ -186,6 +185,7 @@ export default {
},
// 编辑
onEdit
(
row
)
{
setTimeout
(()
=>
{
this
.
form
=
{
...
row
};
this
.
samplePathFileList
=
[
{
...
...
@@ -193,15 +193,16 @@ export default {
url
:
this
.
form
.
samplePath
,
},
];
},
10
);
},
// 重置
handleRest
()
{
this
.
$refs
.
form
.
resetFields
(
);
this
.
resetForm
(
"
form
"
);
this
.
samplePathFileList
=
[];
},
// 关闭
handleClose
()
{
this
.
$refs
.
form
.
resetFields
(
);
this
.
resetForm
(
"
form
"
);
// this.fileUrlFileList = [];
// this.templatePathFileList = [];
this
.
samplePathFileList
=
[];
...
...
sample-form-manager-ui/admin/src/pages/software/matter/modal/AddMatter.vue
View file @
f52e9412
...
...
@@ -3,7 +3,6 @@
<el-dialog
:title=
"title"
:visible.sync=
"Visible"
:destroy-on-close=
"true"
width=
"30%"
@
close=
"handleClose"
:close-on-click-modal=
"false"
...
...
@@ -143,15 +142,17 @@ export default {
},
// 编辑
onEdit
(
row
)
{
setTimeout
(()
=>
{
this
.
form
=
{
...
row
};
},
10
);
},
// 重置
handleRest
()
{
this
.
$refs
.
form
.
resetFields
(
);
this
.
resetForm
(
"
form
"
);
},
// 关闭
handleClose
()
{
this
.
$refs
.
form
.
resetFields
(
);
this
.
resetForm
(
"
form
"
);
this
.
Visible
=
false
;
},
handleChange
(
val
)
{
...
...
sample-form-manager-ui/admin/src/pages/system/parameter/modal/AddParameter.vue
View file @
f52e9412
...
...
@@ -2,7 +2,6 @@
<div>
<el-dialog
:title=
"title"
:destroy-on-close=
"true"
:visible.sync=
"Visible"
width=
"30%"
@
close=
"handleClose"
...
...
@@ -176,15 +175,17 @@ export default {
},
// 编辑
onEdit
(
row
)
{
setTimeout
(()
=>
{
this
.
form
=
{
...
row
};
},
10
);
},
// 重置
handleRest
()
{
this
.
$refs
.
form
.
resetFields
(
);
this
.
resetForm
(
"
form
"
);
},
// 关闭
handleClose
()
{
this
.
$refs
.
form
.
resetFields
(
);
this
.
resetForm
(
"
form
"
);
this
.
Visible
=
false
;
},
},
...
...
sample-form-manager-ui/admin/src/pages/system/task/modal/AddTask.vue
View file @
f52e9412
...
...
@@ -2,7 +2,6 @@
<div>
<el-dialog
:title=
"title"
:destroy-on-close=
"true"
:visible.sync=
"Visible"
width=
"30%"
@
close=
"handleClose"
...
...
@@ -222,15 +221,17 @@ export default {
},
// 编辑
onEdit
(
row
)
{
setTimeout
(()
=>
{
this
.
form
=
{
...
row
};
},
10
);
},
// 重置
handleRest
()
{
this
.
$refs
.
form
.
resetFields
(
);
this
.
resetForm
(
"
form
"
);
},
// 关闭
handleClose
()
{
this
.
$refs
.
form
.
resetFields
(
);
this
.
resetForm
(
"
form
"
);
this
.
Visible
=
false
;
},
// 切换策略
...
...
sample-form-manager-ui/admin/src/store/index.js
View file @
f52e9412
...
...
@@ -17,9 +17,6 @@ export default new Vuex.Store({
path
:
""
,
// 门户跳转过来的路由
},
getters
:
{
SET_path
(
state
,
path
)
{
state
.
path
=
path
;
},
token
(
state
)
{
return
state
.
token
;
},
...
...
@@ -52,6 +49,9 @@ export default new Vuex.Store({
SET_token
(
state
,
token
)
{
state
.
token
=
token
;
},
SET_path
(
state
,
path
)
{
state
.
path
=
path
;
},
},
actions
:
{},
modules
:
{},
...
...
sample-form-manager-ui/admin/src/utils/index.js
View file @
f52e9412
...
...
@@ -96,3 +96,10 @@ export class SessionCrypto {
window
.
sessionStorage
.
removeItem
(
key
);
}
}
// 表单重置
export
function
resetForm
(
refName
)
{
if
(
this
.
$refs
[
refName
])
{
this
.
$refs
[
refName
].
resetFields
();
}
}
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