作业计划首页搭建

This commit is contained in:
BianLzhaoMin 2024-10-12 16:03:45 +08:00
parent 35c2972e15
commit 078d711a72
15 changed files with 1532 additions and 912 deletions

View File

@ -5,7 +5,7 @@
"pages": [
// pageshttps://uniapp.dcloud.io/collocation/pages
// {
// "path": "pages/YNEduApp/index/index",
// "path": "pages/YNEduApp/index/index",
// "style": {
// "navigationStyle" : "custom"
// }
@ -200,375 +200,437 @@
}
},
{
"path" : "pages/YNEduApp/index/notices",
"style" :
{
"navigationBarTitleText": "通知公告"
}
"path": "pages/YNEduApp/index/notices",
"style": {
"navigationBarTitleText": "通知公告"
}
},
{
"path" : "pages/YNEduApp/learnProj/imageStudy",
"style" :
{
"navigationBarTitleText" : "图片学习"
}
"path": "pages/YNEduApp/learnProj/imageStudy",
"style": {
"navigationBarTitleText": "图片学习"
}
},
////-
{//
"path": "pages/realName/index/index",
"style": {
"navigationStyle": "custom"
}
},
{//
"path": "pages/realName/workbench/index",
"style": {
"navigationStyle": "custom"
}
},
//
{//
"path": "pages/realName/workbench/personEnter/index",
"style": {
"navigationStyle": "custom"
}
},
{//
"path": "pages/realName/workbench/personEnter/addPeople",
"style": {
"navigationStyle": "custom"
}
},
{//
"path": "pages/realName/workbench/personEnter/searchPeople",
"style": {
"navigationStyle": "custom"
}
},
{//
"path": "pages/realName/workbench/personEnter/editPeople",
"style": {
"navigationStyle": "custom"
}
},
{//
"path": "pages/realName/workbench/personEnter/facePeople",
"style": {
"navigationStyle": "custom"
}
},
{//
"path": "pages/realName/workbench/peopleLibrary/index",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workbench/peopleLibrary/detail",
"style": {
"navigationStyle": "custom"
}
},
//
{//-
"path": "pages/realName/workbench/contractWitness/index",
"style": {
"navigationStyle": "custom"
}
},
//
{//-
"path": "pages/realName/workbench/wageWitness/index",
"style": {
"navigationStyle": "custom"
}
},
//
{//
"path": "pages/realName/workbench/wageRecord/index",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workbench/wageRecord/detail",
"style": {
"navigationStyle": "custom"
}
},
//
{//-
"path": "pages/realName/workbench/electronicContract/contractVideo",
"style": {
"navigationStyle": "custom"
}
},
{//-pdf
"path": "pages/realName/workbench/electronicContract/contractPdf",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workbench/electronicContract/contractFill",
"style": {
"navigationStyle": "custom"
}
},
{//-pdf
"path": "pages/realName/workbench/electronicContract/contractPdfConfirm",
"style": {
"navigationStyle": "custom"
}
},
{//
"path": "pages/realName/workbench/electronicContractSign/index",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workbench/electronicContractSign/contractPdf",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workbench/electronicContractSign/contractVideo",
"style": {
"navigationStyle": "custom"
}
},
{//
"path": "pages/realName/workbench/electronicContractExam/index",
"style": {
"navigationStyle": "custom"
}
},
{//
"path": "pages/realName/workbench/electronicContractExam/contractPdf",
"style": {
"navigationStyle": "custom"
}
},
{//
"path": "pages/realName/workbench/safeguarding/index",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workbench/safeguarding/detail",
"style": {
"navigationStyle": "custom"
}
},
{//
"path": "pages/realName/workbench/dayPlan/index",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workbench/dayPlan/detail",
"style": {
"navigationStyle": "custom"
}
},
{//
"path": "pages/realName/workbench/exam/index",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workbench/exam/train",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workbench/exam/trainPdf",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workbench/exam/trainVideo",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workbench/exam/examInfo",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workbench/exam/exam",
"style": {
"navigationStyle": "custom"
}
},
{//
"path": "pages/realName/workbench/appearApply/index",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workbench/appearApply/evaluate",
"style": {
"navigationStyle": "custom"
}
},
{//
"path": "pages/realName/workbench/appearExam/index",
"style": {
"navigationStyle": "custom"
}
},
{//
"path": "pages/realName/workbench/workPlan/index",
"style": {
"navigationStyle": "custom"
}
},
{//
"path": "pages/realName/workbench/qualifications/index",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workbench/qualifications/search",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workbench/qualifications/detail",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workbench/qualifications/listCertificatePdf",
"style": {
"navigationStyle": "custom"
}
},
{//退-
"path": "pages/realName/workbench/outPerson/index",
"style": {
"navigationStyle": "custom"
}
},
{//退-退
"path": "pages/realName/workbench/outPerson/outList",
"style": {
"navigationStyle": "custom"
}
},
{//
"path": "pages/realName/workbench/cutToPlace/index",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workbench/cutToPlace/record",
"style": {
"navigationStyle": "custom"
}
},
{//
"path": "pages/realName/workAttendance/index",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workAttendance/clock/index",
"style": {
"navigationStyle": "custom"
}
},
{//--
"path": "pages/realName/workAttendance/clock/bMap",
"style": {
"navigationStyle": "custom"
}
},{//--
"path": "pages/realName/workAttendance/clock/workLocation",
"style": {
"navigationStyle": "custom"
}
},
{//--
"path": "pages/realName/workAttendance/clock/checkMap",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workAttendance/tempClock/index",
"style": {
"navigationStyle": "custom"
}
}, {//-
"path": "pages/realName/workAttendance/tempClock/tempPeopleList",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workAttendance/tempClock/tempPeopleList",
"style": {
"navigationStyle": "custom"
}
},
{//-
"path": "pages/realName/workAttendance/managementClock/index",
"style": {
"navigationStyle": "custom"
}
},
{//--
"path": "pages/realName/workAttendance/statistics/index",
"style": {
"navigationStyle": "custom"
}
},
{//--
"path": "pages/realName/workAttendance/statistics/detail",
"style": {
"navigationStyle": "custom"
}
},
{//
"path": "pages/realName/my/my",
"style": {
"navigationStyle": "custom"
}
},{//-
"path": "pages/realName/my/news",
"style": {
"navigationStyle": "custom"
}
},{//-
"path": "pages/realName/my/myUpload",
"style": {
"navigationStyle": "custom"
}
},{//-
"path": "pages/realName/my/myDownload",
"style": {
"navigationStyle": "custom"
}
},
////-
{
//
"path": "pages/realName/index/index",
"style": {
"navigationStyle": "custom"
}
},
{
//
"path": "pages/realName/workbench/index",
"style": {
"navigationStyle": "custom"
}
},
//
{
//
"path": "pages/realName/workbench/personEnter/index",
"style": {
"navigationStyle": "custom"
}
},
{
//
"path": "pages/realName/workbench/personEnter/addPeople",
"style": {
"navigationStyle": "custom"
}
},
{
//
"path": "pages/realName/workbench/personEnter/searchPeople",
"style": {
"navigationStyle": "custom"
}
},
{
//
"path": "pages/realName/workbench/personEnter/editPeople",
"style": {
"navigationStyle": "custom"
}
},
{
//
"path": "pages/realName/workbench/personEnter/facePeople",
"style": {
"navigationStyle": "custom"
}
},
{
//
"path": "pages/realName/workbench/peopleLibrary/index",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workbench/peopleLibrary/detail",
"style": {
"navigationStyle": "custom"
}
},
//
{
//-
"path": "pages/realName/workbench/contractWitness/index",
"style": {
"navigationStyle": "custom"
}
},
//
{
//-
"path": "pages/realName/workbench/wageWitness/index",
"style": {
"navigationStyle": "custom"
}
},
//
{
//
"path": "pages/realName/workbench/wageRecord/index",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workbench/wageRecord/detail",
"style": {
"navigationStyle": "custom"
}
},
//
{
//-
"path": "pages/realName/workbench/electronicContract/contractVideo",
"style": {
"navigationStyle": "custom"
}
},
{
//-pdf
"path": "pages/realName/workbench/electronicContract/contractPdf",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workbench/electronicContract/contractFill",
"style": {
"navigationStyle": "custom"
}
},
{
//-pdf
"path": "pages/realName/workbench/electronicContract/contractPdfConfirm",
"style": {
"navigationStyle": "custom"
}
},
{
//
"path": "pages/realName/workbench/electronicContractSign/index",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workbench/electronicContractSign/contractPdf",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workbench/electronicContractSign/contractVideo",
"style": {
"navigationStyle": "custom"
}
},
{
//
"path": "pages/realName/workbench/electronicContractExam/index",
"style": {
"navigationStyle": "custom"
}
},
{
//
"path": "pages/realName/workbench/electronicContractExam/contractPdf",
"style": {
"navigationStyle": "custom"
}
},
{
//
"path": "pages/realName/workbench/safeguarding/index",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workbench/safeguarding/detail",
"style": {
"navigationStyle": "custom"
}
},
{
//
"path": "pages/realName/workbench/dayPlan/index",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workbench/dayPlan/detail",
"style": {
"navigationStyle": "custom"
}
},
{
//
"path": "pages/realName/workbench/exam/index",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workbench/exam/train",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workbench/exam/trainPdf",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workbench/exam/trainVideo",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workbench/exam/examInfo",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workbench/exam/exam",
"style": {
"navigationStyle": "custom"
}
},
{
//
"path": "pages/realName/workbench/appearApply/index",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workbench/appearApply/evaluate",
"style": {
"navigationStyle": "custom"
}
},
{
//
"path": "pages/realName/workbench/appearExam/index",
"style": {
"navigationStyle": "custom"
}
},
{
//
"path": "pages/realName/workbench/workPlan/index",
"style": {
"navigationStyle": "custom"
}
},
{
//
"path": "pages/realName/workbench/qualifications/index",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workbench/qualifications/search",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workbench/qualifications/detail",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workbench/qualifications/listCertificatePdf",
"style": {
"navigationStyle": "custom"
}
},
{
//退-
"path": "pages/realName/workbench/outPerson/index",
"style": {
"navigationStyle": "custom"
}
},
{
//退-退
"path": "pages/realName/workbench/outPerson/outList",
"style": {
"navigationStyle": "custom"
}
},
{
//
"path": "pages/realName/workbench/cutToPlace/index",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workbench/cutToPlace/record",
"style": {
"navigationStyle": "custom"
}
},
{
//
"path": "pages/realName/workAttendance/index",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workAttendance/clock/index",
"style": {
"navigationStyle": "custom"
}
},
{
//--
"path": "pages/realName/workAttendance/clock/bMap",
"style": {
"navigationStyle": "custom"
}
},
{
//--
"path": "pages/realName/workAttendance/clock/workLocation",
"style": {
"navigationStyle": "custom"
}
},
{
//--
"path": "pages/realName/workAttendance/clock/checkMap",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workAttendance/tempClock/index",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workAttendance/tempClock/tempPeopleList",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workAttendance/tempClock/tempPeopleList",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workAttendance/managementClock/index",
"style": {
"navigationStyle": "custom"
}
},
{
//--
"path": "pages/realName/workAttendance/statistics/index",
"style": {
"navigationStyle": "custom"
}
},
{
//--
"path": "pages/realName/workAttendance/statistics/detail",
"style": {
"navigationStyle": "custom"
}
},
{
//
"path": "pages/realName/my/my",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/my/news",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/my/myUpload",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/my/myDownload",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/HealthExaminationApp/index/index",
@ -607,34 +669,37 @@
}
},
{
"path" : "pages/HealthExaminationApp/myAppointment/bookSuccessfully",
"style" :
{
"navigationBarTitleText" : "体检预约"
}
"path": "pages/HealthExaminationApp/myAppointment/bookSuccessfully",
"style": {
"navigationBarTitleText": "体检预约"
}
},
{
"path" : "pages/HealthExaminationApp/myAppointment/healthExamDetails",
"style" :
{
"navigationBarTitleText" : "体检预约单"
}
"path": "pages/HealthExaminationApp/myAppointment/healthExamDetails",
"style": {
"navigationBarTitleText": "体检预约单"
}
},
{
"path" : "pages/HealthExaminationApp/index/userInfo",
"style" :
{
"navigationBarTitleText" : "个人信息"
}
"path": "pages/HealthExaminationApp/index/userInfo",
"style": {
"navigationBarTitleText": "个人信息"
}
},
{
"path" : "pages/HealthExaminationApp/index/message",
"style" :
{
"navigationBarTitleText" : "消息通知"
}
}
"path": "pages/HealthExaminationApp/index/message",
"style": {
"navigationBarTitleText": "消息通知"
}
},
/* */
{
"path": "pages/workPlan/index/index",
"style": {
"navigationStyle": "custom"
}
}
],
"globalStyle": {
"fontFamily": "Helvetica, Arial, sans-serif",
@ -653,9 +718,9 @@
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#F1F1F1"
},
"usingComponents": {
"ly-tree-node": "/components/ly-tree/ly-tree-node"
}
"usingComponents": {
"ly-tree-node": "/components/ly-tree/ly-tree-node"
}
}
/* "tabBar": {
"color": "#7A7E83",

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,6 @@ export default {
data() {
return {
chartData: {},
// opts type="column" config-ucharts.js ['column'] opts
opts: {
timing: 'easeOut',
duration: 1000,
@ -143,13 +142,10 @@ export default {
},
methods: {
getServerData() {
//
getHomePageListApi().then(res => {
const { constructionLine, infrastructureSubstation, productionLine, productionSubstation, network, other } =
res.data.proMsgBean
setTimeout(() => {
//
let data = {
categories: ['基建线路', '基建变电', '生产线路', '生成变电', '配网', '其他'],
series: [
@ -168,7 +164,6 @@ export default {
</script>
<style scoped>
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
.charts-container {
width: 100%;
height: 100%;

View File

@ -0,0 +1,159 @@
<template>
<view class="charts-container">
<qiun-data-charts type="ring" :opts="opts" :chartData="chartData" />
</view>
</template>
<script>
import { getHomePageListApi } from '@/api/phaseTwo/homePage'
export default {
data() {
return {
chartData: {},
opts: {
timing: 'easeOut',
duration: 1000,
rotate: false,
rotateLock: false,
color: ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'],
padding: [5, 5, 5, 5],
fontSize: 13,
fontColor: '#666666',
dataLabel: false,
dataPointShape: true,
dataPointShapeType: 'solid',
touchMoveLimit: 60,
enableScroll: false,
enableMarkLine: false,
legend: {
show: true,
position: 'bottom',
lineHeight: 20,
float: 'center',
padding: 0,
margin: 5,
backgroundColor: 'rgba(0,0,0,0)',
borderColor: 'rgba(0,0,0,0)',
borderWidth: 0,
fontSize: 12,
fontColor: '#666666',
hiddenColor: '#CECECE',
itemGap: 10
},
title: {
name: '总数量',
fontSize: 15,
color: '#666666',
offsetX: 0,
offsetY: 0
},
subtitle: {
name: 0,
fontSize: 25,
color: '#7cb5ec',
offsetX: 0,
offsetY: 0
},
extra: {
ring: {
ringWidth: 15,
activeOpacity: 0.5,
activeRadius: 10,
offsetAngle: 0,
labelWidth: 10,
border: true,
borderWidth: 3,
borderColor: '#FFFFFF',
centerColor: '#FFFFFF',
customRadius: 70,
linearType: 'none'
},
tooltip: {
showBox: true,
showArrow: true,
showCategory: false,
borderWidth: 0,
borderRadius: 0,
borderColor: '#000000',
borderOpacity: 0.7,
bgColor: '#000000',
bgOpacity: 0.7,
gridType: 'solid',
dashLength: 4,
gridColor: '#CCCCCC',
boxPadding: 3,
fontSize: 13,
lineHeight: 20,
fontColor: '#FFFFFF',
legendShow: true,
legendShape: 'auto',
splitLine: true,
horizentalLine: false,
xAxisLabel: false,
yAxisLabel: false,
labelBgColor: '#FFFFFF',
labelBgOpacity: 0.7,
labelFontColor: '#666666'
}
}
}
}
},
mounted() {
this.getServerData()
},
methods: {
getServerData() {
getHomePageListApi().then(res => {
const { pgNum, jgNum, gkNum, dhNum, qtNum } = res.data.workerMsgBean
const amountNum = pgNum + jgNum + gkNum + dhNum + qtNum
this.opts.subtitle.name = amountNum
setTimeout(() => {
let data = {
series: [
{
data: [
{
name: '普工',
value: pgNum,
legendText: `普工 ${((pgNum / amountNum) * 100).toFixed(2)}% ${pgNum}`
},
{
name: '技工',
value: jgNum,
legendText: `技工 ${((jgNum / amountNum) * 100).toFixed(2)}% ${jgNum}`
},
{
name: '高空',
value: gkNum,
legendText: `高空 ${((gkNum / amountNum) * 100).toFixed(2)}% ${gkNum}`
},
{
name: '电焊',
value: dhNum,
legendText: `电焊 ${((dhNum / amountNum) * 100).toFixed(2)}% ${dhNum}`
},
{
name: '其他',
value: qtNum,
legendText: `其他 ${((qtNum / amountNum) * 100).toFixed(2)}% ${qtNum}`
}
]
}
]
}
this.chartData = JSON.parse(JSON.stringify(data))
}, 500)
})
}
}
}
</script>
<style scoped>
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
.charts-container {
width: 100%;
height: 100%;
}
</style>

View File

@ -5,11 +5,11 @@
</template>
<script>
import { getHomePageListApi } from '@/api/phaseTwo/homePage'
export default {
data() {
return {
chartData: {},
// opts type="ring" config-ucharts.js ['ring'] opts
opts: {
timing: 'easeOut',
duration: 1000,
@ -48,7 +48,7 @@ export default {
offsetY: 0
},
subtitle: {
name: '6327',
name: 0,
fontSize: 25,
color: '#7cb5ec',
offsetX: 0,
@ -104,24 +104,47 @@ export default {
},
methods: {
getServerData() {
//
setTimeout(() => {
//
let res = {
series: [
{
data: [
{ name: '< 20', value: 50, legendText: `< 20 0.4% ${31}` },
{ name: '20-30', value: 30, legendText: `< 20 0.4% ${31}` },
{ name: '30-40', value: 20, legendText: `< 20 0.4% ${31}` },
{ name: '40-50', value: 18, legendText: `< 20 0.4% ${31}` },
{ name: '50-60', value: 8, legendText: `< 20 0.4% ${31}` }
]
}
]
}
this.chartData = JSON.parse(JSON.stringify(res))
}, 500)
getHomePageListApi().then(res => {
const { twentyNum, thirtyNum, fortyNum, fiftyNum, sixtyNum } = res.data.workerMsgBean
const amountNum = twentyNum + thirtyNum + fortyNum + fiftyNum + sixtyNum
this.opts.subtitle.name = amountNum
setTimeout(() => {
let data = {
series: [
{
data: [
{
name: '< 20',
value: twentyNum,
legendText: `< 20 ${((twentyNum / amountNum) * 100).toFixed(2)}% ${twentyNum}`
},
{
name: '20-30',
value: thirtyNum,
legendText: `20-30 ${((thirtyNum / amountNum) * 100).toFixed(2)}% ${thirtyNum}`
},
{
name: '30-40',
value: fortyNum,
legendText: `30-40 ${((fortyNum / amountNum) * 100).toFixed(2)}% ${fortyNum}`
},
{
name: '40-50',
value: fiftyNum,
legendText: `40-50 ${((fiftyNum / amountNum) * 100).toFixed(2)}% ${fiftyNum}`
},
{
name: '50-60',
value: sixtyNum,
legendText: `50-60 ${((sixtyNum / amountNum) * 100).toFixed(2)}% ${sixtyNum}`
}
]
}
]
}
this.chartData = JSON.parse(JSON.stringify(data))
}, 500)
})
}
}
}

View File

@ -10,7 +10,6 @@ export default {
data() {
return {
chartData: {},
// opts type="rose" config-ucharts.js ['rose'] opts
opts: {
timing: 'easeOut',
duration: 1000,
@ -90,12 +89,9 @@ export default {
},
methods: {
getServerData() {
//
getHomePageListApi().then(res => {
setTimeout(() => {
const { level110, level220, level500, level800, level1000, levelOther } = res.data.proMsgBean
//
let data = {
series: [
{
@ -143,7 +139,6 @@ export default {
</script>
<style scoped>
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
.charts-container {
width: 100%;
height: 100%;

View File

@ -240,7 +240,7 @@
<PieChartsModelRing />
</view>
<view class="charts_container">
<PieChartsModelRing />
<PieChartsModelRingTwo />
</view>
</view>
</scroll-view>
@ -256,12 +256,14 @@ import AES from '@/utils/realNameAes.js'
import PieChartsModel from './components/pie-charts-model'
import BarChartsModel from './components/bar-charts-model'
import PieChartsModelRing from './components/pie-charts-model-ring'
import PieChartsModelRingTwo from './components/pie-charts-model-ring-two'
import { getHomePageListApi } from '@/api/phaseTwo/homePage'
export default {
components: {
PieChartsModel,
BarChartsModel,
PieChartsModelRing
PieChartsModelRing,
PieChartsModelRingTwo
},
data() {
return {

View File

@ -0,0 +1,77 @@
<template>
<view class="day-risk">
<h2>日风险概况</h2>
<view class="data-container">
<view class="left-content">
<text>本月风险数</text>
<text>{{ monthNum }}</text>
<text>累计总数 {{ monthAmount }}</text>
</view>
<view class="left-right">
<text>本周风险数</text>
<text>{{ weekNum }}</text>
<text>累计总数 {{ weekAmount }}</text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
monthNum: 1420,
monthAmount: 9520,
weekNum: 320,
weekAmount: 9820
}
},
methods: {
getRiskNumData() {}
},
mounted() {
this.getRiskNumData()
}
}
</script>
<style lang="scss" scoped>
.day-risk {
h2 {
margin: 20rpx 0;
font-size: 26rpx;
}
.data-container {
display: flex;
justify-content: space-between;
color: #fff;
font-size: 26rpx;
view {
width: 49%;
height: 180rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
text {
text-align: left;
padding-left: 20rpx;
}
text:nth-child(2) {
font-weight: bold;
font-size: 36rpx;
}
}
.left-content {
background: url('../../../../static/images/workPlan/month_img.png') no-repeat;
background-size: 100% 100%;
}
.left-right {
background: url('../../../../static/images/workPlan/week_img.png') no-repeat;
background-size: 100% 100%;
}
}
}
</style>

View File

@ -0,0 +1,63 @@
<template>
<view class="notice-container">
<!-- <uni-notice-bar :showClose="showClose" :showIcon="showIcon" scrollable :text="noticeContent" /> -->
<image class="warning-img" src="../../../../static/images/img-phase-two/index_news.png" mode=""></image>
<text>今日风险</text>
<view class="uni-notice-bar">
<uni-notice-bar
style="height: 100%"
:speed="30"
scrollable
:text="noticeContent"
:showClose="showClose"
:showIcon="showIcon"
></uni-notice-bar>
</view>
</view>
</template>
<script>
export default {
props: {
/* 提示内容 */
noticeContent: {
type: String,
default: '中风险35 低风险153 可接收风险153 高风险126'
},
/* 是否显示关闭按钮 */
showClose: {
type: Boolean,
default: false
},
/* 是否显示提示图标 */
showIcon: {
type: Boolean,
default: false
}
}
}
</script>
<style lang="scss" scoped>
.notice-container {
height: 56rpx;
margin: 20rpx 0;
display: flex;
align-items: center;
box-shadow: 6rpx -8rpx 0 8rpx #f0f4f7;
.warning-img {
width: 48rpx;
height: 48rpx;
}
.uni-notice-bar {
flex: 1;
height: 56rpx;
}
text {
margin: 0 10rpx;
}
}
</style>

