From f26f29d84e0a68831a6af14dab3eec5500496d2e Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期三, 28 五月 2025 16:48:52 +0800 Subject: [PATCH] 初始化项目 --- pages/sys/pigxParam/index.vue | 122 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 122 insertions(+), 0 deletions(-) diff --git a/pages/sys/pigxParam/index.vue b/pages/sys/pigxParam/index.vue new file mode 100644 index 0000000..3f2c739 --- /dev/null +++ b/pages/sys/pigxParam/index.vue @@ -0,0 +1,122 @@ +<template> + <view class="wrap"> + <scroll-view class="scroll-list" scroll-y="true" @scrolltolower="loadMore"> + <u-cell-group class="list" :border="false"> + <u-card :title="item.publicName" v-for="(item, index) in list" :key="item.publicId" :index="item.publicId" + @click="cardClick(item.publicId)"> + <view class="" slot="body"> + <view class="row-list"> + <span class="span-lable">鍚嶇О: </span>{{ item.publicName }} + </view> + <view class="row-list"> + <span class="span-lable">閿�: </span>{{ item.publicKey }} + </view> + <view class="row-list"> + <span class="span-lable">鍊�: </span>{{ item.publicValue }} + </view> + <view class="row-list"> + <span class="span-lable">缂栫爜: </span>{{ item.validateCode }} + </view> + <view class="row-list"> + <span class="span-lable">鐘舵��: </span> + <dict-tag dict-type="status_type" :value="item.status"></dict-tag> + </view> + <view class="row-list"> + <span class="span-lable">绫诲瀷: </span> + <dict-tag dict-type="param_type" :value="item.publicType"></dict-tag> + </view> + </view> + <view class="card-foot" slot="foot"> + <u-button type="primary" size="medium" @click="cardClick(item.publicId)">缂栬緫</u-button> + <u-button size="medium" @click="del(item.publicId)">鍒犻櫎</u-button> + </view> + </u-card> + </u-cell-group> + <view class="loadmore" @click="loadMore"> + <u-loadmore :status="loadStatus"></u-loadmore> + </view> + </scroll-view> + <view class="btn-plus" @click="cardClick()"> + <u-icon name="plus-circle-fill" size="90" color="#3d87ff"></u-icon> + </view> + </view> +</template> +<script> + export default { + + data() { + return { + keywords: '', + query: { + current: 1, + size: 20 + }, + list: [], + count: 0, + loadStatus: 'loadmore', + options: [{ + text: '鍒犻櫎', + style: { + background: '#dd524d' + } + }] + }; + }, + onLoad() { + this.loadList(); + }, + onShow() { + if (uni.getStorageSync('refreshList') === true) { + uni.removeStorageSync('refreshList'); + this.search(''); + } + }, + methods: { + cardClick(id) { + uni.navigateTo({ + url: '/pages/sys/pigxParam/form?id=' + id + }) + }, + loadMore() { + this.loadStatus = "loading"; + setTimeout(() => { + this.query.current += 1; + this.loadList(); + }, 100); + }, + loadList() { + this.$u.api.pigxParam.fetchList(this.query).then(res => { + if (!res.data.records || res.data.records.length == 0) { + this.loadStatus = "nomore"; + return; + } + this.list = this.list.concat(res.data.records); + this.total = res.data.total; + this.query.current = res.data.current; + this.query.size = res.data.size; + this.loadStatus = "loadmore"; + }); + }, + del(id) { + let self = this; + uni.showModal({ + title: '鎻愮ず', + content: '纭瑕佸垹闄よ鏁版嵁鍚楋紵', + showCancel: true, + success: function(res2) { + if (res2.confirm) { + self.$u.api.pigxParam.delObj({ + id: id + }).then(res => { + self.$u.toast('鍒犻櫎鎴愬姛'); + self.query.current = 1 + self.list = [] + self.loadList() + }); + } + } + }); + } + } + }; +</script> -- Gitblit v1.9.3