物业主开发

This commit is contained in:
Zy
2026-05-08 11:30:28 +08:00
parent a8bb4e66ad
commit 1b738c0f4d
118 changed files with 2891 additions and 979 deletions

View File

@@ -2,7 +2,7 @@
<div class="box">
<div class="header">
<span>智慧物业后台管理系统</span>
<navbar ref="navbarRef" />
<navbar :Showhamburger="false" ref="navbarRef" />
</div>
<div class="container AddBuildingBox">
<el-form inline class="formBody" ref="formRef" :model="form" :rules="rules" label-width="100px">
@@ -185,7 +185,6 @@ function getCommunityinfo() {
const id = editId.value;
getVillageByIdAPI(id).then((res) => {
city.value = res.data.city.split('/');
console.log(res.data.city.split('/'));
if (res.data.villageImageUrl) {
villageImg.value = res.data.villageImageUrl
.split(',')
@@ -311,25 +310,25 @@ const submitForm = () => {
};
function submitFormInfo() {
if (form.value.managePhone.trim()) {
if (form.value.managePhone && form.value.managePhone.trim()) {
if (!reg.phone.test(form.value.managePhone)) {
ElMessage.error('请输入正确的手机号码');
return;
}
}
if (form.value.manageVx.trim()) {
if (form.value.manageVx && form.value.manageVx.trim()) {
if (!reg.wechat.test(form.value.manageVx)) {
ElMessage.error('请输入正确的微信号');
return;
}
}
if (form.value.manageQq.trim()) {
if (form.value.manageQq && form.value.manageQq.trim()) {
if (!reg.qq.test(form.value.manageQq)) {
ElMessage.error('请输入正确的QQ号码');
return;
}
}
if (form.value.manageEmail.trim()) {
if (form.value.manageEmail && form.value.manageEmail.trim()) {
if (!reg.email.test(form.value.manageEmail)) {
ElMessage.error('请输入正确的邮箱号码');
return;

View File

@@ -2,7 +2,7 @@
<div class="h-full box">
<div class="header">
<span class="">智慧物业后台管理系统</span>
<navbar ref="navbarRef" />
<navbar :Showhamburger="false" ref="navbarRef" />
</div>
<div class="containerbox">
<div class="community_nav_box">
@@ -95,6 +95,7 @@ function handleEdit(item: communitylist_rows_type) {
/** 管理小区 */
function handleclick(item: communitylist_rows_type) {
switchVillageAPI(item.villageId).then(() => {
localStorage.setItem('villageInfo', JSON.stringify(item));
localStorage.setItem('villageid', item.villageId);
houseStore.getviliageinfo(item.villageId);
router.push({
@@ -200,12 +201,15 @@ function handleclick(item: communitylist_rows_type) {
display: grid;
grid-template-columns: repeat(5, 1fr);
@media (max-width: 1900px) {
@media (max-width: 2350px) {
grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1500px) {
@media (max-width: 1900px) {
grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1450px) {
grid-template-columns: repeat(2, 1fr);
}
.coummunity_card {
min-width: 369px;
max-width: 369px;

View File

@@ -3,7 +3,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
<el-form-item label="key键" prop="testKey">
<el-input v-model="queryParams.testKey" placeholder="请输入key键" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -11,8 +11,8 @@
<el-input v-model="queryParams.value" placeholder="请输入值" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -26,7 +26,7 @@
<el-button v-hasPermi="['demo:demo:add']" type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['demo:demo:edit']" type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()">修改</el-button>
<el-button v-hasPermi="['demo:demo:edit']" type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()">编辑</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['demo:demo:remove']" type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()"

View File

@@ -3,13 +3,13 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
<el-form-item label="树节点名" prop="treeName">
<el-input v-model="queryParams.treeName" placeholder="请输入树节点名" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>

View File

@@ -1,11 +1,11 @@
<template>
<div class="p-2">
<div class="h-full flex flex-col p-2">
<pageheader></pageheader>
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
<el-form-item label="登录地址" prop="ipaddr">
<el-input v-model="queryParams.ipaddr" placeholder="请输入登录地址" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -29,15 +29,15 @@
></el-date-picker>
</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-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</transition>
<el-card shadow="hover">
<el-card class="flex-1" shadow="hover">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
@@ -209,3 +209,9 @@ onMounted(() => {
getList();
});
</script>
<style lang="scss" scoped>
.el-table {
height: calc(100% - 80px);
}
</style>

View File

@@ -2,7 +2,7 @@
<div class="p-2">
<div class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="登录地址" prop="ipaddr">
<el-input v-model="queryParams.ipaddr" placeholder="请输入登录地址" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -10,8 +10,8 @@
<el-input v-model="queryParams.userName" placeholder="请输入用户名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>

View File

@@ -1,11 +1,11 @@
<template>
<div class="p-2">
<div class="flex flex-col h-full p-2">
<pageheader></pageheader>
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="操作地址" prop="operIp">
<el-input v-model="queryParams.operIp" placeholder="请输入操作地址" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -37,15 +37,15 @@
></el-date-picker>
</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-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</transition>
<el-card shadow="hover">
<el-card class="flex-1" shadow="hover">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
@@ -89,7 +89,6 @@
sortable="custom"
:sort-orders="['descending', 'ascending']"
/>
<el-table-column label="部门" align="center" prop="deptName" width="130" :show-overflow-tooltip="true" />
<el-table-column label="操作地址" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
<el-table-column label="操作状态" align="center" prop="status">
<template #default="scope">
@@ -261,3 +260,9 @@ onMounted(() => {
getList();
});
</script>
<style lang="scss" scoped>
.el-table {
height: calc(100% - 80px);
}
</style>

View File

@@ -1,16 +1,16 @@
<template>
<div class="flex flex-col h-full p-2">
<Pageheader title="活动管理"></Pageheader>
<Pageheader></Pageheader>
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="标题" prop="title">
<el-input v-model="queryParams.title" placeholder="请输入标题" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -20,8 +20,8 @@
<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="['repair:add:activity']">新增</el-button>
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['activity:activity:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['repair:edit:activity']"
@@ -32,8 +32,17 @@
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['activity:activity:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['activity:activity:add'])"
:show-edit="checkPermi(['activity:activity:edit'])"
:show-delete="checkPermi(['activity:activity:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -50,9 +59,9 @@
<el-table-column label="发布人" align="center" prop="createName" />
<el-table-column label="操作" align="center" width="300px" fixed="right">
<template #default="scope">
<!-- TODO 发布按钮 -->
<!-- TODO 发布按钮!!! -->
<el-button v-if="scope.row.status === '0'" link type="primary" @click="handleSend(scope.row)">发布</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['repair:edit:activity']">修改</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['activity:activity:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['activity:activity:remove']">删除</el-button>
</template>
</el-table-column>
@@ -83,6 +92,7 @@
<script setup name="Activity" lang="ts">
import { listActivity, delActivity, updateActivity } from '@/api/system/Activity/index';
import { ActivityVO, ActivityQuery, ActivityForm } from '@/api/system/Activity/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_publish_status } = toRefs<any>(proxy?.useDict('com_publish_status'));
@@ -189,10 +199,11 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: ActivityVO) => {
const _id = row.id || ids.value[0];
router.push({
path: '/repair/editActivity',
query: {
id: row.id
id: _id
}
});
};

View File

@@ -4,13 +4,13 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -20,7 +20,7 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['banner:banner:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
@@ -32,8 +32,17 @@
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['banner:banner:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['banner:banner:add'])"
:show-edit="checkPermi(['banner:banner:edit'])"
:show-delete="checkPermi(['banner:banner:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -53,21 +62,17 @@
</template>
</el-table-column>
<el-table-column label="名称" align="center" prop="name" />
<el-table-column label="状态 0启用 1停用" align="center" prop="status">
<el-table-column label="状态" align="center" prop="status">
<template #default="scope">
<el-switch inactive-text="启用" active-text="停用" inactive-value="0" active-value="1" v-model="scope.row.status"></el-switch>
<el-switch inactive-value="0" active-value="1" v-model="scope.row.status"></el-switch>
</template>
</el-table-column>
<el-table-column label="排序" align="center" prop="order" />
<el-table-column label="添加时间" align="center" prop="order" />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['banner:banner:edit']"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['banner:banner:remove']"></el-button>
</el-tooltip>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['banner:banner:edit']">修改</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['banner:banner:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -100,6 +105,7 @@
<script setup name="Banner" lang="ts">
import { listBanner, getBanner, delBanner, addBanner, updateBanner } from '@/api/system/Banner';
import { BannerVO, BannerQuery, BannerForm } from '@/api/system/Banner/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -192,10 +198,11 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: BannerVO) => {
const _id = row?.id || ids.value[0];
router.push({
path: '/system/addBanner',
path: '/system/editBanner',
query: {
id: row.id
id: _id
}
});
};
@@ -220,7 +227,7 @@ const submitForm = () => {
/** 删除按钮操作 */
const handleDelete = async (row?: BannerVO) => {
const _ids = row?.id || ids.value;
await proxy?.$modal.confirm('是否确认删除Banner图管理编号为"' + _ids + '"的数据项').finally(() => (loading.value = false));
await proxy?.$modal.confirm('是否确认删除Banner图').finally(() => (loading.value = false));
await delBanner(_ids);
proxy?.$modal.msgSuccess('删除成功');
await getList();

View File

@@ -14,8 +14,8 @@
<el-input v-model="queryParams.complaintName" placeholder="请输入投诉人姓名" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -37,7 +37,7 @@
</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="['repair:main:complaint']">查看详情</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['complaint:complaint:query']">查看详情</el-button>
</template>
</el-table-column>
</el-table>

View File

@@ -9,8 +9,8 @@
<el-input v-model="queryParams.name" placeholder="请输入投诉类型名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -20,7 +20,7 @@
<el-card shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['complaintType:complaintType:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
@@ -38,8 +38,17 @@
v-hasPermi="['complaintType:complaintType:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['complaintType:complaintType:add'])"
:show-edit="checkPermi(['complaintType:complaintType:edit'])"
:show-delete="checkPermi(['complaintType:complaintType:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -58,7 +67,7 @@
</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="['complaintType:complaintType:edit']">修改</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['complaintType:complaintType:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['complaintType:complaintType:remove']">删除</el-button>
</template>
</el-table-column>
@@ -72,6 +81,7 @@
<script setup name="ComplaintType" lang="ts">
import { listComplaintType, getComplaintType, delComplaintType, addComplaintType, updateComplaintType } from '@/api/system/ComplainType/index';
import { ComplaintTypeVO, ComplaintTypeQuery, ComplaintTypeForm } from '@/api/system/ComplainType/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_repair_project_status } = toRefs<any>(proxy?.useDict('com_repair_project_status'));
@@ -150,10 +160,11 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: ComplaintTypeVO) => {
const _id = row?.id || ids.value[0];
router.push({
path: '/system/addComplantType',
query: {
id: row.id
id: _id
}
});
};

View File

@@ -14,8 +14,8 @@
</el-select>
</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-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -25,7 +25,7 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repair:add:decoration']">新增</el-button>
</el-col>
<el-col :span="1.5">
@@ -37,9 +37,18 @@
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['decoration:decoration:remove']"
>删除</el-button
>
</el-col>
</el-col> -->
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['decoration:decoration:add'])"
:show-edit="checkPermi(['decoration:decoration:edit'])"
:show-delete="checkPermi(['decoration:decoration:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -69,8 +78,8 @@
v-hasPermi="['repair:edit:decoration']"
>验收</el-button
>
<el-button link type="primary" v-else @click="handleInspection(scope.row)" v-hasPermi="['repair:edit:decoration']">详情</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['repair:edit:decoration']">修改</el-button>
<el-button link type="primary" v-else @click="handleInspection(scope.row)" v-hasPermi="['decoration:decoration:query']">详情</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['decoration:decoration:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['decoration:decoration:remove']">删除</el-button>
</template>
</el-table-column>
@@ -111,6 +120,7 @@
<script setup name="Decoration" lang="ts">
import { listDecoration, delDecoration, updateDecoration } from '@/api/system/Decoration/index';
import { DecorationVO, DecorationQuery, DecorationForm } from '@/api/system/Decoration/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_decoration_status } = toRefs<any>(proxy?.useDict('com_decoration_status'));
@@ -214,10 +224,11 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: DecorationVO) => {
const _id = row.id || ids.value[0];
router.push({
path: '/repair/editDecoration',
query: {
id: row.id
id: _id
}
});
};

View File

@@ -1,6 +1,6 @@
<template>
<div class="ResidentMainBox p-2 w-full">
<PageHeader title="办事编辑"></PageHeader>
<PageHeader></PageHeader>
<div class="ResidentMainBody">
<el-card>
<template #header>

View File

@@ -4,13 +4,13 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="求助人" prop="seekName">
<el-input v-model="queryParams.seekName" placeholder="请输入求助人" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -20,7 +20,7 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repair:add:handlelog']">新增</el-button>
</el-col>
<el-col :span="1.5">
@@ -32,8 +32,17 @@
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['handleLog:handleLog:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['handleLog:handleLog:add'])"
:show-edit="checkPermi(['handleLog:handleLog:edit'])"
:show-delete="checkPermi(['handleLog:handleLog:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -54,7 +63,7 @@
<el-table-column label="办事地点" align="center" prop="handlePosition" />
<el-table-column label="操作" width="200" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['repair:edit:handlelog']">修改</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['handleLog:handleLog:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['handleLog:handleLog:remove']">删除</el-button>
</template>
</el-table-column>
@@ -68,6 +77,7 @@
<script setup name="HandleLog" lang="ts">
import { listHandleLog, getHandleLog, delHandleLog, addHandleLog, updateHandleLog } from '@/api/system/HandleLog/index';
import { HandleLogVO, HandleLogQuery, HandleLogForm } from '@/api/system/HandleLog/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -148,10 +158,11 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: HandleLogVO) => {
const _id = row.id || ids.value[0];
router.push({
path: '/repair/editHandleLog',
query: {
id: row.id
id: _id
}
});
};

View File

@@ -4,13 +4,13 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="设施名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入设施名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -20,7 +20,7 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['houseFacilities:houseFacilities:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
@@ -44,8 +44,17 @@
v-hasPermi="['houseFacilities:houseFacilities:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['houseFacilities:houseFacilities:add'])"
:show-edit="checkPermi(['houseFacilities:houseFacilities:edit'])"
:show-delete="checkPermi(['houseFacilities:houseFacilities:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -59,7 +68,7 @@
</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="['houseFacilities:houseFacilities:edit']">修改</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['houseFacilities:houseFacilities:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['houseFacilities:houseFacilities:remove']">删除</el-button>
</template>
</el-table-column>
@@ -79,6 +88,7 @@ import {
updateHouseFacilities
} from '@/api/system/HouseFacilities/index';
import { HouseFacilitiesVO, HouseFacilitiesQuery, HouseFacilitiesForm } from '@/api/system/HouseFacilities/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_repair_project_status } = toRefs<any>(proxy?.useDict('com_repair_project_status'));

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<!-- <el-form-item label="月卡状态" prop="payMethod">
<el-select v-model="queryParams.parkingStatus" placeholder="请选择" clearable>
<el-option v-for="dict in com_month_card_status" :key="dict.value" :label="dict.label" :value="Number(dict.value)" />
@@ -14,8 +14,8 @@
<el-input v-model="queryParams.cardCode" placeholder="请输入月卡编号" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -25,7 +25,7 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['carArea:add:monthcard']">新增</el-button>
</el-col>
<el-col :span="1.5">
@@ -37,8 +37,17 @@
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['monthCard:monthCard:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['monthCard:monthCard:add'])"
:show-edit="checkPermi(['monthCard:monthCard:edit'])"
:show-delete="checkPermi(['monthCard:monthCard:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -70,12 +79,8 @@
<el-table-column label="备注" align="center" prop="remark"></el-table-column>
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['carArea:edit:monthcard']"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['monthCard:monthCard:remove']"></el-button>
</el-tooltip>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['monthCard:monthCard:edit']">修改</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['monthCard:monthCard:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -135,6 +140,7 @@
<script setup name="MonthCard" lang="ts">
import { listMonthCard, getMonthCard, delMonthCard, addMonthCard, updateMonthCard } from '@/api/system/MonthCard/index';
import { MonthCardVO, MonthCardQuery, MonthCardForm } from '@/api/system/MonthCard/type';
import { checkPermi } from '@/utils/permission';
import { diffDays } from '@/utils/time';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -246,8 +252,8 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: MonthCardVO) => {
reset();
const _id = row?.id || ids.value[0];
// reset();
router.push({
path: '/carArea/editMonthCard',
query: {

View File

@@ -4,13 +4,13 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="公告标题" prop="noticeTitle">
<el-input v-model="queryParams.noticeTitle" placeholder="请输入公告标题" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -20,7 +20,7 @@
<el-card shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repair:add:noticepc']">新增</el-button>
</el-col>
<el-col :span="1.5">
@@ -32,8 +32,17 @@
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['notice:notice:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['notice:notice:add'])"
:show-edit="checkPermi(['notice:notice:edit'])"
:show-delete="checkPermi(['notice:notice:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -61,7 +70,7 @@
</el-table-column>
<el-table-column label="操作" align="center" width="220" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['repair:edit:noticepc']">修改</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['notice:notice:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['notice:notice:remove']">删除</el-button>
</template>
</el-table-column>
@@ -75,6 +84,7 @@
<script setup name="Notice" lang="ts">
import { listNotice, getNotice, delNotice, addNotice, updateNotice } from '@/api/system/NoticePc/index';
import { NoticeVO, NoticeQuery, NoticeForm } from '@/api/system/NoticePc/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_noticepc_level } = toRefs<any>(proxy?.useDict('com_noticepc_level'));
@@ -167,10 +177,11 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: NoticeVO) => {
const _id = row.noticeId || ids.value[0];
router.push({
path: '/repair/editNoticePc',
query: {
id: row.noticeId
id: _id
}
});
};

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="缴费人" prop="payerName">
<el-input v-model="queryParams.payerName" placeholder="请输入缴费人" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -12,8 +12,8 @@
<el-input v-model="queryParams.carNum" placeholder="请输入车牌号" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -23,7 +23,7 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['carArea:add:parkingcost']">新增</el-button>
</el-col>
<el-col :span="1.5">
@@ -35,8 +35,17 @@
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['parkingCost:parkingCost:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['parkingCost:parkingCost:add'])"
:show-edit="checkPermi(['parkingCost:parkingCost:edit'])"
:show-delete="checkPermi(['parkingCost:parkingCost:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -73,18 +82,8 @@
<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-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['carArea:edit:parkingcost']"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button
link
type="primary"
icon="Delete"
@click="handleDelete(scope.row)"
v-hasPermi="['parkingCost:parkingCost:remove']"
></el-button>
</el-tooltip>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['parkingCost:parkingCost:edit']">修改</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['parkingCost:parkingCost:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -99,6 +98,7 @@ import { listArea } from '@/api/system/carArea';
import { listParking } from '@/api/system/parking';
import { listParkingCost, getParkingCost, delParkingCost, addParkingCost, updateParkingCost } from '@/api/system/ParkingCost';
import { ParkingCostVO, ParkingCostQuery, ParkingCostForm } from '@/api/system/ParkingCost/type';
import { checkPermi } from '@/utils/permission';
import { formatTimeDiff } from '@/utils/time';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -199,10 +199,11 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: ParkingCostVO) => {
const _id = row.id || ids.value[0];
router.push({
path: '/carArea/editParkingCost',
query: {
id: row.id
id: _id
}
});
};

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="问卷标题" prop="title">
<el-input v-model="queryParams.title" placeholder="请输入问卷标题" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -12,8 +12,8 @@
<el-input v-model="queryParams.scope" placeholder="请输入参与范围 0全体业主 1部分业主" clearable @keyup.enter="handleQuery" />
</el-form-item> -->
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -23,7 +23,7 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repair:add:questionnaire']">新增</el-button>
</el-col>
<el-col :span="1.5">
@@ -41,8 +41,17 @@
v-hasPermi="['questionnaire:questionnaire:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['questionnaire:questionnaire:add'])"
:show-edit="checkPermi(['questionnaire:questionnaire:edit'])"
:show-delete="checkPermi(['questionnaire:questionnaire:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -63,8 +72,8 @@
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" fixed="right" width="200">
<template #default="scope">
<el-button link type="primary" @click="handleView(scope.row)" v-hasPermi="['repair:main:questionnaire']">查看</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['repair:edit:questionnaire']">修改</el-button>
<el-button link type="primary" @click="handleView(scope.row)" v-hasPermi="['questionnaire:questionnaire:query']">查看</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['questionnaire:questionnaire:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['questionnaire:questionnaire:remove']">删除</el-button>
</template>
</el-table-column>
@@ -78,6 +87,7 @@
<script setup name="Questionnaire" lang="ts">
import { listQuestionnaire, getQuestionnaire, delQuestionnaire, addQuestionnaire, updateQuestionnaire } from '@/api/system/Questionnaire/index';
import { QuestionnaireVO, QuestionnaireQuery, QuestionnaireForm } from '@/api/system/Questionnaire/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -185,10 +195,11 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: QuestionnaireVO) => {
const _id = row.id || ids.value[0];
router.push({
path: '/repair/editQuestionnaire',
query: {
id: row.id
id: _id
}
});
};
@@ -222,7 +233,7 @@ const submitForm = () => {
/** 删除按钮操作 */
const handleDelete = async (row?: QuestionnaireVO) => {
const _ids = row?.id || ids.value;
await proxy?.$modal.confirm('是否确认删除问卷调查编号为"' + _ids + '"的数据项').finally(() => (loading.value = false));
await proxy?.$modal.confirm('是否确认删除问卷调查?').finally(() => (loading.value = false));
await delQuestionnaire(_ids);
proxy?.$modal.msgSuccess('删除成功');
await getList();

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="报修状态" prop="problemStatus">
<el-select v-model="queryParams.problemStatus" placeholder="请选择" clearable>
<el-option v-for="dict in com_repair_status" :key="dict.value" :label="dict.label" :value="dict.value" />
@@ -21,8 +21,8 @@
/>
</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-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -32,8 +32,8 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button style="width: 120px" type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repair:add:repair']">新增</el-button>
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repair:add:repair']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['repair:edit:repair']"
@@ -44,8 +44,17 @@
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['repair:repair:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['repair:repair:add'])"
:show-edit="checkPermi(['repair:repair:edit'])"
:show-delete="checkPermi(['repair:repair:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -68,10 +77,10 @@
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleShare(scope.row)" v-hasPermi="['repair:main:repair']">{{
<el-button link type="primary" @click="handleShare(scope.row)" v-hasPermi="['repair:repair:query']">{{
scope.row.problemStatus === '0' ? '分配' : '详情'
}}</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['repair:edit:repair']">修改</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['repair:repair:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['repair:repair:remove']">删除</el-button>
</template>
</el-table-column>
@@ -87,6 +96,7 @@ import { listRepair, delRepair } from '@/api/system/Repair/index';
import { RepairVO, RepairQuery, RepairForm } from '@/api/system/Repair/type';
import { listRepairProject } from '@/api/system/RepairProject';
import { listResident } from '@/api/system/resident';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_repair_status } = toRefs<any>(proxy?.useDict('com_repair_status'));
@@ -188,19 +198,21 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: RepairVO) => {
const _id = row.id || ids.value[0];
router.push({
path: '/repair/editRepair',
query: {
id: row.id
id: _id
}
});
};
/** 分配人员 */
const handleShare = (row) => {
const _id = row.id || ids.value[0];
router.push({
path: '/repair/repairMain',
query: {
id: row.id
id: _id
}
});
};

View File

@@ -9,8 +9,8 @@
<el-input v-model="queryParams.projectName" placeholder="请输入维修项目名" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -20,7 +20,7 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-button style="width: 100px" type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repairProject:repairProject:add']"
<!-- <el-button style="width: 100px" type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repairProject:repairProject:add']"
>新增维修类</el-button
>
<el-button
@@ -31,8 +31,17 @@
@click="handleDelete()"
v-hasPermi="['repairProject:repairProject:remove']"
>删除</el-button
>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['repairProject:repairProject:add'])"
:show-edit="checkPermi(['repairProject:repairProject:edit'])"
:show-delete="checkPermi(['repairProject:repairProject:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -67,7 +76,7 @@
</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" icon="Edit" @click="handleUpdate(scope.row)">修改</el-button>
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">编辑</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
@@ -88,7 +97,7 @@
</el-table-column>
<el-table-column label="操作" width="350" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['repairProject:repairProject:edit']">修改</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['repairProject:repairProject:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['repairProject:repairProject:remove']">删除</el-button>
</template>
</el-table-column>
@@ -146,6 +155,7 @@ import {
gettreelistRepairProject
} from '@/api/system/RepairProject/index';
import { RepairProjectVO, RepairProjectQuery, RepairProjectForm } from '@/api/system/RepairProject/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -264,10 +274,11 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: RepairProjectVO) => {
const _id = row?.id || ids.value[0];
router.push({
path: '/system/editRepairProjectList',
query: {
id: row.id
id: _id
}
});
};

View File

@@ -4,13 +4,13 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" :inline="true" @submit.prevent="handleQuery">
<el-form-item label="项目名称" prop="itemName">
<el-input v-model="queryParams.itemName" placeholder="请输入项目名称" clearable @keyup.enter="handleQuery" />
<el-input v-model="queryParams.itemName" placeholder="请输入项目名称" clearable @keyup.enter.prevent="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -20,20 +20,16 @@
<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="['sdb:add:chargeitem']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['sdb:edit:chargeitem']"
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['chargeItem:chargeItem:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-edit="checkPermi(['chargeItem:chargeItem:edit'])"
:show-add="checkPermi(['chargeItem:chargeItem:add'])"
:show-delete="checkPermi(['chargeItem:chargeItem:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -75,8 +71,6 @@
<template #default="scope">
<el-switch
@change="(val: string) => handleSwitch(val, scope.row)"
inactive-text="停用"
active-text="启用"
inactive-value="1"
active-value="0"
v-model="scope.row.status"
@@ -85,7 +79,7 @@
</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="['sdb:edit:chargeitem']">修改</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['chargeItem:chargeItem:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['chargeItem:chargeItem:remove']">删除</el-button>
</template>
</el-table-column>
@@ -99,6 +93,7 @@
<script setup name="ChargeItem" lang="ts">
import { listChargeItem, getChargeItem, delChargeItem, addChargeItem, updateChargeItem, changChargeItem } from '@/api/system/SdbChargeItem';
import { ChargeItemVO, ChargeItemQuery, ChargeItemForm } from '@/api/system/SdbChargeItem/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_charge_item_method } = toRefs<any>(proxy?.useDict('com_charge_item_method'));

View File

@@ -4,13 +4,13 @@
<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" label-width="120" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" label-width="120" :inline="true">
<el-form-item label="收费类型名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入收费类型名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -20,7 +20,7 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['chargeType:chargeType:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
@@ -32,8 +32,17 @@
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['chargeType:chargeType:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['chargeType:chargeType:add'])"
:show-edit="checkPermi(['chargeType:chargeType:edit'])"
:show-delete="checkPermi(['chargeType:chargeType:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -45,21 +54,15 @@
<el-switch
@change="(val: string) => handleChange(val, scope.row)"
v-model="scope.row.status"
active-text="启用"
active-value="0"
inactive-text="停用"
inactive-value="1"
></el-switch>
</template>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['chargeType:chargeType:edit']"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['chargeType:chargeType:remove']"></el-button>
</el-tooltip>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['chargeType:chargeType:edit']">修改</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['chargeType:chargeType:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -86,6 +89,7 @@
<script setup name="ChargeType" lang="ts">
import { listChargeType, getChargeType, delChargeType, addChargeType, updateChargeType } from '@/api/system/ChargeType';
import { ChargeTypeVO, ChargeTypeQuery, ChargeTypeForm, ChargeType2Query } from '@/api/system/ChargeType/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;

View File

@@ -3,7 +3,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="用户ID" prop="deviceCode">
<el-input v-model="queryParams.deviceCode" placeholder="请输入用户ID" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -26,8 +26,8 @@
<el-input v-model="queryParams.rangeFee" placeholder="请输入" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -67,7 +67,7 @@
>导出</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar></right-toolbar>
</el-row>
</template>

View File

@@ -4,13 +4,13 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="仪表名称" prop="houseId">
<el-input v-model="queryParams.houseId" placeholder="请输入仪表名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -20,15 +20,28 @@
<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="['sdb:add:payrecord']">新增</el-button>
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['payRecordList:payRecordList:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['payRecord:payRecord:remove']"
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete()"
v-hasPermi="['payRecordList:payRecordList:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:show-edit="false"
:show-add="checkPermi(['payRecordList:payRecordList:add'])"
:show-delete="checkPermi(['payRecordList:payRecordList:remove'])"
@update:add="handleAdd"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -80,6 +93,7 @@
<script setup name="PayRecord" lang="ts">
import { listPayRecord, getPayRecord, delPayRecord, addPayRecord, updatePayRecord } from '@/api/system/SdbPayRecord';
import { PayRecordVO, PayRecordQuery, PayRecordForm } from '@/api/system/SdbPayRecord/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_waterelectricity_topup_type } = toRefs<any>(proxy?.useDict('com_waterelectricity_topup_type'));

View File

@@ -5,7 +5,7 @@
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<div class="flex flex-items-center justify-between">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="精准查询">
<el-select v-model="queryParamsType" style="width: 160px; margin-right: 20px">
<el-option v-for="item in deviceCodeList" :key="item.value" :label="item.name" :value="item.value"></el-option>
@@ -13,8 +13,8 @@
<el-input v-model="queryParamsValue" placeholder="请输入" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-button @click="confimu">返回</el-button>
@@ -26,7 +26,7 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar></right-toolbar>
</el-row>
</template>

View File

@@ -13,27 +13,35 @@
<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="typeNamelist.includes(typeName)">
<el-radio-group 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>
<div @click="handleClearCheckout" v-if="form.chargeScope === '1'" class="ml-10px cursor-pointer color-red">清空</div>
</el-form-item>
<el-form-item v-if="form.chargeScope === '1'">
<!-- 其他费用 收费范围为 业主 -->
<el-form-item label="收费范围" prop="chargeScope" v-else>
<el-radio-group 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>
<div @click="handleClearCheckout" v-if="form.chargeScope === '1'" class="ml-10px cursor-pointer color-red">清空</div>
</el-form-item>
<el-form-item v-if="form.chargeScope === '1' && typeNamelist.includes(typeName)">
<div class="residentBox">
<ul class="checkoutSideUsesbox">
<li v-for="(item, index) in checkoutUses" :key="index">
<li v-for="(item, index) in checkoutHouses" :key="index">
<span>{{ item.buildingName }}/</span>
<span>{{ item.unitNo }}单元/</span>
<span>{{ item.floorNo }}/</span>
<span>{{ item.houseNo }}</span>
<el-icon @click="delteUse(item.houseId)">
<el-icon @click="deleteHouse(item.houseId)">
<Delete></Delete>
</el-icon>
</li>
<House returnvalue="*" ref="HolderRef" :isMultiple="true" :userid="form.houseIds.join(',')" @change="handleSelect">
<template #default>
<li @click="OpenUseTablesfun" class="add justify-center">
<li @click="OpenUseTablesfun('house')" class="add justify-center">
<el-icon>
<DocumentAdd></DocumentAdd>
</el-icon>
@@ -44,6 +52,28 @@
</ul>
</div>
</el-form-item>
<el-form-item v-if="form.chargeScope === '1' && !typeNamelist.includes(typeName)">
<div class="residentBox">
<ul class="checkoutSideUsesbox">
<li v-for="(item, index) in checkoutUser" :key="index">
<span>{{ item.house_name }} / {{ item.residentName }} / {{ item.phone }}</span>
<el-icon @click="delteUser(item.residentId)">
<Delete></Delete>
</el-icon>
</li>
<UserHolder returnvalue="*" ref="userRef" :isMultiple="true" :userid="form.residentIds" @change="handleCheckUser">
<template #default>
<li @click="OpenUseTablesfun('user')" class="add justify-center">
<el-icon>
<DocumentAdd></DocumentAdd>
</el-icon>
<span>添加业主</span>
</li>
</template>
</UserHolder>
</ul>
</div>
</el-form-item>
<el-form-item label="费用周期" prop="chargePeriod">
<el-select 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>
@@ -78,14 +108,16 @@
<script setup lang="ts">
import { ref } from 'vue';
import House from '@/components/Holder/house.vue';
import UserHolder from '@/components/Holder/user.vue';
import PageHeader from '@/components/Pageheader/index.vue';
import { listChargeItem } from '@/api/system/SdbChargeItem';
import { getBill, updateBill, addBill, BillHouse, listBillHouse } from '@/api/system/SdbBill';
import { getBill, updateBill, addBill, BillHouse, listBillHouse, queryResidentList_holder } from '@/api/system/SdbBill';
import type { DatePickerType } from 'element-plus';
import { formatDate, 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'));
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'));
@@ -108,7 +140,8 @@ const form = ref({
'chargeItemId': '', // 收费项目
'chargeScope': '0', // 业主范围
'chargePeriod': '2', // 费用周期
houseIds: [], // 部分业主
houseIds: [], // 部分房屋
residentIds: [], // 部分业主
charegeTypeId: '', // typeid
'startDate': '', // 开始
'endDate': '', // 结束
@@ -135,6 +168,8 @@ const chargeitemlist = ref([]);
// 房屋列表
const houselist = ref([]);
// 住户列表
const userlist = ref([]);
async function init() {
listChargeItem().then((res) => {
chargeitemlist.value = res.rows;
@@ -142,10 +177,13 @@ async function init() {
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
@@ -154,8 +192,9 @@ async function init() {
form.value.startDate = formatDate2(form.value.startDate);
form.value.endDate = formatDate2(form.value.endDate);
StartEndDate.value = [form.value.startDate, form.value.endDate];
checkoutUses.value = form.value.houseIds
// TODO houseid 有默认值, 需要处理
// TODO residentids 添加,
checkoutHouses.value = form.value.houseIds
.map((item) => {
if (item) {
const find = houselist.value.find((it) => it.houseId === item);
@@ -175,35 +214,57 @@ onMounted(() => {
init();
});
const typeNamelist = ref(['2049026484272791553', '2049026503017136129']);
const typeName = ref('');
// 获取收费类型id
function handleChange(val) {
function handleChange(val: string) {
const find = chargeitemlist.value.find((item) => item.id === val);
if (find) {
form.value.charegeTypeId = find.typeId;
typeName.value = find.typeId;
handleClearCheckout();
}
}
// !== 业主 =============================================================================
// 打开
const HolderRef = ref<InstanceType<typeof House>>();
function OpenUseTablesfun() {
HolderRef.value.open();
const userRef = ref<InstanceType<typeof UserHolder>>();
function OpenUseTablesfun(val: string) {
if (val === 'house') {
HolderRef.value.open();
} else if (val === 'user') {
userRef.value.open();
}
}
// 多选
const checkoutUses = ref<BillHouse[]>([]);
const checkoutHouses = ref<BillHouse[]>([]);
function handleSelect(val: BillHouse[]) {
checkoutUses.value = val;
form.value.houseIds = checkoutUses.value.map((item) => item.houseId);
checkoutHouses.value = val;
form.value.houseIds = checkoutHouses.value.map((item) => item.houseId);
}
// 多选
const checkoutUser = ref([]);
/** 添加 业主 */
function handleCheckUser(val) {
checkoutUser.value = val;
form.value.residentIds = checkoutUser.value.map((item) => item.residentId);
}
/** 删除房屋 */
function delteUse(id: string | number) {
checkoutUses.value = checkoutUses.value.filter((item) => item.houseId !== id);
function deleteHouse(id: string) {
checkoutHouses.value = checkoutHouses.value.filter((item) => item.houseId !== id);
}
/** 删除业主 */
function delteUser(id: string) {
checkoutUser.value = checkoutUser.value.filter((item) => item.residentId !== id);
}
/** 清空 */
function handleClearCheckout() {
checkoutUses.value = [];
checkoutHouses.value = [];
checkoutUser.value = [];
form.value.residentIds = [];
form.value.houseIds = [];
}
// !== 业主 =============================================================================
@@ -213,12 +274,12 @@ const submitForm = () => {
formRef.value?.validate(async (valid: boolean) => {
if (valid) {
if (userid.value) {
updateBill(form.value).then((res) => {
updateBill(form.value).then(() => {
ElMessage.success('编辑成功');
cancelForm();
});
} else {
addBill(form.value).then((res) => {
addBill(form.value).then(() => {
ElMessage.success('添加成功');
cancelForm();
});

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="收费项目" prop="chargeItemId">
<el-select v-model="queryParams.chargeItemId" placeholder="请选择收费项目">
<el-option v-for="(item, index) in chargeItems" :key="index" :value="item.id" :label="item.itemName"></el-option>
@@ -17,29 +17,28 @@
<el-input v-model="queryParams.billCode" placeholder="请输入" clearable @keyup.enter="handleQuery" />
</el-form-item> -->
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</transition>
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['bill:bill:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['bill:bill:edit']">修改</el-button>
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['bill:bill:edit']">编辑</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:bill:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar :show-add="checkPermi(['bill:bill:add'])" :show-edit="false" :show-delete="false" @update:add="handleAdd"></right-toolbar>
</el-row>
</template>
@@ -49,35 +48,35 @@
<el-table-column label="账单名称" align="center" prop="billName" />
<el-table-column label="收费范围" align="center" prop="chargeScope" width="100">
<template #default="scope">
<!-- TODO 收费类型来判断收费范围 -->
<dict-tag :options="com_bill_charge_scope_house" :value="scope.row.chargeScope"></dict-tag>
</template>
</el-table-column>
<el-table-column label="收费项目" align="center" prop="chargeItemName" />
<el-table-column label="收费周期" align="center" prop="chargePeriod" width="80">
<!-- <el-table-column label="收费周期" align="center" prop="chargePeriod" width="80">
<template #default="scope">
<dict-tag :options="com_bill_charge_period" :value="scope.row.chargePeriod"></dict-tag>
</template>
</el-table-column>
<el-table-column label="开始日期" align="center" prop="startDate" width="180">
</el-table-column> -->
<el-table-column label="起止时间" align="center">
<template #default="scope">
<span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.startDate, '{y}/{m}/{d}') }}</span> -
<span>{{ parseTime(scope.row.endDate, '{y}/{m}/{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="结束日期" align="center" prop="endDate" width="180">
<el-table-column label="单价" align="center" width="180">
<template #default="scope">
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="单价" align="center" prop="endDate" width="180">
<template #default="scope">
<span>{{ scope.row.fixedPrice }}</span>
<div class="flex justify-center">
<span>{{ scope.row.fixedPrice }}</span> /
<dict-tag :options="com_charge_item_unit" value="0"></dict-tag>
</div>
</template>
</el-table-column>
<!-- <el-table-column label="数量" align="center" prop="chargePeriod" />
<el-table-column label="费用合计" align="center" prop="chargePeriod" /> -->
<el-table-column label="操作" width="120" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['bill:bill:edit']">修改</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['bill:bill:edit']">编辑</el-button>
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['bill:bill:query']">详情</el-button>
<!-- <el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:bill:remove']">删除</el-button> -->
</template>
@@ -93,12 +92,14 @@
import { listBill, getBill, delBill, addBill, updateBill } from '@/api/system/SdbBill/index';
import { BillVO, BillQuery, BillForm } from '@/api/system/SdbBill/type';
import { listChargeItem } from '@/api/system/SdbChargeItem';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_bill_search_filter } = toRefs<any>(proxy?.useDict('com_bill_search_filter'));
const { com_questionnaire_scope } = toRefs<any>(proxy?.useDict('com_questionnaire_scope'));
const { com_bill_charge_period } = toRefs<any>(proxy?.useDict('com_bill_charge_period'));
const { com_bill_charge_scope_house } = toRefs<any>(proxy?.useDict('com_bill_charge_scope_house'));
const { com_charge_item_unit } = toRefs<any>(proxy?.useDict('com_charge_item_unit'));
const billList = ref<BillVO[]>([]);
const buttonLoading = ref(false);
@@ -133,7 +134,7 @@ const data = reactive<PageData<BillForm, BillQuery>>({
form: { ...initFormData },
queryParams: {
pageNum: 1,
pageSize: 10,
pageSize: 20,
billCode: '',
type: '',
value: ''

View File

@@ -2,85 +2,220 @@
<el-card style="margin-top: 20px; height: 100%">
<div class="p-2 flex flex-col cashierbox h-full">
<div class="flex">
<div>小区 北境碧桂园小区</div>
<div style="margin: 0 80px">小区 北境碧桂园小区</div>
<div>小区 北境碧桂园小区</div>
<div>小区{{ villageinfo.villageName ?? '---' }}</div>
<div style="margin: 0 80px">住户姓名 {{ props.query.residentName }}</div>
<div>手机号 {{ props.query.phone }}</div>
</div>
<div class="actionsbox">
<el-button type="primary">收款</el-button>
<el-button>添加临时收费</el-button>
<el-button>预存</el-button>
<el-button>打印</el-button>
<el-button type="primary" @click="openDiage">收款</el-button>
<!-- <el-button>添加临时收费</el-button> -->
<!-- <el-button>预存</el-button> -->
<!-- <el-button>打印</el-button> -->
<el-button @click="emit('Back')">返回</el-button>
</div>
<div class="tablebox">
<el-table>
<el-table-column align="center" label="序号" width="80">
<el-table :data="tabledata" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<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>{{ scope.$index }}</div>
<div v-if="scope.row.chargeTypeName === '停车费'">{{ scope.row.parkingName }}</div>
<div v-else-if="scope.row.chargeTypeName === '电费' || scope.row.chargeTypeName === '水费'">{{ scope.row.houseName }}</div>
</template>
</el-table-column>
<el-table-column align="center" label="收费项目">
<template #default="scope">
<div>{{ scope.$index }}</div>
<div>{{ scope.row.chargeItemName }}</div>
</template>
</el-table-column>
<el-table-column align="center" label="收费周期">
<template #default="scope">
<div>{{ scope.$index }}</div>
<div>{{ scope.row.startDate }} -- {{ scope.row.endDate }}</div>
</template>
</el-table-column>
<el-table-column align="center" label="单价">
<template #default="scope">
<div>{{ scope.$index }}</div>
<div>{{ scope.row.fixedPrice }}</div>
</template>
</el-table-column>
<el-table-column align="center" label="数量">
<!-- <el-table-column align="center" label="数量">
<template #default="scope">
<div>{{ scope.$index }}</div>
<div>{{ scope.row.formula }}</div>
</template>
</el-table-column>
<el-table-column align="center" label="应收金额">
<template #default="scope">
<div>{{ scope.$index }}</div>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column align="center" label="缴费状态">
<template #default="scope">
<div>{{ scope.$index }}</div>
<dict-tag v-if="!inglelist.includes(scope.row.chargeItemName)" :options="com_pay_status" :value="scope.row.payStatus"></dict-tag>
<div v-else>--</div>
</template>
</el-table-column>
<el-table-column align="center" label="应缴金额">
<template #default="scope">
<div>{{ scope.$index }}</div>
<div v-if="!inglelist.includes(scope.row.chargeItemName)">{{ scope.row.money ?? '--' }}</div>
<div v-else>--</div>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
</div>
</div>
<!-- 添加或修改电 设备对话框 -->
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
<div class="payinfo">
<div>
<span>缴费人{{ villageinfo.villageName ?? '---' }}-{{ props.query.houseName }}</span>
</div>
<div>
<span>账单名称 </span>
<span style="text-wrap: wrap; text-indent: 2rem">{{ from.billResidentId.join('、 ') }}</span>
</div>
<div>
<span>应收合计{{ from.allCost }}</span>
</div>
<div>
<span>应缴合计{{ from.allCost }}</span>
</div>
</div>
<el-form ref="formRef" :model="from" label-width="100px">
<el-form-item label="费用合计" prop="allCost">
<el-input v-model="from.allCost">
<template #suffix>
<span></span>
</template>
</el-input>
</el-form-item>
<el-form-item label="缴纳状态" prop="payStatus">
<el-radio-group v-model="from.payStatus">
<el-radio v-for="dict in com_pay_status" :key="dict.value" :label="dict.label" :value="dict.value"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="支付方式" prop="payType">
<el-select v-model="from.payType" placeholder="请选择">
<el-option v-for="dict in com_pay_method" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input type="textarea" :rows="5" v-model="from.remark"></el-input>
</el-form-item>
<div class="flex justify-end">
<el-button @click="closepay">取消</el-button>
<el-button :loading="buttonLoading" type="primary" @click="submitForm">提交</el-button>
</div>
</el-form>
</el-dialog>
</el-card>
</template>
<script setup lang="ts">
import { ref } from 'vue';
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 villageinfo = JSON.parse(localStorage.getItem('villageInfo') || '{}');
// 隐藏收费金额的 类型列表
const inglelist = ['电费', '水费'];
type querytype = {
residentId: string;
residentName: string;
houseName: string;
phone: string;
};
const props = defineProps({
query: {
type: Object as PropType<querytype>,
default: () => {
return {
'residentId': '',
'residentName': '',
'houseName': '',
'phone': ''
};
}
}
});
const ids = ref<Array<billlistType>>([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(100);
const queryParams = ref({
pageNum: 1,
pageSize: 10
});
const tabledata = ref([]);
const getList = () => {
console.log('getList');
billQuery({
residentId: props.query.residentId,
payStatus: '0'
}).then((res) => {
tabledata.value = res.rows;
total.value = res.total;
});
};
/** 多选框选中数据 */
const handleSelectionChange = (selection: billlistType[]) => {
// TODO: 获取选中的id
ids.value = [];
ids.value = selection;
console.log(ids.value);
console.log(selection);
single.value = selection.length != 1;
multiple.value = !selection.length;
};
onMounted(() => {
getList();
});
const emit = defineEmits(['Back']);
const formRef = ref();
const dialog = reactive<DialogOption>({
visible: false,
title: '收款'
});
const buttonLoading = ref(false);
const from = ref({
allCost: null, // 金额
billResidentId: [], // 账单id
payStatus: '0', // 0:未缴 1:已缴
payType: '0', // 0:微信 1:支付宝 2 线下
remark: ''
});
const openDiage = () => {
from.value = {
allCost: 0,
payStatus: '0',
billResidentId: ['202505电费', '202505水费'],
payType: '0',
remark: ''
};
// 计算金额
ids.value.forEach((item) => {
from.value.allCost += Number(item.money);
});
dialog.visible = true;
};
const closepay = () => {
dialog.visible = false;
dialog.title = '';
};
const submitForm = () => {
buttonLoading.value = true;
if (from.value.payStatus === '0') {
setTimeout(() => {
buttonLoading.value = false;
closepay();
}, 1000);
} else {
}
};
</script>
<style scoped lang="scss">
@@ -103,4 +238,14 @@ const emit = defineEmits(['Back']);
}
}
}
.payinfo {
color: rgba(0, 0, 0, 1);
margin-top: 20px;
padding-bottom: 10px;
margin-bottom: 30px;
border-bottom: 1px solid #d2d2d2;
& > div {
margin-bottom: 10px;
}
}
</style>

View File

@@ -1,74 +1,194 @@
<template>
<div class="p-2 flex flex-col cashierbox h-full">
<div class="flex">
<div>小区 北境碧桂园小区</div>
<div style="margin: 0 80px">小区 北境碧桂园小区</div>
<div>小区 北境碧桂园小区</div>
</div>
<div class="tablebox">
<el-table>
<el-table-column align="center" label="序号" width="80">
<template #default="scope">
<div>{{ scope.$index }}</div>
</template>
</el-table-column>
<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>{{ scope.$index }}</div>
</template>
</el-table-column>
<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>{{ scope.$index }}</div>
</template>
</el-table-column>
<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>{{ scope.$index }}</div>
</template>
</el-table-column>
<el-table-column align="center" label="缴费状态">
<template #default="scope">
<div>{{ scope.$index }}</div>
</template>
</el-table-column>
<el-card style="margin-top: 20px; height: 100%">
<div class="p-2 flex flex-col cashierbox h-full">
<div class="tablebox">
<el-table :data="tabledata">
<el-table-column type="selection" width="55" align="center" />
<el-table-column align="center" label="序号" width="80">
<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>
</template>
</el-table-column>
<el-table-column align="center" label="收费项目">
<template #default="scope">
<div>{{ scope.row.chargeItemName }}</div>
</template>
</el-table-column>
<el-table-column align="center" label="收费周期">
<template #default="scope">
<div>{{ scope.row.startDate }} -- {{ scope.row.endDate }}</div>
</template>
</el-table-column>
<el-table-column align="center" label="单价">
<template #default="scope">
<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="缴费状态">
<template #default="scope">
<dict-tag :options="com_pay_status" :value="scope.row.payStatus"></dict-tag>
</template>
</el-table-column>
<el-table-column align="center" label="应缴金额">
<template #default="scope">
<div>{{ scope.$index }}</div>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
<el-table-column align="center" label="应缴金额">
<template #default="scope">
<div>{{ scope.row.money }}</div>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
</div>
</div>
</div>
<!-- 添加或修改电 设备对话框 -->
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
<div class="payinfo">
<div>
<span>缴费人北境碧桂园小区-A栋1单元102-张姗</span>
</div>
<div>
<span>账单名称2025年车位费2025年上半年物业费 </span>
</div>
<div>
<span>应收合计1600.00 </span>
</div>
<div>
<span>应缴合计1600.00 </span>
</div>
</div>
<el-form ref="formRef" :model="from" label-width="100px">
<el-form-item label="费用合计" prop="allCost">
<el-input v-model="from.allCost">
<template #suffix>
<span></span>
</template>
</el-input>
</el-form-item>
<el-form-item label="缴纳状态" prop="startTime">
<el-radio-group v-model="from.deviceType">
<el-radio v-for="dict in com_pay_status" :key="dict.value" :label="dict.label"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="支付方式" prop="endTime">
<el-select v-model="from.deviceType" placeholder="请选择">
<el-option v-for="dict in com_pay_method" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input type="textarea" :rows="5" v-model="from.remark"></el-input>
</el-form-item>
<div class="flex justify-end">
<el-button @click="closepay">取消</el-button>
<el-button :loading="buttonLoading" type="primary" @click="submitForm">提交</el-button>
</div>
</el-form>
</el-dialog>
</el-card>
</template>
<script setup lang="ts">
import { ref } from 'vue';
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'));
type querytype = {
residentId: string;
residentName: string;
houseName: string;
phone: string;
};
const props = defineProps({
query: {
type: Object as PropType<querytype>,
default: () => {
return {
'residentId': '',
'residentName': '',
'houseName': '',
'phone': ''
};
}
}
});
const ids = ref<Array<string | number>>([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(100);
const queryParams = ref({
pageNum: 1,
pageSize: 10
});
const tabledata = ref([]);
const getList = () => {
console.log('getList');
billQuery({
residentId: props.query.residentId,
'payStatus': '1'
}).then((res) => {
console.log(res);
tabledata.value = res.rows;
total.value = res.total;
});
};
/** 多选框选中数据 */
const handleSelectionChange = (selection: billlistType[]) => {
// TODO: 获取选中的id
ids.value = selection.map((item) => item.residentId);
single.value = selection.length != 1;
multiple.value = !selection.length;
};
onMounted(() => {
getList();
});
const emit = defineEmits(['Back']);
const formRef = ref();
const dialog = reactive<DialogOption>({
visible: false,
title: '收款'
});
const buttonLoading = ref(false);
const from = ref({
allCost: null,
sex: null,
deviceType: null,
remark: ''
});
const openDiage = () => {
from.value = {
allCost: null,
sex: null,
deviceType: null,
remark: ''
};
dialog.visible = true;
};
const closepay = () => {
dialog.visible = false;
dialog.title = '';
};
const submitForm = () => {
buttonLoading.value = true;
setTimeout(() => {
buttonLoading.value = false;
closepay();
}, 1000);
};
</script>
@@ -92,4 +212,14 @@ const getList = () => {
}
}
}
.payinfo {
color: rgba(0, 0, 0, 1);
margin-top: 20px;
padding-bottom: 10px;
margin-bottom: 30px;
border-bottom: 1px solid #d2d2d2;
& > div {
margin-bottom: 10px;
}
}
</style>

View File

@@ -3,31 +3,34 @@
<Pageheader title="收银台管理"></Pageheader>
<div class="" v-if="isSearch">
<p class="actionsmain">
功能说明可根据住户姓名住户手机号房屋号车位号车牌快速搜索对应的未缴费用修改未缴费用的优惠及滞纳金金额完成对未缴费用的收取
功能说明可根据住户姓名房屋号手机快速搜索对应的未缴费用修改未缴费用的优惠及滞纳金金额完成对未缴费用的收取
</p>
<div class="contanier flex-center">
<div class="h-full flex-1 flex flex-items-start">
<div class="typebox">
<el-select v-model="searchform.type">
<el-select v-model="searchType" @change="handleChangeSearchType">
<el-option v-for="(item, index) in com_cashier_type" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div class="searchBox">
<el-input>
<el-input v-model="searchValue" @keyup.enter="getlist">
<template #suffix>
<el-icon>
<el-icon @click="getlist" class="cursor-pointer">
<Search></Search>
</el-icon>
</template>
</el-input>
<div class="listbox" v-show="Boolean(list.length > 0)">
<div class="listbox" v-if="list.length">
<div class="list_item">
<div class="title">
<DictTag :options="com_cashier_type" :value="searchform.type"></DictTag>
<DictTag :options="com_cashier_type" :value="searchType"></DictTag>
</div>
<div class="list_body">
<div class="list_value" @click="searchclick(item)" v-for="(item, index) in list" :key="index">
{{ item.houseName }}-{{ item.residentName }}-{{ item.phone }}
</div>
</div>
<div class="list_value" v-for="(item, index) in list" :key="index">北境碧桂园小区A栋1单元101-张姗-13899999999</div>
<div class="list_value">北境碧桂园小区A栋1单元101-张姗-13899999999</div>
</div>
</div>
</div>
@@ -36,17 +39,19 @@
</div>
<div v-else style="margin-top: 20px; height: calc(100% - 210px)">
<div class="tabsbox">
<div @click="handleChecout(index)" v-for="(item, index) in tabs" :key="index" class="tabs_item" :class="{ active: checkouttabs === index }">
<div
@click="handleChecout(item.value)"
v-for="(item, index) in tabs"
:key="index"
class="tabs_item"
:class="{ active: checkouttabs === item.value }"
>
{{ item.name }}
</div>
</div>
<div class="h-full">
<el-card style="height: 100%; margin-top: 20px" v-if="checkouttabs === 0">
<cashier @Back="handleBack"></cashier>
</el-card>
<el-card style="height: 100%; margin-top: 20px" shadow="never" v-if="checkouttabs === 1">
<history></history>
</el-card>
<cashier :query="checkeditem" @Back="handleBack" v-if="checkouttabs === 'cashier'"></cashier>
<history :query="checkeditem" v-if="checkouttabs === 'history'"></history>
</div>
</div>
</div>
@@ -59,46 +64,77 @@
// TODO 预存
// TODO 缴费
import { Search } from '@element-plus/icons-vue';
import { ref } from 'vue';
import { Component, DefineComponent, ref } from 'vue';
import cashier from './cashier.vue';
import history from './history.vue';
import { debounce } from '@/utils';
import { cashQuery } from '@/api/system/SdbCashier';
const isSearch = ref(true);
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_cashier_type } = toRefs<any>(proxy?.useDict('com_cashier_type'));
const searchform = ref({
type: '0'
});
const list = ref([]);
const searchform = ref();
const searchValue = ref('');
const searchType = ref('residentName');
function handleChangeSearchType() {
list.value = [];
searchValue.value = '';
}
const list = ref<querytype[]>([]);
// ! ===================================================================================
const checkouttabs = ref(0);
const tabs = [
// 先定义 Tab 项类型
type TabValue = 'cashier' | 'history';
interface TabItem {
name: string;
value: TabValue;
component: Component;
}
const checkouttabs = ref<TabValue>('cashier');
const tabs: TabItem[] = [
{
name: '收银台',
value: 'cashier',
component: cashier
},
{
name: '历史缴费',
value: 'history',
component: history
}
];
function handleChecout(index: number) {
type querytype = {
residentId: string;
residentName: string;
houseName: string;
phone: string;
};
const checkeditem = ref<querytype>({
'residentId': '',
'residentName': '',
'houseName': '',
'phone': ''
});
const searchclick = (row: querytype) => {
checkeditem.value = row;
isSearch.value = false;
handleChecout('cashier');
};
function handleChecout(index: TabValue) {
checkouttabs.value = index;
}
// ! ===================================================================================
// ! ===================================================================================
const total = ref(100);
const queryParams = ref({
pageNum: 1,
pageSize: 10
});
const tableData1 = ref([]);
const getList = () => {
console.log('getList');
};
function getlist() {
console.log('search2');
searchform.value = {};
searchform.value[searchType.value] = searchValue.value;
cashQuery(searchform.value).then((res) => {
list.value = res.data;
});
}
// ! ===================================================================================
const handleBack = () => {
isSearch.value = true;
};
@@ -133,7 +169,7 @@ const handleBack = () => {
}
.actionsmain {
font-size: 0.7rem;
font-size: 0.9rem;
color: #000;
padding-left: 30px;
}
@@ -173,24 +209,35 @@ const handleBack = () => {
min-height: 200px;
font-size: 16px;
.title {
color: rgba(48, 49, 51, 1);
font-size: 1rem;
font-weight: 450;
height: 40px;
line-height: 40px;
border-bottom: 1px solid rgba(204, 204, 204, 1);
}
.list_item {
padding-bottom: 30px;
}
.list_value {
height: 40px;
line-height: 40px;
border-bottom: 1px solid rgba(204, 204, 204, 1);
cursor: pointer;
&:hover {
background-color: #cccccc33;
height: 400px;
display: flex;
overflow: hidden;
flex-direction: column;
.title {
color: rgba(48, 49, 51, 1);
font-size: 1rem;
font-weight: 450;
height: 40px;
line-height: 40px;
border-bottom: 1px solid rgba(204, 204, 204, 1);
}
.list_body {
flex: 1;
overflow: auto;
overflow-x: hidden;
.list_value {
min-height: 40px;
height: 40px;
line-height: 40px;
border-bottom: 1px solid rgba(204, 204, 204, 1);
cursor: pointer;
&:hover {
background-color: #cccccc33;
}
}
}
}
}

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" label-width="100px" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" label-width="100px" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
<!-- <el-form-item label="设备状态" prop="eleStatus">
<el-select v-model="queryParams.eleStatus">
<el-option v-for="(item, index) in com_waterdevice_on_status" :key="index" :label="item.label" :value="item.value"></el-option>
@@ -20,12 +20,12 @@
></el-option>
</el-select>
</el-form-item> -->
<el-form-item label="房号" prop="houseName">
<el-input v-model="queryParams.houseName" placeholder="请输入房间号" clearable @keyup.enter="handleQuery" />
<el-form-item label="房号" prop="houseName">
<el-input v-model="queryParams.houseName" placeholder="请输入" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -35,24 +35,41 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleMarkqrcode" v-hasPermi="['equipment:addqrcode:electricitydevice']"
>批量生成条形码</el-button
>
</el-col>
<el-col :span="1.5">
<!-- <el-button type="success" plain icon="Upload">批量更新固件</el-button> -->
<el-button type="success" plain icon="Upload">批量更新固件</el-button>
</el-col> -->
<el-col :span="1.5">
<div style="font-size: 0.8rem">电表列表</div>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar :show-add="false" :show-edit="false" :show-delete="false">
<template #dropdown>
<!-- <el-dropdown-menu> -->
<el-dropdown-item @click="handleMarkqrcode" v-if="checkPermi(['equipment:addqrcode:electricitydevice'])">
<span>批量生成条形码</span>
</el-dropdown-item>
<!-- </el-dropdown-menu> -->
<!-- <el-dropdown-item v-hasPermi="['equipment:addqrcode:electricitydevice']">
<div @click="handleMarkqrcode">批量更新固件</div>
</el-dropdown-item> -->
</template>
</right-toolbar>
</el-row>
</template>
<el-table v-loading="loading" border :data="ElectricityDeviceList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="电表设备编码" width="250" align="center" prop="deviceCode" />
<el-table-column label="设备编码" width="250" align="center" prop="deviceCode" />
<el-table-column label="设备状态" width="100" align="center" prop="status">
<template #default="scope">
<dict-tag :options="com_waterdevice_on_status" :value="scope.row.status"></dict-tag>
<div class="readRecord" v-if="scope.row.status">
<DictTag :options="com_waterdevice_on_status" :value="scope.row.status"></DictTag>
</div>
<span v-else>---</span>
</template>
</el-table-column>
<el-table-column label="分合状态" width="100" align="center">
@@ -60,23 +77,23 @@
<div class="readRecord" v-if="scope.row.waterRecord">
<DictTag :options="com_electricity_readrecord_status" :value="scope.row.waterRecord.status"></DictTag>
</div>
<span v-else>-----</span>
<span v-else>---</span>
</template>
</el-table-column>
<el-table-column label="房屋" align="center" prop="houseName" />
<el-table-column label="房屋" align="center" prop="houseName" />
<el-table-column label="余额" width="100" align="center" prop="elePrice">
<template #defaul="scope">
<span v-if="scope.row.electricityRecord">{{ scope.row.electricityRecord.balance }}</span>
<span v-else>-----</span>
<span v-else>---</span>
</template>
</el-table-column>
<el-table-column label="条码" width="250" align="center" prop="deleted">
<el-table-column label="条码" width="250" align="center" prop="deleted">
<template #default="scope">
<el-image
v-if="scope.row.url && scope.row.url.includes('http')"
:src="scope.row.url"
:preview-src-list="[scope.row.url]"
style="width: 90px; height: 30px; border-radius: 4px; margin-right: 5px"
style="width: 90%; height: 100%"
fit="cover"
preview-teleported
>
@@ -107,7 +124,7 @@
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-row>
<el-col :span="24" class="flex flex-items-center">
<el-col :span="24" class="flex flex-items-center actions">
<el-button link type="primary" @click="handleRecode(scope.row)" v-hasPermi="['equipment:view:electricitydevice']">充值记录</el-button>
<el-button link type="primary" @click="handleQrCode(scope.row)" v-hasPermi="['equipment:addqrcode:electricitydevice']"
>生成条码</el-button
@@ -127,7 +144,7 @@
type="primary"
@click="handleOpenDialog('UpdateHouse', scope.row)"
v-hasPermi="['equipment:edithouse:electricitydevice']"
>修改</el-button
>绑定房屋</el-button
>
<!-- <el-dropdown style="vertical-align: text-top">
<el-button link type="primary">
@@ -159,7 +176,7 @@
</el-card>
<!-- 添加或修改电 设备对话框 -->
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
<el-form v-if="dialogType === 'usedWater'" ref="UsedWaterformRef" :model="UsedWaterform" label-width="100px">
<el-form v-if="dialogType === 'usedWater'" :rules="rules" ref="UsedWaterformRef" :model="UsedWaterform" label-width="100px">
<el-form-item label="设备编号" prop="deviceCode"> {{ UsedWaterform.deviceCode }} </el-form-item>
<el-form-item label="开始时间" prop="startTime">
<el-date-picker
@@ -245,6 +262,7 @@ import {
import { ElectricityDeviceVO } from '@/api/system/SdbElectricityDevice/type';
import { useHouseStore } from '@/store/modules/house';
import { useUserStore } from '@/store/modules/user';
import { checkPermi } from '@/utils/permission';
import { Upload } from '@element-plus/icons-vue';
import { CascaderValue, tourEmits, UploadProps, UploadRawFile } from 'element-plus';
@@ -275,9 +293,9 @@ const data = reactive({
queryParams: {
pageNum: 1,
pageSize: 10,
deviceCode: undefined,
houseName: undefined,
status: undefined
deviceCode: '',
houseName: '',
status: ''
}
});
@@ -304,6 +322,10 @@ const UsedWaterInfo = ref({
startTime: '',
endTime: ''
});
const rules = {
startTime: [{ required: true, message: '请选择开始时间', trigger: 'blur' }],
endTime: [{ required: true, message: '请选择结束时间', trigger: 'blur' }]
};
// ! =======================================================================================
// ? 上传固件 ==============================================================================================
@@ -418,8 +440,8 @@ const handleOpenDialog = (type: 'usedWater' | 'Upload' | 'UpdateHouse', row: Ele
if (type === 'usedWater') {
UsedWaterform.value.deviceCode = row.deviceCode;
UsedWaterform.value.startTime = new Date().toLocaleString();
UsedWaterform.value.endTime = new Date().toLocaleString();
UsedWaterform.value.startTime = '';
UsedWaterform.value.endTime = '';
usedWaterInfo.value = true;
} else if (type === 'Upload') {
UploadFileform.value.file = '';
@@ -447,6 +469,10 @@ const handleChangeWater = (val: string, row: ElectricityDeviceVO) => {};
/** 提交按钮 */
const submitForm = () => {
if (dialogType.value === 'usedWater') {
if (UsedWaterform.value.startTime === '' || UsedWaterform.value.endTime === '') {
ElMessage.warning('请选择时间');
return;
}
UsedWaterformRef.value?.validate(async (valid: boolean) => {
if (valid) {
buttonLoading.value = true;
@@ -552,6 +578,21 @@ const download = (url: string) => {
</script>
<style lang="scss" scoped>
.actions {
:deep(.el-button > span) {
font-weight: 650;
}
}
:deep(.waterDevice_online) {
color: #3dd4a7;
background: transparent;
border: none;
}
:deep(.waterDevice_offline) {
color: #ee1c25;
background: transparent;
border: none;
}
.el-table {
height: calc(100% - 80px);
}

View File

@@ -3,9 +3,9 @@
<pageheader></pageheader>
<el-card class="flex-1 mt-10px" shadow="never">
<template #header>
<el-row :gutter="10" style="font-size: 0.8rem">
<el-row :gutter="10" 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="4"> {{ housename }} </el-col>
<el-col :span="14"></el-col>
<el-col :span="2">
<el-button @click="confinem">返回</el-button>

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" label-width="100px" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" label-width="100px" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
<!-- <el-form-item label="设备状态" prop="eleStatus">
<el-select v-model="queryParams.eleStatus">
<el-option v-for="(item, index) in com_waterdevice_on_status" :key="index" :label="item.label" :value="item.value"></el-option>
@@ -15,12 +15,12 @@
<el-option v-for="(item, index) in com_water_readrecord_status" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item> -->
<el-form-item label="房间号" prop="houseName">
<el-input v-model="queryParams.houseName" placeholder="请输入房间号" clearable @keyup.enter="handleQuery" />
<el-form-item label="房" prop="houseName">
<el-input v-model="queryParams.houseName" 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-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -29,42 +29,46 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-row :gutter="10" class="mb8 flex-items-center">
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleMarkqrcode" v-hasPermi="['equipment:addqrcode:waterdevice']"
>批量生成条形码</el-button
>
<div style="font-size: 0.8rem">水表列表</div>
</el-col>
<el-col :span="1.5">
<!-- <el-button type="success" plain icon="Upload">批量更新固件</el-button> -->
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar :show-add="false" :show-edit="false" :show-delete="false">
<template #dropdown>
<el-dropdown-item @click="handleMarkqrcode" v-if="checkPermi(['equipment:addqrcode:waterdevice'])">
<span>批量生成条形码</span>
</el-dropdown-item>
<!-- <el-dropdown-item v-hasPermi="['equipment:addqrcode:electricitydevice']">
<div @click="handleMarkqrcode">批量更新固件</div>
</el-dropdown-item> -->
</template>
</right-toolbar>
</el-row>
</template>
<el-table v-loading="loading" border :data="waterDeviceList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="水表设备编码" width="250" align="center" prop="deviceCode" />
<el-table-column label="设备编码" width="250" align="center" prop="deviceCode" />
<el-table-column label="设备状态" width="100" align="center" prop="eleStatus">
<template #default="scope">
<dict-tag v-if="scope.row.waterRecord" :options="com_waterdevice_on_status" :value="scope.row.waterRecord.eleStatus"></dict-tag>
<span v-else>-------</span>
<span v-else>---</span>
</template>
</el-table-column>
<el-table-column label="分合状态" width="100" align="center">
<template #default="scope">
<dict-tag v-if="scope.row.status" :options="com_electricity_readrecord_status" :value="scope.row.waterRecord.status"></dict-tag>
<span v-else>-------</span>
<dict-tag v-if="scope.row.status" :options="com_water_readrecord_status" :value="scope.row.waterRecord.status"></dict-tag>
<span v-else>---</span>
</template>
</el-table-column>
<el-table-column label="房屋" align="center" prop="houseName" />
<el-table-column label="余额" width="120" align="center" prop="deviceCode">
<template #default="scope">
<span v-if="scope.row.waterRecord">{{ scope.row.waterRecord.balance }}</span>
<span v-else>------</span>
<span v-else>---</span>
</template>
</el-table-column>
<el-table-column label="条码" width="250" align="center">
<el-table-column label="条码" width="250" align="center">
<template #default="scope">
<el-image
v-if="scope.row.url && scope.row.url.includes('http')"
@@ -83,7 +87,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.waterRecord ? scope.row.waterRecord.readTime : '---' }}</span>
</template>
</el-table-column>
<!-- <el-table-column width="150" label="启停" align="center" prop="deleted" v-hasPermi="['equipment:isUse:waterdevice']">
@@ -101,9 +105,16 @@
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-row>
<el-col :span="24" class="flex flex-items-center">
<el-col :span="24" class="flex flex-items-center actions">
<el-button link type="primary" @click="handleRecode(scope.row)" v-hasPermi="['equipment:view:waterdevice']">充值记录</el-button>
<el-button link type="primary" @click="handleQrCode(scope.row)" v-hasPermi="['equipment:addqrcode:waterdevice']">生成条码</el-button>
<el-button
link
type="primary"
:loading="loadingQRCode.includes(scope.row.id)"
@click="handleQrCode(scope.row)"
v-hasPermi="['equipment:addqrcode:waterdevice']"
>生成条码</el-button
>
<el-button link type="primary" @click="handleOpenDialog('usedWater', scope.row)" v-hasPermi="['equipment:useWater:waterdevice']"
>用水量</el-button
>
@@ -144,7 +155,7 @@
<!-- 添加或修改水 设备对话框 -->
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
<!-- water -->
<el-form v-if="dialogType === 'usedWater'" ref="UsedWaterformRef" :model="UsedWaterform" label-width="100px">
<el-form v-if="dialogType === 'usedWater'" :rules="rules" ref="UsedWaterformRef" :model="UsedWaterform" label-width="100px">
<el-form-item label="设备编号" prop="deviceCode"> {{ UsedWaterform.deviceCode }} </el-form-item>
<el-form-item label="开始时间" prop="startTime">
<el-date-picker
@@ -260,6 +271,7 @@ import { getHousePathById } from '@/utils/house';
import { Upload } from '@element-plus/icons-vue';
import { CascaderValue, tourEmits, UploadProps, UploadRawFile } from 'element-plus';
import { formatDate } from '@/utils/time';
import { checkPermi } from '@/utils/permission';
const huhao = 3096371295;
const uploadAUrl = import.meta.env.VITE_APP_BASE_API + '/waterDevice/uploadA';
@@ -267,7 +279,7 @@ const uploadBUrl = import.meta.env.VITE_APP_BASE_API + '/waterDevice/uploadB';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_waterdevice_on_status } = toRefs<any>(proxy?.useDict('com_waterdevice_on_status'));
const { com_electricity_readrecord_status } = toRefs<any>(proxy?.useDict('com_electricity_readrecord_status'));
const { com_water_readrecord_status } = toRefs<any>(proxy?.useDict('com_water_readrecord_status'));
const waterDeviceList = ref<WaterDeviceVO[]>([]);
const buttonLoading = ref(false);
@@ -318,6 +330,10 @@ const UsedWaterInfo = ref({
startTime: '',
endTime: ''
});
const rules = {
startTime: [{ required: true, message: '请选择开始时间', trigger: 'blur' }],
endTime: [{ required: true, message: '请选择结束时间', trigger: 'blur' }]
};
// ! =======================================================================================
// ? 上传固件 ==============================================================================================
@@ -383,7 +399,7 @@ const EditHouseform = ref({
/** 批量生成 条形码 */
function handleMarkqrcode() {
if (ids.value.length > 0) {
WaterDeviceMakerQrcode(ids.value).then((res) => {
WaterDeviceMakerQrcode(ids.value).then(() => {
ElMessage.success('批量生成成功');
getList();
});
@@ -403,18 +419,23 @@ const handleSelectionChange = (selection: WaterDeviceVO[]) => {
multiple.value = !selection.length;
};
const loadingQRCode = ref([]);
/** 生成二维码 */
const handleQrCode = (row: WaterDeviceVO) => {
// 1.电表 2.水表
WaterDeviceMakerQrcode([
{
id: row.id,
deviceCode: row.deviceCode
}
]).then(() => {
ElMessage.success('生成成功');
getList();
});
loadingQRCode.value.push(row.id);
setTimeout(() => {
// 1.电表 2.水表
WaterDeviceMakerQrcode([
{
id: row.id,
deviceCode: row.deviceCode
}
]).then(() => {
ElMessage.success('生成成功');
loadingQRCode.value = loadingQRCode.value.filter((item) => item !== row.id);
getList();
});
}, 1000);
};
// * house
const treedata = ref([]);
@@ -444,7 +465,7 @@ const handleOpenDialog = (type: 'usedWater' | 'Upload' | 'UpdateHouse', row: Wat
}
dialog.visible = true;
dialogType.value = type;
dialog.title = type === 'usedWater' ? '用水量' : type === 'UpdateHouse' ? '编辑户号' : '更新固件';
dialog.title = type === 'usedWater' ? '用水量查询' : type === 'UpdateHouse' ? '编辑户号' : '更新固件';
};
function getTree() {
@@ -461,6 +482,10 @@ const handleChangeWater = (val: string, row: WaterDeviceVO) => {};
/** 提交按钮 */
const submitForm = () => {
if (dialogType.value === 'usedWater') {
if (UsedWaterform.value.startTime === '' || UsedWaterform.value.endTime === '') {
ElMessage.warning('请选择时间');
return;
}
UsedWaterformRef.value?.validate(async (valid: boolean) => {
if (valid) {
buttonLoading.value = true;
@@ -570,6 +595,12 @@ const download = (url: string) => {
</script>
<style lang="scss" scoped>
.actions {
:deep(.el-button > span) {
font-weight: 650;
}
}
.example-showcase .el-dropdown + .el-dropdown {
margin-left: 15px;
}
@@ -581,6 +612,16 @@ const download = (url: string) => {
}
.el-table {
height: calc(100% - 80px);
:deep(.waterDevice_online) {
color: #3dd4a7;
background: transparent;
border: none;
}
:deep(.waterDevice_offline) {
color: #ee1c25;
background: transparent;
border: none;
}
}
.usedWaterbox {

View File

@@ -3,7 +3,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="总用电量" prop="totalEnergy">
<el-input v-model="queryParams.totalEnergy" placeholder="请输入总用电量" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -14,8 +14,8 @@
<el-input v-model="queryParams.balance" placeholder="请输入当前余额" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -41,7 +41,7 @@
<el-col :span="1.5">
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['waterRecord:waterRecord:export']">导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar></right-toolbar>
</el-row>
</template>

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="访客状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择访客状态" clearable>
<el-option v-for="dict in com_visitor_status" :key="dict.value" :label="dict.label" :value="dict.value" />
@@ -14,8 +14,8 @@
<el-input v-model="queryParams.visitorName" placeholder="请输入访客姓名" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -45,7 +45,7 @@
</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="handleMain(scope.row)" v-hasPermi="['repair:main:visitor']">访客详情</el-button>
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['visitor:visitor:query']">访客详情</el-button>
</template>
</el-table-column>
</el-table>

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="区域名称" prop="areaName">
<el-input v-model="queryParams.areaName" placeholder="请输入区域名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -12,8 +12,8 @@
<el-input v-model="queryParams.areaCode" placeholder="请输入区域编号" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -23,8 +23,8 @@
<el-card shadow="never" class="flex-1">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['carArea:add:carArea']">新增</el-button>
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['area:area:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['carArea:edit:carArea']"
@@ -35,8 +35,17 @@
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['area:area:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['area:area:add'])"
:show-edit="checkPermi(['area:area:edit'])"
:show-delete="checkPermi(['area:area:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -49,12 +58,8 @@
<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-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['area:area:edit']"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['area:area:remove']"></el-button>
</el-tooltip>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['area:area:edit']">修改</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['area:area:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -68,6 +73,7 @@
import Pageheader from '@/components/Pageheader/index.vue';
import { listArea, getArea, delArea, addArea, updateArea } from '@/api/system/carArea/index';
import { AreaVO, AreaQuery, AreaForm } from '@/api/system/carArea/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const router = useRouter();
@@ -150,10 +156,11 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: AreaVO) => {
const _id = row.id || ids.value[0];
router.push({
path: '/carArea/editCarArea',
query: {
id: row.id
id: _id
}
});
};

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="车牌号" prop="carNum">
<el-input v-model.trim="queryParams.carNum" placeholder="请输入车牌号" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -15,8 +15,8 @@
<el-input v-model.trim="queryParams.carColor" placeholder="请输入车身颜色" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -26,16 +26,25 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['carArea:add:cars']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['carArea:edit:car']">修改</el-button>
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['carArea:edit:car']">编辑</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['car:car:remove']">删除</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['car:car:add'])"
:show-edit="checkPermi(['car:car:edit'])"
:show-delete="checkPermi(['car:car:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -71,6 +80,7 @@ import Pageheader from '@/components/Pageheader/index.vue';
import { listCar, getCar, delCar, addCar, updateCar } from '@/api/system/cars/index';
import { CarVO, CarQuery, CarForm } from '@/api/system/cars/type';
import { listResident } from '@/api/system/resident';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -172,10 +182,11 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: CarVO) => {
const id = row?.id || ids.value[0];
router.push({
path: '/carArea/editCars',
query: {
id: row.id
id: id
}
});
};

View File

@@ -3,7 +3,7 @@
<pageheader></pageheader>
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="search">
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="85px">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true" label-width="85px">
<el-form-item label="客户端key" prop="clientKey">
<el-input v-model="queryParams.clientKey" placeholder="请输入客户端key" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -16,8 +16,8 @@
</el-select>
</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-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</div>

View File

@@ -3,7 +3,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="参数名称" prop="configName">
<el-input v-model="queryParams.configName" placeholder="请输入参数名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -27,8 +27,8 @@
></el-date-picker>
</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-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -54,7 +54,7 @@
<el-button v-hasPermi="['system:config:export']" type="warning" plain icon="Download" @click="handleExport">导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['system:config:remove']" type="danger" plain icon="Refresh" @click="handleRefreshCache">刷新缓存</el-button>
<el-button v-hasPermi="['system:config:remove']" type="danger" plain @click="handleRefreshCache">刷新缓存</el-button>
</el-col>
<right-toolbar v-model:show-search="showSearch" @query-table="getList"></right-toolbar>
</el-row>

View File

@@ -3,7 +3,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="部门名称" prop="deptName">
<el-input v-model="queryParams.deptName" placeholder="请输入部门名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -16,8 +16,8 @@
</el-select>
</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-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>

View File

@@ -32,8 +32,8 @@
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleTypeQuery">搜索</el-button>
<el-button icon="Refresh" @click="handleTypeResetQuery">重置</el-button>
<el-button type="primary" @click="handleTypeQuery">搜索</el-button>
<el-button @click="handleTypeResetQuery">重置</el-button>
</el-form-item>
</el-form>
</div>
@@ -122,8 +122,8 @@
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" :disabled="!hasCurrentDict" @click="handleDataQuery">搜索</el-button>
<el-button icon="Refresh" :disabled="!hasCurrentDict" @click="handleDataResetQuery">重置</el-button>
<el-button type="primary" :disabled="!hasCurrentDict" @click="handleDataQuery">搜索</el-button>
<el-button :disabled="!hasCurrentDict" @click="handleDataResetQuery">重置</el-button>
</el-form-item>
</el-form>
</div>

View File

@@ -5,7 +5,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="设备名称" prop="deviceName">
<el-input v-model="queryParams.deviceName" placeholder="请输入设备名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -13,8 +13,8 @@
<el-input v-model="queryParams.deviceCode" placeholder="请输入设备编号" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -24,7 +24,7 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['equipment:add:archive']">新增</el-button>
</el-col>
<el-col :span="1.5">
@@ -36,8 +36,17 @@
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:device:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['system:device:add'])"
:show-edit="checkPermi(['system:device:edit'])"
:show-delete="checkPermi(['system:device:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
<el-table v-loading="loading" border :data="deviceList" @selection-change="handleSelectionChange">
@@ -56,8 +65,8 @@
<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="handleMain(scope.row)" v-hasPermi="['equipment:main:archive']">查看详情</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['equipment:edit:archive']">修改</el-button>
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['system:device:query']">查看详情</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:device:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:device:remove']">删除</el-button>
</template>
</el-table-column>
@@ -71,6 +80,7 @@
<script setup name="Device" lang="ts">
import { listDevice, getDevice, delDevice, addDevice, updateDevice } from '@/api/system/equipment/archive';
import { DeviceVO, DeviceQuery, DeviceForm } from '@/api/system/equipment/archive/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_equipment_archive_status } = toRefs<any>(proxy?.useDict('com_equipment_archive_status'));

View File

@@ -68,7 +68,7 @@
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleMain(scope.row)">详情</el-button>
<el-button link type="primary" @click="handleEdit(scope.row)">修改</el-button>
<el-button link type="primary" @click="handleEdit(scope.row)">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>

View File

@@ -9,8 +9,8 @@
<el-input v-model="queryParams.categoryName" placeholder="请输入设备分类名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -20,20 +20,29 @@
<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="['equipment:add:deviceCategory']">新增</el-button>
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:deviceCategory:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['equipment:edit:deviceCategory']"
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:deviceCategory:edit']"
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['equipment:delete:deviceCategory']"
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:deviceCategory:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['system:deviceCategory:add'])"
:show-edit="checkPermi(['system:deviceCategory:edit'])"
:show-delete="checkPermi(['system:deviceCategory:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -42,15 +51,15 @@
<el-table-column label="设备分类名称" align="center" prop="categoryName" />
<el-table-column label="状态" align="center" prop="status">
<template #default="scope">
<el-switch inactive-text="停用" :inactive-value="1" :active-value="0" active-text="启用" v-model="scope.row.status"></el-switch>
<el-switch :inactive-value="1" :active-value="0" v-model="scope.row.status"></el-switch>
</template>
</el-table-column>
<el-table-column label="添加时间" align="center" prop="createTime" />
<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="['equipment:edit:deviceCategory']">修改</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['equipment:delete:deviceCategory']">删除</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:deviceCategory:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:deviceCategory:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -85,6 +94,7 @@
<script setup name="DeviceCategory" lang="ts">
import { listDeviceCategory, getDeviceCategory, delDeviceCategory, addDeviceCategory, updateDeviceCategory } from '@/api/system/equipment/Category';
import { DeviceCategoryVO, DeviceCategoryQuery, DeviceCategoryForm } from '@/api/system/equipment/Category/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_equipment_device_category } = toRefs<any>(proxy?.useDict('com_equipment_device_category'));

View File

@@ -12,8 +12,8 @@
<el-input v-model="queryParams.deviceCode" placeholder="请输入设备编号" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -23,7 +23,7 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['equipment:add:repair']">新增</el-button>
</el-col>
<el-col :span="1.5">
@@ -35,8 +35,17 @@
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:deviceRepair:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['system:deviceRepair:add'])"
:show-edit="checkPermi(['system:deviceRepair:edit'])"
:show-delete="checkPermi(['system:deviceRepair:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -61,8 +70,8 @@
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" width="160" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['equipment:main:repair']">详情</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['equipment:edit:repair']">修改</el-button>
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['system:deviceRepair:query']">详情</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:deviceRepair:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:deviceRepair:remove']">删除</el-button>
</template>
</el-table-column>
@@ -76,6 +85,7 @@
<script setup name="DeviceRepair" lang="ts">
import { listDeviceRepair, getDeviceRepair, delDeviceRepair, addDeviceRepair, updateDeviceRepair } from '@/api/system/equipment/Repair';
import { DeviceRepairVO, DeviceRepairQuery, DeviceRepairForm } from '@/api/system/equipment/Repair/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_equipment_repair_status } = toRefs<any>(proxy?.useDict('com_equipment_repair_status'));
@@ -134,15 +144,18 @@ const data = reactive<PageData<DeviceRepairForm, DeviceRepairQuery>>({
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) => {
item.maintainUserNames = item.maintainUserList
.map((i) => i.nickName)
.filter((i) => i)
.join(',');
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;

View File

@@ -3,7 +3,7 @@
<div class="buildingheader flex align-center justify-between">
<div>楼栋</div>
<div>
<span class="pointer" @click="handleAddBuilding" v-hasPermi="['house:add:building']">+增加楼栋</span>
<span class="pointer" @click="handleAddBuilding" v-hasPermi="['building:building:add']">+增加楼栋</span>
</div>
</div>
<ul>
@@ -16,8 +16,8 @@
>
<div class="buildingname" @click="switchBuilding(item.id ?? null)">{{ item.buildingName ?? '' }}</div>
<div class="buildactions flex align-center justify-around">
<el-icon class="pointer hover-color-blue" @click="editBuilding(item.id)" v-hasPermi="['house:edit:building']"><Setting /></el-icon>
<el-icon class="pointer hover-color-red" @click="deleteBuilding(item.id)" v-hasPermi="['house:delete:building']"><Delete /></el-icon>
<el-icon class="pointer hover-color-blue" @click="editBuilding(item.id)" v-hasPermi="['building:building:edit']"><Setting /></el-icon>
<el-icon class="pointer hover-color-red" @click="deleteBuilding(item.id)" v-hasPermi="['building:building:remove']"><Delete /></el-icon>
</div>
</li>
</ul>

View File

@@ -34,14 +34,20 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const router = useRouter();
const menutlist = [
{ label: '编辑', value: 'edit' },
// { label: '编辑', value: 'edit' },
// { label: '收费标准', value: 'money' },
{ label: '详情', value: 'main' }
// { label: '详情', value: 'main' }
];
if (checkPermi(['house:delete:house'])) {
if (checkPermi(['system:house:remove'])) {
menutlist.push({ label: '删除', value: 'delete' });
}
if (checkPermi(['system:house:edit'])) {
menutlist.push({ label: '编辑', value: 'edit' });
}
if (checkPermi(['system:house:query'])) {
menutlist.push({ label: '详情', value: 'main' });
}
function handleChangeCheckhouses(val: string[]) {
houseStore.checkoutHousesFun([]);
houseStore.checkoutHousesFun(val);

View File

@@ -10,9 +10,9 @@
<span class="mr-30px">楼栋结构{{ houseStore.currentBuildingInfo?.buildStructure }} </span>
</div>
<div class="rightActions">
<span class="mr-20px" @click="handleAddHouse" v-hasPermi="['house:add:house']">+增加房屋</span>
<span class="mr-20px" @click="handleAddHouse" v-hasPermi="['system:house:add']">+增加房屋</span>
<!-- <span class="mr-20px">收费标准设置</span> -->
<span @click="deleteAllhouse" v-hasPermi="['house:delete:house']">删除</span>
<span @click="deleteAllhouse" v-hasPermi="['system:house:remove']">删除</span>
</div>
</div>
<div class="UnitBody">

View File

@@ -15,8 +15,8 @@
<el-input v-model="queryParams.rentalName" placeholder="请输入" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</div>
@@ -27,7 +27,7 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['houseRental:houseRental:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
@@ -39,8 +39,17 @@
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['houseRental:houseRental:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['houseRental:houseRental:add'])"
:show-edit="checkPermi(['houseRental:houseRental:edit'])"
:show-delete="checkPermi(['houseRental:houseRental:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -68,7 +77,7 @@
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['houseRental:houseRental:edit']">详情</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['houseRental:houseRental:edit']">修改</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['houseRental:houseRental:query']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['houseRental:houseRental:remove']">删除</el-button>
</template>
</el-table-column>
@@ -83,6 +92,7 @@
import Pageheader from '@/components/Pageheader/index.vue';
import { listHouseRental, delHouseRental } from '@/api/system/houseRental/index';
import { HouseRentalVO, HouseRentalQuery, HouseRentalForm } from '@/api/system/houseRental/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_house_use } = toRefs<any>(proxy?.useDict('com_house_use'));
@@ -199,10 +209,11 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: HouseRentalVO) => {
const id = row.id || ids.value[0];
router.push({
path: '/house/edithouseRental',
query: {
id: row.id
id: id
}
});
};

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="选择日期" prop="statDate">
<el-date-picker
v-model="starDate"
@@ -18,8 +18,8 @@
/>
</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-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -32,7 +32,6 @@
<el-col :span="1.5">
<span style="font-size: 1.2rem">日报列表</span>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</template>

View File

@@ -4,13 +4,13 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="项目名称" prop="itemName">
<el-input v-model="queryParams.itemName" placeholder="请输入项目名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -21,19 +21,26 @@
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['inspection:add:item']">新增</el-button>
<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="['inspection:edit:item']"
>修改</el-button
>
<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 v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['system:item:add'])"
:show-edit="checkPermi(['system:item:edit'])"
:show-delete="checkPermi(['system:item:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -48,19 +55,13 @@
v-model="scope.row.status"
active-value="1"
inactive-value="0"
active-text="关闭"
inactive-text="开启"
></el-switch>
</template>
</el-table-column>
<el-table-column label="操作" width="300" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['inspection:edit:item']"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:item:remove']"></el-button>
</el-tooltip>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:item:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:item:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -73,6 +74,7 @@
<script setup name="Item" lang="ts">
import { listItem, getItem, delItem, addItem, updateItem, updateItemStatus } from '@/api/system/InspectionItem/index';
import { ItemVO, ItemQuery, ItemForm } from '@/api/system/InspectionItem/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="选择日期" prop="itemName">
<el-date-picker
v-model="starDate"
@@ -18,8 +18,8 @@
/>
</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-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -32,7 +32,6 @@
<el-col :span="1.5">
<span style="font-size: 1.2rem">月报列表</span>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</template>

View File

@@ -70,6 +70,7 @@ import { Delete } from '@element-plus/icons-vue';
import { ref } from 'vue';
import AMapLoader from '@amap/amap-jsapi-loader';
import { addPlan, getPlan, updatePlan } from '@/api/system/InspectionPlan';
import { getVillageByIdAPI } from '@/api/system/community';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_inspection_remind_tiime } = toRefs<any>(proxy?.useDict('com_inspection_remind_tiime'));
@@ -204,7 +205,6 @@ function handlChangeMap(val) {
}
}
}
onMounted(async () => {
await nextTick();
window._AMapSecurityConfig = { securityJsCode: '09534b3534d8da53968529a9ce164118' };

View File

@@ -4,13 +4,13 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" label-width="100px" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" label-width="100px" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="巡检计划名称" prop="planName">
<el-input v-model="queryParams.planName" placeholder="请输入巡检计划名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -20,20 +20,27 @@
<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="['inspection:add:plan']">新增</el-button>
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:plan:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['inspection:edit:plan']"
>修改</el-button
>
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:plan:edit']">编辑</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:plan:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['system:plan:add'])"
:show-edit="checkPermi(['system:plan:edit'])"
:show-delete="checkPermi(['system:plan:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -50,12 +57,12 @@
<el-table-column label="计划路线" align="center" prop="routeNames" />
<el-table-column label="状态" width="150" align="center" prop="status">
<template #default="scope">
<el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1" active-text="关闭" inactive-text="开启"></el-switch>
<el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1"></el-switch>
</template>
</el-table-column>
<el-table-column label="操作" width="110" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['inspection:edit:plan']">修改</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:plan:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:plan:remove']">删除</el-button>
</template>
</el-table-column>
@@ -69,6 +76,7 @@
<script setup name="Plan" lang="ts">
import { listPlan, getPlan, delPlan, addPlan, updatePlan } from '@/api/system/InspectionPlan/index';
import { PlanVO, PlanQuery, PlanForm } from '@/api/system/InspectionPlan/type';
import { checkPermi } from '@/utils/permission';
import { numToWeek } from '@/utils/time';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;

View File

@@ -150,7 +150,7 @@ const submitForm = () => {
// 返回
const cancelForm = () => {
router.push({
path: '/inspection/point'
path: '/Inspection/point'
});
};
@@ -170,6 +170,23 @@ onMounted(async () => {
plugins: ['AMap.Scale', 'AMap.Marker']
}).then(async (AMap) => {
const villageinfo = await getVillageByIdAPI(villageid);
AMap.plugin('AMap.Geocoder', function () {
const city = villageinfo.data.city.replaceAll('/', '');
const geocoder = new AMap.Geocoder({
city: city // city 指定进行编码查询的城市支持传入城市名、adcode 和 citycode
});
const address = villageinfo.data.address;
geocoder.getLocation(address, function (status, result) {
if (status === 'complete' && result.info === 'OK') {
// result中对应详细地理坐标信息
map.value.setCenter(result.geocodes[0].location.toArray());
}
});
});
map.value = new AMap.Map('containerMap', {
viewMode: '3D',
zoom: 11,

View File

@@ -4,13 +4,13 @@
<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 label-width="100px" ref="queryFormRef" :model="queryParams" :inline="true">
<el-form label-width="100px" ref="queryFormRef" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
<el-form-item label="巡检点名称" prop="pointName">
<el-input v-model="queryParams.pointName" placeholder="请输入巡检点名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -20,20 +20,27 @@
<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="['inspection:add:point']">新增</el-button>
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:point:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['inspection:edit:point']"
>修改</el-button
>
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:point:edit']">编辑</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:point:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['system:point:add'])"
:show-edit="checkPermi(['system:point:edit'])"
:show-delete="checkPermi(['system:point:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -54,12 +61,8 @@
<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-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['inspection:edit:point']"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:point:remove']"></el-button>
</el-tooltip>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:point:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:point:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -73,6 +76,7 @@
import PageHeader from '@/components/Pageheader/index.vue';
import { listPoint, getPoint, delPoint, addPoint, updatePoint } from '@/api/system/InspectionPoint/index';
import { PointVO, PointQuery, PointForm } from '@/api/system/InspectionPoint/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_inspection_point_status } = toRefs<any>(proxy?.useDict('com_inspection_point_status'));

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="执行状态" prop="status">
<el-select v-model="queryParams.status">
<el-option v-for="item in com_inspection_task_status" :key="item.value" :value="item.value" :label="item.label"></el-option>
@@ -24,8 +24,8 @@
<el-input v-model="queryParams.taskName" placeholder="请输入任务名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -33,11 +33,11 @@
</transition>
<el-card class="flex-1" shadow="never">
<template #header>
<!-- <template #header>
<el-row :gutter="10" class="mb8">
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar ></right-toolbar>
</el-row>
</template>
</template> -->
<el-table v-loading="loading" border :data="recordList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />

View File

@@ -65,6 +65,7 @@ import { addPoint, getPoint, listPoint, updatePoint } from '@/api/system/Inspect
import { onMounted, onUnmounted } from 'vue';
import AMapLoader from '@amap/amap-jsapi-loader';
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'));
@@ -201,7 +202,7 @@ const markers = ref<Record<string, any>>({});
const mouseTool = ref(null);
const drawnPolylines = ref([]); // 存所有线条
const villageid = localStorage.getItem('villageid');
onMounted(async () => {
// 获取巡检点列表
if (!routeid.value) {
@@ -225,7 +226,26 @@ onMounted(async () => {
zoom: 11,
center: [116.397428, 39.90923]
});
const villageinfo = await getVillageByIdAPI(villageid);
AMap.plugin('AMap.Geocoder', function () {
const city = villageinfo.data.city.replaceAll('/', '');
const geocoder = new AMap.Geocoder({
city: city // city 指定进行编码查询的城市支持传入城市名、adcode 和 citycode
});
const address = villageinfo.data.address;
geocoder.getLocation(address, function (status, result) {
if (status === 'complete' && result.info === 'OK') {
// result中对应详细地理坐标信息
map.value.setCenter(result.geocodes[0].location.toArray());
}
});
});
mapReady.value = true;
// 初始化绘图插件 MouseTool
AMap.plugin(['AMap.MouseTool'], () => {
mouseTool.value = new AMap.MouseTool(map.value);
@@ -419,7 +439,7 @@ onUnmounted(() => {
.item {
display: flex;
align-items: center;
margin-right: 20px;
margin-right: 15px;
margin-bottom: 10px;
font-size: 14px;
color: #606266;

View File

@@ -4,13 +4,13 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" label-width="120px" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" label-width="120px" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
<el-form-item label="巡检路线名称" prop="routeName">
<el-input v-model="queryParams.routeName" placeholder="请输入巡检路线名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -20,20 +20,27 @@
<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="['inspection:add:route']">新增</el-button>
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:route:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['inspection:edit:route']"
>修改</el-button
>
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:route:edit']">编辑</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:route:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['system:route:add'])"
:show-edit="checkPermi(['system:route:edit'])"
:show-delete="checkPermi(['system:route:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -56,7 +63,7 @@
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['inspection:edit:route']"></el-button>
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:route:edit']"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:route:remove']"></el-button>
@@ -111,6 +118,7 @@
<script setup name="Route" lang="ts">
import { listRoute, getRoute, delRoute, addRoute, updateRoute } from '@/api/system/InspectionRoute/index';
import { RouteVO, RouteQuery, RouteForm } from '@/api/system/InspectionRoute/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_inspection_route_status } = toRefs<any>(proxy?.useDict('com_inspection_route_status'));

View File

@@ -18,8 +18,8 @@
/>
</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-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -29,7 +29,9 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
<el-col :span="1.5">
<span style="font-size: 1.2rem">统计列表</span>
</el-col>
</el-row>
</template>

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" label-width="100px" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" label-width="100px" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
<el-form-item label="执行状态" prop="taskName">
<el-select v-model="queryParams.status" placeholder="请选择执行状态" clearable>
<el-option v-for="(item, index) in com_inspection_task_status" :key="index" :value="item.value" :label="item.label"></el-option>
@@ -23,8 +23,8 @@
/>
</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-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -34,20 +34,27 @@
<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="['inspection:add:task']">新增</el-button>
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:task:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['inspection:edit:task']"
>修改</el-button
>
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:task:edit']">编辑</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:task:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['system:task:add'])"
:show-edit="checkPermi(['system:task:edit'])"
:show-delete="checkPermi(['system:task:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -70,12 +77,8 @@
<el-table-column label="关联巡检计划" align="center" prop="planId" />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['inspection:edit:task']"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:task:remove']"></el-button>
</el-tooltip>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:task:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:task:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -88,6 +91,7 @@
<script setup name="Task" lang="ts">
import { listTask, getTask, delTask, addTask, updateTask } from '@/api/system/InspectionTask/index';
import { TaskVO, TaskQuery, TaskForm } from '@/api/system/InspectionTask/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_inspection_task_status } = toRefs<any>(proxy?.useDict('com_inspection_task_status'));

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="选择日期" prop="itemName">
<el-date-picker
v-model="starDate"
@@ -18,8 +18,8 @@
/>
</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-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -30,14 +30,13 @@
<template #header>
<el-row :gutter="10">
<el-col :span="1.5">
<span style="font-size: 1.2rem">报列表</span>
<span style="font-size: 1.2rem">报列表</span>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</template>
<el-table v-loading="loading" border :data="itemList">
<el-table-column label="日期" width="100" align="center" prop="statDate" />
<el-table-column label="日期" width="120" align="center" prop="statDate" />
<el-table-column label="计划巡检任务" width="120" align="center" prop="totalPlans" />
<el-table-column label="按时完成" align="center" prop="completedTasks" />
<el-table-column label="超时完成" align="center" prop="outCompletedTasks" />

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="菜单名称" prop="menuName">
<el-input v-model="queryParams.menuName" placeholder="请输入菜单名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -14,8 +14,8 @@
</el-select>
</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-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="公告标题" prop="noticeTitle">
<el-input v-model="queryParams.noticeTitle" placeholder="请输入公告标题" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -17,8 +17,8 @@
</el-select>
</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-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>

View File

@@ -5,7 +5,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="配置key" prop="configKey">
<el-input v-model="queryParams.configKey" placeholder="配置key" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -20,7 +20,7 @@
</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-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>

View File

@@ -5,7 +5,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="文件名" prop="fileName">
<el-input v-model="queryParams.fileName" placeholder="请输入文件名" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -31,7 +31,7 @@
</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-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="车位状态" prop="parkingStatus">
<el-select v-model="queryParams.parkingStatus" placeholder="请选择" clearable>
<el-option v-for="dict in com_parking_status" :key="dict.value" :label="dict.label" :value="dict.value" />
@@ -19,8 +19,8 @@
<el-input v-model="queryParams.parkingCode" placeholder="请输入车位编号" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -30,7 +30,7 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['carArea:add:parking']">新增</el-button>
</el-col>
<el-col :span="1.5">
@@ -42,8 +42,17 @@
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['parking:parking:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['parking:parking:add'])"
:show-edit="checkPermi(['parking:parking:edit'])"
:show-delete="checkPermi(['parking:parking:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -74,9 +83,9 @@
<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" icon="Edit" @click="handleMain(scope.row)" v-hasPermi="['carArea:main:parking']">审核</el-button>
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['carArea:edit:parking']">修改</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['parking:parking:remove']">删除</el-button>
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['parking:parking:query']">审核</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['parking:parking:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['parking:parking:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -90,6 +99,7 @@
import Pageheader from '@/components/Pageheader/index.vue';
import { listParking, getParking, delParking, addParking, updateParking } from '@/api/system/parking/index';
import { ParkingVO, ParkingQuery, ParkingForm } from '@/api/system/parking/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_review } = toRefs<any>(proxy?.useDict('com_review'));
@@ -185,10 +195,11 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: ParkingVO) => {
const _id = row.id || ids.value[0];
router.push({
path: '/carArea/editParking',
query: {
id: row.id
id: _id
}
});
};

View File

@@ -23,7 +23,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="岗位编码" prop="postCode">
<el-input v-model="queryParams.postCode" placeholder="请输入岗位编码" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -55,8 +55,8 @@
</el-select>
</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-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form 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-option v-for="item in com_resident_relationship" :key="item.value" :label="item.label" :value="item.value" />
@@ -16,8 +16,8 @@
</el-select>
</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-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -35,7 +35,7 @@
</div>
<div class="flex-1 h-full">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['resident:resident:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
@@ -47,8 +47,17 @@
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['resident:resident:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['resident:resident:add'])"
:show-edit="checkPermi(['resident:resident:edit'])"
:show-delete="checkPermi(['resident:resident:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
<el-table class="tablebox" v-loading="loading" border :data="residentList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
@@ -68,19 +77,11 @@
<el-table-column label="房间" min-width="120" align="center" prop="houseAddress" />
<el-table-column label="操作" align="center" min-width="120" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button
v-if="scope.row.status !== '1'"
link
type="primary"
icon="Edit"
@click="handleMain(scope.row)"
v-hasPermi="['resident:resident:edit']"
<el-button v-if="scope.row.status !== '1'" link type="primary" @click="handleMain(scope.row)" v-hasPermi="['resident:resident:edit']"
>审核</el-button
>
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['resident:resident:edit']">修改</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['resident:resident:remove']"
>删除
</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['resident:resident:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['resident:resident:remove']">删除 </el-button>
</template>
</el-table-column>
</el-table>
@@ -103,6 +104,7 @@ import { listResident, delResident } from '@/api/system/resident/index';
import { ResidentVO, ResidentQuery, ResidentForm } from '@/api/system/resident/type';
import { getHousePathById } from '@/utils/house';
import { useHouseStore } from '@/store/modules/house';
import { checkPermi } from '@/utils/permission';
const houseStore = useHouseStore();
const currentVilageInfo = ref({
@@ -334,10 +336,11 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: ResidentVO) => {
const _id = row.id || ids.value[0];
router.push({
path: '/house/editResident',
query: {
id: row.id
id: _id
}
});
};

View File

@@ -0,0 +1,310 @@
<template>
<div class="AddBuildingBox">
<PageHeader></PageHeader>
<div class="AddBuildingBody">
<div class="title">基本信息</div>
<div class="addBuildingFormBody formBody">
<el-form ref="roleFormRef" :model="form" :rules="rules" label-width="100px">
<el-form-item label="角色名称" prop="roleName">
<el-input v-model="form.roleName" placeholder="请输入角色名称" />
</el-form-item>
<el-form-item prop="roleKey">
<template #label>
<span>
<el-tooltip content="控制器中定义的权限字符" placement="top">
<el-icon><question-filled /></el-icon>
</el-tooltip>
权限字符
</span>
</template>
<el-input v-model="form.roleKey" placeholder="请输入权限字符" />
</el-form-item>
<el-form-item label="角色顺序" prop="roleSort">
<el-input-number v-model="form.roleSort" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="状态">
<el-radio-group v-model="form.status">
<el-radio v-for="dict in sys_normal_disable" :key="dict.value" :value="dict.value">{{ dict.label }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="菜单权限">
<el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox>
<el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">全选/全不选</el-checkbox>
<el-checkbox v-model="form.menuCheckStrictly" @change="handleCheckedTreeConnect($event, 'menu')">父子联动</el-checkbox>
<el-tree
ref="menuRef"
class="tree-border"
:data="menuOptions"
show-checkbox
node-key="id"
:check-strictly="!form.menuCheckStrictly"
empty-text="加载中请稍候"
:props="{ label: 'label', children: 'children' }"
>
</el-tree>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
</el-form-item>
</el-form>
<div class="dialog-footer text-center">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import api from '@/api/system/user';
import { ref } from 'vue';
import PageHeader from '@/components/Pageheader/index.vue';
import { getCommunitylistAPI } from '@/api/system/community';
import { roleMenuTreeselect, treeselect as menuTreeselect } from '@/api/system/menu/index';
import { addRole, getRole, updateRole } from '@/api/system/role';
import { MenuTreeOption, RoleMenuTree } from '@/api/system/menu/types';
import { DeptTreeOption } from '@/api/system/role/types';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { sys_normal_disable } = toRefs<any>(proxy?.useDict('sys_normal_disable'));
const router = useRouter();
const route = useRoute();
const formRef = ref();
const userid = ref(null);
const menuRef = ref();
const roleFormRef = ref<ElFormInstance>();
const menuOptions = ref<MenuTreeOption[]>([]);
const menuExpand = ref(false);
const menuNodeAll = ref(false);
const form = ref({
roleId: undefined,
roleSort: 1,
status: '0',
roleName: '',
roleKey: '',
menuCheckStrictly: true,
deptCheckStrictly: true,
remark: '',
dataScope: '1',
menuIds: [],
deptIds: []
});
const rules = ref({
roleName: [{ required: true, message: '角色名称不能为空', trigger: 'blur' }],
roleKey: [{ required: true, message: '权限字符不能为空', trigger: 'blur' }],
roleSort: [{ required: true, message: '角色顺序不能为空', trigger: 'blur' }]
});
async function init() {
if (route.query.id) {
const { data } = await getRole(userid.value);
Object.assign(form.value, data);
form.value.roleSort = Number(form.value.roleSort);
const res = await getRoleMenuTreeselect(userid.value);
res.checkedKeys.forEach((v) => {
nextTick(() => {
menuRef.value?.setChecked(v, true, false);
});
});
} else {
getMenuTreeselect();
}
}
/** 查询菜单树结构 */
const getMenuTreeselect = async () => {
const res = await menuTreeselect();
menuOptions.value = res.data;
};
/** 根据角色ID查询菜单树结构 */
const getRoleMenuTreeselect = (roleId: string | number) => {
return roleMenuTreeselect(roleId).then((res): RoleMenuTree => {
menuOptions.value = res.data.menus;
return res.data;
});
};
/** 树权限(展开/折叠)*/
const handleCheckedTreeExpand = (value: boolean, type: string) => {
if (type == 'menu') {
const treeList = menuOptions.value;
for (let i = 0; i < treeList.length; i++) {
if (menuRef.value) {
menuRef.value.store.nodesMap[treeList[i].id].expanded = value;
}
}
} else if (type == 'dept') {
// const treeList = deptOptions.value;
// for (let i = 0; i < treeList.length; i++) {
// if (deptRef.value) {
// deptRef.value.store.nodesMap[treeList[i].id].expanded = value;
// }
// }
}
};
/** 树权限(全选/全不选) */
const handleCheckedTreeNodeAll = (value: any, type: string) => {
if (type == 'menu') {
menuRef.value?.setCheckedNodes(value ? (menuOptions.value as any) : []);
} else if (type == 'dept') {
// deptRef.value?.setCheckedNodes(value ? (deptOptions.value as any) : []);
}
};
/** 树权限(父子联动) */
const handleCheckedTreeConnect = (value: any, type: string) => {
if (type == 'menu') {
form.value.menuCheckStrictly = value;
} else if (type == 'dept') {
// form.value.deptCheckStrictly = value;
}
};
/** 所有菜单节点数据 */
const getMenuAllCheckedKeys = (): any => {
// 目前被选中的菜单节点
const checkedKeys = menuRef.value?.getCheckedKeys();
// 半选中的菜单节点
const halfCheckedKeys = menuRef.value?.getHalfCheckedKeys();
if (halfCheckedKeys) {
checkedKeys?.unshift(...halfCheckedKeys);
}
return checkedKeys;
};
onMounted(() => {
init();
});
// !== 提交 =============================================================================
/** 提交按钮 */
const submitForm = () => {
roleFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
form.value.menuIds = getMenuAllCheckedKeys();
form.value.roleId ? await updateRole(form.value) : await addRole(form.value);
proxy?.$modal.msgSuccess('操作成功');
cancel();
}
});
};
/** 取消按钮 */
const cancel = () => {
cancelForm();
};
// 推出
const cancelForm = () => {
router.back();
};
</script>
<style scoped lang="scss">
.AddBuildingBox {
padding: 15px;
height: 100%;
width: 100%;
}
.AddBuildingBody {
margin-top: 20px;
display: flex;
flex-direction: column;
justify-content: center;
background-color: white;
padding: 15px;
.title {
height: 40px;
line-height: 40px;
padding-left: 20px;
background-color: rgba(255, 255, 255, 1);
color: rgba(16, 16, 16, 1);
border-bottom: 1px solid #bbbbbb;
margin-bottom: 60px;
}
.formBody {
width: 550px;
margin: 0 auto;
.residentBox {
max-height: 400px;
overflow-y: auto;
padding: 10px 5px;
}
.checkoutSideUsesbox {
// display: grid;
// grid-template-columns: repeat(3, 1fr);
// gap: 5px;
display: flex;
flex-wrap: wrap;
align-content: flex-start;
justify-content: space-between;
padding: 10px 5px;
li {
margin-right: 10px;
margin-bottom: 10px;
display: flex;
align-items: center;
justify-content: space-between;
min-width: 240px;
height: 35px;
padding: 0 10px;
line-height: 35px;
background-color: #f3f9ff;
border: 1px solid #8fc0f1;
margin-bottom: 10px;
@media (max-width: 2000px) {
font-size: 12px;
}
@media (max-width: 1650px) {
font-size: 10px;
}
@media (max-width: 1650px) {
font-size: 8px;
}
.el-icon {
margin-left: 20px;
cursor: pointer;
&:hover {
color: red;
}
}
&.add {
cursor: pointer;
justify-content: center;
color: #409eff;
border: 1px dashed #409eff;
background-color: transparent;
&:hover {
background-color: #40a0ff10;
}
span {
margin-left: 10px;
}
}
}
}
&:deep(.el-form-item__content, .el-select, .el-input) {
width: 350px !important;
margin-right: 10px;
.el-cascader {
width: 100%;
}
}
.el-form-item {
margin-bottom: 20px;
align-items: center;
}
.el-button {
width: 80px;
height: 35px;
margin-right: 20px;
}
}
}
</style>

View File

@@ -2,7 +2,7 @@
<div class="p-2">
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="search">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="用户名称" prop="userName">
<el-input v-model="queryParams.userName" placeholder="请输入用户名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -10,8 +10,8 @@
<el-input v-model="queryParams.phonenumber" placeholder="请输入手机号码" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</div>

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="角色名称" prop="roleName">
<el-input v-model="queryParams.roleName" placeholder="请输入角色名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -29,8 +29,8 @@
</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-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -40,19 +40,33 @@
<el-card class="flex-1" shadow="hover">
<template #header>
<el-row :gutter="10">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button v-hasPermi="['system:role:add']" type="primary" plain icon="Plus" @click="handleAdd()">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['system:role:edit']" type="success" plain :disabled="single" icon="Edit" @click="handleUpdate()">修改</el-button>
<el-button v-hasPermi="['system:role:edit']" type="success" plain :disabled="single" icon="Edit" @click="handleUpdate()">编辑</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['system:role:remove']" type="danger" plain :disabled="ids.length === 0" @click="handleDelete()">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['system:role:export']" type="warning" plain icon="Download" @click="handleExport">导出</el-button>
</el-col>
<right-toolbar v-model:show-search="showSearch" @query-table="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['system:role:add'])"
:show-edit="false"
:show-delete="false"
@update:add="handleAdd"
@update:delete="handleDelete()"
>
<template #dropdown>
<el-dropdown-item v-if="checkPermi(['system:role:export'])" @click="handleExport">
<div>导出</div>
</el-dropdown-item>
</template>
</right-toolbar>
</el-row>
</template>
@@ -198,6 +212,7 @@ import { addRole, changeRoleStatus, dataScope, delRole, getRole, listRole, updat
import { roleMenuTreeselect, treeselect as menuTreeselect } from '@/api/system/menu/index';
import { RoleVO, RoleForm, RoleQuery, DeptTreeOption } from '@/api/system/role/types';
import { MenuTreeOption, RoleMenuTree } from '@/api/system/menu/types';
import { checkPermi } from '@/utils/permission';
const router = useRouter();
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -369,6 +384,10 @@ const reset = () => {
/** 添加角色 */
const handleAdd = () => {
router.push({
path: '/system/addRole'
});
return;
reset();
getMenuTreeselect();
dialog.visible = true;
@@ -376,6 +395,14 @@ const handleAdd = () => {
};
/** 修改角色 */
const handleUpdate = async (row?: RoleVO) => {
const roleId2 = row?.roleId || ids.value[0];
router.push({
path: '/system/addRole',
query: {
id: roleId2
}
});
return;
reset();
const roleId = row?.roleId || ids.value[0];
const { data } = await getRole(roleId);

View File

@@ -1,7 +1,7 @@
<template>
<el-row>
<el-dialog v-model="visible" title="选择用户" width="800px" top="5vh" append-to-body>
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="用户名称" prop="userName">
<el-input v-model="queryParams.userName" placeholder="请输入用户名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -9,8 +9,8 @@
<el-input v-model="queryParams.phonenumber" placeholder="请输入手机号码" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row>

View File

@@ -382,7 +382,7 @@ const flowLineOption = shallowRef<EChartsOption>({
}
.searchLabel {
width: 100px;
font-size: 0.8rem;
font-size: 0.95rem;
}
// 入住清空
.cardbox {

View File

@@ -443,7 +443,7 @@ const flowLineOption = shallowRef<EChartsOption>({
}
.searchLabel {
width: 100px;
font-size: 0.8rem;
font-size: 0.95rem;
}
// 入住清空
.cardbox {

View File

@@ -4,13 +4,13 @@
<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 label-width="100" ref="queryFormRef" :model="queryParams" :inline="true">
<el-form label-width="100" ref="queryFormRef" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
<el-form-item label="储藏室号" prop="storeroomNo">
<el-input v-model="queryParams.storeroomNo" placeholder="请输入储藏室号" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -20,7 +20,7 @@
<el-card shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['storeroom:storeroom:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
@@ -32,8 +32,17 @@
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['storeroom:storeroom:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['storeroom:storeroom:add'])"
:show-edit="checkPermi(['storeroom:storeroom:edit'])"
:show-delete="checkPermi(['storeroom:storeroom:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -48,12 +57,8 @@
<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-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['storeroom:storeroom:edit']"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['storeroom:storeroom:remove']"></el-button>
</el-tooltip>
<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>
</template>
</el-table-column>
</el-table>
@@ -68,6 +73,7 @@ import Pageheader from '@/components/Pageheader/index.vue';
import { listStoreroom, getStoreroom, delStoreroom, addStoreroom, updateStoreroom } from '@/api/system/storeroom/index';
import { StoreroomVO, StoreroomQuery, StoreroomForm } from '@/api/system/storeroom/types';
import { getBuildinglists } from '@/api/system/house';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -180,10 +186,11 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: StoreroomVO) => {
const id = row?.id || ids.value[0];
router.push({
path: '/house/EditStoreRoom',
query: {
id: row.id
id: id
}
});
};

View File

@@ -3,7 +3,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="租户编号" prop="tenantId">
<el-input v-model="queryParams.tenantId" placeholder="请输入租户编号" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -17,8 +17,8 @@
<el-input v-model="queryParams.companyName" placeholder="请输入企业名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>

View File

@@ -3,13 +3,13 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="套餐名称" prop="packageName">
<el-input v-model="queryParams.packageName" placeholder="请输入套餐名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>

View File

@@ -6,8 +6,8 @@
<el-input v-model="queryParams.title" placeholder="请输入问卷标题" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" :icon="Search" @click="handleQuery">搜索</el-button>
<el-button :icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" : @click="handleQuery">搜索</el-button>
<el-button :@click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
@@ -16,7 +16,7 @@
<el-col :span="1.5">
<el-button type="primary" plain :icon="Plus" @click="handleAdd">新增问卷</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" />
<right-toolbar />
</el-row>
<!-- 数据表格 -->

View File

@@ -0,0 +1,289 @@
<template>
<div class="AddBuildingBox">
<PageHeader></PageHeader>
<div class="AddBuildingBody">
<div class="title">基本信息</div>
<div class="addBuildingFormBody">
<el-form class="formBody" label-position="right" ref="formRef" :model="form" :rules="rules" label-width="130px">
<el-form-item label="员工姓名" prop="nickName">
<el-input v-model.trim="form.nickName" placeholder="请输入员工姓名" />
</el-form-item>
<el-form-item label="登录账号" prop="userName">
<el-input v-model.trim="form.userName" placeholder="请输入登录账号" />
</el-form-item>
<el-form-item label="登录密码" prop="password">
<el-input v-model.trim="form.password" placeholder="请输入" />
</el-form-item>
<el-form-item label="员工头像" prop="chargeScope"></el-form-item>
<el-form-item label="员工性别" prop="chargeScope">
<el-select v-model="form.sex" placeholder="请选择">
<el-option v-for="dict in sys_user_sex" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="员工角色" prop="roleIds">
<el-select v-model="form.roleIds" multiple>
<el-option v-for="(item, index) in roleOptions" :key="index" :value="item.roleId" :label="item.roleName"></el-option>
</el-select>
</el-form-item>
<el-form-item label="管理小区" prop="checkvillage">
<el-select v-model="checkvillage" multiple @change="handleChangeVillage">
<el-option v-for="(item, index) in vilageList" :key="index" :value="item.villageId" :label="item.villageName"></el-option>
</el-select>
</el-form-item>
<el-form-item label="手机号" prop="phonenumber">
<el-input v-model.trim="form.phonenumber" placeholder="请输入" />
</el-form-item>
<el-form-item label="邮箱" prop="email">
<el-input v-model.trim="form.email" 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>
<el-form-item style="margin-top: 30px">
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button @click="cancelForm">返回</el-button>
</el-form-item>
</el-form>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import api from '@/api/system/user';
import { ref } from 'vue';
import PageHeader from '@/components/Pageheader/index.vue';
import { getCommunitylistAPI } from '@/api/system/community';
import { validator } from '@/utils/Reg';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_bill_charge_period } = toRefs<any>(proxy?.useDict('com_bill_charge_period'));
const { sys_user_sex } = toRefs<any>(proxy?.useDict('sys_user_sex'));
const router = useRouter();
const route = useRoute();
const formRef = ref();
const userid = ref(null);
const form = ref({
'userId': null,
'userName': '', // >= 0 && <= 30 账号
'nickName': '', // >= 0 && <= 30 昵称
// 'userType': '', // 用户类型sys_user系统用户
'villageIds': '', // 管理小区id串
'email': '', // >= 0 && <= 50
'phonenumber': '', // 手机号码
'sex': '', // 0男 1女 2未知
'status': '0', // 0正常 1停用
'password': '', // 密码
'roleIds': [], // 角色组
'remark': ''
});
const rules = ref({
// 员工姓名:必填,长度限制
nickName: [
{ required: true, message: '请输入员工姓名', trigger: 'blur' },
{ min: 1, max: 30, message: '长度在 1 到 30 个字符', trigger: 'blur' }
],
// 登录账号:必填,长度限制,通常建议增加唯一性校验(需后端配合或异步校验)
userName: [
{ required: true, message: '请输入登录账号', trigger: 'blur' },
{ min: 1, max: 30, message: '长度在 1 到 30 个字符', trigger: 'blur' }
],
// 登录密码:必填,新增时必填,编辑时可选(通常逻辑),这里暂按必填处理,建议长度限制
password: [{ min: 5, max: 20, message: '长度在 5 到 20 个字符', trigger: 'blur' }],
roleIds: [{ required: true, message: '请选择员工角色', trigger: 'change' }],
phonenumber: [
{
validator: (_, val) => validator(val, 'phone'),
message: '请输入正确的手机号码',
trigger: 'blur'
}
],
email: [{ type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur' }]
});
// 选择小区
const checkvillage = ref([]);
// 角色列表
const roleOptions = ref([]);
async function init() {
if (route.query.id) {
userid.value = route.query.id;
api.getUser(userid.value).then((res) => {
form.value = {
'userId': res.data.user.userId,
'userName': res.data.user.userName, // >= 0 && <= 30 账号
'nickName': res.data.user.nickName, // >= 0 && <= 30 昵称
'villageIds': res.data.user.villageIds, // 管理小区id串
'status': res.data.user.status, // 0启用 1停用
'email': res.data.user.email, // >= 0 && <= 50
'phonenumber': res.data.user.phonenumber, // 手机号码
'sex': res.data.user.sex, // 0男 1女 2未知
'password': '', // 密码
'roleIds': res.data.roleIds ?? [], // 角色组
'remark': ''
};
roleOptions.value = [];
roleOptions.value = Array.from(new Map([...res.data.roles, ...res.data.user.roles].map((role) => [role.roleId, role])).values());
checkvillage.value = res.data.user.villageIds.split(',').filter((item) => item);
});
} else {
const { data } = await api.getUser();
roleOptions.value = data.roles;
}
}
// 小区列表
const vilageList = ref([]);
/** 查询小区列表 */
const getViliageList = async () => {
const res = await getCommunitylistAPI();
vilageList.value = res.rows;
console.log(vilageList.value);
};
onMounted(() => {
getViliageList();
init();
});
function handleChangeVillage(value: string[]) {
console.log(value);
form.value.villageIds = value.join(',');
}
// !== 提交 =============================================================================
const submitForm = () => {
formRef.value?.validate(async (valid: boolean) => {
if (valid) {
if (userid.value) {
api.updateUser(form.value).then(() => {
ElMessage.success('编辑成功');
cancelForm();
});
} else {
api.addUser(form.value).then(() => {
ElMessage.success('添加成功');
cancelForm();
});
}
}
});
};
// 推出
const cancelForm = () => {
router.back();
};
</script>
<style scoped lang="scss">
.AddBuildingBox {
padding: 15px;
height: 100%;
width: 100%;
}
.AddBuildingBody {
margin-top: 20px;
display: flex;
flex-direction: column;
justify-content: center;
background-color: white;
padding: 15px;
.title {
height: 40px;
line-height: 40px;
padding-left: 20px;
background-color: rgba(255, 255, 255, 1);
color: rgba(16, 16, 16, 1);
border-bottom: 1px solid #bbbbbb;
margin-bottom: 60px;
}
.formBody {
width: 550px;
margin: 0 auto;
.residentBox {
max-height: 400px;
overflow-y: auto;
padding: 10px 5px;
}
.checkoutSideUsesbox {
// display: grid;
// grid-template-columns: repeat(3, 1fr);
// gap: 5px;
display: flex;
flex-wrap: wrap;
align-content: flex-start;
justify-content: space-between;
padding: 10px 5px;
li {
margin-right: 10px;
margin-bottom: 10px;
display: flex;
align-items: center;
justify-content: space-between;
min-width: 240px;
height: 35px;
padding: 0 10px;
line-height: 35px;
background-color: #f3f9ff;
border: 1px solid #8fc0f1;
margin-bottom: 10px;
@media (max-width: 2000px) {
font-size: 12px;
}
@media (max-width: 1650px) {
font-size: 10px;
}
@media (max-width: 1650px) {
font-size: 8px;
}
.el-icon {
margin-left: 20px;
cursor: pointer;
&:hover {
color: red;
}
}
&.add {
cursor: pointer;
justify-content: center;
color: #409eff;
border: 1px dashed #409eff;
background-color: transparent;
&:hover {
background-color: #40a0ff10;
}
span {
margin-left: 10px;
}
}
}
}
&:deep(.el-form-item__content, .el-select, .el-input) {
width: 350px !important;
margin-right: 10px;
.el-cascader {
width: 100%;
}
}
.el-form-item {
margin-bottom: 20px;
align-items: center;
}
.el-button {
width: 80px;
height: 35px;
margin-right: 20px;
}
}
}
</style>

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="员工姓名" prop="nickName">
<el-input v-model="queryParams.nickName" placeholder="请输入员工姓名" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -20,8 +20,8 @@
</el-select>
</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-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -31,7 +31,7 @@
<el-card class="flex-1" shadow="hover">
<template #header>
<el-row :gutter="10">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button v-has-permi="['system:user:add']" type="primary" plain icon="Plus" @click="handleAdd()">新增</el-button>
</el-col>
<el-col :span="1.5">
@@ -53,14 +53,23 @@
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item icon="Download" @click="importTemplate">下载模板</el-dropdown-item>
<!-- 注意 由于el-dropdown-item标签是延迟加载的 所以v-has-permi自定义标签不生效 需要使用v-if调用方法执行 -->
注意 由于el-dropdown-item标签是延迟加载的 所以v-has-permi自定义标签不生效 需要使用v-if调用方法执行
<el-dropdown-item v-if="checkPermi(['system:user:import'])" icon="Top" @click="handleImport">导入数据</el-dropdown-item>
<el-dropdown-item v-if="checkPermi(['system:user:export'])" icon="Download" @click="handleExport">导出数据</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</el-col>
<right-toolbar v-model:show-search="showSearch" :columns="columns" :search="true" @query-table="getList"></right-toolbar>
</el-col> -->
<right-toolbar more-title="更多" v-model:show-search="showSearch" :columns="columns" :search="true" @query-table="getList">
<template #dropdown>
<el-dropdown-item @click="handleUpdate()">修改</el-dropdown-item>
<el-dropdown-item @click="handleDelete()">删除</el-dropdown-item>
<el-dropdown-item @click="importTemplate">下载模板</el-dropdown-item>
<!-- 注意 由于el-dropdown-item标签是延迟加载的 所以v-has-permi自定义标签不生效 需要使用v-if调用方法执行 -->
<el-dropdown-item v-if="checkPermi(['system:user:import'])" @click="handleImport">导入数据</el-dropdown-item>
<el-dropdown-item v-if="checkPermi(['system:user:export'])" @click="handleExport">导出数据</el-dropdown-item>
</template>
</right-toolbar>
</el-row>
</template>
@@ -72,14 +81,7 @@
<el-table-column v-if="columns[4].visible" key="phonenumber" label="手机号码" align="center" prop="phonenumber" width="120" />
<el-table-column v-if="columns[5].visible" key="status" label="状态" align="center">
<template #default="scope">
<el-switch
v-model="scope.row.status"
active-text="启用"
active-value="0"
inactive-value="1"
inactive-text="停用"
@change="handleStatusChange(scope.row)"
></el-switch>
<el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
</template>
</el-table-column>
@@ -251,6 +253,7 @@ import { communitylist_rows_type } from '@/api/system/community/type';
const router = useRouter();
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { sys_normal_disable, sys_user_sex } = toRefs<any>(proxy?.useDict('sys_normal_disable', 'sys_user_sex'));
const userList = ref<UserVO[]>();
const loading = ref(true);
const showSearch = ref(true);
@@ -515,6 +518,10 @@ const cancel = () => {
/** 新增按钮操作 */
const handleAdd = async () => {
router.push({
path: '/system/addUser'
});
return;
reset();
const { data } = await api.getUser();
dialog.visible = true;
@@ -526,8 +533,15 @@ const handleAdd = async () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: UserForm) => {
reset();
const userId = row?.userId || ids.value[0];
router.push({
path: '/system/editUser',
query: {
id: userId
}
});
return;
reset();
const { data } = await api.getUser(userId);
dialog.visible = true;
dialog.title = '修改员工';

View File

@@ -1,6 +1,7 @@
<template>
<div class="p-2">
<el-row :gutter="20">
<Pageheader></Pageheader>
<el-row :gutter="20" class="mt-20px">
<el-col :span="6" :xs="24">
<el-card class="box-card">
<template #header>

View File

@@ -4,7 +4,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form 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>
@@ -15,8 +15,8 @@
<el-input v-model="queryParams.materialName" placeholder="请输入物料名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -26,8 +26,16 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<!-- <el-button type="primary" icon="Plus" @click="handleAdd">添加</el-button> -->
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="false"
:show-edit="checkPermi(['warehouse:edit:inventory'])"
:show-delete="false"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -42,8 +50,7 @@
<el-table-column label="备注" show-overflow-tooltip 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="['warehouse:edit:inventory']">修改</el-button>
<!-- <el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:material:remove']">删除</el-button> -->
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['warehouse:edit:inventory']">编辑</el-button>
</template>
</el-table-column>
</el-table>
@@ -57,6 +64,7 @@
import { delMaterial } from '@/api/system/Tmaterial';
import { MaterialVO, MaterialQuery, MaterialForm } from '@/api/system/Tmaterial/type';
import { listStock } from '@/api/system/Tstock/index';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const router = useRouter();

View File

@@ -4,13 +4,13 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="出库单号" prop="outNo">
<el-input v-model="queryParams.outNo" placeholder="请输入出库单号" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -20,15 +20,23 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['warehouse:add:issueout']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:stockOut:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['system:stockOut:add'])"
:show-edit="false"
:show-delete="checkPermi(['system:stockOut:remove'])"
@update:add="handleAdd"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
<!-- TODO 没有编辑 -->
@@ -47,7 +55,7 @@
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" width="180" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['warehouse:main:stockoutmain']">查看清单</el-button>
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['system:stockOut:query']">查看清单</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:stockOut:remove']">删除</el-button>
</template>
</el-table-column>
@@ -61,6 +69,7 @@
<script setup name="StockOut" lang="ts">
import { listStockOut, getStockOut, delStockOut, addStockOut, updateStockOut } from '@/api/system/TissueOut/index';
import { StockOutVO, StockOutQuery, StockOutForm } from '@/api/system/TissueOut/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_stock_out_status } = toRefs<any>(proxy?.useDict('com_stock_out_status'));
@@ -193,7 +202,7 @@ const submitForm = () => {
/** 删除按钮操作 */
const handleDelete = async (row?: StockOutVO) => {
const _ids = row?.id || ids.value;
await proxy?.$modal.confirm('是否确认删除出库主编号为"' + _ids + '"的数据项').finally(() => (loading.value = false));
await proxy?.$modal.confirm('是否确认删除出库?').finally(() => (loading.value = false));
await delStockOut(_ids);
proxy?.$modal.msgSuccess('删除成功');
await getList();

View File

@@ -4,13 +4,13 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="queryParams.materialName" placeholder="请输入物料名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -20,15 +20,24 @@
<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="['warehouse:add:material']">新增</el-button>
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:material:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:material:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['system:material:add'])"
:show-edit="checkPermi(['system:material:edit'])"
:show-delete="checkPermi(['system:material:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -41,7 +50,7 @@
<el-table-column label="备注" show-overflow-tooltip 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="['warehouse:edit:material']">修改</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:material:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:material:remove']">删除</el-button>
</template>
</el-table-column>
@@ -81,6 +90,7 @@
<script setup name="Material" lang="ts">
import { listMaterial, getMaterial, delMaterial, addMaterial, updateMaterial } from '@/api/system/Tmaterial';
import { MaterialVO, MaterialQuery, MaterialForm } from '@/api/system/Tmaterial/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const router = useRouter();
@@ -178,10 +188,11 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: MaterialVO) => {
const _id = row?.id || ids.value[0];
router.push({
path: '/warehouse/editMaterial',
query: {
id: row.id
id: _id
}
});
};

View File

@@ -4,13 +4,13 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="入库单号" prop="inNo">
<el-input v-model="queryParams.inNo" placeholder="请输入入库单号" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -20,10 +20,19 @@
<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="['warehouse:add:purchasein']">新增</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:stockIn:add']">新增</el-button>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['system:stockIn:add'])"
:show-edit="checkPermi(['system:stockIn:edit'])"
:show-delete="checkPermi(['system:stockIn:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -42,8 +51,8 @@
<el-table-column label="备注" show-overflow-tooltip align="center" prop="remark" />
<el-table-column label="操作" width="200" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['warehouse:main:purchasein']">查看清单</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['warehouse:edit:purchasein']">修改</el-button>
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['system:stockIn:query']">查看清单</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:stockIn:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:stockIn:remove']">删除</el-button>
</template>
</el-table-column>
@@ -56,6 +65,7 @@
<script setup name="StockIn" lang="ts">
import { listStockIn, getStockIn, delStockIn, addStockIn, updateStockIn } from '@/api/system/TPurchaseIn';
import { StockInVO, StockInQuery, StockInForm } from '@/api/system/TPurchaseIn/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_stock_in_status } = toRefs<any>(proxy?.useDict('com_stock_in_status'));
@@ -161,10 +171,11 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: StockInVO) => {
const _id = row?.id || ids.value[0];
router.push({
path: '/warehouse/editPurchaseIn',
query: {
id: row.id
id: _id
}
});
};

View File

@@ -4,13 +4,13 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" label-width="100px" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" label-width="100px" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
<el-form-item label="供应商名称" prop="supplierName">
<el-input v-model="queryParams.supplierName" placeholder="请输入供应商名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -20,15 +20,24 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['warehouse:add:supplier']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:supplier:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['system:supplier:add'])"
:show-edit="checkPermi(['system:supplier:edit'])"
:show-delete="checkPermi(['system:supplier:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -42,7 +51,7 @@
<el-table-column label="备注" show-overflow-tooltip 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="['warehouse:edit:supplier']">修改</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:supplier:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:supplier:remove']">删除</el-button>
</template>
</el-table-column>
@@ -85,6 +94,7 @@
<script setup name="Supplier" lang="ts">
import { listSupplier, getSupplier, delSupplier, addSupplier, updateSupplier } from '@/api/system/Tsupplier/index';
import { SupplierVO, SupplierQuery, SupplierForm } from '@/api/system/Tsupplier/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -186,10 +196,11 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: SupplierVO) => {
const _ids = row?.id || ids.value[0];
router.push({
path: '/warehouse/editSupplier',
query: {
id: row.id
id: _ids
}
});
};

View File

@@ -4,13 +4,13 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" label-width="100px" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" label-width="100px" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
<el-form-item label="仓库名称" prop="warehouseName">
<el-input v-model="queryParams.warehouseName" placeholder="请输入仓库名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -20,15 +20,24 @@
<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="['warehouse:add:warehouse']">新增</el-button>
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:warehouse:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:warehouse:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
:show-add="checkPermi(['system:warehouse:add'])"
:show-edit="checkPermi(['system:warehouse:edit'])"
:show-delete="checkPermi(['system:warehouse:remove'])"
@update:add="handleAdd"
@update:edit="handleUpdate()"
@update:delete="handleDelete()"
></right-toolbar>
</el-row>
</template>
@@ -44,17 +53,15 @@
@change="(val: string) => handleChangeSwitch(val, scope.row)"
v-model="scope.row.status"
active-value="0"
active-text="启用"
inactive-value="1"
inactive-text="禁用"
></el-switch>
</template>
</el-table-column>
<el-table-column label="备注" width="80" 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" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['warehouse:edit:warehouse']">修改</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:warehouse:remove']">删除</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:warehouse:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:warehouse:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -96,6 +103,7 @@
<script setup name="Warehouse" lang="ts">
import { listWarehouse, getWarehouse, delWarehouse, addWarehouse, updateWarehouse } from '@/api/system/Twarehouse/index';
import { WarehouseVO, WarehouseQuery, WarehouseForm } from '@/api/system/Twarehouse/type';
import { checkPermi } from '@/utils/permission';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -201,10 +209,11 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: WarehouseVO) => {
const _ids = row?.id || ids.value[0];
router.push({
path: '/warehouse/editWarehouse',
query: {
id: row.id
id: _ids
}
});
};

View File

@@ -1,7 +1,7 @@
<template>
<!-- 导入表 -->
<el-dialog v-model="visible" title="导入表" width="1100px" top="5vh" append-to-body>
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="数据源" prop="dataName">
<el-select v-model="queryParams.dataName" filterable placeholder="请选择/输入数据源名称">
<el-option v-for="item in dataNameList" :key="item" :label="item" :value="item"> </el-option>
@@ -14,8 +14,8 @@
<el-input v-model="queryParams.tableComment" placeholder="请输入表描述" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row>

View File

@@ -3,7 +3,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="数据源" prop="dataName">
<el-select v-model="queryParams.dataName" filterable clearable placeholder="请选择/输入数据源名称">
<el-option key="" label="全部" value="" />
@@ -27,8 +27,8 @@
></el-date-picker>
</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-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -45,7 +45,7 @@
<el-button v-hasPermi="['tool:gen:import']" type="info" plain icon="Upload" @click="openImportTable">导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['tool:gen:edit']" type="success" plain icon="Edit" :disabled="single" @click="handleEditTable()">修改</el-button>
<el-button v-hasPermi="['tool:gen:edit']" type="success" plain icon="Edit" :disabled="single" @click="handleEditTable()">编辑</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['tool:gen:remove']" type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()">
@@ -58,25 +58,21 @@
<el-table v-loading="loading" border :data="tableList" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"></el-table-column>
<el-table-column label="序号" type="index" width="50" align="center">
<!-- <el-table-column label="序号" type="index" width="50" align="center">
<template #default="scope">
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="数据源" align="center" prop="dataName" :show-overflow-tooltip="true" />
<el-table-column label="表名称" align="center" prop="tableName" :show-overflow-tooltip="true" />
<el-table-column label="表描述" width="350" align="center" prop="tableComment" :show-overflow-tooltip="true" />
<el-table-column label="实体" width="350" align="center" prop="className" :show-overflow-tooltip="true" />
<el-table-column label="创建时间" align="center" prop="createTime" />
<el-table-column label="更新时间" align="center" prop="updateTime" />
<el-table-column label="实体" width="200" align="center" prop="className" :show-overflow-tooltip="true" />
<!-- <el-table-column label="创建时间" align="center" prop="createTime" /> -->
<!-- <el-table-column label="更新时间" align="center" prop="updateTime" /> -->
<el-table-column label="操作" align="center" width="400" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="预览" placement="top">
<el-button v-hasPermi="['tool:gen:preview']" link type="primary" icon="View" @click="handlePreview(scope.row)"></el-button>
</el-tooltip>
<el-tooltip content="编辑" placement="top">
<el-button v-hasPermi="['tool:gen:edit']" link type="primary" icon="Edit" @click="handleEditTable(scope.row)"></el-button>
</el-tooltip>
<el-button v-hasPermi="['tool:gen:preview']" link type="primary" icon="View" @click="handlePreview(scope.row)">预览</el-button>
<el-button v-hasPermi="['tool:gen:edit']" link type="primary" icon="Edit" @click="handleEditTable(scope.row)">编辑</el-button>
<el-tooltip content="删除" placement="top">
<el-button v-hasPermi="['tool:gen:remove']" link type="primary" icon="Delete" @click="handleDelete(scope.row)"></el-button>
</el-tooltip>
@@ -137,7 +133,7 @@ const importRef = ref<InstanceType<typeof ImportTable>>();
const queryParams = ref<TableQuery>({
pageNum: 1,
pageSize: 10,
pageSize: 20,
tableName: '',
tableComment: '',
dataName: ''
@@ -148,7 +144,7 @@ const preview = ref<{
activeName: string;
}>({
data: {},
activeName: 'domain.java'
activeName: 'index.vue'
});
const dialog = reactive<DialogOption>({
visible: false,
@@ -210,7 +206,7 @@ const handlePreview = async (row: TableVO) => {
const res = await previewTable(row.tableId);
preview.value.data = res.data;
dialog.visible = true;
preview.value.activeName = 'domain.java';
preview.value.activeName = 'index.vue';
};
/** 复制代码成功 */
const copyTextSuccess = () => {

View File

@@ -680,7 +680,7 @@ async function deleteFun(row) {
margin-left: 20px;
display: flex;
align-items: center;
padding: 0 35px;
padding: 0 2rem;
background: #036aff;
border-radius: 16px 16px 16px 16px;
margin-bottom: 20px;
@@ -691,11 +691,11 @@ async function deleteFun(row) {
height: 70px;
}
.villageinfo {
margin-left: 30px;
margin-left: 20px;
.villagename {
height: 30px;
font-weight: 500;
font-size: 1.55rem;
font-size: 1.2rem;
color: #ffffff;
line-height: 30px;
}
@@ -703,7 +703,7 @@ async function deleteFun(row) {
margin-top: 5px;
height: 23px;
font-weight: 400;
font-size: 18px;
font-size: 1.1rem;
color: #ffffff;
line-height: 23px;
display: flex;

View File

@@ -2,13 +2,13 @@
<div class="p-2">
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="search">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="分类名称" prop="categoryName">
<el-input v-model="queryParams.categoryName" placeholder="请输入分类名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</div>
@@ -23,7 +23,7 @@
<el-col :span="1.5">
<el-button type="info" plain icon="Sort" @click="handleToggleExpandAll">展开/折叠</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar></right-toolbar>
</el-row>
</template>
<el-table

View File

@@ -2,7 +2,7 @@
<div class="p-2">
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="search">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="请假天数" prop="startLeaveDays">
<el-input v-model="queryParams.startLeaveDays" placeholder="请输入请假天数" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -11,8 +11,8 @@
<el-input v-model="queryParams.endLeaveDays" placeholder="请输入请假天数" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</div>

View File

@@ -31,8 +31,8 @@
<el-input v-model="queryParams.flowCode" placeholder="请输入流程定义编码" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -45,16 +45,24 @@
<el-button v-hasPermi="['workflow:definition:add']" type="primary" icon="Plus" @click="handleAdd()">添加</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['workflow:definition:edit']" type="success" icon="Edit" :disabled="single" @click="handleUpdate()">修改</el-button>
<el-button v-hasPermi="['workflow:definition:edit']" type="success" icon="Edit" :disabled="single" @click="handleUpdate()"
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['workflow:definition:remove']" type="danger" icon="Delete" :disabled="multiple" @click="handleDelete()">删除</el-button>
<el-button v-hasPermi="['workflow:definition:remove']" type="danger" icon="Delete" :disabled="multiple" @click="handleDelete()"
>删除</el-button
>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['workflow:definition:import']" type="primary" icon="UploadFilled" @click="uploadDialog.visible = true">部署流程文件</el-button>
<el-button v-hasPermi="['workflow:definition:import']" type="primary" icon="UploadFilled" @click="uploadDialog.visible = true"
>部署流程文件</el-button
>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['workflow:definition:export']" type="warning" icon="Download" :disabled="single" @click="handleExportDef">导出</el-button>
<el-button v-hasPermi="['workflow:definition:export']" type="warning" icon="Download" :disabled="single" @click="handleExportDef"
>导出</el-button
>
</el-col>
<right-toolbar v-model:show-search="showSearch" @query-table="handleQuery"></right-toolbar>
</el-row>
@@ -93,21 +101,61 @@
<template #default="scope">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button v-hasPermi="['workflow:definition:remove']" link type="primary" size="small" icon="Delete" @click="handleDelete(scope.row)">删除流程</el-button>
<el-button
v-hasPermi="['workflow:definition:remove']"
link
type="primary"
size="small"
icon="Delete"
@click="handleDelete(scope.row)"
>删除流程</el-button
>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['workflow:definition:copy']" link type="primary" size="small" icon="CopyDocument" @click="handleCopyDef(scope.row)">复制流程</el-button>
<el-button
v-hasPermi="['workflow:definition:copy']"
link
type="primary"
size="small"
icon="CopyDocument"
@click="handleCopyDef(scope.row)"
>复制流程</el-button
>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button v-hasPermi="['workflow:definition:query']" link type="primary" v-if="scope.row.isPublish === 0" icon="Pointer" size="small" @click="design(scope.row)"
<el-button
v-hasPermi="['workflow:definition:query']"
link
type="primary"
v-if="scope.row.isPublish === 0"
icon="Pointer"
size="small"
@click="design(scope.row)"
>流程设计</el-button
>
<el-button v-hasPermi="['workflow:definition:query']" link type="primary" v-else icon="View" size="small" @click="designView(scope.row)">查看流程</el-button>
<el-button
v-hasPermi="['workflow:definition:query']"
link
type="primary"
v-else
icon="View"
size="small"
@click="designView(scope.row)"
>查看流程</el-button
>
</el-col>
<el-col v-if="scope.row.isPublish !== 1" :span="1.5">
<el-button v-hasPermi="['workflow:definition:publish']" link type="primary" size="small" icon="CircleCheck" @click="handlePublish(scope.row)">发布流程</el-button>
<el-button
v-hasPermi="['workflow:definition:publish']"
link
type="primary"
size="small"
icon="CircleCheck"
@click="handlePublish(scope.row)"
>发布流程</el-button
>
</el-col>
</el-row>
</template>

View File

@@ -23,7 +23,7 @@
<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 v-show="showSearch" ref="queryFormRef" :model="queryParams" :inline="true">
<el-form v-show="showSearch" ref="queryFormRef" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
<el-form-item>
<el-badge :value="userSelectCount" :max="10" class="item">
<el-button type="primary" @click="openUserSelect">选择申请人</el-button>
@@ -39,8 +39,8 @@
<el-input v-model="queryParams.flowCode" placeholder="请输入流程定义编码" @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -50,7 +50,9 @@
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button v-hasPermi="['workflow:instance:remove']" type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete">删除</el-button>
<el-button v-hasPermi="['workflow:instance:remove']" type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete"
>删除</el-button
>
</el-col>
<right-toolbar v-model:show-search="showSearch" @query-table="handleQuery"></right-toolbar>
</el-row>
@@ -75,7 +77,14 @@
<el-table-column align="center" prop="version" label="版本号" width="90">
<template #default="scope"> v{{ scope.row.version }}.0</template>
</el-table-column>
<el-table-column v-if="tab === 'running'" v-hasPermi="['workflow:instance:active']" align="center" prop="isSuspended" label="状态" min-width="70">
<el-table-column
v-if="tab === 'running'"
v-hasPermi="['workflow:instance:active']"
align="center"
prop="isSuspended"
label="状态"
min-width="70"
>
<template #default="scope">
<el-tag v-if="!scope.row.isSuspended" type="success">激活</el-tag>
<el-tag v-else type="danger">挂起</el-tag>
@@ -104,15 +113,27 @@
</el-popover>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['workflow:instance:remove']" type="danger" size="small" icon="Delete" @click="handleDelete(scope.row)">删除 </el-button>
<el-button v-hasPermi="['workflow:instance:remove']" type="danger" size="small" icon="Delete" @click="handleDelete(scope.row)"
>删除
</el-button>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button v-hasPermi="['workflow:instance:query']" type="primary" size="small" icon="View" @click="handleView(scope.row)">查看</el-button>
<el-button v-hasPermi="['workflow:instance:query']" type="primary" size="small" icon="View" @click="handleView(scope.row)"
>查看</el-button
>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['workflow:instance:variableQuery']" type="primary" size="small" icon="Document" @click="handleInstanceVariable(scope.row)"> 变量 </el-button>
<el-button
v-hasPermi="['workflow:instance:variableQuery']"
type="primary"
size="small"
icon="Document"
@click="handleInstanceVariable(scope.row)"
>
变量
</el-button>
</el-col>
</el-row>
</template>

View File

@@ -3,7 +3,7 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
<el-form-item label="组件名称" prop="componentName">
<el-input v-model="queryParams.componentName" placeholder="请输入组件名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
@@ -11,8 +11,8 @@
<el-input v-model="queryParams.methodName" placeholder="请输入方法名" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -26,12 +26,16 @@
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['workflow:spel:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['workflow:spel:edit']">修改</el-button>
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['workflow:spel:edit']"
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['workflow:spel:remove']">删除</el-button>
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['workflow:spel:remove']"
>删除</el-button
>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar></right-toolbar>
</el-row>
</template>
@@ -179,10 +183,10 @@ const initFormData: SpelForm = {
methodParams: undefined,
viewSpel: undefined,
status: '0',
remark: undefined,
}
remark: undefined
};
const data = reactive<PageData<SpelForm, SpelQuery>>({
form: {...initFormData},
form: { ...initFormData },
queryParams: {
pageNum: 1,
pageSize: 10,
@@ -191,13 +195,10 @@ const data = reactive<PageData<SpelForm, SpelQuery>>({
methodParams: undefined,
viewSpel: undefined,
status: '0',
params: {
}
params: {}
},
rules: {
status: [
{ required: true, message: "状态不能为空", trigger: "change" }
],
status: [{ required: true, message: '状态不能为空', trigger: 'change' }]
}
});
@@ -210,55 +211,55 @@ const getList = async () => {
spelList.value = res.rows;
total.value = res.total;
loading.value = false;
}
};
/** 取消按钮 */
const cancel = () => {
reset();
dialog.visible = false;
}
};
/** 表单重置 */
const reset = () => {
form.value = {...initFormData};
form.value = { ...initFormData };
spelFormRef.value?.resetFields();
}
};
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.value.pageNum = 1;
getList();
}
};
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value?.resetFields();
handleQuery();
}
};
/** 多选框选中数据 */
const handleSelectionChange = (selection: SpelVO[]) => {
ids.value = selection.map(item => item.id);
ids.value = selection.map((item) => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
};
/** 新增按钮操作 */
const handleAdd = () => {
reset();
dialog.visible = true;
dialog.title = "添加流程spel表达式定义";
}
dialog.title = '添加流程spel表达式定义';
};
/** 修改按钮操作 */
const handleUpdate = async (row?: SpelVO) => {
reset();
const _id = row?.id || ids.value[0]
const _id = row?.id || ids.value[0];
const res = await getSpel(_id);
Object.assign(form.value, res.data);
dialog.visible = true;
dialog.title = "修改流程spel表达式定义";
}
dialog.title = '修改流程spel表达式定义';
};
/** 提交按钮 */
const submitForm = () => {
@@ -266,25 +267,25 @@ const submitForm = () => {
if (valid) {
buttonLoading.value = true;
if (form.value.id) {
await updateSpel(form.value).finally(() => buttonLoading.value = false);
await updateSpel(form.value).finally(() => (buttonLoading.value = false));
} else {
await addSpel(form.value).finally(() => buttonLoading.value = false);
await addSpel(form.value).finally(() => (buttonLoading.value = false));
}
proxy?.$modal.msgSuccess("操作成功");
proxy?.$modal.msgSuccess('操作成功');
dialog.visible = false;
await getList();
}
});
}
};
/** 删除按钮操作 */
const handleDelete = async (row?: SpelVO) => {
const _ids = row?.id || ids.value;
await proxy?.$modal.confirm('是否确认删除流程spel表达式定义编号为"' + _ids + '"的数据项?').finally(() => loading.value = false);
await proxy?.$modal.confirm('是否确认删除流程spel表达式定义编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
await delSpel(_ids);
proxy?.$modal.msgSuccess("删除成功");
proxy?.$modal.msgSuccess('删除成功');
await getList();
}
};
/** 控制是否显示 viewSpel 输入框 */
const showViewSpelInput = ref(false);
@@ -302,9 +303,10 @@ const updateViewSpel = () => {
// 替换变量值:只有参数存在,组件和方法都不存在
if (!comp && !method && paramStr) {
const paramList = paramStr.split(',')
.map(p => p.trim())
.filter(p => p.length > 0);
const paramList = paramStr
.split(',')
.map((p) => p.trim())
.filter((p) => p.length > 0);
if (paramList.length === 1) {
form.value.viewSpel = `\${${paramList[0]}}`;
@@ -322,23 +324,19 @@ const updateViewSpel = () => {
if (paramStr) {
// 分割并过滤掉空参数
paramList = paramStr.split(',')
.map(p => p.trim())
.filter(p => p.length > 0);
paramList = paramStr
.split(',')
.map((p) => p.trim())
.filter((p) => p.length > 0);
}
const paramPart = paramList.length > 0
? '(' + paramList.map(p => `#${p}`).join(',') + ')'
: '()';
const paramPart = paramList.length > 0 ? '(' + paramList.map((p) => `#${p}`).join(',') + ')' : '()';
form.value.viewSpel = `#{@${comp}.${method}${paramPart}}`;
};
/** 监听所有字段变化 */
watch(
() => [form.value.componentName, form.value.methodName, form.value.methodParams],
updateViewSpel
);
watch(() => [form.value.componentName, form.value.methodName, form.value.methodParams], updateViewSpel);
onMounted(() => {
getList();
@@ -352,9 +350,9 @@ onMounted(() => {
border-radius: 4px;
color: #333;
font-family: monospace; /* 等宽字体更清晰 */
white-space: nowrap; /* 禁止换行 */
overflow-x: auto; /* 超出宽度时显示水平滚动条 */
min-height: 36px; /* 与 el-input 高度对齐 */
white-space: nowrap; /* 禁止换行 */
overflow-x: auto; /* 超出宽度时显示水平滚动条 */
min-height: 36px; /* 与 el-input 高度对齐 */
line-height: 1.5;
}
</style>

View File

@@ -3,7 +3,7 @@
<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 v-show="showSearch" ref="queryFormRef" :model="queryParams" :inline="true">
<el-form v-show="showSearch" ref="queryFormRef" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
<el-form-item>
<el-badge :value="userSelectCount" :max="10" class="item">
<el-button type="primary" @click="openUserSelect">选择申请人</el-button>
@@ -16,8 +16,8 @@
<el-input v-model="queryParams.flowName" placeholder="请输入流程定义名称" @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -27,10 +27,22 @@
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5" v-if="tab === 'waiting'">
<el-button class="todo-action-btn todo-action-btn--primary" type="primary" plain icon="Edit" :disabled="multiple" @click="handleUserOpen()"
<el-button
class="todo-action-btn todo-action-btn--primary"
type="primary"
plain
icon="Edit"
:disabled="multiple"
@click="handleUserOpen()"
>修改办理人
</el-button>
<el-button class="todo-action-btn todo-action-btn--warning" type="warning" plain icon="Bell" :disabled="multiple" @click="handleUrgeTaskOpen()"
<el-button
class="todo-action-btn todo-action-btn--warning"
type="warning"
plain
icon="Bell"
:disabled="multiple"
@click="handleUrgeTaskOpen()"
>催办
</el-button>
</el-col>

View File

@@ -23,13 +23,13 @@
<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 v-show="showSearch" ref="queryFormRef" :model="queryParams" :inline="true" label-width="120px">
<el-form v-show="showSearch" ref="queryFormRef" @submit.prevent="handleQuery" :model="queryParams" :inline="true" label-width="120px">
<el-form-item label="流程定义编码" prop="flowCode">
<el-input v-model="queryParams.flowCode" placeholder="请输入流程定义编码" @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>

View File

@@ -3,7 +3,7 @@
<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 v-show="showSearch" ref="queryFormRef" :model="queryParams" :inline="true">
<el-form v-show="showSearch" ref="queryFormRef" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
<el-form-item label="任务名称" prop="nodeName">
<el-input v-model="queryParams.nodeName" placeholder="请输入任务名称" @keyup.enter="handleQuery" />
</el-form-item>
@@ -14,8 +14,8 @@
<el-input v-model="queryParams.flowCode" placeholder="请输入流程定义编码" @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>

Some files were not shown because too many files have changed in this diff Show More