This commit is contained in:
oneao committed 2026-03-30 17:27:19 +08:00
1 parent f9eaacf02a
commit 69eda8b8ad
27 files changed
+2797 -616

No files matched your search

@@ -1,22 +1,17 @@
<script setup lang="ts">
import { toast } from 'sard-uniapp'
import { ref } from 'vue'
import { getOrgBaseUrl } from '@/request'
import { loadPageDataApi } from '@/request/api'
import { useUserStore } from '@/store'
import { deepEqual, groupFieldsBySpan } from '@/utils/common'
import { getCurrentDate } from '@/utils/time'
import { groupFieldsBySpan } from '@/utils/common'
import { buildPubicUrl } from '@/utils/file'
const userStore = useUserStore()
const pagingRef = ref<any>(null)
const dataList = ref<any[]>([])
const itemFields = [
{ label: '录入时间', value: item => item.b_inputdatetime, span: 12 },
{ label: '文件数量', value: item => item.v_file_count, span: 12 },
]
const groupedFields = groupFieldsBySpan(itemFields)
// 搜索关键字
const searchValue = ref('')
@@ -34,15 +29,18 @@ function handleSearch() {
}
// 模拟分页请求
function queryList(pageNo: number, pageSize: number) {
async function queryList(pageNo: number, pageSize: number) {
toast.loading('正在加载中')
const orgid = userStore.userInfo.orgid
const userid = userStore.userInfo.userid
const orgUrl = await getOrgBaseUrl(orgid)
let searchCondition = `2 > 1 AND b_inputuser_id = '${userid}'`
if (searchValue.value) {
searchCondition += `b_container_no LIKE '%${searchValue.value}%' `
searchCondition += `AND b_container_no LIKE '%${searchValue.value}%' `
}
loadPageDataApi({
@@ -54,8 +52,11 @@ function queryList(pageNo: number, pageSize: number) {
})
.then((res) => {
const rows = res.data.rows || []
console.log(rows)
if (rows) {
rows.forEach((item) => {
item.b_container_img = buildPubicUrl(orgUrl, item.b_container_img)
})
pagingRef.value.complete(rows)
}
})
@@ -64,12 +65,10 @@ function queryList(pageNo: number, pageSize: number) {
})
}
function handleToFile(itemData) {
const searchids = [itemData.b_id, itemData.father]
.filter(Boolean)
.join(',')
function handleToDetail(item) {
// 跳转到详情页
uni.navigateTo({
url: `/pages-sub/file/index?moduleid=xc_conyard_in&father=${itemData.father}&searchids=${encodeURIComponent(searchids)}&cateid=016&edit=1`,
url: `/pages-sub/upload/edit?id=${item.b_id}`,
})
}
</script>
@@ -96,13 +95,13 @@ function handleToFile(itemData) {
v-for="(item, index) in dataList"
:key="index"
class="list-item"
@click="handleToDetail(item)"
>
<view class="list-item__header">
<view class="list-item__main">
<sar-image
:src="item.b_container_img"
width="160rpx"
height="160rpx"
<wd-img
width="160rpx" height="160rpx" :src="item.b_container_img" :enable-preview="true"
@click.stop
/>
</view>
</view>
@@ -195,6 +194,12 @@ page {
position: relative;
padding: 16rpx;
background-color: #fff;
transition: background-color 0.2s;
&:active {
background-color: #f5f5f5;
}
&.list-item--desktop {
.list-item__header {
max-width: 1000rpx;