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
73a8a424
Commit
73a8a424
authored
Nov 12, 2021
by
DESKTOP-732ATD8\BLT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加功能:流水自动检测
parent
db91d446
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
178 additions
and
167 deletions
+178
-167
QueryEnum.cs
Bailun.DC.Models/Component/Enum/QueryEnum.cs
+11
-3
QueryService.cs
Bailun.DC.Services/Component/QueryService.cs
+21
-23
Form.cshtml
Bailun.DC.Web/Areas/Component/Views/Control/Form.cshtml
+2
-2
Query.cshtml
Bailun.DC.Web/Areas/Component/Views/Table/Query.cshtml
+95
-90
query-table.css
Bailun.DC.Web/wwwroot/css/component/query-table.css
+6
-4
form-control.js
Bailun.DC.Web/wwwroot/js/component/form-control.js
+3
-5
query-table.js
Bailun.DC.Web/wwwroot/js/component/query-table.js
+20
-40
vue-interceptors.js
Bailun.DC.Web/wwwroot/js/vue/vue-interceptors.js
+20
-0
No files found.
Bailun.DC.Models/Component/Enum/QueryEnum.cs
View file @
73a8a424
...
...
@@ -7,8 +7,11 @@ namespace Bailun.DC.Models.Component.Enum
/// </summary>
public
enum
ColumnTypeEnum
{
[
Description
(
"API"
)]
Api
=
1
,
/// <summary>
/// SQL(首次)
/// </summary>
[
Description
(
"SQL(首次)"
)]
SqlFirst
=
1
,
/// <summary>
/// SQL
/// </summary>
...
...
@@ -18,7 +21,12 @@ namespace Bailun.DC.Models.Component.Enum
/// 本地配置
/// </summary>
[
Description
(
"配置"
)]
Config
=
3
Config
=
3
,
/// <summary>
/// API
/// </summary>
[
Description
(
"API"
)]
Api
=
4
,
}
/// <summary>
...
...
Bailun.DC.Services/Component/QueryService.cs
View file @
73a8a424
...
...
@@ -87,6 +87,26 @@ namespace Bailun.DC.Services.Component
{
switch
(
entity
.
ColumnType
)
{
#
region
SQL
case
ColumnTypeEnum
.
SqlFirst
:
case
ColumnTypeEnum
.
Sql
:
DynamicParameters
sqlparam
=
new
DynamicParameters
();
//过虑条件SQL
this
.
GetFilterSql
(
queryFilter
,
ref
sqlparam
);
//查询
using
(
var
db
=
(
entity
.
DataDB
==
DBEnum
.
DataWareHouse
?
DW_DB
:
DB
))
{
list
=
DB
.
Query
<
ColumnDTO
>(
entity
.
ColumnValue
,
sqlparam
).
ToList
();
}
break
;
#
endregion
#
region
本地配置
case
ColumnTypeEnum
.
Config
:
list
=
DeserializeCollection
<
ColumnDTO
>(
entity
.
ColumnValue
).
ToList
();
break
;
#
endregion
#
region
控制器函数
/
Webapi
case
ColumnTypeEnum
.
Api
:
/*
...
...
@@ -140,29 +160,7 @@ namespace Bailun.DC.Services.Component
*/
break
;
#
endregion
#
region
SQL
case
ColumnTypeEnum
.
Sql
:
DynamicParameters
sqlparam
=
new
DynamicParameters
();
//过虑条件SQL
this
.
GetFilterSql
(
queryFilter
,
ref
sqlparam
);
//查询
using
(
var
db
=
(
entity
.
DataDB
==
DBEnum
.
DataWareHouse
?
DW_DB
:
DB
))
{
list
=
DB
.
Query
<
ColumnDTO
>(
entity
.
ColumnValue
,
sqlparam
).
ToList
();
}
break
;
#
endregion
#
region
本地配置
case
ColumnTypeEnum
.
Config
:
list
=
DeserializeCollection
<
ColumnDTO
>(
entity
.
ColumnValue
).
ToList
();
break
;
#
endregion
default
:
break
;
#
endregion
}
#
region
报表表头下拉选项
...
...
Bailun.DC.Web/Areas/Component/Views/Control/Form.cshtml
View file @
73a8a424
...
...
@@ -27,7 +27,7 @@
v-bind:clearable="item.clearable == null || item.clearable"
v-bind:disabled="item.disabled == true || javaScript.call(this,item.disabled)"
v-bind:placeholder="item.placeholder || ('请选择' + (item.label || item.name || ''))"
v-bind:loading="
item.
loading"
v-bind:loading="
loading || p
loading"
v-bind:size="item.size || 'small'"
v-bind:multiple="item.multiple"
v-bind:filterable="item.filterable == null || item.filterable"
...
...
@@ -97,7 +97,7 @@
v-bind:icon="item.icon"
v-bind:size="item.size || 'small'"
v-bind:type="item.buttonType"
v-bind:loading="loading"
v-bind:loading="loading
|| ploading
"
v-bind:disabled="item.disabled == true || javaScript.call(this,item.disabled)"
v-on:click="($emit && $listeners && $listeners.click && $emit('click')) || javaScript.call(this,item.click)">
{{item.name}}
...
...
Bailun.DC.Web/Areas/Component/Views/Table/Query.cshtml
View file @
73a8a424
<el-container class="el-query-table"
v-loading="loading || tableLoading"
>
<el-container class="el-query-table">
<el-header>
<el-form ref="form" label-width="auto" size="medium">
<el-row v-bind:gutter="20">
...
...
@@ -8,105 +8,110 @@
</el-form-item>
</el-col>
<el-col class="el-form-button">
<el-form-control v-if="setting.isShowSearchButton" v-bind:item="{type: 'button',name:'查询',buttonType:'primary',icon:'el-icon-search'}" v-on:click="onSearch" v-bind:
loading="tableL
oading"></el-form-control>
<el-form-control v-if="setting.isShowResetButton" v-bind:item="{type: 'button',name:'重置',icon:'el-icon-refresh-right'}" v-on:click="onReset" v-bind:
loading="tableL
oading"></el-form-control>
<el-form-control v-if="setting.isShowExportButton" v-bind:item="{type: 'button',name:'导出',buttonType:'success',icon:'el-icon-download'}" v-on:click="onExport" v-bind:
loading="tableL
oading"></el-form-control>
<el-form-control v-if="setting.isShowImportButton" v-bind:item="{type: 'button',name:'导入',icon:'el-icon-upload2'}" v-bind:
loading="tableL
oading"></el-form-control>
<el-form-control v-for="(item,index) in setting.listOperateControl" v-bind:item="item" v-bind:key="index" v-bind:
loading="tableL
oading"></el-form-control>
<el-form-control v-if="setting.isShowSearchButton" v-bind:item="{type: 'button',name:'查询',buttonType:'primary',icon:'el-icon-search'}" v-on:click="onSearch" v-bind:
ploading="l
oading"></el-form-control>
<el-form-control v-if="setting.isShowResetButton" v-bind:item="{type: 'button',name:'重置',icon:'el-icon-refresh-right'}" v-on:click="onReset" v-bind:
ploading="l
oading"></el-form-control>
<el-form-control v-if="setting.isShowExportButton" v-bind:item="{type: 'button',name:'导出',buttonType:'success',icon:'el-icon-download'}" v-on:click="onExport" v-bind:
ploading="l
oading"></el-form-control>
<el-form-control v-if="setting.isShowImportButton" v-bind:item="{type: 'button',name:'导入',icon:'el-icon-upload2'}" v-bind:
ploading="l
oading"></el-form-control>
<el-form-control v-for="(item,index) in setting.listOperateControl" v-bind:item="item" v-bind:key="index" v-bind:
ploading="l
oading"></el-form-control>
</el-col>
</el-row>
</el-form>
</el-header>
<el-main>
<el-table ref="table"
class="form-table el-table--scrollable-y"
stripe
border
v-bind:data="listData"
v-bind:highlightCurrentRow="setting.selectRowMethod == 1"
v-on:sort-change="onSortChange"
v-on:selection-change="onSelectionChange"
v-on:select="(selection, row)=> onRowClick(row)"
v-on:select-all="(selection)=> onRowClick()"
v-on:row-click="onRowClick"
v-on:current-change="setting.selectRowMethod == 1 && onCurrentChange">
<el-table-column v-if="setting.selectRowMethod == 2"
header-align="center"
type="selection"
width="40"
v-bind:reserve-selection="true">
</el-table-column>
<el-table-column v-else-if="setting.selectRowMethod == 1 && (showRadioColumn == null || showRadioColumn)"
header-align="center"
width="35"
label-class-name="el-radio-column"
class-name="el-radio-column">
<template slot-scope="scope">
<el-radio v-model="rowValue" v-bind:label="scope.row.id">
</el-radio>
</template>
</el-table-column>
<el-table-column v-if="setting.isShowSequenceColumn"
type="index"
header-align="center"
v-bind:index="onSequenceIndex"
label="序号"
width="60"
align="center" />
<el-table-column v-if="setting.listOperateColumnControl && setting.listOperateColumnControl.length > 0"
v-bind:label="setting.operateColumnName || '操作'"
header-align="center"
v-bind:show-overflow-tooltip="setting.showTooltip"
v-bind:width="setting.operateColumnWidth || 80">
<template slot-scope="scope">
<el-form-control v-for="(operateColumn,index) in setting.listOperateColumnControl"
class="inline"
v-bind:key="index"
v-bind:item="operateColumn"
v-bind:disabled="operateColumn.disabled != null && (operateColumn.disabled == true || javaScript.call(setting,operateColumn.disabled,scope))"
v-model="scope.row[operateColumn.prop]"
v-on:click="javaScript.call(scope,operateColumn.click,scope)"
v-on:change="javaScript.call(scope,operateColumn.change,scope)">
</el-form-control>
</template>
</el-table-column>
<template v-for="(column,index) in setting.listColumn">
<el-table-column header-align="center"
v-bind:sortable="column.sortable == null || column.sortable ? 'custom' : false"
v-bind:prop="column.prop"
v-bind:show-overflow-tooltip="setting.showTooltip"
v-bind:label="column.name"
v-bind:key="index"
v-bind:width="column.width || ''"
v-bind:min-width="!column.width && ((column.name || ' ').length * 15 + 45)">
<template slot-scope="scope">
<el-form-control v-bind:item="column"
v-model="scope.row[column.prop]"
v-on:click="javaScript.call(scope,column.click,scope)"
v-on:change="javaScript.call(scope,column.change,scope)">
</el-form-control>
<el-main v-loading="loading">
<el-container>
<el-main>
<el-table ref="table"
class="form-table el-table--scrollable-y"
stripe
border
v-bind:data="listData"
v-bind:highlightCurrentRow="setting.selectRowMethod == 1"
v-on:sort-change="onSortChange"
v-on:selection-change="onSelectionChange"
v-on:select="(selection, row)=> onRowClick(row)"
v-on:select-all="(selection)=> onRowClick()"
v-on:row-click="onRowClick"
v-on:current-change="setting.selectRowMethod == 1 && onCurrentChange">
<el-table-column v-if="setting.selectRowMethod == 2"
header-align="center"
type="selection"
width="40"
v-bind:reserve-selection="true">
</el-table-column>
<el-table-column v-else-if="setting.selectRowMethod == 1 && (showRadioColumn == null || showRadioColumn)"
header-align="center"
width="35"
label-class-name="el-radio-column"
class-name="el-radio-column">
<template slot-scope="scope">
<el-radio v-model="rowValue" v-bind:label="scope.row.id">
</el-radio>
</template>
</el-table-column>
<el-table-column v-if="setting.isShowSequenceColumn"
type="index"
header-align="center"
v-bind:index="onSequenceIndex"
label="序号"
width="60"
align="center" />
<el-table-column v-if="setting.listOperateColumnControl && setting.listOperateColumnControl.length > 0"
v-bind:label="setting.operateColumnName || '操作'"
header-align="center"
v-bind:show-overflow-tooltip="setting.showTooltip"
v-bind:width="setting.operateColumnWidth || 80">
<template slot-scope="scope">
<el-form-control v-for="(operateColumn,index) in setting.listOperateColumnControl"
class="inline"
v-bind:key="index"
v-bind:item="operateColumn"
v-bind:disabled="operateColumn.disabled != null && (operateColumn.disabled == true || javaScript.call(setting,operateColumn.disabled,scope))"
v-model="scope.row[operateColumn.prop]"
v-on:click="javaScript.call(scope,operateColumn.click,scope)"
v-on:change="javaScript.call(scope,operateColumn.change,scope)">
</el-form-control>
</template>
</el-table-column>
<template v-for="(column,index) in setting.listColumn">
<el-table-column header-align="center"
v-bind:sortable="column.sortable == null || column.sortable ? 'custom' : false"
v-bind:prop="column.prop"
v-bind:show-overflow-tooltip="setting.showTooltip"
v-bind:label="column.name"
v-bind:key="index"
v-bind:width="column.width || ''"
v-bind:min-width="!column.width && ((column.name || ' ').length * 15 + 45)">
<template slot-scope="scope">
<el-form-control v-bind:item="column"
v-model="scope.row[column.prop]"
v-on:click="javaScript.call(scope,column.click,scope)"
v-on:change="javaScript.call(scope,column.change,scope)">
</el-form-control>
</template>
</el-table-column>
</template>
</el-table-column>
</template>
</el-table>
</el-table>
</el-main>
<el-footer>
<el-pagination background layout="total,sizes,jumper,prev, pager, next"
v-bind:current-page="filterParams.currentPage"
v-bind:page-sizes="[5, 10, 20, 50,100]"
v-bind:page-size="filterParams.pageSize"
v-bind:total="filterParams.total"
v-on:size-change="onSizeChange"
v-on:current-change="onCurrentChange"
v-on:pagination="onSearch">
</el-pagination>
</el-footer>
</el-container>
</el-main>
<el-footer>
<el-pagination background layout="total,sizes,jumper,prev, pager, next"
v-bind:current-page="filterParams.currentPage"
v-bind:page-sizes="[5, 10, 20, 50,100]"
v-bind:page-size="filterParams.pageSize"
v-bind:total="filterParams.total"
v-on:size-change="onSizeChange"
v-on:current-change="onCurrentChange"
v-on:pagination="onSearch">
</el-pagination>
</el-footer>
</el-container>
</script>
</script>
<script type="text/x-template" id="elFormControl">
@Html.PartialAsync("~/Areas/Component/Views/Control/Form.cshtml").Result
</script>
<script src="@Url.Content("~/js/component/xlsx.full.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/js/component/file-saver.js")" type="text/javascript"></script>
<script src="@Url.Content("~/js/vue/vue-interceptors.js")" type="text/javascript"></script>
<script src="@Url.Content("~/js/component/query-table.js")" type="text/javascript">
Bailun.DC.Web/wwwroot/css/component/query-table.css
View file @
73a8a424
...
...
@@ -3,10 +3,14 @@
height
:
calc
(
100%
-
40px
);
}
#app
,
#app
.el-container.
el-query-table.
is-vertical
{
#app
,
#app
.el-container.is-vertical
{
height
:
100%
;
}
#app
.el-main
.el-main
{
margin
:
0px
;
}
.el-query-table
.el-header
,
.el-query-table
.el-main
,
.el-query-table
.el-footer
{
...
...
@@ -134,7 +138,7 @@
}
.el-picker-panel
.el-picker-panel__shortcut
{
width
:
auto
;
width
:
auto
;
}
.el-picker-panel
[
slot
=
sidebar
]
+
.el-picker-panel__body
,
.el-picker-panel__sidebar
+
.el-picker-panel__body
{
...
...
@@ -166,5 +170,3 @@
.el-query-table
.el-form-control
.el-range-separator
{
width
:
auto
;
}
Bailun.DC.Web/wwwroot/js/component/form-control.js
View file @
73a8a424
...
...
@@ -7,7 +7,7 @@
value
:
{
default
:
null
},
loading
:
{
p
loading
:
{
type
:
Boolean
,
default
:
false
}
...
...
@@ -39,6 +39,8 @@
},
data
()
{
return
{
//加载
loading
:
false
,
//值
item_value
:
null
,
//表单标题
...
...
@@ -64,7 +66,6 @@
visibleChange
(
visible
,
item
)
{
var
that
=
this
if
(
visible
&&
item
.
api
&&
(
!
item
.
listOption
||
item
.
listOption
.
length
<=
1
||
(
that
.
form
&&
item
.
prop
&&
that
.
form
[
item
.
prop
]
&&
Array
.
isArray
(
that
.
form
[
item
.
prop
])
&&
that
.
form
[
item
.
prop
].
length
==
item
.
listOption
.
length
)))
{
that
.
$set
(
item
,
"loading"
,
true
)
var
params
=
{}
if
(
item
.
params
)
{
var
form
=
that
.
form
...
...
@@ -84,7 +85,6 @@
}).
then
(
function
(
response
)
{
var
result
=
response
.
data
;
if
(
response
.
status
==
200
&&
result
&&
(
result
.
length
||
(
result
.
data
&&
result
.
data
.
length
)))
{
debugger
var
listOptionValue
=
Array
.
isArray
(
result
)
?
result
:
(
Array
.
isArray
(
result
.
data
)
?
result
.
data
:
result
.
data
.
list
);
if
(
listOptionValue
&&
listOptionValue
.
length
&&
(
listOptionValue
[
0
].
constructor
===
String
||
listOptionValue
[
0
].
constructor
===
Number
))
{
listOptionValue
=
listOptionValue
.
map
(
function
(
item
,
index
)
{
...
...
@@ -100,10 +100,8 @@
}
}
}
that
.
$set
(
item
,
"loading"
,
false
)
},
function
(
error
)
{
this
.
$message
(
error
.
statusText
||
" 未知错误!"
);
that
.
$set
(
item
,
"loading"
,
false
)
});
}
},
...
...
Bailun.DC.Web/wwwroot/js/component/query-table.js
View file @
73a8a424
...
...
@@ -12,22 +12,9 @@
},
data
:
function
()
{
return
{
// 遮罩层
loading
:
false
,
tableLoading
:
false
,
isFirst
:
false
,
radio
:
''
,
filterPosition
:
0
,
selectRowMethod
:
null
,
operateColumnContent
:
null
,
//当前选中行
currentRow
:
null
,
//当前页数
currentPage
:
1
,
//每页条目个数
currentSize
:
10
,
total
:
0
,
query
:
{},
listButton
:
null
,
listData
:
[],
queryParams
:
{},
setting
:
{},
...
...
@@ -50,6 +37,7 @@
//初始化数据
onInitValue
:
function
()
{
var
that
=
this
;
that
.
isFirst
=
true
;
window
.
getSelectItems
=
function
()
{
return
that
.
getSelectItems
();
}
...
...
@@ -57,7 +45,6 @@
//获取配置信息
getConfig
:
function
()
{
var
that
=
this
;
that
.
loading
=
true
;
that
.
$http
({
method
:
'get'
,
url
:
"/Component/Query/Get"
,
...
...
@@ -87,12 +74,10 @@
that
.
onSearch
(
true
);
}
}
else
{
this
.
$message
((
!
result
.
data
&&
"配置错误"
)
||
(
result
.
Message
||
" 未知错误!"
));
this
.
$message
((
!
result
.
data
&&
"配置错误"
)
||
(
result
.
Message
||
" 未知错误!"
));
}
that
.
loading
=
false
;
},
function
(
error
)
{
this
.
$message
(
error
.
statusText
||
" 未知错误!"
);
that
.
loading
=
false
;
});
},
//获取查询过虑条件
...
...
@@ -187,7 +172,6 @@
//查询字段
onSearchColumn
:
function
(
defaultValue
)
{
var
that
=
this
;
that
.
loading
=
true
;
that
.
getQueryFilter
(
defaultValue
);
that
.
$http
.
post
(
"/Component/Query/GetListColumn"
,
that
.
filterParams
,
{
emulateJSON
:
true
}).
then
(
function
(
response
)
{
var
result
=
response
.
data
;
...
...
@@ -212,13 +196,11 @@
}
},
function
(
error
)
{
this
.
$message
(
error
.
statusText
||
" 未知错误!"
);
that
.
loading
=
false
;
});
},
//查询数据
onSearchData
:
function
(
defaultValue
)
{
var
that
=
this
;
that
.
tableLoading
=
true
;
that
.
getQueryFilter
(
defaultValue
);
that
.
$http
.
post
(
"/Component/Query/GetListData"
,
that
.
filterParams
,
{
emulateJSON
:
true
}).
then
(
function
(
response
)
{
var
result
=
response
.
data
;
...
...
@@ -228,32 +210,31 @@
}
else
{
this
.
$message
(
result
.
message
||
" 未知错误!"
);
}
that
.
tableLoading
=
false
;
},
function
(
error
)
{
this
.
$message
(
error
.
statusText
||
" 未知错误!"
);
that
.
tableLoading
=
false
;
});
},
//查询
onSearch
:
function
(
defaultValue
)
{
var
that
=
this
;
if
(
!
that
.
setting
||
that
.
setting
.
columnType
!=
3
)
{
this
.
onSearchColumn
(
defaultValue
);
//设置当前第一页
Vue
.
set
(
that
.
filterParams
,
'currentPage'
,
1
);
//查询列头
if
(
!
that
.
setting
||
(
that
.
setting
.
columnType
!=
3
&&
!
(
!
that
.
isFirst
&&
that
.
setting
.
columnType
==
1
)))
{
that
.
onSearchColumn
(
defaultValue
);
that
.
isFirst
=
false
;
}
this
.
onSearchData
(
defaultValue
);
},
search
:
function
()
{
this
.
currentPage
=
1
;
this
.
onSearchData
();
this
.
onSearchColumn
(
true
);
that
.
onSearchData
(
defaultValue
);
//清空单选
this
.
radio
=
null
;
this
.
row
=
null
;
this
.
$refs
.
dataTable
.
setCurrentRow
();
//
this.radio = null;
//
this.row = null;
//
this.$refs.dataTable.setCurrentRow();
},
//重置
onReset
:
function
()
{
var
that
=
this
;
//设置首次标识
that
.
isFirst
=
true
;
if
(
that
.
setting
)
{
//清空表格过虑值
if
(
that
.
setting
.
listColumn
&&
that
.
setting
.
listColumn
.
length
)
{
...
...
@@ -271,12 +252,11 @@
//清空排序
that
.
$refs
.
table
.
clearSort
();
Vue
.
set
(
that
,
'filterParams'
,
{
currentPage
:
1
,
pageSize
:
10
,
ListOrder
:
null
});
this
.
onSearch
Data
();
this
.
onSearch
();
},
//导出
onExport
:
function
()
{
var
that
=
this
;
that
.
loading
=
true
;
that
.
getQueryFilter
();
//异步请求
that
.
$http
.
post
(
"/Component/Query/Export"
,
that
.
filterParams
,
{
emulateJSON
:
true
},
{
...
...
@@ -286,16 +266,15 @@
}
}).
then
(
function
(
json
)
{
saveAs
(
json
.
bodyBlob
,
'Export_'
+
(
new
Date
().
format
(
"yyyyMMddhhmmss"
))
+
'.xlsx'
);
that
.
loading
=
false
;
}).
catch
(
function
(
error
)
{
that
.
$message
(
error
.
message
||
" 未知错误!"
);
that
.
loading
=
false
;
});
},
//未实现预留
onButtonClick
:
function
(
fn
)
{
var
$confirm
=
this
.
$confirm
;
var
$table
=
this
.
$refs
.
dataTable
;
switch
(
th
is
.
selectRowMethod
)
{
switch
(
th
at
.
setting
.
selectRowMethod
)
{
case
1
:
row
=
this
.
row
;
break
;
...
...
@@ -307,6 +286,7 @@
eval
(
fn
);
}
},
//未实现预留
selectChange
:
function
(
f
)
{
var
that
=
this
;
var
childerFilter
=
that
.
listFilterControl
.
find
(
function
(
i
)
{
...
...
@@ -316,6 +296,7 @@
childerFilter
.
Values
=
[];
}
},
//未实现预留
loadOptions
:
function
(
visible
,
f
)
{
var
that
=
this
;
if
(
visible
==
true
)
{
...
...
@@ -388,7 +369,6 @@
Vue
.
set
(
this
.
filterParams
,
'ListOrder'
,
[{
Field
:
column
.
prop
,
Operator
:
column
.
order
}]);
}
else
{
Vue
.
set
(
this
.
filterParams
,
'ListOrder'
,
null
);
this
.
query
.
ListOrder
=
null
;
}
this
.
onSearchData
();
},
...
...
Bailun.DC.Web/wwwroot/js/vue/vue-interceptors.js
0 → 100644
View file @
73a8a424
Vue
.
http
.
interceptors
.
push
(
function
(
request
,
next
,
a
)
{
var
that
=
this
;
that
.
loadCount
=
(
that
.
loadCount
||
0
)
+
1
;
if
(
that
.
loading
!=
true
)
{
//打开loading
Vue
.
set
(
this
,
"loading"
,
true
);
}
next
(
function
(
response
)
{
//调用完一个接口就进行-1
that
.
loadCount
--
;
//当接口都调用完时关闭loading
if
(
that
.
loadCount
<=
0
)
{
that
.
loadCount
=
0
;
if
(
that
.
loading
==
true
)
{
Vue
.
set
(
this
,
"loading"
,
false
);
}
}
})
});
\ No newline at end of file
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