完成水电表列表

This commit is contained in:
Zy
2026-04-18 18:14:07 +08:00
parent 9a95e2b7e3
commit d0888c6afb
115 changed files with 2842 additions and 343 deletions

View File

@@ -119,6 +119,7 @@ import { useUserStore } from '@/store/modules/user';
import { CascaderValue } from 'element-plus';
import { addVillageAPI, editVillageAPI, getVillageByIdAPI, uploadVillageImageAPI } from '@/api/system/community/index';
import { communitylist_rows_type } from '@/api/system/community/type';
const route = useRoute();
const router = useRouter();
const editId = ref(route.query.id as string);
@@ -151,6 +152,7 @@ const formRef = ref();
const uploadRef = ref();
const form = ref<communitylist_rows_type>({
villageId: null,
villageName: '',
villageCode: '',
address: '',
@@ -182,7 +184,8 @@ const rules = ref({
/** 获取编辑小区的信息 */
function getCommunityinfo() {
getVillageByIdAPI(editId.value).then((res) => {
const id = Number(editId.value);
getVillageByIdAPI(id).then((res) => {
city.value = (res.data.city as string).split('/');
if (res.data.villageImageUrl) {
villageImg.value = res.data.villageImageUrl
@@ -203,6 +206,7 @@ function getCommunityinfo() {
});
}
if (isedit.value) {
console.log('编辑小区id', editId.value, typeof editId.value, Boolean(editId.value));
getCommunityinfo();
}
// 请求头
@@ -308,48 +312,47 @@ const submitForm = () => {
function submitFormInfo() {
if (form.value.managePhone.trim()) {
if (reg.phone.test(form.value.managePhone)) {
if (!reg.phone.test(form.value.managePhone)) {
ElMessage.error('请输入正确的手机号码');
return;
}
}
if (form.value.manageVx.trim()) {
if (reg.wechat.test(form.value.manageVx)) {
if (!reg.wechat.test(form.value.manageVx)) {
ElMessage.error('请输入正确的微信号');
return;
}
}
if (form.value.manageQq.trim()) {
if (reg.qq.test(form.value.manageQq)) {
if (!reg.qq.test(form.value.manageQq)) {
ElMessage.error('请输入正确的QQ号码');
return;
}
}
if (form.value.manageEmail.trim()) {
if (reg.email.test(form.value.manageEmail)) {
if (!reg.email.test(form.value.manageEmail)) {
ElMessage.error('请输入正确的邮箱号码');
return;
}
}
if (isedit.value) {
console.log('编辑小区提交的数据', form.value);
editVillageAPI<communitylist_rows_type>(form.value).then((res) => {
ElMessage.success('编辑成功');
router.push({
path: '/community'
});
cancelForm();
});
} else {
addVillageAPI<communitylist_rows_type>(form.value).then((res) => {
ElMessage.success('添加成功');
router.push({
path: '/community'
});
cancelForm();
});
}
}
const cancelForm = () => {
console.log('取消');
router.push({
path: '/community'
});
};
</script>

View File

@@ -14,7 +14,7 @@
</div>
<div class="communityBody">
<div class="coummunity_card" v-for="(item, index) in list" :key="index">
<el-image :src="item.villageImageUrl ? item.villageImageUrl.split(',')[0] : ''">
<el-image :src="item.villageImageUrl ? splitImages(item.villageImageUrl.split(',')[0]) : defaultVilageinfoImage">
<template #error>
<div class="image-viewer-slot image-slot">
<el-icon><Picture /></el-icon>
@@ -44,11 +44,13 @@
</div>
</template>
<script lang="ts" setup>
import defaultVilageinfoImage from '@/assets/images/villageimage.png';
import Navbar from '@/layout/components/Navbar.vue';
import { deleteVillageByIdAPI, switchVillageAPI, getCommunitylistAPI } from '@/api/system/community/index';
import type { communitylist_rows_type } from '@/api/system/community/type';
import { Picture } from '@element-plus/icons-vue';
import { useHouseStore } from '@/store/modules/house';
import { splitImages } from '@/utils';
const houseStore = useHouseStore();
const router = useRouter();
const list = ref<communitylist_rows_type[]>([]);

View File

@@ -27,7 +27,7 @@
</el-form-item>
<div class="remberBox">
<el-checkbox v-model="loginForm.rememberMe" style="color: #fff">{{ proxy.$t('login.rememberPassword') }}</el-checkbox>
<el-button class="hoverbutn" text>忘记密码</el-button>
<!-- <el-button class="hoverbutn" text>忘记密码</el-button> -->
</div>
<el-form-item style="width: 100%">
@@ -98,7 +98,6 @@ const handleLogin = () => {
loginRef.value?.validate(async (valid: boolean, fields: any) => {
if (valid) {
loading.value = true;
// 勾选了需要记住密码设置在 localStorage 中设置记住用户名和密码
if (loginForm.value.rememberMe) {
localStorage.setItem('tenantId', String(loginForm.value.tenantId));
localStorage.setItem('username', String(loginForm.value.username));

View File

@@ -5,8 +5,8 @@
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form-item label="标题" prop="titile">
<el-input v-model="queryParams.titile" placeholder="请输入标题" clearable @keyup.enter="handleQuery" />
<el-form-item label="标题" prop="title">
<el-input v-model="queryParams.title" placeholder="请输入标题" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
@@ -105,7 +105,7 @@ const dialog = reactive<DialogOption>({
const initFormData: ActivityForm = {
id: undefined,
titile: undefined,
title: undefined,
author: undefined,
content: undefined,
status: undefined,
@@ -117,7 +117,7 @@ const data = reactive<PageData<ActivityForm, ActivityQuery>>({
queryParams: {
pageNum: 1,
pageSize: 10,
titile: undefined,
title: undefined,
author: undefined,
content: undefined,
status: undefined,

View File

@@ -5,11 +5,11 @@
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form-item label="月卡状态" prop="payMethod">
<!-- <el-form-item label="月卡状态" prop="payMethod">
<el-select v-model="queryParams.parkingStatus" placeholder="请选择" clearable>
<el-option v-for="dict in com_month_card_status" :key="dict.value" :label="dict.label" :value="Number(dict.value)" />
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item label="月卡编号" prop="cardCode">
<el-input v-model="queryParams.cardCode" placeholder="请输入月卡编号" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -62,11 +62,11 @@
<dict-tag :options="com_pay_method" :value="scope.row.payMethod" />
</template>
</el-table-column>
<el-table-column label="月卡状态" align="center" prop="payMethod">
<!-- <el-table-column label="月卡状态" align="center" prop="payMethod">
<template #default="scope">
<dict-tag :options="com_pay_method" :value="scope.row.payMethod" />
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="备注" align="center" prop="remark"></el-table-column>
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">

View File

@@ -0,0 +1,165 @@
<template>
<div class="p-2 h-full flex flex-col">
<div class="container_box">
<div class="titlebox flex justify-between items-center">
<span>问卷内容</span>
<el-button link type="primary" @click="router.back()">返回</el-button>
</div>
<div class="contentBox h-full" v-loading="viewLoading">
<div class="detail-header">
<h2>{{ viewData.title }}</h2>
<p style="color: #666">{{ viewData.description }}</p>
</div>
<el-divider />
<div class="detail-content">
<div v-for="(q, index) in viewData.content" :key="q.cid" class="question-item">
<div class="title">
<span style="font-weight: bold">{{ index + 1 }}. {{ q.title }}</span>
<span style="color: #f56c6c; margin-left: 5px" v-if="q.required">*</span>
</div>
<div class="type-tag">
<el-tag size="small">{{ getComponentLabel(q.type) }}</el-tag>
</div>
<!-- 单选题/多选题选项展示 -->
<div v-if="q.type === 'radio' || q.type === 'checkbox'" class="options">
<div v-for="(opt, idx) in q.options" :key="idx" class="option-item">
<span>{{ opt.label }}</span>
</div>
</div>
<!-- 填空题/多行文本展示 -->
<div v-else-if="q.type === 'input'" class="input-placeholder">
<el-input v-model="q.placeholder" placeholder="用户输入区域" />
</div>
<div v-else-if="q.type === 'textarea'" class="input-placeholder">
<el-input type="textarea" v-model="q.placeholder" placeholder="用户输入区域" />
</div>
</div>
</div>
<el-divider />
<div>
<span>备注: {{ viewData.remark ? viewData.remark : '暂无' }}</span>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { getQuestionnaire } from '@/api/system/Questionnaire';
import { QuestionComponentItem } from '@/api/system/Questionnaire/type';
import { ref } from 'vue';
const viewLoading = ref(false);
const viewData = ref({
'id': '',
'villageId': null,
'title': '',
'description': '',
'content': [] as QuestionComponentItem[],
'status': '0',
'scope': '0',
'residents': '',
'startTime': '2026-04-03 00:00:00',
'endTime': '2026-04-09 00:00:00',
'remark': ''
});
const router = useRouter();
const route = useRoute();
const viewid = ref(null);
// 组件库定义(用于获取类型名称)
const componentList = [
{ type: 'radio', label: '单选题' },
{ type: 'checkbox', label: '多选题' },
{ type: 'input', label: '填空题' },
{ type: 'textarea', label: '多行文本' }
];
// 辅助方法:获取组件名称
function getComponentLabel(type) {
const item = componentList.find((c) => c.type === type);
return item ? item.label : '';
}
function init() {
if (route.query.id) {
viewid.value = route.query.id;
}
viewLoading.value = true;
getQuestionnaire(viewid.value).then((res) => {
viewData.value = {
...viewData.value,
...res.data
};
if (typeof res.data.content === 'string') {
viewData.value.content = JSON.parse(res.data.content) as QuestionComponentItem[];
} else {
viewData.value.content = res.data.content as QuestionComponentItem[];
}
console.log('问卷内容:', viewData.value);
viewLoading.value = false;
});
}
init();
</script>
<style scoped lang="scss">
.titlebox {
height: 50px;
line-height: 50px;
margin-bottom: 20px;
border-bottom: 1px solid #eee;
}
.container_box {
background-color: white;
height: inherit;
font-size: 16px;
padding: 20px;
}
.contentBox {
width: 1200px;
margin: 0 auto;
}
.detail-header {
margin-bottom: 20px;
h2 {
text-align: center;
}
}
.question-item {
margin-bottom: 25px;
padding: 15px;
border-radius: 8px;
background: #fafafa;
.title {
margin-bottom: 8px;
}
.type-tag {
margin-bottom: 12px;
}
.options {
margin-top: 10px;
.option-item {
display: flex;
align-items: center;
margin-bottom: 8px;
color: #666;
.el-icon {
margin-right: 8px;
color: #909399;
}
}
}
.input-placeholder {
margin-top: 10px;
}
}
</style>

View File

@@ -62,24 +62,9 @@
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" fixed="right" width="200">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button
link
type="primary"
icon="Edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['questionnaire:questionnaire:edit']"
></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button
link
type="primary"
icon="Delete"
@click="handleDelete(scope.row)"
v-hasPermi="['questionnaire:questionnaire:remove']"
></el-button>
</el-tooltip>
<el-button link type="primary" @click="handleView(scope.row)">查看</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['questionnaire:questionnaire:edit']">修改</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['questionnaire:questionnaire:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -207,6 +192,15 @@ const handleUpdate = async (row?: QuestionnaireVO) => {
});
};
// 查看按钮操作
const handleView = (row: QuestionnaireVO) => {
router.push({
path: '/repair/QuestionnaireView',
query: {
id: row.id
}
});
};
/** 提交按钮 */
const submitForm = () => {
questionnaireFormRef.value?.validate(async (valid: boolean) => {

View File

@@ -74,7 +74,7 @@
:initial-index="0"
v-for="(item, index) in form.problemImageUrlList"
:key="index"
:src="item"
:src="splitImages(item)"
class="carinfoImage"
></el-image>
</div>
@@ -156,6 +156,7 @@ import { listResident } from '@/api/system/resident';
import { RepairVO } from '@/api/system/Repair/type';
import { useHouseStore } from '@/store/modules/house';
import { listRepairProcess, updateRepairProcess } from '@/api/system/repairProcess';
import { splitImages } from '@/utils';
const houseStore = useHouseStore();
const { treedata } = storeToRefs(houseStore);

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader title="收银台管理"></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,113 @@
<template>
<div class="p-2">
<PageHeader></PageHeader>
<div class="EditBody">
<div class="title">
<div>基本信息</div>
</div>
<div class="bodybox">
<el-form label-width="100px" label-position="right">
<el-form-item label="设备编码" prop="deviceCode">
<el-input v-model="form.deviceCode" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="地址" prop="address">
<el-input v-model="form.address" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="分合状态">
<el-radio-group v-model="form.electricityRecord.status">
<el-radio v-for="(item, index) in com_electricity_readrecord_status" :key="index" :value="item.value" :label="item.label"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-button type="primary">提交</el-button>
<el-button @click="routeback">返回</el-button>
</el-form-item>
</el-form>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { getElectricityDevice } from '@/api/system/SdbElectricityDevice';
import PageHeader from '@/components/Pageheader/index.vue';
import { ref } from 'vue';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_electricity_readrecord_status } = toRefs<any>(proxy?.useDict('com_electricity_readrecord_status'));
const route = useRoute();
const router = useRouter();
const form = ref({
id: null,
'deviceCode': '',
'address': '',
electricityRecord: {
'status': '1'
}
});
const editid = ref(null);
function init() {
if (route.query.id) {
editid.value = route.query.id;
getElectricityDevice(editid.value).then((res) => {
form.value = {
...form.value,
...res.data
};
});
}
}
init();
function routeback() {
router.back();
}
</script>
<style scoped lang="scss">
.EditBody {
margin-top: 20px;
padding: 30px;
background-color: white;
.bodybox {
width: 600px;
margin: 0 auto;
margin-top: 20px;
}
.week-items {
width: 90px;
height: 30px;
line-height: 30px;
border-radius: 5px;
cursor: pointer;
margin: 10px 5px;
background-color: #ccc;
color: #000;
display: flex;
align-items: center;
.iconbox {
width: 30px;
height: 30px;
margin-left: 5px;
text-align: center;
line-height: 30px;
}
&.active {
color: rgba(26, 117, 255, 1);
background-color: rgba(26, 117, 255, 0.15);
}
}
.mapbox {
margin-top: 20px;
width: 100%;
height: 400px;
border: 1px solid #ccc;
}
}
</style>

View File

@@ -0,0 +1,264 @@
<template>
<div class="h-full flex flex-col p-2">
<pageheader></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">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form-item label="设备编码" prop="deviceCode">
<el-input v-model="queryParams.deviceCode" placeholder="请输入设备编码" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</transition>
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button :disabled="true" type="warning" plain @click="handleExport">导入</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</template>
<el-table v-loading="loading" border :data="electricityDeviceList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="设备编码" align="center" prop="deviceCode" />
<el-table-column label="设备状态" align="center">
<template #default="scope">
<DictTag :options="com_waterdevice_on_status" :value="scope.row.status"></DictTag>
</template>
</el-table-column>
<el-table-column label="分合状态" align="center">
<template #default="scope">
<div class="readRecord" v-if="scope.row.electricityRecord">
<DictTag :options="com_electricity_readrecord_status" :value="scope.row.electricityRecord.status"></DictTag>
</div>
</template>
</el-table-column>
<el-table-column label="余额" align="center" width="80">
<template #default="scope">
<span v-if="scope.row.electricityRecord">{{ scope.row.electricityRecord.balance }}</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column label="图片" width="85" align="center" prop="deleted">
<template #default="scope">
<el-image
v-if="scope.row.url && scope.row.url.includes('http')"
:src="scope.row.url"
:preview-src-list="[scope.row.url]"
style="width: 40px; height: 40px; border-radius: 4px; margin-right: 5px"
fit="cover"
preview-teleported
/>
<span v-else>暂未生成</span>
</template>
</el-table-column>
<el-table-column label="抄表时间" align="center">
<template #default="scope">
<span>{{ scope.row.waterRecord ? scope.row.waterRecord.readTime : '--' }}</span>
</template>
</el-table-column>
<el-table-column label="设备地址" align="center" prop="address" />
<el-table-column label="操作" align="center" fixed="right">
<template #default="scope">
<el-button link type="primary" @click="handleProject(scope.row)">生成二维码</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:electricityDevice:edit']">修改</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:electricityDevice:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
</el-card>
<!-- 添加或修改电设备对话框 -->
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
<el-form ref="electricityDeviceFormRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="设备编码" prop="deviceCode">
<el-input v-model="form.deviceCode" placeholder="请输入设备编码" />
</el-form-item>
<el-form-item label="安装地址" prop="address">
<el-input v-model="form.address" placeholder="请输入安装地址" />
</el-form-item>
<el-form-item label="0.未删除1.删除" prop="deleted">
<el-input v-model="form.deleted" placeholder="请输入0.未删除1.删除" />
</el-form-item>
<el-form-item label="" prop="url">
<el-input v-model="form.url" placeholder="请输入" />
</el-form-item>
<el-form-item label="" prop="openid">
<el-input v-model="form.openid" placeholder="请输入" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="ElectricityDevice" lang="ts">
import {
listElectricityDevice,
getElectricityDevice,
delElectricityDevice,
addElectricityDevice,
updateElectricityDevice
} from '@/api/system/SdbElectricityDevice/index';
import { ElectricityDeviceVO, ElectricityDeviceQuery, ElectricityDeviceForm } from '@/api/system/SdbElectricityDevice/type';
import { splitImages } from '@/utils';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_waterdevice_on_status } = toRefs<any>(proxy?.useDict('com_waterdevice_on_status'));
const { com_electricity_readrecord_status } = toRefs<any>(proxy?.useDict('com_electricity_readrecord_status'));
const electricityDeviceList = ref<ElectricityDeviceVO[]>([]);
const buttonLoading = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref<Array<string | number>>([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const queryFormRef = ref<ElFormInstance>();
const electricityDeviceFormRef = ref<ElFormInstance>();
const dialog = reactive<DialogOption>({
visible: false,
title: ''
});
const initFormData: ElectricityDeviceForm = {
id: undefined,
deviceCode: undefined,
address: undefined,
deleted: undefined,
url: undefined,
openid: undefined
};
const data = reactive<PageData<ElectricityDeviceForm, ElectricityDeviceQuery>>({
form: { ...initFormData },
queryParams: {
pageNum: 1,
pageSize: 10,
deviceCode: undefined,
address: undefined,
deleted: undefined,
url: undefined,
openid: undefined,
params: {}
}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询电设备列表 */
const getList = async () => {
loading.value = true;
const res = await listElectricityDevice(queryParams.value);
electricityDeviceList.value = res.rows;
total.value = res.total;
loading.value = false;
};
/** 取消按钮 */
const cancel = () => {
reset();
dialog.visible = false;
};
/** 表单重置 */
const reset = () => {
form.value = { ...initFormData };
electricityDeviceFormRef.value?.resetFields();
};
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.value.pageNum = 1;
getList();
};
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value?.resetFields();
handleQuery();
};
/** 多选框选中数据 */
const handleSelectionChange = (selection: ElectricityDeviceVO[]) => {
ids.value = selection.map((item) => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
};
const router = useRouter();
/** 新增按钮操作 */
const handleAdd = () => {
router.push({
path: '/sdb/addSdbElectricityDevice'
});
};
/** 修改按钮操作 */
const handleUpdate = async (row?: ElectricityDeviceVO) => {
router.push({
path: '/sdb/addSdbElectricityDevice',
query: { id: row?.id }
});
};
/** 提交按钮 */
const submitForm = () => {
electricityDeviceFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
buttonLoading.value = true;
if (form.value.id) {
await updateElectricityDevice(form.value).finally(() => (buttonLoading.value = false));
} else {
await addElectricityDevice(form.value).finally(() => (buttonLoading.value = false));
}
proxy?.$modal.msgSuccess('操作成功');
dialog.visible = false;
await getList();
}
});
};
const handleProject = (row) => {
row.url = 'https://www.bugtc.com/static/dsb/20260107/272d59d5-bff1-49b3-b899-046169c07257.png';
};
/** 删除按钮操作 */
const handleDelete = async (row?: ElectricityDeviceVO) => {
const _ids = row?.id || ids.value;
await proxy?.$modal.confirm('是否确认删除电设备编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
await delElectricityDevice(_ids);
proxy?.$modal.msgSuccess('删除成功');
await getList();
};
/** 导出按钮操作 */
const handleExport = () => {
proxy?.$modal.msgError('暂不支持导出功能');
};
onMounted(() => {
getList();
});
</script>
<style lang="scss" scoped>
.el-table {
height: calc(100% - 80px);
}
</style>

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader title="电表管理"></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader title="预存款管理"></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,283 @@
<template>
<div class="flex flex-col h-full p-2">
<pageheader></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">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form-item label="充值金额" prop="rechargeAmount">
<el-input v-model="queryParams.rechargeAmount" placeholder="请输入充值金额" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="充值时间" prop="rechargeTime">
<el-date-picker clearable v-model="queryParams.rechargeTime" type="date" value-format="YYYY-MM-DD" placeholder="请选择充值时间" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</transition>
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['topupRecord:topupRecord:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['topupRecord:topupRecord:edit']"
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['topupRecord:topupRecord:remove']"
>删除</el-button
>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['topupRecord:topupRecord:export']">导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</template>
<el-table v-loading="loading" border :data="topupRecordList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="充值时间" align="center" prop="rechargeTime" width="180">
<template #default="scope">
<span>{{ parseTime(scope.row.rechargeTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="订单表" align="center" prop="orderId" />
<el-table-column label="充值金额" align="center" prop="rechargeAmount" />
<el-table-column label="类型" align="center" prop="type">
<template #default="scope">
<DictTag :options="com_waterelectricity_topup_type" :value="scope.row.type"></DictTag>
</template>
</el-table-column>
<el-table-column label="订单状态" align="center" prop="status">
<template #default="scope">
<DictTag :options="com_waterelectricity_topup_status" :value="scope.row.status"></DictTag>
</template>
</el-table-column>
<el-table-column label="缴费状态" align="center" prop="getOver">
<template #default="scope">
<DictTag :options="com_waterelectricity_topup_getOver" :value="scope.row.getOver"></DictTag>
</template>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['topupRecord:topupRecord:edit']"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button
link
type="primary"
icon="Delete"
@click="handleDelete(scope.row)"
v-hasPermi="['topupRecord:topupRecord:remove']"
></el-button>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
</el-card>
<!-- 添加或修改充值记录对话框 -->
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
<el-form ref="topupRecordFormRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="用户ID" prop="userId">
<el-input v-model="form.userId" placeholder="请输入用户ID" />
</el-form-item>
<el-form-item label="充值金额" prop="rechargeAmount">
<el-input v-model="form.rechargeAmount" placeholder="请输入充值金额" />
</el-form-item>
<el-form-item label="充值时间" prop="rechargeTime">
<el-date-picker clearable v-model="form.rechargeTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择充值时间">
</el-date-picker>
</el-form-item>
<el-form-item label="设备ID" prop="deviceCode">
<el-input v-model="form.deviceCode" placeholder="请输入设备ID" />
</el-form-item>
<el-form-item label="订单表" prop="orderId">
<el-input v-model="form.orderId" placeholder="请输入订单表" />
</el-form-item>
<el-form-item label="0.待接收 1.已接收" prop="getOver">
<el-input v-model="form.getOver" placeholder="请输入0.待接收 1.已接收" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="TopupRecord" lang="ts">
import { listTopupRecord, getTopupRecord, delTopupRecord, addTopupRecord, updateTopupRecord } from '@/api/system/SdbTopupRecord';
import { TopupRecordVO, TopupRecordQuery, TopupRecordForm } from '@/api/system/SdbTopupRecord/type';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_waterelectricity_topup_type } = toRefs<any>(proxy?.useDict('com_waterelectricity_topup_type'));
const { com_waterelectricity_topup_status } = toRefs<any>(proxy?.useDict('com_waterelectricity_topup_status'));
const { com_waterelectricity_topup_getOver } = toRefs<any>(proxy?.useDict('com_waterelectricity_topup_getOver'));
const topupRecordList = ref<TopupRecordVO[]>([]);
const buttonLoading = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref<Array<string | number>>([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const queryFormRef = ref<ElFormInstance>();
const topupRecordFormRef = ref<ElFormInstance>();
const dialog = reactive<DialogOption>({
visible: false,
title: ''
});
const initFormData: TopupRecordForm = {
id: undefined,
userId: undefined,
rechargeAmount: undefined,
rechargeTime: undefined,
deviceCode: undefined,
orderId: undefined,
type: undefined,
status: undefined,
getOver: undefined
};
const data = reactive<PageData<TopupRecordForm, TopupRecordQuery>>({
form: { ...initFormData },
queryParams: {
pageNum: 1,
pageSize: 10,
userId: undefined,
rechargeAmount: undefined,
rechargeTime: undefined,
deviceCode: undefined,
orderId: undefined,
type: undefined,
status: undefined,
getOver: undefined,
params: {}
},
rules: {}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询充值记录列表 */
const getList = async () => {
loading.value = true;
const res = await listTopupRecord(queryParams.value);
topupRecordList.value = res.rows;
total.value = res.total;
loading.value = false;
};
/** 取消按钮 */
const cancel = () => {
reset();
dialog.visible = false;
};
/** 表单重置 */
const reset = () => {
form.value = { ...initFormData };
topupRecordFormRef.value?.resetFields();
};
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.value.pageNum = 1;
getList();
};
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value?.resetFields();
handleQuery();
};
/** 多选框选中数据 */
const handleSelectionChange = (selection: TopupRecordVO[]) => {
ids.value = selection.map((item) => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
};
/** 新增按钮操作 */
const handleAdd = () => {
reset();
dialog.visible = true;
dialog.title = '添加充值记录';
};
/** 修改按钮操作 */
const handleUpdate = async (row?: TopupRecordVO) => {
reset();
const _id = row?.id || ids.value[0];
const res = await getTopupRecord(_id);
Object.assign(form.value, res.data);
dialog.visible = true;
dialog.title = '修改充值记录';
};
/** 提交按钮 */
const submitForm = () => {
topupRecordFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
buttonLoading.value = true;
if (form.value.id) {
await updateTopupRecord(form.value).finally(() => (buttonLoading.value = false));
} else {
await addTopupRecord(form.value).finally(() => (buttonLoading.value = false));
}
proxy?.$modal.msgSuccess('操作成功');
dialog.visible = false;
await getList();
}
});
};
/** 删除按钮操作 */
const handleDelete = async (row?: TopupRecordVO) => {
const _ids = row?.id || ids.value;
await proxy?.$modal.confirm('是否确认删除充值记录编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
await delTopupRecord(_ids);
proxy?.$modal.msgSuccess('删除成功');
await getList();
};
/** 导出按钮操作 */
const handleExport = () => {
proxy?.download(
'topupRecord/topupRecord/export',
{
...queryParams.value
},
`topupRecord_${new Date().getTime()}.xlsx`
);
};
onMounted(() => {
getList();
});
</script>
<style lang="scss" scoped>
.el-table {
height: calc(100% - 80px);
}
</style>

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader title="充值记录"></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,259 @@
<template>
<div class="h-full flex flex-col p-2">
<pageheader></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">
<el-form ref="queryFormRef" label-width="100px" :model="queryParams" :inline="true">
<el-form-item label="水表设备编码" prop="deviceCode">
<el-input v-model="queryParams.deviceCode" placeholder="请输入水表设备编码" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</transition>
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd">导入</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</template>
<el-table v-loading="loading" border :data="waterDeviceList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="水表设备编码" align="center" prop="deviceCode" />
<el-table-column label="地址" align="center" prop="address" />
<el-table-column label="设备状态" align="center" prop="deleted">
<template #default="scope">
<dict-tag :options="com_waterdevice_on_status" :value="scope.row.deleted"></dict-tag>
</template>
</el-table-column>
<el-table-column label="分合状态" align="center">
<template #default="scope">
<div class="readRecord" v-if="scope.row.waterRecord">
<el-tag type="success" v-if="scope.row.waterRecord.status == 1">供水</el-tag>
<el-tag type="info" v-else>断水</el-tag>
</div>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column label="图片" align="center" prop="deleted">
<template #default="scope">
<el-image
v-if="scope.row.url && scope.row.url.includes('http')"
:src="scope.row.url"
:preview-src-list="[scope.row.url]"
style="width: 40px; height: 40px; border-radius: 4px; margin-right: 5px"
fit="cover"
preview-teleported
/>
<span v-else>暂未生成</span>
</template>
</el-table-column>
<el-table-column label="抄表时间" align="center">
<template #default="scope">
<span>{{ scope.row.waterRecord ? scope.row.waterRecord.readTime : '--' }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleProject(scope.row)">生成二维码</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:waterDevice:edit']">修改</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:waterDevice:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
</el-card>
<!-- 添加或修改水 设备对话框 -->
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
<el-form ref="waterDeviceFormRef" :model="form" :rules="rules" label-width="100px">
<el-form-item label="水表设备编码" prop="deviceCode">
<el-input v-model="form.deviceCode" placeholder="请输入水表设备编码" />
</el-form-item>
<el-form-item label="地址" prop="address">
<el-input v-model="form.address" placeholder="请输入地址" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="WaterDevice" lang="ts">
import { listWaterDevice, getWaterDevice, delWaterDevice, addWaterDevice, updateWaterDevice } from '@/api/system/SdbWaterDevice/index';
import { WaterDeviceVO, WaterDeviceQuery, WaterDeviceForm } from '@/api/system/SdbWaterDevice/type';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_waterdevice_on_status } = toRefs<any>(proxy?.useDict('com_waterdevice_on_status'));
const waterDeviceList = ref<WaterDeviceVO[]>([]);
const buttonLoading = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref<Array<string | number>>([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const queryFormRef = ref<ElFormInstance>();
const waterDeviceFormRef = ref<ElFormInstance>();
const splitImages = (url) => {
if (!url) return '';
const imgUrl = import.meta.env.VITE_IMG_URL + url;
return imgUrl;
};
const dialog = reactive<DialogOption>({
visible: false,
title: ''
});
const initFormData: WaterDeviceForm = {
id: undefined,
deviceCode: undefined,
address: undefined,
deleted: undefined,
url: undefined,
openid: undefined
};
const data = reactive<PageData<WaterDeviceForm, WaterDeviceQuery>>({
form: { ...initFormData },
queryParams: {
pageNum: 1,
pageSize: 10,
deviceCode: undefined,
address: undefined,
deleted: undefined,
url: undefined,
openid: undefined,
params: {}
},
rules: {
id: [{ required: true, message: 'id不能为空', trigger: 'blur' }]
}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询水 设备列表 */
const getList = async () => {
loading.value = true;
const res = await listWaterDevice(queryParams.value);
waterDeviceList.value = res.rows;
total.value = res.total;
loading.value = false;
};
/** 取消按钮 */
const cancel = () => {
reset();
dialog.visible = false;
};
/** 表单重置 */
const reset = () => {
form.value = { ...initFormData };
waterDeviceFormRef.value?.resetFields();
};
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.value.pageNum = 1;
getList();
};
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value?.resetFields();
handleQuery();
};
/** 多选框选中数据 */
const handleSelectionChange = (selection: WaterDeviceVO[]) => {
ids.value = selection.map((item) => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
};
/** 新增按钮操作 */
const handleAdd = () => {
reset();
dialog.visible = true;
dialog.title = '添加水 设备';
};
/** 修改按钮操作 */
const handleUpdate = async (row?: WaterDeviceVO) => {
reset();
const _id = row?.id || ids.value[0];
const res = await getWaterDevice(_id);
Object.assign(form.value, res.data);
dialog.visible = true;
dialog.title = '修改水 设备';
};
/** 提交按钮 */
const submitForm = () => {
waterDeviceFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
buttonLoading.value = true;
if (form.value.id) {
await updateWaterDevice(form.value).finally(() => (buttonLoading.value = false));
} else {
await addWaterDevice(form.value).finally(() => (buttonLoading.value = false));
}
proxy?.$modal.msgSuccess('操作成功');
dialog.visible = false;
await getList();
}
});
};
/** 删除按钮操作 */
const handleDelete = async (row?: WaterDeviceVO) => {
const _ids = row?.id || ids.value;
await proxy?.$modal.confirm('是否确认删除水 设备编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
await delWaterDevice(_ids);
proxy?.$modal.msgSuccess('删除成功');
await getList();
};
const handleProject = (row) => {
row.url = 'https://www.bugtc.com/static/dsb/20260107/272d59d5-bff1-49b3-b899-046169c07257.png';
};
/** 导出按钮操作 */
const handleExport = () => {
proxy?.download(
'system/waterDevice/export',
{
...queryParams.value
},
`waterDevice_${new Date().getTime()}.xlsx`
);
};
onMounted(() => {
getList();
});
</script>
<style lang="scss" scoped>
.el-table {
height: calc(100% - 80px);
}
</style>

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader title="水表管理"></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -56,7 +56,7 @@
<div>通行证</div>
<div class="content-imageBox">
<i></i>
<el-image :src="form.url"></el-image>
<el-image :src="splitImages(form.url)"></el-image>
</div>
</div>
</el-col>
@@ -86,6 +86,7 @@ import { ref } from 'vue';
import PageHeader from '@/components/Pageheader/index.vue';
import { getVisitor } from '@/api/system/Visitor';
import { formatTimeDiff } from '@/utils/time';
import { splitImages } from '@/utils';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { sys_user_sex } = toRefs<any>(proxy?.useDict('sys_user_sex'));

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -57,7 +57,7 @@
<div class="descriptionsbox">
<div class="label">房屋照片:</div>
<div class="value grid grid-cols-4 gap-4">
<el-image v-for="(item, index) in HouseInfo.houseImageUrls" :key="index" :src="item" class="houseImage"></el-image>
<el-image v-for="(item, index) in HouseInfo.houseImageUrls" :key="index" :src="splitImages(item)" class="houseImage"></el-image>
</div>
</div>
</el-col>
@@ -91,6 +91,7 @@ import { getHouseRental } from '@/api/system/houseRental';
import { useHouseStore } from '@/store/modules/house';
import { getHousePathById } from '@/utils/house';
import { listHouseFacilities } from '@/api/system/HouseFacilities';
import { splitImages } from '@/utils';
const houseStore = useHouseStore();
const { treedata } = storeToRefs(houseStore);

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,13 @@
<template>
<div class="p-2 h-full flex flex-col">
<PageHeader></PageHeader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import PageHeader from '@/components/Pageheader/index.vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,13 @@
<template>
<div class="p-2 h-full flex flex-col">
<PageHeader></PageHeader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import PageHeader from '@/components/Pageheader/index.vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -7,11 +7,11 @@
</div>
<div class="bodybox">
<el-form label-width="100px" label-position="right">
<el-form-item label="巡检计划名称">
<el-input placeholder="请输入"></el-input>
<el-form-item label="巡检计划名称" prop="planName">
<el-input v-model="form.planName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="巡检人员">
<el-input placeholder="请输入"></el-input>
<el-form-item label="巡检人员" prop="inspectorIds">
<el-input v-model="form.inspectorIds" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="执行周期">
<el-date-picker
@@ -61,7 +61,7 @@
<el-select v-model="form.routeIds" placeholder="Select" style="width: 100%">
<el-option v-for="item in routeIdsoptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<div class="mapbox">123</div>
<div class="mapbox"></div>
</el-form-item>
<el-form-item>
<el-button type="primary">提交</el-button>

View File

@@ -1,5 +1,6 @@
<template>
<div class="p-2">
<Pageheader></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">
@@ -113,10 +114,7 @@ const data = reactive<PageData<PlanForm, PlanQuery>>({
executeDay: undefined,
params: {}
},
rules: {
id: [{ required: true, message: '主键ID不能为空', trigger: 'blur' }],
planName: [{ required: true, message: '巡检计划名称不能为空', trigger: 'blur' }]
}
rules: {}
});
const { queryParams, form, rules } = toRefs(data);
@@ -165,14 +163,14 @@ const router = useRouter();
/** 新增按钮操作 */
const handleAdd = () => {
router.push({
path: '/Inspection/addInspectionPlan'
path: '/tool/addInspectionPlan'
});
};
/** 修改按钮操作 */
const handleUpdate = async (row?: PlanVO) => {
router.push({
path: '/Inspection/addInspectionPlan',
path: '/tool/addInspectionPlan',
query: {
id: row.id
}

View File

@@ -0,0 +1,9 @@
<template>
<div class=" "></div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,221 @@
<template>
<div class="p-2">
<PageHeader></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">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form-item label="巡检点名称" prop="pointName">
<el-input v-model="queryParams.pointName" placeholder="请输入巡检点名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</transition>
<el-card shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:point:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:point:edit']">修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:point:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</template>
<el-table v-loading="loading" border :data="pointList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="巡检点名称" align="center" prop="pointName" />
<el-table-column label="巡检项目id" align="center" prop="itemId" />
<el-table-column label="打卡方式9999定位打卡、9998蓝牙打卡、9997NFC打卡" align="center" prop="checkMode" />
<el-table-column label="巡检点位置" align="center" prop="location" />
<el-table-column label="状态0-开启1-关闭" align="center" prop="status" />
<el-table-column label="添加人" align="center" prop="isCheck" />
<el-table-column label="添加时间" align="center" prop="isCheck" />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:point:edit']"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:point:remove']"></el-button>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
</el-card>
</div>
</template>
<script setup name="Point" lang="ts">
import PageHeader from '@/components/Pageheader/index.vue';
import { listPoint, getPoint, delPoint, addPoint, updatePoint } from '@/api/system/InspectionPoint/index';
import { PointVO, PointQuery, PointForm } from '@/api/system/InspectionPoint/type';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const pointList = ref<PointVO[]>([]);
const buttonLoading = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref<Array<string | number>>([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const queryFormRef = ref<ElFormInstance>();
const pointFormRef = ref<ElFormInstance>();
const dialog = reactive<DialogOption>({
visible: false,
title: ''
});
const initFormData: PointForm = {
id: undefined,
pointName: undefined,
itemId: undefined,
routeId: undefined,
location: undefined,
checkMode: undefined,
status: undefined,
remark: undefined,
pointCode: undefined,
isCheck: undefined
};
const data = reactive<PageData<PointForm, PointQuery>>({
form: { ...initFormData },
queryParams: {
pageNum: 1,
pageSize: 10,
pointName: undefined,
itemId: undefined,
routeId: undefined,
location: undefined,
checkMode: undefined,
status: undefined,
pointCode: undefined,
isCheck: undefined,
params: {}
},
rules: {
id: [{ required: true, message: '主键ID不能为空', trigger: 'blur' }],
pointName: [{ required: true, message: '巡检点名称不能为空', trigger: 'blur' }]
}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询巡检点列表 */
const getList = async () => {
loading.value = true;
const res = await listPoint(queryParams.value);
pointList.value = res.rows;
total.value = res.total;
loading.value = false;
};
/** 取消按钮 */
const cancel = () => {
reset();
dialog.visible = false;
};
/** 表单重置 */
const reset = () => {
form.value = { ...initFormData };
pointFormRef.value?.resetFields();
};
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.value.pageNum = 1;
getList();
};
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value?.resetFields();
handleQuery();
};
/** 多选框选中数据 */
const handleSelectionChange = (selection: PointVO[]) => {
ids.value = selection.map((item) => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
};
const router = useRouter();
/** 新增按钮操作 */
const handleAdd = () => {
router.push({
path: '/inspection/addInspectionPoint'
});
};
/** 修改按钮操作 */
const handleUpdate = async (row?: PointVO) => {
router.push({
path: '/inspection/addInspectionPoint',
query: {
id: row?.id
}
});
};
/** 提交按钮 */
const submitForm = () => {
pointFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
buttonLoading.value = true;
if (form.value.id) {
await updatePoint(form.value).finally(() => (buttonLoading.value = false));
} else {
await addPoint(form.value).finally(() => (buttonLoading.value = false));
}
proxy?.$modal.msgSuccess('操作成功');
dialog.visible = false;
await getList();
}
});
};
/** 删除按钮操作 */
const handleDelete = async (row?: PointVO) => {
const _ids = row?.id || ids.value;
await proxy?.$modal.confirm('是否确认删除巡检点编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
await delPoint(_ids);
proxy?.$modal.msgSuccess('删除成功');
await getList();
};
/** 导出按钮操作 */
const handleExport = () => {
proxy?.download(
'system/point/export',
{
...queryParams.value
},
`point_${new Date().getTime()}.xlsx`
);
};
onMounted(() => {
getList();
});
</script>

View File

@@ -2,7 +2,10 @@
<div class="AddBuildingBox">
<PageHeader title="记录详情"></PageHeader>
<div class="AddBuildingBody">
<div class="title">基本信息</div>
<div class="title flex flex-justify-between flex-items-center">
<span>基本信息</span>
<el-button @click="cancelForm">返回</el-button>
</div>
<div class="addBuildingFormBody">
<div class="infobox">
<div class="label">任务名称 :</div>
@@ -61,7 +64,6 @@
<script setup lang="ts">
import { ref } from 'vue';
import PageHeader from '@/components/Pageheader/index.vue';
import { addMonthCard, getMonthCard, updateMonthCard } from '@/api/system/MonthCard';
import { getRecord } from '@/api/system/InspectionRecord';
import { RecordVO } from '@/api/system/InspectionRecord/type';

View File

@@ -1,17 +1,25 @@
<template>
<div class="p-2">
<PageHeader></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">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form-item label="执行状态" prop="routeId">
<el-input v-model="queryParams.routeId" placeholder="请输入巡检路线ID" clearable @keyup.enter="handleQuery" />
<el-form-item label="执行状态" prop="status">
<el-input v-model="queryParams.status" placeholder="请输入执行状态" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="巡检日期" prop="routeId">
<el-input v-model="queryParams.routeId" placeholder="请输入巡检路线ID" clearable @keyup.enter="handleQuery" />
<el-form-item label="巡检日期" prop="taskTime">
<el-date-picker
v-model="queryParams.taskTime"
@update:model-value="handleDate"
type="daterange"
range-separator="到"
start-placeholder="开始日期"
end-placeholder="结束日期"
/>
</el-form-item>
<el-form-item label="任务名称" prop="routeId">
<el-input v-model="queryParams.routeId" placeholder="请输入巡检路线ID" clearable @keyup.enter="handleQuery" />
<el-form-item label="任务名称" prop="taskName">
<el-input v-model="queryParams.taskName" placeholder="请输入任务名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
@@ -104,23 +112,14 @@ const data = reactive<PageData<RecordForm, RecordQuery>>({
queryParams: {
pageNum: 1,
pageSize: 10,
taskId: undefined,
planId: undefined,
inspectorId: undefined,
routeId: undefined,
startTime: undefined,
endTime: undefined,
execStatus: undefined,
params: {}
},
rules: {
id: [{ required: true, message: '主键ID不能为空', trigger: 'blur' }],
taskId: [{ required: true, message: '关联巡检任务ID不能为空', trigger: 'blur' }],
inspectorId: [{ required: true, message: '巡检人员ID不能为空', trigger: 'blur' }]
taskName: '',
status: '',
taskTime: ''
}
});
const { queryParams, form, rules } = toRefs(data);
const { queryParams, form } = toRefs(data);
/** 查询巡检记录主列表 */
const getList = async () => {
@@ -131,6 +130,11 @@ const getList = async () => {
loading.value = false;
};
//
const handleDate = (val) => {
console.log(val);
};
/** 取消按钮 */
const cancel = () => {
reset();

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -41,7 +41,7 @@
<div class="userinfo_item img">
<div class="title_item">身份证正面</div>
<div class="userinfo_itme_img">
<el-image class="w-full h-full" fit="fill" :src="userInfo.cardImageFront"></el-image>
<el-image class="w-full h-full" fit="fill" :src="splitImages(userInfo.cardImageFront)"></el-image>
</div>
</div>
</el-col>
@@ -143,6 +143,7 @@ import { ref } from 'vue';
import PageHeader from '@/components/Pageheader/index.vue';
import { getResident, getresidentReviewlistAPI, UpdateResidentReviewAPI } from '@/api/system/resident';
import { ResidentVO } from '@/api/system/resident/type';
import { splitImages } from '@/utils';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_review } = toRefs<any>(proxy?.useDict('com_review'));

View File

@@ -140,25 +140,25 @@ const rules = ref({
houseId: [{ required: true, message: '请选择房屋', trigger: 'blur' }],
name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
gender: [{ required: true, message: '请选择性别', trigger: 'blur' }],
// cardImageFront: [{ required: true, message: '请上传身份证照片', trigger: 'blur' }],
// cardImageBack: [{ required: true, message: '请上传身份证照片', trigger: 'blur' }],
// idCard: [
// { required: true, message: '请输入身份证号', trigger: 'blur' },
// {
// validator: (_, value) => validator(value, 'idCard'),
// message: '请输入正确的18位身份证号码',
// trigger: 'blur'
// }
// ],
type: [{ required: true, message: '请选择与业主关系', trigger: 'blur' }]
// phone: [
// { required: true, message: '请输入手机号', trigger: 'blur' },
// {
// validator: (_, value) => validator(value, 'phone'),
// message: '请输入正确的手机号码',
// trigger: 'blur'
// }
// ]
cardImageFront: [{ required: true, message: '请上传身份证照片', trigger: 'blur' }],
cardImageBack: [{ required: true, message: '请上传身份证照片', trigger: 'blur' }],
idCard: [
{ required: true, message: '请输入身份证号', trigger: 'blur' },
{
validator: (_, value) => validator(value, 'idCard'),
message: '请输入正确的18位身份证号码',
trigger: 'blur'
}
],
type: [{ required: true, message: '请选择与业主关系', trigger: 'blur' }],
phone: [
{ required: true, message: '请输入手机号', trigger: 'blur' },
{
validator: (_, value) => validator(value, 'phone'),
message: '请输入正确的手机号码',
trigger: 'blur'
}
]
});
// !== 楼栋房屋 =============================================================================
@@ -190,15 +190,11 @@ const upload2 = ref<UploadInstance>();
const handleAvatarSuccess: UploadProps['onSuccess'] = (response, uploadFile) => {
if (response.data && response.data.url) {
form.value.cardImageFront = response.data.url;
} else {
ElMessage.error('短时间内不允许重复提交,请稍候再试');
}
};
const handleAvatar2Success: UploadProps['onSuccess'] = (response, uploadFile) => {
if (response.data && response.data.url) {
form.value.cardImageBack = response.data.url;
} else {
ElMessage.error('短时间内不允许重复提交,请稍候再试');
}
};
const handleExceed: UploadProps['onExceed'] = (files) => {
@@ -227,12 +223,12 @@ const handleError2: UploadProps['onError'] = (error: Error, uploadFile: UploadFi
const submitForm = () => {
formRef.value?.validate(async (valid: boolean) => {
if (valid) {
// if (!form.value.cardImageFront.trim()) {
// return ElMessage.error('请上传身份证正面照片');
// }
// if (!form.value.cardImageBack.trim()) {
// return ElMessage.error('请上传身份证背面照片');
// }
if (!form.value.cardImageFront.trim()) {
return ElMessage.error('请上传身份证正面照片');
}
if (!form.value.cardImageBack.trim()) {
return ElMessage.error('请上传身份证背面照片');
}
const obj = {
...form.value
};

View File

@@ -264,6 +264,7 @@ const defaultProps = {
// ! 树形------------------------------------------------------------------------
const treedata = ref([]);
function gettree() {
treedata.value = [];
houseStore.getCurrentVilageTreeHouse().then((res) => {
treedata.value = res;
});
@@ -274,6 +275,7 @@ gettree();
/** 查询住户管理列表 */
const getList = async () => {
loading.value = true;
residentList.value = [];
const res = await listResident(queryParams.value);
residentList.value = res.rows;
residentList.value.forEach((item) => {
@@ -363,7 +365,6 @@ onMounted(() => {
<style lang="scss" scoped>
.residentBody {
display: flex;
align-items: center;
.treebox {
width: 250px;
margin-right: 10px;

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader title="出库管理"></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader title="物料管理"></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader title="采购入库管理"></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader title="供应商管理"></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader title="账单管理"></Pageheader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -65,8 +65,8 @@
</el-table-column>
<el-table-column label="数据源" align="center" prop="dataName" :show-overflow-tooltip="true" />
<el-table-column label="表名称" align="center" prop="tableName" :show-overflow-tooltip="true" />
<el-table-column label="表描述" width="150" align="center" prop="tableComment" :show-overflow-tooltip="true" />
<el-table-column label="实体" width="150" align="center" prop="className" :show-overflow-tooltip="true" />
<el-table-column label="表描述" width="350" align="center" prop="tableComment" :show-overflow-tooltip="true" />
<el-table-column label="实体" width="350" align="center" prop="className" :show-overflow-tooltip="true" />
<el-table-column label="创建时间" align="center" prop="createTime" />
<el-table-column label="更新时间" align="center" prop="updateTime" />
<el-table-column label="操作" align="center" width="400" class-name="small-padding fixed-width">

View File

@@ -1,15 +1,7 @@
<script name="repairEcharts" setup lang="ts">
import Echarts from '@/components/Echarts/index.vue';
import { getLast7Days } from '@/utils/time';
import { EChartsOption } from 'echarts';
// 生成过去7天的日期
const getLast7Days = (days = 7) => {
const dates = [];
for (let i = days - 1; i >= 0; i--) {
dates.push(new Date(new Date().getTime() - i * 24 * 60 * 60 * 1000).toLocaleDateString());
}
return dates;
};
const chartConfig = shallowRef<EChartsOption>({
grid: {
left: '1%',
@@ -24,11 +16,15 @@ const chartConfig = shallowRef<EChartsOption>({
yAxis: {
type: 'value'
},
tooltip: {
trigger: 'axis'
},
series: [
{
data: [5, 92, 12, 34, 120, 10, 120],
data: [100, 140, 230, 100, 130, 180, 173],
type: 'line',
smooth: true,
name: '维修单数',
areaStyle: {
color: {
type: 'linear',
@@ -45,32 +41,14 @@ const chartConfig = shallowRef<EChartsOption>({
lineStyle: {
color: '#1a75ff'
},
itemStyle: {
color: '#1a75ff'
},
label: {
show: true,
color: '#3f8afc',
position: 'top'
}
},
{
data: [5, 92, 12, 34, 120, 10, 120].reverse(),
type: 'line',
smooth: true,
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1, // 从上到下渐变
colorStops: [
{ offset: 0, color: '#e2edff' }, // 顶部:半透明蓝色
{ offset: 1, color: '#f2f9ff' } // 底部:极浅蓝/透明
]
}
},
lineStyle: {
color: '#ffc800'
}
}
]
});

View File

@@ -53,7 +53,7 @@
</div>
</div>
<div class="echartsbody">
<repairEcharts />
<Echarts :options="chartConfig" />
</div>
</div>
</div>
@@ -65,8 +65,8 @@
<el-image :src="summicon"></el-image>
</div>
<div class="villageinfo">
<div class="villagename">北境碧桂园小区</div>
<div class="week">2025-08-20 星期三</div>
<div class="villagename">{{ villageinfo.villageName }}</div>
<div class="week">{{ new Date().toLocaleDateString().replaceAll('/', '-') }} {{ numToWeek2(new Date().getDay()) }}</div>
</div>
</div>
<div class="tabsbox">
@@ -208,6 +208,22 @@
import summicon from '@/assets/images/index/summer.png';
import repairEcharts from './components/repairEcharts.vue';
import { listResident } from '@/api/system/resident';
import { useHouseStore } from '@/store/modules/house';
const houseStore = useHouseStore();
const villageinfo = ref({
'villageId': null,
'villageName': ''
});
function getVillageinfo() {
const id = Number(localStorage.getItem('villageid'));
getVillageByIdAPI(id).then((res) => {
villageinfo.value = res.data;
houseStore.updateVilageinfo(res.data);
});
}
getVillageinfo();
import icon1 from '@/assets/images/index/1.png';
import icon2 from '@/assets/images/index/2.png';
@@ -215,6 +231,9 @@ import icon3 from '@/assets/images/index/3.png';
import icon5 from '@/assets/images/index/5.png';
import icon6 from '@/assets/images/index/6.png';
import { UploadUserFile } from 'element-plus';
import { getVillageByIdAPI } from '@/api/system/community';
import { getLast7Days, numToWeek2 } from '@/utils/time';
import { EChartsOption } from 'echarts';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_resident_type } = toRefs<any>(proxy?.useDict('com_resident_type'));
@@ -244,6 +263,92 @@ const actions = ref([
function changeActive_index(val: number) {
active_index.value = val;
}
const chartConfig = shallowRef<EChartsOption>({
grid: {
left: '1%',
right: '1%',
top: '10%',
bottom: '1%',
containLabel: true
},
tooltip: {
trigger: 'axis'
},
legend: {
top: 0,
data: ['收入', '支出']
},
xAxis: {
data: getLast7Days()
},
yAxis: {
type: 'value'
},
series: [
{
data: [87, 23, 105, 41, 69, 12, 94],
type: 'line',
smooth: true,
name: '收入',
itemStyle: {
color: '#1a75ff'
},
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1, // 从上到下渐变
colorStops: [
{ offset: 0, color: '#e2edff' }, // 顶部:半透明蓝色
{ offset: 1, color: '#f2f9ff' } // 底部:极浅蓝/透明
]
}
},
lineStyle: {
color: '#1a75ff'
},
label: {
show: true,
color: '#3f8afc',
position: 'top'
}
},
{
data: [216, 150, 192, 210, 191, 219, 175].reverse(),
type: 'line',
smooth: true,
name: '支出',
itemStyle: {
color: '#46d3a4'
},
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1, // 从上到下渐变
colorStops: [
{ offset: 0, color: '#e2edff' }, // 顶部:半透明蓝色
{ offset: 1, color: '#f2f9ff' } // 底部:极浅蓝/透明
]
}
},
lineStyle: {
color: '#46d3a4'
},
label: {
show: true,
color: '#46d3a4',
position: 'top'
}
}
]
});
// ! echarts 切换
// ! 侧边栏
const Sideactive = ref(1);
@@ -397,14 +502,14 @@ getList();
.infoTitle {
height: 18px;
font-weight: 400;
font-size: 14px;
color: #4e5969;
line-height: 18px;
font-size: 14px;
}
.infoNum {
height: 35px;
font-weight: 600;
font-size: 28px;
font-size: 24px;
color: #303133;
line-height: 39px;
}
@@ -631,9 +736,9 @@ getList();
}
}
.body {
font-size: 16px;
color: #222222;
padding: 20px;
font-size: 0.7rem;
.quicly_box {
display: flex;
align-items: center;
@@ -645,6 +750,7 @@ getList();
min-width: 30%;
max-width: 33%;
margin-bottom: 20px;
text-align: center;
height: 56px;
background: #ffffff;
border-radius: 12px 12px 12px 12px;
@@ -661,7 +767,6 @@ getList();
width: 64px;
height: 23px;
font-weight: 500;
font-size: 16px;
color: #222222;
line-height: 23px;
}