页面路径完善
This commit is contained in:
@@ -9,9 +9,9 @@ VITE_APP_ENV = 'development'
|
|||||||
# 开发环境
|
# 开发环境
|
||||||
VITE_APP_BASE_API = '/dev-api'
|
VITE_APP_BASE_API = '/dev-api'
|
||||||
# # 开发环境 接口代理地址
|
# # 开发环境 接口代理地址
|
||||||
# VITE_APP_PROXY_API = 'http://192.168.1.222:8080'
|
VITE_APP_PROXY_API = 'http://192.168.1.222:8080'
|
||||||
# 开发环境 接口代理地址
|
# 开发环境 接口代理地址
|
||||||
VITE_APP_PROXY_API = 'http://192.168.1.215:8080'
|
# VITE_APP_PROXY_API = 'http://192.168.1.215:8080'
|
||||||
# 图片基础地址
|
# 图片基础地址
|
||||||
VITE_IMG_URL = 'http://192.168.1.222:8080'
|
VITE_IMG_URL = 'http://192.168.1.222:8080'
|
||||||
|
|
||||||
|
|||||||
63
src/api/system/ChargeType/index.ts
Normal file
63
src/api/system/ChargeType/index.ts
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { AxiosPromise } from 'axios';
|
||||||
|
import { ChargeTypeVO, ChargeTypeForm, ChargeTypeQuery } from './type';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询收费类型列表
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
|
||||||
|
export const listChargeType = (query?: ChargeTypeQuery): AxiosPromise<ChargeTypeVO[]> => {
|
||||||
|
return request({
|
||||||
|
url: '/chargeType/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询收费类型详细
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
export const getChargeType = (id: string | number): AxiosPromise<ChargeTypeVO> => {
|
||||||
|
return request({
|
||||||
|
url: '/chargeType/' + id,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增收费类型
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
export const addChargeType = (data: ChargeTypeForm) => {
|
||||||
|
return request({
|
||||||
|
url: '/chargeType',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改收费类型
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
export const updateChargeType = (data: ChargeTypeForm) => {
|
||||||
|
return request({
|
||||||
|
url: '/chargeType',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除收费类型
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
export const delChargeType = (id: string | number | Array<string | number>) => {
|
||||||
|
return request({
|
||||||
|
url: '/chargeType/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
});
|
||||||
|
};
|
||||||
66
src/api/system/ChargeType/type.ts
Normal file
66
src/api/system/ChargeType/type.ts
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
export interface ChargeTypeVO {
|
||||||
|
/**
|
||||||
|
* 收费类型表id
|
||||||
|
*/
|
||||||
|
id: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收费类型名称
|
||||||
|
*/
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 0启用 1停用
|
||||||
|
*/
|
||||||
|
status: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ChargeTypeForm extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 收费类型表id
|
||||||
|
*/
|
||||||
|
id?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收费类型名称
|
||||||
|
*/
|
||||||
|
name?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 0启用 1停用
|
||||||
|
*/
|
||||||
|
status?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ChargeTypeQuery {
|
||||||
|
/**
|
||||||
|
* 收费类型名称
|
||||||
|
*/
|
||||||
|
name?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 0启用 1停用
|
||||||
|
*/
|
||||||
|
status?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日期范围参数
|
||||||
|
*/
|
||||||
|
params?: any;
|
||||||
|
}
|
||||||
|
export interface ChargeType2Query extends PageQuery {
|
||||||
|
/**
|
||||||
|
* 收费类型名称
|
||||||
|
*/
|
||||||
|
name?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 0启用 1停用
|
||||||
|
*/
|
||||||
|
status?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日期范围参数
|
||||||
|
*/
|
||||||
|
params?: any;
|
||||||
|
}
|
||||||
@@ -8,6 +8,10 @@ export interface ChargeItemVO {
|
|||||||
* 项目名称
|
* 项目名称
|
||||||
*/
|
*/
|
||||||
name: string;
|
name: string;
|
||||||
|
/**
|
||||||
|
* 收费类型
|
||||||
|
*/
|
||||||
|
typeId: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计费方式 0单次收费 1周期收费 2仪表收费
|
* 计费方式 0单次收费 1周期收费 2仪表收费
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export interface BuildingVo {
|
|||||||
/**
|
/**
|
||||||
* 0住宅 1办公 2商用 3公寓
|
* 0住宅 1办公 2商用 3公寓
|
||||||
*/
|
*/
|
||||||
buildingUse: number;
|
buildingUse: string;
|
||||||
/**
|
/**
|
||||||
* 楼栋结构
|
* 楼栋结构
|
||||||
*/
|
*/
|
||||||
@@ -68,7 +68,7 @@ export interface HouseType {
|
|||||||
|
|
||||||
export interface addBuildingType {
|
export interface addBuildingType {
|
||||||
buildingName: string;
|
buildingName: string;
|
||||||
villageId: number;
|
villageId?: number;
|
||||||
buildStructure?: string;
|
buildStructure?: string;
|
||||||
buildTall?: string;
|
buildTall?: string;
|
||||||
buildToward?: string;
|
buildToward?: string;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ export interface ResidentVO {
|
|||||||
* 主键 住户管理id
|
* 主键 住户管理id
|
||||||
*/
|
*/
|
||||||
userId: string | number;
|
userId: string | number;
|
||||||
|
id: string;
|
||||||
/**
|
/**
|
||||||
* 住户编号
|
* 住户编号
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -19,57 +19,41 @@ const permissionStore = usePermissionStore();
|
|||||||
const levelList = ref<RouteLocationMatched[]>([]);
|
const levelList = ref<RouteLocationMatched[]>([]);
|
||||||
|
|
||||||
const getBreadcrumb = () => {
|
const getBreadcrumb = () => {
|
||||||
// only show routes with meta.title
|
// 1. 先获取原生的 matched
|
||||||
let matched = [];
|
let matched = route.matched.filter((item) => item.meta && item.meta.title);
|
||||||
const pathNum = findPathNum(route.path);
|
|
||||||
// multi-level menu
|
// 🔥 关键:如果当前路由有 parentTitle,手动插入虚拟父级
|
||||||
if (pathNum > 2) {
|
if (route.meta?.parentTitle) {
|
||||||
const reg = /\/\w+/gi;
|
// 找到倒数第二个路由(通常是二级列表页)
|
||||||
const pathList = route.path.match(reg).map((item, index) => {
|
const lastIndex = matched.length - 1;
|
||||||
if (index !== 0) item = item.slice(1);
|
if (lastIndex >= 0) {
|
||||||
return item;
|
// 创建虚拟父级路由对象
|
||||||
});
|
const virtualParent = {
|
||||||
getMatched(pathList, permissionStore.defaultRoutes, matched);
|
path: matched[lastIndex].path,
|
||||||
} else {
|
meta: { title: route.meta.parentTitle }
|
||||||
matched = route.matched.filter((item) => item.meta && item.meta.title);
|
};
|
||||||
|
|
||||||
|
// 插入到倒数第二个位置
|
||||||
|
matched = [...matched.slice(0, lastIndex), virtualParent, matched[lastIndex]];
|
||||||
}
|
}
|
||||||
// 判断是否为首页
|
|
||||||
if (!isDashboard(matched[0])) {
|
|
||||||
matched = [{ path: '/index', meta: { title: '首页' } }].concat(matched);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 2. 过滤掉设置了 breadcrumb: false 的路由
|
||||||
levelList.value = matched.filter((item) => item.meta && item.meta.title && item.meta.breadcrumb !== false);
|
levelList.value = matched.filter((item) => item.meta && item.meta.title && item.meta.breadcrumb !== false);
|
||||||
|
|
||||||
|
console.log('最终面包屑:', levelList.value);
|
||||||
};
|
};
|
||||||
const findPathNum = (str, char = '/') => {
|
|
||||||
if (typeof str !== 'string' || str.length === 0) return 0;
|
|
||||||
return str.split(char).length - 1;
|
|
||||||
};
|
|
||||||
const getMatched = (pathList, routeList, matched) => {
|
|
||||||
const data = routeList.find((item) => item.path == pathList[0] || (item.name += '').toLowerCase() == pathList[0]);
|
|
||||||
if (data) {
|
|
||||||
matched.push(data);
|
|
||||||
if (data.children && pathList.length) {
|
|
||||||
pathList.shift();
|
|
||||||
getMatched(pathList, data.children, matched);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const isDashboard = (route: RouteLocationMatched) => {
|
|
||||||
const name = route && (route.name as string);
|
|
||||||
if (!name) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return name.trim() === 'Index';
|
|
||||||
};
|
|
||||||
const handleLink = (item) => {
|
const handleLink = (item) => {
|
||||||
const { redirect, path } = item;
|
const { redirect, path } = item;
|
||||||
redirect ? router.push(redirect) : router.push(path);
|
redirect ? router.push(redirect) : router.push(path);
|
||||||
};
|
};
|
||||||
|
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
// if you go to the redirect page, do not update the breadcrumbs
|
|
||||||
if (route.path.startsWith('/redirect/')) return;
|
if (route.path.startsWith('/redirect/')) return;
|
||||||
getBreadcrumb();
|
getBreadcrumb();
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getBreadcrumb();
|
getBreadcrumb();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -26,14 +26,6 @@ const isWhiteList = (path: string) => {
|
|||||||
router.beforeEach(async (to, from) => {
|
router.beforeEach(async (to, from) => {
|
||||||
NProgress.start();
|
NProgress.start();
|
||||||
|
|
||||||
// ==============================================
|
|
||||||
// 🚥 调试日志:每次跳转都打印(方便看你跳去了哪)
|
|
||||||
// ==============================================
|
|
||||||
console.log('==========================================================');
|
|
||||||
console.log('🔀 路由跳转:', from.path, ' → ', to.path);
|
|
||||||
console.log('🔐 是否有Token:', !!getToken());
|
|
||||||
console.log('🚦 动态路由是否已加载:', isDynamicRoutesAdded);
|
|
||||||
|
|
||||||
const hasToken = getToken();
|
const hasToken = getToken();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const permissionStore = usePermissionStore();
|
const permissionStore = usePermissionStore();
|
||||||
@@ -44,29 +36,16 @@ router.beforeEach(async (to, from) => {
|
|||||||
|
|
||||||
// 已登录 且 去登录页 → 跳首页
|
// 已登录 且 去登录页 → 跳首页
|
||||||
if (to.path === '/login') {
|
if (to.path === '/login') {
|
||||||
console.log('✅ 已登录,访问登录页,直接跳首页');
|
|
||||||
NProgress.done();
|
NProgress.done();
|
||||||
return '/';
|
return '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
// 白名单页面直接放行
|
// 白名单页面直接放行
|
||||||
if (isWhiteList(to.path)) {
|
if (isWhiteList(to.path)) {
|
||||||
console.log('✅ 白名单页面,直接放行');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ==============================================
|
|
||||||
// ✅ 【关键】只在【没有角色 + 没有加载过路由】时执行一次
|
|
||||||
// ==============================================
|
|
||||||
console.log('👤 当前用户角色:', userStore.roles);
|
|
||||||
console.log('🧪 判断条件:roles.length === 0 && !isDynamicRoutesAdded');
|
|
||||||
console.log('🧪 结果:', userStore.roles.length === 0 && !isDynamicRoutesAdded);
|
|
||||||
|
|
||||||
if (userStore.roles.length === 0 && !isDynamicRoutesAdded) {
|
if (userStore.roles.length === 0 && !isDynamicRoutesAdded) {
|
||||||
console.log('==========================================================');
|
|
||||||
console.log('🚀 【首次初始化】获取用户信息 + 生成动态路由(只执行一次)');
|
|
||||||
console.log('==========================================================');
|
|
||||||
|
|
||||||
isRelogin.show = true;
|
isRelogin.show = true;
|
||||||
|
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
@@ -79,12 +58,10 @@ router.beforeEach(async (to, from) => {
|
|||||||
return '/';
|
return '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('✅ 用户信息获取成功:', res);
|
|
||||||
isRelogin.show = false;
|
isRelogin.show = false;
|
||||||
|
|
||||||
// 生成动态路由
|
// 生成动态路由
|
||||||
const accessRoutes = await permissionStore.generateRoutes();
|
const accessRoutes = await permissionStore.generateRoutes();
|
||||||
console.log('✅ 动态路由生成成功,数量:', accessRoutes.length);
|
|
||||||
|
|
||||||
// 添加路由(避免重复添加)
|
// 添加路由(避免重复添加)
|
||||||
accessRoutes.forEach((route) => {
|
accessRoutes.forEach((route) => {
|
||||||
@@ -95,7 +72,6 @@ router.beforeEach(async (to, from) => {
|
|||||||
|
|
||||||
// ✅ 标记:路由已添加
|
// ✅ 标记:路由已添加
|
||||||
isDynamicRoutesAdded = true;
|
isDynamicRoutesAdded = true;
|
||||||
console.log('✅ 动态路由添加完成,标记 isDynamicRoutesAdded = true');
|
|
||||||
|
|
||||||
// 管理员登录强制跳转
|
// 管理员登录强制跳转
|
||||||
if (res.user.userId === 1 && from.path === '/login') {
|
if (res.user.userId === 1 && from.path === '/login') {
|
||||||
|
|||||||
@@ -9,9 +9,46 @@ import ParentView from '@/components/ParentView/index.vue';
|
|||||||
import InnerLink from '@/layout/components/InnerLink/index.vue';
|
import InnerLink from '@/layout/components/InnerLink/index.vue';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { createCustomNameComponent } from '@/utils/createCustomNameComponent';
|
import { createCustomNameComponent } from '@/utils/createCustomNameComponent';
|
||||||
|
import { ElNotification } from 'element-plus'; // 确保引入了这个
|
||||||
|
|
||||||
// 匹配views里面所有的.vue文件
|
// 匹配views里面所有的.vue文件
|
||||||
const modules = import.meta.glob('./../../views/**/*.vue');
|
const modules = import.meta.glob('./../../views/**/*.vue');
|
||||||
|
|
||||||
|
const transformRoutes = (backendRoutes: any[]): any[] => {
|
||||||
|
// 1. 深拷贝
|
||||||
|
const processedRoutes = JSON.parse(JSON.stringify(backendRoutes));
|
||||||
|
|
||||||
|
// 2. 创建2级路由映射表(key: activeMenu, value: 标题)
|
||||||
|
const level2TitleMap = new Map();
|
||||||
|
|
||||||
|
processedRoutes.forEach((level1Route: any) => {
|
||||||
|
if (!level1Route.children) return;
|
||||||
|
|
||||||
|
level1Route.children.forEach((level2Route: any) => {
|
||||||
|
if (!level2Route.hidden) {
|
||||||
|
const fullPath = level1Route.path.endsWith('/') ? `${level1Route.path}${level2Route.path}` : `${level1Route.path}/${level2Route.path}`;
|
||||||
|
level2TitleMap.set(fullPath, level2Route.meta?.title);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// 3. 给三级路由的 meta 加 parentTitle(不做嵌套,保持扁平)
|
||||||
|
processedRoutes.forEach((level1Route: any) => {
|
||||||
|
if (!level1Route.children) return;
|
||||||
|
|
||||||
|
level1Route.children.forEach((route: any) => {
|
||||||
|
if (route.hidden && route.meta?.activeMenu) {
|
||||||
|
const parentTitle = level2TitleMap.get(route.meta.activeMenu);
|
||||||
|
if (parentTitle) {
|
||||||
|
// 🔥 关键:只加 parentTitle,不修改 children
|
||||||
|
route.meta.parentTitle = parentTitle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
return processedRoutes;
|
||||||
|
};
|
||||||
export const usePermissionStore = defineStore('permission', () => {
|
export const usePermissionStore = defineStore('permission', () => {
|
||||||
const routes = ref<RouteRecordRaw[]>([]);
|
const routes = ref<RouteRecordRaw[]>([]);
|
||||||
const addRoutes = ref<RouteRecordRaw[]>([]);
|
const addRoutes = ref<RouteRecordRaw[]>([]);
|
||||||
@@ -45,16 +82,31 @@ export const usePermissionStore = defineStore('permission', () => {
|
|||||||
const setSidebarRouters = (routes: RouteRecordRaw[]): void => {
|
const setSidebarRouters = (routes: RouteRecordRaw[]): void => {
|
||||||
sidebarRouters.value = routes;
|
sidebarRouters.value = routes;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// --------------------------
|
||||||
|
// 修改:generateRoutes 函数,加入转换逻辑
|
||||||
|
// --------------------------
|
||||||
const generateRoutes = async (): Promise<RouteRecordRaw[]> => {
|
const generateRoutes = async (): Promise<RouteRecordRaw[]> => {
|
||||||
const res = await getRouters();
|
const res = await getRouters();
|
||||||
const { data } = res;
|
const { data } = res;
|
||||||
const sdata = JSON.parse(JSON.stringify(data));
|
console.log('后端原始路由:', data);
|
||||||
const rdata = JSON.parse(JSON.stringify(data));
|
|
||||||
const defaultData = JSON.parse(JSON.stringify(data));
|
// 🔥 关键:先把后端扁平路由转成嵌套格式
|
||||||
|
const nestedData = transformRoutes(data);
|
||||||
|
console.log('转换后的嵌套路由:', nestedData);
|
||||||
|
|
||||||
|
// 深拷贝数据(保留原有逻辑)
|
||||||
|
const sdata = JSON.parse(JSON.stringify(nestedData));
|
||||||
|
const rdata = JSON.parse(JSON.stringify(nestedData));
|
||||||
|
const defaultData = JSON.parse(JSON.stringify(nestedData));
|
||||||
|
|
||||||
|
// 后续使用转换后的 nestedData
|
||||||
const sidebarRoutes = filterAsyncRouter(sdata);
|
const sidebarRoutes = filterAsyncRouter(sdata);
|
||||||
const rewriteRoutes = filterAsyncRouter(rdata, undefined, true);
|
const rewriteRoutes = filterAsyncRouter(rdata, undefined, true);
|
||||||
const defaultRoutes = filterAsyncRouter(defaultData);
|
const defaultRoutes = filterAsyncRouter(defaultData);
|
||||||
|
|
||||||
const asyncRoutes = filterDynamicRoutes(dynamicRoutes);
|
const asyncRoutes = filterDynamicRoutes(dynamicRoutes);
|
||||||
|
|
||||||
asyncRoutes.forEach((route) => {
|
asyncRoutes.forEach((route) => {
|
||||||
router.addRoute(route);
|
router.addRoute(route);
|
||||||
});
|
});
|
||||||
@@ -191,7 +243,7 @@ function duplicateRouteChecker(localRoutes: Route[], routes: Route[]) {
|
|||||||
|
|
||||||
const nameList: string[] = [];
|
const nameList: string[] = [];
|
||||||
allRoutes.forEach((route) => {
|
allRoutes.forEach((route) => {
|
||||||
const name = route.name.toString();
|
const name = route.name?.toString();
|
||||||
if (name && nameList.includes(name)) {
|
if (name && nameList.includes(name)) {
|
||||||
const message = `路由名称: [${name}] 重复, 会造成 404`;
|
const message = `路由名称: [${name}] 重复, 会造成 404`;
|
||||||
console.error(message);
|
console.error(message);
|
||||||
@@ -202,6 +254,8 @@ function duplicateRouteChecker(localRoutes: Route[], routes: Route[]) {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
nameList.push(route.name.toString());
|
if (name) {
|
||||||
|
nameList.push(name);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-2">
|
<div class="p-2">
|
||||||
|
<pageheader></pageheader>
|
||||||
|
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-2">
|
<div class="p-2">
|
||||||
|
<pageheader></pageheader>
|
||||||
|
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: ActivityVO) => {
|
const handleUpdate = async (row?: ActivityVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/repair/addActivity',
|
path: '/repair/editActivity',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="ResidentMainBox p-2 w-full">
|
<div class="ResidentMainBox p-2 w-full">
|
||||||
<PageHeader title="装修编辑"></PageHeader>
|
<PageHeader></PageHeader>
|
||||||
<div class="ResidentMainBody">
|
<div class="ResidentMainBody">
|
||||||
<el-card>
|
<el-card>
|
||||||
<template #header>
|
<template #header>
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: DecorationVO) => {
|
const handleUpdate = async (row?: DecorationVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/repair/addDecoration',
|
path: '/repair/editDecoration',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: HandleLogVO) => {
|
const handleUpdate = async (row?: HandleLogVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/repair/addHandleLog',
|
path: '/repair/editHandleLog',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="h-full flex flex-col p-2">
|
<div class="h-full flex flex-col p-2">
|
||||||
|
<pageheader></pageheader>
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ const handleUpdate = async (row?: MonthCardVO) => {
|
|||||||
reset();
|
reset();
|
||||||
const _id = row?.id || ids.value[0];
|
const _id = row?.id || ids.value[0];
|
||||||
router.push({
|
router.push({
|
||||||
path: '/carArea/addMonthCard',
|
path: '/carArea/editMonthCard',
|
||||||
query: {
|
query: {
|
||||||
id: _id
|
id: _id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: NoticeVO) => {
|
const handleUpdate = async (row?: NoticeVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/repair/addNoticePc',
|
path: '/repair/editNoticePc',
|
||||||
query: {
|
query: {
|
||||||
id: row.noticeId
|
id: row.noticeId
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,14 +193,14 @@ const handleSelectionChange = (selection: ParkingCostVO[]) => {
|
|||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/carArea/addparkingcost'
|
path: '/carArea/addParkingCost'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: ParkingCostVO) => {
|
const handleUpdate = async (row?: ParkingCostVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/carArea/addparkingcost',
|
path: '/carArea/editParkingCost',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: QuestionnaireVO) => {
|
const handleUpdate = async (row?: QuestionnaireVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/repair/addQuestionnaire',
|
path: '/repair/editQuestionnaire',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: RepairVO) => {
|
const handleUpdate = async (row?: RepairVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/repair/addRepair',
|
path: '/repair/editRepair',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ function backRouter() {
|
|||||||
|
|
||||||
function handleEdit() {
|
function handleEdit() {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/repair/addRepair',
|
path: '/repair/editRepair',
|
||||||
query: {
|
query: {
|
||||||
id: form.value.id
|
id: form.value.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: RepairProjectVO) => {
|
const handleUpdate = async (row?: RepairProjectVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/system/addRepairProjectList',
|
path: '/system/editRepairProjectList',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,11 @@
|
|||||||
<el-form-item label="项目名称" prop="itemName">
|
<el-form-item label="项目名称" prop="itemName">
|
||||||
<el-input v-model.trim="form.itemName" placeholder="请输入项目名称" />
|
<el-input v-model.trim="form.itemName" placeholder="请输入项目名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="收费项目" prop="typeId">
|
||||||
|
<el-select v-model="form.typeId">
|
||||||
|
<el-option v-for="(item, index) in chargeitemlist" :key="index" :value="item.id" :label="item.name"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="计费方式" prop="billingType">
|
<el-form-item label="计费方式" prop="billingType">
|
||||||
<el-radio-group v-model="form.billingType">
|
<el-radio-group v-model="form.billingType">
|
||||||
<el-radio v-for="(item, index) in com_charge_item_method" :key="index" :value="item.value" :label="item.label"></el-radio>
|
<el-radio v-for="(item, index) in com_charge_item_method" :key="index" :value="item.value" :label="item.label"></el-radio>
|
||||||
@@ -60,6 +65,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import PageHeader from '@/components/Pageheader/index.vue';
|
import PageHeader from '@/components/Pageheader/index.vue';
|
||||||
import { getChargeItem, updateChargeItem, addChargeItem } from '@/api/system/SdbChargeItem';
|
import { getChargeItem, updateChargeItem, addChargeItem } from '@/api/system/SdbChargeItem';
|
||||||
|
import { listChargeType } from '@/api/system/ChargeType';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_charge_item_unit } = toRefs<any>(proxy?.useDict('com_charge_item_unit'));
|
const { com_charge_item_unit } = toRefs<any>(proxy?.useDict('com_charge_item_unit'));
|
||||||
@@ -74,6 +80,7 @@ const route = useRoute();
|
|||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const form = ref({
|
const form = ref({
|
||||||
'id': null,
|
'id': null,
|
||||||
|
'typeId': '',
|
||||||
'itemName': '',
|
'itemName': '',
|
||||||
'billingType': '0',
|
'billingType': '0',
|
||||||
'fixedPrice': null,
|
'fixedPrice': null,
|
||||||
@@ -86,6 +93,7 @@ const form = ref({
|
|||||||
});
|
});
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
itemName: [{ required: true, message: '请输入 项目名称', trigger: 'blur' }],
|
itemName: [{ required: true, message: '请输入 项目名称', trigger: 'blur' }],
|
||||||
|
typeId: [{ required: true, message: '请选择 收费类型', trigger: 'blur' }],
|
||||||
billingType: [{ required: true, message: '请输入 计费方式', trigger: 'blur' }],
|
billingType: [{ required: true, message: '请输入 计费方式', trigger: 'blur' }],
|
||||||
fixedPrice: [{ required: true, message: '请输入 费用单价', trigger: 'blur' }],
|
fixedPrice: [{ required: true, message: '请输入 费用单价', trigger: 'blur' }],
|
||||||
formula: [{ required: true, message: '请选择 计费公式', trigger: 'blur' }],
|
formula: [{ required: true, message: '请选择 计费公式', trigger: 'blur' }],
|
||||||
@@ -94,8 +102,13 @@ const rules = ref({
|
|||||||
carryMethod: [{ required: true, message: '请选择 进位方式', trigger: 'blur' }]
|
carryMethod: [{ required: true, message: '请选择 进位方式', trigger: 'blur' }]
|
||||||
});
|
});
|
||||||
const userid = ref(null);
|
const userid = ref(null);
|
||||||
|
const chargeitemlist = ref([]);
|
||||||
|
listChargeType().then((res) => {
|
||||||
|
chargeitemlist.value = res.rows;
|
||||||
|
});
|
||||||
if (route.query.id) {
|
if (route.query.id) {
|
||||||
userid.value = route.query.id;
|
userid.value = route.query.id;
|
||||||
|
|
||||||
getChargeItem(userid.value).then((res) => {
|
getChargeItem(userid.value).then((res) => {
|
||||||
form.value = {
|
form.value = {
|
||||||
...form.value,
|
...form.value,
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: ChargeItemVO) => {
|
const handleUpdate = async (row?: ChargeItemVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/sdb/addchargeItem',
|
path: '/sdb/editchargeItem',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
239
src/views/system/Sdb/ChargeType/index.vue
Normal file
239
src/views/system/Sdb/ChargeType/index.vue
Normal file
@@ -0,0 +1,239 @@
|
|||||||
|
<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" label-width="120" :inline="true">
|
||||||
|
<el-form-item label="收费类型名称" prop="name">
|
||||||
|
<el-input v-model="queryParams.name" placeholder="请输入收费类型名称" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
|
||||||
|
<el-card class="flex-1" shadow="never">
|
||||||
|
<template #header>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['chargeType:chargeType:add']">新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['chargeType:chargeType:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['chargeType:chargeType:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" border :data="chargeTypeList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="收费类型名称" align="center" prop="name" />
|
||||||
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-switch
|
||||||
|
@change="(val: string) => handleChange(val, scope.row)"
|
||||||
|
v-model="scope.row.status"
|
||||||
|
active-text="启用"
|
||||||
|
active-value="0"
|
||||||
|
inactive-text="停用"
|
||||||
|
inactive-value="1"
|
||||||
|
></el-switch>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tooltip content="修改" placement="top">
|
||||||
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['chargeType:chargeType:edit']"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="删除" placement="top">
|
||||||
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['chargeType:chargeType:remove']"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
</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="chargeTypeFormRef" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<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 name="ChargeType" lang="ts">
|
||||||
|
import { listChargeType, getChargeType, delChargeType, addChargeType, updateChargeType } from '@/api/system/ChargeType';
|
||||||
|
import { ChargeTypeVO, ChargeTypeQuery, ChargeTypeForm, ChargeType2Query } from '@/api/system/ChargeType/type';
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
|
const chargeTypeList = ref<ChargeTypeVO[]>([]);
|
||||||
|
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 chargeTypeFormRef = ref<ElFormInstance>();
|
||||||
|
|
||||||
|
const dialog = reactive<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
const initFormData: ChargeTypeForm = {
|
||||||
|
id: undefined,
|
||||||
|
name: undefined,
|
||||||
|
status: undefined
|
||||||
|
};
|
||||||
|
const data = reactive<PageData<ChargeTypeForm, ChargeType2Query>>({
|
||||||
|
form: { ...initFormData },
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
name: undefined,
|
||||||
|
status: undefined,
|
||||||
|
params: {}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
|
const handleChange = (val: string, row: ChargeTypeVO) => {
|
||||||
|
updateChargeType({
|
||||||
|
id: row.id,
|
||||||
|
status: val
|
||||||
|
}).then(() => {
|
||||||
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/** 查询收费类型列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
const res = await listChargeType(queryParams.value);
|
||||||
|
chargeTypeList.value = res.rows;
|
||||||
|
total.value = res.total;
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 取消按钮 */
|
||||||
|
const cancel = () => {
|
||||||
|
reset();
|
||||||
|
dialog.visible = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 表单重置 */
|
||||||
|
const reset = () => {
|
||||||
|
form.value = { ...initFormData };
|
||||||
|
chargeTypeFormRef.value?.resetFields();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryFormRef.value?.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 多选框选中数据 */
|
||||||
|
const handleSelectionChange = (selection: ChargeTypeVO[]) => {
|
||||||
|
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?: ChargeTypeVO) => {
|
||||||
|
reset();
|
||||||
|
const _id = row?.id || ids.value[0];
|
||||||
|
const res = await getChargeType(_id);
|
||||||
|
Object.assign(form.value, res.data);
|
||||||
|
dialog.visible = true;
|
||||||
|
dialog.title = '修改收费类型';
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
const submitForm = () => {
|
||||||
|
chargeTypeFormRef.value?.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
buttonLoading.value = true;
|
||||||
|
if (form.value.id) {
|
||||||
|
await updateChargeType(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
} else {
|
||||||
|
await addChargeType(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
}
|
||||||
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
dialog.visible = false;
|
||||||
|
await getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
const handleDelete = async (row?: ChargeTypeVO) => {
|
||||||
|
const _ids = row?.id || ids.value;
|
||||||
|
await proxy?.$modal.confirm('是否确认删除收费类型编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||||
|
await delChargeType(_ids);
|
||||||
|
proxy?.$modal.msgSuccess('删除成功');
|
||||||
|
await getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
const handleExport = () => {
|
||||||
|
proxy?.download(
|
||||||
|
'chargeType/chargeType/export',
|
||||||
|
{
|
||||||
|
...queryParams.value
|
||||||
|
},
|
||||||
|
`chargeType_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.el-table {
|
||||||
|
height: calc(100% - 80px);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -162,7 +162,7 @@ const handleAdd = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 详情按钮操作 */
|
||||||
const handleMain = async (row?: PayRecordVO) => {
|
const handleMain = async (row?: PayRecordVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/sdb/PayRecordMain',
|
path: '/sdb/PayRecordMain',
|
||||||
|
|||||||
@@ -29,7 +29,6 @@
|
|||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleMain" v-hasPermi="['system:bill:add']">详情</el-button>
|
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:bill:add']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:bill:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -53,7 +52,7 @@
|
|||||||
<dict-tag :options="com_questionnaire_scope" :value="scope.row.chargeScope"></dict-tag>
|
<dict-tag :options="com_questionnaire_scope" :value="scope.row.chargeScope"></dict-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="收费项目" align="center" prop="chargeItemId" />
|
<el-table-column label="收费项目" align="center" prop="chargeItemName" />
|
||||||
<el-table-column label="收费周期" align="center" prop="chargePeriod">
|
<el-table-column label="收费周期" align="center" prop="chargePeriod">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="com_bill_charge_period" :value="scope.row.chargePeriod"></dict-tag>
|
<dict-tag :options="com_bill_charge_period" :value="scope.row.chargePeriod"></dict-tag>
|
||||||
@@ -71,11 +70,11 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="单价" align="center" prop="endDate" width="180">
|
<el-table-column label="单价" align="center" prop="endDate" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</span>
|
<span>{{ scope.row.fixedPrice }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量" align="center" prop="chargePeriod" />
|
<!-- <el-table-column label="数量" align="center" prop="chargePeriod" />
|
||||||
<el-table-column label="费用合计" align="center" prop="chargePeriod" />
|
<el-table-column label="费用合计" align="center" prop="chargePeriod" /> -->
|
||||||
<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">
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:bill:edit']">修改</el-button>
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:bill:edit']">修改</el-button>
|
||||||
@@ -159,18 +158,6 @@ const getList = async () => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 取消按钮 */
|
|
||||||
const cancel = () => {
|
|
||||||
reset();
|
|
||||||
dialog.visible = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 表单重置 */
|
|
||||||
const reset = () => {
|
|
||||||
form.value = { ...initFormData };
|
|
||||||
billFormRef.value?.resetFields();
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
queryParams.value.pageNum = 1;
|
queryParams.value.pageNum = 1;
|
||||||
@@ -201,27 +188,10 @@ const handleAdd = () => {
|
|||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: BillVO) => {
|
const handleUpdate = async (row?: BillVO) => {
|
||||||
reset();
|
router.push({
|
||||||
const _id = row?.id || ids.value[0];
|
path: '/sdb/editSdbbill',
|
||||||
const res = await getBill(_id);
|
query: {
|
||||||
Object.assign(form.value, res.data);
|
id: row.id
|
||||||
dialog.visible = true;
|
|
||||||
dialog.title = '修改账单管理';
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 提交按钮 */
|
|
||||||
const submitForm = () => {
|
|
||||||
billFormRef.value?.validate(async (valid: boolean) => {
|
|
||||||
if (valid) {
|
|
||||||
buttonLoading.value = true;
|
|
||||||
if (form.value.id) {
|
|
||||||
await updateBill(form.value).finally(() => (buttonLoading.value = false));
|
|
||||||
} else {
|
|
||||||
await addBill(form.value).finally(() => (buttonLoading.value = false));
|
|
||||||
}
|
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
|
||||||
dialog.visible = false;
|
|
||||||
await getList();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -244,17 +214,6 @@ const handleDelete = async (row?: BillVO) => {
|
|||||||
await getList();
|
await getList();
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
const handleExport = () => {
|
|
||||||
proxy?.download(
|
|
||||||
'system/bill/export',
|
|
||||||
{
|
|
||||||
...queryParams.value
|
|
||||||
},
|
|
||||||
`bill_${new Date().getTime()}.xlsx`
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ import { ref } from 'vue';
|
|||||||
import cashier from './cashier.vue';
|
import cashier from './cashier.vue';
|
||||||
import history from './history.vue';
|
import history from './history.vue';
|
||||||
|
|
||||||
const isSearch = ref(false);
|
const isSearch = ref(true);
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_cashier_type } = toRefs<any>(proxy?.useDict('com_cashier_type'));
|
const { com_cashier_type } = toRefs<any>(proxy?.useDict('com_cashier_type'));
|
||||||
const searchform = ref({
|
const searchform = ref({
|
||||||
|
|||||||
@@ -508,7 +508,7 @@ const router = useRouter();
|
|||||||
const handleRecode = (row: ElectricityDeviceVO) => {
|
const handleRecode = (row: ElectricityDeviceVO) => {
|
||||||
// 1.电表 2.电表
|
// 1.电表 2.电表
|
||||||
router.push({
|
router.push({
|
||||||
path: '/equipment/TopupRecord2',
|
path: '/equipment/electricityTopupRecord',
|
||||||
query: {
|
query: {
|
||||||
type: '2',
|
type: '2',
|
||||||
houseName: row.houseName,
|
houseName: row.houseName,
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
<el-card class="flex-1 mt-10px" shadow="never">
|
<el-card class="flex-1 mt-10px" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" style="font-size: 0.8rem">
|
<el-row :gutter="10" style="font-size: 0.8rem">
|
||||||
<el-col :span="3"> 设备号: {{ routeid }} </el-col>
|
<el-col :span="4"> 设备号: {{ routeid }} </el-col>
|
||||||
<el-col :span="3"> 房间号: {{ housename }} </el-col>
|
<el-col :span="4"> 房间号: {{ housename }} </el-col>
|
||||||
<el-col :span="17"></el-col>
|
<el-col :span="14"></el-col>
|
||||||
<el-col :span="1">
|
<el-col :span="2">
|
||||||
<el-button @click="confinem">返回</el-button>
|
<el-button @click="confinem">返回</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
></el-switch>
|
></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" width="250" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24" class="flex flex-items-center">
|
<el-col :span="24" class="flex flex-items-center">
|
||||||
@@ -494,7 +494,7 @@ const router = useRouter();
|
|||||||
const handleRecode = (row: WaterDeviceVO) => {
|
const handleRecode = (row: WaterDeviceVO) => {
|
||||||
// 1.电表 2.水表
|
// 1.电表 2.水表
|
||||||
router.push({
|
router.push({
|
||||||
path: '/equipment/TopupRecord',
|
path: '/equipment/waterTopupRecord',
|
||||||
query: {
|
query: {
|
||||||
type: '2',
|
type: '2',
|
||||||
id: row.id,
|
id: row.id,
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: AreaVO) => {
|
const handleUpdate = async (row?: AreaVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/carArea/addCarArea',
|
path: '/carArea/editCarArea',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: CarVO) => {
|
const handleUpdate = async (row?: CarVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/carArea/addCars',
|
path: '/carArea/editCars',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-2">
|
<div class="p-2">
|
||||||
|
<pageheader></pageheader>
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="search">
|
<div v-show="showSearch" class="search">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="85px">
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="85px">
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-2 dict-page">
|
<div class="p-2 dict-page">
|
||||||
|
<pageheader></pageheader>
|
||||||
<el-row :gutter="16" class="dict-grid">
|
<el-row :gutter="16" class="dict-grid">
|
||||||
<!-- 字典类型 -->
|
<!-- 字典类型 -->
|
||||||
<el-col :xs="24" :lg="12">
|
<el-col :xs="24" :lg="12">
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: DeviceVO) => {
|
const handleUpdate = async (row?: DeviceVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/equipment/addArchive',
|
path: '/equipment/editArchive',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ const handleMain = (row) => {
|
|||||||
};
|
};
|
||||||
const handleEdit = (row) => {
|
const handleEdit = (row) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/equipment/addEquipmentRepair',
|
path: '/equipment/editEquipmentRepair',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: DeviceRepairVO) => {
|
const handleUpdate = async (row?: DeviceRepairVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/equipment/addEquipmentRepair',
|
path: '/equipment/editEquipmentRepair',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,9 +131,7 @@ const cancelForm = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function goBack() {
|
function goBack() {
|
||||||
router.push({
|
router.back();
|
||||||
path: '/house/houselist'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ const handleAddBuilding = () => {
|
|||||||
};
|
};
|
||||||
const editBuilding = (id: number) => {
|
const editBuilding = (id: number) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/house/addbuilding',
|
path: '/house/editbuilding',
|
||||||
query: {
|
query: {
|
||||||
buildingId: id
|
buildingId: id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="house-list">
|
<div class="house-list">
|
||||||
<div class="house flex align-center" @contextmenu="contextMenu.open($event, house.houseId)" v-for="house in list.houses" :key="house.houseId">
|
<div class="house flex align-center" @contextmenu="contextMenu.open($event, house.houseId)" v-for="house in list.houses" :key="house.houseId">
|
||||||
|
<div class="flex flex-center">
|
||||||
<el-checkbox :label="house.houseNo" :value="house.houseId" />
|
<el-checkbox :label="house.houseNo" :value="house.houseId" />
|
||||||
|
<div class="calp" @click="handleCalp($event, house.houseId)">···</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 右键菜单组件 -->
|
<!-- 右键菜单组件 -->
|
||||||
<ContextMenu ref="contextMenu" :menu="menuList" @select="handleSelect" />
|
<ContextMenu ref="contextMenu" :menu="menuList" @select="handleSelect" />
|
||||||
@@ -31,6 +34,10 @@ const handleSelect = (data: { type: string; value: string }) => {
|
|||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
contextmenufun: [value: { type: string; value: string }];
|
contextmenufun: [value: { type: string; value: string }];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
const handleCalp = (event: MouseEvent, houseid: string) => {
|
||||||
|
contextMenu.value.open(event, houseid);
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@@ -48,7 +55,6 @@ const emit = defineEmits<{
|
|||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
cursor: pointer;
|
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
padding-top: 3px;
|
padding-top: 3px;
|
||||||
@@ -69,4 +75,19 @@ const emit = defineEmits<{
|
|||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.calp {
|
||||||
|
margin-left: 10px;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 10px;
|
||||||
|
letter-spacing: -3px;
|
||||||
|
transform: rotateZ(90deg) scale(0.8);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ function contextMenuFun(val: { type: string; value: string }) {
|
|||||||
switch (val.type) {
|
switch (val.type) {
|
||||||
case 'edit':
|
case 'edit':
|
||||||
router.push({
|
router.push({
|
||||||
path: '/house/addHouse',
|
path: '/house/editHouse',
|
||||||
query: {
|
query: {
|
||||||
id: val.value
|
id: val.value
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup name="Houselist" lang="ts">
|
<script setup name="Houselist" 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';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="AddBuildingBox">
|
<div class="AddBuildingBox">
|
||||||
<PageHeader :title="userid ? '编辑房屋租赁' : '添加房屋租赁'"></PageHeader>
|
<PageHeader></PageHeader>
|
||||||
<div class="AddBuildingBody">
|
<div class="AddBuildingBody">
|
||||||
<div class="title">基本信息</div>
|
<div class="title">基本信息</div>
|
||||||
<div class="addBuildingFormBody">
|
<div class="addBuildingFormBody">
|
||||||
|
|||||||
@@ -48,8 +48,7 @@
|
|||||||
<div class="descriptionsbox">
|
<div class="descriptionsbox">
|
||||||
<div class="label">房屋设施:</div>
|
<div class="label">房屋设施:</div>
|
||||||
<div class="value">
|
<div class="value">
|
||||||
<DictTag :options="com_house_rental_facilities" :value="HouseInfo.facilities"></DictTag>
|
<span style="margin-right: 10px" v-for="item in HouseInfo.facilitieslist" :key="item">{{ handlefacilities(item) }} </span>
|
||||||
<span v-for="item in HouseInfo.facilitieslist" :key="item">{{ handlefacilities(item.name) }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-row>
|
<el-row>
|
||||||
@@ -138,6 +137,7 @@ async function init() {
|
|||||||
getHouseRental(houseRentalid.value).then((res) => {
|
getHouseRental(houseRentalid.value).then((res) => {
|
||||||
HouseInfo.value = res.data;
|
HouseInfo.value = res.data;
|
||||||
HouseInfo.value.facilitieslist = res.data.facilities.split(',').filter((item) => item);
|
HouseInfo.value.facilitieslist = res.data.facilities.split(',').filter((item) => item);
|
||||||
|
console.log(HouseInfo.value.facilitieslist);
|
||||||
HouseInfo.value.houseImageUrls = HouseInfo.value.houseImageUrl.split(',').filter((item) => item);
|
HouseInfo.value.houseImageUrls = HouseInfo.value.houseImageUrl.split(',').filter((item) => item);
|
||||||
const arr = getHousePathById(treedata.value, HouseInfo.value.houseId, 'label');
|
const arr = getHousePathById(treedata.value, HouseInfo.value.houseId, 'label');
|
||||||
HouseInfo.value.house = arr.join(' - ');
|
HouseInfo.value.house = arr.join(' - ');
|
||||||
@@ -147,11 +147,13 @@ init();
|
|||||||
|
|
||||||
function handlefacilities(id: string) {
|
function handlefacilities(id: string) {
|
||||||
const find = housefacilities.value.find((item) => item.id === id);
|
const find = housefacilities.value.find((item) => item.id === id);
|
||||||
|
console.log(find, id);
|
||||||
|
return find ? find.name : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
function hanlededit() {
|
function hanlededit() {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/house/addhouseRental',
|
path: '/house/edithouseRental',
|
||||||
query: {
|
query: {
|
||||||
id: HouseInfo.value.id
|
id: HouseInfo.value.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: HouseRentalVO) => {
|
const handleUpdate = async (row?: HouseRentalVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/house/addhouseRental',
|
path: '/house/edithouseRental',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: ItemVO) => {
|
const handleUpdate = async (row?: ItemVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/inspection/addItem',
|
path: '/inspection/editItem',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: PlanVO) => {
|
const handleUpdate = async (row?: PlanVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/inspection/addPlan',
|
path: '/inspection/editPlan',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: PointVO) => {
|
const handleUpdate = async (row?: PointVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/inspection/addInspectionPoint',
|
path: '/inspection/editInspectionPoint',
|
||||||
query: {
|
query: {
|
||||||
id: row?.id
|
id: row?.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="p-2 h-full flex flex-col">
|
|
||||||
<Pageheader></Pageheader>
|
|
||||||
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中,敬请期待...</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref } from 'vue';
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
|
||||||
@@ -223,7 +223,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: RouteVO) => {
|
const handleUpdate = async (row?: RouteVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/Inspection/addRoute',
|
path: '/Inspection/editRoute',
|
||||||
query: { id: row?.id }
|
query: { id: row?.id }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: TaskVO) => {
|
const handleUpdate = async (row?: TaskVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/inspection/addTask',
|
path: '/inspection/editTask',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="p-2 h-full flex flex-col">
|
|
||||||
<Pageheader></Pageheader>
|
|
||||||
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中,敬请期待...</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref } from 'vue';
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-2">
|
<div class="p-2">
|
||||||
|
<pageheader></pageheader>
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
@@ -28,7 +29,9 @@
|
|||||||
<el-button v-hasPermi="['system:menu:add']" type="primary" plain icon="Plus" @click="handleAdd()">新增</el-button>
|
<el-button v-hasPermi="['system:menu:add']" type="primary" plain icon="Plus" @click="handleAdd()">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button v-hasPermi="['system:menu:remove']" type="danger" plain icon="Delete" @click="handleCascadeDelete" :loading="deleteLoading">级联删除</el-button>
|
<el-button v-hasPermi="['system:menu:remove']" type="danger" plain icon="Delete" @click="handleCascadeDelete" :loading="deleteLoading"
|
||||||
|
>级联删除</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar v-model:show-search="showSearch" @query-table="getList"></right-toolbar>
|
<right-toolbar v-model:show-search="showSearch" @query-table="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-2">
|
<div class="p-2">
|
||||||
|
<pageheader></pageheader>
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-2">
|
<div class="p-2">
|
||||||
|
<pageheader></pageheader>
|
||||||
|
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-2">
|
<div class="p-2">
|
||||||
|
<pageheader></pageheader>
|
||||||
|
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
|
|||||||
@@ -157,9 +157,7 @@ const submitForm = () => {
|
|||||||
};
|
};
|
||||||
// 推出
|
// 推出
|
||||||
const cancelForm = () => {
|
const cancelForm = () => {
|
||||||
router.push({
|
router.back();
|
||||||
path: '/carArea/parking'
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: ParkingVO) => {
|
const handleUpdate = async (row?: ParkingVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/carArea/addParking',
|
path: '/carArea/editParking',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,9 +158,7 @@ const submitForm = () => {
|
|||||||
};
|
};
|
||||||
// 推出
|
// 推出
|
||||||
const cancelForm = () => {
|
const cancelForm = () => {
|
||||||
router.push({
|
router.back();
|
||||||
path: '/carArea/monthCard'
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="AddBuildingBox">
|
<div class="AddBuildingBox">
|
||||||
<PageHeader :title="userid ? '编辑用户' : '添加用户'"></PageHeader>
|
<PageHeader></PageHeader>
|
||||||
<div class="AddBuildingBody">
|
<div class="AddBuildingBody">
|
||||||
<div class="title">基本信息</div>
|
<div class="title">基本信息</div>
|
||||||
<div class="addBuildingFormBody">
|
<div class="addBuildingFormBody">
|
||||||
@@ -101,7 +101,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import PageHeader from '@/components/Pageheader/index.vue';
|
import PageHeader from '@/components/Pageheader/index.vue';
|
||||||
|
|||||||
@@ -333,7 +333,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: ResidentVO) => {
|
const handleUpdate = async (row?: ResidentVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/house/addResident',
|
path: '/house/editResident',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="h-full flex flex-col p-2">
|
<div class="h-full flex flex-col p-2">
|
||||||
|
<pageheader></pageheader>
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: StoreroomVO) => {
|
const handleUpdate = async (row?: StoreroomVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/house/addStoreRoom',
|
path: '/house/EditStoreRoom',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,11 +23,6 @@
|
|||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:stockOut:add']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:stockOut:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:stockOut:edit']"
|
|
||||||
>修改</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:stockOut:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:stockOut:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
@@ -53,7 +48,6 @@
|
|||||||
<el-table-column label="操作" width="180" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" width="180" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['system:stockOut:edit']">查看清单</el-button>
|
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['system:stockOut:edit']">查看清单</el-button>
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:stockOut:edit']">修改</el-button>
|
|
||||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:stockOut:remove']">删除</el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:stockOut:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -170,15 +164,6 @@ const handleAdd = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
const handleUpdate = async (row?: StockOutVO) => {
|
|
||||||
router.push({
|
|
||||||
path: '/warehouse/stockoutMain',
|
|
||||||
query: {
|
|
||||||
id: row.id
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleMain = async (row?: StockOutVO) => {
|
const handleMain = async (row?: StockOutVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: MaterialVO) => {
|
const handleUpdate = async (row?: MaterialVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/warehouse/addMaterial',
|
path: '/warehouse/editMaterial',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: StockInVO) => {
|
const handleUpdate = async (row?: StockInVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/warehouse/addPurchaseIn',
|
path: '/warehouse/editPurchaseIn',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: SupplierVO) => {
|
const handleUpdate = async (row?: SupplierVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/warehouse/addSupplier',
|
path: '/warehouse/editSupplier',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ const handleAdd = () => {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: WarehouseVO) => {
|
const handleUpdate = async (row?: WarehouseVO) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/warehouse/addWarehouse',
|
path: '/warehouse/editWarehouse',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user