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

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

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

532
src/views/main-navbar.vue

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

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

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

Loading…
Cancel
Save