Browse Source

改bug中

feature
dai 3 years ago
parent
commit
6fd5477a5e
  1. 188
      src/views/dataBoard/renfang/cpts/rkfx.vue
  2. 6
      src/views/dataBoard/renfang/resi/list.vue
  3. 2
      src/views/dataBoard/renfang/warn/resi.vue
  4. 532
      src/views/main-navbar.vue
  5. 2
      src/views/modules/shequ/chaxun.vue

188
src/views/dataBoard/renfang/cpts/rkfx.vue

@ -17,6 +17,7 @@
class="legend-row"
:key="'pie' + item.name"
v-for="item in pieData"
@click="handleClickItem(item)"
>
<div class="name">{{ item.name }}</div>
<div class="content">
@ -122,6 +123,19 @@ export default {
this.getPie();
},
handleClickItem(item) {
const { type, name } = item;
this.$router.push({
path: "/dataBoard/renfang/resi-list",
query: {
org_id: this.orgId,
type,
type_category: this.currentTab,
type_name: name,
},
});
},
//
async getInfo() {
const url = "resident_analyze";
@ -176,50 +190,166 @@ export default {
const { currentTab, info } = this;
if (currentTab == "性别") {
this.pieData = [
{ value: info.male_count, name: "男" },
{ value: info.female_count, name: "女" },
{
value: info.male_count,
type: "male_count",
name: "男性",
},
{
value: info.female_count,
type: "female_count",
name: "女性",
},
];
} else if (currentTab == "户籍") {
this.pieData = [
{ value: info.local_count, name: "本地户籍" },
{ value: info.field_count, name: "外地户籍" },
{
value: info.local_count,
type: "local_count",
name: "本地户籍",
},
{
value: info.field_count,
type: "field_count",
name: "外地户籍",
},
];
} else if (currentTab == "人户状况") {
this.pieData = [
{ value: info.resi_y_house_y_count, name: "人户一致" },
{ value: info.resi_y_house_n_count, name: "人在户不在" },
{ value: info.resi_n_house_y_count, name: "户在人不在" },
{
value: info.resi_y_house_y_count,
type: "resi_y_house_y_count",
name: "人户一致",
},
{
value: info.resi_y_house_n_count,
type: "resi_y_house_n_count",
name: "人在户不在",
},
{
value: info.resi_n_house_y_count,
type: "resi_n_house_y_count",
name: "户在人不在",
},
];
} else if (currentTab == "年龄") {
this.pieData = [
{ value: info.age50_count, name: "50岁以下" },
{ value: info.age5059_count, name: "50-59岁" },
{ value: info.age6069_count, name: "60-69岁" },
{ value: info.age7079_count, name: "70-79岁" },
{ value: info.age80_count, name: "80岁以上" },
{
value: info.age50_count,
type: "age50_count",
name: "50岁以下",
},
{
value: info.age5059_count,
type: "age5059_count",
name: "50-59岁",
},
{
value: info.age6069_count,
type: "age6069_count",
name: "60-69岁",
},
{
value: info.age7079_count,
type: "age7079_count",
name: "70-79岁",
},
{
value: info.age80_count,
type: "age80_count",
name: "80岁以上",
},
];
} else if (currentTab == "志愿者类别") {
this.pieData = [
{ value: info.culture_count, name: "文化队伍" },
{ value: info.committee_count, name: "楼委会" },
{ value: info.capable_count, name: "能人达人" },
{ value: info.friend_count, name: "老友俱乐部" },
{ value: info.agent_count, name: "代办员" },
{ value: info.mediator_count, name: "调解员" },
{ value: info.collector_count, name: "采集员" },
{ value: info.security_count, name: "治安巡逻员" },
{ value: info.party_mem_count, name: "党员中心户" },
{
value: info.culture_count,
type: "culture_count",
name: "文化队伍",
},
{
value: info.committee_count,
type: "committee_count",
name: "楼委会",
},
{
value: info.capable_count,
type: "capable_count",
name: "能人达人",
},
{
value: info.friend_count,
type: "friend_count",
name: "老友俱乐部",
},
{
value: info.agent_count,
type: "agent_count",
name: "代办员",
},
{
value: info.mediator_count,
type: "mediator_count",
name: "调解员",
},
{
value: info.collector_count,
type: "collector_count",
name: "采集员",
},
{
value: info.security_count,
type: "security_count",
name: "治安巡逻员",
},
{
value: info.party_mem_count,
type: "party_mem_count",
name: "党员中心户",
},
];
} else if (currentTab == "党员文化程度") {
this.pieData = [
{ value: info.primary_count, name: "小学及文盲" },
{ value: info.junior_high_count, name: "初中" },
{ value: info.second_speci_count, name: "中专" },
{ value: info.high_school_count, name: "高中" },
{ value: info.junior_college_count, name: "大专" },
{ value: info.undergrad_count, name: "本科" },
{ value: info.master_count, name: "硕士" },
{ value: info.doctor_count, name: "博士" },
{
value: info.primary_count,
type: "primary_count",
name: "小学及文盲",
},
{
value: info.junior_high_count,
type: "junior_high_count",
name: "初中",
},
{
value: info.second_speci_count,
type: "second_speci_count",
name: "中专",
},
{
value: info.high_school_count,
type: "high_school_count",
name: "高中",
},
{
value: info.junior_college_count,
type: "junior_college_count",
name: "大专",
},
{
value: info.undergrad_count,
type: "undergrad_count",
name: "本科",
},
{
value: info.master_count,
type: "master_count",
name: "硕士",
},
{
value: info.doctor_count,
type: "doctor_count",
name: "博士",
},
];
} else if (currentTab == "下级人口分布") {
this.pieData = [];

6
src/views/dataBoard/renfang/resi/list.vue

@ -139,9 +139,13 @@ export default {
};
},
mounted() {
activated() {
this.org_id = getQueryPara("org_id");
this.resiType = getQueryPara("type");
const type_name = getQueryPara("type_name");
this.breadList[1].meta.title = type_name + "居民列表";
this.tableTitle = type_name + "居民列表";
this.getList();
},

2
src/views/dataBoard/renfang/warn/resi.vue

@ -123,7 +123,7 @@ export default {
};
},
mounted() {
activated() {
this.getList();
},

532
src/views/main-navbar.vue

@ -1,118 +1,142 @@
<template>
<div>
<nav v-if="showHeader" class="aui-navbar">
<div class="aui-navbar__header">
<div class="aui-navbar__logo">
<img
v-if="$store.state.user.headUrl"
:src="$store.state.user.headUrl"
/>
</div>
<h1 class="aui-navbar__brand">
<a class="aui-navbar__brand-lg" href="javascript:;">{{
this.$store.state.user.agencyName
}}</a>
<a class="aui-navbar__brand-mini" href="javascript:;">{{
this.$store.state.user.agencyName.slice(0, 2)
}}</a>
</h1>
</div>
<div>
<nav v-if="showHeader" class="aui-navbar">
<div class="aui-navbar__header">
<div class="aui-navbar__logo">
<img
v-if="$store.state.user.headUrl"
:src="$store.state.user.headUrl"
/>
</div>
<h1 class="aui-navbar__brand">
<a class="aui-navbar__brand-lg" href="javascript:;">{{
this.$store.state.user.agencyName
}}</a>
<a class="aui-navbar__brand-mini" href="javascript:;">{{
this.$store.state.user.agencyName.slice(0, 2)
}}</a>
</h1>
</div>
<div class="aui-navbar__body">
<el-menu class="aui-navbar__menu mr-auto" mode="horizontal">
<el-menu-item
v-if="false"
index="1"
@click="$store.state.sidebarFold = !$store.state.sidebarFold"
>
<svg
class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch"
aria-hidden="true"
>
<use xlink:href="#icon-outdent"></use>
</svg>
</el-menu-item>
<div class="aui-navbar__body">
<el-menu class="aui-navbar__menu mr-auto" mode="horizontal">
<el-menu-item
v-if="false"
index="1"
@click="
$store.state.sidebarFold = !$store.state.sidebarFold
"
>
<svg
class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch"
aria-hidden="true"
>
<use xlink:href="#icon-outdent"></use>
</svg>
</el-menu-item>
<el-menu-item v-if="true" index="2" @click="refresh()">
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
<use xlink:href="#icon-sync"></use>
</svg>
</el-menu-item>
</el-menu>
<el-menu-item v-if="true" index="2" @click="refresh()">
<svg
class="icon-svg aui-navbar__icon-menu"
aria-hidden="true"
>
<use xlink:href="#icon-sync"></use>
</svg>
</el-menu-item>
</el-menu>
<el-menu
class="aui-navbar__menu"
mode="horizontal"
style="min-width: 180px"
>
<el-menu-item index="3" @click="$router.push({ name: 'dataBoard' })">
<div class="nav-item">
<img src="~@/assets/images/main/nav-sjdb.png" />
<span>数据看板</span>
</div>
</el-menu-item>
<el-menu-item index="3" @click="$router.push({ name: 'dataBoard' })">
<div class="nav-item">
<img src="~@/assets/images/main/nav-zntb.png" />
<span>智能填报</span>
</div>
</el-menu-item>
<el-menu-item index="3" @click="$router.push({ name: 'dataBoard' })">
<div class="nav-item">
<img src="~@/assets/images/main/nav-sjjy.png" />
<span>数据校验</span>
</div>
</el-menu-item>
</el-menu>
<el-menu
class="aui-navbar__menu"
mode="horizontal"
style="min-width: 180px"
>
<el-menu-item
index="3"
@click="$router.push({ name: 'dataBoard' })"
>
<div class="nav-item">
<img src="~@/assets/images/main/nav-sjdb.png" />
<span>数据看板</span>
</div>
</el-menu-item>
<el-menu-item
index="3"
@click="$router.push({ name: 'dataBoard' })"
>
<div class="nav-item">
<img src="~@/assets/images/main/nav-zntb.png" />
<span>智能填报</span>
</div>
</el-menu-item>
<el-menu-item
index="3"
@click="$router.push({ name: 'dataBoard' })"
>
<div class="nav-item">
<img src="~@/assets/images/main/nav-sjjy.png" />
<span>数据校验</span>
</div>
</el-menu-item>
</el-menu>
<el-menu
class="aui-navbar__menu"
mode="horizontal"
style="min-width: 180px"
>
<el-menu-item index="3" @click="fullscreenHandle()">
<div class="img-nav">
<img src="~@/assets/images/main/time.png" />
</div>
</el-menu-item>
<el-menu
class="aui-navbar__menu"
mode="horizontal"
style="min-width: 180px"
>
<el-menu-item index="3" @click="fullscreenHandle()">
<div class="img-nav">
<img src="~@/assets/images/main/time.png" />
</div>
</el-menu-item>
<el-menu-item index="2" @click="toRemindPage">
<div class="img-nav" :class="{ 'z-on': notice }">
<img src="~@/assets/images/main/hint.png" />
</div>
</el-menu-item>
<el-menu-item index="2" @click="toRemindPage">
<div class="img-nav" :class="{ 'z-on': false }">
<span class="corner-dot" v-if="unreadMsgNum > 0">{{
unreadMsgNum
}}</span>
<img src="~@/assets/images/main/hint.png" />
</div>
</el-menu-item>
<el-menu-item index="1" class="aui-navbar__avatar">
<el-dropdown placement="bottom" :show-timeout="0">
<span class="el-dropdown-link">
<img
v-if="$store.state.user.gender === '2'"
src="~@/assets/images/main/default-avatar.png"
/>
<img v-else src="~@/assets/images/main/default-avatar.png" />
<span>{{ $store.state.user.realName }}</span>
<i class="el-icon-arrow-down"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="updatePasswordHandle()">{{
$t("updatePassword.title")
}}</el-dropdown-item>
<el-dropdown-item @click.native="logoutHandle()">{{
$t("logout")
}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-menu-item>
</el-menu>
</div>
<!-- 弹窗, 修改密码 -->
<update-password-work
v-if="updatePassowrdVisible"
ref="updatePassowrd"
></update-password-work>
</nav>
<nav v-else class="aui-navbar main-line"></nav>
</div>
<el-menu-item index="1" class="aui-navbar__avatar">
<el-dropdown placement="bottom" :show-timeout="0">
<span class="el-dropdown-link">
<img
v-if="$store.state.user.gender === '2'"
src="~@/assets/images/main/default-avatar.png"
/>
<img
v-else
src="~@/assets/images/main/default-avatar.png"
/>
<span>{{ $store.state.user.realName }}</span>
<i class="el-icon-arrow-down"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item
@click.native="updatePasswordHandle()"
>{{
$t("updatePassword.title")
}}</el-dropdown-item
>
<el-dropdown-item
@click.native="logoutHandle()"
>{{ $t("logout") }}</el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown>
</el-menu-item>
</el-menu>
</div>
<!-- 弹窗, 修改密码 -->
<update-password-work
v-if="updatePassowrdVisible"
ref="updatePassowrd"
></update-password-work>
</nav>
<nav v-else class="aui-navbar main-line"></nav>
</div>
</template>
<script>
@ -124,151 +148,175 @@ import { requestPost, requestGet } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
export default {
inject: ["refresh"],
data() {
return {
showHeader: true,
i18nMessages: messages,
updatePassowrdVisible: false,
customerName: "",
inject: ["refresh"],
data() {
return {
showHeader: true,
i18nMessages: messages,
updatePassowrdVisible: false,
customerName: "",
notice: false,
};
},
components: {
UpdatePasswordWork,
},
created() {
let platformToken = localStorage.getItem("showHeader") || "";
if (
typeof platformToken !== "undefined" &&
platformToken !== "undefined" &&
platformToken !== ""
) {
this.showHeader = false;
}
this.changeCustomerName();
console.log("=============================", this.userType);
unreadMsgNum: 0,
};
},
components: {
UpdatePasswordWork,
},
created() {
let platformToken = localStorage.getItem("showHeader") || "";
if (
typeof platformToken !== "undefined" &&
platformToken !== "undefined" &&
platformToken !== ""
) {
this.showHeader = false;
}
this.changeCustomerName();
console.log("=============================", this.userType);
this.pollGetNoticeData();
},
computed: {
userType() {
return localStorage.getItem("userType");
},
},
methods: {
toRemindPage() {
this.$router.replace("/main/home-notice");
},
this.pollGetNoticeData();
},
computed: {
userType() {
return localStorage.getItem("userType");
},
},
methods: {
toRemindPage() {
this.$router.replace("/main/home-notice");
},
toIndexPage() {
this.$router.replace("/index");
},
// menuId()
gotoRouteHandle(menuId, idx) {
var route = window.SITE_CONFIG["dynamicMenuRoutes"].filter(
(item) => item.meta.menuId === menuId
)[0];
if (route) {
if (route.meta.iframeURL.endsWith("【跳转新页面】")) {
return window.open(route.meta.iframeURL.slice(0, -7));
} else {
this.$router.push({ name: route.name });
}
}
this.$store.state.LevelOneMenuActiveName = menuId;
this.$store.state.sidebarActiveSubMenuList =
this.$store.state.sidebarMenuList[idx].children || [];
console.log("this.$store.state", this.$store.state);
console.log("this.$route", this.$route);
},
changeCustomerName(customerName) {
this.customerName =
localStorage.getItem("customerName") || "党建引领基层治理互联管理平台";
},
//
fullscreenHandle() {
if (!screenfull.enabled) {
return this.$message({
message: this.$t("fullscreen.prompt"),
type: "warning",
duration: 500,
});
}
screenfull.toggle();
},
//
updatePasswordHandle() {
this.updatePassowrdVisible = true;
this.$nextTick(() => {
this.$refs.updatePassowrd.init();
});
},
// 退
logoutHandle() {
this.$confirm(
this.$t("prompt.info", { handle: this.$t("logout") }),
this.$t("prompt.title"),
{
confirmButtonText: this.$t("confirm"),
cancelButtonText: this.$t("cancel"),
type: "warning",
}
)
.then(() => {
//
// tabs,
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
(item) => item.name === "home"
);
toIndexPage() {
this.$router.replace("/index");
},
// menuId()
gotoRouteHandle(menuId, idx) {
var route = window.SITE_CONFIG["dynamicMenuRoutes"].filter(
(item) => item.meta.menuId === menuId
)[0];
if (route) {
if (route.meta.iframeURL.endsWith("【跳转新页面】")) {
return window.open(route.meta.iframeURL.slice(0, -7));
} else {
this.$router.push({ name: route.name });
}
}
this.$store.state.LevelOneMenuActiveName = menuId;
this.$store.state.sidebarActiveSubMenuList =
this.$store.state.sidebarMenuList[idx].children || [];
console.log("this.$store.state", this.$store.state);
console.log("this.$route", this.$route);
},
changeCustomerName(customerName) {
this.customerName =
localStorage.getItem("customerName") ||
"党建引领基层治理互联管理平台";
},
//
fullscreenHandle() {
if (!screenfull.enabled) {
return this.$message({
message: this.$t("fullscreen.prompt"),
type: "warning",
duration: 500,
});
}
screenfull.toggle();
},
//
updatePasswordHandle() {
this.updatePassowrdVisible = true;
this.$nextTick(() => {
this.$refs.updatePassowrd.init();
});
},
// 退
logoutHandle() {
this.$confirm(
this.$t("prompt.info", { handle: this.$t("logout") }),
this.$t("prompt.title"),
{
confirmButtonText: this.$t("confirm"),
cancelButtonText: this.$t("cancel"),
type: "warning",
}
)
.then(() => {
//
// tabs,
this.$store.state.contentTabs =
this.$store.state.contentTabs.filter(
(item) => item.name === "home"
);
this.$http
.post("/auth/login/logout")
.then(({ data: res }) => {
if (res.code !== 0) {
// 退
if (res.code !== 10007) {
this.$message.error(res.msg);
}
}
this.$http
.post("/auth/login/logout")
.then(({ data: res }) => {
if (res.code !== 0) {
// 退
if (res.code !== 10007) {
this.$message.error(res.msg);
}
}
clearLoginInfo();
this.$router.push({ name: "login" });
// if (localStorage.getItem('userType') === 'work') {
// this.$router.push({ name: 'loginWork' })
// } else {
// this.$router.push({ name: 'login' })
// }
})
.catch(() => {});
})
.catch(() => {});
},
clearLoginInfo();
this.$router.push({ name: "login" });
// if (localStorage.getItem('userType') === 'work') {
// this.$router.push({ name: 'loginWork' })
// } else {
// this.$router.push({ name: 'login' })
// }
})
.catch(() => {});
})
.catch(() => {});
},
async pollGetNoticeData() {
this.getNoticeData();
await nextTick(60000);
this.pollGetNoticeData();
},
async pollGetNoticeData() {
this.getNoticeData();
await nextTick(60000);
this.pollGetNoticeData();
},
//
async getNoticeData() {
const url = "/message/intelligentMessage/msg/notice";
const { data, code, msg } = await requestGet(url, {});
if (code === 0) {
console.log("列表请求成功!!!!!!!!!!!!!!");
this.notice = data.unreadNum > 0;
} else {
}
},
},
//
async getNoticeData() {
const url = "/message/intelligentMessage/msg/notice";
const { data, code, msg } = await requestGet(url, {});
if (code === 0) {
console.log("列表请求成功!!!!!!!!!!!!!!");
this.unreadMsgNum = data.unreadNum;
} else {
}
},
},
};
</script>
<style lang="scss" scoped>
.main-line {
height: 50px;
background: #eeeeee;
height: 50px;
background: #eeeeee;
}
.img-nav {
position: relative;
.corner-dot {
position: absolute;
z-index: 100;
display: block;
top: -5px;
right: -5px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
line-height: 16px;
min-width: 16px;
height: 16px;
background: #ff4d4f;
border-radius: 100%;
border: 1px solid #ffffff;
text-align: center;
}
}
</style>

2
src/views/modules/shequ/chaxun.vue

@ -587,7 +587,7 @@ export default {
}
},
},
mounted() {
activated() {
this.getApiData();
this.firstSearch();

Loading…
Cancel
Save