Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
Overview
Overview
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
bltdc
DataCenter_Core2.1_20190520
Commits
439b530b
Commit
439b530b
authored
Dec 01, 2021
by
jianshuqin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化:组件功能
parent
729d2114
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
29 deletions
+52
-29
FormController.cs
Bailun.DC.Web/Areas/Component/Controllers/FormController.cs
+3
-3
Form.cshtml
Bailun.DC.Web/Areas/Component/Views/Dialog/Form.cshtml
+2
-1
Control.cshtml
Bailun.DC.Web/Areas/Component/Views/Table/Control.cshtml
+1
-0
el-form-filter.css
Bailun.DC.Web/wwwroot/css/component/el-form-filter.css
+20
-17
el-dialog-form.js
Bailun.DC.Web/wwwroot/js/component/el-dialog-form.js
+12
-6
el-table-control.js
Bailun.DC.Web/wwwroot/js/component/el-table-control.js
+5
-1
el-table-query.js
Bailun.DC.Web/wwwroot/js/component/el-table-query.js
+9
-1
No files found.
Bailun.DC.Web/Areas/Component/Controllers/FormController.cs
View file @
439b530b
...
...
@@ -27,7 +27,7 @@ namespace Bailun.DC.Web.Areas.Component.Controllers
}
[
HttpPost
]
public
JsonResult
Save
([
FromBody
]
FormDTO
dto
)
public
JsonResult
Save
([
FromBody
]
FormDTO
dto
)
{
ResultDTO
result
=
default
(
ResultDTO
);
try
...
...
@@ -48,7 +48,7 @@ namespace Bailun.DC.Web.Areas.Component.Controllers
ResultDTO
result
=
default
(
ResultDTO
);
try
{
result
=
new
FormService
().
Save
(
id
,
tru
e
);
result
=
new
FormService
().
Save
(
id
,
fals
e
);
}
catch
(
Exception
ex
)
{
...
...
@@ -65,7 +65,7 @@ namespace Bailun.DC.Web.Areas.Component.Controllers
ResultDTO
result
=
default
(
ResultDTO
);
try
{
result
=
new
FormService
().
Save
(
id
,
fals
e
);
result
=
new
FormService
().
Save
(
id
,
tru
e
);
}
catch
(
Exception
ex
)
{
...
...
Bailun.DC.Web/Areas/Component/Views/Dialog/Form.cshtml
View file @
439b530b
...
...
@@ -4,10 +4,11 @@
class="el-dialog-form"
el-dialog
append-to-body
destroy-on-close
v-dialogDrag
v-bind:title="dialog.name"
v-bind:visible.sync="show"
v-bind:
width="dialog.width + 'px'
"
v-bind:
style="{'width':dialog.width > 0 ? (dialog.width + 'px') : ''}
"
v-bind:close-on-click-modal="false"
v-on:close="closeDialog">
<el-container v-bind:style="$parent.$el && $parent.$el.offsetHeight ? 'max-height:' + ($parent.$el.offsetHeight - 30) + 'px' : ''">
...
...
Bailun.DC.Web/Areas/Component/Views/Table/Control.cshtml
View file @
439b530b
...
...
@@ -42,6 +42,7 @@
v-bind:width="setting.operateColumnWidth || 80">
<template slot-scope="scope">
<el-form-control v-for="(operateColumn,index) in setting.listOperateColumnControl"
v-if="!operateColumn.isHide || !javaScript.call(scope,operateColumn.isHide,scope)"
class="inline"
v-bind:key="index"
v-bind:item="operateColumn"
...
...
Bailun.DC.Web/wwwroot/css/component/el-form-filter.css
View file @
439b530b
...
...
@@ -20,28 +20,32 @@
width
:
auto
;
}
.el-form-filter
.el-form-button
.el-form-control
{
margin-right
:
10px
;
}
.el-form-filter
.h40.el-row
.el-form-control
{
margin-left
:
10px
;
}
.el-form-filter
.el-form-button
.el-form-control
{
margin-right
:
10px
;
}
.el-form-filter
.el-col
{
margin-bottom
:
5px
;
}
.el-form-filter
.el-date-editor.el-input
.el-input__inner
{
cursor
:
pointer
;
padding-right
:
35px
;
padding-left
:
15px
;
}
.el-form-filter
.el-date-editor.el-input
.el-input__inner
{
cursor
:
pointer
;
padding-right
:
35px
;
padding-left
:
15px
;
}
.el-form-filter
.el-date-editor.el-input
.el-input__prefix
{
right
:
0px
;
left
:
auto
;
}
.el-form-filter
.el-date-editor.el-input
.el-input__prefix
{
right
:
0px
;
left
:
auto
;
}
.el-form-filter
.el-date-editor.el-input
.el-input__suffix
{
right
:
16px
;
}
.el-form-filter
.el-date-editor.el-input
.el-input__suffix
{
right
:
16px
;
}
.el-form-filter
.el-select__caret.el-input__icon
{
height
:
94%
;
...
...
@@ -49,4 +53,4 @@
.el-form-filter
.el-select__caret.el-input__icon.el-icon-circle-close
{
height
:
90%
;
}
\ No newline at end of file
}
Bailun.DC.Web/wwwroot/js/component/el-dialog-form.js
View file @
439b530b
...
...
@@ -35,7 +35,7 @@
that
.
$http
({
method
:
'get'
,
url
:
"/Component/Form/Get"
,
params
:
{
code
:
that
.
code
}
params
:
{
code
:
code
||
that
.
code
}
}).
then
(
function
(
response
)
{
var
result
=
response
.
data
;
if
(
response
.
status
===
200
&&
result
.
result
&&
result
.
data
)
{
...
...
@@ -73,12 +73,18 @@
},
//隐藏
closeDialog
:
function
()
{
if
(
!
this
.
show
)
{
this
.
$set
(
this
,
"form"
,
{})
this
.
$emit
(
"cancel"
)
this
.
$refs
.
form
&&
this
.
$refs
.
form
.
resetFields
&&
this
.
$refs
.
form
.
resetFields
()
var
that
=
this
;
if
(
!
that
.
show
)
{
that
.
$set
(
that
,
"form"
,
{})
that
.
$emit
(
"cancel"
)
var
resetFieldsIndex
=
that
.
dialog
.
listFormItem
&&
that
.
dialog
.
listFormItem
.
findIndex
(
function
(
l
,
i
)
{
return
(
l
.
type
==
"input"
||
l
.
type
==
"number"
||
l
.
type
==
"select"
||
l
.
type
==
"daterange"
||
l
.
type
==
"date"
||
l
.
type
==
"month"
||
l
.
type
==
"year"
||
l
.
type
==
"switch"
);
});
if
(
resetFieldsIndex
>
0
)
{
that
.
$refs
.
form
&&
that
.
$refs
.
form
.
resetFields
&&
that
.
$refs
.
form
.
resetFields
();
};
}
th
is
.
show
=
false
th
at
.
show
=
false
},
//提交表单
submitForm
:
function
()
{
...
...
Bailun.DC.Web/wwwroot/js/component/el-table-control.js
View file @
439b530b
...
...
@@ -59,6 +59,10 @@
})
}
},
//清空选择
clearSelection
:
function
()
{
this
.
$refs
.
table
.
clearSelection
();
},
//关闭弹出窗
closeDialog
()
{
this
.
$emit
(
"close-dialog"
)
...
...
@@ -201,7 +205,7 @@
//表格行点击事件
onRowClick
:
function
(
row
,
column
)
{
var
that
=
this
;
if
((
that
.
setting
.
operateColumnName
||
'操作'
)
!=
column
.
label
)
{
if
(
column
&&
(
that
.
setting
.
operateColumnName
||
'操作'
)
!=
column
.
label
)
{
if
(
that
.
setting
.
selectRowMethod
==
2
)
{
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
!
this
.
$refs
.
table
.
selection
||
!
this
.
$refs
.
table
.
selection
.
length
||
this
.
$refs
.
table
.
selection
.
findIndex
(
function
(
l
)
{
return
l
==
row
})
<
0
);
}
...
...
Bailun.DC.Web/wwwroot/js/component/el-table-query.js
View file @
439b530b
...
...
@@ -33,6 +33,10 @@
closeDialog
()
{
this
.
$emit
(
"close-dialog"
)
},
//清空选择
clearSelection
:
function
()
{
this
.
$refs
.
table
.
clearSelection
();
},
//弹出窗
showDialog
(
title
,
form
,
code
)
{
this
.
$emit
(
"show-dialog"
,
title
,
form
,
code
)
...
...
@@ -65,6 +69,10 @@
Vue
.
set
(
that
.
filterParams
,
'listFilter'
,
listFilter
);
return
listFilter
;
},
//获取选择行
getSelectItems
:
function
()
{
return
this
.
$refs
.
table
.
getSelectItems
();
},
//表单组件初始化事件
onInit
:
function
(
setting
)
{
var
that
=
this
;
...
...
@@ -154,7 +162,7 @@
row
=
that
.
row
;
break
;
case
2
:
rows
=
that
.
$refs
.
table
.
getSelectItems
();
rows
=
that
.
getSelectItems
();
break
;
}
if
(
fn
)
{
...
...
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