移动端代码生成获取数据新增加载中提示

This commit is contained in:
不做码农 2023-07-28 07:26:40 +08:00
parent c54c306a9d
commit c97a386f0f

View File

@ -126,7 +126,7 @@ $end
</view> </view>
</view> </view>
</u-popup> </u-popup>
<u-back-top :scroll-top="scrollTop" :bottom="150"></u-back-top> <u-back-top :scroll-top="scrollTop" :bottom="180"></u-back-top>
</view> </view>
</template> </template>
@ -174,13 +174,14 @@ $end
loading: false, loading: false,
$foreach(item in genTable.Columns) $foreach(item in genTable.Columns)
$if((item.HtmlType == "radio" || item.HtmlType == "select" || item.HtmlType == "checkbox") && item.DictType == "") $if((item.HtmlType == "radio" || item.HtmlType == "select" || item.HtmlType == "checkbox") && item.DictType == "")
// ${item.ColumnComment}选项列表 格式 eg:{ dictLabel: '标签', dictValue: '0'} // ${item.ColumnComment}选项列表 格式 eg:{ label: '标签', value: '0'}
${item.CsharpFieldFl}Options: [], ${item.CsharpFieldFl}Options: [],
$elseif(item.HtmlType == "datetime" && item.IsQuery == true) $elseif(item.HtmlType == "datetime" && item.IsQuery == true)
//${item.ColumnComment}时间范围 //${item.ColumnComment}时间范围
dateRange${item.CsharpField}: [], dateRange${item.CsharpField}: [],
$end $end
$end $end
// 排序集合 格式 eg:{ label: '名称', value: 'userId'}
sortOptions: [ sortOptions: [
$foreach(column in genTable.Columns) $foreach(column in genTable.Columns)
$if(column.IsSort) $if(column.IsSort)
@ -199,6 +200,9 @@ $end
methods: { methods: {
checkPermi, checkPermi,
getList() { getList() {
uni.showLoading({
title: 'loading...'
});
$foreach(item in genTable.Columns) $foreach(item in genTable.Columns)
$if(item.HtmlType == "datetime" && item.IsQuery == true) $if(item.HtmlType == "datetime" && item.IsQuery == true)
this.addDateRange(this.queryParams, this.dateRange${item.CsharpField}, '${item.CsharpField}'); this.addDateRange(this.queryParams, this.dateRange${item.CsharpField}, '${item.CsharpField}');
@ -206,9 +210,8 @@ $end
$end $end
list${genTable.BusinessName}(this.queryParams).then(res => { list${genTable.BusinessName}(this.queryParams).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.dataList = res.data.result; this.dataList = [...this.dataList, ...res.data.result]
this.total = res.data.totalNum; this.total = res.data.totalNum;
this.loading = false;
} }
}) })
}, },
@ -283,9 +286,3 @@ $end
} }
} }
</script> </script>
<style lang="scss">
.container {
padding-bottom: 20px;
}
</style>