View File

@ -0,0 +1,71 @@
<template>
<view class="page">
<u-navbar
class="u-navbar"
title="首页"
placeholder
@leftClick="leftClick"
leftIconColor="#fff"
bgColor="#00337A"
:titleStyle="{ color: '#FFF', fontSize: '32rpx' }"
/>
<scroll-view :scroll-top="scrollTop" scroll-y="true">
<!-- 日风险概况 -->
<DayRiskView />
<!-- 滚动提示 -->
<HomeNoticeBar />
</scroll-view>
<m-tabbar fixed fill :current="0" :tabbar="tabbar"></m-tabbar>
</view>
</template>
<script>
import TabbarConfig from '../util/tabbar'
import DayRiskView from './components/day-risk-view'
import HomeNoticeBar from './components/home-notice-bar'
export default {
components: {
DayRiskView,
HomeNoticeBar
},
data() {
return {
userId: uni.getStorageSync('userId'),
tabbar: TabbarConfig
}
},
onLoad() {},
methods: {
//
leftClick() {
uni.reLaunch({
url: '/pages/gzt/index'
})
}
},
onShow() {}
}
</script>
<style lang="scss" scoped>
/* 修改U-Navbar中链接的字体颜色 */
/deep/.u-navbar .navbar-nav > li > a {
color: #fff; /* 将颜色改为红色 */
}
/* 如果你想修改当前激活链接的字体颜色 */
/deep/.u-navbar .navbar-nav > li.active > a {
color: #fff; /* 将激活链接的颜色改为绿色 */
}
.page {
width: 100vw;
height: 100vh;
// background-color: #efefef;
background: #fff;
box-sizing: border-box;
padding: 0 10rpx;
}
</style>

