房屋详情,单元变更
This commit is contained in:
@@ -18,10 +18,25 @@ VITE_APP_SNAILJOB_ADMIN = '/snail-job'
|
|||||||
VITE_APP_BASE_API = 'https://wuyeapi.bugtc.com'
|
VITE_APP_BASE_API = 'https://wuyeapi.bugtc.com'
|
||||||
# VITE_APP_BASE_API = 'http://192.168.0.222:8080'
|
# VITE_APP_BASE_API = 'http://192.168.0.222:8080'
|
||||||
|
|
||||||
|
# 登录成功跳转地址
|
||||||
|
VITE_LOGIN_BACK_URL = '/equipment/WaterDevice'
|
||||||
|
# 是否展示工作台
|
||||||
|
VITE_APP_SHOW_WORK_PLATFORM = false
|
||||||
|
|
||||||
|
|
||||||
|
# 地图类型 天地图 or 高德地图 天地图 WGS84 高德地图 GCJ02, 高德地图 需要在高德地图官网申请key
|
||||||
|
# 高德地图 GCJ02
|
||||||
|
# 天地图 WGS84
|
||||||
|
VITE_APP_MAP_TYPE = 'GCJ02'
|
||||||
|
|
||||||
|
# 高德地图key 建议放入环境变量中,避免泄露
|
||||||
|
VITE_GCJ02_KEY_GD = '8e302fe1be5f4db62bc734db23dca149'
|
||||||
|
VITE_GCJ02_JS_CODE_GD = '09534b3534d8da53968529a9ce164118'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 是否在打包时开启压缩,支持 gzip 和 brotli
|
# 是否在打包时开启压缩,支持 gzip 和 brotli
|
||||||
VITE_BUILD_COMPRESS = gzip
|
# VITE_BUILD_COMPRESS = gzip
|
||||||
|
|
||||||
VITE_APP_PORT = 80
|
VITE_APP_PORT = 80
|
||||||
|
|
||||||
|
|||||||
19
.gitignore
vendored
19
.gitignore
vendored
@@ -2,6 +2,23 @@
|
|||||||
.history
|
.history
|
||||||
node_modules/
|
node_modules/
|
||||||
dist/
|
dist/
|
||||||
|
.env
|
||||||
|
.git
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
.gitignore
|
||||||
|
.npmrc
|
||||||
|
.yarn
|
||||||
|
.yarnrc
|
||||||
|
.pnp.js
|
||||||
|
.pnp.lock.json
|
||||||
|
.pnp
|
||||||
|
.yarn.lock
|
||||||
|
.bat
|
||||||
|
dist.zip
|
||||||
|
.zip
|
||||||
|
|
||||||
|
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
@@ -27,3 +44,5 @@ pnpm-lock.yaml
|
|||||||
# 编译生成的文件
|
# 编译生成的文件
|
||||||
auto-imports.d.ts
|
auto-imports.d.ts
|
||||||
components.d.ts
|
components.d.ts
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
@echo off
|
|
||||||
echo.
|
|
||||||
echo [信息] 打包Web工程,生成dist文件。
|
|
||||||
echo.
|
|
||||||
|
|
||||||
%~d0
|
|
||||||
cd %~dp0
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
yarn build:prod
|
|
||||||
|
|
||||||
pause
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
@echo off
|
|
||||||
echo.
|
|
||||||
echo [信息] 安装Web工程,生成node_modules文件。
|
|
||||||
echo.
|
|
||||||
|
|
||||||
%~d0
|
|
||||||
cd %~dp0
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
yarn --registry=https://registry.npmmirror.com
|
|
||||||
|
|
||||||
pause
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
@echo off
|
|
||||||
echo.
|
|
||||||
echo [信息] 使用 Vite 命令运行 Web 工程。
|
|
||||||
echo.
|
|
||||||
|
|
||||||
%~d0
|
|
||||||
cd %~dp0
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
yarn dev
|
|
||||||
|
|
||||||
pause
|
|
||||||
@@ -86,6 +86,7 @@
|
|||||||
"vite": "7.3.1",
|
"vite": "7.3.1",
|
||||||
"vite-plugin-svg-icons-ng": "^1.5.2",
|
"vite-plugin-svg-icons-ng": "^1.5.2",
|
||||||
"vite-plugin-vue-devtools": "8.0.7",
|
"vite-plugin-vue-devtools": "8.0.7",
|
||||||
|
"vite-plugin-zip-pack": "^1.2.4",
|
||||||
"vitest": "4.0.18",
|
"vitest": "4.0.18",
|
||||||
"vue-tsc": "^3.2.5"
|
"vue-tsc": "^3.2.5"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
export default {
|
export default {
|
||||||
plugins: {
|
plugins: {
|
||||||
autoprefixer: {},
|
// autoprefixer: {},
|
||||||
'postcss-pxtorem': {
|
'postcss-pxtorem': {
|
||||||
rootValue: 16, // 基准根节点字体大小
|
rootValue: 16, // 基准根节点字体大小
|
||||||
propList: ['*'], // 所有属性都转换
|
propList: ['*'], // 所有属性都转换
|
||||||
|
|||||||
@@ -60,12 +60,12 @@ export interface DecorationForm extends BaseEntity {
|
|||||||
* 所属小区id
|
* 所属小区id
|
||||||
*/
|
*/
|
||||||
villageId?: string;
|
villageId?: string;
|
||||||
|
villageName?: string;
|
||||||
/**
|
/**
|
||||||
* 所属房屋id
|
* 所属房屋id
|
||||||
*/
|
*/
|
||||||
houseId?: string | number;
|
houseId?: string | number;
|
||||||
|
houseName?: string;
|
||||||
/**
|
/**
|
||||||
* 申请人姓名
|
* 申请人姓名
|
||||||
*/
|
*/
|
||||||
|
|||||||
17
src/api/system/Notification/index.ts
Normal file
17
src/api/system/Notification/index.ts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { AxiosPromise } from 'axios';
|
||||||
|
import { NoticeVO, NoticeForm, NoticeQuery } from '@/api/system/NoticePc/type';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询消息通知列表
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
|
||||||
|
export const getNotificationList = (query?: NoticeQuery): AxiosPromise<NoticeVO[]> => {
|
||||||
|
return request({
|
||||||
|
url: '/notification/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -85,13 +85,21 @@ export const listBillHouse = (query: { pageNum: number; pageSize: number }): Axi
|
|||||||
};
|
};
|
||||||
|
|
||||||
// ! =---------------
|
// ! =---------------
|
||||||
|
export type BillUserlist = {
|
||||||
|
'gender': string;
|
||||||
|
'phone': string;
|
||||||
|
'house_name': string;
|
||||||
|
'residentName': string;
|
||||||
|
'houseNo': string;
|
||||||
|
'residentId': string;
|
||||||
|
'buildingId': string;
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* 查询业主列表
|
* 查询业主列表
|
||||||
* @param data
|
* @param data
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
|
export const queryResidentList_holder = (query: { pageNum: number; pageSize: number }): AxiosPromise<BillUserlist[]> => {
|
||||||
export const queryResidentList_holder = (query: { pageNum: number; pageSize: number }) => {
|
|
||||||
return request({
|
return request({
|
||||||
url: '/bill/getResidentList',
|
url: '/bill/getResidentList',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
|||||||
@@ -5,13 +5,11 @@ import { addBuildingType, addHouseType, BuildingUnit, BuildingVo } from './type'
|
|||||||
// 楼栋---------------------------------------------------------------------------------------
|
// 楼栋---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
/** 根据 小区id 和 类型 查询楼栋信息 */
|
/** 根据 小区id 和 类型 查询楼栋信息 */
|
||||||
export function getBuildinglistAPI(buildingUse: string): AxiosPromise<BuildingVo[]> {
|
export function getBuildinglistAPI(): AxiosPromise<BuildingVo[]> {
|
||||||
return request({
|
return request({
|
||||||
url: '/building/byVillage',
|
url: '/building/byVillage',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {}
|
||||||
buildingUse: buildingUse
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/** 获取所有楼栋 */
|
/** 获取所有楼栋 */
|
||||||
@@ -55,9 +53,9 @@ export function deleteBuildingApi(id: string) {
|
|||||||
|
|
||||||
// 房屋----------------------------------------------------------------------------------------------
|
// 房屋----------------------------------------------------------------------------------------------
|
||||||
/** 根据 楼栋id 查询房屋信息 */
|
/** 根据 楼栋id 查询房屋信息 */
|
||||||
export function getHouselistAPI(buildingId: string, houseName: string = ''): AxiosPromise<BuildingUnit> {
|
export function getHouselistAPI(buildingId: string, houseName: string = '', houseUseTypeId: string = ''): AxiosPromise<BuildingUnit> {
|
||||||
return request({
|
return request({
|
||||||
url: `/house/groupByUnitTree/${buildingId}?houseName=${houseName}`,
|
url: `/house/groupByUnitTree/${buildingId}?houseName=${houseName}&houseUseTypeId=${houseUseTypeId}`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -119,7 +117,7 @@ export interface Data {
|
|||||||
billResidentList: BillResidentList[];
|
billResidentList: BillResidentList[];
|
||||||
chargeItemList: string[];
|
chargeItemList: string[];
|
||||||
house: House;
|
house: House;
|
||||||
parking: null;
|
parking: Parking;
|
||||||
residentList: ResidentList[];
|
residentList: ResidentList[];
|
||||||
storeroom: Storeroom;
|
storeroom: Storeroom;
|
||||||
}
|
}
|
||||||
@@ -143,7 +141,7 @@ export interface House {
|
|||||||
houseType: string;
|
houseType: string;
|
||||||
internalArea: string;
|
internalArea: string;
|
||||||
shareArea: string;
|
shareArea: string;
|
||||||
unitNo: number;
|
unitNoName: string;
|
||||||
villageName: string;
|
villageName: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,3 +164,19 @@ export interface Storeroom {
|
|||||||
storeroomNo: string;
|
storeroomNo: string;
|
||||||
unitNo: number;
|
unitNo: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Parking {
|
||||||
|
'parkingArea': number;
|
||||||
|
'areaName': string;
|
||||||
|
'createTime': string;
|
||||||
|
'parkingId': string;
|
||||||
|
'parkingStatus': string;
|
||||||
|
'remark': string;
|
||||||
|
'parkingFloor': string;
|
||||||
|
'type': string;
|
||||||
|
'villageId': number;
|
||||||
|
'parkingCode': string;
|
||||||
|
'residentName': string;
|
||||||
|
'residentId': string;
|
||||||
|
'createName': string;
|
||||||
|
}
|
||||||
|
|||||||
@@ -47,14 +47,15 @@ export interface BuildingUnit {
|
|||||||
buildingId: number;
|
buildingId: number;
|
||||||
buildingName: string;
|
buildingName: string;
|
||||||
floorCount: number;
|
floorCount: number;
|
||||||
unitCount: number;
|
|
||||||
units: BuildingUnitlist[];
|
units: BuildingUnitlist[];
|
||||||
}
|
}
|
||||||
// 单元
|
// 单元
|
||||||
export interface BuildingUnitlist {
|
export interface BuildingUnitlist {
|
||||||
floors: FloorsType[];
|
floors: FloorsType[];
|
||||||
unitNo: number;
|
unitNoName: string;
|
||||||
|
unitNoId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 楼层
|
// 楼层
|
||||||
export interface FloorsType {
|
export interface FloorsType {
|
||||||
floorNo: string;
|
floorNo: string;
|
||||||
@@ -80,7 +81,8 @@ export interface addHouseType {
|
|||||||
'houseId'?: string;
|
'houseId'?: string;
|
||||||
'buildingId'?: string;
|
'buildingId'?: string;
|
||||||
'villageId'?: string;
|
'villageId'?: string;
|
||||||
'unitNo': string;
|
'houseUseTypeId': string;
|
||||||
|
'unitNoId': string;
|
||||||
'floorNo': string;
|
'floorNo': string;
|
||||||
'houseNo': string;
|
'houseNo': string;
|
||||||
'houseArea': string;
|
'houseArea': string;
|
||||||
|
|||||||
76
src/api/system/houseUnit/index.ts
Normal file
76
src/api/system/houseUnit/index.ts
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { AxiosPromise } from 'axios';
|
||||||
|
import { UnitNoVO, UnitNoForm, UnitNoQuery } from './type';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询单元列表
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
|
||||||
|
export const listUnitNo = (query?: UnitNoQuery): AxiosPromise<UnitNoVO[]> => {
|
||||||
|
return request({
|
||||||
|
url: '/unitNo/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询单元详细
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
export const getUnitNo = (id: string | number): AxiosPromise<UnitNoVO> => {
|
||||||
|
return request({
|
||||||
|
url: '/unitNo/' + id,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增单元
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
export const addUnitNo = (data: UnitNoForm) => {
|
||||||
|
return request({
|
||||||
|
url: '/unitNo',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改单元
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
export const updateUnitNo = (data: UnitNoForm) => {
|
||||||
|
return request({
|
||||||
|
url: '/unitNo',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除单元
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
export const delUnitNo = (id: string | number | Array<string | number>) => {
|
||||||
|
return request({
|
||||||
|
url: '/unitNo/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 根据 楼栋id 获取单元
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
export const getByBUildingidtoUnitNo = (id: string) => {
|
||||||
|
return request({
|
||||||
|
url: '/unitNo/byBuildingList',
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
buildingId: id
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
65
src/api/system/houseUnit/type.ts
Normal file
65
src/api/system/houseUnit/type.ts
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
export interface UnitNoVO {
|
||||||
|
/**
|
||||||
|
* 单元表id
|
||||||
|
*/
|
||||||
|
id: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单元名称
|
||||||
|
*/
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小区id
|
||||||
|
*/
|
||||||
|
villageId: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼栋id
|
||||||
|
*/
|
||||||
|
buildingId: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface UnitNoForm extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 单元表id
|
||||||
|
*/
|
||||||
|
id?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单元名称
|
||||||
|
*/
|
||||||
|
name?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小区id
|
||||||
|
*/
|
||||||
|
villageId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼栋id
|
||||||
|
*/
|
||||||
|
buildingId?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface UnitNoQuery extends PageQuery {
|
||||||
|
/**
|
||||||
|
* 单元名称
|
||||||
|
*/
|
||||||
|
name?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小区id
|
||||||
|
*/
|
||||||
|
villageId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼栋id
|
||||||
|
*/
|
||||||
|
buildingId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日期范围参数
|
||||||
|
*/
|
||||||
|
params?: any;
|
||||||
|
}
|
||||||
63
src/api/system/houseUse/index.ts
Normal file
63
src/api/system/houseUse/index.ts
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { AxiosPromise } from 'axios';
|
||||||
|
import { HouseUseTypeVO, HouseUseTypeForm, HouseUseTypeQuery } from './type';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询房屋类型列表
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
|
||||||
|
export const listHouseUseType = (query?: HouseUseTypeQuery): AxiosPromise<HouseUseTypeVO[]> => {
|
||||||
|
return request({
|
||||||
|
url: '/houseUseType/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询房屋类型详细
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
export const getHouseUseType = (id: string | number): AxiosPromise<HouseUseTypeVO> => {
|
||||||
|
return request({
|
||||||
|
url: '/houseUseType/' + id,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增房屋类型
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
export const addHouseUseType = (data: HouseUseTypeForm) => {
|
||||||
|
return request({
|
||||||
|
url: '/houseUseType',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改房屋类型
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
export const updateHouseUseType = (data: HouseUseTypeForm) => {
|
||||||
|
return request({
|
||||||
|
url: '/houseUseType',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除房屋类型
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
export const delHouseUseType = (id: string | number | Array<string | number>) => {
|
||||||
|
return request({
|
||||||
|
url: '/houseUseType/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
});
|
||||||
|
};
|
||||||
35
src/api/system/houseUse/type.ts
Normal file
35
src/api/system/houseUse/type.ts
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
export interface HouseUseTypeVO {
|
||||||
|
/**
|
||||||
|
* 房屋类型id
|
||||||
|
*/
|
||||||
|
id: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用途名称
|
||||||
|
*/
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface HouseUseTypeForm extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 房屋类型id
|
||||||
|
*/
|
||||||
|
id?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用途名称
|
||||||
|
*/
|
||||||
|
name?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface HouseUseTypeQuery extends PageQuery {
|
||||||
|
/**
|
||||||
|
* 用途名称
|
||||||
|
*/
|
||||||
|
name?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日期范围参数
|
||||||
|
*/
|
||||||
|
params?: any;
|
||||||
|
}
|
||||||
@@ -91,9 +91,13 @@ export const getParkingReviewInfo = (id: string) => {
|
|||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const GetVillageListParking = (villageid?: string): AxiosPromise<ParkingVO[]> => {
|
export const GetVillageListParking = (villageid: string, houseId: string = undefined): AxiosPromise<ParkingVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: `/parking/getList/${villageid}`,
|
url: `/parking/getList`,
|
||||||
method: 'GET'
|
method: 'POST',
|
||||||
|
data: {
|
||||||
|
villageId: villageid,
|
||||||
|
houseId: houseId
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -68,9 +68,10 @@ export const delStoreroom = (id: string | number | Array<string | number>) => {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export const GetVillagelistStoreroom = (
|
export const GetVillagelistStoreroom = (
|
||||||
data: { villageid: string; unitNo: string; buildingId: string } = {
|
data: { villageid: string; unitNo: string; houseId?: string; buildingId: string } = {
|
||||||
villageid: null,
|
villageid: null,
|
||||||
buildingId: null,
|
buildingId: null,
|
||||||
|
houseId: null,
|
||||||
unitNo: null
|
unitNo: null
|
||||||
}
|
}
|
||||||
): AxiosPromise<StoreroomVO[]> => {
|
): AxiosPromise<StoreroomVO[]> => {
|
||||||
@@ -80,7 +81,8 @@ export const GetVillagelistStoreroom = (
|
|||||||
data: {
|
data: {
|
||||||
villageId: data.villageid,
|
villageId: data.villageid,
|
||||||
buildingId: data.buildingId,
|
buildingId: data.buildingId,
|
||||||
unitNo: data.unitNo
|
unitNo: data.unitNo,
|
||||||
|
houseId: data.houseId
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,12 +2,12 @@ export interface StoreroomVO {
|
|||||||
/**
|
/**
|
||||||
* 储藏室ID
|
* 储藏室ID
|
||||||
*/
|
*/
|
||||||
id: string | number;
|
id: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所属楼栋ID
|
* 所属楼栋ID
|
||||||
*/
|
*/
|
||||||
buildingId: string | number;
|
buildingId: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单元号
|
* 单元号
|
||||||
@@ -54,12 +54,12 @@ export interface StoreroomForm extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 储藏室ID
|
* 储藏室ID
|
||||||
*/
|
*/
|
||||||
id?: string | number;
|
id?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所属楼栋ID
|
* 所属楼栋ID
|
||||||
*/
|
*/
|
||||||
buildingId?: string | number;
|
buildingId?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单元号
|
* 单元号
|
||||||
@@ -106,7 +106,7 @@ export interface StoreroomQuery extends PageQuery {
|
|||||||
/**
|
/**
|
||||||
* 所属楼栋ID
|
* 所属楼栋ID
|
||||||
*/
|
*/
|
||||||
buildingId?: string | number;
|
buildingId?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单元号
|
* 单元号
|
||||||
|
|||||||
@@ -284,3 +284,40 @@ type LifeIndexKeys =
|
|||||||
type LifeIndices = {
|
type LifeIndices = {
|
||||||
[K in LifeIndexKeys]: LifeIndexItem;
|
[K in LifeIndexKeys]: LifeIndexItem;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询 快捷入口
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export const getQuicklyshortcut = () => {
|
||||||
|
return request({
|
||||||
|
url: '/workSpace/shortcut/list',
|
||||||
|
method: 'GET'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加 快捷入口
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export const addQuicklyshortcut = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workSpace/shortcut/add',
|
||||||
|
method: 'POST',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除 快捷入口
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export const delQuicklyshortcut = (id) => {
|
||||||
|
return request({
|
||||||
|
url: '/workSpace/shortcut/remove/' + id,
|
||||||
|
method: 'DELETE'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -1,46 +1,67 @@
|
|||||||
<template>
|
<template>
|
||||||
<slot name="default" />
|
<slot name="default" />
|
||||||
|
|
||||||
<el-dialog append-to-body v-model="dialog.dialogVisible" :title="dialog.dialogTitle" width="1050">
|
<el-dialog append-to-body v-model="dialog.dialogVisible" :title="dialog.dialogTitle" width="1250">
|
||||||
<nav class="flex flex-items-center mb-8">
|
<nav class="flex flex-items-center mb-8">
|
||||||
<div class="flex flex-items-center">
|
<!-- <div class="flex flex-items-center">
|
||||||
<div style="width: 70px; text-align: right; padding-right: 10px">房屋类型</div>
|
<div style="width: 70px; text-align: right; padding-right: 10px">房屋类型</div>
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
<el-select @change="handleChangeHouse" style="width: 140px" v-model="queryParams.buildingUse">
|
<el-select @change="handleChangeHouse" style="width: 140px" v-model="queryParams.houseUseTypeId">
|
||||||
<el-option v-for="(item, index) in com_build_use" :key="index" :label="item.label" :value="item.value"></el-option>
|
<el-option v-for="(item, index) in houseUseTypeList" :key="index" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="flex flex-items-center">
|
<div class="flex flex-items-center">
|
||||||
<div style="width: 60px; text-align: right; padding-right: 10px">楼栋</div>
|
<div style="width: 50px; text-align: right; padding-right: 10px">楼栋</div>
|
||||||
<div class="flex-1"></div>
|
<div class="flex-1"></div>
|
||||||
<el-select @change="handleChangebuilding" style="width: 140px" v-model="queryParams.buildingId">
|
<el-select @change="handleChangebuilding" clearable style="width: 140px" v-model="queryParams.buildingId">
|
||||||
<el-option v-for="(item, index) in buildinglist" :key="index" :label="item.buildingName" :value="item.id"></el-option>
|
<el-option v-for="(item, index) in buildinglist" :key="index" :label="item.buildingName" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-items-center mr-20px">
|
<div class="flex flex-items-center mr-20px">
|
||||||
<div style="width: 60px; text-align: right; padding-right: 10px">单元</div>
|
<div style="width: 50px; text-align: right; padding-right: 10px">单元</div>
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
<el-select style="width: 140px" v-model="queryParams.unitNo">
|
<el-select @change="handleChangeUnit" clearable style="width: 140px" v-model="queryParams.unitNoId">
|
||||||
<el-option v-for="(item, index) in unitlist" :key="index" :label="`${item.unitNo}单元`" :value="item.unitNo"></el-option>
|
<el-option v-for="(item, index) in unitlist" :key="index" :label="item.unitNoName" :value="item.unitNoId"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flex flex-items-center mr-20px">
|
||||||
|
<div style="width: 80px; text-align: right; padding-right: 10px">房屋类型</div>
|
||||||
|
<div class="flex-1">
|
||||||
|
<el-select clearable @change="handleHouseUseChange" style="width: 140px" v-model="queryParams.houseUseTypeId">
|
||||||
|
<el-option v-for="(item, index) in houseUseTypeList" :key="index" :label="item.name" :value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-items-center mr-20px">
|
||||||
|
<div style="width: 80px; text-align: right; padding-right: 10px">业主名称</div>
|
||||||
|
<div class="flex-1">
|
||||||
|
<el-input clearable @clear="handleClear" v-model="queryParams.residentName" placeholder="查找业主"></el-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" @click="getlist">查询</el-button>
|
<el-button type="primary" @click="getlist">查询</el-button>
|
||||||
<el-button @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<el-table @row-click="handleRowClick" ref="multipleTableRef" :data="tableData" border @selection-change="handleSelectionChange">
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
@row-click="handleRowClick"
|
||||||
|
ref="multipleTableRef"
|
||||||
|
:data="tableData"
|
||||||
|
border
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="序号" align="center" width="55" type="index" />
|
<el-table-column label="序号" align="center" width="55" type="index" />
|
||||||
<el-table-column label="小区" align="center" prop="villageName" />
|
<el-table-column label="小区" align="center" prop="villageName" />
|
||||||
<el-table-column label="楼栋" align="center" prop="buildingName" />
|
<el-table-column label="楼栋" align="center" prop="buildingName" />
|
||||||
<el-table-column label="单元" align="center" prop="unitNo" />
|
<el-table-column label="单元" align="center" prop="unitNoName" />
|
||||||
<el-table-column label="房间" align="center" prop="houseNo" />
|
<el-table-column label="房间" align="center" prop="houseNo" />
|
||||||
<el-table-column label="业主" align="center">
|
<el-table-column label="业主" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.userName ? scope.row.userName : '---' }}</span>
|
<span>{{ scope.row.residentName ? scope.row.residentName : '---' }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -66,18 +87,15 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { getBuildinglistAPI, getBuildingOnly, getHouselistAPI } from '@/api/system/house';
|
import { getBuildinglistAPI, getBuildingOnly, getHouselistAPI } from '@/api/system/house';
|
||||||
|
import { listHouseUseType } from '@/api/system/houseUse';
|
||||||
import { BillHouse, listBillHouse } from '@/api/system/SdbBill';
|
import { BillHouse, listBillHouse } from '@/api/system/SdbBill';
|
||||||
import { ref, watch, nextTick, getCurrentInstance, ComponentInternalInstance, toRefs } from 'vue';
|
import { ref, watch, nextTick, getCurrentInstance, ComponentInternalInstance, toRefs } from 'vue';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
// const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { sys_user_sex } = toRefs<any>(proxy?.useDict('sys_user_sex'));
|
// const { sys_user_sex } = toRefs<any>(proxy?.useDict('sys_user_sex'));
|
||||||
const { com_build_use } = toRefs<any>(proxy?.useDict('com_build_use'));
|
// const { com_build_use } = toRefs<any>(proxy?.useDict('com_build_use'));
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
userid: {
|
|
||||||
type: String,
|
|
||||||
default: ''
|
|
||||||
},
|
|
||||||
returnvalue: {
|
returnvalue: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'houseId'
|
default: 'houseId'
|
||||||
@@ -93,7 +111,9 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const { userid, titleName, returnvalue } = toRefs(props);
|
const { titleName, returnvalue } = toRefs(props);
|
||||||
|
|
||||||
|
const showids = ref([]);
|
||||||
|
|
||||||
// ✅ 手动设置默认值(替代 withDefaults)
|
// ✅ 手动设置默认值(替代 withDefaults)
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
@@ -108,9 +128,11 @@ const dialog = ref({
|
|||||||
const queryParams = ref({
|
const queryParams = ref({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
buildingUse: null,
|
// houseUseTypeId: null,
|
||||||
buildingId: null,
|
buildingId: null,
|
||||||
unitNo: null
|
unitNoId: null,
|
||||||
|
houseUseTypeId: null,
|
||||||
|
residentName: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
const multipleTableRef = ref();
|
const multipleTableRef = ref();
|
||||||
@@ -125,13 +147,12 @@ const isMultiple = computed(() => props.isMultiple ?? false);
|
|||||||
|
|
||||||
// 优化 handleUserSelection,避免重复查找
|
// 优化 handleUserSelection,避免重复查找
|
||||||
const handleUserSelection = () => {
|
const handleUserSelection = () => {
|
||||||
if (!userid.value || !tableData.value.length) return;
|
if (!tableData.value.length) return;
|
||||||
|
|
||||||
multipleSelection.value = [];
|
multipleSelection.value = [];
|
||||||
if (userid.value.trim() !== '') {
|
if (showids.value.length > 0) {
|
||||||
const arr = userid.value.split(',');
|
const arr = showids.value;
|
||||||
arr.forEach((item) => {
|
arr.forEach((item) => {
|
||||||
const target = tableData.value.find((row) => row.userId == item);
|
const target = tableData.value.find((row) => row.houseId == item);
|
||||||
target && multipleSelection.value.push(target);
|
target && multipleSelection.value.push(target);
|
||||||
});
|
});
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
@@ -146,7 +167,7 @@ const handleUserSelection = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// ====================== 方法 ======================
|
// ====================== 方法 ======================
|
||||||
|
const houseUseTypeList = ref([]);
|
||||||
// 获取列表
|
// 获取列表
|
||||||
function getlist() {
|
function getlist() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
@@ -157,7 +178,7 @@ function getlist() {
|
|||||||
handleUserSelection();
|
handleUserSelection();
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error('获取用户列表失败:', error);
|
console.error('获取列表失败:', error);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@@ -169,17 +190,35 @@ const buildinglist = ref([]);
|
|||||||
/** 房屋列表 */
|
/** 房屋列表 */
|
||||||
const unitlist = ref([]);
|
const unitlist = ref([]);
|
||||||
|
|
||||||
/** 筛选房屋类型 */
|
/** 获取楼栋 列表 */
|
||||||
function handleChangeHouse(val: string) {
|
function handleChangeHouse() {
|
||||||
getBuildinglistAPI(val).then((res) => {
|
getBuildinglistAPI().then((res) => {
|
||||||
buildinglist.value = res.data;
|
buildinglist.value = res.data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleClear() {
|
||||||
|
queryParams.value.residentName = '';
|
||||||
|
getlist();
|
||||||
|
}
|
||||||
|
function handleHouseUseChange() {
|
||||||
|
getlist();
|
||||||
|
}
|
||||||
/** 单元列表 */
|
/** 单元列表 */
|
||||||
function handleChangebuilding(val: string) {
|
function handleChangebuilding(val: string) {
|
||||||
getHouselistAPI(val).then((res) => {
|
queryParams.value.unitNoId = null;
|
||||||
unitlist.value = res.data.units;
|
unitlist.value = [];
|
||||||
});
|
|
||||||
|
if (queryParams.value.buildingId) {
|
||||||
|
getHouselistAPI(val).then((res) => {
|
||||||
|
unitlist.value = res.data.units;
|
||||||
|
getlist();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
getlist();
|
||||||
|
}
|
||||||
|
function handleChangeUnit() {
|
||||||
|
getlist();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ==============================================
|
// ==============================================
|
||||||
@@ -221,9 +260,10 @@ function resetQuery() {
|
|||||||
queryParams.value = {
|
queryParams.value = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
buildingUse: null,
|
houseUseTypeId: null,
|
||||||
buildingId: null,
|
buildingId: null,
|
||||||
unitNo: null
|
unitNoId: null,
|
||||||
|
residentName: ''
|
||||||
};
|
};
|
||||||
getlist();
|
getlist();
|
||||||
}
|
}
|
||||||
@@ -267,9 +307,18 @@ function confirm() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open: () => {
|
open: (showidArray: string[] = []) => {
|
||||||
|
showids.value = showidArray;
|
||||||
getlist();
|
getlist();
|
||||||
dialog.value.dialogVisible = true;
|
dialog.value.dialogVisible = true;
|
||||||
|
|
||||||
|
listHouseUseType({
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 99999
|
||||||
|
}).then((res) => {
|
||||||
|
houseUseTypeList.value = res.rows;
|
||||||
|
});
|
||||||
|
handleChangeHouse();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -39,26 +39,21 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { getBuildinglistAPI, getBuildingOnly, getHouselistAPI } from '@/api/system/house';
|
import { getBuildinglistAPI, getHouselistAPI } from '@/api/system/house';
|
||||||
import { BillHouse, listBillHouse, queryResidentList_holder } from '@/api/system/SdbBill';
|
import { BillUserlist, queryResidentList_holder } from '@/api/system/SdbBill';
|
||||||
import { ref, watch, nextTick, getCurrentInstance, ComponentInternalInstance, toRefs } from 'vue';
|
import { ref, nextTick, getCurrentInstance, ComponentInternalInstance, toRefs } from 'vue';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { sys_user_sex } = toRefs<any>(proxy?.useDict('sys_user_sex'));
|
const { sys_user_sex } = toRefs<any>(proxy?.useDict('sys_user_sex'));
|
||||||
const { com_build_use } = toRefs<any>(proxy?.useDict('com_build_use'));
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
userid: {
|
|
||||||
type: String || Array<string>,
|
|
||||||
default: ''
|
|
||||||
},
|
|
||||||
returnvalue: {
|
returnvalue: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'houseId'
|
default: 'houseId'
|
||||||
},
|
},
|
||||||
titleName: {
|
titleName: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '选择房屋'
|
default: '选择业主'
|
||||||
},
|
},
|
||||||
/** 是否多选 false 单选 */
|
/** 是否多选 false 单选 */
|
||||||
isMultiple: {
|
isMultiple: {
|
||||||
@@ -67,11 +62,12 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const { userid, titleName, returnvalue } = toRefs(props);
|
const { titleName, returnvalue } = toRefs(props);
|
||||||
|
|
||||||
|
const userid = ref([]);
|
||||||
// ✅ 手动设置默认值(替代 withDefaults)
|
// ✅ 手动设置默认值(替代 withDefaults)
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
change: [value: string | number | (string | number)[] | BillHouse | BillHouse[]]; // 支持返回数组
|
change: [value: string | number | (string | number)[] | BillUserlist | BillUserlist[]]; // 支持返回数组
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const dialog = ref({
|
const dialog = ref({
|
||||||
@@ -85,29 +81,24 @@ const queryParams = ref({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const multipleTableRef = ref();
|
const multipleTableRef = ref();
|
||||||
const tableData = ref<BillHouse[]>([]);
|
const tableData = ref<BillUserlist[]>([]);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
// 存储选中项
|
// 存储选中项
|
||||||
const multipleSelection = ref<BillHouse[]>([]);
|
const multipleSelection = ref<BillUserlist[]>([]);
|
||||||
|
|
||||||
const isMultiple = computed(() => props.isMultiple ?? false);
|
const isMultiple = computed(() => props.isMultiple ?? false);
|
||||||
|
|
||||||
// 优化 handleUserSelection,避免重复查找
|
// 优化 handleUserSelection,避免重复查找
|
||||||
const handleUserSelection = () => {
|
const handleUserSelection = () => {
|
||||||
if (!userid.value || !tableData.value.length) return;
|
if (!tableData.value.length) return;
|
||||||
|
|
||||||
multipleSelection.value = [];
|
multipleSelection.value = [];
|
||||||
let arr = [];
|
const arr = userid.value;
|
||||||
if (userid.value && typeof userid.value === 'string' && userid.value.trim() !== '') {
|
|
||||||
arr = userid.value.split(',');
|
|
||||||
} else if (Array.isArray(userid.value)) {
|
|
||||||
arr = [...userid.value];
|
|
||||||
}
|
|
||||||
if (!arr.length) return;
|
if (!arr.length) return;
|
||||||
arr.forEach((item) => {
|
arr.forEach((item) => {
|
||||||
const target = tableData.value.find((row) => row.userId == item);
|
const target = tableData.value.find((row) => row.residentId == item);
|
||||||
target && multipleSelection.value.push(target);
|
target && multipleSelection.value.push(target);
|
||||||
});
|
});
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
@@ -146,7 +137,7 @@ const unitlist = ref([]);
|
|||||||
|
|
||||||
/** 筛选房屋类型 */
|
/** 筛选房屋类型 */
|
||||||
function handleChangeHouse(val: string) {
|
function handleChangeHouse(val: string) {
|
||||||
getBuildinglistAPI(val).then((res) => {
|
getBuildinglistAPI().then((res) => {
|
||||||
buildinglist.value = res.data;
|
buildinglist.value = res.data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -160,7 +151,7 @@ function handleChangebuilding(val: string) {
|
|||||||
// ==============================================
|
// ==============================================
|
||||||
// ✅ 新增:处理 selection-change(多选专用)
|
// ✅ 新增:处理 selection-change(多选专用)
|
||||||
// ==============================================
|
// ==============================================
|
||||||
function handleSelectionChange(selection: BillHouse[]) {
|
function handleSelectionChange(selection: BillUserlist[]) {
|
||||||
if (isMultiple.value) {
|
if (isMultiple.value) {
|
||||||
multipleSelection.value = selection;
|
multipleSelection.value = selection;
|
||||||
}
|
}
|
||||||
@@ -169,11 +160,11 @@ function handleSelectionChange(selection: BillHouse[]) {
|
|||||||
// 最佳单选方案:点击行选中,无报错、无循环、最稳定
|
// 最佳单选方案:点击行选中,无报错、无循环、最稳定
|
||||||
// ==============================================
|
// ==============================================
|
||||||
// 优化 handleRowClick,避免重复
|
// 优化 handleRowClick,避免重复
|
||||||
function handleRowClick(row: BillHouse) {
|
function handleRowClick(row: BillUserlist) {
|
||||||
if (!multipleTableRef.value) return;
|
if (!multipleTableRef.value) return;
|
||||||
|
|
||||||
if (isMultiple.value) {
|
if (isMultiple.value) {
|
||||||
const index = multipleSelection.value.findIndex((item) => item.houseId === row.houseId);
|
const index = multipleSelection.value.findIndex((item) => item.residentId === row.residentId);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
// 取消选中
|
// 取消选中
|
||||||
multipleSelection.value.splice(index, 1);
|
multipleSelection.value.splice(index, 1);
|
||||||
@@ -220,7 +211,7 @@ function confirm() {
|
|||||||
// 返回指定字段数组
|
// 返回指定字段数组
|
||||||
emit(
|
emit(
|
||||||
'change',
|
'change',
|
||||||
multipleSelection.value.map((item) => item[returnvalue.value as keyof BillHouse])
|
multipleSelection.value.map((item) => item[returnvalue.value as keyof BillUserlist])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -230,7 +221,7 @@ function confirm() {
|
|||||||
emit('change', multipleSelection.value[0]);
|
emit('change', multipleSelection.value[0]);
|
||||||
} else {
|
} else {
|
||||||
// 返回指定字段
|
// 返回指定字段
|
||||||
emit('change', multipleSelection.value[0][returnvalue.value as keyof BillHouse]);
|
emit('change', multipleSelection.value[0][returnvalue.value as keyof BillUserlist]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,7 +230,8 @@ function confirm() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open: () => {
|
open: (arr: string[] = []) => {
|
||||||
|
userid.value = arr;
|
||||||
getlist();
|
getlist();
|
||||||
dialog.value.dialogVisible = true;
|
dialog.value.dialogVisible = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const props = defineProps({
|
|||||||
total: propTypes.number,
|
total: propTypes.number,
|
||||||
page: propTypes.number.def(1),
|
page: propTypes.number.def(1),
|
||||||
limit: propTypes.number.def(20),
|
limit: propTypes.number.def(20),
|
||||||
pageSizes: { type: Array<number>, default: () => [10, 20, 30, 50] },
|
pageSizes: { type: Array<number>, default: () => [10, 20, 30, 50, 100] },
|
||||||
// 移动端页码按钮的数量端默认值5
|
// 移动端页码按钮的数量端默认值5
|
||||||
pagerCount: propTypes.number.def(document.body.clientWidth < 992 ? 5 : 7),
|
pagerCount: propTypes.number.def(document.body.clientWidth < 992 ? 5 : 7),
|
||||||
layout: propTypes.string.def('total, sizes, prev, pager, next, jumper'),
|
layout: propTypes.string.def('total, sizes, prev, pager, next, jumper'),
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ import {
|
|||||||
currentTaskAllUser,
|
currentTaskAllUser,
|
||||||
getNextNodeList
|
getNextNodeList
|
||||||
} from '@/api/workflow/task';
|
} from '@/api/workflow/task';
|
||||||
import UserSelect from '@/components/UserSelect.vue';
|
import UserSelect from '@/components/UserSelect/index.vue';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
import { FlowCopyVo, FlowTaskVO, TaskOperationBo } from '@/api/workflow/task/types';
|
import { FlowCopyVo, FlowTaskVO, TaskOperationBo } from '@/api/workflow/task/types';
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ export const useHouseStore = defineStore(
|
|||||||
'buildToward': '',
|
'buildToward': '',
|
||||||
'buildTall': '',
|
'buildTall': '',
|
||||||
'buildStructure': '',
|
'buildStructure': '',
|
||||||
'unitCount': null,
|
|
||||||
'floorCount': null,
|
'floorCount': null,
|
||||||
'remark': ''
|
'remark': ''
|
||||||
});
|
});
|
||||||
@@ -73,37 +72,41 @@ export const useHouseStore = defineStore(
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 初始化
|
// 初始化
|
||||||
const initHouse = async (currentbuildingtype: string) => {
|
const initHouse = async () => {
|
||||||
currentBuildingInfoList.value = [];
|
currentBuildingInfoList.value = [];
|
||||||
// 获取当前小区 所有楼栋信息
|
// 获取当前小区 所有楼栋信息
|
||||||
const res2 = await getBuildinglistAPI(currentbuildingtype);
|
const res2 = await getBuildinglistAPI();
|
||||||
currentBuildingInfoList.value = res2.data;
|
currentBuildingInfoList.value = res2.data;
|
||||||
|
// 得到小区 内 楼栋列表 -> 切换到第一个小区
|
||||||
|
if (res2.data.length > 0) {
|
||||||
|
switchBuilding(res2.data[0].id);
|
||||||
|
}
|
||||||
// 获取当前小区 第一个楼栋信息
|
// 获取当前小区 第一个楼栋信息
|
||||||
// ! 不同住宅类型
|
// // ! 不同住宅类型
|
||||||
if ((currentBuildingInfo.value && currentBuildingInfo.value.id === null) || buildingtype.value !== currentbuildingtype) {
|
// if ((currentBuildingInfo.value && currentBuildingInfo.value.id === null) || buildingtype.value !== currentbuildingtype) {
|
||||||
currentBuildingInfo.value = res2.data[0];
|
// currentBuildingInfo.value = res2.data[0];
|
||||||
// ! 相同住宅类型
|
// // ! 相同住宅类型
|
||||||
} else if (buildingtype.value === currentbuildingtype) {
|
// } else if (buildingtype.value === currentbuildingtype) {
|
||||||
// 更新当前楼栋的 信息
|
// // 更新当前楼栋的 信息
|
||||||
currentBuildingInfo.value = res2.data.find((item) => item.id === currentBuildingInfo.value.id);
|
// currentBuildingInfo.value = res2.data.find((item) => item.id === currentBuildingInfo.value.id);
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (currentBuildingInfo.value && currentBuildingInfo.value.id) {
|
// if (currentBuildingInfo.value && currentBuildingInfo.value.id) {
|
||||||
// 获取当前 第一个楼栋的所有信息
|
// // 获取当前 第一个楼栋的所有信息
|
||||||
const res3 = await getHouselistAPI(currentBuildingInfo.value.id);
|
// const res3 = await getHouselistAPI(currentBuildingInfo.value.id);
|
||||||
currentHouseInfoList.value = res3.data;
|
// currentHouseInfoList.value = res3.data;
|
||||||
floorslist.value = new Set();
|
// floorslist.value = new Set();
|
||||||
// 得到所有的有房屋的 楼层 数组
|
// // 得到所有的有房屋的 楼层 数组
|
||||||
currentHouseInfoList.value.units.forEach((item) => {
|
// currentHouseInfoList.value.units.forEach((item) => {
|
||||||
item.floors.forEach((floor) => {
|
// item.floors.forEach((floor) => {
|
||||||
floorslist.value.add(floor.floorNo);
|
// floorslist.value.add(floor.floorNo);
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
if (buildingtype.value !== currentbuildingtype) {
|
|
||||||
buildingtype.value = currentbuildingtype;
|
// if (buildingtype.value !== currentbuildingtype) {
|
||||||
}
|
// buildingtype.value = currentbuildingtype;
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
};
|
};
|
||||||
|
|
||||||
// 选中的房屋
|
// 选中的房屋
|
||||||
@@ -118,7 +121,7 @@ export const useHouseStore = defineStore(
|
|||||||
// 清空
|
// 清空
|
||||||
currentBuildingInfoList.value = [];
|
currentBuildingInfoList.value = [];
|
||||||
// 获取当前小区 所有楼栋信息
|
// 获取当前小区 所有楼栋信息
|
||||||
const res2 = await getBuildinglistAPI(housetype);
|
const res2 = await getBuildinglistAPI();
|
||||||
currentBuildingInfoList.value = res2.data;
|
currentBuildingInfoList.value = res2.data;
|
||||||
// 获取当前小区 第一个楼栋信息
|
// 获取当前小区 第一个楼栋信息
|
||||||
if ((currentBuildingInfo.value && currentBuildingInfo.value.id === null) || buildingtype.value !== housetype) {
|
if ((currentBuildingInfo.value && currentBuildingInfo.value.id === null) || buildingtype.value !== housetype) {
|
||||||
@@ -134,7 +137,6 @@ export const useHouseStore = defineStore(
|
|||||||
'buildToward': '',
|
'buildToward': '',
|
||||||
'buildTall': '',
|
'buildTall': '',
|
||||||
'buildStructure': '',
|
'buildStructure': '',
|
||||||
'unitCount': null,
|
|
||||||
'floorCount': null,
|
'floorCount': null,
|
||||||
'remark': ''
|
'remark': ''
|
||||||
};
|
};
|
||||||
@@ -152,22 +154,24 @@ export const useHouseStore = defineStore(
|
|||||||
// 更新当前楼栋信息
|
// 更新当前楼栋信息
|
||||||
const updateCureentBuilding = async () => {
|
const updateCureentBuilding = async () => {
|
||||||
currentHouseInfoList.value = null;
|
currentHouseInfoList.value = null;
|
||||||
// 获取当前 楼栋的所有信息
|
if (currentBuildingInfo.value && currentBuildingInfo.value.id) {
|
||||||
const res3 = await getHouselistAPI(currentBuildingInfo.value.id);
|
// 获取当前 楼栋的所有信息
|
||||||
currentHouseInfoList.value = res3.data;
|
const res3 = await getHouselistAPI(currentBuildingInfo.value.id);
|
||||||
floorslist.value = new Set();
|
currentHouseInfoList.value = res3.data;
|
||||||
// 得到所有的有房屋的 楼层 数组
|
floorslist.value = new Set();
|
||||||
currentHouseInfoList.value.units.forEach((item) => {
|
// 得到所有的有房屋的 楼层 数组
|
||||||
item.floors.forEach((floor) => {
|
currentHouseInfoList.value.units.forEach((item) => {
|
||||||
floorslist.value.add(floor.floorNo);
|
item.floors.forEach((floor) => {
|
||||||
|
floorslist.value.add(floor.floorNo);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
};
|
};
|
||||||
// 根据房屋号,查询房屋
|
// 根据房屋号,查询房屋
|
||||||
async function getHouseBybuildingNo(houseName: string) {
|
async function getHouseBybuildingNo(houseName: string, houseUseTypeId: string) {
|
||||||
currentHouseInfoList.value = null;
|
currentHouseInfoList.value = null;
|
||||||
// 获取当前 楼栋的所有信息
|
// 获取当前 楼栋的所有信息
|
||||||
const res3 = await getHouselistAPI(currentBuildingInfo.value.id, houseName);
|
const res3 = await getHouselistAPI(currentBuildingInfo.value.id, houseName, houseUseTypeId);
|
||||||
currentHouseInfoList.value = res3.data;
|
currentHouseInfoList.value = res3.data;
|
||||||
floorslist.value = null;
|
floorslist.value = null;
|
||||||
floorslist.value = new Set();
|
floorslist.value = new Set();
|
||||||
@@ -191,16 +195,15 @@ export const useHouseStore = defineStore(
|
|||||||
'buildToward': '',
|
'buildToward': '',
|
||||||
'buildTall': '',
|
'buildTall': '',
|
||||||
'buildStructure': '',
|
'buildStructure': '',
|
||||||
'unitCount': null,
|
|
||||||
'floorCount': null,
|
'floorCount': null,
|
||||||
'remark': ''
|
'remark': ''
|
||||||
};
|
};
|
||||||
currentHouseInfoList.value = null;
|
currentHouseInfoList.value = null;
|
||||||
|
currentBuildingInfo.value = currentBuildingInfoList.value.find((item) => item.id === buildingId);
|
||||||
getHouselistAPI(buildingId).then((res) => {
|
getHouselistAPI(buildingId).then((res) => {
|
||||||
|
if (!res.data) return;
|
||||||
currentHouseInfoList.value = res.data;
|
currentHouseInfoList.value = res.data;
|
||||||
// 获取当前楼栋信息并 赋值
|
// 获取当前楼栋信息并 赋值
|
||||||
currentBuildingInfo.value = currentBuildingInfoList.value.find((item) => item.id === buildingId);
|
|
||||||
|
|
||||||
// 清空 楼层信息
|
// 清空 楼层信息
|
||||||
floorslist.value.clear();
|
floorslist.value.clear();
|
||||||
// 重新获取楼层信息
|
// 重新获取楼层信息
|
||||||
@@ -215,7 +218,7 @@ export const useHouseStore = defineStore(
|
|||||||
|
|
||||||
// 更新数据
|
// 更新数据
|
||||||
const updateHouse = () => {
|
const updateHouse = () => {
|
||||||
initHouse(buildingtype.value);
|
initHouse();
|
||||||
};
|
};
|
||||||
// 删除指定楼栋
|
// 删除指定楼栋
|
||||||
const deleteBuildingFun = (buildingId: string) => {
|
const deleteBuildingFun = (buildingId: string) => {
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ export function convertBuildingToTree(buildings: any[]): Tree[] {
|
|||||||
const units = building.units || [];
|
const units = building.units || [];
|
||||||
const unitTrees = units.map((unit: any) => {
|
const unitTrees = units.map((unit: any) => {
|
||||||
const unitTree: Tree = {
|
const unitTree: Tree = {
|
||||||
label: `${unit.unitNo} 单元`,
|
label: unit.unitNoName,
|
||||||
value: unit.unitNo,
|
value: unit.unitNoId,
|
||||||
type: 'unitNo',
|
type: 'unitNo',
|
||||||
children: []
|
children: []
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -348,9 +348,7 @@ function submitFormInfo() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const cancelForm = () => {
|
const cancelForm = () => {
|
||||||
router.push({
|
router.back();
|
||||||
path: '/community'
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,6 @@
|
|||||||
<el-table-column label="发布人" align="center" prop="createName" />
|
<el-table-column label="发布人" align="center" prop="createName" />
|
||||||
<el-table-column label="操作" align="center" width="300px" fixed="right">
|
<el-table-column label="操作" align="center" width="300px" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- TODO 发布按钮!!! -->
|
|
||||||
<el-button v-if="scope.row.status === '0'" link type="primary" @click="handleSend(scope.row)">发布</el-button>
|
<el-button v-if="scope.row.status === '0'" link type="primary" @click="handleSend(scope.row)">发布</el-button>
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['activity:activity:edit']">编辑</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['activity:activity:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['activity:activity:remove']">删除</el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['activity:activity:remove']">删除</el-button>
|
||||||
|
|||||||
@@ -116,7 +116,6 @@ function init() {
|
|||||||
}
|
}
|
||||||
init();
|
init();
|
||||||
|
|
||||||
// TODO Banner 提交
|
|
||||||
// !== 提交 =============================================================================
|
// !== 提交 =============================================================================
|
||||||
// 提交
|
// 提交
|
||||||
const submitForm = () => {
|
const submitForm = () => {
|
||||||
|
|||||||
@@ -69,16 +69,17 @@
|
|||||||
<el-table-column label="验收人" align="center" prop="inspectionName" />
|
<el-table-column label="验收人" align="center" prop="inspectionName" />
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- TODO 验收 -->
|
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="scope.row.inspectionResult !== '1'"
|
v-if="scope.row.inspectionResult !== '1'"
|
||||||
@click="handleInspection(scope.row)"
|
@click="handleInspection(scope.row, 0, '验收')"
|
||||||
v-hasPermi="['repair:edit:decoration']"
|
v-hasPermi="['repair:edit:decoration']"
|
||||||
>验收</el-button
|
>验收</el-button
|
||||||
>
|
>
|
||||||
<el-button link type="primary" v-else @click="handleInspection(scope.row)" v-hasPermi="['decoration:decoration:query']">详情</el-button>
|
<el-button link type="primary" v-else @click="handleInspection(scope.row, 1, '详情')" v-hasPermi="['decoration:decoration:query']"
|
||||||
|
>详情</el-button
|
||||||
|
>
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['decoration:decoration:edit']">编辑</el-button>
|
<el-button link type="primary" @click="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>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['decoration:decoration:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -90,11 +91,26 @@
|
|||||||
|
|
||||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
<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 ref="decorationFormRef" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-form-item label="验收人姓名" prop="inspectionName">
|
<el-form-item label="小区名称" prop="villageName" v-if="isedit === 1">
|
||||||
<el-input v-model="form.inspectionName" placeholder="请输入验收人姓名" />
|
<el-input :disabled="isedit === 1" v-model="form.villageName" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="房屋号" prop="houseName" v-if="isedit === 1">
|
||||||
|
<el-input :disabled="isedit === 1" v-model="form.houseName" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="申请人" prop="applyName" v-if="isedit === 1">
|
||||||
|
<el-input :disabled="isedit === 1" v-model="form.applyName" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="装修公司" prop="decorationCompany" v-if="isedit === 1">
|
||||||
|
<el-input :disabled="isedit === 1" v-model="form.decorationCompany" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="装修内容" prop="decorationContent" v-if="isedit === 1">
|
||||||
|
<el-input :disabled="isedit === 1" v-model="form.decorationContent" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="装修押金" prop="decorationDeposit" v-if="isedit === 1">
|
||||||
|
<el-input :disabled="isedit === 1" v-model="form.decorationDeposit" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="验收结果" prop="inspectionResult">
|
<el-form-item label="验收结果" prop="inspectionResult">
|
||||||
<el-select v-model="form.inspectionResult" placeholder="请选择装修验收结果">
|
<el-select :disabled="isedit === 1" v-model="form.inspectionResult" placeholder="请选择装修验收结果">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in com_decoration_status.filter((item) => item.value !== '0')"
|
v-for="item in com_decoration_status.filter((item) => item.value !== '0')"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -103,11 +119,14 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="验收人" prop="inspectionName">
|
||||||
|
<el-input :disabled="isedit === 1" v-model="form.inspectionName" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入" :rows="5"></el-input>
|
<el-input :disabled="isedit === 1" v-model="form.remark" type="textarea" placeholder="请输入" :rows="5"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer v-if="isedit !== 1">
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
@@ -151,6 +170,8 @@ const initFormData: DecorationForm = {
|
|||||||
decorationDeposit: undefined,
|
decorationDeposit: undefined,
|
||||||
inspectionResult: undefined,
|
inspectionResult: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
|
villageName: undefined,
|
||||||
|
houseName: undefined,
|
||||||
inspectionName: undefined
|
inspectionName: undefined
|
||||||
};
|
};
|
||||||
const data = reactive<PageData<DecorationForm, DecorationQuery>>({
|
const data = reactive<PageData<DecorationForm, DecorationQuery>>({
|
||||||
@@ -233,14 +254,16 @@ const handleUpdate = async (row?: DecorationVO) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const isedit = ref(1);
|
||||||
/** 验收 */
|
/** 验收 */
|
||||||
const handleInspection = (row: DecorationVO) => {
|
const handleInspection = (row: DecorationVO, edit: number, type: string) => {
|
||||||
form.value = {
|
form.value = {
|
||||||
...form.value,
|
...form.value,
|
||||||
...row
|
...row
|
||||||
};
|
};
|
||||||
dialog.visible = true;
|
dialog.visible = true;
|
||||||
dialog.title = '验收';
|
dialog.title = type;
|
||||||
|
isedit.value = edit;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
|
|||||||
@@ -76,9 +76,7 @@ const submitForm = () => {
|
|||||||
};
|
};
|
||||||
// 推出
|
// 推出
|
||||||
const cancelForm = () => {
|
const cancelForm = () => {
|
||||||
router.push({
|
router.back();
|
||||||
path: '/system/HouseFacilities'
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -204,9 +204,7 @@ const submitForm = () => {
|
|||||||
};
|
};
|
||||||
// 推出
|
// 推出
|
||||||
const cancelForm = () => {
|
const cancelForm = () => {
|
||||||
router.push({
|
router.back();
|
||||||
path: '/carArea/monthCard'
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,8 @@
|
|||||||
}"
|
}"
|
||||||
@click="handleClick(1)"
|
@click="handleClick(1)"
|
||||||
>
|
>
|
||||||
待办({{ todonum }})
|
待办
|
||||||
|
<span v-if="todonum !== 0">({{ todonum }})</span>
|
||||||
</li>
|
</li>
|
||||||
<li
|
<li
|
||||||
:class="{
|
:class="{
|
||||||
@@ -18,29 +19,34 @@
|
|||||||
}"
|
}"
|
||||||
@click="handleClick(2)"
|
@click="handleClick(2)"
|
||||||
>
|
>
|
||||||
通知({{ noticnum }})
|
通知
|
||||||
|
<span v-if="noticnum !== 0">({{ noticnum }})</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="rightbody">
|
<div class="rightbody">
|
||||||
<div class="flex" v-if="activeTabs === 1">
|
<div class="flex" v-if="activeTabs === 1">
|
||||||
<h3 class="title">代办({{ todonum }})</h3>
|
<h3 class="title">
|
||||||
|
代办 <span v-if="todonum !== 0">({{ todonum }})</span>
|
||||||
|
</h3>
|
||||||
<el-button link type="primary">清除未读</el-button>
|
<el-button link type="primary">清除未读</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex" v-else-if="activeTabs === 2">
|
<div class="flex" v-else-if="activeTabs === 2">
|
||||||
<h3 class="title">通知({{ noticnum }})</h3>
|
<h3 class="title">
|
||||||
|
通知<span v-if="noticnum !== 0">({{ noticnum }})</span>
|
||||||
|
</h3>
|
||||||
<el-button link type="primary">清除未读</el-button>
|
<el-button link type="primary">清除未读</el-button>
|
||||||
</div>
|
</div>
|
||||||
<ul v-if="activeTabs === 1">
|
<ul v-if="activeTabs === 1">
|
||||||
<li
|
<li
|
||||||
v-for="(item, index) in arr"
|
v-for="(item, index) in awaittoList"
|
||||||
:key="index"
|
:key="index"
|
||||||
@click="() => (item.disabled = !item.disabled)"
|
@click="handleRead(item)"
|
||||||
:class="{
|
:class="{
|
||||||
disable: item.disabled
|
disable: !isdisable(item)
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="subtitle">报修工单提醒</div>
|
<div class="subtitle">{{ item.title }}</div>
|
||||||
<div class="info">您有一条新的报修工单需要处理,保修标题:下水道堵塞</div>
|
<div class="info">{{ item.content }},保修标题:{{ item.item }}</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul v-else-if="activeTabs === 2">
|
<ul v-else-if="activeTabs === 2">
|
||||||
@@ -62,6 +68,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { getNotificationList } from '@/api/system/Notification/index';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
const activeTabs = ref(1);
|
const activeTabs = ref(1);
|
||||||
@@ -71,33 +78,28 @@ function handleClick(tab: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const todonum = computed(() => {
|
const todonum = computed(() => {
|
||||||
return arr.value.filter((item) => item.disabled === false).length;
|
return awaittoList.value.filter((item) => isdisable(item)).length;
|
||||||
});
|
});
|
||||||
const noticnum = computed(() => {
|
const noticnum = computed(() => {
|
||||||
return noticelist.value.filter((item) => item.disabled === false).length;
|
return noticelist.value.filter((item) => isdisable(item)).length;
|
||||||
});
|
});
|
||||||
const arr = ref(
|
|
||||||
Array.from({ length: 10 }, (_, i) => {
|
|
||||||
return {
|
|
||||||
id: i,
|
|
||||||
title: '报修工单提醒',
|
|
||||||
content: '您有一条新的报修工单需要处理,保修标题:下水道堵塞',
|
|
||||||
disabled: false
|
|
||||||
};
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
const noticelist = ref(
|
function isdisable(item) {
|
||||||
Array.from({ length: 10 }, (_, i) => {
|
return item.repairIsCheck ? item.repairIsCheck === '1' : item.manageIsCheck === '1';
|
||||||
return {
|
}
|
||||||
id: i,
|
const noticelist = ref([]);
|
||||||
title: '报修工单提醒',
|
const awaittoList = ref([]);
|
||||||
content: '您有一条新的报修工单需要处理,保修标题:下水道堵塞',
|
function init() {
|
||||||
disabled: false
|
getNotificationList({
|
||||||
};
|
pageNum: 1,
|
||||||
})
|
pageSize: 10
|
||||||
);
|
}).then((res) => {
|
||||||
|
awaittoList.value = res.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
init();
|
||||||
|
|
||||||
|
function handleRead(row) {}
|
||||||
function handleDisable(row) {
|
function handleDisable(row) {
|
||||||
row.disabled = true;
|
row.disabled = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -243,9 +243,7 @@ const submitForm = () => {
|
|||||||
};
|
};
|
||||||
// 推出
|
// 推出
|
||||||
const cancelForm = () => {
|
const cancelForm = () => {
|
||||||
router.push({
|
router.back();
|
||||||
path: '/carArea/parkingCost'
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -261,9 +261,7 @@ const sendForm = (str: string) => {
|
|||||||
};
|
};
|
||||||
// 推出
|
// 推出
|
||||||
const cancelForm = () => {
|
const cancelForm = () => {
|
||||||
router.push({
|
router.back();
|
||||||
path: '/repair/repairlist'
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -143,9 +143,7 @@ const submitForm = () => {
|
|||||||
};
|
};
|
||||||
// 推出
|
// 推出
|
||||||
const cancelForm = () => {
|
const cancelForm = () => {
|
||||||
router.push({
|
router.back();
|
||||||
path: '/system/repairProjectList'
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -21,65 +21,52 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 水费,电费, 收费范围为 房屋 -->
|
<!-- 水费,电费, 收费范围为 房屋 -->
|
||||||
<el-form-item label="收费范围" prop="chargeScope" v-if="typeNamelist.includes(typeName)">
|
<el-form-item label="收费范围" prop="chargeScope" v-if="typeNamelist.includes(typeName)">
|
||||||
<el-radio-group v-model="form.chargeScope">
|
<div class="flex flex-row flex-items-end">
|
||||||
<el-radio v-for="(item, index) in com_bill_charge_scope_house" :key="index" :value="item.value" :label="item.label"></el-radio>
|
<el-radio-group v-model="form.chargeScope">
|
||||||
</el-radio-group>
|
<div class="flex flex-col flex-items-end">
|
||||||
<div @click="handleClearCheckout" v-if="form.chargeScope === '1'" class="ml-10px cursor-pointer color-red">清空</div>
|
<el-radio
|
||||||
|
style="margin-right: 0"
|
||||||
|
v-for="(item, index) in com_bill_charge_scope_house"
|
||||||
|
:key="index"
|
||||||
|
:value="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
></el-radio>
|
||||||
|
</div>
|
||||||
|
</el-radio-group>
|
||||||
|
<div style="height: 32px">
|
||||||
|
<el-button @click="OpenUseTablesfun('house')" link type="primary" v-if="form.chargeScope === '1'" class="ml-10px">请选择</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 其他费用, 收费范围为 业主 -->
|
<!-- 其他费用, 收费范围为 业主 -->
|
||||||
<el-form-item label="收费范围" prop="chargeScope" v-else>
|
<el-form-item label="收费范围" prop="chargeScope" v-else>
|
||||||
<el-radio-group v-model="form.chargeScope">
|
<div class="flex flex-row flex-items-end">
|
||||||
<el-radio v-for="(item, index) in com_questionnaire_scope" :key="index" :value="item.value" :label="item.label"></el-radio>
|
<el-radio-group v-model="form.chargeScope">
|
||||||
</el-radio-group>
|
<div class="flex flex-col flex-items-end">
|
||||||
<div @click="handleClearCheckout" v-if="form.chargeScope === '1'" class="ml-10px cursor-pointer color-red">清空</div>
|
<el-radio
|
||||||
|
style="margin-right: 0"
|
||||||
|
v-for="(item, index) in com_questionnaire_scope"
|
||||||
|
:key="index"
|
||||||
|
:value="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
></el-radio>
|
||||||
|
</div>
|
||||||
|
</el-radio-group>
|
||||||
|
<div style="height: 32px">
|
||||||
|
<el-button @click="OpenUseTablesfun('user')" link type="primary" v-if="form.chargeScope === '1'" class="ml-10px">请选择</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 房屋选择 -->
|
<!-- 房屋选择 -->
|
||||||
<el-form-item v-if="form.chargeScope === '1' && typeNamelist.includes(typeName)">
|
<el-form-item v-if="form.chargeScope === '1' && typeNamelist.includes(typeName)">
|
||||||
<div class="residentBox">
|
<div class="residentBox">
|
||||||
<ul class="checkoutSideUsesbox">
|
<House returnvalue="houseId" ref="HolderRef" :isMultiple="true" @change="handleSelect"> </House>
|
||||||
<li v-for="(item, index) in checkoutHouses" :key="index">
|
|
||||||
<span>{{ item.buildingName }}/</span>
|
|
||||||
<span>{{ item.unitNo }}单元/</span>
|
|
||||||
<span>{{ item.floorNo }}楼/</span>
|
|
||||||
<span>{{ item.houseNo }}室</span>
|
|
||||||
<el-icon @click="deleteHouse(item.houseId)">
|
|
||||||
<Delete></Delete>
|
|
||||||
</el-icon>
|
|
||||||
</li>
|
|
||||||
<House returnvalue="*" ref="HolderRef" :isMultiple="true" :userid="form.houseIds.join(',')" @change="handleSelect">
|
|
||||||
<template #default>
|
|
||||||
<li @click="OpenUseTablesfun('house')" class="add justify-center">
|
|
||||||
<el-icon>
|
|
||||||
<DocumentAdd></DocumentAdd>
|
|
||||||
</el-icon>
|
|
||||||
<span>添加房屋</span>
|
|
||||||
</li>
|
|
||||||
</template>
|
|
||||||
</House>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 业主选择 -->
|
<!-- 业主选择 -->
|
||||||
<el-form-item v-if="form.chargeScope === '1' && !typeNamelist.includes(typeName)">
|
<el-form-item v-if="form.chargeScope === '1' && !typeNamelist.includes(typeName)">
|
||||||
<div class="residentBox">
|
<div class="residentBox">
|
||||||
<ul class="checkoutSideUsesbox">
|
<UserHolder returnvalue="residentId" ref="userRef" :isMultiple="true" @change="handleCheckUser"></UserHolder>
|
||||||
<li v-for="(item, index) in checkoutUser" :key="index">
|
|
||||||
<span>{{ item.house_name }} / {{ item.residentName }} / {{ item.phone }}</span>
|
|
||||||
<el-icon @click="delteUser(item.residentId)">
|
|
||||||
<Delete></Delete>
|
|
||||||
</el-icon>
|
|
||||||
</li>
|
|
||||||
<UserHolder returnvalue="*" ref="userRef" :isMultiple="true" :userid="form.residentIds" @change="handleCheckUser">
|
|
||||||
<template #default>
|
|
||||||
<li @click="OpenUseTablesfun('user')" class="add justify-center">
|
|
||||||
<el-icon>
|
|
||||||
<DocumentAdd></DocumentAdd>
|
|
||||||
</el-icon>
|
|
||||||
<span>添加业主</span>
|
|
||||||
</li>
|
|
||||||
</template>
|
|
||||||
</UserHolder>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="费用周期" prop="chargePeriod">
|
<el-form-item label="费用周期" prop="chargePeriod">
|
||||||
@@ -174,19 +161,19 @@ function handleDate(val: string[]) {
|
|||||||
// 收费类型
|
// 收费类型
|
||||||
const chargeitemlist = ref([]);
|
const chargeitemlist = ref([]);
|
||||||
|
|
||||||
// 房屋列表
|
// // 房屋列表
|
||||||
const houselist = ref([]);
|
// const houselist = ref([]);
|
||||||
// 住户列表
|
// // 住户列表
|
||||||
const userlist = ref([]);
|
// const userlist = ref([]);
|
||||||
async function init() {
|
async function init() {
|
||||||
listChargeItem().then((res) => {
|
listChargeItem().then((res) => {
|
||||||
chargeitemlist.value = res.rows;
|
chargeitemlist.value = res.rows;
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await listBillHouse({ pageNum: 1, pageSize: 999999 });
|
// const res = await listBillHouse({ pageNum: 1, pageSize: 999999 });
|
||||||
houselist.value = res.rows;
|
// houselist.value = res.rows;
|
||||||
const res2 = await queryResidentList_holder({ pageNum: 1, pageSize: 999999 });
|
// const res2 = await queryResidentList_holder({ pageNum: 1, pageSize: 999999 });
|
||||||
userlist.value = res2.rows;
|
// userlist.value = res2.rows;
|
||||||
|
|
||||||
if (route.query.id) {
|
if (route.query.id) {
|
||||||
userid.value = route.query.id;
|
userid.value = route.query.id;
|
||||||
@@ -196,31 +183,20 @@ async function init() {
|
|||||||
...form.value,
|
...form.value,
|
||||||
...res.data
|
...res.data
|
||||||
};
|
};
|
||||||
|
// TODO 没有住户参数
|
||||||
form.value.houseIds = res.data.houseIds || [];
|
form.value.houseIds = res.data.houseIds || [];
|
||||||
|
form.value.residentIds = res.data.residentIds || [];
|
||||||
form.value.startDate = formatDate2(form.value.startDate);
|
form.value.startDate = formatDate2(form.value.startDate);
|
||||||
form.value.endDate = formatDate2(form.value.endDate);
|
form.value.endDate = formatDate2(form.value.endDate);
|
||||||
StartEndDate.value = [form.value.startDate, form.value.endDate];
|
StartEndDate.value = [form.value.startDate, form.value.endDate];
|
||||||
// TODO houseid 有默认值, 需要处理
|
// TODO houseid 有默认值, 需要处理
|
||||||
// TODO residentids 添加,
|
// TODO residentids 添加,
|
||||||
checkoutHouses.value = form.value.houseIds
|
checkoutHouses.value = form.value.houseIds.filter((item) => item);
|
||||||
.map((item) => {
|
handleChange(form.value.chargeItemId);
|
||||||
if (item) {
|
|
||||||
const find = houselist.value.find((it) => it.houseId === item);
|
|
||||||
if (find) {
|
|
||||||
return find;
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.filter((item) => item !== null);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
init();
|
||||||
onMounted(() => {
|
|
||||||
init();
|
|
||||||
});
|
|
||||||
|
|
||||||
const typeNamelist = ref(['2049026484272791553', '2049026503017136129']);
|
const typeNamelist = ref(['2049026484272791553', '2049026503017136129']);
|
||||||
const typeName = ref('');
|
const typeName = ref('');
|
||||||
@@ -239,33 +215,26 @@ function handleChange(val: string) {
|
|||||||
const HolderRef = ref<InstanceType<typeof House>>();
|
const HolderRef = ref<InstanceType<typeof House>>();
|
||||||
const userRef = ref<InstanceType<typeof UserHolder>>();
|
const userRef = ref<InstanceType<typeof UserHolder>>();
|
||||||
function OpenUseTablesfun(val: string) {
|
function OpenUseTablesfun(val: string) {
|
||||||
|
console.log(val);
|
||||||
if (val === 'house') {
|
if (val === 'house') {
|
||||||
HolderRef.value.open();
|
HolderRef.value.open(checkoutHouses.value);
|
||||||
} else if (val === 'user') {
|
} else if (val === 'user') {
|
||||||
userRef.value.open();
|
userRef.value.open(checkoutUser.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 多选
|
// 多选
|
||||||
const checkoutHouses = ref<BillHouse[]>([]);
|
const checkoutHouses = ref<string[]>([]);
|
||||||
function handleSelect(val: BillHouse[]) {
|
function handleSelect(val: string[]) {
|
||||||
checkoutHouses.value = val;
|
checkoutHouses.value = val;
|
||||||
form.value.houseIds = checkoutHouses.value.map((item) => item.houseId);
|
form.value.houseIds = checkoutHouses.value.map((item) => item).filter((item) => item);
|
||||||
}
|
}
|
||||||
// 多选
|
// 多选
|
||||||
const checkoutUser = ref([]);
|
const checkoutUser = ref([]);
|
||||||
/** 添加 业主 */
|
/** 添加 业主 */
|
||||||
function handleCheckUser(val) {
|
function handleCheckUser(val: string[]) {
|
||||||
checkoutUser.value = val;
|
checkoutUser.value = val;
|
||||||
form.value.residentIds = checkoutUser.value.map((item) => item.residentId);
|
console.log(val);
|
||||||
}
|
form.value.residentIds = val;
|
||||||
|
|
||||||
/** 删除房屋 */
|
|
||||||
function deleteHouse(id: string) {
|
|
||||||
checkoutHouses.value = checkoutHouses.value.filter((item) => item.houseId !== id);
|
|
||||||
}
|
|
||||||
/** 删除业主 */
|
|
||||||
function delteUser(id: string) {
|
|
||||||
checkoutUser.value = checkoutUser.value.filter((item) => item.residentId !== id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 清空 */
|
/** 清空 */
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ const dialog = reactive<DialogOption>({
|
|||||||
title: ''
|
title: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
const ShowHouselist = ['2049026484272791553'];
|
const ShowHouselist = ['2049026484272791553', '2049026503017136129'];
|
||||||
|
|
||||||
const initFormData: BillForm = {
|
const initFormData: BillForm = {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
|
|||||||
@@ -61,7 +61,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
// TODO 添加临时收费
|
|
||||||
// TODO 预存
|
// TODO 预存
|
||||||
import { Search } from '@element-plus/icons-vue';
|
import { Search } from '@element-plus/icons-vue';
|
||||||
import { Component, ref } from 'vue';
|
import { Component, ref } from 'vue';
|
||||||
|
|||||||
@@ -131,13 +131,13 @@
|
|||||||
<el-button link type="primary" @click="handleOpenDialog('usedWater', scope.row)" v-hasPermi="['equipment:useWater:electricitydevice']"
|
<el-button link type="primary" @click="handleOpenDialog('usedWater', scope.row)" v-hasPermi="['equipment:useWater:electricitydevice']"
|
||||||
>用电量</el-button
|
>用电量</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<!-- <el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleOpenDialog('Upload', scope.row)"
|
@click="handleOpenDialog('Upload', scope.row)"
|
||||||
v-hasPermi="['equipment:updatehardware:electricitydevice']"
|
v-hasPermi="['equipment:updatehardware:electricitydevice']"
|
||||||
>更新固件</el-button
|
>更新固件</el-button
|
||||||
>
|
> -->
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|||||||
@@ -6,9 +6,10 @@
|
|||||||
<el-row :gutter="10" style="font-size: 0.8rem; font-weight: 450">
|
<el-row :gutter="10" style="font-size: 0.8rem; font-weight: 450">
|
||||||
<el-col :span="4"> 设备号: {{ routeid }} </el-col>
|
<el-col :span="4"> 设备号: {{ routeid }} </el-col>
|
||||||
<el-col :span="4"> 房屋号: {{ housename }} </el-col>
|
<el-col :span="4"> 房屋号: {{ housename }} </el-col>
|
||||||
<el-col :span="14"></el-col>
|
<el-col :span="12"></el-col>
|
||||||
<el-col :span="2">
|
<el-col :span="4" class="flex">
|
||||||
<el-button @click="confinem">返回</el-button>
|
<el-button @click="confinem">返回</el-button>
|
||||||
|
<el-button type="warning" @click="handleExport">导出数据</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
@@ -35,6 +36,7 @@ import { TopupRecordVO, TopupRecordQuery, TopupRecordForm } from '@/api/system/S
|
|||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
const routeid = ref(null);
|
const routeid = ref(null);
|
||||||
const topupRecordList = ref<TopupRecordVO[]>([]);
|
const topupRecordList = ref<TopupRecordVO[]>([]);
|
||||||
@@ -46,6 +48,7 @@ const initFormData: TopupRecordForm = {
|
|||||||
deviceCode: undefined,
|
deviceCode: undefined,
|
||||||
type: undefined
|
type: undefined
|
||||||
};
|
};
|
||||||
|
|
||||||
const data = reactive<PageData<TopupRecordForm, TopupRecordQuery>>({
|
const data = reactive<PageData<TopupRecordForm, TopupRecordQuery>>({
|
||||||
form: { ...initFormData },
|
form: { ...initFormData },
|
||||||
queryParams: {
|
queryParams: {
|
||||||
@@ -82,6 +85,17 @@ onMounted(() => {
|
|||||||
const confinem = () => {
|
const confinem = () => {
|
||||||
router.back();
|
router.back();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
const handleExport = () => {
|
||||||
|
proxy?.download(
|
||||||
|
'/topupRecord/export',
|
||||||
|
{
|
||||||
|
...queryParams.value
|
||||||
|
},
|
||||||
|
`${queryParams.value.type === '2' ? '水表' : '电表'}—${routeid.value}-充值记录.xlsx`
|
||||||
|
);
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -44,8 +44,8 @@
|
|||||||
<el-dropdown-item @click="handleMarkQrcodeZip">
|
<el-dropdown-item @click="handleMarkQrcodeZip">
|
||||||
<span>批量下载条形码</span>
|
<span>批量下载条形码</span>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<!-- <el-dropdown-item v-hasPermi="['equipment:addqrcode:electricitydevice']">
|
<!-- <el-dropdown-item v-hasPermi="['equipment:updatehardware:waterdevice']">
|
||||||
<div @click="handleMarkqrcode">批量更新固件</div>
|
<div @click="handleMarkUpload">批量更新固件</div>
|
||||||
</el-dropdown-item> -->
|
</el-dropdown-item> -->
|
||||||
</template>
|
</template>
|
||||||
</right-toolbar>
|
</right-toolbar>
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
<el-button link type="primary" @click="handleOpenDialog('Upload', scope.row)" v-hasPermi="['equipment:updatehardware:waterdevice']"
|
<el-button link type="primary" @click="handleOpenDialog('Upload', scope.row)" v-hasPermi="['equipment:updatehardware:waterdevice']"
|
||||||
>更新固件</el-button
|
>更新固件</el-button
|
||||||
>
|
>
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row.deviceCode)">最新抄表记录</el-button>
|
<!-- <el-button link type="primary" @click="handleUpdate(scope.row.deviceCode)">最新抄表记录</el-button> -->
|
||||||
|
|
||||||
<el-button link type="primary" @click="handleOpenDialog('UpdateHouse', scope.row)" v-hasPermi="['equipment:edithouse:waterdevice']"
|
<el-button link type="primary" @click="handleOpenDialog('UpdateHouse', scope.row)" v-hasPermi="['equipment:edithouse:waterdevice']"
|
||||||
>绑定房屋</el-button
|
>绑定房屋</el-button
|
||||||
@@ -197,15 +197,23 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<!-- upload file -->
|
<!-- upload file -->
|
||||||
<el-form v-else-if="dialogType === 'Upload'" ref="UploadFileformRef" :model="UploadFileform" :rules="UploadFileformRules" label-width="140px">
|
<el-form v-else-if="dialogType === 'Upload'" ref="UploadFileformRef" :model="UploadFileform" :rules="UploadFileformRules" label-width="140px">
|
||||||
<el-form-item label="上传 A槽更新 文件" prop="fileA">
|
<el-form-item label="LEN_A" prop="lenA">
|
||||||
|
<el-input v-model="UploadFileform.lenA"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="CRC32_HEX_A" prop="crcA">
|
||||||
|
<el-input v-model="UploadFileform.crcA"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="上传 A槽更新 文件" prop="urlA">
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="uploadRef"
|
ref="uploadARef"
|
||||||
accept=".bin"
|
accept=".bin"
|
||||||
:action="uploadAUrl"
|
:action="uploadAUrl"
|
||||||
name="file"
|
name="file"
|
||||||
:headers="headerToken()"
|
:headers="headerToken()"
|
||||||
|
:limit="1"
|
||||||
:show-file-list="true"
|
:show-file-list="true"
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
|
:on-exceed="handleExceedA"
|
||||||
:on-success="handleAvatarSuccessA"
|
:on-success="handleAvatarSuccessA"
|
||||||
:before-upload="beforeAvatarUpload"
|
:before-upload="beforeAvatarUpload"
|
||||||
>
|
>
|
||||||
@@ -220,15 +228,24 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="上传 B槽更新 文件" prop="fileB">
|
|
||||||
|
<el-form-item label="LEN_B" prop="lenB">
|
||||||
|
<el-input v-model="UploadFileform.lenB"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="CRC32_HEX_B" prop="crcB">
|
||||||
|
<el-input v-model="UploadFileform.crcB"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="上传 B槽更新 文件" prop="urlB">
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="uploadRef"
|
ref="uploadBRef"
|
||||||
accept=".bin"
|
accept=".bin"
|
||||||
:action="uploadBUrl"
|
:action="uploadBUrl"
|
||||||
name="file"
|
name="file"
|
||||||
|
:limit="1"
|
||||||
:headers="headerToken()"
|
:headers="headerToken()"
|
||||||
:show-file-list="true"
|
:show-file-list="true"
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
|
:on-exceed="handleExceedB"
|
||||||
:on-success="handleAvatarSuccessB"
|
:on-success="handleAvatarSuccessB"
|
||||||
:before-upload="beforeAvatarUpload"
|
:before-upload="beforeAvatarUpload"
|
||||||
>
|
>
|
||||||
@@ -301,6 +318,7 @@ import { Upload } from '@element-plus/icons-vue';
|
|||||||
import { CascaderValue, UploadProps, UploadRawFile } from 'element-plus';
|
import { CascaderValue, UploadProps, UploadRawFile } from 'element-plus';
|
||||||
import { checkPermi } from '@/utils/permission';
|
import { checkPermi } from '@/utils/permission';
|
||||||
import { exportImagesToZip } from '@/utils/exportZip';
|
import { exportImagesToZip } from '@/utils/exportZip';
|
||||||
|
import { genFileId } from 'element-plus';
|
||||||
|
|
||||||
const uploadAUrl = import.meta.env.VITE_APP_BASE_API + '/waterDevice/uploadA';
|
const uploadAUrl = import.meta.env.VITE_APP_BASE_API + '/waterDevice/uploadA';
|
||||||
const uploadBUrl = import.meta.env.VITE_APP_BASE_API + '/waterDevice/uploadB';
|
const uploadBUrl = import.meta.env.VITE_APP_BASE_API + '/waterDevice/uploadB';
|
||||||
@@ -390,14 +408,20 @@ const rules = {
|
|||||||
|
|
||||||
// ? 上传固件 ==============================================================================================
|
// ? 上传固件 ==============================================================================================
|
||||||
const UploadFileformRef = ref(null);
|
const UploadFileformRef = ref(null);
|
||||||
const uploadRef = ref();
|
const uploadBRef = ref();
|
||||||
|
const uploadARef = ref();
|
||||||
const UploadFileform = ref({
|
const UploadFileform = ref({
|
||||||
deviceCodes: [],
|
deviceCodes: [],
|
||||||
urlA: '',
|
urlA: '',
|
||||||
urlB: ''
|
lenA: '',
|
||||||
|
crcA: '',
|
||||||
|
urlB: '',
|
||||||
|
crcB: '',
|
||||||
|
lenB: ''
|
||||||
});
|
});
|
||||||
const UploadFileformRules = {
|
const UploadFileformRules = {
|
||||||
file: [{ required: true, message: '更新文件不能为空', trigger: 'blur' }]
|
urlA: [{ required: true, message: 'A更新文件不能为空', trigger: 'blur' }],
|
||||||
|
urlB: [{ required: true, message: 'B更新文件不能为空', trigger: 'blur' }]
|
||||||
};
|
};
|
||||||
function headerToken() {
|
function headerToken() {
|
||||||
const useStore = useUserStore();
|
const useStore = useUserStore();
|
||||||
@@ -431,16 +455,27 @@ const handleAvatarSuccessA: UploadProps['onSuccess'] = (response: any) => {
|
|||||||
const handleAvatarSuccessB: UploadProps['onSuccess'] = (response: any) => {
|
const handleAvatarSuccessB: UploadProps['onSuccess'] = (response: any) => {
|
||||||
UploadFileform.value.urlB = response.data.url;
|
UploadFileform.value.urlB = response.data.url;
|
||||||
};
|
};
|
||||||
|
const handleExceedB: UploadProps['onExceed'] = (files) => {
|
||||||
|
uploadBRef.value!.clearFiles();
|
||||||
|
const file = files[0] as UploadRawFile;
|
||||||
|
file.uid = genFileId();
|
||||||
|
uploadBRef.value!.handleStart(file);
|
||||||
|
uploadBRef.value!.submit();
|
||||||
|
};
|
||||||
|
const handleExceedA: UploadProps['onExceed'] = (files) => {
|
||||||
|
uploadARef.value!.clearFiles();
|
||||||
|
const file = files[0] as UploadRawFile;
|
||||||
|
file.uid = genFileId();
|
||||||
|
uploadARef.value!.handleStart(file);
|
||||||
|
uploadARef.value!.submit();
|
||||||
|
};
|
||||||
|
|
||||||
// ? 上传固件 ==============================================================================================
|
// ? 上传固件 ==============================================================================================
|
||||||
|
|
||||||
// * 编辑房屋 ==============================================================================================
|
// * 编辑房屋 ==============================================================================================
|
||||||
// 编辑房屋
|
// 编辑房屋
|
||||||
const EditHouseformRef = ref(null);
|
const EditHouseformRef = ref(null);
|
||||||
const EditHouseformRules = {
|
const EditHouseformRules = {};
|
||||||
fileA: [{ required: true, message: 'A文件不能为空', trigger: 'blur' }],
|
|
||||||
fileB: [{ required: true, message: 'B文件不能为空', trigger: 'blur' }]
|
|
||||||
};
|
|
||||||
const EditHouseform = ref({
|
const EditHouseform = ref({
|
||||||
id: '',
|
id: '',
|
||||||
deviceCode: '',
|
deviceCode: '',
|
||||||
@@ -483,6 +518,17 @@ function handleMarkQrcodeZip() {
|
|||||||
ElMessage.warning('请选择设备');
|
ElMessage.warning('请选择设备');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function handleMarkUpload() {
|
||||||
|
if (ids.value.length > 0) {
|
||||||
|
reset();
|
||||||
|
UploadFileform.value.deviceCodes = ids.value.map((item) => item.deviceCode).filter((item) => item);
|
||||||
|
dialog.title = '固件上传';
|
||||||
|
dialog.visible = true;
|
||||||
|
dialogType.value = 'Upload';
|
||||||
|
} else {
|
||||||
|
ElMessage.warning('请选择设备');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function produceQRzip(vals: WaterDeviceVO[]) {
|
function produceQRzip(vals: WaterDeviceVO[]) {
|
||||||
const arr = vals.map((item) => {
|
const arr = vals.map((item) => {
|
||||||
@@ -623,7 +669,14 @@ const submitForm = () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (dialogType.value === 'Upload') {
|
} else if (dialogType.value === 'Upload') {
|
||||||
WaterDeviceUpdateBin(UploadFileform.value);
|
UploadFileformRef.value?.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
buttonLoading.value = true;
|
||||||
|
await WaterDeviceUpdateBin(UploadFileform.value).finally(() => (buttonLoading.value = false));
|
||||||
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
unSubmit();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const unSubmit = () => {
|
const unSubmit = () => {
|
||||||
@@ -653,6 +706,10 @@ const reset = () => {
|
|||||||
UploadFileform.value.deviceCodes = [];
|
UploadFileform.value.deviceCodes = [];
|
||||||
UploadFileform.value.urlA = '';
|
UploadFileform.value.urlA = '';
|
||||||
UploadFileform.value.urlB = '';
|
UploadFileform.value.urlB = '';
|
||||||
|
UploadFileform.value.lenA = '';
|
||||||
|
UploadFileform.value.crcA = '';
|
||||||
|
UploadFileform.value.lenB = '';
|
||||||
|
UploadFileform.value.crcB = '';
|
||||||
|
|
||||||
// 上传 清空
|
// 上传 清空
|
||||||
UploadFileformRef.value?.resetFields();
|
UploadFileformRef.value?.resetFields();
|
||||||
|
|||||||
@@ -104,9 +104,7 @@ const submitForm = () => {
|
|||||||
};
|
};
|
||||||
// 推出
|
// 推出
|
||||||
const cancelForm = () => {
|
const cancelForm = () => {
|
||||||
router.push({
|
router.back();
|
||||||
path: '/carArea/carAreaList'
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -248,9 +248,7 @@ const submitForm = () => {
|
|||||||
|
|
||||||
// 推出
|
// 推出
|
||||||
const cancelForm = () => {
|
const cancelForm = () => {
|
||||||
router.push({
|
router.back();
|
||||||
path: '/carArea/cars'
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 选择住户
|
// 选择住户
|
||||||
|
|||||||
@@ -12,11 +12,11 @@
|
|||||||
<el-form-item label="楼栋名称" prop="buildingName">
|
<el-form-item label="楼栋名称" prop="buildingName">
|
||||||
<el-input v-model.trim="form.buildingName" placeholder="请输入楼栋名称" />
|
<el-input v-model.trim="form.buildingName" placeholder="请输入楼栋名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="楼栋类型" prop="buildingUse">
|
<!-- <el-form-item label="楼栋类型" prop="buildingUse">
|
||||||
<el-select v-model="form.buildingUse" placeholder="选择楼栋类型">
|
<el-select v-model="form.buildingUse" placeholder="选择楼栋类型">
|
||||||
<el-option v-for="(item, index) in com_build_use" :key="index" :label="item.label" :value="item.value"></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-select>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item label="楼栋朝向" prop="buildToward">
|
<el-form-item label="楼栋朝向" prop="buildToward">
|
||||||
<el-input v-model.trim="form.buildToward" placeholder="请输入楼栋朝向" />
|
<el-input v-model.trim="form.buildToward" placeholder="请输入楼栋朝向" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -26,9 +26,9 @@
|
|||||||
<el-form-item label="楼栋结构" prop="buildStructure">
|
<el-form-item label="楼栋结构" prop="buildStructure">
|
||||||
<el-input v-model.trim="form.buildStructure" placeholder="请输入楼栋结构" />
|
<el-input v-model.trim="form.buildStructure" placeholder="请输入楼栋结构" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="单元数" prop="unitCount">
|
<!-- <el-form-item label="单元数" prop="unitCount">
|
||||||
<el-input-number :min="1" v-model.trim="form.unitCount" placeholder="单元数" />
|
<el-input-number :min="1" v-model.trim="form.unitCount" placeholder="单元数" />
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item label="楼层" prop="floorCount">
|
<el-form-item label="楼层" prop="floorCount">
|
||||||
<el-input-number :min="1" v-model.trim="form.floorCount" placeholder="楼层数" />
|
<el-input-number :min="1" v-model.trim="form.floorCount" placeholder="楼层数" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -61,14 +61,14 @@ const form = ref({
|
|||||||
buildingName: '',
|
buildingName: '',
|
||||||
buildToward: '',
|
buildToward: '',
|
||||||
buildTall: '',
|
buildTall: '',
|
||||||
buildingUse: '0',
|
// buildingUse: '0',
|
||||||
buildStructure: '',
|
buildStructure: '',
|
||||||
unitCount: null,
|
// unitCount: null,
|
||||||
floorCount: null
|
floorCount: 1
|
||||||
});
|
});
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
buildingName: [{ required: true, message: '请输入楼栋名称', trigger: 'blur' }],
|
buildingName: [{ required: true, message: '请输入楼栋名称', trigger: 'blur' }],
|
||||||
buildingUse: [{ required: true, message: '请选择楼栋类型', trigger: 'blur' }],
|
// buildingUse: [{ required: true, message: '请选择楼栋类型', trigger: 'blur' }],
|
||||||
unitCount: [{ required: true, message: '请输入单元数', trigger: 'blur' }],
|
unitCount: [{ required: true, message: '请输入单元数', trigger: 'blur' }],
|
||||||
floorCount: [{ required: true, message: '请输入楼层数', trigger: 'blur' }]
|
floorCount: [{ required: true, message: '请输入楼层数', trigger: 'blur' }]
|
||||||
});
|
});
|
||||||
@@ -85,10 +85,10 @@ function getBuildingById() {
|
|||||||
if (item.id == buildingId) {
|
if (item.id == buildingId) {
|
||||||
form.value.buildingName = item.buildingName;
|
form.value.buildingName = item.buildingName;
|
||||||
form.value.buildToward = item.buildToward;
|
form.value.buildToward = item.buildToward;
|
||||||
form.value.buildingUse = item.buildingUse;
|
// form.value.buildingUse = item.buildingUse;
|
||||||
form.value.buildTall = item.buildTall;
|
form.value.buildTall = item.buildTall;
|
||||||
form.value.buildStructure = item.buildStructure;
|
form.value.buildStructure = item.buildStructure;
|
||||||
form.value.unitCount = item.unitCount;
|
// form.value.unitCount = item.unitCount;
|
||||||
form.value.floorCount = item.floorCount;
|
form.value.floorCount = item.floorCount;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,9 +10,14 @@
|
|||||||
<el-option v-for="item in houseStore.currentBuildingInfoList" :key="item.id" :label="item.buildingName" :value="item.id" />
|
<el-option v-for="item in houseStore.currentBuildingInfoList" :key="item.id" :label="item.buildingName" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="单元" prop="unit">
|
<el-form-item label="房屋用途" prop="houseUseTypeId">
|
||||||
<el-select @change="changeUnitNo" v-model.number="form.unitNo" placeholder="请选择">
|
<el-select v-model="form.houseUseTypeId" placeholder="请选择">
|
||||||
<el-option v-for="item in units" :key="item.no" :label="item.name" :value="item.no" />
|
<el-option v-for="item in houseUseTypeList" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="单元" prop="unitNoId">
|
||||||
|
<el-select @change="changeUnitNo" v-model="form.unitNoId" placeholder="请选择">
|
||||||
|
<el-option v-for="item in units" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="楼层" prop="floor">
|
<el-form-item label="楼层" prop="floor">
|
||||||
@@ -20,6 +25,7 @@
|
|||||||
<el-option v-for="item in floors" :key="item.no" :label="item.name" :value="item.no" />
|
<el-option v-for="item in floors" :key="item.no" :label="item.name" :value="item.no" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="房间号" prop="houseNo">
|
<el-form-item label="房间号" prop="houseNo">
|
||||||
<el-input v-model="form.houseNo" placeholder="请输入房间号" />
|
<el-input v-model="form.houseNo" placeholder="请输入房间号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -51,7 +57,7 @@
|
|||||||
<span>卫</span>
|
<span>卫</span>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="车位号" prop="parkingId">
|
<!-- <el-form-item label="车位号" prop="parkingId">
|
||||||
<el-select v-model="form.parkingId" class="m-2" placeholder="请选择车位号">
|
<el-select v-model="form.parkingId" class="m-2" placeholder="请选择车位号">
|
||||||
<el-option v-for="item in parkinglist" :key="item.id" :label="item.parkingName" :value="item.id" />
|
<el-option v-for="item in parkinglist" :key="item.id" :label="item.parkingName" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -60,7 +66,7 @@
|
|||||||
<el-select v-model="form.storeroomId" class="m-2" placeholder="请选择储藏室">
|
<el-select v-model="form.storeroomId" class="m-2" placeholder="请选择储藏室">
|
||||||
<el-option v-for="item in storeRoomlist" :key="item.id" :label="item.storeroomName" :value="item.id" />
|
<el-option v-for="item in storeRoomlist" :key="item.id" :label="item.storeroomName" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item style="margin-top: 30px">
|
<el-form-item style="margin-top: 30px">
|
||||||
<el-button type="primary" @click="submitForm">确定</el-button>
|
<el-button type="primary" @click="submitForm">确定</el-button>
|
||||||
<el-button @click="cancelForm">取消</el-button>
|
<el-button @click="cancelForm">取消</el-button>
|
||||||
@@ -79,6 +85,11 @@ import { addHouseAPI, EditHouseApi, getBuildingOnly, getHouseApi, getHouselistAP
|
|||||||
import { addHouseType } from '@/api/system/house/type';
|
import { addHouseType } from '@/api/system/house/type';
|
||||||
import { GetVillageListParking, listParking } from '@/api/system/parking';
|
import { GetVillageListParking, listParking } from '@/api/system/parking';
|
||||||
import { GetVillagelistStoreroom, listStoreroom } from '@/api/system/storeroom';
|
import { GetVillagelistStoreroom, listStoreroom } from '@/api/system/storeroom';
|
||||||
|
import { listHouseUseType } from '@/api/system/houseUse';
|
||||||
|
import { getByBUildingidtoUnitNo } from '@/api/system/houseUnit';
|
||||||
|
|
||||||
|
// const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
// const { com_build_use } = toRefs<any>(proxy?.useDict('com_build_use'));
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
@@ -86,7 +97,8 @@ const houseStore = useHouseStore();
|
|||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const form = ref<addHouseType>({
|
const form = ref<addHouseType>({
|
||||||
buildingId: '',
|
buildingId: '',
|
||||||
unitNo: '',
|
houseUseTypeId: '', // 房屋用途
|
||||||
|
unitNoId: '',
|
||||||
floorNo: '',
|
floorNo: '',
|
||||||
houseNo: '', // 房间号
|
houseNo: '', // 房间号
|
||||||
houseArea: '', //建筑面积
|
houseArea: '', //建筑面积
|
||||||
@@ -98,9 +110,9 @@ const form = ref<addHouseType>({
|
|||||||
});
|
});
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
buildingId: [{ required: true, message: '请输入楼栋', trigger: 'blur' }],
|
buildingId: [{ required: true, message: '请输入楼栋', trigger: 'blur' }],
|
||||||
unitNo: [{ required: true, message: '请选择单元', trigger: 'blur' }],
|
unitNoId: [{ required: true, message: '请选择单元', trigger: 'blur' }],
|
||||||
floorNo: [{ required: true, message: '请选择楼层', trigger: 'blur' }],
|
floorNo: [{ required: true, message: '请选择楼层', trigger: 'blur' }],
|
||||||
houseUse: [{ required: true, message: '请选择房屋类型', trigger: 'blur' }],
|
houseUseTypeId: [{ required: true, message: '请选择房屋用途', trigger: 'blur' }],
|
||||||
buildingName: [{ required: true, message: '请输入房间号', trigger: 'blur' }],
|
buildingName: [{ required: true, message: '请输入房间号', trigger: 'blur' }],
|
||||||
buildingArea: [{ required: true, message: '请输入建筑面积', trigger: 'blur' }],
|
buildingArea: [{ required: true, message: '请输入建筑面积', trigger: 'blur' }],
|
||||||
internalFloorArea: [{ required: true, message: '请输入套内面积', trigger: 'blur' }],
|
internalFloorArea: [{ required: true, message: '请输入套内面积', trigger: 'blur' }],
|
||||||
@@ -121,72 +133,94 @@ const queryChangestore = ref({
|
|||||||
// buildingId
|
// buildingId
|
||||||
buildingId: null,
|
buildingId: null,
|
||||||
// unitno,
|
// unitno,
|
||||||
unitNo: null
|
unitNoId: null
|
||||||
});
|
});
|
||||||
// TODO 回显 车位,储藏, 以为后端筛选完出没人的房屋
|
|
||||||
const villageid = localStorage.getItem('villageid');
|
const villageid = localStorage.getItem('villageid');
|
||||||
async function init() {
|
async function init() {
|
||||||
const res = await GetVillageListParking(villageid);
|
|
||||||
parkinglist.value = res.data;
|
|
||||||
const res1 = await GetVillagelistStoreroom({
|
|
||||||
...queryChangestore.value,
|
|
||||||
villageid: villageid
|
|
||||||
});
|
|
||||||
storeRoomlist.value = res1.data;
|
|
||||||
nextTick(() => geteditinfo());
|
nextTick(() => geteditinfo());
|
||||||
}
|
}
|
||||||
init();
|
init();
|
||||||
|
|
||||||
function geteditinfo() {
|
const houseUseTypeList = ref([]);
|
||||||
|
async function geteditinfo() {
|
||||||
|
listHouseUseType({
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 99999
|
||||||
|
}).then((res) => {
|
||||||
|
houseUseTypeList.value = res.rows;
|
||||||
|
});
|
||||||
if (route.query.id) {
|
if (route.query.id) {
|
||||||
houseid.value = route.query.id;
|
houseid.value = route.query.id;
|
||||||
|
// const res = await GetVillageListParking(villageid, houseid.value);
|
||||||
|
// parkinglist.value = res.data;
|
||||||
|
// GetVillagelistStoreroom({
|
||||||
|
// ...queryChangestore.value,
|
||||||
|
// villageid: villageid,
|
||||||
|
// houseId: houseid.value
|
||||||
|
// }).then((res1) => {
|
||||||
|
// storeRoomlist.value = res1.data;
|
||||||
|
// });
|
||||||
getHouseApi(houseid.value).then((res) => {
|
getHouseApi(houseid.value).then((res) => {
|
||||||
form.value = {
|
form.value = {
|
||||||
...form.value,
|
...form.value,
|
||||||
buildingId: res.data.buildingId, // 楼栋id
|
buildingId: res.data.buildingId, // 楼栋id
|
||||||
houseId: res.data.houseId, // 房屋id
|
houseId: res.data.houseId, // 房屋id
|
||||||
unitNo: res.data.unitNo,
|
unitNoId: res.data.unitNoId,
|
||||||
floorNo: res.data.floorNo,
|
floorNo: res.data.floorNo,
|
||||||
houseNo: res.data.houseNo, // 房间号
|
houseNo: res.data.houseNo, // 房间号
|
||||||
houseArea: res.data.houseArea, //建筑面积
|
houseArea: res.data.houseArea, //建筑面积
|
||||||
internalArea: res.data.internalArea, //套内面积
|
internalArea: res.data.internalArea, //套内面积
|
||||||
storeroomId: res.data.storeroomId, //储藏室
|
storeroomId: res.data.storeroomId, //储藏室
|
||||||
parkingId: res.data.parkingId, //车位
|
parkingId: res.data.parkingId, //车位
|
||||||
|
houseUseTypeId: res.data.houseUseTypeId,
|
||||||
shareArea: res.data.shareArea // 公摊面积
|
shareArea: res.data.shareArea // 公摊面积
|
||||||
};
|
};
|
||||||
housetype.value = res.data.houseType.split('');
|
housetype.value = res.data.houseType.split('');
|
||||||
// handlechangeBuild(form.value.buildingId);
|
// handlechangeBuild(form.value.buildingId);
|
||||||
console.log(housetype.value);
|
console.log(housetype.value);
|
||||||
|
changeBuild(res.data.buildingId);
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
// const res = await GetVillageListParking(villageid);
|
||||||
|
// parkinglist.value = res.data;
|
||||||
|
// const res1 = await GetVillagelistStoreroom({
|
||||||
|
// ...queryChangestore.value,
|
||||||
|
// villageid: villageid
|
||||||
|
// });
|
||||||
|
// storeRoomlist.value = res1.data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 选择楼栋
|
// 选择楼栋
|
||||||
function handlechangeBuild(id: string) {
|
function handlechangeBuild(id: string) {
|
||||||
queryChangestore.value.buildingId = id;
|
queryChangestore.value.buildingId = id;
|
||||||
form.value.unitNo = '';
|
form.value.unitNoId = '';
|
||||||
form.value.floorNo = '';
|
form.value.floorNo = '';
|
||||||
getBuildingOnly(id).then((res) => {
|
|
||||||
units.value = Array.from({ length: res.data.unitCount }).map((_, index) => {
|
changeBuild(id);
|
||||||
return {
|
// getStoreRoomlist();
|
||||||
no: index + 1,
|
}
|
||||||
name: index + 1 + '单元'
|
|
||||||
};
|
function changeBuild(id: string) {
|
||||||
});
|
const arr = houseStore.currentBuildingInfoList;
|
||||||
floors.value = Array.from({ length: res.data.floorCount }).map((_, index) => {
|
const find = arr.find((item) => item.id === id);
|
||||||
|
if (find) {
|
||||||
|
floors.value = Array.from({ length: find.floorCount }).map((_, index) => {
|
||||||
return {
|
return {
|
||||||
no: index + 1,
|
no: index + 1,
|
||||||
name: index + 1 + '楼'
|
name: index + 1 + '楼'
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
getByBUildingidtoUnitNo(id).then((res) => {
|
||||||
|
units.value = res.data;
|
||||||
});
|
});
|
||||||
getStoreRoomlist();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// change unit
|
// change unitNoId
|
||||||
function changeUnitNo(id: number) {
|
function changeUnitNo(id: string) {
|
||||||
queryChangestore.value.unitNo = id;
|
queryChangestore.value.unitNoId = id;
|
||||||
form.value.floorNo = '';
|
form.value.floorNo = '';
|
||||||
getStoreRoomlist();
|
// getStoreRoomlist();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询储藏室列表
|
// 查询储藏室列表
|
||||||
@@ -195,7 +229,7 @@ function getStoreRoomlist() {
|
|||||||
...queryChangestore.value,
|
...queryChangestore.value,
|
||||||
villageid: villageid
|
villageid: villageid
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
form.value.storeroom = '';
|
form.value.storeroomId = '';
|
||||||
storeRoomlist.value = [];
|
storeRoomlist.value = [];
|
||||||
storeRoomlist.value = res.data;
|
storeRoomlist.value = res.data;
|
||||||
});
|
});
|
||||||
@@ -231,9 +265,7 @@ const submitForm = () => {
|
|||||||
};
|
};
|
||||||
const cancelForm = () => {
|
const cancelForm = () => {
|
||||||
formRef?.value.resetFields();
|
formRef?.value.resetFields();
|
||||||
router.push({
|
router.back();
|
||||||
path: '/house/houselist'
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
<div class="AddBuildingBody">
|
<div class="AddBuildingBody">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span>基本信息</span>
|
<span>基本信息</span>
|
||||||
<el-button type="primary" text @click="editHouse">编辑</el-button>
|
<el-button v-hasPermi="['system:house:edit']" type="primary" text v-if="HouseInfo.house" @click="editHouse">编辑</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="addBuildingFormBody">
|
<div class="addBuildingFormBody" v-if="HouseInfo.house">
|
||||||
<div class="descriptionsbox">
|
<div class="descriptionsbox">
|
||||||
<div class="label">房号:</div>
|
<div class="label">房号:</div>
|
||||||
<div class="value">{{ HouseInfo.house?.houseNo ?? '--' }}</div>
|
<div class="value">{{ HouseInfo.house?.houseNo ?? '--' }}</div>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="descriptionsbox">
|
<div class="descriptionsbox">
|
||||||
<div class="label">单元:</div>
|
<div class="label">单元:</div>
|
||||||
<div class="value">{{ HouseInfo.house?.unitNo ?? '--' }} 单元</div>
|
<div class="value">{{ HouseInfo.house?.unitNoName ?? '--' }} 单元</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="descriptionsbox">
|
<div class="descriptionsbox">
|
||||||
<div class="label">楼层:</div>
|
<div class="label">楼层:</div>
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="descriptionsbox">
|
<div class="descriptionsbox">
|
||||||
<div class="label">建筑面积:</div>
|
<div class="label">建筑面积:</div>
|
||||||
<div class="value">{{ HouseInfo.house?.houseArea ?? '--' }}㎡</div>
|
<div class="value">{{ HouseInfo.house?.houseArea ? `${HouseInfo.house?.houseArea} ㎡` : '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="descriptionsbox">
|
<div class="descriptionsbox">
|
||||||
<div class="label">公摊面积:</div>
|
<div class="label">公摊面积:</div>
|
||||||
<div class="value">{{ HouseInfo.house?.shareArea ?? '--' }}㎡</div>
|
<div class="value">{{ HouseInfo.house?.shareArea ? `${HouseInfo.house?.shareArea} ㎡` : '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="descriptionsbox">
|
<div class="descriptionsbox">
|
||||||
<div class="label">户型:</div>
|
<div class="label">户型:</div>
|
||||||
@@ -44,14 +44,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else class="w-full h-full flex flex-center min-h-4rem">
|
||||||
|
<span style="color: #999; font-weight: 500; font-size: 1.1rem; letter-spacing: 10px">暂无信息</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 储藏室信息 -->
|
<!-- 储藏室信息 -->
|
||||||
<div class="AddBuildingBody">
|
<div class="AddBuildingBody">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span>储藏室信息 </span>
|
<span>储藏室信息 </span>
|
||||||
<el-button type="primary" text @click="editStoreRoom">编辑</el-button>
|
<el-button v-hasPermi="['storeroom:storeroom:edit']" type="primary" text v-if="HouseInfo.storeroom" @click="editStoreRoom">编辑</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="addBuildingFormBody">
|
<div class="addBuildingFormBody" v-if="HouseInfo.storeroom">
|
||||||
<div class="descriptionsbox">
|
<div class="descriptionsbox">
|
||||||
<div class="label">楼栋:</div>
|
<div class="label">楼栋:</div>
|
||||||
<div class="value">{{ HouseInfo.storeroom?.buildingName ?? '--' }}</div>
|
<div class="value">{{ HouseInfo.storeroom?.buildingName ?? '--' }}</div>
|
||||||
@@ -81,53 +84,70 @@
|
|||||||
<div class="value"></div>
|
<div class="value"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else class="w-full h-full flex flex-center min-h-4rem">
|
||||||
|
<span style="color: #999; font-weight: 500; font-size: 1.1rem; letter-spacing: 10px">暂无信息</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 车位信息 -->
|
<!-- 车位信息 -->
|
||||||
<div class="AddBuildingBody">
|
<div class="AddBuildingBody">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span>车位信息</span>
|
<span>车位信息</span>
|
||||||
<el-button type="primary" text @click="handleEditParking" v-if="HouseInfo.parking">编辑</el-button>
|
<el-button v-hasPermi="['parking:parking:edit']" type="primary" text @click="handleEditParking" v-if="HouseInfo.parking">编辑</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="addBuildingFormBody" v-if="HouseInfo.parking">
|
<div class="addBuildingFormBody" v-if="HouseInfo.parking">
|
||||||
<div class="descriptionsbox">
|
<div class="descriptionsbox">
|
||||||
<div class="label">区域:</div>
|
<div class="label">区域:</div>
|
||||||
<div class="value">{{ HouseInfo.storeroom?.shareArea ?? '--' }}</div>
|
<div class="value">{{ HouseInfo.parking?.areaName ?? '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="descriptionsbox">
|
<div class="descriptionsbox">
|
||||||
<div class="label">车位编号:</div>
|
<div class="label">车位编号:</div>
|
||||||
<div class="value">18100000000</div>
|
<div class="value">{{ HouseInfo.parking?.parkingCode ?? '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="descriptionsbox">
|
<div class="descriptionsbox">
|
||||||
<div class="label">车位面积:</div>
|
<div class="label">车位面积:</div>
|
||||||
<div class="value">2栋</div>
|
<div class="value">{{ HouseInfo.parking?.parkingArea ?? '--' }} ㎡</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="descriptionsbox">
|
<div class="descriptionsbox">
|
||||||
<div class="label">楼层:</div>
|
<div class="label">楼层:</div>
|
||||||
<div class="value">2单元</div>
|
<div class="value">{{ HouseInfo.parking?.parkingFloor ?? '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="descriptionsbox">
|
<div class="descriptionsbox">
|
||||||
<div class="label">车位类型:</div>
|
<div class="label">车位类型:</div>
|
||||||
<div class="value">3楼</div>
|
<div class="value">
|
||||||
|
<dict-tag :options="com_parking_type" :value="HouseInfo.parking.type" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="descriptionsbox">
|
<div class="descriptionsbox">
|
||||||
<div class="label">车位状态:</div>
|
<div class="label">车位状态:</div>
|
||||||
<div class="value">112㎡</div>
|
<div class="value">
|
||||||
|
<dict-tag :options="com_parking_status" :value="HouseInfo.parking.parkingStatus" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="descriptionsbox">
|
<div class="descriptionsbox">
|
||||||
<div class="label">持有人:</div>
|
<div class="label">持有人:</div>
|
||||||
<div class="value">12㎡</div>
|
<div class="value">
|
||||||
|
<span>{{ HouseInfo.parking?.residentName ?? '--' }}</span>
|
||||||
|
<el-button
|
||||||
|
v-hasPermi="['parking:parking:edit']"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
@click="handleEditUser(HouseInfo.parking.residentId)"
|
||||||
|
v-if="HouseInfo.parking"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="descriptionsbox">
|
<div class="descriptionsbox">
|
||||||
<div class="label">添加时间:</div>
|
<div class="label">添加时间:</div>
|
||||||
<div class="value">3室2厅2卫</div>
|
<div class="value">{{ HouseInfo.parking?.createTime ?? '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="descriptionsbox">
|
<div class="descriptionsbox">
|
||||||
<div class="label">添加人:</div>
|
<div class="label">添加人:</div>
|
||||||
<div class="value">3室2厅2卫</div>
|
<div class="value">{{ HouseInfo.parking?.createName ?? '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="descriptionsbox">
|
<div class="descriptionsbox">
|
||||||
<div class="label">备注:</div>
|
<div class="label">备注:</div>
|
||||||
<div class="value"></div>
|
<div class="value">{{ HouseInfo.parking?.remark ?? '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="w-full h-full flex flex-center min-h-4rem">
|
<div v-else class="w-full h-full flex flex-center min-h-4rem">
|
||||||
@@ -210,32 +230,12 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|||||||
const { com_resident_relationship } = toRefs<any>(proxy?.useDict('com_resident_relationship'));
|
const { com_resident_relationship } = toRefs<any>(proxy?.useDict('com_resident_relationship'));
|
||||||
const { sys_user_sex } = toRefs<any>(proxy?.useDict('sys_user_sex'));
|
const { sys_user_sex } = toRefs<any>(proxy?.useDict('sys_user_sex'));
|
||||||
const { com_pay_status } = toRefs<any>(proxy?.useDict('com_pay_status'));
|
const { com_pay_status } = toRefs<any>(proxy?.useDict('com_pay_status'));
|
||||||
const tableData = [
|
const { com_parking_type } = toRefs<any>(proxy?.useDict('com_parking_type'));
|
||||||
{
|
const { com_parking_status } = toRefs<any>(proxy?.useDict('com_parking_status'));
|
||||||
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'
|
|
||||||
}
|
|
||||||
];
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const routeid = ref('');
|
const routeid = ref('');
|
||||||
|
|
||||||
const HouseInfo = ref<Data>({
|
const HouseInfo = ref<Data>({
|
||||||
billResidentList: [],
|
billResidentList: [],
|
||||||
chargeItemList: [],
|
chargeItemList: [],
|
||||||
@@ -262,12 +262,20 @@ function editStoreRoom() {
|
|||||||
}
|
}
|
||||||
function handleEditParking() {
|
function handleEditParking() {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/house/editParking',
|
path: '/carArea/editParking',
|
||||||
query: {
|
query: {
|
||||||
id: HouseInfo.value.parking.parkingId
|
id: HouseInfo.value.parking.parkingId
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function handleEditUser(id: string) {
|
||||||
|
router.push({
|
||||||
|
path: '/house/editResident',
|
||||||
|
query: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
function init() {
|
function init() {
|
||||||
if (route.query.id) {
|
if (route.query.id) {
|
||||||
routeid.value = route.query.id as string;
|
routeid.value = route.query.id as string;
|
||||||
|
|||||||
@@ -44,13 +44,14 @@ const handleCalp = (event: MouseEvent, houseid: string) => {
|
|||||||
.house-list {
|
.house-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
max-height: 300px;
|
gap: 10px;
|
||||||
|
max-height: 400px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
justify-content: space-evenly;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.house {
|
.house {
|
||||||
width: 100px;
|
min-width: 100px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
|
|||||||
@@ -1,25 +1,32 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="TableBox p-5 h-full" v-if="houseStore.currentHouseInfoList !== null">
|
<div class="h-full">
|
||||||
<el-checkbox-group @change="handleChangeCheckhouses" v-model="houseStore.checkoutHouses">
|
<div class="TableBox p-5 h-full" v-if="houseStore.currentHouseInfoList !== null">
|
||||||
<el-table border :data="houseStore.currentFloorInfoList">
|
<el-checkbox-group @change="handleChangeCheckhouses" v-model="houseStore.checkoutHouses">
|
||||||
<el-table-column align="center" fixed label="楼层\单元" max-width="100">
|
<el-table border :data="houseStore.currentFloorInfoList">
|
||||||
<template #default="{ row }">
|
<el-table-column align="center" fixed label="楼层\单元" max-width="100">
|
||||||
<span>{{ row }}楼</span>
|
<template #default="{ row }">
|
||||||
</template>
|
<span>{{ row }}楼</span>
|
||||||
</el-table-column>
|
</template>
|
||||||
<el-table-column
|
</el-table-column>
|
||||||
min-width="260"
|
<el-table-column
|
||||||
align="center"
|
min-width="260"
|
||||||
:label="`${unit.unitNo}单元`"
|
align="center"
|
||||||
v-for="(unit, index) in houseStore.currentHouseInfoList?.units.length > 0 ? houseStore.currentHouseInfoList?.units : []"
|
v-for="(unit, index) in houseStore.currentHouseInfoList?.units.length > 0 ? houseStore.currentHouseInfoList?.units : []"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<template #default="{ row }">
|
<template #header>
|
||||||
<houseItem @contextmenufun="contextMenuFun" :menu-list="menutlist" :unit="unit.floors" :f-idx="row"></houseItem>
|
<span>{{ unit.unitNoName }}</span>
|
||||||
</template>
|
<el-button link type="primary" icon="Edit" @click="HandleEditUnit(unit)"></el-button>
|
||||||
</el-table-column>
|
<el-button link type="danger" icon="Delete" style="margin-left: 0" @click="HandleDeleteUnit(unit)"></el-button>
|
||||||
</el-table>
|
</template>
|
||||||
</el-checkbox-group>
|
<template #default="{ row }">
|
||||||
|
<houseItem @contextmenufun="contextMenuFun" :menu-list="menutlist" :unit="unit.floors" :f-idx="row"></houseItem>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</div>
|
||||||
|
<div v-else class="nodata">暂无房屋</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -32,6 +39,8 @@ import { checkPermi } from '@/utils/permission';
|
|||||||
const houseStore = useHouseStore();
|
const houseStore = useHouseStore();
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
|
const emit = defineEmits(['editUnit', 'deleteUnit']);
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const menutlist = [
|
const menutlist = [
|
||||||
// { label: '编辑', value: 'edit' },
|
// { label: '编辑', value: 'edit' },
|
||||||
@@ -85,6 +94,13 @@ function contextMenuFun(val: { type: string; value: string }) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function HandleEditUnit(unit) {
|
||||||
|
emit('editUnit', unit.unitNoId);
|
||||||
|
}
|
||||||
|
function HandleDeleteUnit(unit) {
|
||||||
|
emit('deleteUnit', unit.unitNoId);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@@ -93,4 +109,11 @@ function contextMenuFun(val: { type: string; value: string }) {
|
|||||||
height: calc(100% - 500px);
|
height: calc(100% - 500px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.nodata {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
color: #ccc;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
text-align: center;
|
||||||
|
padding-top: 200px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -28,9 +28,20 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="rightActions flex flex-items-center">
|
<div class="rightActions flex flex-items-center">
|
||||||
|
<span class="mr-20px" @click="handleAddUnit" v-hasPermi="['system:house:add']">+添加单元</span>
|
||||||
<span class="mr-20px" @click="handleAddHouse" v-hasPermi="['system:house:add']">+增加房屋</span>
|
<span class="mr-20px" @click="handleAddHouse" v-hasPermi="['system:house:add']">+增加房屋</span>
|
||||||
<!-- <span class="mr-20px">收费标准设置</span> -->
|
<!-- <span class="mr-20px">收费标准设置</span> -->
|
||||||
<span @click="deleteAllhouse" v-hasPermi="['system:house:remove']">删除</span>
|
<span @click="deleteAllhouse" v-hasPermi="['system:house:remove']">删除</span>
|
||||||
|
<el-select
|
||||||
|
clearable
|
||||||
|
@clear="handleClearUse"
|
||||||
|
@change="handleChangeUse"
|
||||||
|
v-model="houseUse"
|
||||||
|
placeholder="筛选房屋类型"
|
||||||
|
style="width: 180px; margin: 0 10px"
|
||||||
|
>
|
||||||
|
<el-option v-for="item in houseUseTypeList" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
|
</el-select>
|
||||||
<div class="searchbox flex flex-items-center">
|
<div class="searchbox flex flex-items-center">
|
||||||
<el-input v-model="housename" class="searchinput" placeholder="请输入房屋号"></el-input>
|
<el-input v-model="housename" class="searchinput" placeholder="请输入房屋号"></el-input>
|
||||||
<el-button style="margin-left: 10px" type="primary" @click="handleSearchHouse">搜索</el-button>
|
<el-button style="margin-left: 10px" type="primary" @click="handleSearchHouse">搜索</el-button>
|
||||||
@@ -39,8 +50,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="UnitBody">
|
<div class="UnitBody">
|
||||||
<TableUnit></TableUnit>
|
<TableUnit @edit-unit="handleEditUnit" @delete-unit="handleDelete"></TableUnit>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 添加或修改单元对话框 -->
|
||||||
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||||
|
<el-form ref="unitNoFormRef" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="单元名称" prop="name">
|
||||||
|
<el-input v-model="form.name" placeholder="请输入单元名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="楼栋" prop="buildingId">
|
||||||
|
<!-- <el-input v-model="form.buildingId" placeholder="请输入楼栋" /> -->
|
||||||
|
<el-select v-model="form.buildingId" placeholder="请选择">
|
||||||
|
<el-option v-for="item in houseStore.currentBuildingInfoList" :key="item.id" :label="item.buildingName" :value="item.id" />
|
||||||
|
</el-select>
|
||||||
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -48,6 +79,9 @@
|
|||||||
import { deleteHouseApi } from '@/api/system/house';
|
import { deleteHouseApi } from '@/api/system/house';
|
||||||
import TableUnit from './components/table.vue';
|
import TableUnit from './components/table.vue';
|
||||||
import { useHouseStore } from '@/store/modules/house';
|
import { useHouseStore } from '@/store/modules/house';
|
||||||
|
import { listHouseUseType } from '@/api/system/houseUse';
|
||||||
|
import { addUnitNo, delUnitNo, getUnitNo, updateUnitNo } from '@/api/system/houseUnit';
|
||||||
|
import { UnitNoVO } from '@/api/system/houseUnit/type';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
@@ -55,20 +89,117 @@ const houseStore = useHouseStore();
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const housename = ref('');
|
const housename = ref('');
|
||||||
|
const houseUse = ref('');
|
||||||
|
const houseUseTypeList = ref([]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取房屋 类型
|
||||||
|
*/
|
||||||
|
function init() {
|
||||||
|
listHouseUseType({
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 99999
|
||||||
|
}).then((res) => {
|
||||||
|
houseUseTypeList.value = res.rows;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
init();
|
||||||
|
|
||||||
|
const dialog = reactive<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
const unitNoFormRef = ref();
|
||||||
|
const buttonLoading = ref(false);
|
||||||
|
const form = ref({
|
||||||
|
id: undefined,
|
||||||
|
name: undefined,
|
||||||
|
buildingId: undefined,
|
||||||
|
villageId: undefined
|
||||||
|
});
|
||||||
|
|
||||||
|
const rules = {
|
||||||
|
name: [{ required: true, message: '单元名称不能为空', trigger: 'blur' }],
|
||||||
|
buildingId: [{ required: true, message: '所属楼栋不能为空', trigger: 'blur' }]
|
||||||
|
};
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
const handleAddUnit = () => {
|
||||||
|
resetForm();
|
||||||
|
dialog.visible = true;
|
||||||
|
dialog.title = '添加单元';
|
||||||
|
};
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
const handleEditUnit = async (id: string) => {
|
||||||
|
resetForm();
|
||||||
|
const res = await getUnitNo(id);
|
||||||
|
Object.assign(form.value, res.data);
|
||||||
|
dialog.visible = true;
|
||||||
|
dialog.title = '修改单元';
|
||||||
|
};
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
const handleDelete = async (id: string) => {
|
||||||
|
await proxy?.$modal.confirm('是否确认删除该单元?');
|
||||||
|
await delUnitNo(id);
|
||||||
|
proxy?.$modal.msgSuccess('删除成功');
|
||||||
|
// await getList();
|
||||||
|
houseStore.updateCureentBuilding();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
const submitForm = () => {
|
||||||
|
unitNoFormRef.value?.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
buttonLoading.value = true;
|
||||||
|
if (form.value.id) {
|
||||||
|
await updateUnitNo(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
} else {
|
||||||
|
await addUnitNo(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
}
|
||||||
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
dialog.visible = false;
|
||||||
|
houseStore.updateCureentBuilding();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/** 取消按钮 */
|
||||||
|
const cancel = () => {
|
||||||
|
resetForm();
|
||||||
|
dialog.visible = false;
|
||||||
|
};
|
||||||
|
/** 表单重置 */
|
||||||
|
const resetForm = () => {
|
||||||
|
form.value = { id: undefined, name: undefined, buildingId: undefined, villageId: undefined };
|
||||||
|
unitNoFormRef.value?.resetFields();
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 改变房屋类型
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
function handleChangeUse(id?: string) {
|
||||||
|
houseUse.value = id;
|
||||||
|
}
|
||||||
|
function handleClearUse() {
|
||||||
|
houseUse.value = '';
|
||||||
|
handleSearchHouse();
|
||||||
|
}
|
||||||
/** 添加房屋 */
|
/** 添加房屋 */
|
||||||
function handleAddHouse() {
|
function handleAddHouse() {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/house/addHouse'
|
path: '/house/addHouse'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索 房屋
|
||||||
|
*/
|
||||||
function handleSearchHouse() {
|
function handleSearchHouse() {
|
||||||
if (housename.value && housename.value.trim()) {
|
houseStore.getHouseBybuildingNo(housename.value, houseUse.value);
|
||||||
houseStore.getHouseBybuildingNo(housename.value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
function reset() {
|
function reset() {
|
||||||
housename.value = '';
|
housename.value = '';
|
||||||
houseStore.getHouseBybuildingNo(housename.value);
|
houseUse.value = '';
|
||||||
|
houseStore.getHouseBybuildingNo(housename.value, houseUse.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function deleteAllhouse() {
|
async function deleteAllhouse() {
|
||||||
@@ -109,7 +240,6 @@ $primary_color: #1978fe;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.searchbox {
|
.searchbox {
|
||||||
margin-left: 30px;
|
|
||||||
.searchinput {
|
.searchinput {
|
||||||
width: 250px;
|
width: 250px;
|
||||||
@media (max-width: 1200px) {
|
@media (max-width: 1200px) {
|
||||||
|
|||||||
@@ -6,19 +6,6 @@
|
|||||||
<span class="mr-50px">当前小区:{{ currentVilageInfo && currentVilageInfo.villageName }}</span>
|
<span class="mr-50px">当前小区:{{ currentVilageInfo && currentVilageInfo.villageName }}</span>
|
||||||
<span>小区地址:{{ currentVilageInfo && currentVilageInfo.city }} {{ currentVilageInfo && currentVilageInfo.address }}</span>
|
<span>小区地址:{{ currentVilageInfo && currentVilageInfo.city }} {{ currentVilageInfo && currentVilageInfo.address }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="houseTypeBox flex">
|
|
||||||
<div
|
|
||||||
class="housetype"
|
|
||||||
:class="{
|
|
||||||
active: buildingtype == house.value
|
|
||||||
}"
|
|
||||||
@click="houseStore.switchHouseType(house.value)"
|
|
||||||
v-for="(house, index) in com_build_use"
|
|
||||||
:key="index"
|
|
||||||
>
|
|
||||||
{{ house.label }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
<div class="houseBody w-full flex align-center justify-center">
|
<div class="houseBody w-full flex align-center justify-center">
|
||||||
@@ -27,8 +14,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup name="Houselist" lang="ts">
|
<script setup lang="ts">
|
||||||
// TODO 楼栋类型
|
|
||||||
import building from './components/building.vue';
|
import building from './components/building.vue';
|
||||||
import unit from './components/unit.vue';
|
import unit from './components/unit.vue';
|
||||||
import PageHeader from '@/components/Pageheader/index.vue';
|
import PageHeader from '@/components/Pageheader/index.vue';
|
||||||
@@ -36,10 +22,11 @@ import { useHouseStore } from '@/store/modules/house';
|
|||||||
|
|
||||||
const houseStore = useHouseStore();
|
const houseStore = useHouseStore();
|
||||||
const { buildingtype, currentVilageInfo } = storeToRefs(houseStore);
|
const { buildingtype, currentVilageInfo } = storeToRefs(houseStore);
|
||||||
|
function init() {
|
||||||
|
houseStore.initHouse();
|
||||||
|
}
|
||||||
|
init();
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
||||||
const { com_build_use } = toRefs<any>(proxy?.useDict('com_build_use'));
|
|
||||||
houseStore.initHouse(houseStore.buildingtype);
|
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -56,10 +43,9 @@ houseStore.initHouse(houseStore.buildingtype);
|
|||||||
}
|
}
|
||||||
.houseAdressBox {
|
.houseAdressBox {
|
||||||
margin-top: 25px;
|
margin-top: 25px;
|
||||||
height: 20px;
|
|
||||||
line-height: 20px;
|
|
||||||
color: rgba(102, 102, 102, 1);
|
color: rgba(102, 102, 102, 1);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
.houseTypeBox {
|
.houseTypeBox {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|||||||
@@ -373,9 +373,7 @@ const sendForm = (val: string) => {
|
|||||||
|
|
||||||
// 推出
|
// 推出
|
||||||
const cancelForm = () => {
|
const cancelForm = () => {
|
||||||
router.push({
|
router.back();
|
||||||
path: '/house/houseRental'
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
253
src/views/system/houseUnit/index.vue
Normal file
253
src/views/system/houseUnit/index.vue
Normal file
@@ -0,0 +1,253 @@
|
|||||||
|
<template>
|
||||||
|
<div class="p-2 flex flex-col h-full">
|
||||||
|
<pageheader></pageheader>
|
||||||
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
|
<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 label="小区" prop="villageId">
|
||||||
|
<el-input v-model="queryParams.villageId" placeholder="请输入小区" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="楼栋" prop="buildingId">
|
||||||
|
<el-input v-model="queryParams.buildingId" placeholder="请输入楼栋" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
|
||||||
|
<el-card shadow="never" class="flex-1">
|
||||||
|
<template #header>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['unitNo:unitNo:add']">新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['unitNo:unitNo:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['unitNo:unitNo:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['unitNo:unitNo:export']">导出</el-button>
|
||||||
|
</el-col> -->
|
||||||
|
<right-toolbar :show-add="checkPermi(['unitNo:unitNo:add'])" @update:add="handleAdd">
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-item :disabled="single" v-if="checkPermi(['unitNo:unitNo:edit'])" @click="handleUpdate">
|
||||||
|
<div>编辑</div>
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item :disabled="single" v-if="checkPermi(['unitNo:unitNo:delete'])" @click="handleDelete">
|
||||||
|
<div>批量删除</div>
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item v-if="checkPermi(['unitNo:unitNo:export'])" @click="handleExport">
|
||||||
|
<div>导出</div>
|
||||||
|
</el-dropdown-item>
|
||||||
|
</template>
|
||||||
|
</right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" border :data="unitNoList" @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="villageId" />
|
||||||
|
<el-table-column label="楼栋" align="center" prop="buildingId" />
|
||||||
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tooltip content="修改" placement="top">
|
||||||
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['unitNo:unitNo:edit']"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="删除" placement="top">
|
||||||
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['unitNo:unitNo:remove']"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
|
</el-card>
|
||||||
|
<!-- 添加或修改单元对话框 -->
|
||||||
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||||
|
<el-form ref="unitNoFormRef" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="单元名称" prop="name">
|
||||||
|
<el-input v-model="form.name" placeholder="请输入单元名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="小区" prop="villageId">
|
||||||
|
<el-input v-model="form.villageId" placeholder="请输入小区" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="楼栋" prop="buildingId">
|
||||||
|
<el-input v-model="form.buildingId" placeholder="请输入楼栋" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="UnitNo" lang="ts">
|
||||||
|
import { listUnitNo, getUnitNo, delUnitNo, addUnitNo, updateUnitNo } from '@/api/system/houseUnit/index';
|
||||||
|
import { UnitNoVO, UnitNoQuery, UnitNoForm } from '@/api/system/houseUnit/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
|
const unitNoList = ref<UnitNoVO[]>([]);
|
||||||
|
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 unitNoFormRef = ref<ElFormInstance>();
|
||||||
|
|
||||||
|
const dialog = reactive<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
const initFormData: UnitNoForm = {
|
||||||
|
id: undefined,
|
||||||
|
name: undefined,
|
||||||
|
villageId: undefined,
|
||||||
|
buildingId: undefined
|
||||||
|
};
|
||||||
|
const data = reactive<PageData<UnitNoForm, UnitNoQuery>>({
|
||||||
|
form: { ...initFormData },
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
name: undefined,
|
||||||
|
villageId: undefined,
|
||||||
|
buildingId: undefined,
|
||||||
|
params: {}
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
id: [{ required: true, message: '单元表id不能为空', trigger: 'blur' }]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
|
/** 查询单元列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
const res = await listUnitNo(queryParams.value);
|
||||||
|
unitNoList.value = res.rows;
|
||||||
|
total.value = res.total;
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 取消按钮 */
|
||||||
|
const cancel = () => {
|
||||||
|
reset();
|
||||||
|
dialog.visible = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 表单重置 */
|
||||||
|
const reset = () => {
|
||||||
|
form.value = { ...initFormData };
|
||||||
|
unitNoFormRef.value?.resetFields();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryFormRef.value?.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 多选框选中数据 */
|
||||||
|
const handleSelectionChange = (selection: UnitNoVO[]) => {
|
||||||
|
ids.value = selection.map((item) => item.id);
|
||||||
|
single.value = selection.length != 1;
|
||||||
|
multiple.value = !selection.length;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
const handleAdd = () => {
|
||||||
|
reset();
|
||||||
|
dialog.visible = true;
|
||||||
|
dialog.title = '添加单元';
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
const handleUpdate = async (row?: UnitNoVO) => {
|
||||||
|
reset();
|
||||||
|
const _id = row?.id || ids.value[0];
|
||||||
|
const res = await getUnitNo(_id);
|
||||||
|
Object.assign(form.value, res.data);
|
||||||
|
dialog.visible = true;
|
||||||
|
dialog.title = '修改单元';
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
const submitForm = () => {
|
||||||
|
unitNoFormRef.value?.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
buttonLoading.value = true;
|
||||||
|
if (form.value.id) {
|
||||||
|
await updateUnitNo(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
} else {
|
||||||
|
await addUnitNo(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
}
|
||||||
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
dialog.visible = false;
|
||||||
|
await getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
const handleDelete = async (row?: UnitNoVO) => {
|
||||||
|
const _ids = row?.id || ids.value;
|
||||||
|
await proxy?.$modal.confirm('是否确认删除单元?').finally(() => (loading.value = false));
|
||||||
|
await delUnitNo(_ids);
|
||||||
|
proxy?.$modal.msgSuccess('删除成功');
|
||||||
|
await getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
const handleExport = () => {
|
||||||
|
proxy?.download(
|
||||||
|
'unitNo/unitNo/export',
|
||||||
|
{
|
||||||
|
...queryParams.value
|
||||||
|
},
|
||||||
|
`unitNo_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-table {
|
||||||
|
height: calc(100% - 80px);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
214
src/views/system/houseUse/index.vue
Normal file
214
src/views/system/houseUse/index.vue
Normal file
@@ -0,0 +1,214 @@
|
|||||||
|
<template>
|
||||||
|
<div class="p-2 h-full flex flex-col">
|
||||||
|
<pageheader></pageheader>
|
||||||
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
|
<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 shadow="never" class="flex-1">
|
||||||
|
<template #header>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<right-toolbar :show-add="checkPermi(['houseUseType:houseUseType:add'])" @update:add="handleAdd">
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-item :disabled="single" v-if="checkPermi(['houseUseType:houseUseType:edit'])" @click="handleUpdate">
|
||||||
|
<div>编辑</div>
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item :disabled="single" v-if="checkPermi(['houseUseType:houseUseType:delete'])" @click="handleDelete">
|
||||||
|
<div>批量删除</div>
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item v-if="checkPermi(['houseUseType:houseUseType:export'])" @click="handleExport">
|
||||||
|
<div>导出</div>
|
||||||
|
</el-dropdown-item>
|
||||||
|
</template>
|
||||||
|
</right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" border :data="houseUseTypeList" @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" fixed="right" class-name="small-padding fixed-width">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['houseUseType:houseUseType:edit']">修改</el-button>
|
||||||
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['houseUseType:houseUseType:remove']">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
|
</el-card>
|
||||||
|
<!-- 添加或修改房屋类型对话框 -->
|
||||||
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||||
|
<el-form ref="houseUseTypeFormRef" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="用途名称" prop="name">
|
||||||
|
<el-input v-model="form.name" placeholder="请输入用途名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { listHouseUseType, getHouseUseType, delHouseUseType, addHouseUseType, updateHouseUseType } from '@/api/system/houseUse';
|
||||||
|
import { HouseUseTypeVO, HouseUseTypeQuery, HouseUseTypeForm } from '@/api/system/houseUse/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
|
const houseUseTypeList = ref<HouseUseTypeVO[]>([]);
|
||||||
|
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 houseUseTypeFormRef = ref<ElFormInstance>();
|
||||||
|
|
||||||
|
const dialog = reactive<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
const initFormData: HouseUseTypeForm = {
|
||||||
|
id: undefined,
|
||||||
|
name: undefined
|
||||||
|
};
|
||||||
|
const data = reactive<PageData<HouseUseTypeForm, HouseUseTypeQuery>>({
|
||||||
|
form: { ...initFormData },
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
name: undefined,
|
||||||
|
params: {}
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
id: [{ required: true, message: '房屋类型id不能为空', trigger: 'blur' }]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
|
/** 查询房屋类型列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
const res = await listHouseUseType(queryParams.value);
|
||||||
|
houseUseTypeList.value = res.rows;
|
||||||
|
total.value = res.total;
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 取消按钮 */
|
||||||
|
const cancel = () => {
|
||||||
|
reset();
|
||||||
|
dialog.visible = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 表单重置 */
|
||||||
|
const reset = () => {
|
||||||
|
form.value = { ...initFormData };
|
||||||
|
houseUseTypeFormRef.value?.resetFields();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryFormRef.value?.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 多选框选中数据 */
|
||||||
|
const handleSelectionChange = (selection: HouseUseTypeVO[]) => {
|
||||||
|
ids.value = selection.map((item) => item.id);
|
||||||
|
single.value = selection.length != 1;
|
||||||
|
multiple.value = !selection.length;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
const handleAdd = () => {
|
||||||
|
reset();
|
||||||
|
dialog.visible = true;
|
||||||
|
dialog.title = '添加房屋类型';
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
const handleUpdate = async (row?: HouseUseTypeVO) => {
|
||||||
|
reset();
|
||||||
|
const _id = row?.id || ids.value[0];
|
||||||
|
const res = await getHouseUseType(_id);
|
||||||
|
Object.assign(form.value, res.data);
|
||||||
|
dialog.visible = true;
|
||||||
|
dialog.title = '修改房屋类型';
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
const submitForm = () => {
|
||||||
|
houseUseTypeFormRef.value?.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
buttonLoading.value = true;
|
||||||
|
if (form.value.id) {
|
||||||
|
await updateHouseUseType(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
} else {
|
||||||
|
await addHouseUseType(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
}
|
||||||
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
dialog.visible = false;
|
||||||
|
await getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
const handleDelete = async (row?: HouseUseTypeVO) => {
|
||||||
|
const _ids = row?.id || ids.value;
|
||||||
|
await proxy?.$modal.confirm('是否确认删除房屋类型编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||||
|
await delHouseUseType(_ids);
|
||||||
|
proxy?.$modal.msgSuccess('删除成功');
|
||||||
|
await getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
const handleExport = () => {
|
||||||
|
proxy?.download(
|
||||||
|
'houseUseType/houseUseType/export',
|
||||||
|
{
|
||||||
|
...queryParams.value
|
||||||
|
},
|
||||||
|
`houseUseType_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-table {
|
||||||
|
height: calc(100% - 80px);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -75,9 +75,7 @@ const submitForm = () => {
|
|||||||
};
|
};
|
||||||
// 推出
|
// 推出
|
||||||
const cancelForm = () => {
|
const cancelForm = () => {
|
||||||
router.push({
|
router.back();
|
||||||
path: '/Inspection/item'
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -29,10 +29,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="任务时间">
|
<el-form-item label="任务时间段">
|
||||||
<el-select v-model="form.taskTime" placeholder="选择任务时间段" style="width: 100%">
|
<!-- <el-select v-model="form.taskTime" placeholder="选择任务时间段" style="width: 100%">
|
||||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select> -->
|
||||||
|
<div v-for="(item, index) in taskTime" :key="index" style="display: flex; align-items: center; margin-top: 10px">
|
||||||
|
<el-time-picker
|
||||||
|
v-model="taskTime[index]"
|
||||||
|
is-range
|
||||||
|
range-separator="到"
|
||||||
|
start-placeholder="开始时间"
|
||||||
|
end-placeholder="结束时间"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
<el-button v-if="taskTime.length > 1" icon="Minus" circle style="margin-left: 10px" @click="removeTaskTime(index)"></el-button>
|
||||||
|
<el-button v-if="taskTime.length === index + 1" icon="Plus" circle style="margin-left: 10px" @click="addTaskTime"></el-button>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="提醒时间">
|
<el-form-item label="提醒时间">
|
||||||
@@ -75,7 +87,6 @@ import { getVillageByIdAPI } from '@/api/system/community';
|
|||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_inspection_remind_tiime } = toRefs<any>(proxy?.useDict('com_inspection_remind_tiime'));
|
const { com_inspection_remind_tiime } = toRefs<any>(proxy?.useDict('com_inspection_remind_tiime'));
|
||||||
|
|
||||||
com_inspection_remind_tiime;
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
@@ -94,6 +105,18 @@ const rules = ref({
|
|||||||
inspectorIds: [{ required: true, message: '请选择巡检人员', trigger: 'blur' }],
|
inspectorIds: [{ required: true, message: '请选择巡检人员', trigger: 'blur' }],
|
||||||
routeIds: [{ required: true, message: '请选择路线', trigger: 'blur' }]
|
routeIds: [{ required: true, message: '请选择路线', trigger: 'blur' }]
|
||||||
});
|
});
|
||||||
|
// 初始化 taskTime,确保至少有一个时间段
|
||||||
|
const taskTime = ref<[string, string][]>([['', '']]);
|
||||||
|
|
||||||
|
// 新增时间段
|
||||||
|
function addTaskTime() {
|
||||||
|
taskTime.value.push(['', '']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除时间段
|
||||||
|
function removeTaskTime(index: number) {
|
||||||
|
taskTime.value.splice(index, 1);
|
||||||
|
}
|
||||||
|
|
||||||
// 选择周几
|
// 选择周几
|
||||||
const checkoutWeek = ref([]);
|
const checkoutWeek = ref([]);
|
||||||
@@ -142,6 +165,23 @@ async function init() {
|
|||||||
.map((item) => Number(item))
|
.map((item) => Number(item))
|
||||||
.filter((item) => item);
|
.filter((item) => item);
|
||||||
|
|
||||||
|
// 2. 处理任务时间段的回显
|
||||||
|
if (res.data.taskTime) {
|
||||||
|
// 假设后端返回格式为 "09:00-11:00; 13:00-15:00"
|
||||||
|
// 先按分号分割,再按横杠分割开始和结束时间
|
||||||
|
taskTime.value = res.data.taskTime.split(';').map((timeRange: string) => {
|
||||||
|
const times = timeRange.trim().split('-');
|
||||||
|
// 确保返回的是 [start, end] 格式,如果解析失败则返回空字符串
|
||||||
|
return times.length === 2 ? [times[0], times[1]] : ['', ''];
|
||||||
|
});
|
||||||
|
// 如果解析后为空,至少保留一个空项以便用户添加
|
||||||
|
if (taskTime.value.length === 0) {
|
||||||
|
taskTime.value = [['', '']];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
taskTime.value = [['', '']];
|
||||||
|
}
|
||||||
|
|
||||||
handlChangeMap(res.data.routeIds);
|
handlChangeMap(res.data.routeIds);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -224,6 +264,12 @@ onMounted(async () => {
|
|||||||
});
|
});
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
function submit() {
|
function submit() {
|
||||||
|
// 将二维数组转换为字符串,例如 "09:00-11:00; 13:00-15:00"
|
||||||
|
form.value.taskTime = taskTime.value
|
||||||
|
.filter((t) => t[0] && t[1]) // 过滤掉未填写的
|
||||||
|
.map((t) => `${t[0]}-${t[1]}`)
|
||||||
|
.join('; ');
|
||||||
|
|
||||||
formRef.value?.validate(async (valid: boolean) => {
|
formRef.value?.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (editid.value) {
|
if (editid.value) {
|
||||||
|
|||||||
@@ -149,9 +149,7 @@ const submitForm = () => {
|
|||||||
};
|
};
|
||||||
// 返回
|
// 返回
|
||||||
const cancelForm = () => {
|
const cancelForm = () => {
|
||||||
router.push({
|
router.back();
|
||||||
path: '/Inspection/point'
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// ! map
|
// ! map
|
||||||
|
|||||||
@@ -121,9 +121,7 @@ const tableData = [
|
|||||||
|
|
||||||
// 推出
|
// 推出
|
||||||
const cancelForm = () => {
|
const cancelForm = () => {
|
||||||
router.push({
|
router.back();
|
||||||
path: '/Inspection/Record'
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -396,9 +396,7 @@ const submitForm = () => {
|
|||||||
};
|
};
|
||||||
// 返回
|
// 返回
|
||||||
const cancelForm = () => {
|
const cancelForm = () => {
|
||||||
router.push({
|
router.back();
|
||||||
path: '/Inspection/route'
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
|
|||||||
@@ -229,7 +229,6 @@ function handleActivestaus(rews) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO 住户审核
|
|
||||||
const activeStop = computed(() => {
|
const activeStop = computed(() => {
|
||||||
let status = 0;
|
let status = 0;
|
||||||
switch (active.value) {
|
switch (active.value) {
|
||||||
|
|||||||
@@ -254,9 +254,7 @@ const submitForm = () => {
|
|||||||
};
|
};
|
||||||
// 推出
|
// 推出
|
||||||
const cancelForm = () => {
|
const cancelForm = () => {
|
||||||
router.push({
|
router.back();
|
||||||
path: '/house/resident'
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -101,6 +101,11 @@ function getStoreRoominfo(id: string) {
|
|||||||
...form.value,
|
...form.value,
|
||||||
...res.data
|
...res.data
|
||||||
};
|
};
|
||||||
|
if (form.value.buildingId) {
|
||||||
|
handleChangeBuild(form.value.buildingId, () => {
|
||||||
|
form.value.unitNo = res.data.unitNo;
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 根据小区id获取楼栋单元
|
// 根据小区id获取楼栋单元
|
||||||
@@ -110,12 +115,14 @@ function init() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
init();
|
init();
|
||||||
if (route.query.id) {
|
onMounted(() => {
|
||||||
storeRoomid.value = route.query.id;
|
if (route.query.id) {
|
||||||
getStoreRoominfo(storeRoomid.value);
|
storeRoomid.value = route.query.id;
|
||||||
}
|
getStoreRoominfo(storeRoomid.value);
|
||||||
|
}
|
||||||
|
});
|
||||||
// 根据楼栋id获取单元
|
// 根据楼栋id获取单元
|
||||||
function handleChangeBuild(val: string) {
|
function handleChangeBuild(val: string, callback?: () => void) {
|
||||||
getBuildingOnly(val).then((res) => {
|
getBuildingOnly(val).then((res) => {
|
||||||
units.value = Array.from({ length: res.data.unitCount }).map((_, index) => {
|
units.value = Array.from({ length: res.data.unitCount }).map((_, index) => {
|
||||||
return {
|
return {
|
||||||
@@ -123,6 +130,7 @@ function handleChangeBuild(val: string) {
|
|||||||
name: index + 1 + '单元'
|
name: index + 1 + '单元'
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
callback && callback();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const submitForm = () => {
|
const submitForm = () => {
|
||||||
@@ -146,9 +154,7 @@ const submitForm = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
const cancelForm = () => {
|
const cancelForm = () => {
|
||||||
router.push({
|
router.back();
|
||||||
path: '/house/storeroom'
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,6 @@
|
|||||||
></right-toolbar>
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
<!-- TODO 没有编辑 -->
|
|
||||||
<el-table v-loading="loading" border :data="stockOutList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" border :data="stockOutList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" flexd width="55" align="center" />
|
<el-table-column type="selection" flexd width="55" align="center" />
|
||||||
<el-table-column label="出库单号" flexd align="center" prop="outNo" />
|
<el-table-column label="出库单号" flexd align="center" prop="outNo" />
|
||||||
|
|||||||
@@ -118,9 +118,7 @@ const submitForm = () => {
|
|||||||
};
|
};
|
||||||
// 推出
|
// 推出
|
||||||
const cancelForm = () => {
|
const cancelForm = () => {
|
||||||
router.push({
|
router.back();
|
||||||
path: '/warehouse/warehouse'
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -61,13 +61,19 @@
|
|||||||
<!-- tabs -->
|
<!-- tabs -->
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<div class="flex flex-col h-full">
|
<div class="flex flex-col h-full">
|
||||||
<div class="villageInfoBox">
|
<div class="villageInfoBox flex">
|
||||||
<div class="iconbox">
|
<div class="flex-1 flex-items-center">
|
||||||
<div :title="`${weather_icon.title} ${weather_icon.wind_direction} ${weather_icon.wind_power} 温度${weather_icon.temperature}°C`">
|
<div class="iconbox">
|
||||||
{{ getWeatherIcon(weather_icon.iconvalue) }}
|
<div :title="`${weather_icon.title} ${weather_icon.wind_direction} ${weather_icon.wind_power} 温度${weather_icon.temperature}°C`">
|
||||||
|
{{ getWeatherIcon(weather_icon.iconvalue) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tips">
|
||||||
|
{{ `${weather_icon.title} ${weather_icon.wind_direction} ${weather_icon.wind_power}风` }}
|
||||||
|
<span>温度{{ weather_icon.temperature }}°C</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="villageinfo">
|
<div class="villageinfo flex-1">
|
||||||
<div class="villagename">{{ villageinfo.villageName }}</div>
|
<div class="villagename">{{ villageinfo.villageName }}</div>
|
||||||
<div class="week">
|
<div class="week">
|
||||||
<span style="padding-right: 10px">{{ new Date().toLocaleDateString().replaceAll('/', '-') }}</span>
|
<span style="padding-right: 10px">{{ new Date().toLocaleDateString().replaceAll('/', '-') }}</span>
|
||||||
@@ -109,14 +115,23 @@
|
|||||||
<div class="body flex-1">
|
<div class="body flex-1">
|
||||||
<div class="quicly_box" v-if="Sideactive === 1">
|
<div class="quicly_box" v-if="Sideactive === 1">
|
||||||
<div class="quickly_item" v-for="(item, index) in quickBox" :key="index" @click="handleRouter(item.url)">
|
<div class="quickly_item" v-for="(item, index) in quickBox" :key="index" @click="handleRouter(item.url)">
|
||||||
<div class="quickly_item_icon" v-if="item.img">
|
<div class="quickly_item_icon" v-if="item.menuIcon">
|
||||||
<el-image :src="item.img"></el-image>
|
<svg-icon :icon-class="item.menuIcon" />
|
||||||
</div>
|
</div>
|
||||||
<div class="quickly_item_icon" v-else-if="item.svg">
|
<div class="quickly_item_content">{{ item.menuName }}</div>
|
||||||
<svg-icon :icon-class="item.svg" />
|
<!-- <div class="actionsbox">
|
||||||
|
<div class="routeactions">
|
||||||
|
<el-icon><Position /></el-icon>
|
||||||
|
<span style="padding-left: 0.1rem">跳转</span>
|
||||||
|
</div>
|
||||||
|
<div class="deleteaction">
|
||||||
|
<el-icon><Delete /></el-icon>
|
||||||
|
<span style="padding-left: 0.1rem">删除</span>
|
||||||
|
</div>
|
||||||
|
</div> -->
|
||||||
|
<div class="deleteaction" @click="delteRoute(item.id)">
|
||||||
|
<el-icon class="icons"><Remove /></el-icon>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="quickly_item_content">{{ item.name }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div @click="addQuieckDialog" class="quickly_item add">
|
<div @click="addQuieckDialog" class="quickly_item add">
|
||||||
<el-icon><Plus /></el-icon>
|
<el-icon><Plus /></el-icon>
|
||||||
@@ -242,14 +257,17 @@
|
|||||||
@change="handleCascader"
|
@change="handleCascader"
|
||||||
clearable
|
clearable
|
||||||
:props="{ value: 'path', label: 'name', children: 'children' }"
|
:props="{ value: 'path', label: 'name', children: 'children' }"
|
||||||
v-model="form.path"
|
v-model="path"
|
||||||
:options="quicklylist"
|
:options="quicklylist"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="排序" prop="path">
|
||||||
|
<el-input-number v-model="form.sortOrder"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button type="primary">确 定</el-button>
|
<el-button type="primary" @click="submitQuick">确 定</el-button>
|
||||||
<el-button>取 消</el-button>
|
<el-button>取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -288,7 +306,14 @@ import { UploadUserFile } from 'element-plus';
|
|||||||
import { getVillageByIdAPI } from '@/api/system/community';
|
import { getVillageByIdAPI } from '@/api/system/community';
|
||||||
import { getLast7Days, numToWeek2 } from '@/utils/time';
|
import { getLast7Days, numToWeek2 } from '@/utils/time';
|
||||||
import { EChartsOption } from 'echarts';
|
import { EChartsOption } from 'echarts';
|
||||||
import { workSpaceIncomeTrendListApi, workSpaceTotalListApi, workSpaceWeatherApi } from '@/api/workflow';
|
import {
|
||||||
|
addQuicklyshortcut,
|
||||||
|
delQuicklyshortcut,
|
||||||
|
getQuicklyshortcut,
|
||||||
|
workSpaceIncomeTrendListApi,
|
||||||
|
workSpaceTotalListApi,
|
||||||
|
workSpaceWeatherApi
|
||||||
|
} from '@/api/workflow';
|
||||||
import { getWeatherIcon } from '@/utils/weather';
|
import { getWeatherIcon } from '@/utils/weather';
|
||||||
import { MenuTreeOption } from '@/api/system/menu/types';
|
import { MenuTreeOption } from '@/api/system/menu/types';
|
||||||
|
|
||||||
@@ -495,10 +520,12 @@ function handleSelect(val: number) {
|
|||||||
// ! 快捷入口
|
// ! 快捷入口
|
||||||
const quickBox = ref<
|
const quickBox = ref<
|
||||||
{
|
{
|
||||||
name: string;
|
'id': string;
|
||||||
url: string;
|
'menuId': null;
|
||||||
img: string;
|
'menuName': string;
|
||||||
svg?: string;
|
'menuPath': string;
|
||||||
|
'menuIcon': string;
|
||||||
|
'sortOrder': number;
|
||||||
}[]
|
}[]
|
||||||
>([
|
>([
|
||||||
{
|
{
|
||||||
@@ -543,28 +570,35 @@ const dialog = reactive<DialogOption>({
|
|||||||
visible: false,
|
visible: false,
|
||||||
title: '添加快捷入口'
|
title: '添加快捷入口'
|
||||||
});
|
});
|
||||||
const menuOptions = ref<MenuTreeOption[]>([]);
|
|
||||||
const form = ref({
|
const form = ref({
|
||||||
name: '',
|
menuName: '',
|
||||||
path: '',
|
menuPath: '',
|
||||||
icon: ''
|
menuIcon: '',
|
||||||
|
sortOrder: 1
|
||||||
});
|
});
|
||||||
|
const path = ref([]);
|
||||||
const rules = {
|
const rules = {
|
||||||
name: [{ required: true, trigger: 'blur', message: '请输入快捷入口名称' }],
|
menuPath: [{ required: true, trigger: 'blur', message: '请选择快捷入口页面' }]
|
||||||
path: [{ required: true, trigger: 'blur', message: '请选择快捷入口页面' }]
|
|
||||||
};
|
};
|
||||||
const quicklylist = ref([]);
|
const quicklylist = ref([]);
|
||||||
function addQuieckDialog() {
|
function addQuieckDialog() {
|
||||||
form.value = {
|
form.value = {
|
||||||
name: '',
|
menuName: '',
|
||||||
path: '',
|
menuPath: '',
|
||||||
icon: ''
|
menuIcon: '',
|
||||||
|
sortOrder: 1
|
||||||
};
|
};
|
||||||
const permissionStore = usePermissionStore();
|
const permissionStore = usePermissionStore();
|
||||||
const routes = permissionStore.getDefaultRoutes();
|
const routes = permissionStore.getDefaultRoutes();
|
||||||
handleroutestoshowlist(routes);
|
handleroutestoshowlist(routes);
|
||||||
dialog.visible = true;
|
dialog.visible = true;
|
||||||
}
|
}
|
||||||
|
function getquicklist() {
|
||||||
|
getQuicklyshortcut().then((res) => {
|
||||||
|
quickBox.value = res.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
getquicklist();
|
||||||
function handleroutestoshowlist(rotues) {
|
function handleroutestoshowlist(rotues) {
|
||||||
// 1. 输入校验:确保 routes 是数组
|
// 1. 输入校验:确保 routes 是数组
|
||||||
if (!Array.isArray(rotues)) {
|
if (!Array.isArray(rotues)) {
|
||||||
@@ -623,16 +657,27 @@ function handleCascader(val) {
|
|||||||
if (find) {
|
if (find) {
|
||||||
const find2 = find.children.find((item) => item.path === childrenpath);
|
const find2 = find.children.find((item) => item.path === childrenpath);
|
||||||
if (find2) {
|
if (find2) {
|
||||||
console.log('>>> find2 <<<', find2);
|
form.value = {
|
||||||
quickBox.value.push({
|
...form.value,
|
||||||
name: find2.name,
|
menuIcon: find2.icon,
|
||||||
img: null,
|
menuName: find2.name,
|
||||||
svg: find2.icon,
|
menuPath: find2.path
|
||||||
url: find2.path
|
};
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function submitQuick() {
|
||||||
|
addQuicklyshortcut(form.value).then((res) => {
|
||||||
|
ElMessage.success(res.msg);
|
||||||
|
dialog.visible = false;
|
||||||
|
getquicklist();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function delteRoute(id: string) {
|
||||||
|
delQuicklyshortcut(id).then(() => {
|
||||||
|
getquicklist();
|
||||||
|
});
|
||||||
|
}
|
||||||
// ! 快捷入口
|
// ! 快捷入口
|
||||||
|
|
||||||
// ! 创建办事记录
|
// ! 创建办事记录
|
||||||
@@ -879,22 +924,35 @@ async function deleteFun(row) {
|
|||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 2rem;
|
justify-content: space-evenly;
|
||||||
background: #036aff;
|
background: #036aff;
|
||||||
|
padding: 0 2rem;
|
||||||
border-radius: 16px 16px 16px 16px;
|
border-radius: 16px 16px 16px 16px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
gap: 30px;
|
||||||
|
.tips {
|
||||||
|
font-size: small;
|
||||||
|
color: #ffffff77;
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
text-align: center;
|
||||||
|
@media (max-width: 1400px) {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
.iconbox {
|
.iconbox {
|
||||||
width: 70px;
|
width: 70px;
|
||||||
height: 70px;
|
height: 70px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
font-size: 60px;
|
font-size: 60px;
|
||||||
line-height: 70px;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
.villageinfo {
|
.villageinfo {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
@@ -909,7 +967,7 @@ async function deleteFun(row) {
|
|||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
height: 23px;
|
height: 23px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 1.1rem;
|
font-size: 1rem;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
line-height: 23px;
|
line-height: 23px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -1011,8 +1069,12 @@ async function deleteFun(row) {
|
|||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, 1fr);
|
grid-template-columns: repeat(3, 1fr);
|
||||||
@media (max-width: 1750px) {
|
@media (max-width: 1950px) {
|
||||||
grid-template-columns: repeat(2, 1fr);
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
max-height: 410px;
|
||||||
|
}
|
||||||
|
@media (max-width: 1750px) {
|
||||||
|
max-height: 550px;
|
||||||
}
|
}
|
||||||
@media (max-width: 1600px) {
|
@media (max-width: 1600px) {
|
||||||
max-height: 550px;
|
max-height: 550px;
|
||||||
@@ -1035,19 +1097,149 @@ async function deleteFun(row) {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
font-size: 0.685rem;
|
||||||
|
@media (max-width: 2000px) {
|
||||||
|
font-size: 0.65rem;
|
||||||
|
}
|
||||||
|
@media (max-width: 1500px) {
|
||||||
|
height: 46px;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
}
|
||||||
|
@media (max-width: 1250px) {
|
||||||
|
height: 36px;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: #0084ff09;
|
background-color: #0084ff09;
|
||||||
}
|
}
|
||||||
.quickly_item_icon {
|
.quickly_item_icon {
|
||||||
width: 25px;
|
|
||||||
height: 25px;
|
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
.quickly_item_content {
|
.quickly_item_content {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #222222;
|
color: #222222;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// &:hover {
|
||||||
|
// .actionsbox {
|
||||||
|
// opacity: 1;
|
||||||
|
// .routeactions {
|
||||||
|
// transform: rotateY(0deg);
|
||||||
|
// }
|
||||||
|
// .deleteaction {
|
||||||
|
// transform: rotateY(0deg);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
&:hover {
|
||||||
|
.deleteaction {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.deleteaction {
|
||||||
|
position: absolute;
|
||||||
|
transition: all 0.3s;
|
||||||
|
opacity: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
z-index: 1;
|
||||||
|
background-color: #bbbbbb42;
|
||||||
|
border: 1px solid #bbbbbb42;
|
||||||
|
text-align: center;
|
||||||
|
width: 1.2rem;
|
||||||
|
height: 1.2rem;
|
||||||
|
border-radius: 0 0 0 0.5rem;
|
||||||
|
line-height: 1.2rem;
|
||||||
|
font-size: 15px;
|
||||||
|
@media (max-width: 2000px) {
|
||||||
|
width: 1.4rem;
|
||||||
|
height: 1.4rem;
|
||||||
|
border-radius: 0 0 0 0.5rem;
|
||||||
|
line-height: 1.4rem;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
@media (max-width: 1700px) {
|
||||||
|
width: 1.7rem;
|
||||||
|
height: 1.7rem;
|
||||||
|
border-radius: 0 0 0 0.5rem;
|
||||||
|
line-height: 1.7rem;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
@media (max-width: 1500px) {
|
||||||
|
width: 1.7rem;
|
||||||
|
height: 1.7rem;
|
||||||
|
border-radius: 0 0 0 0.5rem;
|
||||||
|
line-height: 1.7rem;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
@media (max-width: 1250px) {
|
||||||
|
width: 1.6rem;
|
||||||
|
height: 1.6rem;
|
||||||
|
border-radius: 0 0 0 0.8rem;
|
||||||
|
line-height: 1.6rem;
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: red;
|
||||||
|
i.icons {
|
||||||
|
transform: rotateZ(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
i.icons {
|
||||||
|
transition: all 0.3s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.actionsbox {
|
||||||
|
opacity: 1;
|
||||||
|
transition: all 0.3s;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
inset: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
.routeactions,
|
||||||
|
.deleteaction {
|
||||||
|
font-size: 15px;
|
||||||
|
color: #fff;
|
||||||
|
flex: 0.5;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
transition: all 0.3s;
|
||||||
|
|
||||||
|
@media (max-width: 1500px) {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
@media (max-width: 1250px) {
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.routeactions {
|
||||||
|
background-color: #0083ff;
|
||||||
|
transform-origin: left center;
|
||||||
|
transform: rotateY(90deg);
|
||||||
|
}
|
||||||
|
.deleteaction {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background-color: red;
|
||||||
|
transform-origin: right center;
|
||||||
|
transform: rotateY(-90deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&.add {
|
&.add {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #036aff;
|
color: #036aff;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export default defineConfig(({ mode, command }) => {
|
|||||||
// 部署生产环境和开发环境下的URL。
|
// 部署生产环境和开发环境下的URL。
|
||||||
// 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上
|
// 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上
|
||||||
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
|
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||||
base: env.VITE_APP_CONTEXT_PATH,
|
base: env.VITE_APP_CONTEXT_PATH || '/',
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': path.resolve(__dirname, './src'),
|
'@': path.resolve(__dirname, './src'),
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import createIcons from './icons';
|
|||||||
import createSvgIconsPlugin from './svg-icon';
|
import createSvgIconsPlugin from './svg-icon';
|
||||||
import createCompression from './compression';
|
import createCompression from './compression';
|
||||||
import createSetupExtend from './setup-extend';
|
import createSetupExtend from './setup-extend';
|
||||||
|
import zip from './zip';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
export default (viteEnv: any, isBuild = false): [] => {
|
export default (viteEnv: any, isBuild = false): [] => {
|
||||||
@@ -21,5 +22,6 @@ export default (viteEnv: any, isBuild = false): [] => {
|
|||||||
vitePlugins.push(createIcons());
|
vitePlugins.push(createIcons());
|
||||||
vitePlugins.push(createSvgIconsPlugin(path));
|
vitePlugins.push(createSvgIconsPlugin(path));
|
||||||
vitePlugins.push(createSetupExtend());
|
vitePlugins.push(createSetupExtend());
|
||||||
|
vitePlugins.push(zip(path));
|
||||||
return vitePlugins;
|
return vitePlugins;
|
||||||
};
|
};
|
||||||
|
|||||||
10
vite/plugins/zip.ts
Normal file
10
vite/plugins/zip.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import zipPack from 'vite-plugin-zip-pack';
|
||||||
|
|
||||||
|
export default (path) => {
|
||||||
|
return zipPack({
|
||||||
|
inDir: path.resolve(__dirname, '../../dist'), // 要打包的文件夹
|
||||||
|
outDir: path.resolve(__dirname, '../../'), // 压缩包输出到根目录
|
||||||
|
outFileName: 'dist.zip', // 压缩包名字
|
||||||
|
pathPrefix: 'dist' // 不加前缀
|
||||||
|
});
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user