物业之前,新工作台
@@ -13,10 +13,10 @@ VITE_APP_BASE_API = '/dev-api'
|
||||
VITE_APP_CONTEXT_PATH = '/'
|
||||
|
||||
# 监控地址
|
||||
VITE_APP_MONITOR_ADMIN = 'http://192.168.0.222/admin/applications'
|
||||
VITE_APP_MONITOR_ADMIN = 'http://192.168.1.222/admin/applications'
|
||||
|
||||
# SnailJob 控制台地址
|
||||
VITE_APP_SNAILJOB_ADMIN = 'http://192.168.0.222/snail-job'
|
||||
VITE_APP_SNAILJOB_ADMIN = 'http://192.168.1.222/snail-job'
|
||||
|
||||
VITE_APP_PORT = 5173
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ export function login(data: LoginData): AxiosPromise<LoginResult> {
|
||||
clientId: data.clientId || clientId,
|
||||
grantType: data.grantType || 'password'
|
||||
};
|
||||
console.log(params);
|
||||
return request({
|
||||
url: '/auth/login',
|
||||
headers: {
|
||||
|
||||
@@ -7,7 +7,7 @@ export interface DecorationVO {
|
||||
/**
|
||||
* 所属小区id
|
||||
*/
|
||||
villageId: string | number;
|
||||
villageId: number;
|
||||
|
||||
/**
|
||||
* 所属房屋id
|
||||
@@ -59,7 +59,7 @@ export interface DecorationForm extends BaseEntity {
|
||||
/**
|
||||
* 所属小区id
|
||||
*/
|
||||
villageId?: string | number;
|
||||
villageId?: number;
|
||||
|
||||
/**
|
||||
* 所属房屋id
|
||||
@@ -106,7 +106,7 @@ export interface DecorationQuery extends PageQuery {
|
||||
/**
|
||||
* 所属小区id
|
||||
*/
|
||||
villageId?: string | number;
|
||||
villageId?: number;
|
||||
|
||||
/**
|
||||
* 所属房屋id
|
||||
|
||||
63
src/api/system/HouseFacilities/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { HouseFacilitiesVO, HouseFacilitiesForm, HouseFacilitiesQuery } from '@/api/system/HouseFacilities/type';
|
||||
|
||||
/**
|
||||
* 查询房屋设施管理列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listHouseFacilities = (query?: HouseFacilitiesQuery): AxiosPromise<HouseFacilitiesVO[]> => {
|
||||
return request({
|
||||
url: '/houseFacilities/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询房屋设施管理详细
|
||||
* @param id
|
||||
*/
|
||||
export const getHouseFacilities = (id: string | number): AxiosPromise<HouseFacilitiesVO> => {
|
||||
return request({
|
||||
url: '/houseFacilities/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增房屋设施管理
|
||||
* @param data
|
||||
*/
|
||||
export const addHouseFacilities = (data: HouseFacilitiesForm) => {
|
||||
return request({
|
||||
url: '/houseFacilities',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改房屋设施管理
|
||||
* @param data
|
||||
*/
|
||||
export const updateHouseFacilities = (data: HouseFacilitiesForm) => {
|
||||
return request({
|
||||
url: '/houseFacilities',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除房屋设施管理
|
||||
* @param id
|
||||
*/
|
||||
export const delHouseFacilities = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/houseFacilities/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
65
src/api/system/HouseFacilities/type.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
export interface HouseFacilitiesVO {
|
||||
/**
|
||||
* 房屋设施管理表id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 设施名称
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* 状态 0启用 1停用
|
||||
*/
|
||||
status: string;
|
||||
|
||||
/**
|
||||
* 创建者姓名
|
||||
*/
|
||||
createName: string;
|
||||
}
|
||||
|
||||
export interface HouseFacilitiesForm extends BaseEntity {
|
||||
/**
|
||||
* 房屋设施管理表id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 设施名称
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* 状态 0启用 1停用
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 创建者姓名
|
||||
*/
|
||||
createName?: string;
|
||||
}
|
||||
|
||||
export interface HouseFacilitiesQuery extends PageQuery {
|
||||
/**
|
||||
* 设施名称
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* 状态 0启用 1停用
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 创建者姓名
|
||||
*/
|
||||
createName?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
@@ -10,7 +10,7 @@ export function getCommunitylistAPI(): AxiosPromise<communitylist_rows_type[]> {
|
||||
});
|
||||
}
|
||||
/** 通过小区id获取小区信息 */
|
||||
export function getVillageByIdAPI(id: string): AxiosPromise<communitylist_rows_type> {
|
||||
export function getVillageByIdAPI(id: number): AxiosPromise<communitylist_rows_type> {
|
||||
return request({
|
||||
url: `/village/${id}`,
|
||||
method: 'get'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export interface communitylist_rows_type {
|
||||
villageId?: number;
|
||||
villageId: number;
|
||||
villageName: string;
|
||||
villageCode: string;
|
||||
address: string;
|
||||
|
||||
1
src/assets/icons/svg/banshiguanli.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M319 64m50 0l289 0q50 0 50 50l0 2q0 50-50 50l-289 0q-50 0-50-50l0-2q0-50 50-50ZM277.197 112l19.388 53.173c6.27 17.196 22.52 28.695 40.784 28.924l0.554 0.003h348.806c18.472 0 34.956-11.535 41.306-28.84l0.189-0.526L746.821 112H820c33.137 0 60 26.864 60 60v728c0 33.137-26.863 60-60 60H205c-33.137 0-60-26.863-60-60V172c0-33.136 26.863-60 60-60h72.197z m453.911 316.612c-14.094-14.533-36.913-14.533-50.988 0L462.804 653.006 344.897 531.26c-14.094-14.533-36.914-14.533-50.988 0-14.075 14.553-14.075 38.116 0 52.649l143.39 148.06c14.095 14.533 36.914 14.533 50.989 0l242.8-250.708c14.075-14.533 14.075-38.095 0.02-52.649z" /></svg>
|
||||
|
After Width: | Height: | Size: 893 B |
1
src/assets/icons/svg/baoxiuguanli.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M415.63981315 473.45592526l-125.8547832 125.85478318c-55.13478518-21.78578138-120.32454637-10.39014189-164.90160673 34.18691847-59.82710733 59.82710733-59.82710733 157.19279177 0 217.01989908 29.82976221 29.82976221 69.21175159 44.91222624 108.4261581 44.91222621 39.21440646 0 78.59639588-14.91488109 108.42615808-44.91222621 44.57706036-44.57706036 55.80511692-109.76682156 34.18691846-164.90160672l125.85478317-125.85478316-86.13762788-86.30521085z m-111.27506796 339.52302359c-39.21440646 39.21440646-102.89592127 39.21440646-142.11032775 0s-39.21440646-102.89592127 0-142.11032773c19.60720323-19.60720323 45.41497503-29.32701339 71.05516388-29.3270134 25.8077718 0 51.44796063 9.71981015 71.05516387 29.3270134 39.21440646 39.21440646 39.21440646 102.89592127 0 142.11032773zM573.50293665 487.86805756l101.38767487-101.38767486c54.63203637 21.4506155 119.15146583 10.05497602 163.39336033-34.01933556 44.2418945-44.2418945 55.46995105-108.76132396 34.01933553-163.3933603l-66.02767586 66.02767586c-23.62919365 23.62919365-62.50843426 23.62919365-86.13762791 0-23.62919365-23.62919365-23.62919365-62.50843426 0-86.13762791l66.02767588-66.02767587c-54.63203637-21.4506155-119.15146583-10.05497602-163.39336033 34.01933554-44.2418945 44.2418945-55.46995105 108.76132396-34.01933555 163.39336032l-101.38767486 101.38767487 86.1376279 86.13762791zM943.35847124 800.07506297l-232.94027778-232.94027779c-12.90388589 4.52473921-24.96985713 3.85440749-32.17592328-3.35165867-7.20606615-7.20606615-7.87639788-19.27203738-3.35165866-32.17592328l-33.18142086-33.18142085c-6.87090027-6.87090027-18.9368715-6.20056854-26.98085233 1.84341227l-28.65668165 28.65668163-314.38558356-314.21800061-15.75279575-44.57706034-47.25838731-24.8022742c-7.87639788-4.18957335-17.59620803-2.68132694-23.79677657 3.68682456l-21.95336431 21.95336429c-6.36815149 6.36815149-7.70881495 15.9203787-3.68682454 23.79677658l24.80227418 47.25838731 44.57706035 15.75279576 314.21800062 314.21800062-28.65668166 28.65668165c-7.87639788 7.87639788-8.71431257 19.9423691-1.84341227 26.98085235l33.18142087 33.18142085c12.90388589-4.52473921 24.96985713-3.85440749 32.17592328 3.35165867 7.20606615 7.20606615 7.87639788 19.27203738 3.35165867 32.17592326l232.94027777 232.94027779s13.23905177 11.8983883 77.25573243-52.11829235c66.53042467-66.19525881 52.11829237-77.08814949 52.11829236-77.0881495z" /></svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
1
src/assets/icons/svg/cangkuxinxi.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="170.38px" viewBox="0 0 1202 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M20.292931 1024h1180.504732v-39.891643H20.292931v39.891643z m1100.282995-81.200942V376.606637L601.136891 81.069407 80.053668 376.606637v566.192421h80.039049V416.46905H1040.536876v526.330008h80.03905zM1000.513698 662.790266h-52.555541v24.626276h-14.899993V662.790266h-52.555542v119.448398h120.011076V662.790266z m-139.916706 139.098266v139.660943h139.646328v-139.66825h-61.039549v29.164233h-17.538v-29.164233h-61.039549z m-521.660515-36.442503H321.259634v-29.156926h-61.302619v139.660943h140.304003v-139.668251H338.943784v29.156926zM601.136891 0.094998l-601.136888 341.991008v52.818611L601.136891 52.920916l601.166117 341.991009v-52.818612z m-60.652252 941.461785l-0.219225-472.064512h-19.99332v19.964091H220.123831l0.628445-20.132163h-20.424463v472.232584h20.409848l-0.61383-19.883708h300.148263l-0.189995 19.883708h20.40254z m-320.360808-432.165561h300.148263v176.24229H220.123831V509.391222z m0 392.346993V705.561065h300.148263V901.745522H220.123831z m279.833412-362.751617H438.910387v29.164233h-17.538001v-29.164233h-61.105316v119.726083h140.304003z m200.44473 283.253322v119.448398h120.011075V822.23992h-52.555541v24.626276h-14.899993v-24.626276h-52.555541z" /></svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
1
src/assets/icons/svg/chehangguanli.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M938.666667 576V896a42.666667 42.666667 0 0 1-42.666667 42.666667h-42.666667a42.666667 42.666667 0 0 1-42.666666-42.666667v-42.666667H213.333333v42.666667a42.666667 42.666667 0 0 1-42.666666 42.666667H128a42.666667 42.666667 0 0 1-42.666667-42.666667v-320l-53.034666-13.226667A42.666667 42.666667 0 0 1 0 521.386667v-30.72a21.333333 21.333333 0 0 1 21.333333-21.333334h80l91.221334-243.285333A85.333333 85.333333 0 0 1 272.469333 170.666667h479.061334a85.333333 85.333333 0 0 1 79.914666 55.381333L922.666667 469.333333H1002.666667a21.333333 21.333333 0 0 1 21.333333 21.333334v30.72a42.666667 42.666667 0 0 1-32.298667 41.386666L938.666667 576zM170.666667 640v85.333333a42.666667 42.666667 0 0 0 42.666666 42.666667h138.453334a21.333333 21.333333 0 0 0 18.773333-31.402667C336.213333 672.170667 269.568 640 170.666667 640z m682.666666 0c-98.858667 0-165.504 32.213333-199.936 96.597333a21.333333 21.333333 0 0 0 18.816 31.402667H810.666667a42.666667 42.666667 0 0 0 42.666666-42.666667v-85.333333zM256 256l-66.602667 199.850667A42.666667 42.666667 0 0 0 229.845333 512h564.309334a42.666667 42.666667 0 0 0 40.448-56.149333L768 256H256z" /></svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
1
src/assets/icons/svg/cheliangguanli.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M310.421 709.599v74.28H204.407c-29.11 0-52.793-25.408-52.793-56.64v-254.95l24.221-36.159v2.55H817.78v-1.385l31.656 47.259 39.879-26.713-91.305-136.306 74.95-0.044-0.023-40-101.71 0.059-37.919-56.608c-18.621-27.798-49.061-44.393-81.427-44.393h-310.93c-32.367 0-62.807 16.596-81.427 44.393l-38.084 56.855-89.569 0.053 0.023 40 62.741-0.037-90.514 135.127h-0.508v0.759l-0.095 0.142 0.095 0.064V727.24c0 57.698 45.216 104.64 100.793 104.64H358.42V709.6c0-8.999 6.458-16.32 14.397-16.32h170.385v-48H372.818c-34.406-0.002-62.397 28.852-62.397 64.319z m-11.017-457.943c9.692-14.469 25.224-23.107 41.547-23.107h310.93c16.323 0 31.855 8.638 41.548 23.106l93.125 139.024H206.279l93.125-139.023zM261.498 514.322h156.716v48H261.498zM761.942 520.251c-88.556 0-160.601 72.045-160.601 160.601 0 88.555 72.045 160.6 160.601 160.6 88.555 0 160.6-72.045 160.6-160.6 0-88.556-72.045-160.601-160.6-160.601z m0 277.2c-64.294 0-116.601-52.307-116.601-116.6 0-64.294 52.307-116.601 116.601-116.601 64.293 0 116.6 52.307 116.6 116.601s-52.307 116.6-116.6 116.6zM834.379 630.118h-31.644c-1.857 0-3.572 0.857-4.643 2.357l-45.359 62.717-16.358-22.787c-1.071-1.5-2.786-2.357-4.643-2.357H700.16c-4.643 0-7.357 5.286-4.643 9.072l52.716 72.931a5.682 5.682 0 0 0 9.215 0l81.575-112.862c2.714-3.785-0.001-9.071-4.644-9.071z" /></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
1
src/assets/icons/svg/cheweiguanli.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M631.926154 341.819077c0-112.206769-92.829538-205.036308-212.755692-205.036308H125.203692v754.294154h108.307693v-344.260923h189.518769c116.027077 0 208.896-92.829538 208.896-204.996923z m-228.233846 96.689231H229.612308V241.230769h174.08c50.294154 3.859692 96.689231 46.434462 96.68923 96.689231 3.899077 50.294154-46.395077 100.588308-96.68923 100.588308z m487.384615 266.909538c-3.859692-7.758769-11.618462-15.478154-11.618461-15.478154l-38.675693-100.588307c-7.719385-19.298462-30.916923-30.916923-42.535384-30.916923H597.070769c-11.618462 0-34.816 11.579077-42.535384 30.916923l-38.715077 100.588307s-7.719385 7.719385-11.579077 15.478154c-3.899077 7.719385-7.758769 11.579077-7.758769 58.013539 0 42.535385 7.758769 58.013538 19.337846 65.772307l7.758769 3.859693v42.535384c0 11.618462 3.859692 15.478154 15.478154 15.478154h27.057231c11.618462 0 19.337846 0 19.337846-11.618461v-38.675693h212.755692v38.675693c0 11.618462 7.719385 11.618462 19.337846 11.618461h27.057231c11.618462 0 15.478154-3.859692 15.478154-15.478154v-42.535384l7.758769-3.859693c11.579077-3.899077 19.298462-19.337846 19.298462-65.772307 11.618462-46.434462 7.758769-54.153846 3.899076-58.013539z m-321.063385-27.096615c0-3.859692 11.618462-50.294154 15.478154-65.772308 3.859692-3.859692 15.478154-23.197538 30.956308-19.298461h166.321231c15.478154 0 27.096615 15.438769 30.956307 19.298461 3.859692 15.478154 15.478154 61.912615 15.478154 65.772308 0 7.758769-3.899077 7.758769-3.899077 7.758769h-251.431384c0-3.899077-7.719385 0-3.859693-7.758769z m3.859693 108.307692c-15.438769 0-30.916923-15.478154-30.916923-30.916923 0-15.478154 15.478154-30.956308 30.916923-30.956308 15.478154 0 30.956308 15.478154 30.956307 30.956308a30.523077 30.523077 0 0 1-30.956307 30.916923z m251.431384 0c-15.438769 0-30.916923-15.478154-30.916923-30.916923 0-15.478154 15.478154-30.956308 30.916923-30.956308 15.478154 0 30.956308 15.478154 30.956308 30.956308a30.523077 30.523077 0 0 1-30.956308 30.916923z" /></svg>
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
1
src/assets/icons/svg/fangkeguanli.svg
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
1
src/assets/icons/svg/fangwuguanli.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M459.165285 885.094373h105.308167V692.179926h-105.308167V885.094373z m-52.383136 26.3722v-245.658847c0-14.631152 11.018522-26.3722 24.204621-26.372199h161.845828c13.1861 0 24.204622 11.921679 24.204622 26.372199v245.839478c0 14.631152-11.018522 26.3722-24.204622 26.3722h-161.845828c-13.366731-0.541895-24.204622-12.282942-24.204621-26.552831z m0 0M301.473981 148.298465v736.434645h420.871406V148.298465h-420.871406zM248.910213 464.222967V122.287529c0-14.631152 11.921679-26.3722 26.3722-26.3722h472.893279c14.631152 0 26.3722 11.921679 26.3722 26.3722V464.222967H888.707003c14.631152 0 26.010937 11.921679 26.010937 26.3722v420.329511c0 14.631152-11.379785 26.3722-26.010937 26.3722l-136.376786-0.541895c-1.445052 0-2.709473 0.541895-4.154525 0.541895h-473.254542l-140.350679-0.541895c-14.631152 0-26.010937-11.921679-26.010937-26.372199V490.233904c0-14.631152 11.379785-26.3722 26.010937-26.3722h114.520374v0.361263z m526.179574 52.563768v368.488269h87.967542v-368.488269h-87.967542z m-614.147116 0v368.488269h87.606279v-368.488269H160.942671z m0 0M412.201094 411.297936c-12.824837 0-22.75957-11.921679-22.75957-26.3722 0-14.631152 10.476627-26.3722 22.75957-26.372199h199.778444c12.824837 0 22.75957 11.921679 22.759569 26.372199 0 14.631152-10.476627 26.3722-22.759569 26.3722H412.201094z m0-122.648792c-12.824837 0-22.75957-11.921679-22.75957-26.372199 0-14.631152 10.476627-26.3722 22.75957-26.3722h199.778444c12.824837 0 22.75957 11.921679 22.759569 26.3722 0 14.631152-10.476627 26.3722-22.759569 26.372199H412.201094z m0 245.839478c-12.824837 0-22.75957-11.921679-22.75957-26.372199 0-14.631152 10.476627-26.3722 22.75957-26.3722h199.778444c12.824837 0 22.75957 11.921679 22.759569 26.3722 0 14.631152-10.476627 26.3722-22.759569 26.372199H412.201094z m0 0" /></svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
1
src/assets/icons/svg/gonggaoguanli.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M692.2752 548.608H331.7248a24.576 24.576 0 0 1 0-49.0496h360.5504a24.576 24.576 0 0 1 0 49.0496zM567.7056 709.1712H331.7248a24.576 24.576 0 1 1 0-49.1008h235.9808a24.576 24.576 0 0 1 0 49.1008zM872.3968 292.8128H643.584l-86.6304-150.1184A51.456 51.456 0 0 0 512 116.7872h-0.0512a51.1488 51.1488 0 0 0-44.9024 25.9584L380.416 292.8128H151.6032A49.152 49.152 0 0 0 102.4 342.016v515.9936c0 27.1872 22.016 49.2032 49.2032 49.2032h720.7936a49.152 49.152 0 0 0 49.2032-49.2032V342.016a49.152 49.152 0 0 0-49.2032-49.2032z m-359.7312-124.4672l71.8848 124.5184H439.808l72.8576-124.5184z m363.1616 689.7152c0 1.8944-1.536 3.3792-3.3792 3.3792H151.6032a3.3792 3.3792 0 0 1-3.3792-3.3792V342.016c0-1.8944 1.536-3.3792 3.3792-3.3792h720.7936c1.8944 0 3.3792 1.536 3.3792 3.3792v516.0448z" /></svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
1
src/assets/icons/svg/huodongguanli.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M335.3 484.8L308 191c232.3-149.2 259.6 124.2 450.8-41.9l55.8 281.3c-216.8 139.7-277.9-135.5-479.3 54.4z m-22.7 394.3c-21.7 2-40.8-13.9-42.8-35.6l-60.1-646.8c-2-21.7 13.9-40.8 35.6-42.8 21.7-2 40.8 13.9 42.8 35.6l60.1 646.8c2 21.6-13.9 40.8-35.6 42.8z" /></svg>
|
||||
|
After Width: | Height: | Size: 527 B |
1
src/assets/icons/svg/pay.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M981.566 741.566c0 138.303-112.132 250.434-250.434 250.434-51.151 0-98.671-15.402-138.323-41.739h-446.024c-57.63 0-104.347-46.718-104.347-104.348v-709.566c0-57.63 46.718-104.347 104.347-104.347h584.347c57.63 0 104.347 46.718 104.347 104.347v377.781c86.15 39.59 146.087 126.407 146.087 227.437zM793.739 178.087c0-57.63-46.718-104.347-104.347-104.347h-500.87c-57.63 0-104.347 46.718-104.347 104.347v626.087c0 57.63 46.718 104.347 104.347 104.347h356.327c-39.798-43.988-64.153-102.6-64.153-166.901 0-0.020 0-0.038 0-0.058 0-138.3 112.132-250.432 250.434-250.432 21.663 0 42.553 3.047 62.609 8.202v-321.246zM731.13 532.87c-115.263 0-208.696 93.433-208.696 208.696s93.433 208.696 208.696 208.696 208.696-93.433 208.696-208.696-93.433-208.696-208.696-208.696zM825.043 733.197v20.87h-67.387l4.779 0.793v40.967h62.609v20.87h-62.609v62.63h-62.609v-62.63h-62.609v-20.87h62.609v-40.967l8.577-0.793h-71.186v-20.87h56.577l-67.013-104.39h56.911l49.336 95.833 45.537-95.833h56.911l-63.214 104.39h52.779zM512.667 441.127c-34.351 26.588-77.301 39.318-128.849 38.212h-50.191v178.748h-82.497v-459.13h142.434c113.739 0 170.609 45.391 170.609 136.153 0 44.097-17.176 79.43-51.506 106.017zM376.723 270.101h-43.096v138.929h42.219c57.266 0 100.8-23.437 100.8-70.31 0-45.746-43.242-68.619-99.923-68.619z" /></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
1
src/assets/icons/svg/peizhitubiaosvg-.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M974.506667 426.666667A28.16 28.16 0 0 0 1002.666667 398.506667V202.666667A74.666667 74.666667 0 0 0 928 128h-832A74.666667 74.666667 0 0 0 21.333333 202.666667v195.84A28.16 28.16 0 0 0 49.493333 426.666667a87.893333 87.893333 0 0 1 88.746667 76.8 85.333333 85.333333 0 0 1-85.333333 93.866666h-3.413334A28.16 28.16 0 0 0 21.333333 625.493333v195.84A74.666667 74.666667 0 0 0 96 896h832a74.666667 74.666667 0 0 0 74.666667-74.666667v-195.84A28.16 28.16 0 0 0 974.506667 597.333333h-3.84a85.333333 85.333333 0 0 1-85.333334-93.866666 87.893333 87.893333 0 0 1 89.173334-76.8zM938.666667 657.92v163.413333a10.666667 10.666667 0 0 1-10.666667 10.666667h-832a10.666667 10.666667 0 0 1-10.666667-10.666667v-163.413333a149.333333 149.333333 0 0 0 0-291.84V202.666667a10.666667 10.666667 0 0 1 10.666667-10.666667h832a10.666667 10.666667 0 0 1 10.666667 10.666667v163.413333a149.333333 149.333333 0 0 0 0 291.84zM381.226667 517.76a296.746667 296.746667 0 0 1-48.64 170.666667l40.96 37.333333a333.013333 333.013333 0 0 0 58.453333-162.346667h205.44v84.053334c0 13.226667-5.12 21.333333-15.36 21.333333-18.986667 0-39.893333 0-62.506667-2.56l14.293334 52.266667H640a45.44 45.44 0 0 0 52.266667-50.773334V266.24H381.226667z m53.76-200.32h202.24v71.68h-202.24z m0 121.386667h202.24v75.733333h-202.24z" /></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
1
src/assets/icons/svg/quyuguanli.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M653.44 734.72a32.64 32.64 0 0 0-35.2 28.16 32 32 0 0 0 28.16 35.2c139.52 16 192 49.92 199.04 64-6.4 20.48-116.48 71.04-339.84 71.04s-333.44-50.56-339.84-69.76c3.84-12.8 57.6-45.44 192-64a32 32 0 1 0-7.68-64c-92.8 11.52-248.32 42.88-248.32 128 0 106.24 256 134.4 403.84 134.4s403.84-28.16 403.84-134.4c-0.64-86.4-160.64-117.12-256-128.64zM479.36 768a32 32 0 0 0 51.2 0l211.2-286.72a291.2 291.2 0 1 0-472.96 0z m25.6-572.16a115.2 115.2 0 1 1-115.2 115.2 115.84 115.84 0 0 1 115.2-115.2z" /></svg>
|
||||
|
After Width: | Height: | Size: 762 B |
1
src/assets/icons/svg/tousuguanli.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M500.500086 807.857231a128.669538 128.669538 0 0 1-108.662154-60.967385 7.286154 7.286154 0 1 1 11.027693-9.334154c0.236308 0.196923 23.985231 20.283077 77.272615 20.283077 10.476308 0 21.543385-0.787692 32.925538-2.323692 76.012308-10.24 95.586462-41.787077 95.744-42.141539a7.246769 7.246769 0 1 1 13.193847 5.907693 128.393846 128.393846 0 0 1-121.501539 88.615384z m408.812308-471.236923c45.489231 0 82.353231 36.627692 82.353231 81.801846v161.516308c0 33.949538-20.795077 63.015385-50.412308 75.382153-33.555692 185.107692-194.205538 304.206769-394.633846 320.512A70.498462 70.498462 0 0 1 479.429317 1024c-39.187692 0-70.971077-30.995692-70.971077-69.238154 0-38.203077 31.783385-69.277538 70.971077-69.277538a70.892308 70.892308 0 0 1 65.890461 44.032c173.134769-14.887385 312.871385-112.955077 347.332924-269.627077a82.313846 82.313846 0 0 1-51.79077-34.579693 372.145231 372.145231 0 0 1-174.592 212.125539l-3.387077 1.929846c-0.472615 0.118154-0.945231 0.275692-1.496615 0.275692-0.551385 0-1.102769-0.157538-1.614769-0.275692-0.708923-0.275692-1.378462-0.669538-2.048-0.945231a6.577231 6.577231 0 0 1-1.181539-9.964307l0.354462-0.315077c81.368615-74.515692 86.370462-147.298462 77.390769-253.636923-7.798154-92.947692-62.227692-181.169231-89.639385-220.987077l-1.929846 1.181538a8.704 8.704 0 0 0-6.931692-3.544615c-4.292923 0-7.640615 3.150769-8.428308 7.207384-2.875077 27.569231-9.097846 46.670769-13.430154 56.083693-18.510769 40.448-48.758154 64.708923-92.947692 72.782769-69.632 12.681846-138.870154 27.451077-208.462769 40.408615-43.362462 8.073846-80.580923 56.871385-73.334154 106.57477 16.541538 112.915692 92.947692 193.811692 114.057846 209.565538a6.695385 6.695385 0 0 0-3.859692-1.299692c-1.378462 0-2.993231 1.496615-4.450462 3.387077a42.692923 42.692923 0 0 0-4.01723 6.498461 372.617846 372.617846 0 0 1-199.010462-209.289846c-14.651077 18.116923-36.706462 29.932308-61.715692 29.932308A80.620308 80.620308 0 0 1 0.000394 591.950769v-159.625846a80.738462 80.738462 0 0 1 66.087384-79.635692C104.684702 151.827692 278.843471 0 488.527163 0c204.091077 0 374.350769 143.872 418.894769 336.738462 0.630154 0 1.260308-0.118154 1.929846-0.118154z m-73.885539 46.434461c2.205538-4.647385 5.001846-8.900923 8.073847-12.996923-30.838154-170.220308-177.939692-299.323077-354.973539-299.323077-177.860923 0-325.395692 130.363077-355.249231 301.804308 2.993231 2.756923 6.065231 5.513846 8.664616 8.743385 52.775385-140.681846 187.746462-240.994462 346.427077-240.994462 159.310769 0 294.754462 101.179077 347.05723 242.766769z" /></svg>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
1
src/assets/icons/svg/wenjuantiaocha.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M841.237333 960.746667H165.973333a21.333333 21.333333 0 0 1 0-42.666667h675.242667a37.973333 37.973333 0 0 0 37.952-37.952V584.576a21.333333 21.333333 0 0 1 42.666667 0v295.552a80.661333 80.661333 0 0 1-80.597334 80.618667zM264.810667 785.621333a21.333333 21.333333 0 0 1-21.333334-21.333333V143.872a80.704 80.704 0 0 1 80.618667-80.618667h517.12a80.704 80.704 0 0 1 80.618667 80.618667v332.693333a21.333333 21.333333 0 0 1-42.666667 0V143.872a37.973333 37.973333 0 0 0-37.952-37.952h-517.12a37.973333 37.973333 0 0 0-37.952 37.952v620.416a21.333333 21.333333 0 0 1-21.333333 21.333333zM751.36 341.354667H405.44a21.333333 21.333333 0 0 1 0-42.666667H751.36a21.333333 21.333333 0 0 1 0 42.666667zM645.077333 497.130667H405.44a21.333333 21.333333 0 0 1 0-42.666667h239.637333a21.333333 21.333333 0 0 1 0 42.666667zM560.234667 652.864h-154.794667a21.333333 21.333333 0 0 1 0-42.666667h154.794667a21.333333 21.333333 0 0 1 0 42.666667zM173.781333 960.746667c-61.994667 0-112.448-61.717333-112.448-137.578667V505.386667c0-0.832 0.170667-3.285333 0.277334-4.117334 1.258667-10.752 10.474667-20.245333 21.312-20.245333h181.781333a21.333333 21.333333 0 0 1 21.333333 21.333333c0.106667 0.533333 0.213333 1.770667 0.213334 3.029334v317.781333c-0.021333 75.861333-50.474667 137.578667-112.469334 137.578667zM104 523.712v299.456c0 52.330667 31.296 94.912 69.781333 94.912 38.485333 0 69.781333-42.581333 69.781334-94.912V523.712H104zM645.610667 854.485333a21.269333 21.269333 0 0 1-15.082667-6.250666l-54.762667-54.741334a21.333333 21.333333 0 0 1 0-30.165333L860.16 478.933333c22.698667-22.677333 62.229333-22.677333 84.906667 0a60.138667 60.138667 0 0 1 0 84.949334l-284.373334 284.373333a21.376 21.376 0 0 1-15.082666 6.229333z m-24.597334-76.096l24.597334 24.576 269.290666-269.290666a17.408 17.408 0 0 0 0-24.597334 17.856 17.856 0 0 0-24.597333 0L621.013333 778.389333zM533.696 911.637333a21.312 21.312 0 0 1-15.082667-36.416l37.312-37.312a21.312 21.312 0 1 1 30.165334 30.165334l-37.312 37.312a21.248 21.248 0 0 1-15.082667 6.250666zM843.178667 525.994667l54.762666 54.762666-30.165333 30.165334-54.762667-54.741334zM587.413333 874.581333a21.269333 21.269333 0 0 1-15.082666-6.250666l-16.661334-16.661334a21.312 21.312 0 0 1-5.077333-22.037333l20.074667-58.197333a21.290667 21.290667 0 0 1 35.264-8.106667l54.762666 54.741333a21.333333 21.333333 0 0 1-8.106666 35.242667l-58.197334 20.096a21.290667 21.290667 0 0 1-6.976 1.173333z" /></svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
1
src/assets/icons/svg/zhuangxiu.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="119.07px" viewBox="0 0 1720 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M571.282719 126.054501H146.135735a24.962668 24.962668 0 1 0 0 49.925337h425.136052a24.962668 24.962668 0 0 0 0-49.925337z m0 0M763.255314 174.842935h-56.386006v-4.766246l0.229567-76.358327A93.553981 93.553981 0 0 0 613.2716 0.000404L94.188023 1.09358A91.170858 91.170858 0 0 0 51.379261 12.145587C21.535562 28.258998 0.098386 60.24532 0 95.314399l0.229567 180.177228a93.510254 93.510254 0 0 0 93.60864 93.72889l518.974259-1.093176a94.723679 94.723679 0 0 0 94.286409-94.286409l-0.677769-41.070613v-7.947388h31.089919c3.181141 0.229567 20.081639 2.492441 22.125877 26.323672 0 0.448202 0.109318 0.907336 0.109318 1.24622v119.812063c-0.229567 8.964041-3.399777 42.775967-38.68749 49.192909a53.314182 53.314182 0 0 1-6.559055 0.677769H381.791633s-59.33758-0.448202-79.80183 49.466203c0 0-6.690236 12.484067-7.488254 34.609945v25.645903h-66.213656a36.654183 36.654183 0 0 0-36.533933 36.533934v260.394465a36.654183 36.654183 0 0 0 36.533933 36.533934h175.290733a36.654183 36.654183 0 0 0 36.533934-36.533934v-260.17583a36.654183 36.654183 0 0 0-36.533934-36.533934h-63.305808v-24.618318s-0.120249-16.452295 9.838582-26.892123c4.995813-5.214448 11.806298-8.39559 22.235195-8.286273h355.282121c9.980695-0.448202 17.359631-1.36647 17.359631-1.366469 14.746941-1.694422 30.062333-6.919803 41.30018-16.397637 10.778713-9.073359 15.654277-20.65009 18.0374-27.12169 4.372703-11.795366 5.465879-31.997254 5.465879-31.997255l0.109317-161.112243c0.229567-58.430244-46.634878-59.348512-46.634877-59.348512z m-114.368048 128.99474a38.381401 38.381401 0 0 1-27.329394 11.456481l-536.563457 1.246221A37.769222 37.769222 0 0 1 47.214261 278.760223l-0.338885-186.52858c0-12.822952 8.843792-26.782806 22.235195-33.888448a34.435036 34.435036 0 0 1 16.342978-4.372703L622.017006 52.647749a37.758291 37.758291 0 0 1 37.900404 38.009721l-0.229567 78.708655-0.338885 64.672277 0.798018 43.792621c0.109318 9.084291-3.85891 18.583988-11.237846 25.984788zM372.149823 582.291403a18.988463 18.988463 0 0 1 18.726101 19.174303v194.694603a18.988463 18.988463 0 0 1-18.726101 19.174302H259.48713a18.988463 18.988463 0 0 1-18.726101-19.174302V601.465706a18.988463 18.988463 0 0 1 18.726101-19.174303z m0 0" /></svg>
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
BIN
src/assets/images/index/summer.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
@@ -195,8 +195,6 @@
|
||||
|
||||
// Buttons
|
||||
.el-button {
|
||||
width: 80px;
|
||||
height: 35px;
|
||||
border-radius: var(--app-radius-md);
|
||||
transition:
|
||||
transform 0.15s ease,
|
||||
|
||||
@@ -106,7 +106,7 @@ const props = defineProps<{
|
||||
|
||||
// ✅ 手动设置默认值(替代 withDefaults)
|
||||
const isMultiple = computed(() => props.isMultiple ?? false);
|
||||
const returnvalue = computed(() => props.returnvalue ?? 'userId'); // 👈 默认 userId
|
||||
const returnvalue = computed(() => props.returnvalue ?? 'id'); // 👈 默认 userId
|
||||
|
||||
const { userid } = toRefs(props);
|
||||
|
||||
@@ -267,6 +267,7 @@ function confirm() {
|
||||
// ✅ 返回整个对象
|
||||
emit('change', multipleSelection.value[0]);
|
||||
} else {
|
||||
console.log(multipleSelection.value[0], returnvalue.value);
|
||||
// 返回指定字段
|
||||
emit('change', multipleSelection.value[0][returnvalue.value as keyof tableType]);
|
||||
}
|
||||
|
||||
@@ -120,7 +120,6 @@ const handleRowClick = (row: tableType) => {
|
||||
// 统一回显 userid 选中(安全版)
|
||||
const handleUserSelection = () => {
|
||||
if (!userid.value || !tableData.value.length) return;
|
||||
console.log('user', userid, tableData.value);
|
||||
|
||||
const target = tableData.value.find((item) => item.userId == userid.value);
|
||||
if (target) {
|
||||
|
||||
@@ -145,9 +145,12 @@ watch(
|
||||
height: 50px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background: #1a75ff;
|
||||
// background: #1a75ff;
|
||||
background: #dfedff;
|
||||
// border-bottom: 1px solid #1a75ff;
|
||||
border-bottom: 1px solid #dfedff;
|
||||
|
||||
color: #fff;
|
||||
border-bottom: 1px solid #1a75ff;
|
||||
box-shadow: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -71,7 +71,9 @@ const getLogoTextColor = computed(() => {
|
||||
position: relative;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
background-color: #1a75ff;
|
||||
// background-color: #1a75ff;
|
||||
background: #dfedff;
|
||||
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
box-shadow: none;
|
||||
@@ -91,8 +93,7 @@ const getLogoTextColor = computed(() => {
|
||||
& .sidebar-title {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
// color: v-bind(getLogoTextColor);
|
||||
color: white;
|
||||
|
||||
font-weight: 600;
|
||||
line-height: 50px;
|
||||
font-size: 14px;
|
||||
@@ -103,6 +104,11 @@ const getLogoTextColor = computed(() => {
|
||||
Helvetica,
|
||||
sans-serif;
|
||||
vertical-align: middle;
|
||||
|
||||
// color: v-bind(getLogoTextColor);
|
||||
// color: white;
|
||||
color: #000000;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ const activeMenu = computed(() => {
|
||||
}
|
||||
return path;
|
||||
});
|
||||
const bgColor = computed(() => (sideTheme.value === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground));
|
||||
const bgColor = '#eaf2ff';
|
||||
// const bgColor = computed(() => (sideTheme.value === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground));
|
||||
const textColor = computed(() => (sideTheme.value === 'theme-dark' ? variables.menuColor : variables.menuLightColor));
|
||||
</script>
|
||||
|
||||
@@ -31,8 +31,7 @@ router.beforeEach(async (to, from, next) => {
|
||||
if (useUserStore().roles.length === 0) {
|
||||
isRelogin.show = true;
|
||||
// 判断当前用户是否已拉取完user_info信息
|
||||
const [data, err] = await tos(useUserStore().getInfo());
|
||||
console.log(data);
|
||||
const [err, res] = await tos(useUserStore().getInfo());
|
||||
if (err) {
|
||||
await useUserStore().logout();
|
||||
ElMessage.error(err);
|
||||
@@ -46,8 +45,13 @@ router.beforeEach(async (to, from, next) => {
|
||||
router.addRoute(route); // 动态添加可访问路由表
|
||||
}
|
||||
});
|
||||
// @ts-expect-error hack方法 确保addRoutes已完成
|
||||
next({ path: to.path, replace: true, params: to.params, query: to.query, hash: to.hash, name: to.name as string }); // hack方法 确保addRoutes已完成
|
||||
if (res.user.userId === 1 && from.path === '/login') {
|
||||
// 管理员 → 强制跳转到社区列表
|
||||
next('/community/communitylist');
|
||||
} else {
|
||||
// 普通用户 → 正常跳转目标页
|
||||
next(to.fullPath);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
next();
|
||||
@@ -59,8 +63,7 @@ router.beforeEach(async (to, from, next) => {
|
||||
// 在免登录白名单,直接进入
|
||||
next();
|
||||
} else {
|
||||
const redirect = encodeURIComponent(to.fullPath || '/');
|
||||
next(`/login?redirect=${redirect}`); // 否则全部重定向到登录页
|
||||
next(`/login`); // 否则全部重定向到登录页
|
||||
NProgress.done();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,9 +93,9 @@ export const constantRoutes: RouteRecordRaw[] = [
|
||||
children: [
|
||||
{
|
||||
path: '/index',
|
||||
component: () => import('@/views/workbench/index.vue'),
|
||||
component: () => import('@/views/workbench/index2.vue'),
|
||||
name: 'Index',
|
||||
meta: { title: '首页', icon: 'dashboard', affix: true }
|
||||
meta: { title: '工作台', icon: 'dashboard', affix: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getCommunitylistAPI } from '@/api/system/community';
|
||||
import { getCommunitylistAPI, getVillageByIdAPI } from '@/api/system/community';
|
||||
import { communitylist_rows_type } from '@/api/system/community/type';
|
||||
import { deleteHouseApi, getBuildinglistAPI, getHouselistAPI, getVillageTree } from '@/api/system/house';
|
||||
import type { addBuildingType, BuildingUnit, BuildingVo } from '@/api/system/house/type';
|
||||
@@ -51,38 +51,55 @@ export const useHouseStore = defineStore(
|
||||
|
||||
// 当前楼栋 所有楼层数据
|
||||
const currentFloorInfoList = computed(() => {
|
||||
return (Array.from(floorslist.value) as string[]).sort(sortNumberStr);
|
||||
return [...floorslist.value].sort(sortNumberStr);
|
||||
});
|
||||
// 楼层列表 set
|
||||
const floorslist = ref<Set<string>>(new Set());
|
||||
|
||||
//
|
||||
// 查找当前小区
|
||||
const getviliageinfo = async (id) => {
|
||||
const res = await getVillageByIdAPI(id);
|
||||
currentVilageInfo.value = res.data;
|
||||
};
|
||||
|
||||
// 更新小区信息
|
||||
const updateVilageinfo = (data) => {
|
||||
currentVilageInfo.value = data;
|
||||
};
|
||||
|
||||
// 初始化
|
||||
const initHouse = async (buildingtype: number) => {
|
||||
// 查找当前小区
|
||||
const res = await getCommunitylistAPI();
|
||||
const currentVilage = res.rows.find((item) => item.choiceStatus === 0);
|
||||
currentVilageInfo.value = currentVilage;
|
||||
const initHouse = async (currentbuildingtype: number) => {
|
||||
currentBuildingInfoList.value = [];
|
||||
// 获取当前小区 所有楼栋信息
|
||||
const res2 = await getBuildinglistAPI(currentVilage.villageId, buildingtype);
|
||||
const res2 = await getBuildinglistAPI(currentVilageInfo.value.villageId, currentbuildingtype);
|
||||
currentBuildingInfoList.value = res2.data;
|
||||
|
||||
// 获取当前小区 第一个楼栋信息
|
||||
if (currentBuildingInfo.value.id === null) {
|
||||
// ! 不同住宅类型
|
||||
if ((currentBuildingInfo.value && currentBuildingInfo.value.id === null) || buildingtype.value !== currentbuildingtype) {
|
||||
currentBuildingInfo.value = res2.data[0];
|
||||
} else {
|
||||
// ! 相同住宅类型
|
||||
} else if (buildingtype.value === currentbuildingtype) {
|
||||
// 更新当前楼栋的 信息
|
||||
currentBuildingInfo.value = res2.data.find((item) => item.id === currentBuildingInfo.value.id);
|
||||
}
|
||||
|
||||
// 获取当前 第一个楼栋的所有信息
|
||||
const res3 = await getHouselistAPI(currentBuildingInfo.value.id);
|
||||
currentHouseInfoList.value = res3.data;
|
||||
floorslist.value = new Set();
|
||||
// 得到所有的有房屋的 楼层 数组
|
||||
currentHouseInfoList.value.units.forEach((item) => {
|
||||
item.floors.forEach((floor) => {
|
||||
floorslist.value.add(floor.floorNo);
|
||||
if (currentBuildingInfo.value && currentBuildingInfo.value.id) {
|
||||
// 获取当前 第一个楼栋的所有信息
|
||||
const res3 = await getHouselistAPI(currentBuildingInfo.value.id);
|
||||
currentHouseInfoList.value = res3.data;
|
||||
floorslist.value = new Set();
|
||||
// 得到所有的有房屋的 楼层 数组
|
||||
currentHouseInfoList.value.units.forEach((item) => {
|
||||
item.floors.forEach((floor) => {
|
||||
floorslist.value.add(floor.floorNo);
|
||||
});
|
||||
});
|
||||
});
|
||||
if (buildingtype.value !== currentbuildingtype) {
|
||||
buildingtype.value = currentbuildingtype;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 选中的房屋
|
||||
@@ -93,18 +110,59 @@ export const useHouseStore = defineStore(
|
||||
};
|
||||
|
||||
// 切换住宅类型
|
||||
const switchHouseType = (housetype: number) => {
|
||||
getBuildinglistAPI(currentVilageInfo.value.villageId, housetype)
|
||||
.then(() => {
|
||||
buildingtype.value = housetype;
|
||||
initHouse(housetype);
|
||||
ElMessage.success('切换成功');
|
||||
})
|
||||
.catch(() => ElMessage.error('切换失败'));
|
||||
const switchHouseType = async (housetype: number) => {
|
||||
// 清空
|
||||
currentBuildingInfoList.value = [];
|
||||
// 获取当前小区 所有楼栋信息
|
||||
const res2 = await getBuildinglistAPI(currentVilageInfo.value.villageId, housetype);
|
||||
currentBuildingInfoList.value = res2.data;
|
||||
// 获取当前小区 第一个楼栋信息
|
||||
if ((currentBuildingInfo.value && currentBuildingInfo.value.id === null) || buildingtype.value !== housetype) {
|
||||
if (res2.data.length > 0) {
|
||||
currentBuildingInfo.value = res2.data[0];
|
||||
} else {
|
||||
currentBuildingInfo.value = {
|
||||
'id': null,
|
||||
'villageId': null,
|
||||
'villageName': '',
|
||||
'buildingName': '',
|
||||
'buildingUse': null,
|
||||
'buildToward': '',
|
||||
'buildTall': '',
|
||||
'buildStructure': '',
|
||||
'unitCount': null,
|
||||
'floorCount': null,
|
||||
'remark': ''
|
||||
};
|
||||
}
|
||||
}
|
||||
if (currentBuildingInfo.value.id !== null) {
|
||||
switchBuilding(currentBuildingInfo.value.id);
|
||||
} else {
|
||||
floorslist.value = new Set();
|
||||
}
|
||||
buildingtype.value = housetype;
|
||||
console.log(housetype);
|
||||
ElMessage.success('切换成功');
|
||||
};
|
||||
|
||||
// 更新当前楼栋信息
|
||||
const updateCureentBuilding = async () => {
|
||||
currentHouseInfoList.value = null;
|
||||
// 获取当前 楼栋的所有信息
|
||||
const res3 = await getHouselistAPI(currentBuildingInfo.value.id);
|
||||
currentHouseInfoList.value = res3.data;
|
||||
floorslist.value = new Set();
|
||||
// 得到所有的有房屋的 楼层 数组
|
||||
currentHouseInfoList.value.units.forEach((item) => {
|
||||
item.floors.forEach((floor) => {
|
||||
floorslist.value.add(floor.floorNo);
|
||||
});
|
||||
});
|
||||
};
|
||||
// 切换楼栋
|
||||
const switchBuilding = (buildingId: string) => {
|
||||
if (!buildingId) return;
|
||||
// 切换之前 清空当前楼栋信息
|
||||
currentBuildingInfo.value = {
|
||||
'id': null,
|
||||
@@ -122,12 +180,11 @@ export const useHouseStore = defineStore(
|
||||
currentHouseInfoList.value = null;
|
||||
getHouselistAPI(buildingId).then((res) => {
|
||||
currentHouseInfoList.value = res.data;
|
||||
console.log(currentHouseInfoList.value);
|
||||
// 获取当前楼栋信息并 赋值
|
||||
currentBuildingInfo.value = currentBuildingInfoList.value.find((item) => item.id === buildingId);
|
||||
|
||||
// 清空 楼层信息
|
||||
floorslist.value = new Set();
|
||||
floorslist.value.clear();
|
||||
// 重新获取楼层信息
|
||||
currentHouseInfoList.value.units.forEach((item) => {
|
||||
item.floors.forEach((floor) => {
|
||||
@@ -144,7 +201,6 @@ export const useHouseStore = defineStore(
|
||||
};
|
||||
// 删除指定楼栋
|
||||
const deleteBuildingFun = (buildingId: string) => {
|
||||
console.log('删除楼栋');
|
||||
// 手动 从 楼栋列表中删除 指定楼栋
|
||||
currentBuildingInfoList.value = currentBuildingInfoList.value.filter((item) => item.id !== buildingId);
|
||||
// 判断指定楼栋是 当前楼栋
|
||||
@@ -159,12 +215,20 @@ export const useHouseStore = defineStore(
|
||||
|
||||
// 房屋 树状结构类型
|
||||
const getCurrentVilageTreeHouse = async () => {
|
||||
const res = await getCommunitylistAPI();
|
||||
const currentVilage = res.rows.find((item) => item.choiceStatus === 0);
|
||||
currentVilageInfo.value = currentVilage;
|
||||
getVillageTree(currentVilageInfo.value.villageId).then((res) => {
|
||||
treedata.value = convertBuildingToTree(res.data.buildings);
|
||||
});
|
||||
if (!currentVilageInfo.value?.villageId) {
|
||||
treedata.value = [];
|
||||
return treedata.value;
|
||||
}
|
||||
try {
|
||||
treedata.value = [];
|
||||
const res = await getVillageTree(currentVilageInfo.value.villageId);
|
||||
treedata.value = convertBuildingToTree(res.data.buildings || []);
|
||||
return treedata.value;
|
||||
} catch (err) {
|
||||
console.error('获取楼栋树失败:', err);
|
||||
treedata.value = [];
|
||||
return treedata.value;
|
||||
}
|
||||
};
|
||||
return {
|
||||
currentVilageInfo,
|
||||
@@ -176,6 +240,9 @@ export const useHouseStore = defineStore(
|
||||
buildingtype,
|
||||
buildingtypelist,
|
||||
treedata,
|
||||
updateVilageinfo,
|
||||
updateCureentBuilding,
|
||||
getviliageinfo,
|
||||
checkoutHousesFun,
|
||||
initHouse,
|
||||
switchHouseType,
|
||||
|
||||
@@ -6,6 +6,7 @@ import defAva from '@/assets/images/profile.jpg';
|
||||
import { defineStore } from 'pinia';
|
||||
import { ref } from 'vue';
|
||||
import { useHouseStore } from './house';
|
||||
import { UserInfo } from '@/api/system/user/types';
|
||||
|
||||
export const useUserStore = defineStore('user', () => {
|
||||
const token = ref(getToken());
|
||||
@@ -34,15 +35,15 @@ export const useUserStore = defineStore('user', () => {
|
||||
};
|
||||
|
||||
// 获取用户信息
|
||||
const getInfo = async (): Promise<void> => {
|
||||
const getInfo = async (): Promise<UserInfo> => {
|
||||
const [err, res] = await to(getUserInfo());
|
||||
if (res) {
|
||||
const data = res.data;
|
||||
const user = data.user;
|
||||
const profile = user.avatar == '' || user.avatar == null ? defAva : user.avatar;
|
||||
// useHouseStore().getCurrentVilageTreeHouse();
|
||||
console.log(data);
|
||||
sessionStorage.setItem('villageid', data.user.villageId);
|
||||
if (data.user.userId !== 1) {
|
||||
localStorage.setItem('villageid', data.user.villageId);
|
||||
}
|
||||
if (data.roles && data.roles.length > 0) {
|
||||
// 验证返回的roles是否是一个非空数组
|
||||
roles.value = data.roles;
|
||||
|
||||
@@ -13,14 +13,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="communityBody">
|
||||
<div
|
||||
class="coummunity_card"
|
||||
:class="{
|
||||
activeCommunity: item.choiceStatus === 0
|
||||
}"
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
>
|
||||
<div class="coummunity_card" v-for="(item, index) in list" :key="index">
|
||||
<el-image :src="item.villageImageUrl ? item.villageImageUrl.split(',')[0] : ''">
|
||||
<template #error>
|
||||
<div class="image-viewer-slot image-slot">
|
||||
@@ -33,14 +26,7 @@
|
||||
<div class="counmmunityaddress">{{ item.address }}</div>
|
||||
</div>
|
||||
<div class="actions flex">
|
||||
<div
|
||||
@click="handleclick(item)"
|
||||
:style="{
|
||||
color: item.choiceStatus === 0 ? 'green' : ''
|
||||
}"
|
||||
>
|
||||
{{ item.choiceStatus === 0 ? '进入' : '管理' }}
|
||||
</div>
|
||||
<div @click="handleclick(item)">管理</div>
|
||||
<div @click="handleEdit(item)">编辑</div>
|
||||
<div @click="handleDelete(item)">删除</div>
|
||||
</div>
|
||||
@@ -62,7 +48,8 @@ import Navbar from '@/layout/components/Navbar.vue';
|
||||
import { deleteVillageByIdAPI, switchVillageAPI, getCommunitylistAPI } from '@/api/system/community/index';
|
||||
import type { communitylist_rows_type } from '@/api/system/community/type';
|
||||
import { Picture } from '@element-plus/icons-vue';
|
||||
|
||||
import { useHouseStore } from '@/store/modules/house';
|
||||
const houseStore = useHouseStore();
|
||||
const router = useRouter();
|
||||
const list = ref<communitylist_rows_type[]>([]);
|
||||
const currentViliageInfo = ref<communitylist_rows_type>();
|
||||
@@ -70,7 +57,6 @@ const currentViliageInfo = ref<communitylist_rows_type>();
|
||||
function getlist() {
|
||||
getCommunitylistAPI().then((res) => {
|
||||
list.value = res.rows;
|
||||
currentViliageInfo.value = res.rows.find((item) => item.choiceStatus === 0);
|
||||
res.rows.forEach((item) => {
|
||||
if (item.villageImageUrl) {
|
||||
console.log(item.villageImageUrl.split(','));
|
||||
@@ -106,19 +92,13 @@ function handleEdit(item: communitylist_rows_type) {
|
||||
|
||||
/** 管理小区 */
|
||||
function handleclick(item: communitylist_rows_type) {
|
||||
if (item.choiceStatus === 0) {
|
||||
switchVillageAPI(item.villageId).then(() => {
|
||||
localStorage.setItem('villageid', String(item.villageId));
|
||||
houseStore.getviliageinfo(item.villageId);
|
||||
router.push({
|
||||
path: '/index'
|
||||
});
|
||||
} else {
|
||||
switchVillageAPI(item.villageId).then((res) => {
|
||||
console.log('切换成小区---------------------');
|
||||
ElMessage.success('切换小区成功');
|
||||
router.push({
|
||||
path: '/index'
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@@ -260,23 +240,4 @@ function handleclick(item: communitylist_rows_type) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.activeCommunity {
|
||||
position: relative;
|
||||
&::after {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: -30px;
|
||||
transform: rotateZ(45deg);
|
||||
content: '当前小区';
|
||||
width: 100px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
text-align: center;
|
||||
background-color: green;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -27,9 +27,7 @@
|
||||
</el-form-item>
|
||||
<div class="remberBox">
|
||||
<el-checkbox v-model="loginForm.rememberMe" style="color: #fff">{{ proxy.$t('login.rememberPassword') }}</el-checkbox>
|
||||
<div>
|
||||
<el-button class="color-white" type="text">忘记密码?</el-button>
|
||||
</div>
|
||||
<el-button class="hoverbutn" text>忘记密码</el-button>
|
||||
</div>
|
||||
|
||||
<el-form-item style="width: 100%">
|
||||
@@ -100,7 +98,6 @@ const handleLogin = () => {
|
||||
loginRef.value?.validate(async (valid: boolean, fields: any) => {
|
||||
if (valid) {
|
||||
loading.value = true;
|
||||
console.log(loginForm.value);
|
||||
// 勾选了需要记住密码设置在 localStorage 中设置记住用户名和密码
|
||||
if (loginForm.value.rememberMe) {
|
||||
localStorage.setItem('tenantId', String(loginForm.value.tenantId));
|
||||
@@ -117,7 +114,6 @@ const handleLogin = () => {
|
||||
// 调用action的登录方法
|
||||
const [err] = await to(userStore.login(loginForm.value));
|
||||
if (!err) {
|
||||
console.log('登录成功');
|
||||
const redirectUrl = redirect.value || '/';
|
||||
await router.push(redirectUrl);
|
||||
loading.value = false;
|
||||
@@ -194,8 +190,11 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-button) {
|
||||
:deep(.el-button.hoverbutn) {
|
||||
color: #fff;
|
||||
&:hover {
|
||||
background: none !important;
|
||||
}
|
||||
}
|
||||
.login {
|
||||
display: flex;
|
||||
|
||||
@@ -52,6 +52,7 @@ const router = useRouter();
|
||||
const formRef = ref();
|
||||
const form = ref({
|
||||
'id': null,
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
'titile': '',
|
||||
'author': '',
|
||||
'content': '',
|
||||
@@ -84,6 +85,7 @@ if (route.query.id) {
|
||||
const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
form.value.villageId = Number(localStorage.getItem('villageid'));
|
||||
if (userid.value) {
|
||||
updateActivity(form.value).then(() => {
|
||||
ElMessage.success('编辑成功');
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
<el-table v-loading="loading" border :data="activityList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="标题" align="center" prop="titile" />
|
||||
<el-table-column label="标题" align="center" prop="title" />
|
||||
<el-table-column label="作者" align="center" prop="author" />
|
||||
<el-table-column label="发布状态" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
@@ -115,6 +115,7 @@ const initFormData: ActivityForm = {
|
||||
const data = reactive<PageData<ActivityForm, ActivityQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
titile: undefined,
|
||||
|
||||
@@ -115,12 +115,10 @@ async function init() {
|
||||
...form.value,
|
||||
...res.data
|
||||
};
|
||||
console.log(form.value);
|
||||
const find = res2.rows.find((item) => item.id === form.value.typeId);
|
||||
if (find) {
|
||||
form.value.type = find.name;
|
||||
}
|
||||
console.log(form.value);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -140,6 +138,7 @@ const formRef = ref();
|
||||
const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
form.value.villageId = Number(localStorage.getItem('villageid'));
|
||||
if (userid.value) {
|
||||
updateComplaint(form.value).then(() => {
|
||||
ElMessage.success('编辑成功');
|
||||
@@ -165,6 +164,7 @@ function handleBack() {
|
||||
.ResidentMainBody {
|
||||
margin-top: 20px;
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
|
||||
.CarinfoBox {
|
||||
display: grid;
|
||||
|
||||
@@ -25,15 +25,16 @@
|
||||
<el-card class="flex-1" shadow="never">
|
||||
<el-table v-loading="loading" border :data="complaintList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="投诉类型" align="center" prop="typeId" />
|
||||
<el-table-column label="投诉类型" align="center" prop="typeName" />
|
||||
<el-table-column label="问题描述" align="center" prop="problemDes" />
|
||||
<el-table-column label="投诉人姓名" align="center" prop="complaintName" />
|
||||
<el-table-column label="手机号" align="center" prop="phone" />
|
||||
<el-table-column label="投诉时间" align="center" prop="createTime" />
|
||||
<el-table-column label="投诉状态" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="com_complaint_status" :value="scope.row.status"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="问题描述" align="center" prop="problemDes" />
|
||||
<el-table-column label="投诉人姓名" align="center" prop="complaintName" />
|
||||
<el-table-column label="手机号" align="center" prop="phone" />
|
||||
<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="['complaint:complaint:edit']">查看详情</el-button>
|
||||
@@ -86,6 +87,7 @@ const initFormData: ComplaintForm = {
|
||||
const data = reactive<PageData<ComplaintForm, ComplaintQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
typeId: undefined,
|
||||
|
||||
@@ -55,7 +55,6 @@ function init() {
|
||||
...form.value,
|
||||
...res.data
|
||||
};
|
||||
console.log(form.value);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -68,6 +67,7 @@ if (route.query.id) {
|
||||
const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
form.value.villageId = Number(localStorage.getItem('villageid'));
|
||||
if (userid.value) {
|
||||
updateComplaintType(form.value).then(() => {
|
||||
ElMessage.success('编辑成功');
|
||||
|
||||
@@ -99,6 +99,7 @@ const data = reactive<PageData<ComplaintTypeForm, ComplaintTypeQuery>>({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
name: undefined,
|
||||
status: undefined,
|
||||
createNam: undefined,
|
||||
|
||||
@@ -69,13 +69,14 @@ const formRef = ref();
|
||||
const form = ref({
|
||||
'id': null,
|
||||
'houseId': null,
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
'applyName': '',
|
||||
'decorationCompany': '',
|
||||
'decorationContent': '',
|
||||
'decorationDeposit': null
|
||||
});
|
||||
const rules = {
|
||||
houseId: [{ required: true, message: '请选择房屋', trigger: 'blur' }],
|
||||
houseId: [{ required: true, message: '请选择具体房屋', trigger: 'blur' }],
|
||||
applyName: [{ required: true, message: '请输入申请人', trigger: 'blur' }],
|
||||
decorationDeposit: [{ required: true, message: '请输入装修押金', trigger: 'blur' }],
|
||||
decorationContent: [{ required: true, message: '请输入装修内容', trigger: 'blur' }]
|
||||
@@ -89,7 +90,6 @@ function init() {
|
||||
...form.value,
|
||||
...res.data
|
||||
};
|
||||
console.log(form.value);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -111,6 +111,7 @@ function handleChange(val: (string | number)[]) {
|
||||
const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
form.value.villageId = Number(localStorage.getItem('villageid'));
|
||||
if (userid.value) {
|
||||
updateDecoration(form.value).then(() => {
|
||||
ElMessage.success('编辑成功');
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
|
||||
<el-table v-loading="loading" border :data="decorationList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="所属小区" align="center" prop="villageId" />
|
||||
<el-table-column label="所属房屋" align="center" prop="houseId" />
|
||||
<el-table-column label="小区名称" align="center" prop="villageName" />
|
||||
<el-table-column label="房屋号" align="center" prop="houseName" />
|
||||
<el-table-column label="申请人姓名" align="center" prop="applyName" />
|
||||
<el-table-column label="装修公司" align="center" prop="decorationCompany" />
|
||||
<el-table-column label="装修内容" align="center" prop="decorationContent" />
|
||||
@@ -56,12 +56,19 @@
|
||||
<dict-tag :options="com_decoration_status" :value="Number(scope.row.inspectionResult)"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请时间" align="center" prop="inspectionName" />
|
||||
<el-table-column label="申请时间" align="center" prop="createTime" />
|
||||
<el-table-column label="验收人" align="center" prop="inspectionName" />
|
||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleInspection(scope.row)" v-hasPermi="['decoration:decoration:edit']">验收</el-button>
|
||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['decoration:decoration:edit']">详情</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
v-if="scope.row.inspectionResult !== '1'"
|
||||
@click="handleInspection(scope.row)"
|
||||
v-hasPermi="['decoration:decoration:edit']"
|
||||
>验收</el-button
|
||||
>
|
||||
<el-button link type="primary" v-else @click="handleUpdate(scope.row)" v-hasPermi="['decoration:decoration:edit']">详情</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>
|
||||
@@ -73,12 +80,17 @@
|
||||
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="decorationFormRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="持卡人姓名" prop="inspectionName">
|
||||
<el-input v-model="form.inspectionName" placeholder="请输入持卡人姓名" />
|
||||
<el-form-item label="验收人姓名" prop="inspectionName">
|
||||
<el-input v-model="form.inspectionName" placeholder="请输入验收人姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="验收结果" prop="inspectionResult">
|
||||
<el-select v-model="form.inspectionResult" placeholder="请选择装修验收结果">
|
||||
<el-option v-for="item in com_decoration_status" :key="item.value" :label="item.label" :value="item.value" />
|
||||
<el-option
|
||||
v-for="item in com_decoration_status.filter((item) => item.value !== '0')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
@@ -134,8 +146,8 @@ const data = reactive<PageData<DecorationForm, DecorationQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
pageSize: 10,
|
||||
villageId: undefined,
|
||||
houseId: undefined,
|
||||
applyName: undefined,
|
||||
decorationCompany: undefined,
|
||||
@@ -216,7 +228,6 @@ const handleInspection = (row: DecorationVO) => {
|
||||
...form.value,
|
||||
...row
|
||||
};
|
||||
console.log(form.value);
|
||||
dialog.visible = true;
|
||||
dialog.title = '验收';
|
||||
};
|
||||
|
||||
@@ -100,7 +100,6 @@ function init() {
|
||||
...form.value,
|
||||
...res.data
|
||||
};
|
||||
console.log(form.value);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -113,6 +112,7 @@ if (route.query.id) {
|
||||
const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
form.value.villageId = Number(localStorage.getItem('villageid'));
|
||||
if (userid.value) {
|
||||
updateHandleLog(form.value).then(() => {
|
||||
ElMessage.success('编辑成功');
|
||||
|
||||
@@ -94,6 +94,7 @@ const initFormData: HandleLogForm = {
|
||||
const data = reactive<PageData<HandleLogForm, HandleLogQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
content: undefined,
|
||||
|
||||
129
src/views/system/HouseFacilities/addHouseFacilities.vue
Normal file
@@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<div class="AddBuildingBox">
|
||||
<PageHeader :title="userid ? '编辑房屋设施' : '添加房屋设施'"></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="name">
|
||||
<el-input v-model.trim="form.name" placeholder="请输入房屋设施名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="房屋设置状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio v-for="dict in com_repair_project_status" :value="dict.value" :key="dict.value" :label="dict.label"></el-radio>
|
||||
</el-radio-group>
|
||||
</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 { ref } from 'vue';
|
||||
import PageHeader from '@/components/Pageheader/index.vue';
|
||||
import { addHouseFacilities, getHouseFacilities, updateHouseFacilities } from '@/api/system/HouseFacilities';
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_repair_project_status } = toRefs<any>(proxy?.useDict('com_repair_project_status'));
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
||||
const formRef = ref();
|
||||
const form = ref({
|
||||
id: null,
|
||||
status: '0', // 状态 0启用 1停用
|
||||
name: null // 设施名称
|
||||
});
|
||||
const rules = ref({
|
||||
name: [{ required: true, message: '请输入设施名称', trigger: 'blur' }],
|
||||
status: [{ required: true, message: '请选择状态', trigger: 'blur' }]
|
||||
});
|
||||
const userid = ref(null);
|
||||
|
||||
if (route.query.id) {
|
||||
userid.value = route.query.id;
|
||||
getHouseFacilities(userid.value).then((res) => {
|
||||
form.value = {
|
||||
...form.value,
|
||||
...res.data
|
||||
};
|
||||
});
|
||||
}
|
||||
// !== 提交 =============================================================================
|
||||
// 提交
|
||||
const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
if (userid.value) {
|
||||
updateHouseFacilities(form.value).then((res) => {
|
||||
ElMessage.success('编辑成功');
|
||||
cancelForm();
|
||||
});
|
||||
} else {
|
||||
addHouseFacilities(form.value).then((res) => {
|
||||
ElMessage.success('添加成功');
|
||||
|
||||
cancelForm();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
// 推出
|
||||
const cancelForm = () => {
|
||||
router.push({
|
||||
path: '/system/HouseFacilities'
|
||||
});
|
||||
};
|
||||
</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: 500px;
|
||||
margin: 0 auto;
|
||||
&: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>
|
||||
226
src/views/system/HouseFacilities/index.vue
Normal file
@@ -0,0 +1,226 @@
|
||||
<template>
|
||||
<div class="h-full flex flex-col p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="设施名称" prop="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-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card class="flex-1" shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['houseFacilities:houseFacilities:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleUpdate()"
|
||||
v-hasPermi="['houseFacilities:houseFacilities:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete()"
|
||||
v-hasPermi="['houseFacilities:houseFacilities:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" border :data="houseFacilitiesList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="设施名称" align="center" prop="name" />
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="com_repair_project_status" :value="scope.row.status"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="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>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="HouseFacilities" lang="ts">
|
||||
import {
|
||||
listHouseFacilities,
|
||||
getHouseFacilities,
|
||||
delHouseFacilities,
|
||||
addHouseFacilities,
|
||||
updateHouseFacilities
|
||||
} from '@/api/system/HouseFacilities/index';
|
||||
import { HouseFacilitiesVO, HouseFacilitiesQuery, HouseFacilitiesForm } from '@/api/system/HouseFacilities/type';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_repair_project_status } = toRefs<any>(proxy?.useDict('com_repair_project_status'));
|
||||
|
||||
const houseFacilitiesList = ref<HouseFacilitiesVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const houseFacilitiesFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: HouseFacilitiesForm = {
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
status: undefined,
|
||||
createName: undefined
|
||||
};
|
||||
const data = reactive<PageData<HouseFacilitiesForm, HouseFacilitiesQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: undefined,
|
||||
status: undefined,
|
||||
createName: undefined,
|
||||
params: {}
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form } = toRefs(data);
|
||||
|
||||
/** 查询房屋设施管理列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listHouseFacilities(queryParams.value);
|
||||
houseFacilitiesList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
};
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
houseFacilitiesFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: HouseFacilitiesVO[]) => {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
const router = useRouter();
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
router.push({
|
||||
path: '/system/addHouseFacilities'
|
||||
});
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: HouseFacilitiesVO) => {
|
||||
router.push({
|
||||
path: '/system/addHouseFacilities',
|
||||
query: {
|
||||
id: row.id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
houseFacilitiesFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.id) {
|
||||
await updateHouseFacilities(form.value).finally(() => (buttonLoading.value = false));
|
||||
} else {
|
||||
await addHouseFacilities(form.value).finally(() => (buttonLoading.value = false));
|
||||
}
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: HouseFacilitiesVO) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除房屋设施管理编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||
await delHouseFacilities(_ids);
|
||||
proxy?.$modal.msgSuccess('删除成功');
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
'houseFacilities/houseFacilities/export',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`houseFacilities_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-table {
|
||||
height: calc(100% - 80px);
|
||||
}
|
||||
</style>
|
||||
@@ -103,6 +103,7 @@ const formRef = ref();
|
||||
const form = ref({
|
||||
id: null,
|
||||
cardCode: '', // 月卡编号
|
||||
villageId: Number(localStorage.getItem('villageid')), // 月卡编号
|
||||
cardName: null, // 持卡人姓名
|
||||
phone: '', // 手机号
|
||||
carNum: null, // 绑定车牌号
|
||||
@@ -170,18 +171,17 @@ if (route.query.id) {
|
||||
const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
form.value.villageId = Number(localStorage.getItem('villageid'));
|
||||
if (!form.value.startTime.trim() || !form.value.endTime.trim()) {
|
||||
ElMessage.warning('请选择有效日期');
|
||||
}
|
||||
if (userid.value) {
|
||||
updateMonthCard(form.value).then((res) => {
|
||||
console.log(res);
|
||||
ElMessage.success('编辑成功');
|
||||
cancelForm();
|
||||
});
|
||||
} else {
|
||||
addMonthCard(form.value).then((res) => {
|
||||
console.log(res);
|
||||
ElMessage.success('添加成功');
|
||||
|
||||
cancelForm();
|
||||
|
||||
@@ -178,6 +178,7 @@ const data = reactive<PageData<MonthCardForm, MonthCardQuery>>({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
handleTime: undefined,
|
||||
cardName: undefined,
|
||||
phone: undefined,
|
||||
|
||||
@@ -32,7 +32,9 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否发布" prop="publishStatus">
|
||||
<el-radio-group v-model="form.publishStatus">
|
||||
<el-radio v-for="dict in com_publish_status" :key="dict.value" :value="Number(dict.value)">{{ dict.label }}</el-radio>
|
||||
<el-radio v-for="dict in com_publish_status" :key="dict.value" :value="Number(dict.value)">{{
|
||||
dict.value === '0' ? dict.label : '发布'
|
||||
}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -65,7 +67,6 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import PageHeader from '@/components/Pageheader/index.vue';
|
||||
import { addComplaintType, getComplaintType, updateComplaintType } from '@/api/system/ComplainType';
|
||||
import { addNotice, getNotice } from '@/api/system/NoticePc/index';
|
||||
import { updateNotice } from '@/api/system/NoticePc';
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
@@ -79,8 +80,8 @@ const form = ref({
|
||||
'id': null,
|
||||
'author': '',
|
||||
'noticeTitle': '',
|
||||
'urgencyLevel': '0',
|
||||
'publishStatus': '1',
|
||||
'urgencyLevel': 0,
|
||||
'publishStatus': 1,
|
||||
'noticeContent': ''
|
||||
});
|
||||
const rules = {
|
||||
@@ -103,7 +104,6 @@ function init() {
|
||||
...form.value,
|
||||
...res.data
|
||||
};
|
||||
console.log(form.value);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -116,6 +116,7 @@ if (route.query.id) {
|
||||
const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
form.value.villageId = Number(localStorage.getItem('villageid'));
|
||||
if (userid.value) {
|
||||
updateNotice(form.value).then(() => {
|
||||
ElMessage.success('编辑成功');
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<el-table v-loading="loading" border :data="noticeList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="公告标题" align="center" prop="noticeTitle" />
|
||||
<el-table-column label="作者" align="center" prop="author" />
|
||||
<el-table-column label="作者" width="120" align="center" prop="author" />
|
||||
<el-table-column label="紧急程度" align="center" prop="urgencyLevel">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="com_noticepc_level" :value="scope.row.urgencyLevel"></dict-tag>
|
||||
@@ -51,8 +51,8 @@
|
||||
<dict-tag :options="com_publish_status" :value="scope.row.publishStatus"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已读" align="center" prop="readNum" />
|
||||
<el-table-column label="未读" align="center" prop="unReadNum" />
|
||||
<el-table-column label="已读" width="120" align="center" prop="readNum" />
|
||||
<el-table-column label="未读" width="120" align="center" prop="unReadNum" />
|
||||
<el-table-column label="发布人" align="center" prop="publishBy" />
|
||||
<el-table-column label="发布日期" align="center" prop="publishTime" width="100">
|
||||
<template #default="scope">
|
||||
@@ -90,7 +90,6 @@ const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const noticeFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
@@ -110,6 +109,7 @@ const initFormData: NoticeForm = {
|
||||
const data = reactive<PageData<NoticeForm, NoticeQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
noticeTitle: undefined,
|
||||
|
||||
@@ -125,7 +125,7 @@ const route = useRoute();
|
||||
const formRef = ref();
|
||||
const form = ref({
|
||||
id: null,
|
||||
villageId: '', // 所属小区id
|
||||
villageId: Number(localStorage.getItem('villageid')), // 所属小区id
|
||||
areaId: null, // 区域id
|
||||
parkingId: '', // 车位id
|
||||
chargeItem: '0', // 临时停车
|
||||
@@ -177,31 +177,25 @@ const rules = ref({
|
||||
});
|
||||
const userid = ref(null);
|
||||
|
||||
// 小区
|
||||
const currentviliage = ref();
|
||||
// 区域
|
||||
const CarArealist = ref([]);
|
||||
// 车位
|
||||
const Parkinglist = ref([]);
|
||||
function init() {
|
||||
getCommunitylistAPI().then((res) => {
|
||||
currentviliage.value = res.rows.find((item) => item.choiceStatus === 0);
|
||||
listArea().then((res) => {
|
||||
CarArealist.value = res.rows;
|
||||
});
|
||||
if (route.query.id) {
|
||||
userid.value = route.query.id;
|
||||
form.value.id = userid.value;
|
||||
getParkingCost(userid.value).then((res) => {
|
||||
form.value = {
|
||||
...form.value,
|
||||
...res.data
|
||||
};
|
||||
checkDate.value = [form.value.startTime, form.value.endTime];
|
||||
});
|
||||
}
|
||||
form.value.villageId = currentviliage.value.villageId;
|
||||
listArea().then((res) => {
|
||||
CarArealist.value = res.rows;
|
||||
});
|
||||
if (route.query.id) {
|
||||
userid.value = route.query.id;
|
||||
form.value.id = userid.value;
|
||||
getParkingCost(userid.value).then((res) => {
|
||||
form.value = {
|
||||
...form.value,
|
||||
...res.data
|
||||
};
|
||||
checkDate.value = [form.value.startTime, form.value.endTime];
|
||||
});
|
||||
}
|
||||
}
|
||||
init();
|
||||
|
||||
@@ -221,15 +215,14 @@ function handleArea(val: string) {
|
||||
const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
form.value.villageId = Number(localStorage.getItem('villageid'));
|
||||
if (userid.value) {
|
||||
updateParkingCost(form.value).then((res) => {
|
||||
console.log(res);
|
||||
ElMessage.success('编辑成功');
|
||||
cancelForm();
|
||||
});
|
||||
} else {
|
||||
addParkingCost(form.value).then((res) => {
|
||||
console.log(res);
|
||||
ElMessage.success('添加成功');
|
||||
|
||||
cancelForm();
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<el-table v-loading="loading" border :data="parkingCostList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="车位" align="center" prop="areaId">
|
||||
<template #default="scope"> {{ scope.row.areaName }} - {{ scope.row.parkingName }} </template>
|
||||
<template #default="scope"> {{ scope.row.name }} </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="收费项目" align="center" prop="chargeItem">
|
||||
<template #default="scope">
|
||||
@@ -143,6 +143,7 @@ const data = reactive<PageData<ParkingCostForm, ParkingCostQuery>>({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
areaId: undefined,
|
||||
parkingId: undefined,
|
||||
chargeItem: undefined,
|
||||
@@ -153,7 +154,6 @@ const data = reactive<PageData<ParkingCostForm, ParkingCostQuery>>({
|
||||
cost: undefined,
|
||||
payerStatus: undefined,
|
||||
payMethod: undefined,
|
||||
villageId: undefined,
|
||||
params: {}
|
||||
},
|
||||
rules: {
|
||||
@@ -162,32 +162,12 @@ const data = reactive<PageData<ParkingCostForm, ParkingCostQuery>>({
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
const Arealist = ref([]);
|
||||
const Parkinglist = ref([]);
|
||||
|
||||
/** 查询停车缴费管理列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
// 车位
|
||||
const rows = await listParking();
|
||||
Parkinglist.value = rows.rows;
|
||||
// 车辆区域
|
||||
const arealist = await listArea();
|
||||
Arealist.value = arealist.rows;
|
||||
// 停车缴费
|
||||
const res = await listParkingCost(queryParams.value);
|
||||
parkingCostList.value = res.rows;
|
||||
parkingCostList.value.forEach((parkingCost) => {
|
||||
const find = Parkinglist.value.find((item) => item.id === parkingCost.parkingId);
|
||||
const areaFind = Arealist.value.find((item) => item.id === parkingCost.areaId);
|
||||
if (areaFind) {
|
||||
parkingCost.areaName = `${areaFind.areaName}(${areaFind.areaCode})`;
|
||||
}
|
||||
if (find) {
|
||||
parkingCost.parkingName = find.parkingCode;
|
||||
}
|
||||
});
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
@@ -94,7 +94,6 @@ const route = useRoute();
|
||||
|
||||
import { useHouseStore } from '@/store/modules/house';
|
||||
import { listResident } from '@/api/system/resident';
|
||||
const houseStore = useHouseStore();
|
||||
|
||||
const form = ref({
|
||||
scope: '0',
|
||||
@@ -175,7 +174,6 @@ async function handleEdit(id: string | number) {
|
||||
async function handleSave(data: QuestionnaireForm) {
|
||||
try {
|
||||
// 父组件自己调用接口提交
|
||||
console.log(data);
|
||||
if (userid.value) {
|
||||
await updateQuestionnaire({
|
||||
...data,
|
||||
@@ -183,7 +181,8 @@ async function handleSave(data: QuestionnaireForm) {
|
||||
status: '0', // 草稿状态
|
||||
startTime: timedata.value[0],
|
||||
endTime: timedata.value[1],
|
||||
...form.value
|
||||
...form.value,
|
||||
villageId: Number(localStorage.getItem('villageid'))
|
||||
});
|
||||
} else {
|
||||
await addQuestionnaire({
|
||||
@@ -192,7 +191,8 @@ async function handleSave(data: QuestionnaireForm) {
|
||||
status: '0', // 草稿状态
|
||||
startTime: timedata.value[0],
|
||||
endTime: timedata.value[1],
|
||||
...form.value
|
||||
...form.value,
|
||||
villageId: Number(localStorage.getItem('villageid'))
|
||||
});
|
||||
}
|
||||
ElMessage.success('保存成功');
|
||||
@@ -212,7 +212,7 @@ async function handlePublish(data: QuestionnaireForm) {
|
||||
content: JSON.stringify(data.content),
|
||||
status: '1', // 发布状态
|
||||
startTime: timedata.value[0],
|
||||
villageId: houseStore.currentVilageInfo.villageId,
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
endTime: timedata.value[1]
|
||||
});
|
||||
} else {
|
||||
@@ -221,7 +221,7 @@ async function handlePublish(data: QuestionnaireForm) {
|
||||
content: JSON.stringify(data.content),
|
||||
status: '1', // 发布状态
|
||||
startTime: timedata.value[0],
|
||||
villageId: houseStore.currentVilageInfo.villageId,
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
endTime: timedata.value[1]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -199,7 +199,6 @@ function handleCancel(): void {
|
||||
|
||||
/** 保存草稿 */
|
||||
function handleSave(): void {
|
||||
console.log(form.value, !validateForm());
|
||||
if (!validateForm()) return;
|
||||
emit('save', { ...form.value });
|
||||
}
|
||||
|
||||
@@ -97,7 +97,6 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const { com_questionnaire_scope } = toRefs<any>(proxy?.useDict('com_questionnaire_scope'));
|
||||
const { com_questionnaire_status } = toRefs<any>(proxy?.useDict('com_questionnaire_status'));
|
||||
console.log(com_questionnaire_scope);
|
||||
|
||||
const questionnaireList = ref<QuestionnaireVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
@@ -130,6 +129,7 @@ const initFormData: QuestionnaireForm = {
|
||||
const data = reactive<PageData<QuestionnaireForm, QuestionnaireQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
villageId: undefined,
|
||||
|
||||
@@ -162,7 +162,6 @@ function init() {
|
||||
};
|
||||
})
|
||||
.filter((item) => item);
|
||||
console.log(fileList.value);
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -186,7 +185,6 @@ const handlePictureCardPreview: UploadProps['onPreview'] = (uploadFile) => {
|
||||
|
||||
// !== 选择报修人 ====================================================================
|
||||
function handleChangeResident(val: string | number) {
|
||||
console.log(val);
|
||||
form.value.residentId = val;
|
||||
}
|
||||
|
||||
@@ -199,7 +197,6 @@ function handleChangehouse(val: (string | number)[]) {
|
||||
}
|
||||
}
|
||||
function handleChangemaintenanceItem(val: (string | number)[]) {
|
||||
console.log(val);
|
||||
if (val.length >= 2) {
|
||||
form.value.maintenanceItemId = val.pop() as number;
|
||||
} else {
|
||||
@@ -249,15 +246,14 @@ const submitForm = () => {
|
||||
|
||||
const sendForm = (str: string) => {
|
||||
form.value.problemImageUrl = str;
|
||||
form.value.villageId = Number(localStorage.getItem('villageid'));
|
||||
if (userid.value) {
|
||||
updateRepair(form.value).then((res) => {
|
||||
console.log(res);
|
||||
ElMessage.success('编辑成功');
|
||||
cancelForm();
|
||||
});
|
||||
} else {
|
||||
addRepair(form.value).then((res) => {
|
||||
console.log(res);
|
||||
ElMessage.success('添加成功');
|
||||
|
||||
cancelForm();
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<el-col :span="2"></el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="项目类型" prop="projectType">
|
||||
<el-radio-group v-model="form.projectType">
|
||||
<el-radio-group :disabled="form.projectLevel === '1'" v-model="form.projectType">
|
||||
<el-radio v-for="item in com_repair_project_types" :key="item.id" :value="item.value">{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
@@ -40,7 +40,7 @@
|
||||
<el-row v-if="form.projectLevel === '1'">
|
||||
<el-col :span="11">
|
||||
<el-form-item label="隶属父级" prop="email">
|
||||
<el-select v-model="form.parentId" placeholder="请选择隶属父级" style="width: 240px">
|
||||
<el-select @change="handleChange" v-model="form.parentId" placeholder="请选择隶属父级" style="width: 240px">
|
||||
<el-option v-for="item in options" :key="item.id" :label="item.projectName" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -60,7 +60,6 @@
|
||||
import { ref } from 'vue';
|
||||
import PageHeader from '@/components/Pageheader/index.vue';
|
||||
import { addRepairProject, listRepairProject, updateRepairProject } from '@/api/system/RepairProject';
|
||||
import { buildTreeByLevel } from '@/utils';
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_repair_project_types } = toRefs<any>(proxy?.useDict('com_repair_project_types'));
|
||||
const { com_repair_project_status } = toRefs<any>(proxy?.useDict('com_repair_project_status'));
|
||||
@@ -87,10 +86,17 @@ const rules = ref({
|
||||
});
|
||||
const userid = ref(null);
|
||||
const options = ref([]);
|
||||
|
||||
function handleChange(val) {
|
||||
const find = options.value.find((item) => item.id === val);
|
||||
if (find) {
|
||||
form.value.projectType = find.projectType;
|
||||
}
|
||||
}
|
||||
// != ==========================================
|
||||
|
||||
function init() {
|
||||
listRepairProject({ pageSize: 999999999, pageNum: 1 }).then((res) => {
|
||||
listRepairProject().then((res) => {
|
||||
const arr = res.rows.filter((ite) => ite.projectLevel === 0);
|
||||
options.value = arr;
|
||||
if (route.query.id) {
|
||||
@@ -112,7 +118,7 @@ init();
|
||||
const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
console.log(form.value);
|
||||
form.value.villageId = Number(localStorage.getItem('villageid'));
|
||||
if (!userid.value) {
|
||||
addRepairProject(form.value).then(() => {
|
||||
ElMessage.success('添加成功');
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
|
||||
<el-table v-loading="loading" border :data="repairList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="报修房屋" align="center" prop="name" />
|
||||
<el-table-column label="维修项目" align="center" prop="maintenanceItemPath" />
|
||||
<el-table-column label="报修房屋" align="center" prop="houseName" />
|
||||
<el-table-column label="维修项目" align="center" prop="maintenanceItemName" />
|
||||
<el-table-column label="问题描述" align="center" prop="problem" />
|
||||
<el-table-column label="报修人" align="center" prop="residentName" />
|
||||
<el-table-column label="预约日期" align="center" prop="orderDate" width="180">
|
||||
@@ -127,6 +127,7 @@ const data = reactive<PageData<RepairForm, RepairQuery>>({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
houseId: undefined,
|
||||
maintenanceItemId: undefined,
|
||||
problem: undefined,
|
||||
@@ -147,19 +148,6 @@ const data = reactive<PageData<RepairForm, RepairQuery>>({
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
// != 维修项目u ===========================================================================
|
||||
const RepariPorjectlist = ref([]);
|
||||
const residentlist = ref([]);
|
||||
function init() {
|
||||
listRepairProject().then((res) => {
|
||||
RepariPorjectlist.value = res.rows;
|
||||
});
|
||||
listResident().then((res) => {
|
||||
residentlist.value = res.rows;
|
||||
});
|
||||
}
|
||||
init();
|
||||
|
||||
// != 维修项目u ===========================================================================
|
||||
|
||||
/** 查询报修管理列表 */
|
||||
@@ -167,24 +155,6 @@ const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listRepair(queryParams.value);
|
||||
repairList.value = res.rows;
|
||||
repairList.value.forEach((item2) => {
|
||||
// 维修项目
|
||||
const find = RepariPorjectlist.value.find((item) => item.id === item2.maintenanceItemId);
|
||||
item2.maintenanceItemPath = '';
|
||||
if (find) {
|
||||
item2.maintenanceItemPath = find.projectName;
|
||||
if (find.parentId) {
|
||||
const find2 = RepariPorjectlist.value.find((item3) => item3.id === find.parentId);
|
||||
console.log(find2);
|
||||
item2.maintenanceItemPath = find2.projectName + ' - ' + item2.maintenanceItemPath;
|
||||
}
|
||||
}
|
||||
// 住户
|
||||
const find2 = residentlist.value.find((item) => item.id === item2.residentId);
|
||||
if (find2) {
|
||||
item2.residentName = find2.name;
|
||||
}
|
||||
});
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
@@ -90,12 +90,10 @@
|
||||
<span>分配工单</span>
|
||||
</div>
|
||||
</template>
|
||||
<div class="w-full h-full flex mt-2">
|
||||
<div class="preivewBody w-full h-full flex flex-items-start mt-2">
|
||||
<div class="title">维修师傅</div>
|
||||
<div class="preivewBodybox flex-1 ml-5">
|
||||
<div class="">
|
||||
<repairUser :userid="form.repairId" @change="handleChange"></repairUser>
|
||||
</div>
|
||||
<repairUser :userid="form.repairId" @change="handleChange"></repairUser>
|
||||
<div class="actions mt-5">
|
||||
<el-button @click="handleSend" type="primary">确定派单</el-button>
|
||||
<el-button @click="backRouter">返回</el-button>
|
||||
@@ -343,6 +341,9 @@ function handleEdit() {
|
||||
.subtitle {
|
||||
font-size: 15px;
|
||||
}
|
||||
.preivewBody {
|
||||
font-size: 16px;
|
||||
}
|
||||
.repairBox {
|
||||
width: 350px;
|
||||
height: 35px;
|
||||
|
||||
@@ -20,26 +20,23 @@
|
||||
<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="['repairProject:repairProject:add']">新增维修类</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete()"
|
||||
v-hasPermi="['repairProject:repairProject:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-button style="width: 100px" type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repairProject:repairProject:add']"
|
||||
>新增维修类</el-button
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete()"
|
||||
v-hasPermi="['repairProject:repairProject:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table
|
||||
class="h-full"
|
||||
:tree-props="{ children: 'children' }"
|
||||
v-loading="loading"
|
||||
border
|
||||
@@ -89,32 +86,15 @@
|
||||
<dict-tag :options="com_repair_project_status" :value="scope.row.status || ''"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" width="350" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="add" @click="handleUpdate(scope.row)"></el-button>
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['repairProject:repairProject:edit']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['repairProject:repairProject:remove']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<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>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<!-- <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" /> -->
|
||||
</el-card>
|
||||
<!-- 添加或修改报修维修项目管理对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
@@ -206,19 +186,15 @@ const initFormData: RepairProjectForm = {
|
||||
const data = reactive<PageData<RepairProjectForm, RepairProjectQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
projectName: undefined,
|
||||
parentId: undefined,
|
||||
projectType: undefined,
|
||||
projectLevel: undefined,
|
||||
sortOrder: undefined,
|
||||
status: undefined,
|
||||
params: {}
|
||||
status: undefined
|
||||
},
|
||||
rules: {
|
||||
id: [{ required: true, message: '维修项目表id不能为空', trigger: 'blur' }]
|
||||
}
|
||||
rules: {}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
@@ -327,3 +303,9 @@ onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-table {
|
||||
height: calc(100% - 80px);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -94,6 +94,7 @@ const data = reactive<PageData<VisitorForm, VisitorQuery>>({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
houseId: undefined,
|
||||
visitorName: undefined,
|
||||
visitorGender: undefined,
|
||||
|
||||
@@ -9,31 +9,33 @@
|
||||
</div>
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-col :span="14">
|
||||
<div class="grid grid-cols-3 grid-rows-3">
|
||||
<div class="carinfo_item">
|
||||
<div class="label">访问房屋:</div>
|
||||
<div class="main">北境碧桂园小区A栋2单元402</div>
|
||||
<div class="main">{{ form.houseName }}</div>
|
||||
</div>
|
||||
<div class="carinfo_item">
|
||||
<div class="label">访客姓名:</div>
|
||||
<div class="main">李淑一</div>
|
||||
<div class="main">{{ form.visitorName }}</div>
|
||||
</div>
|
||||
<div class="carinfo_item">
|
||||
<div class="label">访客性别:</div>
|
||||
<div class="main">男</div>
|
||||
<div class="main">
|
||||
<DictTag :options="sys_user_sex" :value="form.visitorGender"></DictTag>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carinfo_item">
|
||||
<div class="label">手机号码:</div>
|
||||
<div class="main">15020360831</div>
|
||||
<div class="main">{{ form.visitorPhone }}</div>
|
||||
</div>
|
||||
<div class="carinfo_item">
|
||||
<div class="label">访问日期:</div>
|
||||
<div class="main">2024/05/08</div>
|
||||
<div class="main">{{ form.startTime }} - {{ form.endTime }}</div>
|
||||
</div>
|
||||
<div class="carinfo_item">
|
||||
<div class="label">访问时长:</div>
|
||||
<div class="main">3h</div>
|
||||
<div class="main">{{ formatTimeDiff(form.startTime, form.endTime) }}</div>
|
||||
</div>
|
||||
<div class="carinfo_item">
|
||||
<div class="label">访问业主:</div>
|
||||
@@ -44,14 +46,18 @@
|
||||
</div>
|
||||
<div class="carinfo_item">
|
||||
<div class="label">提交时间:</div>
|
||||
<div class="main">2024/09/15 22:48</div>
|
||||
<div class="main">{{ form.startTime }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="5"></el-col>
|
||||
<el-col :span="6">
|
||||
<div>
|
||||
<el-col :span="4">
|
||||
<div class="flex">
|
||||
<div>通行证</div>
|
||||
<div class="content-imageBox">
|
||||
<i></i>
|
||||
<el-image :src="form.url"></el-image>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -78,30 +84,55 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import PageHeader from '@/components/Pageheader/index.vue';
|
||||
import { getVisitor } from '@/api/system/Visitor';
|
||||
import { formatTimeDiff } from '@/utils/time';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { sys_user_sex } = toRefs<any>(proxy?.useDict('sys_user_sex'));
|
||||
|
||||
const tableData = [
|
||||
{
|
||||
date: '2016-05-03',
|
||||
name: 'Tom',
|
||||
address: 'No. 189, Grove St, Los Angeles'
|
||||
date: '西大门',
|
||||
name: '2026-04-13 13:38:11'
|
||||
},
|
||||
{
|
||||
date: '2016-05-02',
|
||||
name: 'Tom',
|
||||
address: 'No. 189, Grove St, Los Angeles'
|
||||
},
|
||||
{
|
||||
date: '2016-05-04',
|
||||
name: 'Tom',
|
||||
address: 'No. 189, Grove St, Los Angeles'
|
||||
},
|
||||
{
|
||||
date: '2016-05-01',
|
||||
name: 'Tom',
|
||||
address: 'No. 189, Grove St, Los Angeles'
|
||||
date: '西大门',
|
||||
name: '2026-05-30 02:31:16'
|
||||
}
|
||||
];
|
||||
|
||||
const userid = ref(null);
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const form = ref({
|
||||
'id': null,
|
||||
'houseId': null,
|
||||
'visitorName': '',
|
||||
'villageId': null,
|
||||
'houseName': '',
|
||||
'visitorGender': '0',
|
||||
'visitorPhone': '',
|
||||
'carNum': null,
|
||||
'visitorNum': null,
|
||||
'startTime': '',
|
||||
'endTime': '',
|
||||
'type': '1',
|
||||
'status': '0',
|
||||
'url': ''
|
||||
});
|
||||
function init() {
|
||||
if (route.query.id) {
|
||||
userid.value = route.query.id;
|
||||
getVisitor(userid.value).then((res) => {
|
||||
form.value = {
|
||||
...form.value,
|
||||
...res.data
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
init();
|
||||
|
||||
function back() {
|
||||
router.push({
|
||||
path: '/repair/visitorlist'
|
||||
@@ -127,7 +158,7 @@ function back() {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.label {
|
||||
width: 100px;
|
||||
width: 150px;
|
||||
text-align: right;
|
||||
font-weight: bolder;
|
||||
margin-right: 30px;
|
||||
@@ -153,4 +184,68 @@ function back() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
.content-imageBox {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
position: relative;
|
||||
background: transparent;
|
||||
|
||||
i {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* 四个角 */
|
||||
.content-imageBox ::before,
|
||||
.content-imageBox ::after,
|
||||
.content-imageBox i::before,
|
||||
.content-imageBox i::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 20px; /* 角的大小 */
|
||||
height: 20px;
|
||||
border-color: #1677ff; /* 边框颜色 */
|
||||
border-width: 3px;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
/* 左上角 */
|
||||
.content-imageBox ::before {
|
||||
top: 0;
|
||||
left: 0;
|
||||
border-right: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* 右上角 */
|
||||
.content-imageBox ::after {
|
||||
top: 0;
|
||||
right: 0;
|
||||
border-left: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* 左下角 */
|
||||
.content-imageBox i::before {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
border-right: none;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
/* 右下角 */
|
||||
.content-imageBox i::after {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
border-left: none;
|
||||
border-top: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -61,7 +61,7 @@ const route = useRoute();
|
||||
const formRef = ref();
|
||||
const form = ref({
|
||||
id: null,
|
||||
villageId: null,
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
areaName: null,
|
||||
areaCode: null,
|
||||
area: null,
|
||||
@@ -90,6 +90,7 @@ if (route.query.id) {
|
||||
const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
form.value.villageId = Number(localStorage.getItem('villageid'));
|
||||
if (parkingid.value) {
|
||||
updateArea(form.value).then(() => {
|
||||
ElMessage.success('编辑成功');
|
||||
|
||||
@@ -97,6 +97,7 @@ const data = reactive<PageData<AreaForm, AreaQuery>>({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
areaName: undefined,
|
||||
areaCode: undefined,
|
||||
area: undefined,
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item label="持有人">
|
||||
<!-- 公共组件 持有人 -->
|
||||
<Holder :userid="String(form.residentId)" @change="handleChange"></Holder>
|
||||
<Holder :userid="form.residentId" @change="handleChange"></Holder>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -121,6 +121,7 @@ const form = ref({
|
||||
id: null,
|
||||
areaId: null, // 区域id
|
||||
residentId: null, // 车位id
|
||||
villageId: Number(localStorage.getItem('villageid')), // 小区id
|
||||
parkingId: null, // 持有人id
|
||||
carNum: '', //车牌号
|
||||
carBrand: '', //车辆品牌
|
||||
@@ -175,7 +176,6 @@ const carArealist = ref([]);
|
||||
const parkinglist = ref([]);
|
||||
function init() {
|
||||
listArea().then((res) => {
|
||||
console.log(res);
|
||||
carArealist.value = res.rows;
|
||||
});
|
||||
}
|
||||
@@ -193,13 +193,11 @@ if (route.query.id) {
|
||||
}
|
||||
|
||||
function changeArealist(val: string) {
|
||||
console.log(val, typeof val);
|
||||
listParking({
|
||||
areaId: val,
|
||||
pageSize: 9999999,
|
||||
pageNum: 1
|
||||
}).then((res) => {
|
||||
console.log(res);
|
||||
parkinglist.value = res.rows;
|
||||
});
|
||||
}
|
||||
@@ -209,17 +207,14 @@ function changeArealist(val: string) {
|
||||
const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
console.log(form.value);
|
||||
form.value.villageId = Number(localStorage.getItem('villageid'));
|
||||
if (userid.value.trim() !== '') {
|
||||
console.log('edit');
|
||||
updateCar(form.value).then((res) => {
|
||||
updateCar(form.value).then(() => {
|
||||
ElMessage.success('编辑成功');
|
||||
cancelForm();
|
||||
});
|
||||
} else {
|
||||
console.log('add');
|
||||
addCar(form.value).then((res) => {
|
||||
console.log(res);
|
||||
addCar(form.value).then(() => {
|
||||
ElMessage.success('添加成功');
|
||||
cancelForm();
|
||||
});
|
||||
|
||||
@@ -109,6 +109,7 @@ const data = reactive<PageData<CarForm, CarQuery>>({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
areaId: undefined,
|
||||
parkingId: undefined,
|
||||
residentId: undefined,
|
||||
@@ -129,7 +130,9 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
/** 持有人 */
|
||||
const ResidentList = ref([]);
|
||||
const getResidentName = (id: string | number) => {
|
||||
const find = ResidentList.value.find((item) => item.id === id);
|
||||
console.log(ResidentList.value, id);
|
||||
const find = ResidentList.value.find((item) => item.id == id);
|
||||
console.log(find);
|
||||
return find.name;
|
||||
};
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="楼栋类型" prop="buildingUse">
|
||||
<el-select v-model="form.buildingUse" placeholder="选择楼栋类型">
|
||||
<el-option v-for="(item, index) in housetypelist" :key="index" :label="item" :value="index"></el-option>
|
||||
<el-option v-for="(item, index) in com_build_use" :key="index" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="楼栋朝向" prop="buildToward">
|
||||
@@ -45,13 +45,16 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import PageHeader from '@/components/Pageheader/index.vue';
|
||||
import { getCommunitylistAPI } from '@/api/system/community';
|
||||
import { addBuildingApi, editBuildingApi } from '@/api/system/house';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useHouseStore } from '@/store/modules/house';
|
||||
|
||||
const houseStore = useHouseStore();
|
||||
const { currentVilageInfo } = storeToRefs(houseStore);
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_build_use } = toRefs<any>(proxy?.useDict('com_build_use'));
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const formRef = ref();
|
||||
@@ -59,12 +62,11 @@ const form = ref({
|
||||
buildingName: '',
|
||||
buildToward: '',
|
||||
buildTall: '',
|
||||
buildingUse: 0,
|
||||
buildingUse: '0',
|
||||
buildStructure: '',
|
||||
unitCount: null,
|
||||
floorCount: null
|
||||
});
|
||||
const housetypelist = ['住宅', '办公', '商用', '公寓'];
|
||||
const rules = ref({
|
||||
buildingName: [{ required: true, message: '请输入楼栋名称', trigger: 'blur' }],
|
||||
buildingUse: [{ required: true, message: '请选择楼栋类型', trigger: 'blur' }],
|
||||
@@ -74,15 +76,12 @@ const rules = ref({
|
||||
// 判断新增还是编辑
|
||||
const buildingId = route.query.buildingId as string;
|
||||
if (buildingId) {
|
||||
console.log('edit');
|
||||
getBuildingById();
|
||||
} else {
|
||||
console.log('add');
|
||||
}
|
||||
|
||||
/** 编辑楼栋 */
|
||||
function getBuildingById() {
|
||||
console.log(houseStore.currentBuildingInfoList);
|
||||
houseStore.currentBuildingInfoList.forEach((item) => {
|
||||
if (item.id == buildingId) {
|
||||
form.value.buildingName = item.buildingName;
|
||||
@@ -98,9 +97,7 @@ function getBuildingById() {
|
||||
const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
console.log(form.value);
|
||||
if (buildingId) {
|
||||
console.log('修改');
|
||||
editBuildingApi({
|
||||
...form.value,
|
||||
villageId: currentVilageInfo.value.villageId,
|
||||
@@ -115,7 +112,6 @@ const submitForm = () => {
|
||||
ElMessage.error('修改失败');
|
||||
});
|
||||
} else {
|
||||
console.log(' 添加');
|
||||
addBuildingApi({
|
||||
...form.value,
|
||||
villageId: currentVilageInfo.value.villageId
|
||||
|
||||
@@ -123,7 +123,6 @@ if (route.query.id) {
|
||||
};
|
||||
housetype.value = res.data.houseType.split('');
|
||||
handlechangeBuild(form.value.buildingId);
|
||||
console.log(form.value);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -142,7 +141,6 @@ function handlechangeBuild(id: string) {
|
||||
name: index + 1 + '楼'
|
||||
};
|
||||
});
|
||||
console.log(units.value, floors.value);
|
||||
});
|
||||
}
|
||||
const submitForm = () => {
|
||||
@@ -156,16 +154,15 @@ const submitForm = () => {
|
||||
if (houseid.value) {
|
||||
EditHouseApi(data).then(() => {
|
||||
ElMessage.success('修改成功');
|
||||
houseStore.switchBuilding(houseStore.currentBuildingInfo.id);
|
||||
houseStore.updateCureentBuilding();
|
||||
router.push({
|
||||
path: '/house/houselist'
|
||||
});
|
||||
});
|
||||
} else {
|
||||
addHouseAPI(data).then((res) => {
|
||||
console.log(res);
|
||||
ElMessage.success('添加成功');
|
||||
houseStore.switchBuilding(houseStore.currentBuildingInfo.id);
|
||||
houseStore.updateCureentBuilding();
|
||||
router.push({
|
||||
path: '/house/houselist'
|
||||
});
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
}"
|
||||
:key="index"
|
||||
>
|
||||
<div class="buildingname" @click="switchBuilding(item.id)">{{ item.buildingName ?? '测试数据' }}</div>
|
||||
<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)"><Setting /></el-icon>
|
||||
<el-icon class="pointer hover-color-red" @click="deleteBuilding(item.id)"><Delete /></el-icon>
|
||||
@@ -27,10 +27,12 @@
|
||||
<script setup lang="ts">
|
||||
import { deleteBuildingApi } from '@/api/system/house';
|
||||
import { useHouseStore } from '@/store/modules/house';
|
||||
|
||||
const houseStore = useHouseStore();
|
||||
const { switchBuilding } = houseStore; // 方法
|
||||
const { currentBuildingInfoList, currentBuildingInfo } = storeToRefs(houseStore); // 数据
|
||||
const router = useRouter();
|
||||
|
||||
const handleAddBuilding = () => {
|
||||
router.push({
|
||||
path: '/house/addbuilding'
|
||||
@@ -47,12 +49,9 @@ const editBuilding = (id: number) => {
|
||||
const deleteBuilding = (id: number) => {
|
||||
deleteBuildingApi(id)
|
||||
.then(() => {
|
||||
console.log('删除成功');
|
||||
houseStore.deleteBuildingFun(id);
|
||||
})
|
||||
.catch(() => {
|
||||
console.log('删除失败');
|
||||
});
|
||||
.catch(() => {});
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ function handleChangeCheckhouses(val: string[]) {
|
||||
function contextMenuFun(val: { type: string; value: string }) {
|
||||
switch (val.type) {
|
||||
case 'edit':
|
||||
console.log('你选择了:', val);
|
||||
router.push({
|
||||
path: '/house/addHouse',
|
||||
query: {
|
||||
@@ -56,7 +55,6 @@ function contextMenuFun(val: { type: string; value: string }) {
|
||||
console.log('你选择了:', val);
|
||||
break;
|
||||
case 'main':
|
||||
console.log('你选择了:', val);
|
||||
router.push({
|
||||
path: '/house/HouseDetails',
|
||||
query: {
|
||||
@@ -65,7 +63,6 @@ function contextMenuFun(val: { type: string; value: string }) {
|
||||
});
|
||||
break;
|
||||
case 'delete':
|
||||
console.log('你选择了:', val);
|
||||
deleteHouseApi(val.value).then(() => {
|
||||
ElMessage.success('删除成功');
|
||||
houseStore.switchBuilding(houseStore.currentBuildingInfo.id);
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
<div class="Unit_top flex align-center justify-between">
|
||||
<div>
|
||||
<span class="text-size-16px text-color-black text-widget-bold mr-30px">
|
||||
<strong>{{ houseStore.currentBuildingInfo.buildingName }}</strong>
|
||||
<strong>{{ houseStore.currentBuildingInfo?.buildingName }}</strong>
|
||||
</span>
|
||||
<span class="mr-30px">楼栋朝向:{{ houseStore.currentBuildingInfo.buildToward }}</span>
|
||||
<span class="mr-30px">楼高:{{ houseStore.currentBuildingInfo.buildTall }}(m)</span>
|
||||
<span class="mr-30px">楼栋结构:{{ houseStore.currentBuildingInfo.buildStructure }} </span>
|
||||
<span class="mr-30px">楼栋朝向:{{ houseStore.currentBuildingInfo?.buildToward }}</span>
|
||||
<span class="mr-30px">楼高:{{ houseStore.currentBuildingInfo?.buildTall ? `${houseStore.currentBuildingInfo?.buildTall}(m)` : '' }}</span>
|
||||
<span class="mr-30px">楼栋结构:{{ houseStore.currentBuildingInfo?.buildStructure }} </span>
|
||||
</div>
|
||||
<div class="rightActions">
|
||||
<span class="mr-20px" @click="handleAddHouse">+增加房屋</span>
|
||||
<span class="mr-20px">收费标准设置</span>
|
||||
<!-- <span class="mr-20px">收费标准设置</span> -->
|
||||
<span @click="deleteAllhouse">删除</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -35,7 +35,6 @@ function handleAddHouse() {
|
||||
|
||||
function deleteAllhouse() {
|
||||
const checkhouse = houseStore.checkoutHouses;
|
||||
console.log(checkhouse);
|
||||
if (checkhouse.length > 0) {
|
||||
let deletecount = 0;
|
||||
checkhouse.forEach((item) => {
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
<div
|
||||
class="housetype"
|
||||
:class="{
|
||||
active: houseStore.buildingtype === index
|
||||
active: buildingtype == house.value
|
||||
}"
|
||||
@click="houseStore.switchHouseType(index)"
|
||||
v-for="(house, index) in housetypelist"
|
||||
@click="houseStore.switchHouseType(house.value)"
|
||||
v-for="(house, index) in com_build_use"
|
||||
:key="index"
|
||||
>
|
||||
{{ house }}
|
||||
{{ house.label }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -32,9 +32,13 @@ import building from './components/building.vue';
|
||||
import unit from './components/unit.vue';
|
||||
import PageHeader from '@/components/Pageheader/index.vue';
|
||||
import { useHouseStore } from '@/store/modules/house';
|
||||
|
||||
const houseStore = useHouseStore();
|
||||
const { currentVilageInfo } = storeToRefs(houseStore);
|
||||
const housetypelist = ['住宅', '办公', '商用', '公寓'];
|
||||
const { buildingtype, currentVilageInfo } = storeToRefs(houseStore);
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_build_use } = toRefs<any>(proxy?.useDict('com_build_use'));
|
||||
|
||||
houseStore.initHouse(houseStore.buildingtype);
|
||||
// 初始化数据
|
||||
</script>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<el-col :span="11">
|
||||
<el-form-item label="房屋用途" prop="houseUse">
|
||||
<el-select v-model.number="form.houseUse" class="m-2" placeholder="请选择">
|
||||
<el-option v-for="(item, index) in com_house_use" :key="index" :label="item.label" :value="Number(item.value)" />
|
||||
<el-option v-for="(item, index) in com_house_use" :key="index" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -48,7 +48,7 @@
|
||||
<el-col :span="11">
|
||||
<el-form-item label="租赁方式" prop="rentalType">
|
||||
<el-radio-group v-model="form.rentalType">
|
||||
<el-radio v-for="item in com_rental_method" :key="item.value" :value="Number(item.value)">{{ item.label }}</el-radio>
|
||||
<el-radio v-for="item in com_rental_method" :key="item.value" :value="item.value">{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -96,16 +96,16 @@
|
||||
<el-form-item label="房屋设施" prop="type">
|
||||
<div class="housedevicesbox">
|
||||
<div
|
||||
v-for="item in com_house_rental_facilities"
|
||||
:key="item.value"
|
||||
@click="handleClick(item.value)"
|
||||
v-for="item in housefacilities"
|
||||
:key="item.id"
|
||||
@click="handleClick(item.id)"
|
||||
class="housedevices_item"
|
||||
:class="{
|
||||
active: housedeviceslist.includes(item.value)
|
||||
active: housedeviceslist.includes(item.id)
|
||||
}"
|
||||
>
|
||||
<span class="checked">√</span>
|
||||
<span class="ml-2">{{ item.label }}</span>
|
||||
<span class="ml-2">{{ item.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
@@ -184,13 +184,16 @@ import { getHousePathById, hasFormData, splitStringUrl } from '@/utils/house';
|
||||
import { addHouseRental, getHouseRental, updateHouseRental, uploadHouseImage } from '@/api/system/houseRental';
|
||||
import { validator } from '@/utils/Reg';
|
||||
import { useHouseStore } from '@/store/modules/house';
|
||||
import { listHouseFacilities } from '@/api/system/HouseFacilities';
|
||||
|
||||
const houseStore = useHouseStore();
|
||||
const { treedata } = storeToRefs(houseStore);
|
||||
|
||||
const uploadUrl = import.meta.env.VITE_APP_BASE_API + '/houseRental/uploadImages';
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_rental_method } = toRefs<any>(proxy?.useDict('com_rental_method'));
|
||||
|
||||
const { com_house_rental_facilities } = toRefs<any>(proxy?.useDict('com_house_rental_facilities') || {});
|
||||
|
||||
const { com_rental_status } = toRefs<any>(proxy?.useDict('com_rental_status'));
|
||||
const { com_house_use } = toRefs<any>(proxy?.useDict('com_house_use'));
|
||||
|
||||
@@ -205,7 +208,7 @@ const form = ref<HouseRentalVO>({
|
||||
rentalName: '', // 租户姓名
|
||||
rent: null, // 租金
|
||||
houseFace: '', // 房屋朝向
|
||||
rentalType: 0, // 整租合租
|
||||
rentalType: '0', // 整租合租
|
||||
phone: null, //手机号
|
||||
houseArea: null, // 房屋面积
|
||||
floorNo: null, //楼层号
|
||||
@@ -214,7 +217,7 @@ const form = ref<HouseRentalVO>({
|
||||
houseImageUrl: '', //房屋图片
|
||||
supInfo: '', //补充租房信息
|
||||
vx: '', //微信
|
||||
houseUse: 0, //房屋用途
|
||||
houseUse: '0', //房屋用途
|
||||
rentalStatus: 0, //租赁状态
|
||||
email: '' //邮箱
|
||||
});
|
||||
@@ -233,12 +236,17 @@ const rules = ref({
|
||||
});
|
||||
// ! 编辑租赁-=================================================================================
|
||||
const userid = ref(null);
|
||||
const treedata = ref(null);
|
||||
const housefacilities = ref([]);
|
||||
// !== 楼栋房屋 =============================================================================
|
||||
function gettreedata() {
|
||||
async function gettreedata() {
|
||||
const reslist = await listHouseFacilities();
|
||||
housefacilities.value = reslist.rows;
|
||||
|
||||
treedata.value = await houseStore.getCurrentVilageTreeHouse();
|
||||
if (route.query.id) {
|
||||
userid.value = route.query.id;
|
||||
getHouseRental(userid.value).then((res) => {
|
||||
console.log(res);
|
||||
form.value = {
|
||||
...form.value,
|
||||
...res.data
|
||||
@@ -273,7 +281,6 @@ const handlePictureCardPreview: UploadProps['onPreview'] = (uploadFile) => {
|
||||
dialogVisible.value = true;
|
||||
};
|
||||
const handleRemove: UploadProps['onRemove'] = (uploadFile, uploadFiles) => {
|
||||
console.log(uploadFile, uploadFiles);
|
||||
fileList.value = uploadFiles;
|
||||
};
|
||||
|
||||
@@ -281,13 +288,6 @@ const handleRemove: UploadProps['onRemove'] = (uploadFile, uploadFiles) => {
|
||||
|
||||
// 家电
|
||||
const housedeviceslist = ref([]);
|
||||
watch(
|
||||
() => com_house_rental_facilities.value,
|
||||
(newVal) => {
|
||||
housedeviceslist.value = (newVal || []).map((item) => item.value);
|
||||
},
|
||||
{ deep: true, immediate: true }
|
||||
);
|
||||
function handleClick(index: number) {
|
||||
if (housedeviceslist.value.includes(index)) {
|
||||
housedeviceslist.value = housedeviceslist.value.filter((item) => item !== index);
|
||||
@@ -302,6 +302,7 @@ function handleClick(index: number) {
|
||||
const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
// 处理家电
|
||||
form.value.facilities = housedeviceslist.value.join(',');
|
||||
let str = '';
|
||||
// 判断有无图片
|
||||
@@ -315,7 +316,6 @@ const submitForm = () => {
|
||||
str += item.url + ',';
|
||||
}
|
||||
});
|
||||
console.log(formdata);
|
||||
if (!hasFormData(formdata)) return sendForm(str);
|
||||
uploadHouseImage(formdata)
|
||||
.then((res) => {
|
||||
@@ -354,15 +354,18 @@ const submitForm = () => {
|
||||
};
|
||||
const sendForm = (val: string) => {
|
||||
form.value.houseImageUrl = val;
|
||||
form.value.villageId = Number(localStorage.getItem('villageid'));
|
||||
// edit or add
|
||||
if (userid.value) {
|
||||
console.log('edit');
|
||||
updateHouseRental(form.value).then(() => {
|
||||
ElMessage.success('编辑成功');
|
||||
cancelForm();
|
||||
});
|
||||
} else {
|
||||
addHouseRental(form.value).then((res) => {
|
||||
addHouseRental({
|
||||
...form.value,
|
||||
villageid: Number(localStorage.getItem('villageid'))
|
||||
}).then(() => {
|
||||
ElMessage.success('添加成功');
|
||||
cancelForm();
|
||||
});
|
||||
|
||||
@@ -125,7 +125,6 @@ function init() {
|
||||
houseRentalid.value = route.query.id;
|
||||
}
|
||||
getHouseRental(houseRentalid.value).then((res) => {
|
||||
console.log(res);
|
||||
HouseInfo.value = res.data;
|
||||
HouseInfo.value.houseImageUrls = HouseInfo.value.houseImageUrl.split(',').filter((item) => item);
|
||||
const arr = getHousePathById(treedata.value, HouseInfo.value.houseId, 'label');
|
||||
|
||||
@@ -62,8 +62,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="租赁方式" align="center" prop="rentalType">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.rentalType === 0">整租</el-tag>
|
||||
<el-tag type="success" v-else>合租</el-tag>
|
||||
<DictTag :options="com_rental_method" :value="row.rentalType"></DictTag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||
@@ -130,8 +129,8 @@ const data = reactive<PageData<HouseRentalForm, HouseRentalQuery>>({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
|
||||
houseUse: undefined,
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
houseUse: '',
|
||||
rentalName: undefined,
|
||||
rent: undefined,
|
||||
rentalType: undefined,
|
||||
|
||||
@@ -100,6 +100,7 @@ const form = ref({
|
||||
residentId: null, // 住户id
|
||||
parkingStatus: '', // 车位状态
|
||||
remark: '', // 备注
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
parkingCode: '' // 车位编码
|
||||
});
|
||||
const rules = ref({
|
||||
@@ -132,8 +133,6 @@ getAreaList();
|
||||
|
||||
const holderInfo = ref(null);
|
||||
function handleChange(pop) {
|
||||
console.log('获得数据');
|
||||
console.log(pop);
|
||||
holderInfo.value = pop;
|
||||
}
|
||||
|
||||
@@ -143,6 +142,7 @@ const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
form.value.residentId = holderInfo.value;
|
||||
form.value.villageId = Number(localStorage.getItem('villageid'));
|
||||
if (userid.value) {
|
||||
updateParking(form.value).then((res) => {
|
||||
ElMessage.success('编辑成功');
|
||||
|
||||
@@ -7,10 +7,9 @@
|
||||
<el-form ref="queryFormRef" :model="queryParams" :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="Number(dict.value)" />
|
||||
<el-option v-for="dict in com_parking_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="审核状态" prop="checkStatus">
|
||||
<el-select v-model="queryParams.checkStatus" placeholder="请选择" clearable>
|
||||
<el-option v-for="dict in com_review" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
@@ -50,9 +49,7 @@
|
||||
|
||||
<el-table v-loading="loading" border :data="parkingList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="区域" align="center" prop="areaId">
|
||||
<template #default="scope"> {{ getAreaInfoById(scope.row.areaId) }} </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="区域" align="center" prop="areaName"> </el-table-column>
|
||||
<el-table-column label="车位编号" align="center" prop="parkingCode" />
|
||||
<el-table-column label="车位面积" align="center" prop="parkingArea">
|
||||
<template #default="scope"> {{ scope.row.parkingArea }}㎡ </template>
|
||||
@@ -91,7 +88,6 @@
|
||||
|
||||
<script setup name="Parking" lang="ts">
|
||||
import Pageheader from '@/components/Pageheader/index.vue';
|
||||
import { listArea } from '@/api/system/carArea';
|
||||
import { listParking, getParking, delParking, addParking, updateParking } from '@/api/system/parking/index';
|
||||
import { ParkingVO, ParkingQuery, ParkingForm } from '@/api/system/parking/type';
|
||||
|
||||
@@ -102,7 +98,6 @@ const { com_parking_status } = toRefs<any>(proxy?.useDict('com_parking_status'))
|
||||
|
||||
const router = useRouter();
|
||||
const parkingList = ref<ParkingVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
@@ -111,7 +106,6 @@ const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const parkingFormRef = ref<ElFormInstance>();
|
||||
|
||||
const initFormData: ParkingForm = {
|
||||
id: undefined,
|
||||
@@ -135,6 +129,7 @@ const data = reactive<PageData<ParkingForm, ParkingQuery>>({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
areaId: undefined,
|
||||
parkingCode: undefined,
|
||||
parkingArea: undefined,
|
||||
@@ -152,9 +147,6 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
const AreaList = ref([]);
|
||||
/** 查询车位管理列表 */
|
||||
const getList = async () => {
|
||||
// 获取区域列表
|
||||
const areaRes = await listArea(queryParams.value);
|
||||
AreaList.value = areaRes.rows;
|
||||
loading.value = true;
|
||||
const res = await listParking(queryParams.value);
|
||||
parkingList.value = res.rows;
|
||||
@@ -164,7 +156,6 @@ const getList = async () => {
|
||||
|
||||
function getAreaInfoById(id: string) {
|
||||
const obj = AreaList.value.find((item) => item.id === id);
|
||||
console.log(obj);
|
||||
return `${obj.areaName}${obj.areaCode}`;
|
||||
}
|
||||
|
||||
|
||||
@@ -143,13 +143,11 @@ const submitForm = () => {
|
||||
if (valid) {
|
||||
if (userid.value) {
|
||||
updateMonthCard(form.value).then((res) => {
|
||||
console.log(res);
|
||||
ElMessage.success('编辑成功');
|
||||
cancelForm();
|
||||
});
|
||||
} else {
|
||||
addMonthCard(form.value).then((res) => {
|
||||
console.log(res);
|
||||
ElMessage.success('添加成功');
|
||||
|
||||
cancelForm();
|
||||
|
||||
@@ -190,7 +190,6 @@ if (route.query.id) {
|
||||
getresidentReviewlistAPI(userid.value).then((res) => {
|
||||
if (res.rows[0]) {
|
||||
reviewInfo.value = res.rows[0];
|
||||
console.log(reviewInfo.value);
|
||||
handleActivestaus(reviewInfo.value);
|
||||
}
|
||||
});
|
||||
@@ -258,7 +257,6 @@ function updatePass(val: '0' | '1' | '2') {
|
||||
|
||||
function update() {
|
||||
UpdateResidentReviewAPI(reviewInfo.value).then((res) => {
|
||||
console.log(res);
|
||||
backRoute();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
<el-col :span="11">
|
||||
<el-form-item label="住户性别" prop="gender">
|
||||
<el-radio-group v-model="form.gender">
|
||||
<el-radio :value="1">男</el-radio>
|
||||
<el-radio :value="0">女</el-radio>
|
||||
<el-radio v-for="dist in sys_user_sex" :label="dist.label" :value="dist.value" :key="dist.value"></el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -40,7 +39,7 @@
|
||||
<el-col :span="11">
|
||||
<el-form-item label="与业主的关系" prop="type">
|
||||
<el-select v-model.number="form.type" class="m-2" placeholder="请选择">
|
||||
<el-option v-for="item in ownerRelationshiplist" :key="item.value" :label="item.label" :value="item.value" />
|
||||
<el-option v-for="item in com_resident_relationship" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -106,7 +105,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import PageHeader from '@/components/Pageheader/index.vue';
|
||||
import { getHousePathById, ownerRelationshiplist } from '@/utils/house';
|
||||
import { getHousePathById } from '@/utils/house';
|
||||
import { ResidentForm } from '@/api/system/resident/type';
|
||||
import { CascaderValue, UploadFiles, UploadInstance, UploadProps, UploadRawFile } from 'element-plus';
|
||||
import { genFileId } from 'element-plus';
|
||||
@@ -118,15 +117,19 @@ const houseStore = useHouseStore();
|
||||
const { treedata } = storeToRefs(houseStore);
|
||||
const uploadUrl = import.meta.env.VITE_APP_BASE_API + '/resident/uploadImage';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { sys_user_sex } = toRefs<any>(proxy?.useDict('sys_user_sex'));
|
||||
const { com_resident_relationship } = toRefs<any>(proxy?.useDict('com_resident_relationship'));
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const formRef = ref();
|
||||
const form = ref<ResidentForm>({
|
||||
houseId: null,
|
||||
name: '',
|
||||
gender: 1,
|
||||
gender: '0',
|
||||
idCard: '',
|
||||
type: 0, // 与业主关系 0业主
|
||||
type: '0', // 与业主关系 0业主
|
||||
phone: null, //手机号
|
||||
cardImageFront: '',
|
||||
cardImageBack: '',
|
||||
@@ -137,25 +140,25 @@ const rules = ref({
|
||||
houseId: [{ required: true, message: '请选择房屋', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
|
||||
gender: [{ required: true, message: '请选择性别', trigger: 'blur' }],
|
||||
cardImageFront: [{ required: true, message: '请上传身份证照片', trigger: 'blur' }],
|
||||
cardImageBack: [{ required: true, message: '请上传身份证照片', trigger: 'blur' }],
|
||||
idCard: [
|
||||
{ required: true, message: '请输入身份证号', trigger: 'blur' },
|
||||
{
|
||||
validator: (_, value) => validator(value, 'idCard'),
|
||||
message: '请输入正确的18位身份证号码',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
type: [{ required: true, message: '请选择与业主关系', trigger: 'blur' }],
|
||||
phone: [
|
||||
{ required: true, message: '请输入手机号', trigger: 'blur' },
|
||||
{
|
||||
validator: (_, value) => validator(value, 'phone'),
|
||||
message: '请输入正确的手机号码',
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
// cardImageFront: [{ required: true, message: '请上传身份证照片', trigger: 'blur' }],
|
||||
// cardImageBack: [{ required: true, message: '请上传身份证照片', trigger: 'blur' }],
|
||||
// idCard: [
|
||||
// { required: true, message: '请输入身份证号', trigger: 'blur' },
|
||||
// {
|
||||
// validator: (_, value) => validator(value, 'idCard'),
|
||||
// message: '请输入正确的18位身份证号码',
|
||||
// trigger: 'blur'
|
||||
// }
|
||||
// ],
|
||||
type: [{ required: true, message: '请选择与业主关系', trigger: 'blur' }]
|
||||
// phone: [
|
||||
// { required: true, message: '请输入手机号', trigger: 'blur' },
|
||||
// {
|
||||
// validator: (_, value) => validator(value, 'phone'),
|
||||
// message: '请输入正确的手机号码',
|
||||
// trigger: 'blur'
|
||||
// }
|
||||
// ]
|
||||
});
|
||||
|
||||
// !== 楼栋房屋 =============================================================================
|
||||
@@ -169,7 +172,6 @@ function gettreedata() {
|
||||
...res.data
|
||||
};
|
||||
const arr = getHousePathById(treedata.value, form.value.houseId);
|
||||
console.log(arr);
|
||||
userHousepath.value = arr;
|
||||
});
|
||||
}
|
||||
@@ -177,8 +179,7 @@ function gettreedata() {
|
||||
gettreedata();
|
||||
function handleChange(val: CascaderValue) {
|
||||
userHousepath.value = val;
|
||||
form.value.villageId = val[0];
|
||||
form.value.buildingId = val[1];
|
||||
form.value.buildingId = val[0];
|
||||
form.value.houseId = val[2];
|
||||
}
|
||||
|
||||
@@ -226,36 +227,27 @@ const handleError2: UploadProps['onError'] = (error: Error, uploadFile: UploadFi
|
||||
const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
if (!form.value.cardImageFront.trim()) {
|
||||
return ElMessage.error('请上传身份证正面照片');
|
||||
}
|
||||
if (!form.value.cardImageBack.trim()) {
|
||||
return ElMessage.error('请上传身份证背面照片');
|
||||
}
|
||||
// if (!form.value.cardImageFront.trim()) {
|
||||
// return ElMessage.error('请上传身份证正面照片');
|
||||
// }
|
||||
// if (!form.value.cardImageBack.trim()) {
|
||||
// return ElMessage.error('请上传身份证背面照片');
|
||||
// }
|
||||
const obj = {
|
||||
...form.value,
|
||||
villageId: Number(localStorage.getItem('villageid'))
|
||||
};
|
||||
if (userid.value) {
|
||||
console.log('edit');
|
||||
updateResident(form.value).then(() => {
|
||||
updateResident(obj).then(() => {
|
||||
ElMessage.success('修改成功');
|
||||
cancelForm();
|
||||
});
|
||||
} else {
|
||||
console.log('add');
|
||||
addResident(form.value).then(() => {
|
||||
addResident(obj).then(() => {
|
||||
ElMessage.success('添加成功');
|
||||
// addResidentReviewProcess({
|
||||
// 'residentId': 0,
|
||||
// 'submitTime': new Date().toLocaleString(),
|
||||
// 'submitStatus': 0,
|
||||
// 'propertyTime': null,
|
||||
// 'propertyStatus': null,
|
||||
// 'propertyReviewFeedback': null,
|
||||
// 'certificationTime': null,
|
||||
// 'certificationStatus': null
|
||||
// });
|
||||
cancelForm();
|
||||
});
|
||||
}
|
||||
console.log(form.value);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -7,15 +7,15 @@
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="住户类型" prop="type">
|
||||
<el-select v-model="queryParams.type" placeholder="请输入住户类型" style="width: 240px">
|
||||
<el-option v-for="item in typelist" :key="item.value" :label="item.label" :value="item.value" />
|
||||
<el-option v-for="item in com_resident_relationship" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="住户状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请输入住户状态" style="width: 240px">
|
||||
<el-option v-for="item in statuslist" :key="item.value" :label="item.label" :value="item.value" />
|
||||
<el-option v-for="item in com_review" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="提交日期" prop="date">
|
||||
<!-- <el-form-item label="提交日期" prop="date">
|
||||
<el-date-picker
|
||||
v-model="queryParams.date"
|
||||
type="date"
|
||||
@@ -23,7 +23,7 @@
|
||||
:disabled-date="disabledDate"
|
||||
:shortcuts="shortcuts"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
@@ -36,7 +36,7 @@
|
||||
<el-card style="flex: 1" shadow="never">
|
||||
<div class="residentBody h-full">
|
||||
<div class="treebox h-full">
|
||||
<div class="treeTitlebox">北境碧桂园小区</div>
|
||||
<div class="treeTitlebox">{{ currentVilageInfo.villageName ?? '12' }}</div>
|
||||
<div class="treeboxbody">
|
||||
<!-- 树状+ -->
|
||||
<el-tree :highlight-current="true" style="max-width: 600px" :data="treedata" :props="defaultProps" @node-click="handleNodeClick" />
|
||||
@@ -114,7 +114,8 @@ import { getHousePathById } from '@/utils/house';
|
||||
import { useHouseStore } from '@/store/modules/house';
|
||||
|
||||
const houseStore = useHouseStore();
|
||||
const { treedata } = storeToRefs(houseStore);
|
||||
const { currentVilageInfo } = storeToRefs(houseStore);
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_resident_relationship } = toRefs<any>(proxy?.useDict('com_resident_relationship'));
|
||||
const { com_review } = toRefs<any>(proxy?.useDict('com_review'));
|
||||
@@ -129,16 +130,6 @@ const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
// 住户类型
|
||||
const typelist = [
|
||||
{ label: '业主', value: 0 },
|
||||
{ label: '租户', value: 1 }
|
||||
];
|
||||
// 住户状态
|
||||
const statuslist = [
|
||||
{ label: '审核中', value: 0 },
|
||||
{ label: '已认证', value: 1 }
|
||||
];
|
||||
|
||||
const initFormData: ResidentForm = {
|
||||
id: undefined,
|
||||
@@ -162,12 +153,12 @@ const data = reactive<PageData<ResidentForm, ResidentQuery>>({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
date: '',
|
||||
type: null,
|
||||
status: null,
|
||||
|
||||
houseId: null,
|
||||
villageId: null,
|
||||
buildingId: null,
|
||||
unitNo: null
|
||||
}
|
||||
@@ -256,16 +247,22 @@ const defaultProps = {
|
||||
label: 'label'
|
||||
};
|
||||
// ! 树形------------------------------------------------------------------------
|
||||
const treedata = ref([]);
|
||||
function gettree() {
|
||||
houseStore.getCurrentVilageTreeHouse().then((res) => {
|
||||
treedata.value = res;
|
||||
});
|
||||
}
|
||||
|
||||
gettree();
|
||||
|
||||
/** 查询住户管理列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listResident(queryParams.value);
|
||||
residentList.value = res.rows;
|
||||
console.log(residentList.value);
|
||||
residentList.value.forEach((item) => {
|
||||
const arr = getHousePathById(treedata.value, item.houseId, 'label');
|
||||
console.log(arr);
|
||||
item.houseAddress = arr.join(' ');
|
||||
});
|
||||
total.value = res.total;
|
||||
|
||||
@@ -66,10 +66,9 @@
|
||||
import { ref } from 'vue';
|
||||
import PageHeader from '@/components/Pageheader/index.vue';
|
||||
import { getBuildinglistAPI, getBuildinglists, getBuildingOnly, getHouselistAPI } from '@/api/system/house';
|
||||
import { getCommunitylistAPI } from '@/api/system/community';
|
||||
import { addStoreroom, getStoreroom } from '@/api/system/storeroom';
|
||||
import { addStoreroom, getStoreroom, updateStoreroom } from '@/api/system/storeroom';
|
||||
import { StoreroomVO } from '@/api/system/storeroom/types';
|
||||
import { N } from 'vue-router/dist/index-DFCq6eJK.js';
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const formRef = ref();
|
||||
@@ -94,12 +93,10 @@ const rules = ref({
|
||||
const storeRoomid = ref(null);
|
||||
const units = ref([]);
|
||||
const Buildinglists = ref([]);
|
||||
const currentVilage = ref(null);
|
||||
|
||||
// 获取储藏室信息
|
||||
function getStoreRoominfo(id: string) {
|
||||
getStoreroom(id).then((res) => {
|
||||
console.log(res);
|
||||
form.value = {
|
||||
...form.value,
|
||||
...res.data
|
||||
@@ -110,7 +107,6 @@ function getStoreRoominfo(id: string) {
|
||||
function init() {
|
||||
getBuildinglists().then((res) => {
|
||||
Buildinglists.value = res.rows;
|
||||
console.log(res.rows);
|
||||
});
|
||||
}
|
||||
init();
|
||||
@@ -121,7 +117,6 @@ if (route.query.id) {
|
||||
// 根据楼栋id获取单元
|
||||
function handleChangeBuild(val: string) {
|
||||
getBuildingOnly(val).then((res) => {
|
||||
console.log(res);
|
||||
units.value = Array.from({ length: res.data.unitCount }).map((_, index) => {
|
||||
return {
|
||||
no: index + 1,
|
||||
@@ -134,21 +129,24 @@ const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
const data = {
|
||||
...form.value
|
||||
...form.value,
|
||||
villageId: Number(localStorage.getItem('villageid'))
|
||||
};
|
||||
if (storeRoomid.value !== null) {
|
||||
console.log('修改');
|
||||
updateStoreroom(data).then(() => {
|
||||
ElMessage.success('修改成功');
|
||||
cancelForm();
|
||||
});
|
||||
} else {
|
||||
console.log('新增');
|
||||
addStoreroom(data).then((res) => {
|
||||
console.log(res);
|
||||
addStoreroom(data).then(() => {
|
||||
ElMessage.success('添加成功');
|
||||
cancelForm();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const cancelForm = () => {
|
||||
console.log('取消');
|
||||
router.push({
|
||||
path: '/house/storeroom'
|
||||
});
|
||||
|
||||
@@ -5,27 +5,9 @@
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form label-width="100" ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="所属楼栋ID" prop="buildingId">
|
||||
<el-input v-model="queryParams.buildingId" placeholder="请输入所属楼栋ID" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单元号" prop="unitNo">
|
||||
<el-input v-model="queryParams.unitNo" placeholder="请输入单元号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="储藏室号" prop="storeroomNo">
|
||||
<el-input v-model="queryParams.storeroomNo" placeholder="请输入储藏室号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="建筑面积(㎡)" prop="houseArea">
|
||||
<el-input v-model="queryParams.houseArea" placeholder="请输入建筑面积(㎡)" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公摊面积(㎡)" prop="shareArea">
|
||||
<el-input v-model="queryParams.shareArea" placeholder="请输入公摊面积(㎡)" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="实用面积(㎡)" prop="internalArea">
|
||||
<el-input v-model="queryParams.internalArea" placeholder="请输入实用面积(㎡)" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="关联房屋ID" prop="houseId">
|
||||
<el-input v-model="queryParams.houseId" placeholder="请输入关联房屋ID" 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>
|
||||
@@ -57,8 +39,7 @@
|
||||
|
||||
<el-table class="tablebody" v-loading="loading" border :data="storeroomList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="储藏室ID" align="center" prop="id" v-if="true" />
|
||||
<el-table-column label="所属楼栋ID" align="center" prop="buildingId" />
|
||||
<el-table-column label="楼栋名" align="center" prop="buildingName" />
|
||||
<el-table-column label="单元号" align="center" prop="unitNo" />
|
||||
<el-table-column label="储藏室号" align="center" prop="storeroomNo" />
|
||||
<el-table-column label="建筑面积(㎡)" align="center" prop="houseArea" />
|
||||
@@ -79,41 +60,6 @@
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改储藏室管理对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="storeroomFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="所属楼栋ID" prop="buildingId">
|
||||
<el-input v-model="form.buildingId" placeholder="请输入所属楼栋ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单元号" prop="unitNo">
|
||||
<el-input v-model="form.unitNo" placeholder="请输入单元号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="储藏室号" prop="storeroomNo">
|
||||
<el-input v-model="form.storeroomNo" placeholder="请输入储藏室号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="建筑面积(㎡)" prop="houseArea">
|
||||
<el-input v-model="form.houseArea" placeholder="请输入建筑面积(㎡)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公摊面积(㎡)" prop="shareArea">
|
||||
<el-input v-model="form.shareArea" placeholder="请输入公摊面积(㎡)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="实用面积(㎡)" prop="internalArea">
|
||||
<el-input v-model="form.internalArea" placeholder="请输入实用面积(㎡)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="关联房屋ID" prop="houseId">
|
||||
<el-input v-model="form.houseId" placeholder="请输入关联房屋ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -121,8 +67,10 @@
|
||||
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';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const router = useRouter();
|
||||
const storeroomList = ref<StoreroomVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
@@ -158,6 +106,7 @@ const data = reactive<PageData<StoreroomForm, StoreroomQuery>>({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
buildingId: undefined,
|
||||
unitNo: undefined,
|
||||
storeroomNo: undefined,
|
||||
@@ -169,15 +118,20 @@ const data = reactive<PageData<StoreroomForm, StoreroomQuery>>({
|
||||
params: {}
|
||||
},
|
||||
rules: {
|
||||
id: [{ required: true, message: '储藏室ID不能为空', trigger: 'blur' }],
|
||||
buildingId: [{ required: true, message: '所属楼栋ID不能为空', trigger: 'blur' }],
|
||||
unitNo: [{ required: true, message: '单元号不能为空', trigger: 'blur' }],
|
||||
storeroomNo: [{ required: true, message: '储藏室号不能为空', trigger: 'blur' }]
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
const buildinglist = ref([]);
|
||||
function getbudilinglist() {
|
||||
getBuildinglists().then((res) => {
|
||||
buildinglist.value = res.rows;
|
||||
});
|
||||
}
|
||||
getbudilinglist();
|
||||
|
||||
/** 查询储藏室管理列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
@@ -233,29 +187,6 @@ const handleUpdate = async (row?: StoreroomVO) => {
|
||||
id: row.id
|
||||
}
|
||||
});
|
||||
// reset();
|
||||
// const _id = row?.id || ids.value[0];
|
||||
// const res = await getStoreroom(_id);
|
||||
// Object.assign(form.value, res.data);
|
||||
// dialog.visible = true;
|
||||
// dialog.title = '修改储藏室管理';
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
storeroomFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.id) {
|
||||
await updateStoreroom(form.value).finally(() => (buttonLoading.value = false));
|
||||
} else {
|
||||
await addStoreroom(form.value).finally(() => (buttonLoading.value = false));
|
||||
}
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
|
||||
@@ -180,7 +180,6 @@ async function submitForm(status = 0) {
|
||||
|
||||
try {
|
||||
form.value.content = JSON.stringify(form.value.content);
|
||||
console.log(form.value.content);
|
||||
if (form.value.id) {
|
||||
await updateQuestionnaire(form.value);
|
||||
proxy.$modal.msgSuccess('修改成功');
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script name="repairEcharts" setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import Echarts from '@/components/Echarts/index.vue';
|
||||
import { EChartsOption } from 'echarts';
|
||||
|
||||
@@ -15,7 +14,7 @@ const chartConfig = shallowRef<EChartsOption>({
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '1%',
|
||||
top: '3%',
|
||||
top: '10%',
|
||||
bottom: '1%',
|
||||
containLabel: true
|
||||
},
|
||||
@@ -27,10 +26,21 @@ const chartConfig = shallowRef<EChartsOption>({
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: [820, 932, 901, 934, 1290, 1330, 1320],
|
||||
data: [5, 92, 12, 34, 120, 10, 120],
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
areaStyle: {
|
||||
color: '#d1e3ff'
|
||||
color: {
|
||||
type: 'linear',
|
||||
x: 0,
|
||||
y: 0,
|
||||
x2: 0,
|
||||
y2: 1, // 从上到下渐变
|
||||
colorStops: [
|
||||
{ offset: 0, color: '#e2edff' }, // 顶部:半透明蓝色
|
||||
{ offset: 1, color: '#f2f9ff' } // 底部:极浅蓝/透明
|
||||
]
|
||||
}
|
||||
},
|
||||
lineStyle: {
|
||||
color: '#1a75ff'
|
||||
@@ -40,10 +50,30 @@ const chartConfig = shallowRef<EChartsOption>({
|
||||
color: '#3f8afc',
|
||||
position: 'top'
|
||||
}
|
||||
},
|
||||
{
|
||||
data: [5, 92, 12, 34, 120, 10, 120].reverse(),
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
areaStyle: {
|
||||
color: {
|
||||
type: 'linear',
|
||||
x: 0,
|
||||
y: 0,
|
||||
x2: 0,
|
||||
y2: 1, // 从上到下渐变
|
||||
colorStops: [
|
||||
{ offset: 0, color: '#e2edff' }, // 顶部:半透明蓝色
|
||||
{ offset: 1, color: '#f2f9ff' } // 底部:极浅蓝/透明
|
||||
]
|
||||
}
|
||||
},
|
||||
lineStyle: {
|
||||
color: '#ffc800'
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
// 图表配置不应该被深度响应式劫持,会导致性能下降 + 类型错误。
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
<div class="home">
|
||||
<div class="navbar flex flex-items-center">
|
||||
<svg-icon icon-class="viliageIcon" />
|
||||
<span class="ml-2">北境碧桂园小区</span>
|
||||
<span class="ml-2">{{ villageinfo.villageName }}</span>
|
||||
</div>
|
||||
|
||||
<el-row class="mt-20px">
|
||||
<el-col :span="24">
|
||||
<div class="viliageBox">
|
||||
@@ -57,6 +58,7 @@
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" class="mt-20px">
|
||||
<el-col :span="9">
|
||||
<el-card>
|
||||
@@ -105,7 +107,7 @@
|
||||
<div class="quick_item" v-for="(item, index) in quickBox" @click="handleRouter(item.url)" :key="index">
|
||||
{{ item.name }}
|
||||
</div>
|
||||
<div class="quick_item quick_add">+ 添加</div>
|
||||
<!-- <div class="quick_item quick_add">+ 添加</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -196,6 +198,22 @@
|
||||
<script setup name="Index" lang="ts">
|
||||
import repairEcharts from './components/repairEcharts.vue';
|
||||
import HouseUser from './components/HouseUser.vue';
|
||||
import { getVillageByIdAPI } from '@/api/system/community';
|
||||
import { useHouseStore } from '@/store/modules/house';
|
||||
const houseStore = useHouseStore();
|
||||
const villageinfo = ref({
|
||||
'villageId': null,
|
||||
'villageName': ''
|
||||
});
|
||||
// 获取小区
|
||||
function getVillageinfo() {
|
||||
const id = Number(localStorage.getItem('villageid'));
|
||||
getVillageByIdAPI(id).then((res) => {
|
||||
villageinfo.value = res.data;
|
||||
houseStore.updateVilageinfo(res.data);
|
||||
});
|
||||
}
|
||||
getVillageinfo();
|
||||
// ! 快捷入口
|
||||
const quickBox = ref([
|
||||
{
|
||||
@@ -250,9 +268,6 @@ const echartTypeChange = (type: number) => {
|
||||
currentEchartType.value = type;
|
||||
};
|
||||
// ! 切换echarts
|
||||
|
||||
// 获取小区
|
||||
function getViliage() {}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
670
src/views/workbench/index2.vue
Normal file
@@ -0,0 +1,670 @@
|
||||
<template>
|
||||
<div class="w-full h-full workBenchBox">
|
||||
<el-row>
|
||||
<el-col :span="18">
|
||||
<div class="villageBox">
|
||||
<div class="title">小区概况</div>
|
||||
<div class="villageBody">
|
||||
<div class="village_items" v-for="(item, index) in list" :key="index">
|
||||
<div class="icon"></div>
|
||||
<div class="infobox">
|
||||
<div class="infoTitle">{{ item.name }}</div>
|
||||
<div class="infoNum">{{ item.value }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="echartsbox flex flex-items-center">
|
||||
<div class="echarts">
|
||||
<div class="nav flex flex-items-center justify-between">
|
||||
<div>
|
||||
<span class="ecarts_title">近一周报修量趋势</span>
|
||||
<span class="echarts_units">单位(个)</span>
|
||||
</div>
|
||||
<div class="flex flex-items-center justify-center">
|
||||
<span class="echarts_all_baoxiu">全部保修</span>
|
||||
<i class="echarts_all_arrow"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="echartsbody">
|
||||
<repairEcharts />
|
||||
</div>
|
||||
</div>
|
||||
<div class="echarts">
|
||||
<div class="nav flex flex-items-center justify-between">
|
||||
<div>
|
||||
<span class="ecarts_title">近一周收入支出趋势</span>
|
||||
<span class="echarts_units">单位(个)</span>
|
||||
</div>
|
||||
<div class="flex flex-items-center justify-center">
|
||||
<div
|
||||
class="actions"
|
||||
@click="changeActive_index(index)"
|
||||
:class="{ active: active_index === index }"
|
||||
v-for="(item, index) in actions"
|
||||
:key="index"
|
||||
>
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="echartsbody">
|
||||
<repairEcharts />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<div class="villageInfoBox">
|
||||
<div class="iconbox">
|
||||
<el-image :src="summicon"></el-image>
|
||||
</div>
|
||||
<div class="villageinfo">
|
||||
<div class="villagename">北境碧桂园小区</div>
|
||||
<div class="week">2025-08-20 星期三</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabsbox">
|
||||
<div class="topbox">
|
||||
<div
|
||||
:class="{
|
||||
active: Sideactive === 1
|
||||
}"
|
||||
@click="handleSelect(1)"
|
||||
>
|
||||
<span>快捷入口</span>
|
||||
<i></i>
|
||||
</div>
|
||||
<div
|
||||
:class="{
|
||||
active: Sideactive === 2
|
||||
}"
|
||||
@click="handleSelect(2)"
|
||||
>
|
||||
<span>创建办事记录</span>
|
||||
<i class="righti"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="quicly_box" v-if="Sideactive === 1">
|
||||
<div class="quickly_item" v-for="(item, index) in quickBox" :key="index">
|
||||
<div class="quickly_item_icon"></div>
|
||||
<div class="quickly_item_content">{{ item.name }}</div>
|
||||
</div>
|
||||
<div class="quickly_item add">
|
||||
<el-icon><Plus /></el-icon>
|
||||
<span>添加</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else></div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="mt-20px">
|
||||
<el-col>
|
||||
<div class="userBox">
|
||||
<div class="title">住户查询</div>
|
||||
<div class="searbox">
|
||||
<div>精准查询</div>
|
||||
<el-select v-model="value" placeholder="住户姓名" style="width: 240px">
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
<el-input placeholder="请输入">
|
||||
<template #prefix>
|
||||
<el-icon><Search /></el-icon>
|
||||
</template>
|
||||
</el-input>
|
||||
<el-button type="primary">查询 </el-button>
|
||||
<el-button>重置</el-button>
|
||||
</div>
|
||||
<div class="tablebox">
|
||||
<el-table :data="tableData" stripe style="width: 100%">
|
||||
<el-table-column type="index" :index="indexMethod" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="date" align="center" label="姓名" width="180" />
|
||||
<el-table-column prop="date" align="center" label="类型" width="180" />
|
||||
<el-table-column prop="date" align="center" label="状态" width="180" />
|
||||
<el-table-column prop="date" align="center" label="证件号码" />
|
||||
<el-table-column prop="date" align="center" label="手机号" />
|
||||
<el-table-column prop="name" align="center" label="房间" />
|
||||
<el-table-column prop="address" align="center" label="操作">
|
||||
<template #default>
|
||||
<el-button type="primary" text> 审核</el-button>
|
||||
<el-button type="primary" text> 编辑</el-button>
|
||||
<el-button type="primary" text> 删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import summicon from '@/assets/images/index/summer.png';
|
||||
import repairEcharts from './components/repairEcharts.vue';
|
||||
|
||||
const list = ref([
|
||||
{
|
||||
name: '住户总数量',
|
||||
value: 10000
|
||||
},
|
||||
{
|
||||
name: '房屋总数量',
|
||||
value: 458
|
||||
},
|
||||
{
|
||||
name: '车位总数量',
|
||||
value: 2539
|
||||
},
|
||||
{
|
||||
name: '设备总数量',
|
||||
value: 22
|
||||
},
|
||||
{
|
||||
name: '物料总数量',
|
||||
value: 458
|
||||
},
|
||||
{
|
||||
name: '投诉总数量',
|
||||
value: 458
|
||||
}
|
||||
]);
|
||||
const active_index = ref(0);
|
||||
const actions = ref([
|
||||
{
|
||||
name: '全部'
|
||||
},
|
||||
{
|
||||
name: '收入'
|
||||
},
|
||||
{
|
||||
name: '支出'
|
||||
}
|
||||
]);
|
||||
function changeActive_index(val: number) {
|
||||
active_index.value = val;
|
||||
}
|
||||
// ! 侧边栏
|
||||
const Sideactive = ref(1);
|
||||
function handleSelect(val: number) {
|
||||
Sideactive.value = val;
|
||||
console.log(Sideactive.value);
|
||||
}
|
||||
|
||||
// ! 快捷入口
|
||||
const quickBox = ref([
|
||||
{
|
||||
name: '新建用户',
|
||||
url: '/house/resident'
|
||||
},
|
||||
{
|
||||
name: '车位管理',
|
||||
url: '/carArea/parking'
|
||||
},
|
||||
{
|
||||
name: '新建月卡',
|
||||
url: '/carArea/monthCard'
|
||||
},
|
||||
{
|
||||
name: '新建报修',
|
||||
url: '/repair/repairlist'
|
||||
},
|
||||
{
|
||||
name: '访客记录',
|
||||
url: '/repair/visitorList'
|
||||
},
|
||||
{
|
||||
name: '账单管理',
|
||||
url: '/repair/visitorList'
|
||||
}
|
||||
]);
|
||||
|
||||
const router = useRouter();
|
||||
function handleRouter(val: string) {
|
||||
router.push({
|
||||
path: val
|
||||
});
|
||||
}
|
||||
// ! table
|
||||
const value = ref('');
|
||||
const loading = ref(true);
|
||||
|
||||
const total = ref(100);
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
villageId: Number(localStorage.getItem('villageid')),
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
}
|
||||
});
|
||||
const { queryParams } = toRefs(data);
|
||||
// 核心:计算连续序号
|
||||
const indexMethod = (index) => {
|
||||
return (queryParams.value.pageNum - 1) * queryParams.value.pageSize + index + 1;
|
||||
};
|
||||
const options = [
|
||||
{
|
||||
value: 'Option1',
|
||||
label: '住户姓名'
|
||||
},
|
||||
{
|
||||
value: 'Option2',
|
||||
label: '住户手机号'
|
||||
},
|
||||
{
|
||||
value: 'Option3',
|
||||
label: '住户身份证'
|
||||
}
|
||||
];
|
||||
function getList() {}
|
||||
const tableData = ref([
|
||||
{
|
||||
date: '2016-05-03',
|
||||
name: 'Tom',
|
||||
address: 'No. 189, Grove St, Los Angeles'
|
||||
},
|
||||
{
|
||||
date: '2016-05-02',
|
||||
name: 'Tom',
|
||||
address: 'No. 189, Grove St, Los Angeles'
|
||||
},
|
||||
{
|
||||
date: '2016-05-04',
|
||||
name: 'Tom',
|
||||
address: 'No. 189, Grove St, Los Angeles'
|
||||
},
|
||||
{
|
||||
date: '2016-05-01',
|
||||
name: 'Tom',
|
||||
address: 'No. 189, Grove St, Los Angeles'
|
||||
}
|
||||
]);
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.workBenchBox {
|
||||
padding: 20px;
|
||||
background-color: #eaf2ff;
|
||||
// 小区概况
|
||||
.villageBox {
|
||||
height: 198px;
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, #ffffff 70%);
|
||||
border-radius: 16px 16px 16px 16px;
|
||||
border: 2px solid #ffffff;
|
||||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
.title {
|
||||
height: 25px;
|
||||
font-weight: 500;
|
||||
font-size: 20px;
|
||||
color: #303133;
|
||||
line-height: 25px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.villageBody {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
.village_items {
|
||||
margin-right: 20px;
|
||||
min-width: 185px;
|
||||
height: 109px;
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, #ffffff 100%);
|
||||
box-shadow: 0px 4px 8px 0px rgba(0, 104, 255, 0.06);
|
||||
border-radius: 8px 8px 8px 8px;
|
||||
border: 1px solid #ffffff;
|
||||
padding: 30px 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.icon {
|
||||
width: 40px;
|
||||
height: 46px;
|
||||
background: #f4f0ff;
|
||||
box-shadow: inset 0px 0px 20px 0px #ffffff;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
border: 1px solid #ffffff;
|
||||
margin-right: 15px;
|
||||
}
|
||||
.infobox {
|
||||
margin-right: 20px;
|
||||
.infoTitle {
|
||||
width: 70px;
|
||||
height: 18px;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #4e5969;
|
||||
line-height: 18px;
|
||||
}
|
||||
.infoNum {
|
||||
width: 87px;
|
||||
height: 35px;
|
||||
font-weight: 600;
|
||||
font-size: 28px;
|
||||
color: #303133;
|
||||
line-height: 39px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// echarts
|
||||
.echartsbox {
|
||||
.echarts {
|
||||
margin-right: 20px;
|
||||
flex: 1;
|
||||
height: 425px;
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, #ffffff 70%);
|
||||
border: 2px solid #ffffff;
|
||||
border-radius: 12px;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
.nav {
|
||||
.ecarts_title {
|
||||
font-weight: 500;
|
||||
font-size: 20px;
|
||||
color: #303133;
|
||||
line-height: 25px;
|
||||
}
|
||||
.echarts_units {
|
||||
margin-left: 10px;
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
color: #98a4b2;
|
||||
line-height: 15px;
|
||||
text-align: left;
|
||||
}
|
||||
.echarts_all_baoxiu {
|
||||
height: 18px;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #98a4b2;
|
||||
line-height: 18px;
|
||||
margin-right: 7px;
|
||||
}
|
||||
.echarts_all_arrow {
|
||||
display: block;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border: 1px solid #ccc;
|
||||
transform: rotateZ(45deg);
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent;
|
||||
}
|
||||
|
||||
.actions {
|
||||
width: 60px;
|
||||
height: 22px;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
background-color: #f6f7fb;
|
||||
color: #99a5b3;
|
||||
text-align: center;
|
||||
line-height: 22px;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
&:hover {
|
||||
color: #036aff;
|
||||
background-color: #036cff25;
|
||||
}
|
||||
}
|
||||
.actions.active {
|
||||
color: white;
|
||||
background-color: #036aff;
|
||||
}
|
||||
}
|
||||
.echartsbody {
|
||||
flex: 1;
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 小区
|
||||
.villageInfoBox {
|
||||
height: 127px;
|
||||
margin-left: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 35px;
|
||||
background: #036aff;
|
||||
border-radius: 16px 16px 16px 16px;
|
||||
margin-bottom: 20px;
|
||||
.iconbox {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
}
|
||||
.villageinfo {
|
||||
margin-left: 30px;
|
||||
.villagename {
|
||||
height: 30px;
|
||||
font-weight: 500;
|
||||
font-size: 24px;
|
||||
color: #ffffff;
|
||||
line-height: 30px;
|
||||
}
|
||||
.week {
|
||||
margin-top: 5px;
|
||||
height: 23px;
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
color: #ffffff;
|
||||
line-height: 23px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// tabs
|
||||
.tabsbox {
|
||||
margin-left: 20px;
|
||||
height: 497px;
|
||||
border: 2px solid;
|
||||
background: linear-gradient(180deg, #ebf4ff 0%, rgba(247, 252, 255, 0.5) 21.14%);
|
||||
border-image: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)) 2 2;
|
||||
.topbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
div {
|
||||
flex: 1;
|
||||
border-bottom: 2px solid #fff;
|
||||
border-image: linear-gradient(to bottom, #fff, rgba(255, 255, 255, 0)) 100% 1;
|
||||
text-align: center;
|
||||
padding: 14px;
|
||||
cursor: pointer;
|
||||
color: #98a4b2;
|
||||
&.active {
|
||||
border-bottom-color: transparent;
|
||||
border-image: none;
|
||||
position: relative;
|
||||
color: #000;
|
||||
|
||||
$width: 8px;
|
||||
$greePer: 60%;
|
||||
& i {
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 0;
|
||||
width: $width / 2;
|
||||
height: 100%;
|
||||
transform: skew(30deg);
|
||||
background: white;
|
||||
transition: all 0.3s;
|
||||
z-index: 10;
|
||||
&::after {
|
||||
content: '';
|
||||
display: block;
|
||||
width: $width;
|
||||
height: $width;
|
||||
background: radial-gradient(circle at bottom left, #ecf4fe $greePer, #ffffff (1 - $greePer));
|
||||
position: absolute;
|
||||
left: -$width;
|
||||
top: 0;
|
||||
}
|
||||
&::before {
|
||||
content: '';
|
||||
display: block;
|
||||
width: $width;
|
||||
height: $width;
|
||||
background: radial-gradient(circle at top right, #ecf4fe $greePer, #ffffff (1 - $greePer));
|
||||
position: absolute;
|
||||
right: -$width;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
& i.righti {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
top: 0;
|
||||
width: $width / 2;
|
||||
height: 100%;
|
||||
transform: skew(-30deg);
|
||||
background: white;
|
||||
z-index: 10;
|
||||
&::after {
|
||||
content: '';
|
||||
display: block;
|
||||
width: $width;
|
||||
height: $width;
|
||||
background: radial-gradient(circle at bottom right, #ecf4fe $greePer, #ffffff (1 - $greePer));
|
||||
position: absolute;
|
||||
right: -$width;
|
||||
left: initial;
|
||||
top: 0;
|
||||
}
|
||||
&::before {
|
||||
content: '';
|
||||
display: block;
|
||||
width: $width;
|
||||
height: $width;
|
||||
background: radial-gradient(circle at top left, #ecf4fe $greePer, #ffffff (1 - $greePer));
|
||||
position: absolute;
|
||||
left: -$width;
|
||||
right: none;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
width: 24px;
|
||||
height: 4px;
|
||||
background: #036aff;
|
||||
border-radius: 3px 3px 3px 3px;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.body {
|
||||
font-size: 16px;
|
||||
color: #222222;
|
||||
padding: 30px;
|
||||
.quicly_box {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
.quickly_item {
|
||||
width: 125px;
|
||||
margin-bottom: 20px;
|
||||
height: 56px;
|
||||
background: #ffffff;
|
||||
border-radius: 12px 12px 12px 12px;
|
||||
border: 1px solid #c0daff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.quickly_item_content {
|
||||
margin-left: 5px;
|
||||
width: 64px;
|
||||
height: 23px;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
color: #222222;
|
||||
line-height: 23px;
|
||||
}
|
||||
|
||||
&.add {
|
||||
text-align: center;
|
||||
color: #036aff;
|
||||
vertical-align: baseline;
|
||||
span {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 住户查询
|
||||
.userBox {
|
||||
border-radius: 10px;
|
||||
padding: 20px;
|
||||
height: 550px;
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, #ffffff 70%);
|
||||
border: 2px solid #ffffff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.title {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.searbox {
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
font-size: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 30px;
|
||||
div {
|
||||
width: 70px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.el-select {
|
||||
width: 160px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.el-input {
|
||||
flex: 0.3;
|
||||
}
|
||||
.el-button {
|
||||
color: #0083ff;
|
||||
border-color: #0083ff;
|
||||
width: 60px;
|
||||
height: 25px;
|
||||
border-radius: 5px;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 18px;
|
||||
text-align: left;
|
||||
|
||||
&.el-button--primary {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
.tablebox {
|
||||
flex: 1;
|
||||
.el-table {
|
||||
height: calc(100% - 60px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -24,7 +24,7 @@ export default defineConfig(({ mode, command }) => {
|
||||
open: true,
|
||||
proxy: {
|
||||
[env.VITE_APP_BASE_API]: {
|
||||
target: 'http://192.168.0.222:8080',
|
||||
target: 'http://192.168.1.222:8080',
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')
|
||||
|
||||
@@ -13,7 +13,7 @@ import path from 'path';
|
||||
export default (viteEnv: any, isBuild = false): [] => {
|
||||
const vitePlugins: any = [];
|
||||
vitePlugins.push(vue());
|
||||
// vitePlugins.push(vueDevTools());
|
||||
vitePlugins.push(vueDevTools());
|
||||
vitePlugins.push(createUnoCss());
|
||||
vitePlugins.push(createAutoImport(path));
|
||||
vitePlugins.push(createComponents(path));
|
||||
|
||||