修复bug
This commit is contained in:
parent
8f01a4c065
commit
fd9cf6fd2b
@ -1,5 +1,6 @@
|
||||
NODE_ENV=production
|
||||
VITE_APP_TITLE='数字乡村云平台'
|
||||
# VITE_APP_API_URL='http://jxjzw.zhgdyun.com:11026'
|
||||
VITE_APP_API_URL='http://jxjzw.zhgdyun.com:10248/village'
|
||||
# VITE_APP_API_URL='http://jxjzw.zhgdyun.com:10248/village'
|
||||
VITE_APP_API_URL='http://jxjzw.zhgdyun.com:10348/village'
|
||||
VITE_MQTT_URL='ws://jxj.zhgdyun.com:8083/mqtt'
|
||||
@ -25,5 +25,12 @@ export function privilegeDirective(el, binding) {
|
||||
if (!_.some(userPointsList, ['webPerms', binding.value])) {
|
||||
el.parentNode.removeChild(el);
|
||||
}
|
||||
// let orgLevel = useUserStore().getCurrentVillage?.level;
|
||||
// // 非村级用户,只有查询权限
|
||||
// if (orgLevel != '4') {
|
||||
// if (!binding.value.includes(':query')) {
|
||||
// el.parentNode.removeChild(el);
|
||||
// }
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -40,6 +40,8 @@
|
||||
import { setLoginInfo } from '/@/utils/user';
|
||||
import { PartitionOutlined } from '@ant-design/icons-vue';
|
||||
import { useUserStore } from '/@/store/modules/system/user.js';
|
||||
import { useRouter } from 'vue-router';
|
||||
const router = useRouter();
|
||||
|
||||
function getPopupContainer() {
|
||||
return document.body;
|
||||
@ -75,13 +77,16 @@
|
||||
autoExpandParent.value = false;
|
||||
}
|
||||
|
||||
function onSelect(selectedKeys, info) {
|
||||
async function onSelect(selectedKeys, info) {
|
||||
console.log(selectedKeys, info);
|
||||
useUserStore().setCurrentVillageId(selectedKeys[0]);
|
||||
currentVillageName.value = info.node.name;
|
||||
setLoginInfo();
|
||||
await setLoginInfo();
|
||||
closeOrganize();
|
||||
window.location.reload();
|
||||
// setTimeout(() => {
|
||||
// window.location.reload();
|
||||
// }, 100);
|
||||
// router.push('/homePage');
|
||||
}
|
||||
|
||||
watch(searchValue, (value) => {
|
||||
|
||||
@ -64,7 +64,11 @@
|
||||
let menuTree = useUserStore().getCurrentModuleMenuTree;
|
||||
if (menuTree && menuTree.length > 0) {
|
||||
let firstMenu = findFirstMenu(menuTree);
|
||||
if (firstMenu.path == route.path) {
|
||||
window.location.reload();
|
||||
} else {
|
||||
router.push(firstMenu.path);
|
||||
}
|
||||
} else {
|
||||
if (item.frameFlag) {
|
||||
window.open(item.frameUrl);
|
||||
@ -88,7 +92,9 @@
|
||||
(val) => {
|
||||
console.log(val, 'currentVillageId-watch');
|
||||
setTimeout(() => {
|
||||
if (moduleMenuList.value?.[1]) {
|
||||
handleClick(moduleMenuList.value[1]);
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
);
|
||||
|
||||
@ -130,6 +130,7 @@
|
||||
|
||||
{ pattern: regular.phone, message: '请输入正确的联系人电话', trigger: 'blur' },
|
||||
],
|
||||
level: [{ required: true, message: '请选择组织级别' }],
|
||||
// email: [{ required: true, message: '请输入邮箱' }, { pattern: regular.email, message: '请输入正确的邮箱', trigger: 'blur' }],
|
||||
// address: [{ required: true, message: '请输入地址' }],
|
||||
groupType: [{ required: true, message: '请选择区域' }],
|
||||
|
||||
@ -142,6 +142,7 @@
|
||||
<div class="value">{{ item.villagers || '--' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<a-empty style="margin-top: 20px" v-if="$lodash.isEmpty(homeList)" :image="emptyImg" :image-style="{ height: '150px' }" description="" />
|
||||
<div class="more-btn" v-if="homeList.length > 1">
|
||||
<a-button v-if="!homeShowMore" type="link" size="small" @click="homeShowMore = true">展开更多</a-button>
|
||||
<a-button v-else type="link" size="small" @click="homeShowMore = false">收起更多</a-button>
|
||||
@ -172,7 +173,7 @@
|
||||
<div class="l-card car-info">
|
||||
<div class="c-title">车辆信息</div>
|
||||
<a-button class="c-rt-btn" type="link" size="small" @click="handleAddCar">新增</a-button>
|
||||
<div class="item-detail home-detail" v-for="item in carListFilter" :key="item.roomId">
|
||||
<div class="item-detail home-detail" v-for="item in carListFilter" :key="item.carId">
|
||||
<div class="info-item">
|
||||
<div class="label">车型:</div>
|
||||
<div class="value">{{ item.carTypeName || '--' }}</div>
|
||||
@ -182,6 +183,7 @@
|
||||
<div class="value">{{ item.carNumber || '--' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<a-empty style="margin-top: 20px" v-if="$lodash.isEmpty(carList)" :image="emptyImg" :image-style="{ height: '150px' }" description="" />
|
||||
<div class="more-btn" v-if="carList.length > 1">
|
||||
<a-button v-if="!carShowMore" type="link" size="small" @click="carShowMore = true">展开更多</a-button>
|
||||
<a-button v-else type="link" size="small" @click="carShowMore = false">收起更多</a-button>
|
||||
@ -228,12 +230,13 @@
|
||||
</div>
|
||||
</a-card>
|
||||
</div>
|
||||
<a-empty style="margin-top: 20px" v-if="$lodash.isEmpty(cardList)" :image="emptyImg" :image-style="{ height: '150px' }" description="" />
|
||||
<div class="more-btn" v-if="cardList.length > 6">
|
||||
<a-button v-if="!cardShowMore" type="link" size="small" @click="cardShowMore = true">展开更多</a-button>
|
||||
<a-button v-else type="link" size="small" @click="cardShowMore = false">收起更多</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="c-card">
|
||||
<div class="c-card flex-1">
|
||||
<div class="c-title">人员关系拓扑图</div>
|
||||
<a-button class="c-rt-btn" type="link" size="small" @click="handleEditVillagerRelationship">关系绑定</a-button>
|
||||
<div class="graph-chart" ref="graphChartRef"></div>
|
||||
@ -271,18 +274,20 @@
|
||||
涉及事件
|
||||
<span>({{ eventList.length }})</span>
|
||||
</div>
|
||||
<div class="item-detail event-detail">
|
||||
<div class="item-detail event-detail" v-if="eventList.length > 0">
|
||||
<div class="info-item column" v-for="item in eventList" :key="item.id">
|
||||
<div class="label">{{ item.happenTime }}</div>
|
||||
<div class="value">{{ item.eventDesc || '--' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<a-empty style="margin-top: 20px" v-else :image="emptyImg" :image-style="{ height: '150px' }" description="" />
|
||||
</div>
|
||||
<div class="l-card">
|
||||
<div class="c-title">
|
||||
走访记录
|
||||
<!-- <span>({{ eventList.length }})</span> -->
|
||||
</div>
|
||||
<a-empty style="margin-top: 20px" :image="emptyImg" :image-style="{ height: '150px' }" description="" />
|
||||
<!-- <div class="item-detail event-detail">
|
||||
<div class="info-item column" v-for="item in eventList" :key="item.id">
|
||||
<div class="label">{{ item.happenTime }}</div>
|
||||
@ -295,6 +300,7 @@
|
||||
人员历程
|
||||
<!-- <span>({{ eventList.length }})</span> -->
|
||||
</div>
|
||||
<a-empty style="margin-top: 20px" :image="emptyImg" :image-style="{ height: '150px' }" description="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -311,6 +317,7 @@
|
||||
|
||||
<script setup>
|
||||
import * as echarts from 'echarts';
|
||||
import emptyImg from '/@/assets/images/common/empty.png';
|
||||
import CarModal from './car-modal.vue';
|
||||
import VillagerModal from './villager-modal.vue';
|
||||
import PartyMemberModal from './party-member-modal.vue';
|
||||
@ -870,6 +877,9 @@
|
||||
padding: 20px 16px;
|
||||
position: relative;
|
||||
}
|
||||
.flex-1 {
|
||||
flex: 1;
|
||||
}
|
||||
.graph-chart {
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
|
||||
@ -217,6 +217,9 @@
|
||||
const tableLoading = ref(false);
|
||||
// 查询
|
||||
async function queryEmployee() {
|
||||
if (!props.departmentId) {
|
||||
return;
|
||||
}
|
||||
tableLoading.value = true;
|
||||
try {
|
||||
params.departmentId = props.departmentId;
|
||||
@ -238,10 +241,14 @@
|
||||
|
||||
// 根据关键字 查询
|
||||
async function queryEmployeeByKeyword(allDepartment) {
|
||||
if (!props.departmentId) {
|
||||
return;
|
||||
}
|
||||
tableLoading.value = true;
|
||||
try {
|
||||
params.pageNum = 1;
|
||||
params.departmentId = allDepartment ? undefined : props.departmentId;
|
||||
// params.departmentId = allDepartment ? undefined : props.departmentId;
|
||||
params.departmentId = props.departmentId;
|
||||
let res = await employeeApi.queryEmployee(params);
|
||||
for (const item of res.data.list) {
|
||||
item.roleNameList = _.join(item.roleNameList, ',');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user