|
@@ -0,0 +1,185 @@
|
|
|
+<template>
|
|
|
+ <div class="content">
|
|
|
+ <van-sticky :offset-top="0">
|
|
|
+ <van-nav-bar title="项目" @click-right="filterclick">
|
|
|
+ <template #right>
|
|
|
+ <van-icon name="filter-o" size="18" />
|
|
|
+ </template>
|
|
|
+ </van-nav-bar>
|
|
|
+ </van-sticky>
|
|
|
+ <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
|
|
+ <van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
|
|
|
+ <van-cell-group v-for="item in list" :key="item" inset style="margin-top: 10px">
|
|
|
+ <van-cell>
|
|
|
+ <div>
|
|
|
+ <el-descriptions border :column="2">
|
|
|
+ <el-descriptions-item label="电子编号" :span="2">
|
|
|
+ {{ item.ecode }}
|
|
|
+ <div style="position: absolute;right:5px;top:5px">
|
|
|
+ <van-button size="mini" type="primary" plain hairline @click="filelook(item)">文件查看</van-button>
|
|
|
+ </div>
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="丘权号" :span="2">
|
|
|
+ {{ item.qiuquan }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="区域" :span="2">
|
|
|
+ <dict-tag style="display: inline;" :options="sys_area" :value="item.area"
|
|
|
+ /></el-descriptions-item>
|
|
|
+ <el-descriptions-item label="创建时间" :span="2">
|
|
|
+ {{ item.achievementDate }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="建设单位" :span="2">
|
|
|
+ {{ item.buildUnit }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="地址" :span="2">
|
|
|
+ {{ item.addr }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="备注" :span="2">
|
|
|
+ {{ item.remark }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </div>
|
|
|
+ </van-cell>
|
|
|
+ </van-cell-group>
|
|
|
+ </van-list>
|
|
|
+ </van-pull-refresh>
|
|
|
+ <el-drawer v-model="showfilter" title="筛选" :direction="'rtl'" size="70vw" modal-class="filtercss">
|
|
|
+ <van-cell-group inset>
|
|
|
+ <van-field v-model="areaname" is-link readonly label="区域" placeholder="点击选择区域" @click="showPicker = true" />
|
|
|
+ <van-popup v-model:show="showPicker" position="bottom">
|
|
|
+ <van-picker
|
|
|
+ :columns="sys_area.map((item) =>{ return { 'text':item.label,'value':item.value}})"
|
|
|
+ @confirm="onConfirm"
|
|
|
+ @cancel="showPicker = false"
|
|
|
+ />
|
|
|
+ </van-popup>
|
|
|
+ <van-field v-model="searchForm.qiuquan" label="丘权号" placeholder="丘权号" />
|
|
|
+ <van-field v-model="searchForm.buildUnit" label="建设单位" placeholder="建设单位" />
|
|
|
+ <van-field v-model="searchForm.saveAddr" label="存储位置" placeholder="存储位置" />
|
|
|
+ <van-field v-model="searchForm.remark" label="备注" placeholder="备注" />
|
|
|
+ </van-cell-group>
|
|
|
+ <div style="display: flex;gap:20px;padding:20px">
|
|
|
+ <van-button round block type="default" @click="reset"> 重置 </van-button>
|
|
|
+ <van-button round block type="primary" @click="onRefresh"> 搜索 </van-button>
|
|
|
+ </div>
|
|
|
+ </el-drawer>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script setup lang="ts">
|
|
|
+import {
|
|
|
+ listArchives,
|
|
|
+ addArchives,
|
|
|
+ updateArchives,
|
|
|
+ delArchives,
|
|
|
+ getArchive_files,
|
|
|
+ saveArchive_files
|
|
|
+} from "@/api/archives/index";
|
|
|
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
+const { sys_area, sys_project_status } = toRefs<any>(
|
|
|
+ proxy?.useDict("sys_area", "sys_project_status")
|
|
|
+);
|
|
|
+import _ from "lodash";
|
|
|
+const list = ref([]);
|
|
|
+const refreshing = ref(false);
|
|
|
+const loading = ref(false);
|
|
|
+const finished = ref(false);
|
|
|
+const router = useRouter();
|
|
|
+const filterclick = () => {
|
|
|
+ showfilter.value = true;
|
|
|
+};
|
|
|
+const showPicker = ref(false)
|
|
|
+const showfilter = ref(false)
|
|
|
+const searchForm = ref({
|
|
|
+ area: "",
|
|
|
+ qiuquan: "",
|
|
|
+ buildUnit: "",
|
|
|
+ addr: "",
|
|
|
+ saveAddr: "",
|
|
|
+ remark:""
|
|
|
+});
|
|
|
+
|
|
|
+const areaname = ref("");
|
|
|
+
|
|
|
+const filelook = (item) => {
|
|
|
+ router.push({
|
|
|
+ path: "/h5/filelist",
|
|
|
+ query: {
|
|
|
+ id: item.id,
|
|
|
+ },
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+const onConfirm = ({ selectedValues }) => {
|
|
|
+ searchForm.value.area = selectedValues[0];
|
|
|
+ showPicker.value = false
|
|
|
+ try {
|
|
|
+ areaname.value = sys_area.value.filter(i=>i.value==selectedValues[0])[0].label;
|
|
|
+ } catch (error) {
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const reset = () => {
|
|
|
+ showfilter.value = false;
|
|
|
+ searchForm.value = {
|
|
|
+ area: "",
|
|
|
+ qiuquan: "",
|
|
|
+ buildUnit: "",
|
|
|
+ addr: "",
|
|
|
+ saveAddr: "",
|
|
|
+ remark:"",
|
|
|
+ };
|
|
|
+ pageNum.value = 1;
|
|
|
+ onLoad();
|
|
|
+};
|
|
|
+
|
|
|
+const pageNum = ref(1);
|
|
|
+const onLoad = () => {
|
|
|
+ showfilter.value = false;
|
|
|
+ if (pageNum.value == 1) {
|
|
|
+ list.value = [];
|
|
|
+ }
|
|
|
+ listArchives({ pageSize: 10, pageNum: pageNum.value++ ,...searchForm.value}).then((res) => {
|
|
|
+ list.value= list.value.concat(res.rows);
|
|
|
+ // 加载状态结束
|
|
|
+ loading.value = false;
|
|
|
+ if (list.value.length >= res.total) {
|
|
|
+ finished.value = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+};
|
|
|
+const onRefresh = () => {
|
|
|
+ // 清空列表数据
|
|
|
+ finished.value = false;
|
|
|
+ pageNum.value = 1;
|
|
|
+ refreshing.value = false;
|
|
|
+
|
|
|
+ // 重新加载数据
|
|
|
+ // 将 loading 设置为 true,表示处于加载状态
|
|
|
+ loading.value = true;
|
|
|
+ onLoad();
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.content {
|
|
|
+ text-align: center;
|
|
|
+ position: relative;
|
|
|
+ min-height: 100vh;
|
|
|
+ background: #eff2f5;
|
|
|
+ .filtercss{
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|
|
|
+<style lang="scss">
|
|
|
+.filtercss{
|
|
|
+ .el-drawer{
|
|
|
+ background: rgb(236, 235, 235);
|
|
|
+ .el-drawer__body{
|
|
|
+ padding:0
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+</style>
|