6/22完善引入,

This commit is contained in:
Zy
2026-06-22 08:14:35 +08:00
parent ea8129216b
commit 826bf3c782
208 changed files with 1122 additions and 1685 deletions

View File

@@ -331,7 +331,7 @@ function backRoute() {
.cardSubtitle {
position: absolute;
left: 0px;
left: 0;
top: 28px;
width: 100px;
background: #fff;

View File

@@ -64,7 +64,7 @@
:on-error="handleError"
:limit="1"
>
<img v-if="form.cardImageFront" :src="form.cardImageFront" class="avatar" />
<img alt="身份证正面照" v-if="form.cardImageFront" :src="form.cardImageFront" class="avatar" />
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
</el-upload>
</el-form-item>
@@ -82,7 +82,7 @@
:on-success="handleAvatar2Success"
:on-error="handleError2"
>
<img v-if="form.cardImageBack" :src="form.cardImageBack" class="avatar" />
<img alt="身份证背面照" v-if="form.cardImageBack" :src="form.cardImageBack" class="avatar" />
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
</el-upload>
</el-form-item>
@@ -111,6 +111,7 @@ import { genFileId } from 'element-plus';
import { addResident, getResident, updateResident } from '@/api/system/resident';
import { validator } from '@/utils/Reg';
import { useHouseStore } from '@/store/modules/house';
import { Plus } from '@element-plus/icons-vue';
const houseStore = useHouseStore();
const uploadUrl = import.meta.env.VITE_APP_BASE_API + '/resident/uploadImage';
@@ -351,7 +352,7 @@ const cancelForm = () => {
align-items: center;
.el-input {
width: 100px;
margin-right: 0px;
margin-right: 0;
}
span {
margin: 0 20px;

View File

@@ -1,6 +1,6 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader title="住户管理"></Pageheader>
<pageHeader title="住户管理"></pageHeader>
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
@@ -30,24 +30,11 @@
<div class="treeTitlebox">{{ currentVilageInfo.villageName ?? '--' }}</div>
<div class="treeboxbody">
<!-- 树状+ -->
<el-tree :highlight-current="true" style="max-width: 600px" :data="treedata" :props="defaultProps" @node-click="handleNodeClick" />
<el-tree :highlight-current="true" style="max-width: 600px" :data="treated" :props="defaultProps" @node-click="handleNodeClick" />
</div>
</div>
<div class="flex-1 h-full">
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['resident:resident:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['resident:resident:edit']"
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['resident:resident:remove']"
>删除</el-button
>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
@@ -83,15 +70,15 @@
<el-table-column label="房间" min-width="120" align="center" prop="houseAddress" />
<el-table-column label="操作" align="center" min-width="120" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button v-if="scope.row.status !== '1'" link type="primary" @click="handleMain(scope.row)" v-hasPermi="['resident:resident:edit']"
<el-button v-if="scope.row.status !== '1'" link type="primary" @click="handleMain(scope.row)" v-has-permi="['resident:resident:edit']"
>审核</el-button
>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['resident:resident:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['resident:resident:remove']">删除 </el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['resident:resident:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['resident:resident:remove']">删除 </el-button>
</template>
</el-table-column>
</el-table>
<pagination
<Pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
@@ -104,9 +91,12 @@
</div>
</template>
<script setup name="Resident" lang="ts">
import Pageheader from '@/components/Pageheader/index.vue';
import Pagination from '@/components/Pagination/index.vue';
import pageHeader from '@/components/Pageheader/index.vue';
import RightToolbar from '@/components/RightToolbar/index.vue';
import DictTag from '@/components/DictTag/index.vue';
import { listResident, delResident } from '@/api/system/resident/index';
import { listResident, delResident } from '@/api/system/resident';
import { ResidentVO, ResidentQuery, ResidentForm } from '@/api/system/resident/type';
import { getHousePathById } from '@/utils/house';
import { useHouseStore } from '@/store/modules/house';
@@ -188,7 +178,7 @@ const data = reactive<PageData<ResidentForm, ResidentQuery>>({
}
});
const { queryParams, form } = toRefs(data);
const { queryParams } = toRefs(data);
// ! 树形------------------------------------------------------------------------
interface Tree {
@@ -222,15 +212,15 @@ const defaultProps = {
label: 'label'
};
// ! 树形------------------------------------------------------------------------
const treedata = ref([]);
function gettree() {
treedata.value = [];
const treated = ref([]);
function better() {
treated.value = [];
houseStore.getCurrentVilageTreeHouse().then((res) => {
treedata.value = res;
treated.value = res;
});
}
gettree();
better();
/** 查询住户管理列表 */
const getList = async () => {
@@ -240,7 +230,7 @@ const getList = async () => {
.then((res) => {
residentList.value = res.rows;
residentList.value.forEach((item) => {
const arr = getHousePathById(treedata.value, item.houseId, 'label');
const arr = getHousePathById(treated.value, item.houseId, 'label');
item.houseAddress = arr.join(' ');
});
total.value = res.total;
@@ -295,7 +285,7 @@ const handleAdd = () => {
};
/** 修改按钮操作 */
const handleUpdate = async (row?: ResidentVO) => {
const handleUpdate = (row?: ResidentVO) => {
const _id = row?.id || ids.value[0];
router.push({
path: '/house/editResident',