快捷入口开发中
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.0.239:8080'
|
||||||
# 图片基础地址
|
# 图片基础地址
|
||||||
VITE_IMG_URL = 'http://192.168.1.222:8080'
|
VITE_IMG_URL = 'http://192.168.1.222:8080'
|
||||||
|
|
||||||
@@ -27,6 +27,26 @@ VITE_APP_SNAILJOB_ADMIN = 'http://192.168.1.215/snail-job'
|
|||||||
|
|
||||||
VITE_APP_PORT = 5173
|
VITE_APP_PORT = 5173
|
||||||
|
|
||||||
|
# 登录成功跳转地址
|
||||||
|
VITE_LOGIN_BACK_URL = '/equipment/WaterDevice'
|
||||||
|
# 是否展示工作台
|
||||||
|
VITE_APP_SHOW_WORK_PLATFORM = true
|
||||||
|
|
||||||
|
|
||||||
|
# 地图类型 天地图 or 高德地图 天地图 WGS84 高德地图 GCJ02, 高德地图 需要在高德地图官网申请key
|
||||||
|
# 高德地图 GCJ02
|
||||||
|
# 天地图 WGS84
|
||||||
|
VITE_APP_MAP_TYPE = 'GCJ02'
|
||||||
|
|
||||||
|
# 高德地图key 建议放入环境变量中,避免泄露
|
||||||
|
VITE_GCJ02_KEY_GD = '8e302fe1be5f4db62bc734db23dca149'
|
||||||
|
VITE_GCJ02_JS_CODE_GD = '09534b3534d8da53968529a9ce164118'
|
||||||
|
|
||||||
|
# 天地图key 建议放入环境变量中,避免泄露
|
||||||
|
VITE_TIANDITU_KEY = 'f71689f9e22158947ebf64ad95e0a595'
|
||||||
|
VITE_TIANDITU_JS_CODE = ''
|
||||||
|
|
||||||
|
|
||||||
# 接口加密功能开关(如需关闭 后端也必须对应关闭)
|
# 接口加密功能开关(如需关闭 后端也必须对应关闭)
|
||||||
VITE_APP_ENCRYPT = true
|
VITE_APP_ENCRYPT = true
|
||||||
# 接口加密传输 RSA 公钥与后端解密私钥对应 如更换需前后端一同更换
|
# 接口加密传输 RSA 公钥与后端解密私钥对应 如更换需前后端一同更换
|
||||||
@@ -42,3 +62,4 @@ VITE_APP_WEBSOCKET = false
|
|||||||
|
|
||||||
# sse 开关
|
# sse 开关
|
||||||
VITE_APP_SSE = false
|
VITE_APP_SSE = false
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="top-right-btn" :style="style">
|
<div class="top-right-btn" :style="style">
|
||||||
<div>
|
<div class="flex items-center">
|
||||||
<!-- 添加按钮 -->
|
<!-- 添加按钮 -->
|
||||||
<el-button :disabled="props.disableAdd" v-if="props.showAdd" icon="Plus" type="primary" @click="toggleSearch()"> 新建 </el-button>
|
<el-button :disabled="props.disableAdd" v-if="props.showAdd" icon="Plus" type="primary" @click="toggleSearch()"> 新建 </el-button>
|
||||||
|
|
||||||
|
|||||||
@@ -57,12 +57,18 @@
|
|||||||
<el-table-column label="投诉类型名称" align="center" prop="name" />
|
<el-table-column label="投诉类型名称" align="center" prop="name" />
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="com_repair_project_status" :value="scope.row.status"></dict-tag>
|
<el-switch
|
||||||
|
@change="(val: string) => handleChange(val, scope.row)"
|
||||||
|
v-model="scope.row.status"
|
||||||
|
active-value="0"
|
||||||
|
inactive-value="1"
|
||||||
|
></el-switch>
|
||||||
|
<!-- <dict-tag :options="com_repair_project_status" :value="scope.row.status"></dict-tag> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" align="center" prop="creaateTime" width="180">
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ parseTime(scope.row.creaateTime, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||||
</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" fixed="right" class-name="small-padding fixed-width">
|
||||||
@@ -157,7 +163,15 @@ const handleAdd = () => {
|
|||||||
path: '/system/addComplantType'
|
path: '/system/addComplantType'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const handleChange = (val: string, row: ComplaintTypeVO) => {
|
||||||
|
// updateChargeType({
|
||||||
|
// id: row.id,
|
||||||
|
// status: val
|
||||||
|
// }).then(() => {
|
||||||
|
// proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
// getList();
|
||||||
|
// });
|
||||||
|
};
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: ComplaintTypeVO) => {
|
const handleUpdate = async (row?: ComplaintTypeVO) => {
|
||||||
const _id = row?.id || ids.value[0];
|
const _id = row?.id || ids.value[0];
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ const submitForm = () => {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
const handleDelete = async (row?: HouseFacilitiesVO) => {
|
const handleDelete = async (row?: HouseFacilitiesVO) => {
|
||||||
const _ids = row?.id || ids.value;
|
const _ids = row?.id || ids.value;
|
||||||
await proxy?.$modal.confirm('是否确认删除房屋设施管理编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
await proxy?.$modal.confirm('是否确认删除房屋设施管理?').finally(() => (loading.value = false));
|
||||||
await delHouseFacilities(_ids);
|
await delHouseFacilities(_ids);
|
||||||
proxy?.$modal.msgSuccess('删除成功');
|
proxy?.$modal.msgSuccess('删除成功');
|
||||||
await getList();
|
await getList();
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ function init() {
|
|||||||
...find,
|
...find,
|
||||||
projectLevel: find.projectLevel
|
projectLevel: find.projectLevel
|
||||||
};
|
};
|
||||||
|
handleChange(find.parentId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ const data = reactive<PageData<RepairProjectForm, RepairProjectQuery>>({
|
|||||||
form: { ...initFormData },
|
form: { ...initFormData },
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 9999999,
|
||||||
projectName: undefined,
|
projectName: undefined,
|
||||||
parentId: undefined,
|
parentId: undefined,
|
||||||
projectType: undefined,
|
projectType: undefined,
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
></el-switch>
|
></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column label="操作" min-width="120" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" min-width="150" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<el-button link type="primary" @click="handleRecode(scope.row)" v-hasPermi="['equipment:view:waterdevice']">充值记录</el-button>
|
<el-button link type="primary" @click="handleRecode(scope.row)" v-hasPermi="['equipment:view:waterdevice']">充值记录</el-button>
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
<el-table-column label="设备分类名称" align="center" prop="categoryName" />
|
<el-table-column label="设备分类名称" align="center" prop="categoryName" />
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<!-- TODO 设备状态开关 -->
|
||||||
<el-switch :inactive-value="1" :active-value="0" v-model="scope.row.status"></el-switch>
|
<el-switch :inactive-value="1" :active-value="0" v-model="scope.row.status"></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column fixed="right" label="操作" width="180">
|
<el-table-column fixed="right" label="操作" width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip v-if="scope.row.roleId !== 1" content="修改" placement="top">
|
<el-tooltip v-if="scope.row.roleId !== 1" content="修改" placement="top">
|
||||||
<el-button v-hasPermi="['system:role:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>
|
<el-button v-hasPermi="['system:role:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column align="center" label="操作" fixed="right" width="400">
|
<el-table-column align="center" label="操作" fixed="right" width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip v-if="scope.row.userId !== 1" content="修改" placement="top">
|
<el-tooltip v-if="scope.row.userId !== 1" content="修改" placement="top">
|
||||||
<el-button v-hasPermi="['system:user:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>
|
<el-button v-hasPermi="['system:user:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>
|
||||||
|
|||||||
@@ -120,7 +120,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="quickly_item_content">{{ item.name }}</div>
|
<div class="quickly_item_content">{{ item.name }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="quickly_item add">
|
<div @click="addQuieckDialog" class="quickly_item add">
|
||||||
<el-icon><Plus /></el-icon>
|
<el-icon><Plus /></el-icon>
|
||||||
<span>添加</span>
|
<span>添加</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -228,6 +228,38 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 添加快捷入口 -->
|
||||||
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||||
|
<el-form ref="repairProjectFormRef" :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="icon">
|
||||||
|
<el-input v-model="form.icon" placeholder="请输入" />
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="页面" prop="path">
|
||||||
|
<el-input v-model="form.path" placeholder="请输入" />
|
||||||
|
<el-tree
|
||||||
|
ref="menuRef"
|
||||||
|
class="tree-border"
|
||||||
|
:data="menuOptions"
|
||||||
|
show-checkbox
|
||||||
|
node-key="id"
|
||||||
|
:check-strictly="false"
|
||||||
|
empty-text="加载中,请稍候"
|
||||||
|
:props="{ label: 'label', children: 'children' }"
|
||||||
|
>
|
||||||
|
</el-tree>
|
||||||
|
</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>
|
||||||
|
|
||||||
@@ -236,6 +268,7 @@ import summicon from '@/assets/images/index/summer.png';
|
|||||||
import repairEcharts from './components/repairEcharts.vue';
|
import repairEcharts from './components/repairEcharts.vue';
|
||||||
import { delResident, listResident } from '@/api/system/resident';
|
import { delResident, listResident } from '@/api/system/resident';
|
||||||
import { useHouseStore } from '@/store/modules/house';
|
import { useHouseStore } from '@/store/modules/house';
|
||||||
|
import { usePermissionStore } from '@/store/modules/permission';
|
||||||
|
|
||||||
const houseStore = useHouseStore();
|
const houseStore = useHouseStore();
|
||||||
|
|
||||||
@@ -258,12 +291,14 @@ import info from './assets/info.png';
|
|||||||
import profile from './assets/profile.png';
|
import profile from './assets/profile.png';
|
||||||
import star from './assets/star.png';
|
import star from './assets/star.png';
|
||||||
|
|
||||||
|
import { roleMenuTreeselect, treeselect as menuTreeselect } from '@/api/system/menu/index';
|
||||||
import { UploadUserFile } from 'element-plus';
|
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 { workSpaceIncomeTrendListApi, workSpaceTotalListApi, workSpaceWeatherApi } from '@/api/workflow';
|
||||||
import { getWeatherIcon } from '@/utils/weather';
|
import { getWeatherIcon } from '@/utils/weather';
|
||||||
|
import { MenuTreeOption, RoleMenuTree } from '@/api/system/menu/types';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_resident_type } = toRefs<any>(proxy?.useDict('com_resident_type'));
|
const { com_resident_type } = toRefs<any>(proxy?.useDict('com_resident_type'));
|
||||||
@@ -504,6 +539,78 @@ function handleRouter(val: string) {
|
|||||||
path: val
|
path: val
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const dialog = reactive<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: '添加快捷入口'
|
||||||
|
});
|
||||||
|
const menuOptions = ref<MenuTreeOption[]>([]);
|
||||||
|
const form = ref({
|
||||||
|
name: '',
|
||||||
|
path: '',
|
||||||
|
icon: ''
|
||||||
|
});
|
||||||
|
const rules = {
|
||||||
|
name: [{ required: true, trigger: 'blur', message: '请输入快捷入口名称' }],
|
||||||
|
path: [{ required: true, trigger: 'blur', message: '请选择快捷入口页面' }]
|
||||||
|
};
|
||||||
|
function addQuieckDialog() {
|
||||||
|
form.value = {
|
||||||
|
name: '',
|
||||||
|
path: '',
|
||||||
|
icon: ''
|
||||||
|
};
|
||||||
|
const permissionStore = usePermissionStore();
|
||||||
|
const routes = permissionStore.getDefaultRoutes();
|
||||||
|
console.log(routes);
|
||||||
|
handleroutestoshowlist(routes);
|
||||||
|
dialog.visible = true;
|
||||||
|
}
|
||||||
|
function handleroutestoshowlist(rotues) {
|
||||||
|
function _hanle(parentRoute, currentroute, level) {
|
||||||
|
console.log(currentroute, level);
|
||||||
|
let obj: {
|
||||||
|
name: string;
|
||||||
|
icon: string;
|
||||||
|
path: string;
|
||||||
|
level: number;
|
||||||
|
children: unknown[];
|
||||||
|
} = {};
|
||||||
|
// 非页面路由和 二级路由
|
||||||
|
if (currentroute.hidden || level === 2) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (currentroute.meta) {
|
||||||
|
obj = {
|
||||||
|
name: currentroute.meta.title,
|
||||||
|
icon: currentroute.meta.icon,
|
||||||
|
path: currentroute.path,
|
||||||
|
level: level,
|
||||||
|
children: []
|
||||||
|
};
|
||||||
|
} else if (currentroute.path === '/') {
|
||||||
|
obj = {
|
||||||
|
name: '',
|
||||||
|
icon: currentroute.meta.icon,
|
||||||
|
path: currentroute.path,
|
||||||
|
level: level,
|
||||||
|
children: []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// 传过来父级path 拼接
|
||||||
|
if (parentRoute) {
|
||||||
|
obj.path = parentRoute.path + '/' + currentroute.path;
|
||||||
|
}
|
||||||
|
// 没有按钮第三级 普遍是 删除按钮操作
|
||||||
|
if (level < 2) {
|
||||||
|
obj.children = currentroute.children.map((item) => _hanle(obj, item, level + 1)).filter((item) => item);
|
||||||
|
}
|
||||||
|
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
// const arr = rotues.map((ele) => _hanle(null, ele, 1)).filter((item) => item);
|
||||||
|
// console.log(arr);
|
||||||
|
}
|
||||||
// ! 快捷入口
|
// ! 快捷入口
|
||||||
|
|
||||||
// ! 创建办事记录
|
// ! 创建办事记录
|
||||||
|
|||||||
Reference in New Issue
Block a user