Browse Source

Merge branch 'dev-shuju' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev-shuju

shibei_master
jiangyy 4 years ago
parent
commit
d37eba727a
  1. 2
      src/assets/scss/modules/visual/incident-info.scss
  2. 135
      src/views/components/foldText.vue
  3. 240
      src/views/modules/visual/basicinfo/cpts/incident-info.vue
  4. 293
      src/views/modules/visual/basicinfo/cpts/topic-info.vue
  5. 10
      src/views/modules/visual/cpts/line-chart.vue

2
src/assets/scss/modules/visual/incident-info.scss

@ -176,6 +176,8 @@
} }
.m-line { .m-line {
min-width: 400px;
.stat { .stat {
margin: 20px 0 10px; margin: 20px 0 10px;
display: flex; display: flex;

135
src/views/components/foldText.vue

@ -0,0 +1,135 @@
<template>
<div class="m-fold_text" :class="initOk ? '' : 'z-init'">
<div
id="cnt"
ref="foldSlot"
class="fold_text-cnt"
:class="isFolded ? 'z-fold-' + row : ''"
>
<slot></slot>
</div>
<div v-if="!noNeedFold" class="fold_text-btn" @click="shiftFold">
{{ isFolded ? "展开" : "收起" }}
</div>
</div>
</template>
<script>
import nextTick from "dai-js/tools/nextTick";
export default {
name: "ResiSearch",
props: {
row: {
type: Number,
default: 2,
},
lineHeight: {
type: Number,
default: 24,
},
},
data() {
return {
initOk: false,
isFolded: false,
noNeedFold: false,
};
},
computed: {},
watch: {},
created() {
this.init();
},
methods: {
async init() {
await nextTick();
const height = await this.$refs.foldSlot.offsetHeight;
const { row, lineHeight } = this;
let noNeedFold = height / row < lineHeight;
this.noNeedFold = noNeedFold;
this.isFolded = !noNeedFold;
this.initOk = true;
},
shiftFold() {
let { isFolded } = this;
this.isFolded = !isFolded;
},
},
};
</script>
<style lang="scss" scope>
//
@mixin cs {
&::after {
display: block;
visibility: hidden;
clear: both;
overflow: hidden;
height: 0;
content: "";
}
}
//
@mixin toe {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
word-wrap: normal;
}
//
@mixin toeM($num) {
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: $num;
-webkit-box-orient: vertical;
}
.m-fold_text {
@include cs;
&.z-init {
background-color: rgba(#000, 0.05);
> view {
visibility: hidden;
}
}
.fold_text-cnt {
&.z-fold-1 {
@include toe;
}
&.z-fold-2 {
@include toeM(2);
}
&.z-fold-3 {
@include toeM(3);
}
&.z-fold-4 {
@include toeM(4);
}
&.z-fold-5 {
@include toeM(5);
}
}
.fold_text-btn {
float: right;
margin-right: -4px;
padding: 0 5px;
line-height: 20px;
color: #0c81fe;
cursor: pointer;
}
}
</style>

240
src/views/modules/visual/basicinfo/cpts/incident-info.vue

@ -15,7 +15,12 @@
<div class="info-title">事件内容</div> <div class="info-title">事件内容</div>
<div class="info-content">{{ info.eventContent }}</div> <div class="info-content">{{ info.eventContent }}</div>
<div class="info-pics"> <div class="info-pics">
<img :src="src" :key="src" v-for="src in info.eventImgs" /> <img
:src="src"
:key="src"
v-for="src in info.eventImgs"
@click="watchImg(src)"
/>
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span>提交时间</span> <span>提交时间</span>
@ -72,6 +77,7 @@
:userName="yanPan.icUserName" :userName="yanPan.icUserName"
:singleList="yanPan.categoryList" :singleList="yanPan.categoryList"
@user="toUserInfo" @user="toUserInfo"
@project="toProjectInfo"
/> />
<screen-loading v-else>加载中</screen-loading> <screen-loading v-else>加载中</screen-loading>
</div> </div>
@ -110,21 +116,21 @@
<span>当前处理部门</span> <span>当前处理部门</span>
<span>{{ projectInfo.departmentNameList.join("、") }}</span> <span>{{ projectInfo.departmentNameList.join("、") }}</span>
</div> </div>
<div class="info-prop" v-if="projectCate.length>0"> <div class="info-prop" v-if="projectCate.length > 0">
<span>分类</span> <span>分类</span>
<div> <fold-text :row="3">
<div :key="item.name" v-for="item in projectCate"> <div :key="item.name" v-for="item in projectCate">
{{ item.name }} {{ item.name }}
</div> </div>
</div> </fold-text>
</div> </div>
<div class="info-prop" v-if="projectTag.length>0"> <div class="info-prop" v-if="projectTag.length > 0">
<span>标签</span> <span>标签</span>
<div> <fold-text :row="3">
<div :key="item.name" v-for="item in projectTag"> <div :key="item.name" v-for="item in projectTag">
{{ item.name }} {{ item.name }}
</div> </div>
</div> </fold-text>
</div> </div>
</div> </div>
@ -206,8 +212,111 @@ import screenLoading from "@/views/modules/visual/cpts/loading";
import { requestPost } from "@/js/dai/request"; import { requestPost } from "@/js/dai/request";
import cptTb from "@/views/modules/visual/cpts/tb"; import cptTb from "@/views/modules/visual/cpts/tb";
import analyse from "@/views/modules/visual/cpts/analyse"; import analyse from "@/views/modules/visual/cpts/analyse";
import foldText from "@/views/components/foldText";
import dateFormat from "dai-js/tools/dateFormat"; import dateFormat from "dai-js/tools/dateFormat";
function iniData() {
return {
groupList: [
{ label: "研判分析" },
{ label: "查看回复" },
{ label: "查看项目" },
],
groupIndex: 0,
startGroupIndex: 0,
info: {
eventTime: "",
eventContent: "",
eventAddress: "",
gridName: "",
isClosed: true,
isResolve: true,
isRollback: true,
eventImgs: [],
eventPerson: [],
eventOrg: [],
eventPeopleName: "",
projectInfo: {
projectId: "",
operationName: "",
operationTime: "",
projectDeclare: "",
},
},
comment: {
loading: true,
colList: [
{
align: "center",
width: "20%",
},
{
align: "center",
width: "30%",
},
{
align: "left",
width: "50%",
},
],
header: ["回复者", "回复时间", "回复内容"],
list: [],
},
projectProcess: [],
projectInfo: {
backGround: "",
departmentList: [
// { departmentName: "-", staffList: [""] },
],
departmentNameList: [],
internalRemark: "",
isSend: false,
locateAddress: "",
locateDimension: "",
locateLongitude: "",
origin: "",
originId: "",
platformIds: [],
processable: false,
projectId: "",
projectStatus: "pending",
projectTitle: "",
publicReply: "",
returnable: false,
},
projectCate: [],
projectTag: [],
yanPan: {
loading: false,
icResiUserId: "",
houseId: "",
icUserName: "",
epmetUserIdList: [],
houseUserList: [
// {
// icResiUserId: '',
// icUserName: '',
// }
],
categoryList: [],
projectData: [
// {
// firstCategoryCode: '',
// firstCategoryName: '',
// projectList: [],
// }
],
},
};
}
export default { export default {
name: "demandInfo", name: "demandInfo",
props: { props: {
@ -230,114 +339,19 @@ export default {
cptTb, cptTb,
analyse, analyse,
screenLoading, screenLoading,
foldText,
}, },
data() { data: iniData,
return {
groupList: [
{ label: "研判分析" },
{ label: "查看回复" },
{ label: "查看项目" },
],
groupIndex: 0,
startGroupIndex: 0,
info: {
eventTime: "",
eventContent: "",
eventAddress: "",
gridName: "",
isClosed: true,
isResolve: true,
isRollback: true,
eventImgs: [],
eventPerson: [],
eventOrg: [],
eventPeopleName: "",
projectInfo: {
projectId: "",
operationName: "",
operationTime: "",
projectDeclare: "",
},
},
comment: {
loading: true,
colList: [
{
align: "center",
width: "20%",
},
{
align: "center",
width: "30%",
},
{
align: "left",
width: "50%",
},
],
header: ["回复者", "回复时间", "回复内容"],
list: [],
},
projectProcess: [],
projectInfo: {
backGround: "",
departmentList: [
// { departmentName: "-", staffList: [""] },
],
departmentNameList: [],
internalRemark: "",
isSend: false,
locateAddress: "",
locateDimension: "",
locateLongitude: "",
origin: "",
originId: "",
platformIds: [],
processable: false,
projectId: "",
projectStatus: "pending",
projectTitle: "",
publicReply: "",
returnable: false,
},
projectCate: [],
projectTag: [],
yanPan: {
loading: false,
icResiUserId: "",
houseId: "",
icUserName: "",
epmetUserIdList: [],
houseUserList: [
// {
// icResiUserId: '',
// icUserName: '',
// }
],
categoryList: [],
projectData: [
// {
// firstCategoryCode: '',
// firstCategoryName: '',
// projectList: [],
// }
],
},
};
},
computed: {}, computed: {},
watch: { watch: {
resiEventId() { resiEventId() {
let data = iniData();
Object.keys(data).forEach((k) => {
this[k] = data[k];
});
this.getApiData(); this.getApiData();
}, },
}, },
@ -347,6 +361,10 @@ export default {
}, },
methods: { methods: {
watchImg(src) {
window.open(src);
},
addStartGroupIndex() { addStartGroupIndex() {
const { startGroupIndex, groupList } = this; const { startGroupIndex, groupList } = this;
if (startGroupIndex < groupList.length - 9) { if (startGroupIndex < groupList.length - 9) {
@ -496,6 +514,7 @@ export default {
statusName: statusName:
subItem.projectStatus == "pending" ? "待处理" : "结案", subItem.projectStatus == "pending" ? "待处理" : "结案",
projectId: subItem.projectId, projectId: subItem.projectId,
resiEventId: subItem.resiEventId,
}; };
}), }),
}; };
@ -512,6 +531,11 @@ export default {
path: `/main-shuju/visual-basicinfo-people/${item.icResiUserId}`, path: `/main-shuju/visual-basicinfo-people/${item.icResiUserId}`,
}); });
}, },
toProjectInfo(item) {
console.log(item);
this.resiEventId = item.resiEventId;
},
}, },
}; };
</script> </script>

293
src/views/modules/visual/basicinfo/cpts/topic-info.vue

@ -15,7 +15,12 @@
<div class="info-title">话题内容</div> <div class="info-title">话题内容</div>
<div class="info-content">{{ info.topicContent }}</div> <div class="info-content">{{ info.topicContent }}</div>
<div class="info-pics"> <div class="info-pics">
<img :src="src" :key="src" v-for="src in info.topicImgs" /> <img
:src="src"
:key="src"
v-for="src in info.topicImgs"
@click="watchImg(src)"
/>
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span>发布时间</span> <span>发布时间</span>
@ -68,6 +73,7 @@
:userName="yanPan.icUserName" :userName="yanPan.icUserName"
:singleList="yanPan.categoryList" :singleList="yanPan.categoryList"
@user="toUserInfo" @user="toUserInfo"
@project="toProjectInfo"
/> />
<screen-loading v-else>加载中</screen-loading> <screen-loading v-else>加载中</screen-loading>
</div> </div>
@ -137,7 +143,10 @@
</div> </div>
</div> </div>
<line-chart :list="issueChartData" /> <line-chart
v-if="issueChartData.length > 0"
:list="issueChartData"
/>
</div> </div>
</div> </div>
<div v-else class="m-hint"> <div v-else class="m-hint">
@ -169,19 +178,19 @@
</div> </div>
<div class="info-prop" v-if="projectCate.length > 0"> <div class="info-prop" v-if="projectCate.length > 0">
<span>分类</span> <span>分类</span>
<div> <fold-text :row="3">
<div :key="item.name" v-for="item in projectCate"> <div :key="item.name" v-for="item in projectCate">
{{ item.name }} {{ item.name }}
</div> </div>
</div> </fold-text>
</div> </div>
<div class="info-prop" v-if="projectTag.length > 0"> <div class="info-prop" v-if="projectTag.length > 0">
<span>标签</span> <span>标签</span>
<div> <fold-text :row="3">
<div :key="item.name" v-for="item in projectTag"> <div :key="item.name" v-for="item in projectTag">
{{ item.name }} {{ item.name }}
</div> </div>
</div> </fold-text>
</div> </div>
</div> </div>
@ -264,8 +273,136 @@ import { requestPost } from "@/js/dai/request";
import cptTb from "@/views/modules/visual/cpts/tb"; import cptTb from "@/views/modules/visual/cpts/tb";
import lineChart from "@/views/modules/visual/cpts/line-chart"; import lineChart from "@/views/modules/visual/cpts/line-chart";
import analyse from "@/views/modules/visual/cpts/analyse"; import analyse from "@/views/modules/visual/cpts/analyse";
import foldText from "@/views/components/foldText";
import dateFormat from "dai-js/tools/dateFormat"; import dateFormat from "dai-js/tools/dateFormat";
function iniData() {
return {
groupList: [
{ label: "研判分析" },
{ label: "话题评论" },
{ label: "查看议题" },
{ label: "查看项目" },
],
groupIndex: 0,
startGroupIndex: 0,
info: {
badgeList: [],
closeDetail: {
closeUserName: "",
closeDateTime: "-1",
closeReason: "",
closeUserHeadPhoto: "",
},
dimension: "",
hiddenDetail: null,
issueId: "",
longitude: "",
releaseAddress: "",
releaseTime: "",
releaseUserHeadPhoto: "",
releaseUserName: "",
shiftIssueFlag: true,
topicContent: "",
topicId: "",
topicImgs: [],
topicStatus: "discussing",
},
comment: {
loading: true,
colList: [
{
align: "center",
width: "20%",
},
{
align: "center",
width: "20%",
},
{
align: "left",
width: "50%",
},
{
align: "left",
width: "10%",
},
],
header: ["评论者", "评论时间", "评论内容", "评论图片"],
list: [],
},
issueInfo: {
attitude: "",
belongsGridName: "",
issueIdea: "",
issueInitiator: "",
issueStatus: "",
issueSuggestion: "",
issueTitle: "",
joinVote: true,
projectId: "",
projectStatus: false,
publishIdeaFlag: false,
},
issueTrend: {},
issueChartData: [],
projectProcess: [],
projectInfo: {
backGround: "",
departmentList: [
// { departmentName: "-", staffList: [""] },
],
departmentNameList: [],
internalRemark: "",
isSend: false,
locateAddress: "",
locateDimension: "",
locateLongitude: "",
origin: "",
originId: "",
platformIds: [],
processable: false,
projectId: "",
projectStatus: "pending",
projectTitle: "",
publicReply: "",
returnable: false,
},
projectCate: [],
projectTag: [],
yanPan: {
loading: false,
icResiUserId: "",
houseId: "",
icUserName: "",
epmetUserIdList: [],
houseUserList: [
// {
// icResiUserId: '',
// icUserName: '',
// }
],
categoryList: [],
projectData: [
// {
// firstCategoryCode: '',
// firstCategoryName: '',
// projectList: [],
// }
],
},
};
}
export default { export default {
name: "demandInfo", name: "demandInfo",
props: { props: {
@ -289,139 +426,19 @@ export default {
analyse, analyse,
screenLoading, screenLoading,
lineChart, lineChart,
foldText,
}, },
data() { data: iniData,
return {
groupList: [
{ label: "研判分析" },
{ label: "话题评论" },
{ label: "查看议题" },
{ label: "查看项目" },
],
groupIndex: 0,
startGroupIndex: 0,
info: {
badgeList: [],
closeDetail: {
closeUserName: "",
closeDateTime: "-1",
closeReason: "",
closeUserHeadPhoto: "",
},
dimension: "",
hiddenDetail: null,
issueId: "",
longitude: "",
releaseAddress: "",
releaseTime: "",
releaseUserHeadPhoto: "",
releaseUserName: "",
shiftIssueFlag: true,
topicContent: "",
topicId: "",
topicImgs: [],
topicStatus: "discussing",
},
comment: {
loading: true,
colList: [
{
align: "center",
width: "20%",
},
{
align: "center",
width: "20%",
},
{
align: "left",
width: "50%",
},
{
align: "left",
width: "10%",
},
],
header: ["评论者", "评论时间", "评论内容", "评论图片"],
list: [],
},
issueInfo: {
attitude: "",
belongsGridName: "",
issueIdea: "",
issueInitiator: "",
issueStatus: "",
issueSuggestion: "",
issueTitle: "",
joinVote: true,
projectId: "",
projectStatus: false,
publishIdeaFlag: false,
},
issueTrend: {},
issueChartData: [],
projectProcess: [],
projectInfo: {
backGround: "",
departmentList: [
// { departmentName: "-", staffList: [""] },
],
departmentNameList: [],
internalRemark: "",
isSend: false,
locateAddress: "",
locateDimension: "",
locateLongitude: "",
origin: "",
originId: "",
platformIds: [],
processable: false,
projectId: "",
projectStatus: "pending",
projectTitle: "",
publicReply: "",
returnable: false,
},
projectCate: [],
projectTag: [],
yanPan: {
loading: false,
icResiUserId: "",
houseId: "",
icUserName: "",
epmetUserIdList: [],
houseUserList: [
// {
// icResiUserId: '',
// icUserName: '',
// }
],
categoryList: [],
projectData: [
// {
// firstCategoryCode: '',
// firstCategoryName: '',
// projectList: [],
// }
],
},
};
},
computed: {}, computed: {},
watch: { watch: {
topicId() { topicId() {
let data = iniData();
Object.keys(data).forEach((k) => {
this[k] = data[k];
});
this.getApiData(); this.getApiData();
}, },
}, },
@ -431,6 +448,10 @@ export default {
}, },
methods: { methods: {
watchImg(src) {
window.open(src);
},
addStartGroupIndex() { addStartGroupIndex() {
const { startGroupIndex, groupList } = this; const { startGroupIndex, groupList } = this;
if (startGroupIndex < groupList.length - 9) { if (startGroupIndex < groupList.length - 9) {
@ -510,7 +531,7 @@ export default {
comment: { srcList }, comment: { srcList },
} = this; } = this;
if (srcList[index] && srcList[index].imageList) { if (srcList[index] && srcList[index].imageList) {
window.open(srcList[index].imageList[0].url); this.watchImg(srcList[index].imageList[0].url);
} }
}, },
@ -652,6 +673,7 @@ export default {
statusName: statusName:
subItem.projectStatus == "pending" ? "待处理" : "结案", subItem.projectStatus == "pending" ? "待处理" : "结案",
projectId: subItem.projectId, projectId: subItem.projectId,
topicId: subItem.topicId,
}; };
}), }),
}; };
@ -668,6 +690,11 @@ export default {
path: `/main-shuju/visual-basicinfo-people/${item.icResiUserId}`, path: `/main-shuju/visual-basicinfo-people/${item.icResiUserId}`,
}); });
}, },
toProjectInfo(item) {
console.log(item);
this.topicId = item.topicId;
},
}, },
}; };
</script> </script>

10
src/views/modules/visual/cpts/line-chart.vue

@ -1,6 +1,6 @@
<template> <template>
<div class="m-chart"> <div class="m-chart">
<canvas id="myChart" width="400" height="260"></canvas> <canvas id="myChart" :width="width" :height="height" />
</div> </div>
</template> </template>
@ -189,6 +189,14 @@ export default {
return {}; return {};
}, },
}, },
width: {
type: Number,
default: 400,
},
height: {
type: Number,
default: 260,
},
}, },
data() { data() {
return { return {

Loading…
Cancel
Save