diff --git a/project/fengdu/AppBIBoard/AppBIBoard.vue b/project/fengdu/AppBIBoard/AppBIBoard.vue index 299621d6..70b581d4 100644 --- a/project/fengdu/AppBIBoard/AppBIBoard.vue +++ b/project/fengdu/AppBIBoard/AppBIBoard.vue @@ -14,7 +14,7 @@
群活跃率(7日)
- +
@@ -23,9 +23,9 @@
人员活跃(7日)
- +
-
@@ -62,8 +62,8 @@
@@ -101,6 +101,22 @@
+ +
+ + + + + + + + + + +
+ + + @@ -115,11 +131,17 @@ import AiWrapper from "dui/packages/basic/AiWrapper.vue"; import Vue from "vue"; import {scrollBoard} from "@jiaminghi/data-view" import FdMap from "./components/fdMap.vue"; +import FdDialog from "./components/fdDialog.vue"; +import FdItem from "./components/fdItem.vue"; +import FdScrollbar from "./components/fdScrollbar.vue"; export default { name: "AppBIBoard", label: "丰都指挥舱", - components: {FdMap, AiWrapper, AiInfoItem, AiHighlight, AiEchart, FdCard, FengduHead, AiFitView}, + components: { + FdScrollbar, + FdItem, FdDialog, FdMap, AiWrapper, AiInfoItem, AiHighlight, AiEchart, FdCard, FengduHead, AiFitView + }, props: { instance: Function, dict: Object @@ -129,12 +151,7 @@ export default { areaId: '', scale: 1, fullscreen: false, - sta: { - 群总数: 5118, - 群主人数: 956, - '活跃群成员(30天)': '214,098', - '群消息(30天)': '1,214,098', - }, + sta: {}, chart: { legend: {show: false}, series: { @@ -186,9 +203,10 @@ export default { }, }, chartData: [ - {name: "活跃居民群", value: 3502}, - {name: "全部居民群", value: 5118}, + // {name: "活跃居民群", value: 3502}, + // {name: "全部居民群", value: 5118}, ], + chartData2: [], volunteers: { 团队数量: 125, 志愿者数量: 13, @@ -257,18 +275,28 @@ export default { // ['
2023-10-18 14:55:32
', '三角路社区居民-陈思宇在丰收号小程序中进行了物品兑换'], ] }, - shortcut: 0, + shortcut: 3, GongdeBank: {}, - map: null + map: null, + dialog: false, + detail: {} } }, computed: { tablePages: v => Math.ceil(v.volunteerConfig.data.length / v.volunteerConfig.rowNum) || 0, - shortcuts: () => Object.assign({0: '昨日', 1: '近七天', 2: '近30天', 3: '近一年'}) + shortcuts: () => [ + {k: '3', v: '昨日'}, + {k: '0', v: '近七天'}, + {k: '1', v: '近30天'}, + {k: '2', v: '近一年'}, + ] }, watch: { shortcut() { this.getGdyh(this.areaId) + }, + dialog(v) { + !v && (this.detail = {}) } }, methods: { @@ -278,8 +306,8 @@ export default { handleSetting(v) { this.$refs.fddv.dialog = v }, - calcProgress() { - const value = (this.chartData[0].value / this.chartData.at(-1).value * 100).toFixed(0) + calcProgress(data = []) { + const value = data.length > 0 ? (data[0].value / data.at(-1).value * 100).toFixed(0) : 0 return [{value}] }, watchTablePageChange(c = 0) { @@ -312,15 +340,29 @@ export default { getRealTimeDynamic(areaId) { this.instance.post("/app/fdDiy/realTimeDynamic", null, {params: {areaId}}).then(res => { if (res?.data) { - const data = res.data.map(e => [`
${e.eventTime}
`, `
${e.bizId ? e.description.replace(e.type, `
${e.type}
`) : e.description}
`]) - this.realtimeEvents = {...this.realtimeEvents, data, meta: res.data} + const meta = res.data, + data = meta.map(e => [`
${e.eventTime}
`, `
${e.bizId ? e.description.replace(e.type, `
${e.type}
`) : e.description}
`]) + this.realtimeEvents = {...this.realtimeEvents, data, meta} } }) }, getWxGroupOverview(areaId) { this.instance.post("/app/fdDiy/wxGroupOverview", null, {params: {areaId}}).then(res => { if (res?.data) { - + const {群数量 = 0, 群主人数 = 0, 群成员数量 = 0} = res.data + this.sta = { + 群数量, 群主人数, + '群人员活跃数(30天)': Number(res.data['群人员活跃数(30天)']).toLocaleString(), + '群消息数(30天)': Number(res.data['群消息数(30天)']).toLocaleString(), + } + this.chartData = [ + {name: "活跃居民群", value: Math.ceil(res.data["活跃居民群数量(7天)"] / 7)}, + {name: "全部居民群", value: 群数量}, + ] + this.chartData2 = [ + {name: "活跃居民数", value: res.data["活跃群成员数量(7天)"]}, + {name: "群成员数量", value: 群成员数量}, + ] } }) }, @@ -360,22 +402,83 @@ export default { const row = this.realtimeEvents.meta[rowIndex] if (row.bizId) { const action = { - 积分申请: "", - 物品兑换: "", - 精选动态: "", + 积分申请: "/app/appintegraluserapply/queryDetailById", + 物品兑换: "/app/appintegralsupermarketorder/queryDetailById", + 精选动态: "/app/appcontentinfo/queryDetailById", }[row.type] this.instance.post(action, null, {params: {id: row.bizId}}).then(res => { if (res?.data) { - + this.dialog = true + if (row.type == '积分申请') { + const { + applyItemName: 事件类型, + integralUserName: 申请人, + areaName: 所属地区, + createTime: 申请时间, + girdName: 所属网格, + content: 事件描述, + applyIntegral: 积分值, + phone: 手机号, + status, + files + } = res.data + this.detail.imgs = files?.map(e => e.accessUrl) + this.detail.form = { + 事件类型, + 申请人, + 所属地区, + 申请时间, + 事件描述, + 积分值, + 手机号, + 所属网格, + 状态: `
${this.dict.getLabel('appIntegralApplyEventStatus', status)}
` + } + } else if (row.type == '物品兑换') { + const { + status, + examineUserName: 核销人, + examineTime: 核销时间, + goodsPicUrl, + integralUserName: 兑换人, + goodsTitle: 兑换商品, + quantity: 数量, + usedIntegral: 消耗积分, + createTime: 兑换时间, + agentOrder + } = res.data + this.detail.imgs = [goodsPicUrl].flat().filter(Boolean) || [] + this.detail.form = { + 兑换人, + 兑换商品, + 数量, + 消耗积分, + 是否代兑换: this.dict.getLabel("yesOrNo", agentOrder), + 兑换时间, + 状态: `
${this.dict.getLabel('appIntegralApplyEventStatus', status)}
`, + 核销人, + 核销时间 + } + } else if (row.type == '精选动态') { + const {content, files, title, createUserName, girdName} = res.data + this.detail.imgs = files?.map(e => e.accessUrl) + this.detail.content = content + this.detail.header = ` ${title} +
+
${girdName}
+
${createUserName}
+
` + } + this.detail = {eventType: row.type, ...this.detail} } }) } - console.log(row) } }, created() { Vue.use(scrollBoard) this.getData() + this.dict.load('appIntegralApplyEventStatus', 'yesOrNo') }, mounted() { this.watchTablePageChange() @@ -602,5 +705,32 @@ export default { } } } + + :deep(.statusTag ) { + padding: 2px 8px; + color: #FFB300; + background: #ffcb5224; + + &.success { + color: #07B794; + background: #13f6c924; + } + } + + :deep(.contentHead) { + width: 100%; + height: 89px; + background: url("./assets/contentHead.png") no-repeat; + margin-top: 16px; + margin-bottom: 14px; + padding: 16px; + background-size: 100% 89px; + + & > b { + font-size: 16px; + color: #02FEFF; + letter-spacing: 0; + } + } } diff --git a/project/fengdu/AppBIBoard/assets/closeIcon.png b/project/fengdu/AppBIBoard/assets/closeIcon.png new file mode 100644 index 00000000..1c5363d0 Binary files /dev/null and b/project/fengdu/AppBIBoard/assets/closeIcon.png differ diff --git a/project/fengdu/AppBIBoard/assets/contentHead.png b/project/fengdu/AppBIBoard/assets/contentHead.png new file mode 100644 index 00000000..5f021748 Binary files /dev/null and b/project/fengdu/AppBIBoard/assets/contentHead.png differ diff --git a/project/fengdu/AppBIBoard/assets/dialogBg.png b/project/fengdu/AppBIBoard/assets/dialogBg.png new file mode 100644 index 00000000..e06f8ba7 Binary files /dev/null and b/project/fengdu/AppBIBoard/assets/dialogBg.png differ diff --git a/project/fengdu/AppBIBoard/components/fdDialog.vue b/project/fengdu/AppBIBoard/components/fdDialog.vue new file mode 100644 index 00000000..ec1782f4 --- /dev/null +++ b/project/fengdu/AppBIBoard/components/fdDialog.vue @@ -0,0 +1,71 @@ + + + diff --git a/project/fengdu/AppBIBoard/components/fdItem.vue b/project/fengdu/AppBIBoard/components/fdItem.vue new file mode 100644 index 00000000..675a9477 --- /dev/null +++ b/project/fengdu/AppBIBoard/components/fdItem.vue @@ -0,0 +1,50 @@ + + + diff --git a/project/fengdu/AppBIBoard/components/fdMap.vue b/project/fengdu/AppBIBoard/components/fdMap.vue index 9d149616..b516d401 100644 --- a/project/fengdu/AppBIBoard/components/fdMap.vue +++ b/project/fengdu/AppBIBoard/components/fdMap.vue @@ -38,7 +38,9 @@ export default { }, label: { show: true, - color: '#02FEFF' + color: '#02FEFF', + fontSize: 16, + fontFamily: 'PingFang-SC' }, emphasis: { disabled: true diff --git a/project/fengdu/AppBIBoard/components/fdScrollbar.vue b/project/fengdu/AppBIBoard/components/fdScrollbar.vue new file mode 100644 index 00000000..386bcb31 --- /dev/null +++ b/project/fengdu/AppBIBoard/components/fdScrollbar.vue @@ -0,0 +1,38 @@ + + + diff --git a/ui/lib/styles/common.scss b/ui/lib/styles/common.scss index 1df54672..0047d587 100644 --- a/ui/lib/styles/common.scss +++ b/ui/lib/styles/common.scss @@ -318,6 +318,10 @@ div[flex], .flex { &.center { justify-content: center; } + + &.normal { + align-items: unset; + } } .fill {