View File

@ -0,0 +1,94 @@
export function chooseFile(callback, acceptType) {
var CODE_REQUEST = 1000;
var main = plus.android.runtimeMainActivity();
if (plus.os.name == 'Android') {
console.log("666");
var Intent = plus.android.importClass('android.content.Intent');
var intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
if (acceptType) {
intent.setType(acceptType);
} else {
intent.setType("*/*");
}
main.onActivityResult = (requestCode, resultCode, data) => {
if (requestCode == CODE_REQUEST) {
const uri = data.getData();
plus.android.importClass(uri);
const Build = plus.android.importClass('android.os.Build');
const isKitKat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
const DocumentsContract = plus.android.importClass('android.provider.DocumentsContract');
if (isKitKat && DocumentsContract.isDocumentUri(main, uri)) {
if ("com.android.externalstorage.documents" == uri.getAuthority()) {
console.log("6666");
var docId = DocumentsContract.getDocumentId(uri);
var split = docId.split(":");
var type = split[0];
if ("primary" == type) {
var Environment = plus.android.importClass('android.os.Environment');
callback(Environment.getExternalStorageDirectory() + "/" + split[1]);
} else {
var System = plus.android.importClass('java.lang.System');
var sdPath = System.getenv("SECONDARY_STORAGE");
if (sdPath) {
callback(sdPath + "/" + split[1]);
}
}
} else if ("com.android.providers.downloads.documents" == uri.getAuthority()) {
var id = DocumentsContract.getDocumentId(uri);
var ContentUris = plus.android.importClass('android.content.ContentUris');
var contentUri = ContentUris.withAppendedId(
// Uri.parse("content://downloads/public_downloads"), Long.valueOf(id));
Uri.parse("content://downloads/public_downloads"), id);
callback(getDataColumn(main, contentUri, null, null));
} else if ("com.android.providers.media.documents" == uri.getAuthority()) {
var docId = DocumentsContract.getDocumentId(uri);
var split = docId.split(":");
console.log(split);
var type = split[0];
console.log(type);
var MediaStore = plus.android.importClass('android.provider.MediaStore');
if ("image" == type) {
contentUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
} else if ("video" == type) {
contentUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
} else if ("audio" == type) {
contentUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
} else {
contentUri = MediaStore.Files.getContentUri("external");
}
console.log(contentUri);
var selection = "_id=?";
var selectionArgs = new Array();
selectionArgs[0] = split[1];
callback(getDataColumn(main, contentUri, selection, selectionArgs));
}
} else if ("content" == uri.getScheme()) {
callback(getDataColumn(main, uri, null, null));
} else if ("file" == uri.getScheme()) {
callback(uri.getPath());
}
}
}
main.startActivityForResult(intent, CODE_REQUEST);
}
}
function getDataColumn(main, uri, selection, selectionArgs) {
plus.android.importClass(main.getContentResolver());
let cursor = main.getContentResolver().query(uri, ['_data'], selection, selectionArgs,
null);
plus.android.importClass(cursor);
if (cursor != null && cursor.moveToFirst()) {
var column_index = cursor.getColumnIndexOrThrow('_data');
var result = cursor.getString(column_index)
cursor.close();
return result;
}
return null;
}
export default chooseFile

View File

@ -0,0 +1,16 @@
export function myBMapGL1() {
return new Promise(function(resolve, reject) {
if (typeof window.initMyBMapGL1 === 'function') {
resolve(window.initMyBMapGL1)
return
}
window.initMyBMapGL1 = function() {
resolve(window.initMyBMapGL1)
}
var script = document.createElement('script')
script.type = 'text/javascript'
script.src = `https://api.map.baidu.com/api?v=3.0&type=webgl&ak=PM43nB8eDNTBrXkQwGrTQFcmOni3Z9nO&callback=initMyBMapGL1`
script.onerror = reject
document.head.appendChild(script)
})
}

View File

@ -0,0 +1,21 @@
export default {
color: '#161616',
selectedColor: '#161616',
borderStyle: 'black',
backgroundColor: '#ffffff',
list: [
{
pagePath: 'pages/workPlan/index/index',
iconPath: '/static/realName/home.png',
selectedIconPath: '/static/realName/homeSelected.png',
text: '首页'
//新版本新增页面被打开方式默认为reLaunch
},
{
pagePath: 'pages/realName/workbench/index',
iconPath: '/static/realName/work.png',
selectedIconPath: '/static/realName/workSelected.png',
text: '工作台'
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB