This commit is contained in:
Zy
2026-06-01 18:12:58 +08:00
parent 38274ab612
commit ae1f9f6ee2
123 changed files with 2729 additions and 1563 deletions

View File

@@ -148,10 +148,14 @@ const { queryParams, form, rules } = toRefs(data);
/** 查询测试单列表 */
const getList = async () => {
loading.value = true;
const res = await listDemo(queryParams.value);
demoList.value = res.rows;
total.value = res.total;
loading.value = false;
listDemo(queryParams.value)
.then((res) => {
demoList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 取消按钮 */

View File

@@ -145,10 +145,14 @@ const { queryParams, form, rules } = toRefs(data);
/** 查询活动管理列表 */
const getList = async () => {
loading.value = true;
const res = await listActivity(queryParams.value);
activityList.value = res.rows;
total.value = res.total;
loading.value = false;
listActivity(queryParams.value)
.then((res) => {
activityList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 发布按钮 */
const handleSend = (row: ActivityVO) => {

View File

@@ -67,14 +67,14 @@
<!-- 0启用 1停用 -->
<el-switch
@change="(val: string) => handleSwitch(scope.row.id, val)"
inactive-value="0"
active-value="1"
inactive-value="1"
active-value="0"
v-model="scope.row.status"
></el-switch>
</template>
</el-table-column>
<el-table-column label="排序" align="center" prop="byOrder" />
<el-table-column label="添加时间" align="center" />
<el-table-column label="添加时间" align="center" prop="createTime" />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['banner:banner:edit']">修改</el-button>
@@ -158,10 +158,14 @@ const { queryParams, form } = toRefs(data);
/** 查询Banner图管理列表 */
const getList = async () => {
loading.value = true;
const res = await listBanner(queryParams.value);
bannerList.value = res.rows;
total.value = res.total;
loading.value = false;
listBanner(queryParams.value)
.then((res) => {
bannerList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 取消按钮 */

View File

@@ -113,10 +113,14 @@ const getList = async () => {
loading.value = true;
const res2 = await listComplaintType();
complaintyTyplist.value = res2.rows;
const res = await listComplaint(queryParams.value);
complaintList.value = res.rows;
total.value = res.total;
loading.value = false;
listComplaint(queryParams.value)
.then((res) => {
complaintList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 搜索按钮操作 */

View File

@@ -1,5 +1,5 @@
<template>
<div class="p-2">
<div class="p-2 h-full flex flex-col">
<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]">
@@ -17,7 +17,7 @@
</div>
</transition>
<el-card shadow="never">
<el-card shadow="never" class="flex-1">
<template #header>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">
@@ -131,10 +131,14 @@ const { queryParams, form, rules } = toRefs(data);
/** 查询投诉类型管理列表 */
const getList = async () => {
loading.value = true;
const res = await listComplaintType(queryParams.value);
complaintTypeList.value = res.rows;
total.value = res.total;
loading.value = false;
listComplaintType(queryParams.value)
.then((res) => {
complaintTypeList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 搜索按钮操作 */
@@ -196,3 +200,9 @@ onMounted(() => {
getList();
});
</script>
<style lang="scss" scoped>
.el-table {
height: calc(100% - 80px);
}
</style>

View File

@@ -123,10 +123,14 @@ const { queryParams, form, rules } = toRefs(data);
/** 查询办事记录列表 */
const getList = async () => {
loading.value = true;
const res = await listHandleLog(queryParams.value);
handleLogList.value = res.rows;
total.value = res.total;
loading.value = false;
listHandleLog(queryParams.value)
.then((res) => {
handleLogList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 搜索按钮操作 */

View File

@@ -133,10 +133,14 @@ const { queryParams, form } = toRefs(data);
/** 查询房屋设施管理列表 */
const getList = async () => {
loading.value = true;
const res = await listHouseFacilities(queryParams.value);
houseFacilitiesList.value = res.rows;
total.value = res.total;
loading.value = false;
listHouseFacilities(queryParams.value)
.then((res) => {
houseFacilitiesList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 取消按钮 */

View File

@@ -54,19 +54,19 @@
<el-table v-loading="loading" border :data="monthCardList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="月卡编号" align="center" prop="cardCode" v-if="true" />
<el-table-column label="办理时间" align="center" prop="handleTime" width="180">
<el-table-column label="办理时间" align="center" prop="handleTime" width="150">
<template #default="scope">
<span>{{ parseTime(scope.row.handleTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="业主" align="center" prop="cardName" />
<el-table-column label="绑定车牌号" align="center" prop="carNum" />
<el-table-column label="剩余有效天数" align="center" prop="handleName">
<el-table-column label="业主" align="center" prop="cardName" width="150" />
<el-table-column label="绑定车牌号" align="center" prop="carNum" width="150" />
<el-table-column label="剩余有效天数" align="center" prop="handleName" width="120">
<template #default="scope">
{{ diffDays(scope.row.startTime, scope.row.endTime) }}
</template>
</el-table-column>
<el-table-column label="支付方式" align="center" prop="payMethod">
<el-table-column label="支付方式" align="center" prop="payMethod" width="150">
<template #default="scope">
<dict-tag :options="com_pay_method" :value="scope.row.payMethod" />
</template>
@@ -76,7 +76,7 @@
<dict-tag :options="com_pay_method" :value="scope.row.payMethod" />
</template>
</el-table-column> -->
<el-table-column label="备注" align="center" prop="remark"></el-table-column>
<el-table-column label="备注" show-overflow-tooltip align="center" prop="remark"></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="handleUpdate(scope.row)" v-hasPermi="['monthCard:monthCard:edit']">修改</el-button>
@@ -206,10 +206,14 @@ const { queryParams, form, rules } = toRefs(data);
/** 查询月卡管理列表 */
const getList = async () => {
loading.value = true;
const res = await listMonthCard(queryParams.value);
monthCardList.value = res.rows;
total.value = res.total;
loading.value = false;
listMonthCard(queryParams.value)
.then((res) => {
monthCardList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 取消按钮 */

View File

@@ -143,10 +143,14 @@ const { queryParams, form, rules } = toRefs(data);
/** 查询公告信息列表 */
const getList = async () => {
loading.value = true;
const res = await listNotice(queryParams.value);
noticeList.value = res.rows;
total.value = res.total;
loading.value = false;
listNotice(queryParams.value)
.then((res) => {
noticeList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 搜索按钮操作 */

View File

@@ -36,6 +36,7 @@
</h3>
<el-button link type="primary">清除未读</el-button>
</div>
<ul v-if="activeTabs === 1">
<li
v-for="(item, index) in awaittoList"
@@ -49,57 +50,71 @@
<div class="info">{{ item.content }}保修标题{{ item.item }}</div>
</li>
</ul>
<ul v-else-if="activeTabs === 2">
<li
v-for="(item, index) in noticelist"
:key="index"
@click="handleDisable(item)"
@click="handleRead(item)"
:class="{
disable: item.disabled
disable: !isdisable(item)
}"
>
<div class="subtitle">报修工单通知</div>
<div class="info">您有一条新的报修工单需要处理保修标题下水道堵塞</div>
</li>
</ul>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="init" />
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { getNotificationList } from '@/api/system/Notification/index';
import pagination from '@/components/Pagination/index.vue';
import { getNotificationList, NotificationVo, ReadNotificationByID } from '@/api/system/Notification/index';
import { ref } from 'vue';
// 1 代办 2通知
const activeTabs = ref(1);
function handleClick(tab: number) {
activeTabs.value = tab;
}
const todonum = computed(() => {
return awaittoList.value.filter((item) => isdisable(item)).length;
});
const noticnum = computed(() => {
return noticelist.value.filter((item) => isdisable(item)).length;
});
const total = ref(0);
const queryParams = ref({
pageNum: 1,
pageSize: 10
});
function handleClick(tab: number) {
activeTabs.value = tab;
}
function isdisable(item) {
return item.repairIsCheck ? item.repairIsCheck === '1' : item.manageIsCheck === '1';
}
const noticelist = ref([]);
const awaittoList = ref([]);
const awaittoList = ref<NotificationVo[]>([]);
function init() {
getNotificationList({
pageNum: 1,
pageSize: 10
}).then((res) => {
awaittoList.value = res.data;
total.value = res.total;
total.value = 100;
});
}
init();
function handleRead(row) {}
function handleRead(row: NotificationVo) {
ReadNotificationByID(row.id).then(() => {
init();
});
}
function handleDisable(row) {
row.disabled = true;
}
@@ -112,6 +127,7 @@ function handleDisable(row) {
display: flex;
font-size: 0.8rem;
flex: 1;
overflow: hidden;
.lefttabs {
width: 275px;
height: 100%;

View File

@@ -166,10 +166,14 @@ const { queryParams, form, rules } = toRefs(data);
const getList = async () => {
loading.value = true;
// 停车缴费
const res = await listParkingCost(queryParams.value);
parkingCostList.value = res.rows;
total.value = res.total;
loading.value = false;
listParkingCost(queryParams.value)
.then((res) => {
parkingCostList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 搜索按钮操作 */

View File

@@ -141,10 +141,14 @@ const { queryParams, form, rules } = toRefs(data);
/** 查询问卷调查列表 */
const getList = async () => {
loading.value = true;
const res = await listQuestionnaire(queryParams.value);
questionnaireList.value = res.rows;
total.value = res.total;
loading.value = false;
listQuestionnaire(queryParams.value)
.then((res) => {
questionnaireList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 取消按钮 */

View File

@@ -115,7 +115,7 @@ const form = ref({
houseId: null, // 关联房屋id
maintenanceItemId: null, // 维修项目id
problem: '', // 问题描述
residentId: null, // 报修人id(住户表id)
residentId: '', // 报修人id(住户表id)
phone: null, // 报手机号码
problemImageUrl: '', // 问题图片地址
problemStatus: '0', // 0 已提交 1已分配 2维修中 3维修完成
@@ -143,7 +143,7 @@ const currentviliage = ref();
const maintenanceItemTreeData = ref();
function init() {
gettreelistRepairProject().then((res) => {
maintenanceItemTreeData.value = res.data;
maintenanceItemTreeData.value = handleTreeDisable(res.data);
if (route.query.id) {
userid.value = route.query.id;
form.value.id = userid.value;
@@ -168,6 +168,21 @@ function init() {
}
init();
function handleTreeDisable(TreeData) {
const arr = TreeData.map((item) => {
if (item.status === '1') {
item.disabled = true;
} else {
item.disabled = false;
}
if (item && item.children && item.children.length > 0) {
item.children = handleTreeDisable(item.children);
}
return item;
});
return arr;
}
// ! 上传图片 =--==================================================================
const fileList = ref<UploadUserFile[]>([]);

View File

@@ -1,6 +1,6 @@
<template>
<div class="AddBuildingBox">
<PageHeader :title="userid ? '编辑车辆信息' : '添加车辆信息'"></PageHeader>
<PageHeader></PageHeader>
<div class="AddBuildingBody">
<div class="title">基本信息</div>
<div class="addBuildingFormBody">
@@ -59,7 +59,7 @@
<script setup lang="ts">
import { ref } from 'vue';
import PageHeader from '@/components/Pageheader/index.vue';
import { addRepairProject, listRepairProject, updateRepairProject } from '@/api/system/RepairProject';
import { addRepairProject, getRepairProject, listRepairProject, updateRepairProject } from '@/api/system/RepairProject';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_repair_project_types } = toRefs<any>(proxy?.useDict('com_repair_project_types'));
const { com_repair_project_status } = toRefs<any>(proxy?.useDict('com_repair_project_status'));
@@ -88,6 +88,7 @@ const userid = ref(null);
const options = ref([]);
function handleChange(val) {
if (!val) return;
const find = options.value.find((item) => item.id === val);
if (find) {
form.value.projectType = find.projectType;
@@ -107,19 +108,15 @@ function init() {
listRepairProject().then((res) => {
const arr = res.rows.filter((ite) => ite.projectLevel === 0);
options.value = arr;
if (route.query.id) {
userid.value = route.query.id;
const find = res.rows.find((item) => item.id === userid.value);
if (find) {
form.value = {
...form.value,
...find,
projectLevel: find.projectLevel
};
handleChange(find.parentId);
}
}
});
if (route.query.id) {
userid.value = route.query.id;
getRepairProject(userid.value).then((res) => {
form.value = res.data;
form.value.status = res.data.status ?? '0' + '';
handleChange(res.data.parentId);
});
}
}
init();
// !== 提交 =============================================================================

View File

@@ -164,10 +164,14 @@ const { queryParams, form, rules } = toRefs(data);
/** 查询报修管理列表 */
const getList = async () => {
loading.value = true;
const res = await listRepair(queryParams.value);
repairList.value = res.rows;
total.value = res.total;
loading.value = false;
listRepair(queryParams.value)
.then((res) => {
repairList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 搜索按钮操作 */

View File

@@ -93,7 +93,7 @@
<div class="preivewBody w-full h-full flex flex-items-start mt-2">
<div class="title">维修师傅</div>
<div class="preivewBodybox flex-1 ml-5">
<repairUser :userid="form.repairId" @change="handleChange"></repairUser>
<repairUser :username="form.repairName" :userid="form.repairId" @change="handleChange"></repairUser>
<div class="actions mt-5">
<el-button @click="handleSend" type="primary">确定派单</el-button>
<el-button @click="backRouter">返回</el-button>

View File

@@ -29,7 +29,7 @@
</el-select>
</el-form-item>
<el-form-item label="费用单价" prop="fixedPrice">
<el-input v-model.trim="form.fixedPrice" placeholder="请输入费用单价" />
<el-input v-model.trim="form.fixedPrice" :placeholder="placeHolderFun(form.typeId)" />
</el-form-item>
<el-form-item label="计算精度" prop="accuracy">
<el-select v-model="form.accuracy">
@@ -50,7 +50,6 @@
<el-form-item label="备注" prop="remark">
<el-input type="textarea" :rows="5" v-model.trim="form.remark" placeholder="请输入" />
</el-form-item>
<el-form-item style="margin-top: 30px">
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button @click="cancelForm">返回</el-button>
@@ -139,6 +138,13 @@ const submitForm = () => {
const cancelForm = () => {
router.back();
};
// 车位费 物业费
const typeNamelist = ref(['2049026574236418050', '2049026520314445826']);
function placeHolderFun(typeId: string) {
return typeNamelist.value.includes(typeId) ? '请输入每日费用单价' : '请输入费用单价';
}
</script>
<style scoped lang="scss">

View File

@@ -138,10 +138,14 @@ const { queryParams, form, rules } = toRefs(data);
/** 查询收费项目管理列表 */
const getList = async () => {
loading.value = true;
const res = await listChargeItem(queryParams.value);
chargeItemList.value = res.rows;
total.value = res.total;
loading.value = false;
listChargeItem(queryParams.value)
.then((res) => {
chargeItemList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 取消按钮 */

View File

@@ -9,7 +9,7 @@
<el-input v-model.trim="form.billName" placeholder="请输入账单名称" />
</el-form-item>
<el-form-item label="收费项目" prop="chargeItemId">
<el-select v-model="form.chargeItemId" @change="handleChange">
<el-select v-model="form.chargeItemId" @change="(val: string) => handleChange(val, true)">
<el-option
:disabled="item.status === '1'"
v-for="(item, index) in chargeitemlist"
@@ -21,20 +21,23 @@
</el-form-item>
<!-- 水费电费 收费范围为 房屋 -->
<el-form-item label="收费范围" prop="chargeScope" v-if="typeNamelist.includes(typeName)">
<div class="flex flex-row flex-items-end">
<el-radio-group v-model="form.chargeScope">
<div class="flex flex-col flex-items-end">
<el-radio
style="margin-right: 0"
v-for="(item, index) in com_bill_charge_scope_house"
:key="index"
:value="item.value"
:label="item.label"
></el-radio>
<div>
<div class="flex flex-row flex-items-end">
<el-radio-group v-model="form.chargeScope">
<div class="flex flex-col flex-items-end">
<el-radio
:disabled="!form.chargeItemId"
style="margin-right: 0"
v-for="(item, index) in com_bill_charge_scope_house"
:key="index"
:value="item.value"
:label="item.label"
></el-radio>
</div>
</el-radio-group>
<div style="height: 32px">
<el-button @click="OpenUseTablesfun('house')" link type="primary" v-if="form.chargeScope === '1'" class="ml-10px">请选择</el-button>
</div>
</el-radio-group>
<div style="height: 32px">
<el-button @click="OpenUseTablesfun('house')" link type="primary" v-if="form.chargeScope === '1'" class="ml-10px">请选择</el-button>
</div>
</div>
</el-form-item>
@@ -45,6 +48,7 @@
<div class="flex flex-col flex-items-end">
<el-radio
style="margin-right: 0"
:disabled="!form.chargeItemId"
v-for="(item, index) in com_questionnaire_scope"
:key="index"
:value="item.value"
@@ -65,7 +69,11 @@
</el-form-item>
<!-- 业主选择 -->
<el-form-item v-if="form.chargeScope === '1' && !typeNamelist.includes(typeName)">
<div class="residentBox">
<!-- 业主选择 车位费用 -->
<div class="residentBox" v-if="typeName === HandleTypeId.Resident.Parking">
<CarUser returnvalue="parkingId" ref="ParkinguserRef" :isMultiple="true" @change="handleCheckPaking"></CarUser>
</div>
<div class="residentBox" v-else>
<UserHolder returnvalue="residentId" ref="userRef" :isMultiple="true" @change="handleCheckUser"></UserHolder>
</div>
</el-form-item>
@@ -74,18 +82,32 @@
<el-option v-for="(item, index) in com_bill_charge_period" :key="index" :value="item.value" :label="item.label"></el-option>
</el-select>
</el-form-item>
<el-form-item label="起止日期" prop="price">
<el-form-item label="起止日期" prop="startDate">
<el-date-picker
v-model="StartEndDate"
unlink-panels
@update:model-value="handleDate"
:value-format="datepicker[form.chargePeriod].format"
:format="datepicker[form.chargePeriod].format"
:type="datepicker[form.chargePeriod].type"
@clear="handleClear"
:value-format="datepicker[2].format"
:format="datepicker[2].format"
:type="datepicker[2].type"
range-separator=""
start-placeholder="开始"
end-placeholder="结束"
/>
</el-form-item>
<!-- <el-form-item label="结束日期" prop="price">
<el-date-picker
v-model="StartEndDate"
@update:model-value="handleDate"
:value-format="datepicker[2].format"
:format="datepicker[2].format"
:type="datepicker[2].type"
range-separator=""
start-placeholder="开始"
end-placeholder="结束"
/>
</el-form-item> -->
<el-form-item label="备注" prop="remark">
<el-input type="textarea" :rows="5" v-model.trim="form.remark" placeholder="请输入" />
</el-form-item>
@@ -102,14 +124,16 @@
<script setup lang="ts">
import { ref } from 'vue';
import House from '@/components/Holder/house.vue';
import UserHolder from '@/components/Holder/user.vue';
import CarUser from '@/components/Holder/CarUser.vue';
import PageHeader from '@/components/Pageheader/index.vue';
import { listChargeItem } from '@/api/system/SdbChargeItem';
import { getBill, updateBill, addBill, BillHouse, listBillHouse, queryResidentList_holder } from '@/api/system/SdbBill';
import type { DatePickerType } from 'element-plus';
import { formatDate2 } from '@/utils';
import { Delete } from '@element-plus/icons-vue';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_questionnaire_scope } = toRefs<any>(proxy?.useDict('com_questionnaire_scope'));
@@ -137,7 +161,8 @@ const form = ref({
'chargePeriod': '2', // 费用周期
houseIds: [], // 部分房屋
residentIds: [], // 部分业主
charegeTypeId: '', // typeid
parkingIds: [],
chargeTypeId: '', // typeid
'startDate': '', // 开始
'endDate': '', // 结束
'remark': ''
@@ -154,10 +179,18 @@ const userid = ref(null);
// 开始结束日期
const StartEndDate = ref([]);
function handleDate(val: string[]) {
form.value.startDate = formatDate2(val[0]);
form.value.endDate = formatDate2(val[1]);
if (val === null || val.length === 0) {
form.value.startDate = '';
form.value.endDate = '';
} else {
form.value.startDate = val[0] + ' 00:00:00';
form.value.endDate = val[1] + ' 23:59:59';
}
}
function handleClear() {
form.value.startDate = '';
form.value.endDate = '';
}
// 收费类型
const chargeitemlist = ref([]);
@@ -166,62 +199,74 @@ const chargeitemlist = ref([]);
// // 住户列表
// const userlist = ref([]);
async function init() {
listChargeItem().then((res) => {
listChargeItem({}).then((res) => {
chargeitemlist.value = res.rows;
// const res = await listBillHouse({ pageNum: 1, pageSize: 999999 });
// houselist.value = res.rows;
// const res2 = await queryResidentList_holder({ pageNum: 1, pageSize: 999999 });
// userlist.value = res2.rows;
if (route.query.id) {
userid.value = route.query.id;
getBill(userid.value).then((res) => {
if (!res.data) return;
form.value = {
...form.value,
...res.data
};
// TODO 没有住户参数
form.value.houseIds = res.data.houseIds || [];
form.value.residentIds = res.data.residentIds || [];
form.value.parkingIds = res.data.parkingIds || [];
form.value.startDate = formatDate2(form.value.startDate);
form.value.endDate = formatDate2(form.value.endDate);
StartEndDate.value = [form.value.startDate, form.value.endDate];
// TODO houseid 有默认值, 需要处理
// TODO residentids 添加,
checkoutHouses.value = [];
checkoutUser.value = [];
checkoutParking.value = [];
checkoutHouses.value = form.value.houseIds.filter((item) => item);
checkoutUser.value = form.value.residentIds.filter((item) => item);
checkoutParking.value = form.value.parkingIds.filter((item) => item);
handleChange(form.value.chargeItemId);
});
}
});
// const res = await listBillHouse({ pageNum: 1, pageSize: 999999 });
// houselist.value = res.rows;
// const res2 = await queryResidentList_holder({ pageNum: 1, pageSize: 999999 });
// userlist.value = res2.rows;
if (route.query.id) {
userid.value = route.query.id;
getBill(userid.value).then((res) => {
if (!res.data) return;
form.value = {
...form.value,
...res.data
};
// TODO 没有住户参数
form.value.houseIds = res.data.houseIds || [];
form.value.residentIds = res.data.residentIds || [];
form.value.startDate = formatDate2(form.value.startDate);
form.value.endDate = formatDate2(form.value.endDate);
StartEndDate.value = [form.value.startDate, form.value.endDate];
// TODO houseid 有默认值, 需要处理
// TODO residentids 添加,
checkoutHouses.value = form.value.houseIds.filter((item) => item);
handleChange(form.value.chargeItemId);
});
}
}
init();
const typeNamelist = ref(['2049026484272791553', '2049026503017136129']);
const HandleTypeId = {
/** 显示房屋 */
'House': {
/** 水费 */
'Water': '2049026484272791553',
/** 电费 */
'Electricity': '2049026503017136129'
},
/** 显示业主 */
'Resident': {
/** 车位费 */
'Parking': '2049026574236418050'
}
};
// 符合类型: 显示房屋,选择房屋
const typeNamelist = ref([HandleTypeId.House.Water, HandleTypeId.House.Electricity]);
const typeName = ref('');
// 获取收费类型id
function handleChange(val: string) {
function handleChange(val: string, callback: boolean = false) {
const find = chargeitemlist.value.find((item) => item.id === val);
if (find) {
form.value.charegeTypeId = find.typeId;
form.value.chargeTypeId = find.typeId;
typeName.value = find.typeId;
handleClearCheckout();
if (callback) {
handleClearCheckout();
}
}
}
// !== 业主 =============================================================================
// 打开
const HolderRef = ref<InstanceType<typeof House>>();
const userRef = ref<InstanceType<typeof UserHolder>>();
function OpenUseTablesfun(val: string) {
console.log(val);
if (val === 'house') {
HolderRef.value.open(checkoutHouses.value);
} else if (val === 'user') {
userRef.value.open(checkoutUser.value);
}
}
// 多选
const checkoutHouses = ref<string[]>([]);
function handleSelect(val: string[]) {
@@ -233,9 +278,15 @@ const checkoutUser = ref([]);
/** 添加 业主 */
function handleCheckUser(val: string[]) {
checkoutUser.value = val;
console.log(val);
form.value.residentIds = val;
}
const checkoutParking = ref([]);
/** 添加 车位业主 */
function handleCheckPaking(val: string[]) {
checkoutParking.value = val;
console.log(val);
form.value.parkingIds = val;
}
/** 清空 */
function handleClearCheckout() {
@@ -244,10 +295,27 @@ function handleClearCheckout() {
form.value.residentIds = [];
form.value.houseIds = [];
}
// 打开
const HolderRef = ref<InstanceType<typeof House>>();
const userRef = ref<InstanceType<typeof UserHolder>>();
const ParkinguserRef = ref<InstanceType<typeof CarUser>>();
function OpenUseTablesfun(val: string) {
if (val === 'house') {
HolderRef.value.open(checkoutHouses.value);
} else if (val === 'user') {
if (typeName.value === HandleTypeId.Resident.Parking) {
ParkinguserRef.value.open(checkoutParking.value);
} else {
userRef.value.open(checkoutUser.value);
}
}
}
// !== 业主 =============================================================================
// !== 提交 =============================================================================
const submitForm = () => {
console.log(form.value);
formRef.value?.validate(async (valid: boolean) => {
if (valid) {
if (userid.value) {

View File

@@ -27,6 +27,7 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<!-- TODO wuye_statistics -->
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['bill:bill:add']">新增</el-button>
</el-col>
@@ -152,7 +153,7 @@ const { queryParams, form } = toRefs(data);
const chargeItems = ref([]);
function init() {
listChargeItem().then((res) => {
listChargeItem({}).then((res) => {
chargeItems.value = res.rows;
});
}

View File

@@ -8,26 +8,24 @@
<el-form-item label="账单名称" prop="billName">
<el-input disabled v-model.trim="form.billName" placeholder="请输入账单名称" />
</el-form-item>
<el-form-item label="收费项目" prop="chargeItemId">
<el-select disabled v-model="form.chargeItemId" @change="handleChange">
<el-option v-for="(item, index) in chargeitemlist" :key="index" :value="item.id" :label="item.itemName"></el-option>
</el-select>
</el-form-item>
<el-form-item label="收费范围" prop="chargeScope">
<el-form-item label="收费范围" prop="chargeScope" v-if="itemTypeincludes">
<el-radio-group disabled v-model="form.chargeScope">
<el-radio v-for="(item, index) in com_questionnaire_scope" :key="index" :value="item.value" :label="item.label"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="form.chargeScope === '1'">
<div class="residentBox">
<ul class="checkoutSideUsesbox">
<li v-for="(item, index) in checkoutUses" :key="index">
<span>{{ item.buildingName }} </span> / <span>{{ item.unitNo }}单元 </span> / <span>{{ item.floorNo }} </span> /
<span>{{ item.houseNo }}</span>
</li>
</ul>
</div>
<el-form-item label="收费范围" prop="chargeScope" v-else>
<el-radio-group disabled v-model="form.chargeScope">
<el-radio v-for="(item, index) in com_bill_charge_scope_house" :key="index" :value="item.value" :label="item.label"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="费用周期" prop="chargePeriod">
<el-select disabled v-model="form.chargePeriod">
<el-option v-for="(item, index) in com_bill_charge_period" :key="index" :value="item.value" :label="item.label"></el-option>
@@ -71,6 +69,7 @@ import { Delete } from '@element-plus/icons-vue';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_questionnaire_scope } = toRefs<any>(proxy?.useDict('com_questionnaire_scope'));
const { com_bill_charge_scope_house } = toRefs<any>(proxy?.useDict('com_bill_charge_scope_house'));
const { com_bill_charge_period } = toRefs<any>(proxy?.useDict('com_bill_charge_period'));
type PickerConfig = {
@@ -114,38 +113,47 @@ function handleDate(val: string[]) {
form.value.endDate = formatDate2(val[1]);
}
const chargeitemlist = ref([]);
// 电费 水费
const typeNamelist = ref(['2049026484272791553', '2049026503017136129']);
const itemTypeincludes = computed(() => {
return typeNamelist.value.includes(form.value.chargeItemId);
});
const houselist = ref([]);
const checkoutUses = ref([]);
async function init() {
listChargeItem().then((res) => {
const res1 = await listBillHouse({ pageNum: 1, pageSize: 999999 });
houselist.value = res1.rows;
listChargeItem().then(async (res) => {
chargeitemlist.value = res.rows;
});
const res = await listBillHouse({ pageNum: 1, pageSize: 999999 });
houselist.value = res.rows;
if (route.query.id) {
userid.value = route.query.id;
getBill(userid.value).then((res) => {
form.value = {
...form.value,
...res.data
};
form.value.houseIds = res.data.houseIds || [];
StartEndDate.value = [formatDate(res.data.startDate), formatDate(res.data.endDate)];
checkoutUses.value = form.value.houseIds
.map((item) => {
if (item) {
const find = houselist.value.find((it) => it.houseId === item);
if (find) {
return find;
} else {
return null;
if (route.query.id) {
userid.value = route.query.id;
getBill(userid.value).then((res1) => {
form.value = {
...form.value,
...res1.data
};
form.value.houseIds = res1.data.houseIds || [];
StartEndDate.value = [formatDate(res1.data.startDate), formatDate(res1.data.endDate)];
checkoutUses.value = form.value.houseIds
.map((item) => {
if (item) {
const find = houselist.value.find((it) => it.houseId === item);
if (find) {
return find;
} else {
return null;
}
}
}
})
.filter((item) => item !== null);
});
}
})
.filter((item) => item !== null);
});
}
});
}
init();

View File

@@ -16,10 +16,14 @@
<div class="tablebox">
<el-table :data="tabledata" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column align="center" label="房屋/车位">
<el-table-column align="center" label="收费名称">
<template #default="scope">
<div v-if="scope.row.chargeTypeName === '车费'">{{ scope.row.parkingName }}</div>
<div v-else-if="scope.row.chargeTypeName === '电费' || scope.row.chargeTypeName === '水费'">{{ scope.row.houseName }}</div>
<!-- <div v-if="scope.row.chargeTypeName === '车费'">{{ scope.row.parkingName }}</div>
<div v-else-if="scope.row.chargeTypeName === chargeTypeName.Electricity || scope.row.chargeTypeName === chargeTypeName.Water">
{{ scope.row.houseName }}
</div>
<div v-else>--</div> -->
<div>{{ scope.row.detailsName }}</div>
</template>
</el-table-column>
<el-table-column align="center" label="收费项目" width="250">
@@ -29,7 +33,7 @@
</el-table-column>
<el-table-column align="center" label="收费周期" width="300">
<template #default="scope">
<div>{{ scope.row.startDate }} -- {{ scope.row.endDate }}</div>
<dict-tag :options="com_bill_charge_period" :value="scope.row.chargePeriod"></dict-tag>
</template>
</el-table-column>
<el-table-column align="center" label="单价" width="150">
@@ -37,11 +41,6 @@
<div>{{ scope.row.fixedPrice }}</div>
</template>
</el-table-column>
<!-- <el-table-column align="center" label="数量">
<template #default="scope">
<div>{{ scope.row.formula }}</div>
</template>
</el-table-column> -->
<el-table-column align="center" label="缴费状态" width="120">
<template #default="scope">
<dict-tag v-if="!inglelist.includes(scope.row.chargeItemName)" :options="com_pay_status" :value="scope.row.payStatus"></dict-tag>
@@ -50,8 +49,7 @@
</el-table-column>
<el-table-column align="center" label="应缴金额" width="120">
<template #default="scope">
<div v-if="!inglelist.includes(scope.row.chargeItemName)">{{ scope.row.money ?? '--' }}</div>
<div v-else>--</div>
<div>{{ scope.row.amount ?? '--' }}</div>
</template>
</el-table-column>
</el-table>
@@ -66,8 +64,8 @@
<span>缴费人{{ villageinfo.villageName ?? '---' }}-{{ props.query.houseName }}</span>
</div>
<div>
<span>账单名称 </span>
<span style="text-wrap: wrap; text-indent: 2rem">{{ from.billResidentId.map((item) => item.chargeItemName).join('、 ') }}</span>
<span>收费名称 </span>
<span style="text-wrap: wrap; text-indent: 2rem">{{ from.billResidentId.map((item) => item.detailsName).join('、 ') }}</span>
</div>
<div>
<span>应收合计{{ from.allCost }}</span>
@@ -108,16 +106,20 @@
<script setup lang="ts">
import { ref } from 'vue';
import { billlistType, billQuery } from '@/api/system/SdbCashier';
import { billlistType, billQuery, billEdit } from '@/api/system/SdbCashier';
import { add } from '@/utils/money';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_pay_method, com_pay_status } = toRefs<any>(proxy?.useDict('com_pay_method', 'com_pay_status'));
const { com_bill_charge_period } = toRefs<any>(proxy?.useDict('com_bill_charge_period'));
const villageinfo = JSON.parse(localStorage.getItem('villageInfo') || '{}');
// 隐藏收费金额的 类型列表
const inglelist = ['电费', '水费'];
enum chargeTypeName {
'Water' = '水费',
'Electricity' = '电费'
}
type querytype = {
residentId: string;
residentName: string;
@@ -197,10 +199,9 @@ const openDiage = () => {
payType: '0',
remark: ''
};
console.log(ids.value);
ids.value.forEach((item) => {
from.value.billResidentId.push(item);
from.value.allCost += Number(item.money);
from.value.allCost = add(from.value.allCost, item.amount);
});
dialog.visible = true;
};
@@ -210,13 +211,17 @@ const closepay = () => {
};
const submitForm = () => {
buttonLoading.value = true;
if (from.value.payStatus === '0') {
setTimeout(() => {
buttonLoading.value = false;
closepay();
}, 1000);
} else {
}
const obj = {
'detailsId': from.value.billResidentId.map((item) => item.detailsId),
'payType': from.value.payType,
'payStatus': from.value.payStatus
};
billEdit(obj).then(() => {
ElMessage.success('缴费成功');
buttonLoading.value = false;
getList();
closepay();
});
};
</script>

View File

@@ -4,15 +4,9 @@
<div class="tablebox">
<el-table :data="tabledata">
<el-table-column type="selection" width="55" align="center" />
<el-table-column align="center" label="序号" width="80">
<el-table-column align="center" label="收费名称">
<template #default="scope">
<div>{{ scope.$index }}</div>
</template>
</el-table-column>
<el-table-column align="center" label="房屋/车位/车辆">
<template #default="scope">
<div v-if="scope.row.houseName">{{ scope.row.parkingName }}</div>
<div v-else-if="scope.row.parkingName">{{ scope.row.parkingName }}</div>
<div>{{ scope.row.detailsName }}</div>
</template>
</el-table-column>
<el-table-column align="center" label="收费项目">
@@ -22,19 +16,23 @@
</el-table-column>
<el-table-column align="center" label="收费周期">
<template #default="scope">
<div>{{ scope.row.startDate }} -- {{ scope.row.endDate }}</div>
<dict-tag :options="com_bill_charge_period" :value="scope.row.chargePeriod"></dict-tag>
</template>
</el-table-column>
<el-table-column align="center" label="单价">
<template #default="scope">
<div>{{ scope.row.fixedPrice }}</div>
<div class="flex flex-items-center justify-center">
<div>{{ scope.row.fixedPrice ?? '--' }}</div>
<span v-show="Boolean(scope.row.fixedPrice)">/</span>
<dict-tag v-show="Boolean(scope.row.fixedPrice)" :options="com_charge_item_unit" :value="scope.row.unit"></dict-tag>
</div>
</template>
</el-table-column>
<el-table-column align="center" label="数量">
<!-- <el-table-column align="center" label="数量">
<template #default="scope">
<div>{{ scope.row.formula }}</div>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column align="center" label="缴费状态">
<template #default="scope">
<dict-tag :options="com_pay_status" :value="scope.row.payStatus"></dict-tag>
@@ -43,7 +41,7 @@
<el-table-column align="center" label="应缴金额">
<template #default="scope">
<div>{{ scope.row.money }}</div>
<div>{{ scope.row.amount }}</div>
</template>
</el-table-column>
</el-table>
@@ -103,6 +101,8 @@ import { billlistType, billQuery } from '@/api/system/SdbCashier';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_pay_method, com_pay_status } = toRefs<any>(proxy?.useDict('com_pay_method', 'com_pay_status'));
const { com_bill_charge_period } = toRefs<any>(proxy?.useDict('com_bill_charge_period'));
const { com_charge_item_unit } = toRefs<any>(proxy?.useDict('com_charge_item_unit'));
type querytype = {
residentId: string;

View File

@@ -28,7 +28,11 @@
</div>
<div class="list_body" v-loading="Searching" v-if="list.length > 0 || Searching">
<div class="list_value" @click="searchclick(item)" v-for="(item, index) in list" :key="index">
{{ item.houseName }}-{{ item.residentName }}-{{ item.phone }}
{{ item.houseName }}
<!-- <span v-show="Boolean(item.houseName && item.residentName)">-</span>
{{ item.residentName }}
<span v-show="Boolean(item.phone && item.residentName)">-</span>
{{ item.phone }} -->
</div>
</div>
<div v-else class="flex h-full items-center justify-center">
@@ -67,6 +71,7 @@ import { Component, ref } from 'vue';
import cashier from './cashier.vue';
import history from './history.vue';
import versionbody from './versionbody.vue';
import { cashQuery } from '@/api/system/SdbCashier';
/** 当前状态 搜索后 搜索前 */
@@ -77,7 +82,6 @@ const onceSearch = ref(false);
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_cashier_type } = toRefs<any>(proxy?.useDict('com_cashier_type'));
console.log(com_cashier_type);
/** 房屋 住户 车辆 车位 */
const com_cashier_type_list = ref(['houseName', 'residentName']);
const searchform = ref();
@@ -141,9 +145,26 @@ function getlist() {
const currenttime = Date.now();
Searching.value = true;
searchform.value = {};
searchform.value = {
queryType: 0
};
if (searchType.value === 'phone') {
searchform.value.queryType = 2;
} else {
if (searchType.value === 'houseName') {
searchform.value.queryType = 0;
} else if (searchType.value === 'residentName') {
searchform.value.queryType = 1;
}
}
searchform.value[searchType.value] = searchValue.value;
if (searchType.value === 'residentName') {
delete searchform.value[searchType.value];
searchform.value['houseName'] = searchValue.value;
}
let lastdata = [];
cashQuery(searchform.value)
.then((res) => {

View File

@@ -0,0 +1,126 @@
<template>
<div class="app-container">
<el-form :inline="true" :model="queryParams" ref="queryRef" v-show="showSearch">
<el-form-item label="平台">
<el-input v-model="queryParams.platform" placeholder="请输入平台" clearable />
</el-form-item>
<el-form-item label="版本号">
<el-input v-model="queryParams.version" placeholder="请输版本号" clearable />
</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-row :gutter="10" class="mb8">
<el-col>
<el-button type="primary" icon="Plus" @click="handleAdd">新增版本</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="list">
<el-column label="ID" prop="id" />
<el-column label="平台" prop="platform" />
<el-column label="版本号" prop="version" />
<el-column label="更新类型" prop="updateType">
<template #default="scope">
<el-tag v-if="scope.row.updateType === 'apk'">整包</el-tag>
<el-tag v-if="scope.row.updateType === 'wgt'">热更新</el-tag>
<el-tag v-if="scope.row.updateType === 'ios'">苹果商店</el-tag>
</template>
</el-column>
<el-column label="强制更新" prop="isForce">
<template #default="scope">
<el-tag type="danger" v-if="scope.row.isForce === 1"></el-tag>
<el-tag v-else></el-tag>
</template>
</el-column>
<el-column label="状态" prop="status">
<template #default="scope">
<el-tag type="success" v-if="scope.row.status === 0">启用</el-tag>
<el-tag v-else>禁用</el-tag>
</template>
</el-column>
<el-column label="创建时间" prop="createTime" width="180" />
<el-column label="操作" width="150">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)">编辑</el-button>
<el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-column>
</el-table>
<!-- 弹窗 -->
<el-dialog :title="title" v-model="open" width="600px">
<el-form ref="formRef" :model="form" label-width="120px">
<el-form-item label="平台" prop="platform">
<el-select v-model="form.platform">
<el-option label="Android" value="android" />
<el-option label="iOS" value="ios" />
<el-option label="全部" value="all" />
</el-select>
</el-form-item>
<el-form-item label="版本号" prop="version">
<el-input v-model="form.version" placeholder="例如1.0.5" />
</el-form-item>
<el-form-item label="更新类型" prop="updateType">
<el-select v-model="form.updateType">
<el-option label="整包(APK)" value="apk" />
<el-option label="热更新(WGT)" value="wgt" />
<el-option label="苹果商店" value="ios" />
</el-select>
</el-form-item>
<el-form-item label="强制更新" prop="isForce">
<el-radio-group v-model="form.isForce">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="下载地址" prop="downloadUrl">
<el-input v-model="form.downloadUrl" type="textarea" />
</el-form-item>
<el-form-item label="热更新包地址" prop="wgtUrl">
<el-input v-model="form.wgtUrl" type="textarea" />
</el-form-item>
<el-form-item label="更新内容" prop="updateInfo">
<el-input v-model="form.updateInfo" type="textarea" />
</el-form-item>
<el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio :label="0">启用</el-radio>
<el-radio :label="1">禁用</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="open = false">取消</el-button>
<el-button type="primary" @click="submitForm">确定</el-button>
</template>
</el-dialog>
</div>
</template>
<script setup lang="ts">
const list = ref([]);
const loading = ref(false);
const open = ref(false);
const title = ref('');
const queryRef = ref();
const formRef = ref();
const showSearch = ref(true);
const queryParams = reactive({ platform: '', version: '' });
const form = reactive({
id: null,
platform: '',
version: '',
updateType: '',
isForce: 0,
downloadUrl: '',
wgtUrl: '',
updateInfo: '',
status: 0
});
</script>

View File

@@ -74,15 +74,15 @@
</el-table-column>
<el-table-column label="分合状态" width="100" align="center">
<template #default="scope">
<div class="readRecord" v-if="scope.row.waterRecord">
<DictTag :options="com_electricity_readrecord_status" :value="scope.row.waterRecord.status"></DictTag>
<div class="readRecord" v-if="scope.row.electricityRecord">
<DictTag :options="com_electricity_readrecord_status" :value="scope.row.electricityRecord.status"></DictTag>
</div>
<span v-else>---</span>
</template>
</el-table-column>
<el-table-column label="房屋号" align="center" prop="houseName" />
<el-table-column label="余额" width="100" align="center" prop="elePrice">
<template #defaul="scope">
<el-table-column label="余额" width="100" align="center">
<template #default="scope">
<span v-if="scope.row.electricityRecord">{{ scope.row.electricityRecord.balance }}</span>
<span v-else>---</span>
</template>
@@ -106,7 +106,7 @@
</el-table-column>
<el-table-column label="抄表时间" align="center">
<template #default="scope">
<span>{{ scope.row.waterRecord ? scope.row.waterRecord.readTime : '--' }}</span>
<span>{{ scope.row.electricityRecord ? scope.row.electricityRecord.readTime : '--' }}</span>
</template>
</el-table-column>
<!-- <el-table-column width="150" label="启停" align="center" prop="deleted" v-hasPermi="['equipment:isUse:electricitydevice']">

View File

@@ -3,10 +3,10 @@
<pageheader></pageheader>
<el-card class="flex-1 mt-10px" shadow="never">
<template #header>
<el-row :gutter="10" style="font-size: 0.8rem; font-weight: 450">
<el-row style="font-size: 0.8rem; font-weight: 450">
<el-col :span="4"> 设备号 {{ routeid }} </el-col>
<el-col :span="4"> 房屋号 {{ housename }} </el-col>
<el-col :span="12"></el-col>
<el-col :span="8"> 房屋号 {{ housename }} </el-col>
<el-col :span="8"></el-col>
<el-col :span="4" class="flex">
<el-button @click="confinem">返回</el-button>
<el-button type="warning" @click="handleExport">导出数据</el-button>

View File

@@ -0,0 +1,150 @@
<template>
<div class="flex flex-col h-full p-2">
<pageheader></pageheader>
<el-card class="flex-1 mt-10px" shadow="never">
<template #header>
<div class="flex justify-between items-center">
<el-form class="demo-form-inline" :inline="true">
<el-form-item label="查询日期">
<el-date-picker
clearable
v-model="SearchTime"
@change="
(val) => {
console.log(val);
if (!val) {
queryParams.startDate = '';
queryParams.endDate = '';
return;
}
SearchTime = val;
const days = val;
const [star, end] = days.map((item) => item.split(' ')[0]);
queryParams.startDate = star + ' 00:00:00';
queryParams.endDate = end + ' 23:59:59';
}
"
type="daterange"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
/>
</el-form-item>
<el-form-item label="" v-hasPermi="['water:topupRecord:list']">
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
</el-form>
<el-button @click="handleExport" v-hasPermi="['water:topupRecord:export']" type="warning">导出统计</el-button>
</div>
</template>
<el-table v-loading="loading" border :data="topupRecordList">
<el-table-column label="充值时间" align="center" prop="rechargeTime">
<template #default="scope">
<span v-if="scope.row.rechargeTime">{{ scope.row.rechargeTime }}</span>
<span v-else>---</span>
</template>
</el-table-column>
<el-table-column label="小区名称" align="center" prop="villageName">
<template #default="scope">
<span v-if="scope.row.villageName">{{ scope.row.villageName }}</span>
<span v-else>---</span>
</template>
</el-table-column>
<el-table-column label="户主" align="center" prop="residentName">
<template #default="scope">
<span v-if="scope.row.residentName">{{ scope.row.residentName }}</span>
<span v-else>---</span>
</template>
</el-table-column>
<el-table-column label="房号" align="center" prop="houseName">
<template #default="scope">
<span v-if="scope.row.houseName">{{ scope.row.houseName }}</span>
<span v-else>---</span>
</template>
</el-table-column>
<el-table-column label="单价" align="center" prop="fixedPrice">
<template #default="scope">
<div v-if="scope.row.fixedPrice && scope.row.unit">
<span>{{ scope.row.fixedPrice }}</span>
<span>/</span>
<span>{{ scope.row.unit }}</span>
</div>
<div v-else>
<span>---</span>
</div>
</template>
</el-table-column>
<el-table-column label="设备编号" align="center" prop="deviceCode" />
<el-table-column label="订单号" align="center" prop="orderId" />
<el-table-column label="充值金额" align="center" prop="rechargeAmount" />
<el-table-column label="缴费方式" align="center" prop="topUpType" />
</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 lang="ts">
import { getTopupRecordByDate, type TopupRecordList, exportTopupRecordByDate } from '@/api/system/SdbTopupRecord/index';
import { checkPermi } from '@/utils/permission';
const router = useRouter();
const route = useRoute();
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const topupRecordList = ref<TopupRecordList[]>([]);
const loading = ref(false);
const total = ref(0);
const data = reactive({
queryParams: {
pageNum: 1,
pageSize: 10,
startDate: '',
endDate: ''
}
});
const SearchTime = ref([]);
const { queryParams } = toRefs(data);
/** 查询充值记录列表 */
const getList = async () => {
if (!checkPermi(['water:topupRecord:list'])) return;
loading.value = true;
const res = await getTopupRecordByDate(queryParams.value);
topupRecordList.value = res.rows;
total.value = res.total;
loading.value = false;
};
onMounted(() => {
getList();
});
const confinem = () => {
router.back();
};
/** 导出按钮操作 */
const handleExport = () => {
// exportTopupRecordByDate();
proxy?.download(
'/topupRecord/water/export',
{
...queryParams.value
},
`花开物业水费统计表.xlsx`
);
};
</script>
<style lang="scss" scoped>
.el-table {
height: calc(100% - 80px);
}
.el-form-item {
margin-bottom: 0;
}
</style>

View File

@@ -87,7 +87,6 @@ import { ref } from 'vue';
import PageHeader from '@/components/Pageheader/index.vue';
import { getVisitor } from '@/api/system/Visitor';
import { formatTimeDiff } from '@/utils/time';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { sys_user_sex } = toRefs<any>(proxy?.useDict('sys_user_sex'));

View File

@@ -53,9 +53,13 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="区域名称" align="center" prop="areaName" />
<el-table-column label="区域编号" align="center" prop="areaCode" />
<el-table-column label="面积" align="center" prop="area" />
<el-table-column label="车位数量" align="center" prop="parkingCount" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="面积" align="center" prop="area" width="90">
<template #default="scope">
{{ scope.row.area + ' m²' }}
</template>
</el-table-column>
<el-table-column label="车位数量" align="center" prop="parkingCount" width="90" />
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['area:area:edit']">修改</el-button>
@@ -122,10 +126,14 @@ const { queryParams, form, rules } = toRefs(data);
/** 查询车位区域管理列表 */
const getList = async () => {
loading.value = true;
const res = await listArea(queryParams.value);
areaList.value = res.rows;
total.value = res.total;
loading.value = false;
listArea(queryParams.value)
.then((res) => {
areaList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 搜索按钮操作 */
@@ -156,7 +164,7 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: AreaVO) => {
const _id = row.id || ids.value[0];
const _id = row ? row.id : ids.value[0];
router.push({
path: '/carArea/editCarArea',
query: {

View File

@@ -15,8 +15,8 @@
</el-col>
<el-col :span="2"></el-col>
<el-col :span="11">
<el-form-item label="车位号" prop="parkingId">
<el-select v-model="form.parkingId" placeholder="请选择车位号">
<el-form-item label="车位号" prop="parkingId">
<el-select v-model="form.parkingId" placeholder="请选择车位号">
<el-option v-for="item in parkinglist" :key="item.id" :label="item.parkingCode" :value="item.id" />
</el-select>
</el-form-item>
@@ -207,6 +207,7 @@ if (route.query.id) {
...form.value,
...res.data
};
changeArealist(res.data.areaId);
});
}

View File

@@ -50,14 +50,14 @@
<el-table v-loading="loading" border :data="carList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="车牌号" align="center" prop="carNum" />
<el-table-column label="车辆品牌" align="center" prop="carBrand" />
<el-table-column label="车辆型号" align="center" prop="carModel" />
<el-table-column label="车身颜色" align="center" prop="carColor" />
<el-table-column label="持有人" align="center" prop="residentId">
<el-table-column label="车牌号" width="155" align="center" prop="carNum" />
<el-table-column label="车辆品牌" width="155" align="center" prop="carBrand" />
<el-table-column label="车辆型号" width="155" align="center" prop="carModel" />
<el-table-column label="车身颜色" width="125" align="center" prop="carColor" />
<el-table-column label="持有人" width="155" align="center" prop="residentId">
<template #default="scope"> {{ getResidentName(scope.row.residentId) }} </template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['car:car:edit']">修改</el-button>
@@ -143,11 +143,17 @@ const getResidentName = (id: string) => {
/** 查询车辆管理列表 */
const getList = async () => {
loading.value = true;
const res = await listCar(queryParams.value);
listCar(queryParams.value)
.then((res) => {
carList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
const res1 = await listResident();
ResidentList.value = res1.rows;
carList.value = res.rows;
total.value = res.total;
loading.value = false;
};

View File

@@ -233,7 +233,7 @@ const submitForm = () => {
/** 删除按钮操作 */
const handleDelete = async (row?: DeviceVO) => {
const _ids = row?.id || ids.value;
await proxy?.$modal.confirm('是否确认删除设备编号为"' + _ids + '"的数据项').finally(() => (loading.value = false));
await proxy?.$modal.confirm('是否确认删除设备?').finally(() => (loading.value = false));
await delDevice(_ids);
proxy?.$modal.msgSuccess('删除成功');
await getList();

View File

@@ -146,16 +146,20 @@ init();
async function getlist() {
loading.value = true;
const rows = await listDeviceRepair();
deviceRepairList.value = rows.rows;
deviceRepairList.value.forEach((item) => {
item.maintainUserNames = item.maintainUserList
.map((i) => i.nickName)
.filter((i) => i)
.join(',');
});
total.value = rows.total;
loading.value = false;
listDeviceRepair()
.then((rows) => {
deviceRepairList.value = rows.rows;
deviceRepairList.value.forEach((item) => {
item.maintainUserNames = item.maintainUserList
.map((i) => i.nickName)
.filter((i) => i)
.join(',');
});
total.value = rows.total;
})
.finally(() => {
loading.value = false;
});
}
/** 删除按钮操作 */
@@ -222,6 +226,7 @@ const cancelForm = () => {
display: flex;
align-items: center;
.label {
font-size: 15px;
width: 100px;
text-align: right;
}

View File

@@ -140,10 +140,14 @@ const { queryParams, form, rules } = toRefs(data);
/** 查询设备分类列表 */
const getList = async () => {
loading.value = true;
const res = await listDeviceCategory(queryParams.value);
deviceCategoryList.value = res.rows;
total.value = res.total;
loading.value = false;
listDeviceCategory(queryParams.value)
.then((res) => {
deviceCategoryList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 取消按钮 */

View File

@@ -7,7 +7,13 @@
<el-form class="formBody" label-position="right" ref="formRef" :model="form" :rules="rules" label-width="130px">
<el-form-item label="维修设备" prop="deviceId">
<el-select v-model="form.deviceId">
<el-option v-for="(item, index) in deviceCategorylist" :key="index" :value="item.id" :label="item.categoryName"></el-option>
<el-option
v-for="(item, index) in deviceCategorylist"
:key="index"
:disabled="item.status === 1"
:value="item.id"
:label="item.categoryName"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="设备名称" prop="deviceName">
@@ -210,6 +216,7 @@ const cancelForm = () => {
border: 1px solid #ccc;
padding: 5px 10px;
border-radius: 5px;
min-width: 100px;
&.add {
cursor: pointer;
border-style: dashed;

View File

@@ -147,18 +147,22 @@ const { queryParams, form } = toRefs(data);
// TODO 设备维修记录 用户id有用户信息没有
const getList = async () => {
loading.value = true;
const res = await listDeviceRepair(queryParams.value);
deviceRepairList.value = res.rows;
deviceRepairList.value.forEach((item) => {
if (item.maintainUserList && item.maintainUserList.length > 0) {
item.maintainUserNames = item.maintainUserList
.map((i) => i.nickName)
.filter((i) => i)
.join(',');
}
});
total.value = res.total;
loading.value = false;
listDeviceRepair(queryParams.value)
.then((res) => {
deviceRepairList.value = res.rows;
deviceRepairList.value.forEach((item) => {
if (item.maintainUserList && item.maintainUserList.length > 0) {
item.maintainUserNames = item.maintainUserList
.map((i) => i.nickName)
.filter((i) => i)
.join(',');
}
});
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 取消按钮 */

View File

@@ -157,7 +157,7 @@ const cancelForm = () => {
gap: 20px;
margin-bottom: 20px;
grid-template-columns: repeat(3, 1fr);
font-size: 0.98rem;
font-size: 0.8rem;
.info_item {
display: flex;
align-items: center;

View File

@@ -57,16 +57,16 @@
<span></span>
</div>
</el-form-item>
<!-- <el-form-item label="车位号" prop="parkingId">
<el-form-item label="车位号" prop="parkingId">
<el-select v-model="form.parkingId" class="m-2" placeholder="请选择车位号">
<el-option v-for="item in parkinglist" :key="item.id" :label="item.parkingName" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="储藏室" prop="storeroomId">
<el-select v-model="form.storeroomId" class="m-2" placeholder="请选择储藏室">
<el-option v-for="item in storeRoomlist" :key="item.id" :label="item.storeroomName" :value="item.id" />
<el-option v-for="(item, index) in storeRoomlist" :key="index" :label="item.storeroomName" :value="item.id" />
</el-select>
</el-form-item> -->
</el-form-item>
<el-form-item style="margin-top: 30px">
<el-button type="primary" @click="submitForm">确定</el-button>
<el-button @click="cancelForm">取消</el-button>
@@ -85,7 +85,7 @@ import { addHouseAPI, EditHouseApi, getBuildingOnly, getHouseApi, getHouselistAP
import { addHouseType } from '@/api/system/house/type';
import { GetVillageListParking, listParking } from '@/api/system/parking';
import { GetVillagelistStoreroom, listStoreroom } from '@/api/system/storeroom';
import { listHouseUseType } from '@/api/system/houseUse';
import { listHouseUseType, listHouseUseType_add_house } from '@/api/system/houseUse';
import { getByBUildingidtoUnitNo } from '@/api/system/houseUnit';
// const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -143,23 +143,21 @@ init();
const houseUseTypeList = ref([]);
async function geteditinfo() {
listHouseUseType({
pageNum: 1,
pageSize: 99999
}).then((res) => {
houseUseTypeList.value = res.rows;
listHouseUseType_add_house().then((res) => {
houseUseTypeList.value = res.data;
});
if (route.query.id) {
houseid.value = route.query.id;
// const res = await GetVillageListParking(villageid, houseid.value);
// parkinglist.value = res.data;
// GetVillagelistStoreroom({
// ...queryChangestore.value,
// villageid: villageid,
// houseId: houseid.value
// }).then((res1) => {
// storeRoomlist.value = res1.data;
// });
const res = await GetVillageListParking(villageid, houseid.value);
parkinglist.value = res.data;
const res1 = await GetVillagelistStoreroom({
...queryChangestore.value,
villageid: villageid,
houseId: houseid.value
});
storeRoomlist.value = res1.data.filter((item) => item);
getHouseApi(houseid.value).then((res) => {
form.value = {
...form.value,
@@ -176,8 +174,7 @@ async function geteditinfo() {
shareArea: res.data.shareArea // 公摊面积
};
housetype.value = res.data.houseType.split('');
// handlechangeBuild(form.value.buildingId);
console.log(housetype.value);
queryChangestore.value.buildingId = form.value.buildingId;
changeBuild(res.data.buildingId);
});
} else {
@@ -195,9 +192,8 @@ function handlechangeBuild(id: string) {
queryChangestore.value.buildingId = id;
form.value.unitNoId = '';
form.value.floorNo = '';
changeBuild(id);
// getStoreRoomlist();
getStoreRoomlist();
}
function changeBuild(id: string) {
@@ -220,7 +216,7 @@ function changeBuild(id: string) {
function changeUnitNo(id: string) {
queryChangestore.value.unitNoId = id;
form.value.floorNo = '';
// getStoreRoomlist();
getStoreRoomlist();
}
// 查询储藏室列表

View File

@@ -54,35 +54,39 @@
<span>储藏室信息 </span>
<el-button v-hasPermi="['storeroom:storeroom:edit']" type="primary" text v-if="HouseInfo.storeroom" @click="editStoreRoom">编辑</el-button>
</div>
<div class="addBuildingFormBody" v-if="HouseInfo.storeroom">
<div class="descriptionsbox">
<div class="label">楼栋:</div>
<div class="value">{{ HouseInfo.storeroom?.buildingName ?? '--' }}</div>
</div>
<div class="descriptionsbox">
<div class="label">单元:</div>
<div class="value">{{ HouseInfo.storeroom?.unitNo ?? '--' }} 单元</div>
</div>
<div class="descriptionsbox">
<div class="label">储藏室号:</div>
<div class="value">{{ HouseInfo.storeroom?.unitNo ?? '--' }} </div>
</div>
<div class="descriptionsbox">
<div class="label">建筑面积:</div>
<div class="value">{{ HouseInfo.storeroom?.houseArea ?? '--' }}</div>
</div>
<div class="descriptionsbox">
<div class="label">公摊面积:</div>
<div class="value">{{ HouseInfo.storeroom?.shareArea ?? '--' }}</div>
</div>
<div class="descriptionsbox">
<div class="label">实用面积:</div>
<div class="value">{{ HouseInfo.storeroom?.internalArea ?? '--' }}</div>
</div>
<div class="descriptionsbox">
<div class="label">备注:</div>
<div class="value"></div>
<div class="" v-if="HouseInfo.storeroom">
<div class="addBuildingFormBody">
<div class="descriptionsbox">
<div class="label">楼栋:</div>
<div class="value">{{ HouseInfo.storeroom?.buildingName ?? '--' }}</div>
</div>
<div class="descriptionsbox">
<div class="label">单元:</div>
<div class="value">{{ HouseInfo.storeroom?.unitNo ?? '--' }} 单元</div>
</div>
<div class="descriptionsbox">
<div class="label">储藏室号:</div>
<div class="value">{{ HouseInfo.storeroom?.unitNo ?? '--' }} </div>
</div>
<div class="descriptionsbox">
<div class="label">建筑面积:</div>
<div class="value">{{ HouseInfo.storeroom?.houseArea ?? '--' }}</div>
</div>
<div class="descriptionsbox">
<div class="label">公摊面积:</div>
<div class="value">{{ HouseInfo.storeroom?.shareArea ?? '--' }}</div>
</div>
<div class="descriptionsbox">
<div class="label">实用面积:</div>
<div class="value">{{ HouseInfo.storeroom?.internalArea ?? '--' }}</div>
</div>
<div class="descriptionsbox" style="grid-column-start: 1; grid-column-end: 4">
<div class="label">备注:</div>
<div class="value">{{ HouseInfo.storeroom?.remark ?? '--' }}</div>
</div>
</div>
<!-- <div class="addBuildingFormBody remarkbuildingformbody">
</div> -->
</div>
<div v-else class="w-full h-full flex flex-center min-h-4rem">
<span style="color: #999; font-weight: 500; font-size: 1.1rem; letter-spacing: 10px">暂无信息</span>
@@ -161,12 +165,22 @@
</div>
<div>
<el-table :data="HouseInfo.chargeItemList" style="width: 100%">
<el-table-column prop="date" label="收费项目" />
<el-table-column prop="name" label="收费标准" />
<el-table-column prop="name" label="开始时间" />
<el-table-column prop="name" label="结束时间" />
<el-table-column prop="name" label="备注" />
<el-table-column prop="address" label="操作" />
<el-table-column prop="itemName" label="收费项目" />
<el-table-column prop="name" label="收费标准">
<template #default="scope">
<div class="flex">
<span>{{ scope.row.fixedPrice }}</span> /
<dict-tag :options="com_charge_item_unit" :value="scope.row.unit"></dict-tag>
</div>
</template>
</el-table-column>
<el-table-column prop="createTime" label="开始时间" />
<el-table-column prop="name" label="结束时间">
<template #default>
<span>---</span>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" />
</el-table>
</div>
</div>
@@ -232,6 +246,7 @@ const { sys_user_sex } = toRefs<any>(proxy?.useDict('sys_user_sex'));
const { com_pay_status } = toRefs<any>(proxy?.useDict('com_pay_status'));
const { com_parking_type } = toRefs<any>(proxy?.useDict('com_parking_type'));
const { com_parking_status } = toRefs<any>(proxy?.useDict('com_parking_status'));
const { com_charge_item_unit } = toRefs<any>(proxy?.useDict('com_charge_item_unit'));
const route = useRoute();
const router = useRouter();
@@ -316,7 +331,9 @@ init();
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(3, 1fr);
&.remarkbuildingformbody {
display: block;
}
.descriptionsbox {
display: flex;
align-items: center;

View File

@@ -6,7 +6,7 @@
<span class="pointer" @click="handleAddBuilding" v-hasPermi="['system:building:add']">+增加楼栋</span>
</div>
</div>
<ul>
<ul class="flex-1 overflow-y-auto overflow-x-hidden">
<li
v-for="(item, index) in currentBuildingInfoList"
:class="{
@@ -67,6 +67,9 @@ $primary_color: #1978fe;
border-radius: 2px;
color: rgba(0, 0, 0, 1);
margin-right: 10px;
display: flex;
flex-direction: column;
.buildingheader {
height: 60px;
line-height: 60px;

View File

@@ -1,9 +1,14 @@
<template>
<div class="house-list">
<div class="house flex align-center" @contextmenu="contextMenu.open($event, house.houseId)" v-for="house in list.houses" :key="house.houseId">
<div class="flex flex-center">
<div class="w-full flex items-center justify-between">
<el-checkbox :label="house.houseNo" :value="house.houseId" />
<div class="calp" @click="handleCalp($event, house.houseId)">···</div>
<!-- <div class="calp" @click="handleCalp($event, house.houseId)">···</div> -->
<div class="circlebox" @click="handleCalp($event, house.houseId)">
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
</div>
</div>
</div>
<!-- 右键菜单组件 -->
@@ -41,6 +46,25 @@ const handleCalp = (event: MouseEvent, houseid: string) => {
</script>
<style scoped lang="scss">
.circlebox {
width: 14px;
height: 14px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 2px;
$circleSize: 3px;
margin-left: 10px;
cursor: pointer;
.circle {
width: $circleSize;
height: $circleSize;
border-radius: 50%;
background-color: #666666;
}
}
.house-list {
display: flex;
flex-wrap: wrap;
@@ -57,7 +81,7 @@ const handleCalp = (event: MouseEvent, houseid: string) => {
border: 1px solid #ddd;
border-radius: 4px;
margin: 5px;
padding-left: 10px;
padding: 0 10px;
}
.house:hover {
background: #e8f3ff;
@@ -75,19 +99,4 @@ const handleCalp = (event: MouseEvent, houseid: string) => {
top: 0;
left: 0;
}
.calp {
margin-left: 10px;
width: 20px;
height: 20px;
line-height: 20px;
display: flex;
justify-content: center;
align-items: center;
font-size: 10px;
letter-spacing: -3px;
transform: rotateZ(90deg) scale(0.8);
cursor: pointer;
}
</style>

View File

@@ -1,6 +1,6 @@
<template>
<div class="h-full">
<div class="TableBox p-5 h-full" v-if="houseStore.currentHouseInfoList !== null">
<div class="tablebox1 h-full flex-1">
<div class="TableBox p-5" v-if="houseStore.currentHouseInfoList !== null">
<el-checkbox-group @change="handleChangeCheckhouses" v-model="houseStore.checkoutHouses">
<el-table border :data="houseStore.currentFloorInfoList">
<el-table-column align="center" fixed label="楼层\单元" max-width="100">
@@ -16,8 +16,15 @@
>
<template #header>
<span>{{ unit.unitNoName }}</span>
<el-button link type="primary" icon="Edit" @click="HandleEditUnit(unit)"></el-button>
<el-button link type="danger" icon="Delete" style="margin-left: 0" @click="HandleDeleteUnit(unit)"></el-button>
<el-button v-hasPermi="['unitNo:unitNo:edit']" link type="primary" icon="Edit" @click="HandleEditUnit(unit)"></el-button>
<el-button
v-hasPermi="['unitNo:unitNo:remove']"
link
type="danger"
icon="Delete"
style="margin-left: 0"
@click="HandleDeleteUnit(unit)"
></el-button>
</template>
<template #default="{ row }">
<houseItem @contextmenufun="contextMenuFun" :menu-list="menutlist" :unit="unit.floors" :f-idx="row"></houseItem>
@@ -104,9 +111,22 @@ function HandleDeleteUnit(unit) {
</script>
<style scoped lang="scss">
.TableBox {
.el-table {
height: calc(100% - 500px);
.tablebox1 {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
overflow: hidden;
.TableBox {
height: 100%;
.el-checkbox-group {
height: 100%;
overflow-y: auto;
}
.el-table {
width: 100%;
height: 100%;
}
}
}
.nodata {

View File

@@ -15,31 +15,24 @@
>楼栋结构{{ houseStore.currentBuildingInfo?.buildStructure ? `${houseStore.currentBuildingInfo?.buildStructure}(m)` : '--' }}
</span>
</div> -->
<div>
<div style="text-wrap: nowrap">
<span class="text-size-16px text-color-black text-widget-bold mr-30px">
<strong>{{ houseStore.currentBuildingInfo?.buildingName }}</strong>
</span>
<span class="mr-15px"
>楼栋朝向:{{ houseStore.currentBuildingInfo?.buildToward ? `${houseStore.currentBuildingInfo?.buildToward}` : '--' }}</span
>楼栋朝向:{{ houseStore.currentBuildingInfo?.buildToward ? `${houseStore.currentBuildingInfo?.buildToward}` : ' --' }}</span
>
<span class="mr-15px">楼高{{ houseStore.currentBuildingInfo?.buildTall ? `${houseStore.currentBuildingInfo?.buildTall}(m)` : '--' }}</span>
<span class="mr-15px">楼高:{{ houseStore.currentBuildingInfo?.buildTall ? `${houseStore.currentBuildingInfo?.buildTall}(m)` : ' --' }}</span>
<span class="mr-15px"
>楼栋结构{{ houseStore.currentBuildingInfo?.buildStructure ? `${houseStore.currentBuildingInfo?.buildStructure}` : '--' }}
>楼栋结构:{{ houseStore.currentBuildingInfo?.buildStructure ? `${houseStore.currentBuildingInfo?.buildStructure}` : ' --' }}
</span>
</div>
<div class="rightActions flex flex-items-center">
<span class="mr-20px" @click="handleAddUnit" v-hasPermi="['system:house:add']">+添加单元</span>
<div style="text-wrap: nowrap" class="rightActions flex flex-items-center">
<span class="mr-20px" @click="handleAddUnit" v-hasPermi="['unitNo:unitNo:add']">+添加单元</span>
<span class="mr-20px" @click="handleAddHouse" v-hasPermi="['system:house:add']">+增加房屋</span>
<!-- <span class="mr-20px">收费标准设置</span> -->
<span @click="deleteAllhouse" v-hasPermi="['system:house:remove']">删除</span>
<el-select
clearable
@clear="handleClearUse"
@change="handleChangeUse"
v-model="houseUse"
placeholder="筛选房屋类型"
style="width: 180px; margin: 0 10px"
>
<span @click="deleteAllhouse" v-hasPermi="['system:house:remove']">批量删除房屋</span>
<el-select clearable @clear="handleClearUse" @change="handleChangeUse" v-model="houseUse" placeholder="筛选房屋类型" class="selectbox">
<el-option v-for="item in houseUseTypeList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
<div class="searchbox flex flex-items-center">
@@ -49,9 +42,9 @@
</div>
</div>
</div>
<div class="UnitBody">
<TableUnit @edit-unit="handleEditUnit" @delete-unit="handleDelete"></TableUnit>
</div>
<!-- <div class="UnitBody"> -->
<TableUnit @edit-unit="handleEditUnit" @delete-unit="handleDelete"></TableUnit>
<!-- </div> -->
<!-- 添加或修改单元对话框 -->
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
<el-form ref="unitNoFormRef" :model="form" :rules="rules" label-width="80px">
@@ -79,7 +72,7 @@
import { deleteHouseApi } from '@/api/system/house';
import TableUnit from './components/table.vue';
import { useHouseStore } from '@/store/modules/house';
import { listHouseUseType } from '@/api/system/houseUse';
import { listHouseUseType, listHouseUseType_add_house } from '@/api/system/houseUse';
import { addUnitNo, delUnitNo, getUnitNo, updateUnitNo } from '@/api/system/houseUnit';
import { UnitNoVO } from '@/api/system/houseUnit/type';
@@ -96,11 +89,8 @@ const houseUseTypeList = ref([]);
* 获取房屋 类型
*/
function init() {
listHouseUseType({
pageNum: 1,
pageSize: 99999
}).then((res) => {
houseUseTypeList.value = res.rows;
listHouseUseType_add_house().then((res) => {
houseUseTypeList.value = res.data;
});
}
init();
@@ -228,6 +218,8 @@ $primary_color: #1978fe;
display: flex;
flex-direction: column;
overflow: hidden;
min-height: 0;
.Unit_top {
padding: 20px;
height: 60px;
@@ -238,15 +230,24 @@ $primary_color: #1978fe;
span {
cursor: pointer;
}
.selectbox {
width: 150px;
margin: 0 10px;
@media (max-width: 1550px) {
width: 120px;
}
@media (max-width: 1400px) {
width: 80px;
}
}
.searchbox {
.searchinput {
width: 250px;
@media (max-width: 1200px) {
width: 50px;
@media (max-width: 1550px) {
width: 130px;
}
@media (max-width: 1400px) {
width: 130px;
width: 50px;
}
}
}
@@ -256,6 +257,7 @@ $primary_color: #1978fe;
flex: 1;
overflow-x: hidden;
overflow-y: auto;
display: flex;
}
}
</style>

View File

@@ -1,5 +1,5 @@
<template>
<div class="p-2 houselist">
<div class="p-2 houselist flex flex-col">
<PageHeader>
<template #content>
<div class="houseAdressBox">
@@ -32,13 +32,13 @@ init();
<style lang="scss" scoped>
.houselist {
flex: 1;
box-sizing: border-box;
height: calc(100vh - 84px);
min-height: calc(100vh - 84px);
height: 100%;
.houseBody {
height: calc(100% - 200px);
flex: 1;
margin-top: 10px;
min-height: 0;
overflow: hidden;
}
}
.houseAdressBox {

View File

@@ -13,8 +13,8 @@
</el-col>
<el-col :span="2"></el-col>
<el-col :span="11">
<el-form-item label="租户姓名" prop="rentalName">
<el-input v-model="form.rentalName" placeholder="请输入住户姓名" />
<el-form-item label="业主姓名" prop="rentalName">
<el-input disabled v-model="form.rentalName" placeholder="请输入业主姓名" />
</el-form-item>
</el-col>
</el-row>
@@ -94,7 +94,7 @@
<el-row>
<el-col :span="24">
<el-form-item label="房屋设施" prop="type">
<div class="housedevicesbox">
<div class="housedevicesbox" v-if="housefacilities.length > 0">
<div
v-for="item in housefacilities"
:key="item.id"
@@ -108,6 +108,7 @@
<span class="ml-2">{{ item.name }}</span>
</div>
</div>
<span v-else style="color: gray"> </span>
</el-form-item>
</el-col>
</el-row>
@@ -181,7 +182,7 @@ import { HouseRentalVO } from '@/api/system/houseRental/type';
import { CascaderValue, UploadInstance, UploadProps, UploadUserFile } from 'element-plus';
import { getHousePathById, hasFormData, splitStringUrl } from '@/utils/house';
import { addHouseRental, getHouseRental, updateHouseRental, uploadHouseImage } from '@/api/system/houseRental';
import { addHouseRental, getHouseOwnUser, getHouseRental, updateHouseRental, uploadHouseImage } from '@/api/system/houseRental';
import { validator } from '@/utils/Reg';
import { useHouseStore } from '@/store/modules/house';
import { listHouseFacilities } from '@/api/system/HouseFacilities';
@@ -265,6 +266,11 @@ gettreedata();
function handleChange(val: CascaderValue) {
userHousepath.value = val;
form.value.houseId = val[2];
getHouseOwnUser(val[2]).then((res) => {
console.log(res.data);
form.value.rentalName = res.data;
});
}
// !== 上传文件 =============================================================================
const fileList = ref<UploadUserFile[]>([]);

View File

@@ -51,12 +51,23 @@
<span style="margin-right: 10px" v-for="item in HouseInfo.facilitieslist" :key="item">{{ handlefacilities(item) }} </span>
</div>
</div>
<el-row>
<el-col :span="10">
<el-row :span="24">
<el-col :span="24">
<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="splitImages(item)" class="houseImage"></el-image>
<div class="value">
<el-image
v-for="(item, index) in HouseInfo.houseImageUrls"
:key="index"
:zoom-rate="1.2"
:max-scale="7"
:min-scale="0.2"
:src="item"
:preview-src-list="HouseInfo.houseImageUrls"
show-progress
:initial-index="0"
class="houseImage"
></el-image>
</div>
</div>
</el-col>
@@ -199,6 +210,8 @@ function handlBack() {
.houseImage {
width: 200px;
height: 100px;
margin: 10px 5px;
object-fit: cover;
}
.descriptionsbox {
display: flex;

View File

@@ -11,7 +11,7 @@
<el-option v-for="item in com_house_use" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="发布人" prop="houseId">
<el-form-item label="发布人" prop="rentalName">
<el-input v-model="queryParams.rentalName" placeholder="请输入" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
@@ -163,10 +163,14 @@ const { queryParams, form } = toRefs(data);
/** 查询房屋租赁管理列表 */
const getList = async () => {
loading.value = true;
const res = await listHouseRental(queryParams.value);
houseRentalList.value = res.rows;
total.value = res.total;
loading.value = false;
listHouseRental(queryParams.value)
.then((res) => {
houseRentalList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 取消按钮 */
@@ -190,6 +194,8 @@ const handleQuery = () => {
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value?.resetFields();
queryParams.value.houseUse = '';
queryParams.value.rentalName = '';
handleQuery();
};

View File

@@ -150,10 +150,14 @@ const { queryParams, form, rules } = toRefs(data);
/** 查询单元列表 */
const getList = async () => {
loading.value = true;
const res = await listUnitNo(queryParams.value);
unitNoList.value = res.rows;
total.value = res.total;
loading.value = false;
listUnitNo(queryParams.value)
.then((res) => {
unitNoList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 取消按钮 */

View File

@@ -112,10 +112,14 @@ const { queryParams, form, rules } = toRefs(data);
/** 查询房屋类型列表 */
const getList = async () => {
loading.value = true;
const res = await listHouseUseType(queryParams.value);
houseUseTypeList.value = res.rows;
total.value = res.total;
loading.value = false;
listHouseUseType(queryParams.value)
.then((res) => {
houseUseTypeList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 取消按钮 */

View File

@@ -78,10 +78,14 @@ const { queryParams } = toRefs(data);
const getList = async () => {
queryParams.value.statDate = starDate.value.join('-');
loading.value = true;
const res = await listItem(queryParams.value);
itemList.value = res.rows;
total.value = res.total;
loading.value = false;
listItem(queryParams.value)
.then((res) => {
itemList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 搜索按钮操作 */

View File

@@ -20,17 +20,6 @@
<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="['system:item:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:item:edit']">编辑</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:item:remove']"
>删除</el-button
>
</el-col>
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
@@ -53,8 +42,8 @@
<el-switch
@change="(val: string) => handleChange(val, scope.row.id)"
v-model="scope.row.status"
active-value="1"
inactive-value="0"
active-value="0"
inactive-value="1"
></el-switch>
</template>
</el-table-column>
@@ -137,10 +126,14 @@ const { queryParams, form, rules } = toRefs(data);
/** 查询巡检项目列表 */
const getList = async () => {
loading.value = true;
const res = await listItem(queryParams.value);
itemList.value = res.rows;
total.value = res.total;
loading.value = false;
listItem(queryParams.value)
.then((res) => {
itemList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 取消按钮 */

View File

@@ -78,10 +78,14 @@ const { queryParams } = toRefs(data);
const getList = async () => {
queryParams.value.statDate = starDate.value.join('-');
loading.value = true;
const res = await listItem(queryParams.value);
itemList.value = res.rows;
total.value = res.total;
loading.value = false;
listItem(queryParams.value)
.then((res) => {
itemList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 搜索按钮操作 */

View File

@@ -39,11 +39,19 @@
is-range
range-separator=""
start-placeholder="开始时间"
format="HH:mm"
value-format="HH:mm:00"
end-placeholder="结束时间"
style="width: 100%"
/>
<el-button v-if="taskTime.length > 1" icon="Minus" circle style="margin-left: 10px" @click="removeTaskTime(index)"></el-button>
<el-button v-if="taskTime.length === index + 1" icon="Plus" circle style="margin-left: 10px" @click="addTaskTime"></el-button>
<!-- <el-button v-if="taskTime.length > 1" icon="Minus" circle style="margin-left: 10px" @click="removeTaskTime(index)"></el-button>
<el-button
v-if="taskTime.length === index + 1 && taskTime.length <= 8"
icon="Plus"
circle
style="margin-left: 10px"
@click="addTaskTime"
></el-button> -->
</div>
</el-form-item>
@@ -75,6 +83,7 @@
</template>
<script setup lang="ts">
// TODO 巡检计划 添加
import { listRoute } from '@/api/system/InspectionRoute';
import PageHeader from '@/components/Pageheader/index.vue';
import { numToWeek } from '@/utils/time';

View File

@@ -63,7 +63,7 @@
active-value="0"
inactive-value="1"
></el-switch>
<!-- 0关闭 1开启 -->
<!-- 1关闭 0开启 -->
</template>
</el-table-column>
<el-table-column label="操作" width="110" align="center" fixed="right" class-name="small-padding fixed-width">
@@ -148,17 +148,21 @@ const { queryParams, form, rules } = toRefs(data);
/** 查询巡检计划列表 */
const getList = async () => {
loading.value = true;
const res = await listPlan(queryParams.value);
planList.value = res.rows;
planList.value.forEach((item) => {
item.routeNames = item.routeList.map((item) => item.routeName).join(',');
item.executeDayNames = item.executeDay
.split(',')
.sort((a, b) => Number(a) - Number(b))
.map((item) => Number(item));
});
total.value = res.total;
loading.value = false;
listPlan(queryParams.value)
.then((res) => {
planList.value = res.rows;
planList.value.forEach((item) => {
item.routeNames = item.routeList.map((item) => item.routeName).join(',');
item.executeDayNames = item.executeDay
.split(',')
.sort((a, b) => Number(a) - Number(b))
.map((item) => Number(item));
});
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 取消按钮 */

View File

@@ -143,10 +143,14 @@ 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;
listPoint(queryParams.value)
.then((res) => {
pointList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 取消按钮 */

View File

@@ -124,11 +124,14 @@ const { queryParams, form } = toRefs(data);
/** 查询巡检记录主列表 */
const getList = async () => {
loading.value = true;
const res = await listRecord(queryParams.value);
recordList.value = res.rows;
total.value = res.total;
loading.value = false;
listRecord(queryParams.value)
.then((res) => {
recordList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
// 处理日期选择

View File

@@ -8,19 +8,19 @@
<el-form-item label="巡检路线名称" prop="routeName">
<el-input v-model.trim="form.routeName" placeholder="请输入巡检路线名称" />
</el-form-item>
<el-form-item label="巡检路线描述" prop="description">
<!-- <el-form-item label="巡检路线描述" prop="description">
<el-input type="textarea" :rows="3" v-model.trim="form.description" placeholder="请输入巡检路线描述" />
</el-form-item>
<el-form-item label="预计巡检时长" prop="estimatedTime">
</el-form-item> -->
<!-- <el-form-item label="预计巡检时长" prop="estimatedTime">
<el-input v-model.trim.number="form.estimatedTime" placeholder="预计巡检时长">
<template #append>分钟</template>
</el-input>
</el-form-item>
<el-form-item label="巡检路线状态" prop="routeStatus">
</el-form-item> -->
<!-- <el-form-item label="巡检路线状态" prop="routeStatus">
<el-radio-group v-model="form.routeStatus">
<el-radio v-for="(item, index) in com_inspection_route_status" :key="index" :value="item.value" :label="item.label"></el-radio>
</el-radio-group>
</el-form-item>
</el-form-item> -->
<el-form-item label="巡检点">
<div class="itembox">
<div
@@ -68,7 +68,7 @@ import { addRoute, getRoute, updateRoute } from '@/api/system/InspectionRoute';
import { getVillageByIdAPI } from '@/api/system/community';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_inspection_route_status } = toRefs<any>(proxy?.useDict('com_inspection_route_status'));
// const { com_inspection_route_status } = toRefs<any>(proxy?.useDict('com_inspection_route_status'));
const router = useRouter();
const route = useRoute();
@@ -193,7 +193,7 @@ function init() {
});
}
}
// TODO 巡检路线开关
// ! map
const mapReady = ref(false);
const AMapLib = ref(null);
@@ -206,7 +206,7 @@ const villageid = localStorage.getItem('villageid');
onMounted(async () => {
// 获取巡检点列表
if (!routeid.value) {
listPoint().then((res) => {
listPoint({}).then((res) => {
pointslist.value = res.rows;
});
}
@@ -331,8 +331,10 @@ function clearAll() {
// !!! 核心:获取绘制的路线经纬度数组
function getPolylinePath() {
if (drawnPolylines.value.length === 0) return [];
const lastLine = drawnPolylines.value.pop();
const path = lastLine.getPath().map((p) => [p.lng, p.lat]);
// 获取最后一条线
const lastPolyline = drawnPolylines.value[drawnPolylines.value.length - 1];
// const lastLine = drawnPolylines.value.pop();
const path = lastPolyline.getPath().map((p) => [p.lng, p.lat]);
return path;
}
/**

View File

@@ -47,19 +47,25 @@
<el-table v-loading="loading" border :data="routeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="巡检路线名称" width="220" align="center" prop="routeName" />
<el-table-column label="路线描述" align="center" prop="description" />
<!-- <el-table-column label="路线描述" align="center" prop="description" /> -->
<el-table-column label="巡检点" align="center" prop="pointNames" show-overflow-tooltip />
<el-table-column label="预计巡检时长(分钟)" width="140" align="center" prop="estimatedTime" />
<!-- <el-table-column label="预计巡检时长(分钟)" width="140" align="center" prop="estimatedTime" /> -->
<el-table-column label="巡检路线状态" width="120" align="center" prop="routeStatus">
<template #default="scope">
<dict-tag :options="com_inspection_route_status" :value="scope.row.routeStatus"></dict-tag>
<!-- <dict-tag :options="com_inspection_route_status" :value="scope.row.routeStatus"></dict-tag> -->
<el-switch
v-model="scope.row.routeStatus"
active-value="0"
inactive-value="1"
@change="(val) => switchchangebtn(scope.row.id, val)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="起点经度" width="120" align="center" prop="startLng" />
<el-table-column label="起点纬度" width="120" align="center" prop="startLat" />
<el-table-column label="终点经度" width="120" align="center" prop="endLng" />
<el-table-column label="终点纬度" width="120" align="center" prop="endLat" />
<el-table-column label="备注" align="center" prop="remark" />
<!-- <el-table-column label="起点经度" width="120" align="center" prop="startLng" /> -->
<!-- <el-table-column label="起点纬度" width="120" align="center" prop="startLat" /> -->
<!-- <el-table-column label="终点经度" width="120" align="center" prop="endLng" /> -->
<!-- <el-table-column label="终点纬度" width="120" align="center" prop="endLat" /> -->
<!-- <el-table-column label="备注" align="center" prop="remark" /> -->
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:route:edit']">修改</el-button>
@@ -74,7 +80,7 @@
</template>
<script setup name="Route" lang="ts">
import { listRoute, getRoute, delRoute, addRoute, updateRoute } from '@/api/system/InspectionRoute/index';
import { listRoute, getRoute, delRoute, addRoute, updateRoute, changeStatusRoute } from '@/api/system/InspectionRoute/index';
import { RouteVO, RouteQuery, RouteForm } from '@/api/system/InspectionRoute/type';
import { checkPermi } from '@/utils/permission';
@@ -197,6 +203,16 @@ const handleUpdate = async (row?: RouteVO) => {
});
};
const switchchangebtn = (id, val) => {
changeStatusRoute(id, val)
.then(() => {
ElMessage.success('修改成功');
})
.catch(() => {
ElMessage.error('修改失败');
});
};
/** 提交按钮 */
const submitForm = () => {
routeFormRef.value?.validate(async (valid: boolean) => {

View File

@@ -80,10 +80,14 @@ const { queryParams } = toRefs(data);
/** 查询巡检路线列表 */
const getList = async () => {
loading.value = true;
const res = await list_statapi(queryParams.value);
routeList.value = res.rows;
total.value = res.total;
loading.value = false;
list_statapi(queryParams.value)
.then((res) => {
routeList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 搜索按钮操作 */

View File

@@ -33,7 +33,14 @@
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
v-model="form.taskTime"
v-model="taskTime"
@update:model-value="
(val) => {
if (val.length > 0) {
form.taskTime = val.join(' - ');
}
}
"
type="daterange"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
@@ -93,6 +100,7 @@ const form = ref({
remindTime: '', // 提醒时间
planId: '' // 计划路线id
});
const taskTime = ref([]);
const rules = ref({
taskName: [{ required: true, message: '请输入巡检任务名称', trigger: 'blur' }],
taskTime: [{ required: true, message: '请选择巡检任务时间', trigger: 'blur' }],
@@ -134,10 +142,11 @@ async function init() {
id: res.data.id,
taskName: res.data.taskName, // 巡检计划名称
inspectorId: res.data.inspectorId, // 巡检人员
taskTime: res.data.taskTime, // 巡检人员
taskTime: '', // 巡检人员
remindTime: res.data.remindTime, // 提醒时间
planId: res.data.planId // 计划路线id
};
taskTime.value = res.data.taskTime ? res.data.taskTime.split(' - ') : [];
checkoutUserlist.value = Array.isArray(res.data.inspectorInfo) ? res.data.inspectorInfo : [res.data.inspectorInfo];
handlChangeMap(res.data.planId);
});
@@ -258,6 +267,11 @@ onMounted(async () => {
});
const formRef = ref();
function submit() {
if (taskTime.value.length > 0) {
form.value.taskTime = taskTime.value.join(' - ');
} else {
form.value.taskTime = '';
}
form.value.inspectorId = checkoutUserlist.value.map((item) => item.userId).join(',');
formRef.value?.validate(async (valid: boolean) => {
if (valid) {

View File

@@ -78,7 +78,7 @@
<dict-tag :options="com_inspection_remind_tiime" :value="scope.row.remindTime"></dict-tag>
</template>
</el-table-column>
<el-table-column label="关联巡检计划" align="center" prop="planId" />
<el-table-column label="关联巡检计划" align="center" prop="planName" />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:task:edit']">编辑</el-button>
@@ -143,10 +143,14 @@ const { queryParams, form, rules } = toRefs(data);
/** 查询巡检任务列表 */
const getList = async () => {
loading.value = true;
const res = await listTask(queryParams.value);
taskList.value = res.rows;
total.value = res.total;
loading.value = false;
listTask(queryParams.value)
.then((res) => {
taskList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 取消按钮 */

View File

@@ -77,10 +77,14 @@ const { queryParams } = toRefs(data);
const getList = async () => {
queryParams.value.statDate = starDate.value.join('-');
loading.value = true;
const res = await listItem(queryParams.value);
itemList.value = res.rows;
total.value = res.total;
loading.value = false;
listItem(queryParams.value)
.then((res) => {
itemList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 搜索按钮操作 */

View File

@@ -36,7 +36,6 @@
<right-toolbar v-model:show-search="showSearch" @query-table="getList"></right-toolbar>
</el-row>
</template>
<el-table
ref="menuTableRef"
v-loading="loading"
@@ -284,7 +283,7 @@
:check-strictly="false"
empty-text="加载中请稍候"
:default-expanded-keys="[0]"
:props="{ value: 'menuId', label: 'menuName', children: 'children' } as any"
:props="{ value: 'menuId', label: 'menuName', children: 'children' }"
/>
<template #footer>
<div class="dialog-footer">

View File

@@ -1,5 +1,5 @@
<template>
<div class="p-2">
<div class="p-2 flex flex-col h-full">
<pageheader></pageheader>
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
@@ -8,9 +8,9 @@
<el-form-item label="公告标题" prop="noticeTitle">
<el-input v-model="queryParams.noticeTitle" placeholder="请输入公告标题" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="操作人员" prop="createByName">
<!-- <el-form-item label="操作人员" prop="createByName">
<el-input v-model="queryParams.createByName" placeholder="请输入操作人员" clearable @keyup.enter="handleQuery" />
</el-form-item>
</el-form-item> -->
<el-form-item label="类型" prop="noticeType">
<el-select v-model="queryParams.noticeType" placeholder="公告类型" clearable>
<el-option v-for="dict in sys_notice_type" :key="dict.value" :label="dict.label" :value="dict.value" />
@@ -25,30 +25,37 @@
</div>
</transition>
<el-card shadow="hover">
<el-card shadow="hover" class="flex-1">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button v-hasPermi="['system:notice:add']" type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['system:notice:edit']" type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()"
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['system:notice:remove']" type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()">
删除
</el-button>
</el-col>
<right-toolbar v-model:show-search="showSearch" @query-table="getList"></right-toolbar>
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['system:notice:add'])"
:show-edit="checkPermi(['system:notice:edit'])"
:show-delete="checkPermi(['system:notice:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
<el-table v-loading="loading" border :data="noticeList" @selection-change="handleSelectionChange">
<el-table
:default-sort="{ prop: 'createTime', order: 'descending' }"
v-loading="loading"
border
:data="noticeList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column v-if="false" label="序号" align="center" prop="noticeId" width="100" />
<el-table-column label="公告标题" align="center" prop="noticeTitle" :show-overflow-tooltip="true" />
<el-table-column label="公告标题" align="center" prop="noticeTitle" width="300" :show-overflow-tooltip="true" />
<el-table-column label="内容" align="center" prop="noticeContent">
<template #default="scope">
<div v-html="scope.row.noticeContent"></div>
</template>
</el-table-column>
<el-table-column label="公告类型" align="center" prop="noticeType" width="100">
<template #default="scope">
<dict-tag :options="sys_notice_type" :value="scope.row.noticeType" />
@@ -59,20 +66,16 @@
<dict-tag :options="sys_notice_status" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="创建者" align="center" prop="createByName" width="100" />
<el-table-column label="创建时间" align="center" prop="createTime" width="100">
<!-- <el-table-column label="创建者" align="center" prop="createByName" width="100" /> -->
<el-table-column label="创建时间" sortable align="center" prop="createTime" width="180">
<template #default="scope">
<span>{{ proxy.parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="操作" width="400" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button v-hasPermi="['system:notice:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button v-hasPermi="['system:notice:remove']" link type="primary" icon="Delete" @click="handleDelete(scope.row)"></el-button>
</el-tooltip>
<el-button v-hasPermi="['system:notice:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)">修改</el-button>
<el-button v-hasPermi="['system:notice:remove']" link type="primary" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -122,6 +125,7 @@
<script setup name="Notice" lang="ts">
import { listNotice, getNotice, delNotice, addNotice, updateNotice } from '@/api/system/notice';
import { NoticeForm, NoticeQuery, NoticeVO } from '@/api/system/notice/types';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { sys_notice_status, sys_notice_type } = toRefs<any>(proxy?.useDict('sys_notice_status', 'sys_notice_type'));
@@ -172,10 +176,14 @@ const { queryParams, form, rules } = toRefs(data);
/** 查询公告列表 */
const getList = async () => {
loading.value = true;
const res = await listNotice(queryParams.value);
noticeList.value = res.rows;
total.value = res.total;
loading.value = false;
listNotice(queryParams.value)
.then((res) => {
noticeList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 取消按钮 */
const cancel = () => {
@@ -242,3 +250,8 @@ onMounted(() => {
getList();
});
</script>
<style lang="scss" scoped>
.el-table {
height: calc(100% - 80px);
}
</style>

View File

@@ -1,5 +1,5 @@
<template>
<div class="p-2">
<div class="p-2 h-full flex flex-col">
<pageheader></pageheader>
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
@@ -38,7 +38,7 @@
</div>
</transition>
<el-card shadow="hover">
<el-card shadow="hover" class="flex-1">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
@@ -332,3 +332,9 @@ onMounted(() => {
getList();
});
</script>
<style lang="scss" scoped>
.el-table {
height: calc(100% - 80px);
}
</style>

View File

@@ -55,7 +55,19 @@
<el-col :span="24">
<el-form-item label="持有人" prop="residentId">
<!-- 公共组件 持有人 -->
<Holder :userid="form.residentId" @change="handleChange"></Holder>
<Holder :isMultiple="false" :userid="form.residentId" ref="HolderRef" @change="handleChange">
<template #default>
<div class="residentBox" @click="choiceResidentFun">
<div class="defaultbox" v-if="form.residentId === ''">
<span>请选择</span>
<el-icon><Search /></el-icon>
</div>
<div v-else class="overflow-auto overflow-hidden w-full text-ellipsis text-nowrap">
<span>姓名{{ form?.residentName }}</span>
</div>
</div>
</template>
</Holder>
</el-form-item>
</el-col>
</el-row>
@@ -98,6 +110,7 @@ const form = ref({
parkingFloor: null, // 车位楼层
type: '0', // 车位类型
residentId: '', // 住户id
residentName: '', // 住户名
parkingStatus: '', // 车位状态
remark: '', // 备注
parkingCode: '' // 车位编码
@@ -109,6 +122,7 @@ const rules = ref({
});
const userid = ref(null);
const HolderRef = ref<typeof Holder>(null);
if (route.query.id) {
userid.value = route.query.id;
@@ -131,8 +145,19 @@ const getAreaList = async () => {
getAreaList();
const holderInfo = ref(null);
function choiceResidentFun() {
HolderRef.value.open([...form.value.residentId]);
}
function handleChange(pop) {
holderInfo.value = null;
holderInfo.value = pop;
console.log(pop);
form.value.residentId = '';
form.value.residentName = '';
if (pop !== null) {
form.value.residentId = holderInfo.value.id;
form.value.residentName = holderInfo.value.name;
}
}
// !== 提交 =============================================================================
@@ -140,7 +165,7 @@ function handleChange(pop) {
const submitForm = () => {
formRef.value?.validate(async (valid: boolean) => {
if (valid) {
form.value.residentId = holderInfo.value;
form.value.residentId = holderInfo.value.id;
if (userid.value) {
updateParking(form.value).then((res) => {
ElMessage.success('编辑成功');
@@ -206,4 +231,21 @@ const cancelForm = () => {
}
}
}
.residentBox {
width: 385px;
height: 35px;
line-height: 35px;
border: 1px solid #ccc;
border-radius: 5px;
padding: 0 10px;
.defaultbox {
display: flex;
align-items: center;
justify-content: space-between;
}
cursor: pointer;
&:hover {
background-color: #f4f8ff;
}
}
</style>

View File

@@ -75,6 +75,7 @@
</template>
</el-table-column>
<el-table-column label="持有人" align="center" prop="residentName" />
<!-- TODO 车位审核 -->
<el-table-column label="审核状态" align="center" prop="checkStatus">
<template #default="scope">
<dict-tag :options="com_review" :value="scope.row.checkStatus" />
@@ -158,10 +159,14 @@ const AreaList = ref([]);
/** 查询车位管理列表 */
const getList = async () => {
loading.value = true;
const res = await listParking(queryParams.value);
parkingList.value = res.rows;
total.value = res.total;
loading.value = false;
listParking(queryParams.value)
.then((res) => {
parkingList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
function getAreaInfoById(id: string) {
@@ -197,7 +202,7 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: ParkingVO) => {
const _id = row.id || ids.value[0];
const _id = row ? row.id : ids.value[0];
router.push({
path: '/carArea/editParking',
query: {
@@ -217,7 +222,7 @@ const handleMain = async (row?: ParkingVO) => {
/** 删除按钮操作 */
const handleDelete = async (row?: ParkingVO) => {
const _ids = row?.id || ids.value;
const _ids = row ? row.id : ids.value;
await proxy?.$modal.confirm('该信息删除后无法恢复,确定要删除吗?').finally(() => (loading.value = false));
await delParking(_ids);
proxy?.$modal.msgSuccess('删除成功');

View File

@@ -260,10 +260,14 @@ const handleNodeClick = (data: DeptVO) => {
/** 查询岗位列表 */
const getList = async () => {
loading.value = true;
const res = await listPost(queryParams.value);
postList.value = res.rows;
total.value = res.total;
loading.value = false;
listPost(queryParams.value)
.then((res) => {
postList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
/** 取消按钮 */

View File

@@ -30,14 +30,14 @@
<div class="title_item">住户类型</div>
<DictTag :options="com_resident_relationship" :value="userInfo.type"></DictTag>
</div>
<div class="userinfo_item">
<!-- <div class="userinfo_item">
<div class="title_item">住户来源</div>
<span> {{ userInfo.name }} </span>
</div>
<div class="userinfo_item">
</div> -->
<!-- <div class="userinfo_item">
<div class="title_item">注册时间</div>
<span> {{ userInfo.name }} </span>
</div>
</div> -->
<div class="userinfo_item img">
<div class="title_item">身份证正面</div>
<div class="userinfo_itme_img">
@@ -58,21 +58,19 @@
<div class="title_item">证件号码</div>
<span> {{ userInfo.idCard }} </span>
</div>
<div class="userinfo_item">
<div class="title_item">备注</div>
<span> {{ userInfo.remark ?? '无' }} </span>
</div>
<div class="userinfo_item">
<div class="title_item">提交审核时间</div>
<span> 去丽丽 </span>
</div>
<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="userInfo.cardImageBack"></el-image>
</div>
</div>
</el-col>
<el-col :span="24">
<div class="userinfo_item">
<div class="title_item">备注</div>
<span> {{ userInfo.remark ?? '无' }} </span>
</div>
</el-col>
</el-row>
</div>
</el-card>
@@ -144,6 +142,7 @@ 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';
import { el } from 'element-plus/es/locale/index.mjs';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_review } = toRefs<any>(proxy?.useDict('com_review'));

View File

@@ -37,8 +37,8 @@
<el-row>
<el-col :span="11">
<el-form-item label="与业主的关系" prop="type">
<el-select v-model.number="form.type" class="m-2" placeholder="请选择">
<el-form-item label="与业主的关系" prop="ownerRelationship">
<el-select v-model="form.ownerRelationship" class="m-2" placeholder="请选择">
<el-option v-for="item in com_resident_relationship" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
@@ -127,7 +127,7 @@ const form = ref<ResidentForm>({
name: '',
gender: '0',
idCard: '',
type: '0', // 与业主关系 0业主
ownerRelationship: '0', // 与业主关系
phone: null, //手机号
cardImageFront: '',
cardImageBack: '',
@@ -148,7 +148,7 @@ const rules = ref({
trigger: 'blur'
}
],
type: [{ required: true, message: '请选择与业主关系', trigger: 'blur' }],
ownerRelationship: [{ required: true, message: '请选择与业主关系', trigger: 'blur' }],
phone: [
{ required: true, message: '请输入手机号', trigger: 'blur' },
{
@@ -199,6 +199,10 @@ const handleAvatarSuccess: UploadProps['onSuccess'] = (response, uploadFile) =>
}
};
const handleAvatar2Success: UploadProps['onSuccess'] = (response, uploadFile) => {
if (response.code === 500 && response.msg == '不允许重复提交,请稍候再试') {
ElMessage.error('上传频率过快,稍后再试');
return;
}
if (response.data && response.data.url) {
form.value.cardImageBack = response.data.url;
}

View File

@@ -4,9 +4,9 @@
<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" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="住户类型" prop="type">
<el-select v-model="queryParams.type" placeholder="请输入住户类型" style="width: 240px">
<el-form ref="queryFormRef" label-width="120" label-position="left" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="与主业主关系" prop="ownerRelationship">
<el-select v-model="queryParams.ownerRelationship" placeholder="请选择与主业主关系" style="width: 240px">
<el-option v-for="item in com_resident_relationship" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
@@ -62,12 +62,18 @@
<el-table class="tablebox" v-loading="loading" border :data="residentList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="姓名" min-width="120" align="center" prop="name" />
<el-table-column label="类型" min-width="120" align="center" prop="type">
<el-table-column label="类型" width="100" align="center" prop="type">
<template #default="scope">
<DictTag :value="scope.row.type" :options="com_resident_relationship"></DictTag>
<el-tag v-if="scope.row.type === '0'" type="success">业主</el-tag>
<el-tag v-else type="danger">租户</el-tag>
</template>
</el-table-column>
<el-table-column label="状态" min-width="120" align="center" prop="status">
<el-table-column label="与主业主关系" min-width="120" align="center" prop="ownerRelationship">
<template #default="scope">
<DictTag :value="scope.row.ownerRelationship" :options="com_resident_relationship"></DictTag>
</template>
</el-table-column>
<el-table-column label="状态" width="120" align="center" prop="status">
<template #default="scope">
<DictTag :value="scope.row.status" :options="com_review"></DictTag>
</template>
@@ -154,7 +160,7 @@ const queryFormRef = ref<ElFormInstance>();
const initFormData: ResidentForm = {
code: undefined,
name: undefined,
type: undefined,
ownerRelationship: undefined,
gender: undefined,
idCard: undefined,
phone: undefined,
@@ -173,12 +179,12 @@ const data = reactive<PageData<ResidentForm, ResidentQuery>>({
pageNum: 1,
pageSize: 10,
date: '',
type: null,
ownerRelationship: null,
status: null,
houseId: null,
buildingId: null,
unitNo: null
unitNoId: null
}
});
const disabledDate = (time: Date) => {
@@ -242,18 +248,20 @@ interface Tree {
}
// 四个参数对应于节点点击的节点对象TreeNode 的 node 属性, TreeNode和事件对象
const handleNodeClick = (data: Tree, node) => {
console.log(data);
const obj2 = {
[data.type]: data.value
};
if (data.type === 'unitNo') {
if (data.type === 'unitNoId') {
obj2[node.parent.data.type] = node.parent.data.value;
}
console.log(obj2);
queryParams.value = {
...queryParams.value,
...{
houseId: null,
buildingId: null,
unitNo: null
unitNoId: null
},
...obj2
};
@@ -299,7 +307,7 @@ const handleQuery = () => {
...{
houseId: null,
buildingId: null,
unitNo: null
unitNoId: null
}
};
getList();
@@ -313,7 +321,7 @@ const resetQuery = () => {
...{
houseId: null,
buildingId: null,
unitNo: null
unitNoId: null
}
};
handleQuery();

View File

@@ -121,11 +121,35 @@ const getMenuTreeselect = async () => {
/** 根据角色ID查询菜单树结构 */
const getRoleMenuTreeselect = (roleId: string | number) => {
return roleMenuTreeselect(roleId).then((res): RoleMenuTree => {
console.log(res.data);
menuOptions.value = res.data.menus;
// const arr = handleHiddeMenu(res.data.menus);
// menuOptions.value = arr;
return res.data;
});
};
function handleHiddeMenu(menu: MenuTreeOption[]) {
const arr = [];
menu.forEach((item) => {
let obj = null;
if (item.id !== '2051835471292702721') {
obj = {
...item,
children: []
};
if (item.children && item.children.length > 0) {
obj.children = handleHiddeMenu(item.children);
}
} else {
obj = null;
console.log('找到了', item);
}
if (obj) arr.push(obj);
});
return arr;
}
/** 树权限(展开/折叠)*/
const handleCheckedTreeExpand = (value: CheckboxValueType, type: string) => {
if (type == 'menu') {

View File

@@ -12,77 +12,96 @@
<el-button type="primary">查询</el-button>
<el-button>重置</el-button>
</div>
<div style="margin-bottom: 15px; position: relative; z-index: 2">
<el-row :gutter="20">
<el-col :lg="14" :xl="14">
<div class="cardbox">
<div>收入来源</div>
<div class="cardbody" style="height: 200px">
<div class="flex flex-col flex-items-center flex-1">
<Echarts :options="options"></Echarts>
<div>停车费</div>
</div>
<div class="flex flex-col flex-items-center flex-1">
<Echarts :options="options"></Echarts>
<div>物业费</div>
</div>
<div class="flex flex-col flex-items-center flex-1">
<Echarts :options="options"></Echarts>
<div>商铺租金</div>
</div>
<div class="flex flex-col flex-items-center flex-1">
<Echarts :options="options"></Echarts>
<div>水电费</div>
</div>
<div class="flex flex-col flex-items-center flex-1">
<Echarts :options="options"></Echarts>
<div>维修费</div>
</div>
</div>
</div>
</el-col>
<el-row :gutter="20">
<el-col :lg="14" :xl="14">
<div class="cardbox">
<div>收入来源</div>
<div class="cardbody" style="height: 200px">
<div class="flex flex-col flex-items-center flex-1">
<Echarts :options="options"></Echarts>
<div>停车费</div>
</div>
<div class="flex flex-col flex-items-center flex-1">
<Echarts :options="options"></Echarts>
<div>物业费</div>
</div>
<div class="flex flex-col flex-items-center flex-1">
<Echarts :options="options"></Echarts>
<div>商铺租金</div>
</div>
<div class="flex flex-col flex-items-center flex-1">
<Echarts :options="options"></Echarts>
<div>水电费</div>
</div>
<div class="flex flex-col flex-items-center flex-1">
<Echarts :options="options"></Echarts>
<div>维修费</div>
<el-col :lg="10" :xl="10">
<div class="cardbox">
<div>欠费分布</div>
<div class="cardbody w-full" style="height: 150px">
<Echarts :options="options2"></Echarts>
</div>
</div>
</div>
</el-col>
<el-col :lg="10" :xl="8">
<div class="cardbox">
<div>缴费方式</div>
<div class="cardbody w-full" style="height: 150px">
<Echarts :options="options2"></Echarts>
</el-col>
</el-row>
</div>
<div style="margin-bottom: 15px; position: relative; z-index: 2">
<el-row :gutter="20">
<el-col :lg="12" :xl="14">
<!-- <div class="cardbox w-full" style="height: 400px">
<Echarts :options="options3"></Echarts>
</div> -->
<div class="cardbox w-full">
<div>缴费走势分析</div>
<div class="cardbody w-full" style="height: 330px">
<Echarts :options="options3"></Echarts>
</div>
</div>
</div>
</el-col>
</el-row>
<div class="" style="height: 20px"></div>
<el-row :gutter="20">
<el-col :lg="14" :xl="14">
<div class="cardbox w-full" style="height: 400px">
<Echarts :options="options3"></Echarts>
</div>
</el-col>
<el-col :lg="10" :xl="8">
<div class="cardbox w-full" style="height: 400px">
<div class="" style="height: 50px; margin-bottom: 20px">缴费方式</div>
<div flex flex-items-center justify-center>
<ul class="legendbox">
<li>小程序</li>
<li>物业缴费</li>
<li>手机APP</li>
</ul>
<ul class="circlebox">
<li>70%</li>
<li>20%</li>
<li>10%</li>
</ul>
</el-col>
<el-col :lg="12" :xl="10">
<div class="cardbox w-full" style="height: 400px">
<div style="height: 50px; margin-bottom: 20px">缴费来源</div>
<div flex flex-items-center justify-center>
<ul class="legendbox">
<li>小程序</li>
<li>物业缴费</li>
<li>手机APP</li>
</ul>
<ul class="circlebox">
<li>70%</li>
<li>20%</li>
<li>10%</li>
</ul>
</div>
</div>
</div>
</el-col>
</el-row>
<div class="" style="height: 20px"></div>
<el-row>
<el-col :span="24">
<div class="cardbox w-full" style="height: 450px">
<Echarts :options="flowLineOption"></Echarts>
</div>
</el-col>
</el-row>
</el-col>
</el-row>
</div>
<div style="position: relative; z-index: 2">
<el-row>
<el-col :span="24">
<!-- <div class="cardbox w-full" style="height: 450px">
<Echarts :options="flowLineOption"></Echarts>
</div> -->
<div class="cardbox w-full">
<div>缴费走势分析</div>
<div class="cardbody w-full" style="height: 400px">
<Echarts :options="flowLineOption"></Echarts>
</div>
</div>
</el-col>
</el-row>
</div>
<Teleport to="body">
<i v-if="open" class="bgColor"></i>
</Teleport>
</div>
</template>
@@ -92,6 +111,23 @@ import { ref } from 'vue';
import Echarts from '@/components/Echarts/index.vue';
import { EChartsOption } from 'echarts';
import { getLast7Days, getLastNDays } from '@/utils/time';
import { income_statsApi } from '@/api/system/Payment/index';
const open = ref(false);
const dataTime = ref('');
function getlist() {
income_statsApi(dataTime.value).then((res) => {
console.log(res);
});
}
onMounted(() => {
open.value = true;
getlist();
});
onUnmounted(() => {
open.value = false;
});
const date = ref('');
@@ -227,12 +263,12 @@ const bgData = agesData.map((item) => maxValue - item - middleHeight);
const bgData2 = agesData.map((item) => middleHeight);
/** 年龄分布 */
const options3 = shallowRef<EChartsOption>({
title: {
text: '年龄分布',
left: 0,
top: 0,
textStyle: { fontSize: 14, fontWeight: 'normal' }
},
// title: {
// text: '欠费分布',
// left: 0,
// top: 0,
// textStyle: { fontSize: 14, fontWeight: 'normal' }
// },
xAxis: {},
grid: {
left: '3%',
@@ -284,12 +320,12 @@ const outData = [121, 85, 142, 71, 135, 93, 116, 66, 148, 104];
/** 进十日缴费数量情况 - 平滑折线图 */
const flowLineOption = shallowRef<EChartsOption>({
title: {
text: '进十日缴费数量趋势',
left: 0,
top: 0,
textStyle: { fontSize: 14, fontWeight: 'normal' }
},
// title: {
// text: '缴费走势分析',
// left: 0,
// top: 0,
// textStyle: { fontSize: 14, fontWeight: 'normal' }
// },
tooltip: {
trigger: 'axis',
confine: true
@@ -374,6 +410,7 @@ const flowLineOption = shallowRef<EChartsOption>({
<style scoped lang="scss">
.personnel {
background: linear-gradient(180deg, #deedff 0%, #f8f9fe 50%);
overflow: auto;
.el-button {
width: 80px;
height: 32px;
@@ -386,7 +423,7 @@ const flowLineOption = shallowRef<EChartsOption>({
width: 100px;
font-size: 0.95rem;
}
// 入住清空
/* 入住清空 */
.cardbox {
background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, #ffffff 70%);
border-radius: 16px 16px 16px 16px;
@@ -394,6 +431,16 @@ const flowLineOption = shallowRef<EChartsOption>({
font-size: 20px;
padding: 20px;
min-height: 275px;
@media (max-width: 1600px) {
font-size: 18px;
}
@media (max-width: 1300px) {
font-size: 20px;
}
@media (max-width: 1200px) {
margin-bottom: 20px;
}
.cardbody {
padding: 0 30px;
display: flex;
@@ -417,7 +464,7 @@ const flowLineOption = shallowRef<EChartsOption>({
}
.legendbox {
font-size: 0.8rem;
font-size: 15px;
li {
margin-bottom: 20px;
position: relative;

View File

@@ -12,13 +12,14 @@
<el-button type="primary">查询</el-button>
<el-button>重置</el-button>
</div>
<el-row :gutter="20">
<el-col :lg="7" :xl="8">
<el-row :gutter="20" style="position: relative; z-index: 2">
<el-col :lg="8" :xl="8">
<div class="cardbox">
<div>入住情况</div>
<div class="cardbody" style="height: 200px">
<div class="card_leftbox">
<div class="valuebox">4889</div>
<div class="valuebox">{{ movein.totalResident }}</div>
<div class="labelbox">入住人数</div>
</div>
<div class="echartsbox h-full">
@@ -27,15 +28,15 @@
</div>
</div>
</el-col>
<el-col :lg="9" :xl="8">
<el-col :lg="10" :xl="8">
<div class="cardbox">
<div>住户分析情况</div>
<div>住户类型情况</div>
<div class="cardbody w-full" style="height: 150px">
<Echarts :options="options1"></Echarts>
</div>
</div>
</el-col>
<el-col :lg="8" :xl="8">
<el-col :lg="6" :xl="8">
<div class="cardbox">
<div>男女比例</div>
<div class="cardbody w-full" style="height: 150px">
@@ -45,7 +46,7 @@
</el-col>
</el-row>
<el-row style="margin-top: 20px" :gutter="20">
<el-row style="margin-top: 20px; position: relative; z-index: 2" :gutter="20">
<el-col :lg="16" :xl="16">
<div class="cardbox w-full" style="height: 400px">
<Echarts :options="options3"></Echarts>
@@ -57,27 +58,40 @@
</div>
</el-col>
</el-row>
<el-row style="margin-top: 20px">
<el-row style="margin-top: 20px; position: relative; z-index: 2">
<el-col :span="24">
<div class="cardbox w-full" style="height: 450px">
<Echarts :options="flowLineOption"></Echarts>
</div>
</el-col>
</el-row>
<Teleport to="body">
<i v-if="open" class="bgColor"></i>
</Teleport>
</div>
</template>
<script setup lang="ts">
// TODO 人员分析
import { ref } from 'vue';
import Echarts from '@/components/Echarts/index.vue';
import { EChartsOption } from 'echarts';
import { getLast7Days, getLastNDays } from '@/utils/time';
import { get_movein_moveout_list, get_movein_user_sex, get_movein_user_type, user_movein_list } from '@/api/system/Personnel';
const date = ref('');
const open = ref(true);
onMounted(() => {
open.value = true;
});
onUnmounted(() => {
open.value = false;
});
/** 入住情况 */
const options = shallowRef<EChartsOption>({
const options = ref<EChartsOption>({
tooltip: { show: false },
series: [
// 1. 底层细圆环(灰色底色)
@@ -97,52 +111,22 @@ const options = shallowRef<EChartsOption>({
clockwise: true,
itemStyle: {
color: '#409eff',
borderRadius: 10
borderRadius: 2
},
emphasis: { disabled: true },
label: {
show: true,
position: 'center',
fontSize: 18,
fontWeight: 'bold',
formatter: ' 85% \n 入住率'
fontWeight: 'bold'
},
data: [{ value: 85 }, { value: 15, itemStyle: { color: 'transparent' } }]
}
]
});
function getRingOption(percent) {
return {
tooltip: { show: false },
series: [
{
type: 'pie',
radius: ['78%', '88%'],
data: [100],
itemStyle: { color: '#ebeef5' },
emphasis: { disabled: true },
label: { show: false }
},
{
type: 'pie',
radius: ['75%', '90%'],
itemStyle: { color: '#409eff', borderRadius: 10 },
emphasis: { disabled: true },
label: {
show: true,
position: 'center',
fontSize: 18,
fontWeight: 'bold',
formatter: percent + '%'
},
data: [{ value: percent }, { value: 100 - percent, itemStyle: { color: 'transparent' } }]
}
]
};
}
/** 入住类型 */
const options1 = shallowRef<EChartsOption>({
const options1 = ref<EChartsOption>({
legend: {
top: 'center',
left: '0',
@@ -184,7 +168,7 @@ const options1 = shallowRef<EChartsOption>({
});
/** 男女比例 */
const options2 = shallowRef<EChartsOption>({
const options2 = ref<EChartsOption>({
legend: {
top: 'center',
left: '0',
@@ -335,15 +319,15 @@ const options4 = shallowRef<EChartsOption>({
// ! 人员流动情况 -------------------------------------------------------------------------------------
// 近10天日期
const dayX = getLast7Days(10);
const dayX = ref([]);
// 小区真实规模:人员流入 / 流出 数据
// 【全新打乱随机数据】小区人员流入 / 流出
const inData = [132, 76, 158, 91, 125, 68, 143, 84, 107, 162];
const outData = [95, 136, 72, 118, 83, 149, 65, 124, 101, 77];
const inData = ref([]);
const outData = ref([]);
/** 近十天人员流入流出 - 平滑折线图 */
const flowLineOption = shallowRef<EChartsOption>({
const flowLineOption = ref<EChartsOption>({
title: {
text: '近十日人员流动趋势',
left: 0,
@@ -368,7 +352,7 @@ const flowLineOption = shallowRef<EChartsOption>({
},
xAxis: {
type: 'category',
data: dayX,
data: dayX.value,
boundaryGap: false,
axisLine: { lineStyle: { color: '#eee' } }
},
@@ -384,7 +368,7 @@ const flowLineOption = shallowRef<EChartsOption>({
name: '人员流入',
type: 'line',
smooth: true, // 平滑折线 核心
data: inData,
data: inData.value,
symbol: 'circle',
symbolSize: 6,
itemStyle: { color: '#f94144' },
@@ -407,7 +391,7 @@ const flowLineOption = shallowRef<EChartsOption>({
name: '人员流出',
type: 'line',
smooth: true, // 平滑折线 核心
data: outData,
data: outData.value,
symbol: 'circle',
symbolSize: 6,
itemStyle: { color: '#f9c74f' },
@@ -428,11 +412,156 @@ const flowLineOption = shallowRef<EChartsOption>({
}
]
});
function flowLineOptionFun(days: string[], indata: number[], outdata: number[]): EChartsOption {
return {
title: {
text: '近十日人员流动趋势',
left: 0,
top: 0,
textStyle: { fontSize: 14, fontWeight: 'normal' }
},
tooltip: {
trigger: 'axis',
confine: true
},
grid: {
left: '3%',
right: '4%',
top: '12%',
bottom: '8%',
containLabel: true
},
legend: {
data: ['人员流入', '人员流出'],
right: 10,
top: 0
},
xAxis: {
type: 'category',
data: days,
boundaryGap: false,
axisLine: { lineStyle: { color: '#eee' } }
},
yAxis: {
type: 'value',
splitLine: {
show: true,
lineStyle: { color: '#eee' }
}
},
series: [
{
name: '人员流入',
type: 'line',
smooth: true, // 平滑折线 核心
data: indata,
symbol: 'circle',
symbolSize: 6,
itemStyle: { color: '#f94144' },
lineStyle: { width: 4 },
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{ offset: 0, color: '#fbd7d9' },
{ offset: 1, color: '#fbd7d9' }
]
}
}
},
{
name: '人员流出',
type: 'line',
smooth: true, // 平滑折线 核心
data: outdata,
symbol: 'circle',
symbolSize: 6,
itemStyle: { color: '#f9c74f' },
lineStyle: { width: 4 },
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{ offset: 0, color: '#fcf2dc' },
{ offset: 1, color: '#fcf2dc' }
]
}
}
}
]
};
}
// ! 人员流动情况 -------------------------------------------------------------------------------------
function init() {
// 获取入住情况
moveinFun();
// 入住类型
moveinUserType();
moveinUserSex();
moveinUserMoveinOut();
}
init();
const movein = ref({
totalResident: 0,
totalHouse: 0
});
function moveinFun() {
user_movein_list({
datetime: date.value
}).then((res) => {
// 获取入住情况
movein.value.totalResident = res.totalResident;
movein.value.totalHouse = res.totalHouse;
const total = 1000;
options.value.series[1].data = [{ value: res.totalResident }, { value: total - res.totalResident, itemStyle: { color: 'transparent' } }];
});
}
// 获取住户类型
function moveinUserType() {
get_movein_user_type({
datetime: date.value
}).then((res) => {
console.log(res);
});
}
// 住户性别
function moveinUserSex() {
get_movein_user_sex({
datetime: date.value
}).then((res) => {
options2.value.series[0].data = [
{ value: res.man, name: '男', itemStyle: { color: '#0a74fe' } },
{ value: res.woman, name: '女', itemStyle: { color: '#f74043' } }
];
});
}
// 迁入迁出
function moveinUserMoveinOut() {
get_movein_moveout_list({
datetime: date.value
}).then((res) => {
dayX.value = res.map((item) => item.date);
inData.value = res.map((item) => item.inCount);
outData.value = res.map((item) => item.outCount);
console.log(dayX.value, inData.value, outData.value);
flowLineOption.value = flowLineOptionFun(dayX.value, inData.value, outData.value);
});
}
</script>
<style scoped lang="scss">
.personnel {
position: relative;
background: linear-gradient(180deg, #deedff 0%, #f8f9fe 50%);
.el-button {
width: 80px;
@@ -454,6 +583,9 @@ const flowLineOption = shallowRef<EChartsOption>({
font-size: 20px;
padding: 20px;
min-height: 275px;
@media (max-width: 1200px) {
margin-bottom: 20px;
}
.cardbody {
padding: 0 30px;
display: flex;
@@ -469,6 +601,7 @@ const flowLineOption = shallowRef<EChartsOption>({
font-weight: 600;
font-size: 36px;
color: #222222;
width: 100px;
}
}
.echartsbox {

View File

@@ -16,8 +16,8 @@
<el-col :span="2"></el-col>
<el-col :span="11">
<el-form-item label="单元" prop="unit">
<el-select v-model="form.unitNo" placeholder="请选择单元">
<el-option v-for="item in units" :key="item.no" :label="item.name" :value="item.no" />
<el-select v-model="form.unitNoId" placeholder="请选择单元">
<el-option v-for="item in units" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
@@ -25,7 +25,7 @@
<el-row>
<el-col :span="11">
<el-form-item label="储藏室号" prop="storeroomNo">
<el-input v-model.number="form.storeroomNo" placeholder="请输入储藏室号" />
<el-input v-model="form.storeroomNo" placeholder="请输入储藏室号" />
</el-form-item>
</el-col>
<el-col :span="2"></el-col>
@@ -68,6 +68,7 @@ import PageHeader from '@/components/Pageheader/index.vue';
import { getBuildinglistAPI, getBuildinglists, getBuildingOnly, getHouselistAPI } from '@/api/system/house';
import { addStoreroom, getStoreroom, updateStoreroom } from '@/api/system/storeroom';
import { StoreroomVO } from '@/api/system/storeroom/types';
import { getByBUildingidtoUnitNo } from '@/api/system/houseUnit';
const route = useRoute();
const router = useRouter();
@@ -75,7 +76,8 @@ const formRef = ref();
const form = ref<StoreroomVO>({
id: null,
buildingId: '',
unitNo: '',
unitNoId: '',
unitName: '',
storeroomNo: '',
houseArea: null,
shareArea: null,
@@ -86,7 +88,7 @@ const form = ref<StoreroomVO>({
});
const rules = ref({
buildingId: [{ required: true, message: '请选择楼栋', trigger: 'blur' }],
unitNo: [{ required: true, message: '请选择单元', trigger: 'blur' }],
unitNoId: [{ required: true, message: '请选择单元', trigger: 'blur' }],
storeroomNo: [{ required: true, message: '请输入储藏室号', trigger: 'blur' }]
});
@@ -103,9 +105,10 @@ function getStoreRoominfo(id: string) {
};
if (form.value.buildingId) {
handleChangeBuild(form.value.buildingId, () => {
form.value.unitNo = res.data.unitNo;
form.value.unitNoId = res.data.unitNoId;
});
}
console.log(form.value);
});
}
// 根据小区id获取楼栋单元
@@ -123,13 +126,8 @@ onMounted(() => {
});
// 根据楼栋id获取单元
function handleChangeBuild(val: string, callback?: () => void) {
getBuildingOnly(val).then((res) => {
units.value = Array.from({ length: res.data.unitCount }).map((_, index) => {
return {
no: index + 1,
name: index + 1 + '单元'
};
});
getByBUildingidtoUnitNo(val).then((res) => {
units.value = res.data;
callback && callback();
});
}

View File

@@ -48,14 +48,14 @@
<el-table class="tablebody" v-loading="loading" border :data="storeroomList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="楼栋名" align="center" prop="buildingName" />
<el-table-column label="单元号" align="center" prop="unitNo" />
<el-table-column label="储藏室号" align="center" prop="storeroomNo" />
<el-table-column label="建筑面积(㎡)" align="center" prop="houseArea" />
<el-table-column label="公摊面积(㎡)" align="center" prop="shareArea" />
<el-table-column label="实用面积(㎡)" align="center" prop="internalArea" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<el-table-column label="楼栋名" width="150" align="center" prop="buildingName" />
<el-table-column label="单元号" width="150" align="center" prop="unitName" />
<el-table-column label="储藏室号" width="150" align="center" prop="storeroomNo" />
<el-table-column label="建筑面积(㎡)" width="120" align="center" prop="houseArea" />
<el-table-column label="公摊面积(㎡)" width="120" align="center" prop="shareArea" />
<el-table-column label="实用面积(㎡)" width="120" align="center" prop="internalArea" />
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
<el-table-column label="操作" width="150" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['storeroom:storeroom:edit']">修改</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['storeroom:storeroom:remove']">删除</el-button>

View File

View File

@@ -5,11 +5,11 @@
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="选择品牌" prop="brand">
<el-input v-model="queryParams.brand" placeholder="请输入物料名称" clearable @keyup.enter="handleQuery" />
<el-form-item label="品牌名称" prop="brand">
<el-input v-model="queryParams.brand" placeholder="请输入品牌" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="选择型号" prop="model">
<el-input v-model="queryParams.model" placeholder="请输入物料名称" clearable @keyup.enter="handleQuery" />
<el-form-item label="型号名称" prop="model">
<el-input v-model="queryParams.model" placeholder="请输入型号" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="queryParams.materialName" placeholder="请输入物料名称" clearable @keyup.enter="handleQuery" />

View File

@@ -1,485 +1,9 @@
<template>
<div class="home">
<div class="navbar flex flex-items-center">
<svg-icon icon-class="viliageIcon" />
<span class="ml-2">{{ villageinfo.villageName }}</span>
</div>
<el-row class="mt-20px">
<el-col :span="24">
<div class="viliageBox">
<div class="title">小区概况</div>
<div class="viliageInfo">
<div class="vilage_item">
<div class="info">
<div class="info_title">住户总数量</div>
<div class="info_value">10000</div>
</div>
<div class="icon">
<svg-icon icon-class="viliageIcon" />
</div>
</div>
<div class="vilage_item">
<div class="info">
<div class="info_title">住户总数量</div>
<div class="info_value">10000</div>
</div>
<div class="icon">123</div>
</div>
<div class="vilage_item">
<div class="info">
<div class="info_title">住户总数量</div>
<div class="info_value">10000</div>
</div>
<div class="icon">123</div>
</div>
<div class="vilage_item">
<div class="info">
<div class="info_title">住户总数量</div>
<div class="info_value">10000</div>
</div>
<div class="icon">123</div>
</div>
<div class="vilage_item">
<div class="info">
<div class="info_title">住户总数量</div>
<div class="info_value">10000</div>
</div>
<div class="icon">123</div>
</div>
<div class="vilage_item">
<div class="info">
<div class="info_title">住户总数量</div>
<div class="info_value">10000</div>
</div>
<div class="icon">123</div>
</div>
</div>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="mt-20px">
<el-col :span="9">
<el-card>
<div class="titlebox">
<div>近一周报修量趋势</div>
<div class="actionbox">
<span>全部报修</span>
<i class="arrow"></i>
</div>
</div>
<div class="echartbox">
<repairEcharts></repairEcharts>
</div>
</el-card>
</el-col>
<el-col :span="9">
<el-card>
<div class="titlebox">
<div>近一周收入支出趋势</div>
<div class="arrowto echartTypes">
<div class="echarsActions">
<div
v-for="(item, index) in echartType"
:key="index"
class="echarsAction"
:class="{
active: index === currentEchartType
}"
@click="echartTypeChange(index)"
>
{{ item }}
</div>
</div>
</div>
</div>
<div class="echartbox">
<repairEcharts></repairEcharts>
</div>
</el-card>
</el-col>
<el-col :span="6">
<el-card>
<div class="quickBox">
<div class="quickBox_title">快捷入口</div>
<div class="quickBox_body">
<div class="quick_item" v-for="(item, index) in quickBox" @click="handleRouter(item.url)" :key="index">
{{ item.name }}
</div>
<!-- <div class="quick_item quick_add">+ 添加</div> -->
</div>
</div>
</el-card>
<el-card class="mt-20px">
<div class="todoBox">
<div class="todoBox_title">
<div>创建办事记录</div>
<el-button size="small" type="primary">提交</el-button>
</div>
<div class="todoBox_body">
<el-form label-width="80px" label-position="top" size="small" v-model="Todo">
<el-form-item label="需求方姓名">
<el-input v-model="Todo.name" placeholder="请输入姓名"></el-input>
</el-form-item>
<el-form-item label="办事时间">
<el-date-picker
v-model="Todo.createtime"
type="datetime"
placeholder="yyyy-mm-dd --:--"
format="YYYY-MM-DD HH:mm"
date-format="YYYY MM DD"
time-format="HH:mm"
>
<template #prev-month>
<el-icon><CaretLeft /></el-icon>
</template>
<template #next-month>
<el-icon><CaretRight /></el-icon>
</template>
<template #prev-year>
<el-icon>
<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g stroke-width="1" fill-rule="evenodd">
<g fill="currentColor">
<path
d="M8.73171,16.7949 C9.03264,17.0795 9.50733,17.0663 9.79196,16.7654 C10.0766,16.4644 10.0634,15.9897 9.76243,15.7051 L4.52339,10.75 L17.2471,10.75 C17.6613,10.75 17.9971,10.4142 17.9971,10 C17.9971,9.58579 17.6613,9.25 17.2471,9.25 L4.52112,9.25 L9.76243,4.29275 C10.0634,4.00812 10.0766,3.53343 9.79196,3.2325 C9.50733,2.93156 9.03264,2.91834 8.73171,3.20297 L2.31449,9.27241 C2.14819,9.4297 2.04819,9.62981 2.01448,9.8386 C2.00308,9.89058 1.99707,9.94459 1.99707,10 C1.99707,10.0576 2.00356,10.1137 2.01585,10.1675 C2.05084,10.3733 2.15039,10.5702 2.31449,10.7254 L8.73171,16.7949 Z"
/>
</g>
</g>
</svg>
</el-icon>
</template>
<template #next-year>
<el-icon>
<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g stroke-width="1" fill-rule="evenodd">
<g fill="currentColor">
<path
d="M11.2654,3.20511 C10.9644,2.92049 10.4897,2.93371 10.2051,3.23464 C9.92049,3.53558 9.93371,4.01027 10.2346,4.29489 L15.4737,9.25 L2.75,9.25 C2.33579,9.25 2,9.58579 2,10.0000012 C2,10.4142 2.33579,10.75 2.75,10.75 L15.476,10.75 L10.2346,15.7073 C9.93371,15.9919 9.92049,16.4666 10.2051,16.7675 C10.4897,17.0684 10.9644,17.0817 11.2654,16.797 L17.6826,10.7276 C17.8489,10.5703 17.9489,10.3702 17.9826,10.1614 C17.994,10.1094 18,10.0554 18,10.0000012 C18,9.94241 17.9935,9.88633 17.9812,9.83246 C17.9462,9.62667 17.8467,9.42976 17.6826,9.27455 L11.2654,3.20511 Z"
/>
</g>
</g>
</svg>
</el-icon>
</template>
</el-date-picker>
</el-form-item>
<el-form-item label="办事内容">
<el-input v-model="Todo.todoContent" placeholder="请输入办事内容"></el-input>
</el-form-item>
<el-form-item label="附件">
<el-upload ref="uploadRef" class="upload-demo" action="" :auto-upload="false" style="width: 100% !important">
<template #trigger>
<div class="uploadFileBox" style="width: 100%">
<el-button type="default" style="width: 100%">
<template #icon>
<el-icon><Upload /></el-icon>
</template>
上传文件
</el-button>
</div>
</template>
</el-upload>
</el-form-item>
</el-form>
</div>
</div>
</el-card>
</el-col>
</el-row>
<el-card class="mt-20px">
<HouseUser></HouseUser>
</el-card>
<div class="p-2 h-full flex flex-col">
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">维护中敬请期待...</div>
</div>
</template>
<script setup name="Index" lang="ts">
import repairEcharts from './components/repairEcharts.vue';
import HouseUser from './components/HouseUser.vue';
import { getVillageByIdAPI } from '@/api/system/community';
import { useHouseStore } from '@/store/modules/house';
const houseStore = useHouseStore();
const villageinfo = ref({
'villageId': null,
'villageName': ''
});
// 获取小区
function getVillageinfo() {
const id = localStorage.getItem('villageid');
getVillageByIdAPI(id).then((res) => {
villageinfo.value = res.data;
houseStore.updateVilageinfo(res.data);
});
}
getVillageinfo();
// ! 快捷入口
const quickBox = ref([
{
name: '新建用户',
url: '/house/resident'
},
{
name: '车位管理',
url: '/carArea/parking'
},
{
name: '新建月卡',
url: '/carArea/monthCard'
},
{
name: '新建报修',
url: '/repair/repairlist'
},
{
name: '访客记录',
url: '/repair/visitorList'
},
{
name: '账单管理',
url: '/repair/visitorList'
}
]);
<script setup lang="ts"></script>
const router = useRouter();
function handleRouter(val: string) {
router.push({
path: val
});
}
// ! 快捷入口
// ! 代办事项
const Todo = ref({
name: '',
createtime: '',
todoContent: '',
file: null
});
// ! 代办事项
// ! 切换echarts
// 切换echarts
const echartType = ['全部', '收入', '支出'];
const currentEchartType = ref(0);
const echartTypeChange = (type: number) => {
currentEchartType.value = type;
};
// ! 切换echarts
</script>
<style lang="scss" scoped>
.home {
color: rgba(51, 51, 51, 1);
padding: 20px;
.navbar {
height: 40px;
line-height: 40px;
font-size: 20px;
}
.viliageBox {
padding: 20px;
border-radius: 10px;
box-shadow: 0px 2px 6px 0px rgba(26, 117, 255, 0.15);
height: 220px;
background-color: #fff;
.title {
margin-bottom: 30px;
color: rgba(51, 51, 51, 1);
font-size: 18px;
}
.viliageInfo {
display: grid;
grid-template-columns: repeat(6, 1fr);
grid-template-rows: 1fr;
gap: 40px;
.vilage_item {
display: flex;
align-items: center;
justify-content: space-between;
height: 120px;
border-radius: 10px;
box-shadow: 0px 2px 6px 0px rgba(26, 117, 255, 0.2);
border: 1px solid rgba(26, 117, 255, 0.2);
padding: 25px 20px;
.info_title {
margin-bottom: 10px;
font-size: 14px;
}
.info_value {
font-size: 25px;
}
.icon {
width: 60px;
height: 60px;
border-radius: 50%;
font-size: 30px;
display: flex;
align-items: center;
justify-content: center;
}
}
}
}
.titlebox {
height: 35px;
line-height: 35px;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 30px;
.actionbox {
cursor: pointer;
width: 80px;
font-size: 14px;
display: flex;
align-items: center;
justify-content: space-between;
&:hover {
color: #1975ff;
.arrow {
border-top-color: #1975ff;
border-right-color: #1975ff;
}
}
.arrow {
display: block;
width: 10px;
height: 10px;
border: 1px solid transparent;
transform: rotateZ(45deg);
border-top-color: #ccc;
border-right-color: #ccc;
}
}
}
.echartbox {
height: 492px;
}
.arrowto {
display: flex;
align-items: center;
&.echartTypes {
&::after {
display: none;
}
.echarsActions {
display: flex;
align-items: center;
.echarsAction {
height: 30px;
line-height: 30px;
width: 60px;
flex: 1;
text-align: center;
border: 1px solid #1a75ff;
margin-left: -1px;
font-size: 12px;
cursor: pointer;
color: #1a75ff;
&.active {
background-color: #1a75ff;
color: #fff;
}
&:nth-child(1) {
border-top-left-radius: 15px;
border-bottom-left-radius: 15px;
}
&:nth-child(3) {
border-top-right-radius: 15px;
border-bottom-right-radius: 15px;
}
}
}
}
}
// 快捷入口
.quickBox {
width: 100%;
box-sizing: border-box;
padding: 10px;
border-radius: 50%;
margin-bottom: 10px;
.quickBox_title {
line-height: 25px;
color: rgba(51, 51, 51, 1);
font-size: 18px;
margin-bottom: 10px;
}
.quickBox_body {
width: 100%;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
.quick_item {
height: 40px;
color: rgba(51, 51, 51, 1);
line-height: 40px;
text-align: center;
border-radius: 5px;
cursor: pointer;
border: 1px solid transparent;
&:hover {
border: 1px solid rgba(26, 117, 255, 1);
color: #1975ff;
}
@media (max-width: 1920px) {
font-size: 12px;
}
@media (max-width: 1500px) {
font-size: 10px;
}
@media (max-width: 1400px) {
font-size: 8px;
}
}
.quick_add {
border: 1px solid rgba(26, 117, 255, 1);
color: rgba(26, 117, 255, 1);
}
}
}
// 待办事项
.todoBox {
width: 100%;
box-sizing: border-box;
padding: 10px 15px;
border-radius: 5px;
.todoBox_title {
line-height: 30px;
color: rgba(51, 51, 51, 1);
font-size: 20px;
margin-bottom: 10px;
display: flex;
justify-content: space-between;
align-items: center;
}
.todoBox_body {
&:deep(.el-form-item__label) {
margin-bottom: 10px;
}
&:deep(.el-form-item) {
margin-bottom: 10px;
}
&:deep(.el-upload, ) {
width: 100%;
}
:deep(.el-date-editor.el-input, .el-date-editor.el-input__wrapper) {
width: 100% !important;
}
// 上传文件
.uploadFileBox {
display: flex;
align-items: center;
flex-wrap: nowrap;
}
}
}
}
</style>
<style scoped lang="scss"></style>

View File

@@ -68,7 +68,7 @@
{{ getWeatherIcon(weather_icon.iconvalue) }}
</div>
</div>
<div class="tips">
<div class="tips" v-show="weather_icon.title">
{{ `${weather_icon.title} ${weather_icon.wind_direction} ${weather_icon.wind_power}` }}
<span>温度{{ weather_icon.temperature }}°C</span>
</div>
@@ -114,7 +114,7 @@
</div>
<div class="body flex-1">
<div class="quicly_box" v-if="Sideactive === 1">
<div class="quickly_item" v-for="(item, index) in quickBox" :key="index" @click="handleRouter(item.url)">
<div class="quickly_item" v-for="(item, index) in quickBox" :key="index" @click="handleRouter(item.menuPath)">
<div class="quickly_item_icon" v-if="item.menuIcon">
<svg-icon :icon-class="item.menuIcon" />
</div>
@@ -359,16 +359,16 @@ function getVillageinfo() {
villageName: res.data.villageName
};
const city = res.data.city.replaceAll('/', '');
workSpaceWeatherApi(city).then((res) => {
weather_icon.value = {
iconvalue: res.weather_icon,
title: res.weather,
wind_direction: res.wind_direction,
wind_power: res.wind_power,
humidity: res.humidity,
temperature: res.temperature
};
});
// workSpaceWeatherApi(city).then((res) => {
// weather_icon.value = {
// iconvalue: res.weather_icon,
// title: res.weather,
// wind_direction: res.wind_direction,
// wind_power: res.wind_power,
// humidity: res.humidity,
// temperature: res.temperature
// };
// });
houseStore.updateVilageinfo(res.data);
});
}
@@ -387,7 +387,7 @@ const actions = ref([
name: '支出'
}
]);
changeChartConfig(0);
// changeChartConfig(0);
function changeActive_index(val: number) {
active_index.value = val;
changeChartConfig(val);
@@ -482,7 +482,6 @@ const chartConfig = shallowRef<EChartsOption>({
function changeChartConfig(val: number) {
const id = localStorage.getItem('villageid');
workSpaceIncomeTrendListApi(id, val).then((res) => {
console.log(res);
if (!res || res.length === 0) {
return;
}
@@ -527,38 +526,7 @@ const quickBox = ref<
'menuIcon': string;
'sortOrder': number;
}[]
>([
{
name: '新建用户',
url: '/house/resident',
img: home
},
{
name: '车位管理',
url: '/carArea/parking',
img: chart
},
{
name: '新建月卡',
url: '/carArea/monthCard',
img: add
},
{
name: '新建报修',
url: '/repair/repairlist',
img: info
},
{
name: '访客记录',
url: '/repair/visitorList',
img: profile
},
{
name: '账单管理',
url: '/sdb/sdbbill',
img: star
}
]);
>([]);
const router = useRouter();
function handleRouter(val: string) {
router.push({
@@ -605,7 +573,6 @@ function handleroutestoshowlist(rotues) {
return [];
}
const arr = rotues.map((ele) => _hanle(null, ele, 1)).filter((item) => item);
console.log(arr);
quicklylist.value = arr;
}
function _hanle(parentRoute, currentRoute, level) {