Commit 505f4020 by DESKTOP-732ATD8\BLT

增加功能:流水自动检测

parent 811e0bc4
...@@ -97,6 +97,7 @@ ...@@ -97,6 +97,7 @@
v-bind:icon="item.icon" v-bind:icon="item.icon"
v-bind:size="item.size || 'small'" v-bind:size="item.size || 'small'"
v-bind:type="item.buttonType" v-bind:type="item.buttonType"
v-bind:loading="loading"
v-on:click="($emit && $listeners && $listeners.click && $emit('click')) || javaScript.call(this,item.click)"> v-on:click="($emit && $listeners && $listeners.click && $emit('click')) || javaScript.call(this,item.click)">
{{item.name}} {{item.name}}
</el-button> </el-button>
......
<el-container class="el-query-table" v-loading="loading"> <el-container class="el-query-table" v-loading="loading || tableLoading">
<el-header> <el-header>
<el-form ref="form" label-width="auto" size="medium"> <el-form ref="form" label-width="auto" size="medium">
<el-row v-bind:gutter="20"> <el-row v-bind:gutter="20">
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col class="el-form-button"> <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"></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:loading="tableLoading"></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"></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="tableLoading"></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"></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="tableLoading"></el-form-control>
<el-form-control v-if="setting.isShowImportButton" v-bind:item="{type: 'button',name:'导入',icon:'el-icon-upload2'}"></el-form-control> <el-form-control v-if="setting.isShowImportButton" v-bind:item="{type: 'button',name:'导入',icon:'el-icon-upload2'}" v-bind:loading="tableLoading"></el-form-control>
<el-form-control v-for="(item,index) in setting.listOperateControl" v-bind:item="item" v-bind:key="index"></el-form-control> <el-form-control v-for="(item,index) in setting.listOperateControl" v-bind:item="item" v-bind:key="index" v-bind:loading="tableLoading"></el-form-control>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
stripe stripe
border border
v-bind:data="listData" v-bind:data="listData"
v-bind:row-key="id"
v-bind:highlightCurrentRow="setting.selectRowMethod == 1" v-bind:highlightCurrentRow="setting.selectRowMethod == 1"
v-on:sort-change="onSortChange" v-on:sort-change="onSortChange"
v-on:selection-change="onSelectionChange" v-on:selection-change="onSelectionChange"
......
...@@ -21,6 +21,10 @@ ...@@ -21,6 +21,10 @@
}, },
disabled: { disabled: {
default: null default: null
},
loading: {
type: Boolean,
default: false
} }
}, },
model: { model: {
...@@ -50,8 +54,6 @@ ...@@ -50,8 +54,6 @@
}, },
data() { data() {
return { return {
//遮罩层
loading: true,
//值 //值
item_value: null, item_value: null,
//表单标题 //表单标题
...@@ -115,7 +117,7 @@ ...@@ -115,7 +117,7 @@
that.$set(item, "loading", false) that.$set(item, "loading", false)
}, function (error) { }, function (error) {
this.$message(error.statusText || " 未知错误!"); this.$message(error.statusText || " 未知错误!");
that.loading = false; that.$set(item, "loading", false)
}); });
} }
}, },
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
return { return {
// 遮罩层 // 遮罩层
loading: false, loading: false,
tableLoading: false,
radio: '', radio: '',
filterPosition: 0, filterPosition: 0,
selectRowMethod: null, selectRowMethod: null,
...@@ -217,7 +218,7 @@ ...@@ -217,7 +218,7 @@
//查询数据 //查询数据
onSearchData: function (defaultValue) { onSearchData: function (defaultValue) {
var that = this; var that = this;
that.loading = true; that.tableLoading = true;
that.getQueryFilter(defaultValue); that.getQueryFilter(defaultValue);
that.$http.post("/Component/Query/GetListData", that.filterParams, { emulateJSON: true }).then(function (response) { that.$http.post("/Component/Query/GetListData", that.filterParams, { emulateJSON: true }).then(function (response) {
var result = response.data; var result = response.data;
...@@ -227,10 +228,10 @@ ...@@ -227,10 +228,10 @@
} else { } else {
this.$message(result.message || " 未知错误!"); this.$message(result.message || " 未知错误!");
} }
that.loading = false; that.tableLoading = false;
}, function (error) { }, function (error) {
this.$message(error.statusText || " 未知错误!"); this.$message(error.statusText || " 未知错误!");
that.loading = false; that.tableLoading = false;
}); });
}, },
//查询 //查询
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment