Browse Source

首页修改

dev-V1.0.6
parent
commit
5400e2863b
  1. 8
      zdxt-web-client/zdxt-admin-plus-ui/.env.development
  2. 6
      zdxt-web-client/zdxt-admin-plus-ui/.env.development-wmy-cust
  3. 4
      zdxt-web-client/zdxt-admin-plus-ui/.env.production
  4. 60
      zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/district-direct/index.vue
  5. 11
      zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/styles/analysis-layout.css

8
zdxt-web-client/zdxt-admin-plus-ui/.env.development

@ -1,5 +1,5 @@
# 页面标题 # 页面标题
VITE_APP_TITLE = zdxt-Vue-Plus多租户管理系统 VITE_APP_TITLE = 执法监督码•执法监督
VITE_APP_LOGO_TITLE = 执法监督码•执法监督 VITE_APP_LOGO_TITLE = 执法监督码•执法监督
# 开发环境配置 # 开发环境配置
@ -7,13 +7,13 @@ VITE_APP_ENV = 'development'
# 开发环境 # 开发环境
VITE_APP_BASE_API = '/dev-api' VITE_APP_BASE_API = '/dev-api'
# VITE_APP_BASE_API = '/efcode20-sup-web/prod-api'
# API 代理目标地址 # API 代理目标地址
VITE_APP_PROXY_TARGET = 'http://localhost:8080' VITE_APP_PROXY_TARGET = 'http://localhost:8080'
# 应用访问路径 例如使用前缀 /admin/ # 应用访问路径 例如使用前缀 /admin/
VITE_APP_CONTEXT_PATH = '/efcode20-sup-web/' # VITE_APP_CONTEXT_PATH = '/efcode20-sup-web/'
VITE_APP_CONTEXT_PATH = '/zfjdm/'
# 监控地址 # 监控地址
VITE_APP_MONITOR_ADMIN = 'http://localhost:9090/admin/applications' VITE_APP_MONITOR_ADMIN = 'http://localhost:9090/admin/applications'

6
zdxt-web-client/zdxt-admin-plus-ui/.env.development-wmy-cust

@ -15,7 +15,9 @@ VITE_APP_ENV = 'development'
VITE_APP_BASE_API = '/efcode20-sup-web/prod-api' VITE_APP_BASE_API = '/efcode20-sup-web/prod-api'
# 应用访问路径 例如使用前缀 /admin/ # 应用访问路径 例如使用前缀 /admin/
VITE_APP_CONTEXT_PATH = '/efcode20-sup-web/' # VITE_APP_CONTEXT_PATH = '/efcode20-sup-web/'
VITE_APP_CONTEXT_PATH = '/zfjdm/'
# 监控地址 # 监控地址
VITE_APP_MONITOR_ADMIN = 'http://localhost:9090/admin/applications' VITE_APP_MONITOR_ADMIN = 'http://localhost:9090/admin/applications'
@ -23,7 +25,7 @@ VITE_APP_MONITOR_ADMIN = 'http://localhost:9090/admin/applications'
# SnailJob 控制台地址 # SnailJob 控制台地址
VITE_APP_SNAILJOB_ADMIN = 'http://localhost:8800/snail-job' VITE_APP_SNAILJOB_ADMIN = 'http://localhost:8800/snail-job'
VITE_APP_PORT = 12004 VITE_APP_PORT = 12003
# 接口加密功能开关(如需关闭 后端也必须对应关闭) # 接口加密功能开关(如需关闭 后端也必须对应关闭)
VITE_APP_ENCRYPT = true VITE_APP_ENCRYPT = true

4
zdxt-web-client/zdxt-admin-plus-ui/.env.production

@ -6,7 +6,8 @@ VITE_APP_LOGO_TITLE = 执法监督码•执法监督
VITE_APP_ENV = 'production' VITE_APP_ENV = 'production'
# 应用访问路径 例如使用前缀 /admin/ # 应用访问路径 例如使用前缀 /admin/
VITE_APP_CONTEXT_PATH = '/efcode20-sup-web/' # VITE_APP_CONTEXT_PATH = '/efcode20-sup-web/'
VITE_APP_CONTEXT_PATH = '/zfjdm/'
# 监控地址 # 监控地址
VITE_APP_MONITOR_ADMIN = '/admin/applications' VITE_APP_MONITOR_ADMIN = '/admin/applications'
@ -16,6 +17,7 @@ VITE_APP_SNAILJOB_ADMIN = '/snail-job'
# 生产环境 # 生产环境
VITE_APP_BASE_API = '/efcode20-sup-web/prod-api' VITE_APP_BASE_API = '/efcode20-sup-web/prod-api'
# VITE_APP_BASE_API = '/zfjdm/prod-api'
# 是否在打包时开启压缩,支持 gzip 和 brotli # 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip VITE_BUILD_COMPRESS = gzip

60
zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/district-direct/index.vue

@ -3,7 +3,7 @@
<div class="wrap_all"> <div class="wrap_all">
<div class="select_set"> <div class="select_set">
<div class="select_item select_item--anchor"> <div class="select_item select_item--anchor">
<label class="select_area" :class="{ active: deptPanelOpen }" @click="deptPanelOpen = !deptPanelOpen"> <label class="select_area" :class="{ active: deptPanelOpen }" @click="toggleDeptPanel">
{{ deptName }}<a></a> {{ deptName }}<a></a>
</label> </label>
<dl v-show="deptPanelOpen" class="fold_cont" :class="{ 'is-open': deptPanelOpen }"> <dl v-show="deptPanelOpen" class="fold_cont" :class="{ 'is-open': deptPanelOpen }">
@ -27,22 +27,22 @@
<span :class="{ active: detailTab === 0 }" @click="detailTab = 0">区直单位</span> <span :class="{ active: detailTab === 0 }" @click="detailTab = 0">区直单位</span>
<span :class="{ active: detailTab === 1 }" @click="detailTab = 1">街道</span> <span :class="{ active: detailTab === 1 }" @click="detailTab = 1">街道</span>
</div> </div>
<div v-show="detailTab === 0" class="tabcont"> <div v-if="detailTab === 0" class="tabcont tabcont--shown">
<div class="selcont"> <div class="selcont">
<a <a
v-for="item in districtDetailList" v-for="item in districtDetailList"
:key="String(item.deptId)" :key="'d-'+String(item.deptId)"
class="selitem" class="selitem"
:class="{ selected: selectedSubDeptId === item.deptId, active: selectedSubDeptId === item.deptId }" :class="{ selected: selectedSubDeptId === item.deptId, active: selectedSubDeptId === item.deptId }"
@click="selectSubDept(item)" @click="selectSubDept(item)"
>{{ item.deptName }}</a> >{{ item.deptName }}</a>
</div> </div>
</div> </div>
<div v-show="detailTab === 1" class="tabcont"> <div v-if="detailTab === 1" class="tabcont tabcont--shown">
<div class="selcont"> <div class="selcont">
<a <a
v-for="item in streetDetailList" v-for="item in streetDetailList"
:key="String(item.deptId)" :key="'s-'+String(item.deptId)"
class="selitem" class="selitem"
:class="{ selected: selectedSubDeptId === item.deptId, active: selectedSubDeptId === item.deptId }" :class="{ selected: selectedSubDeptId === item.deptId, active: selectedSubDeptId === item.deptId }"
@click="selectSubDept(item)" @click="selectSubDept(item)"
@ -54,7 +54,7 @@
</div> </div>
</div> </div>
<div class="select_item"> <div class="select_item">
<label class="select_time" :class="{ active: datePickerOpen }" @click="datePickerOpen = !datePickerOpen">时间筛选<a></a></label> <label class="select_time" :class="{ active: datePickerOpen }" @click="toggleDatePicker">时间筛选<a></a></label>
<el-date-picker v-if="datePickerOpen" v-model="dateRange" type="daterange" range-separator="" value-format="YYYY-MM-DD" clearable @change="refreshAll" /> <el-date-picker v-if="datePickerOpen" v-model="dateRange" type="daterange" range-separator="" value-format="YYYY-MM-DD" clearable @change="refreshAll" />
<span>综合数据</span> <span>综合数据</span>
</div> </div>
@ -202,7 +202,7 @@ const detailTab = ref(0);
const deptList = ref<(SysDeptVo & { deptId: string | number | null })[]>([]); const deptList = ref<(SysDeptVo & { deptId: string | number | null })[]>([]);
const selectedDeptId = ref<string | number | null>(null); const selectedDeptId = ref<string | number | null>(null);
const selectedSubDeptId = ref<string | number | null>(null); const selectedSubDeptId = ref<string | number | null>(null);
const selectedForDetail = ref<SysDeptVo | null>(null); const selectedForDetail = ref<(SysDeptVo & { deptId: string | number | null }) | null>(null);
const deptName = ref('各区'); const deptName = ref('各区');
const detailDistrictName = ref(''); const detailDistrictName = ref('');
const districtDetailList = ref<SysDeptVo[]>([]); const districtDetailList = ref<SysDeptVo[]>([]);
@ -231,6 +231,22 @@ function isSelected(dept: SysDeptVo & { deptId: string | number | null }) {
return String(dept.deptId) === String(selectedDeptId.value) || (dept.deptId === null && selectedDeptId.value === null); return String(dept.deptId) === String(selectedDeptId.value) || (dept.deptId === null && selectedDeptId.value === null);
} }
/** 旧项目:点击下拉菜单时关闭所有其他面板 */
function toggleDeptPanel() {
deptPanelOpen.value = !deptPanelOpen.value;
if (deptPanelOpen.value) {
datePickerOpen.value = false;
}
}
function toggleDatePicker() {
datePickerOpen.value = !datePickerOpen.value;
if (datePickerOpen.value) {
deptPanelOpen.value = false;
detailPanelOpen.value = false;
}
}
function getParams() { function getParams() {
const bureauDeptId = selectedSubDeptId.value ?? selectedDeptId.value; const bureauDeptId = selectedSubDeptId.value ?? selectedDeptId.value;
return { beginTime: dateRange.value?.[0], endTime: dateRange.value?.[1], zone: 2, bureauDeptId }; return { beginTime: dateRange.value?.[0], endTime: dateRange.value?.[1], zone: 2, bureauDeptId };
@ -248,21 +264,30 @@ async function loadDepts() {
if (datas.length >= 11) { if (datas.length >= 11) {
list.push({ deptId: null, deptName: '各区' }); list.push({ deptId: null, deptName: '各区' });
changeDept(null, '各区'); changeDept(null, '各区');
//
selectedForDetail.value = { deptId: null, deptName: '各区' };
detailDistrictName.value = '各区';
loadStreetAndDistrict(null);
} else if (datas.length === 0) { } else if (datas.length === 0) {
list.push({ deptId: -1, deptName: '无权限' }); list.push({ deptId: -1, deptName: '无权限' });
changeDept(-1, '无权限'); changeDept(-1, '无权限');
} else if (datas.length > 0) { } else if (datas.length > 0) {
changeDept(datas[0].deptId, datas[0].deptName); changeDept(datas[0].deptId, datas[0].deptName);
//
selectedForDetail.value = datas[0] as SysDeptVo & { deptId: string | number };
detailDistrictName.value = datas[0].deptName;
loadStreetAndDistrict(datas[0].deptId);
} }
deptList.value = [...list, ...datas]; deptList.value = [...list, ...datas];
} }
function onDeptClick(dept: SysDeptVo & { deptId: string | number | null }) { function onDeptClick(dept: SysDeptVo & { deptId: string | number | null }) {
if (dept.deptId === null || dept.deptId === -1) { if (dept.deptId === -1) {
changeDept(dept.deptId, dept.deptName); changeDept(dept.deptId, dept.deptName);
detailPanelOpen.value = false; detailPanelOpen.value = false;
return; return;
} }
// ""
selectedForDetail.value = dept; selectedForDetail.value = dept;
detailDistrictName.value = dept.deptName; detailDistrictName.value = dept.deptName;
detailPanelOpen.value = true; detailPanelOpen.value = true;
@ -272,22 +297,31 @@ function onDeptClick(dept: SysDeptVo & { deptId: string | number | null }) {
} }
function selectSubDept(item: SysDeptVo) { function selectSubDept(item: SysDeptVo) {
selectedSubDeptId.value = selectedSubDeptId.value === item.deptId ? null : item.deptId; if (selectedSubDeptId.value === item.deptId) {
//
selectedSubDeptId.value = null;
deptName.value = detailDistrictName.value;
} else {
// changeArea type=2
selectedSubDeptId.value = item.deptId;
deptName.value = item.deptName;
}
refreshAll(); refreshAll();
} }
function changeDept(id: string | number | null, name: string) { function changeDept(id: string | number | null, name: string) {
selectedDeptId.value = id; selectedDeptId.value = id;
deptName.value = name; deptName.value = name;
deptPanelOpen.value = false; //
// deptPanelOpen.value = false;
refreshAll(); refreshAll();
} }
async function loadStreetAndDistrict(deptId: string | number) { async function loadStreetAndDistrict(deptId: string | number | null) {
const res = await safeLoad(() => queryStreetAndDistrict({ zoneList: [3, 4], deptId })); const res = await safeLoad(() => queryStreetAndDistrict({ zoneList: [3, 4], deptId }));
const list = unwrapData<SysDeptVo[]>(res) || []; const list = unwrapData<SysDeptVo[]>(res) || [];
districtDetailList.value = list.filter((d) => d.zone === 3); districtDetailList.value = list.filter((d) => String(d.zone) === '3');
streetDetailList.value = list.filter((d) => d.zone === 4); streetDetailList.value = list.filter((d) => String(d.zone) === '4');
} }
function initChart(key: string, el?: HTMLElement) { function initChart(key: string, el?: HTMLElement) {

11
zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/styles/analysis-layout.css

@ -7,10 +7,8 @@
.statistical-analysis .wrap_all { .statistical-analysis .wrap_all {
height: 100%; height: 100%;
} /* 关键 .fold_cont .popbox 的绝对定位相对于全屏容器
这样 popbox width:60%/height:70% 才是相对于整个页面而不是小容器 */
/* 仅各区页 popbox 需要定位参照,勿加在全市直 select_item 上(会导致 fold_cont 高度按 28px 计算) */
.statistical-analysis .select_item--anchor {
position: relative; position: relative;
} }
@ -26,6 +24,11 @@
display: block; display: block;
} }
/* .tabcont 原 CSS 默认 display:none,用 v-if 切换渲染时加此 class 显式显示 */
.statistical-analysis .tabcont.tabcont--shown {
display: block;
}
.statistical-analysis .el-date-editor { .statistical-analysis .el-date-editor {
margin-left: 8px; margin-left: 8px;
} }

Loading…
Cancel
Save