作业计划首页搭建

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

@ -201,369 +201,431 @@
}, },
{ {
"path": "pages/YNEduApp/index/notices", "path": "pages/YNEduApp/index/notices",
"style" : "style": {
{
"navigationBarTitleText": "通知公告" "navigationBarTitleText": "通知公告"
} }
}, },
{ {
"path": "pages/YNEduApp/learnProj/imageStudy", "path": "pages/YNEduApp/learnProj/imageStudy",
"style" : "style": {
{
"navigationBarTitleText": "图片学习" "navigationBarTitleText": "图片学习"
} }
}, },
////- ////-
{// {
//
"path": "pages/realName/index/index", "path": "pages/realName/index/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{// {
//
"path": "pages/realName/workbench/index", "path": "pages/realName/workbench/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
// //
{// {
//
"path": "pages/realName/workbench/personEnter/index", "path": "pages/realName/workbench/personEnter/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{// {
//
"path": "pages/realName/workbench/personEnter/addPeople", "path": "pages/realName/workbench/personEnter/addPeople",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{// {
//
"path": "pages/realName/workbench/personEnter/searchPeople", "path": "pages/realName/workbench/personEnter/searchPeople",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{// {
//
"path": "pages/realName/workbench/personEnter/editPeople", "path": "pages/realName/workbench/personEnter/editPeople",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{// {
//
"path": "pages/realName/workbench/personEnter/facePeople", "path": "pages/realName/workbench/personEnter/facePeople",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{// {
//
"path": "pages/realName/workbench/peopleLibrary/index", "path": "pages/realName/workbench/peopleLibrary/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workbench/peopleLibrary/detail", "path": "pages/realName/workbench/peopleLibrary/detail",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
// //
{//- {
//-
"path": "pages/realName/workbench/contractWitness/index", "path": "pages/realName/workbench/contractWitness/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
// //
{//- {
//-
"path": "pages/realName/workbench/wageWitness/index", "path": "pages/realName/workbench/wageWitness/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
// //
{// {
//
"path": "pages/realName/workbench/wageRecord/index", "path": "pages/realName/workbench/wageRecord/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workbench/wageRecord/detail", "path": "pages/realName/workbench/wageRecord/detail",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
// //
{//- {
//-
"path": "pages/realName/workbench/electronicContract/contractVideo", "path": "pages/realName/workbench/electronicContract/contractVideo",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//-pdf {
//-pdf
"path": "pages/realName/workbench/electronicContract/contractPdf", "path": "pages/realName/workbench/electronicContract/contractPdf",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workbench/electronicContract/contractFill", "path": "pages/realName/workbench/electronicContract/contractFill",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//-pdf {
//-pdf
"path": "pages/realName/workbench/electronicContract/contractPdfConfirm", "path": "pages/realName/workbench/electronicContract/contractPdfConfirm",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{// {
//
"path": "pages/realName/workbench/electronicContractSign/index", "path": "pages/realName/workbench/electronicContractSign/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workbench/electronicContractSign/contractPdf", "path": "pages/realName/workbench/electronicContractSign/contractPdf",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workbench/electronicContractSign/contractVideo", "path": "pages/realName/workbench/electronicContractSign/contractVideo",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{// {
//
"path": "pages/realName/workbench/electronicContractExam/index", "path": "pages/realName/workbench/electronicContractExam/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{// {
//
"path": "pages/realName/workbench/electronicContractExam/contractPdf", "path": "pages/realName/workbench/electronicContractExam/contractPdf",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{// {
//
"path": "pages/realName/workbench/safeguarding/index", "path": "pages/realName/workbench/safeguarding/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workbench/safeguarding/detail", "path": "pages/realName/workbench/safeguarding/detail",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{// {
//
"path": "pages/realName/workbench/dayPlan/index", "path": "pages/realName/workbench/dayPlan/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workbench/dayPlan/detail", "path": "pages/realName/workbench/dayPlan/detail",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{// {
//
"path": "pages/realName/workbench/exam/index", "path": "pages/realName/workbench/exam/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workbench/exam/train", "path": "pages/realName/workbench/exam/train",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workbench/exam/trainPdf", "path": "pages/realName/workbench/exam/trainPdf",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workbench/exam/trainVideo", "path": "pages/realName/workbench/exam/trainVideo",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workbench/exam/examInfo", "path": "pages/realName/workbench/exam/examInfo",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workbench/exam/exam", "path": "pages/realName/workbench/exam/exam",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{// {
//
"path": "pages/realName/workbench/appearApply/index", "path": "pages/realName/workbench/appearApply/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workbench/appearApply/evaluate", "path": "pages/realName/workbench/appearApply/evaluate",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{// {
//
"path": "pages/realName/workbench/appearExam/index", "path": "pages/realName/workbench/appearExam/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{// {
//
"path": "pages/realName/workbench/workPlan/index", "path": "pages/realName/workbench/workPlan/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{// {
//
"path": "pages/realName/workbench/qualifications/index", "path": "pages/realName/workbench/qualifications/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workbench/qualifications/search", "path": "pages/realName/workbench/qualifications/search",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workbench/qualifications/detail", "path": "pages/realName/workbench/qualifications/detail",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workbench/qualifications/listCertificatePdf", "path": "pages/realName/workbench/qualifications/listCertificatePdf",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//退- {
//退-
"path": "pages/realName/workbench/outPerson/index", "path": "pages/realName/workbench/outPerson/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//退-退 {
//退-退
"path": "pages/realName/workbench/outPerson/outList", "path": "pages/realName/workbench/outPerson/outList",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{// {
//
"path": "pages/realName/workbench/cutToPlace/index", "path": "pages/realName/workbench/cutToPlace/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workbench/cutToPlace/record", "path": "pages/realName/workbench/cutToPlace/record",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{// {
//
"path": "pages/realName/workAttendance/index", "path": "pages/realName/workAttendance/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workAttendance/clock/index", "path": "pages/realName/workAttendance/clock/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//-- {
//--
"path": "pages/realName/workAttendance/clock/bMap", "path": "pages/realName/workAttendance/clock/bMap",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},{//-- },
{
//--
"path": "pages/realName/workAttendance/clock/workLocation", "path": "pages/realName/workAttendance/clock/workLocation",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//-- {
//--
"path": "pages/realName/workAttendance/clock/checkMap", "path": "pages/realName/workAttendance/clock/checkMap",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workAttendance/tempClock/index", "path": "pages/realName/workAttendance/tempClock/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, {//- },
{
//-
"path": "pages/realName/workAttendance/tempClock/tempPeopleList", "path": "pages/realName/workAttendance/tempClock/tempPeopleList",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workAttendance/tempClock/tempPeopleList", "path": "pages/realName/workAttendance/tempClock/tempPeopleList",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//- {
//-
"path": "pages/realName/workAttendance/managementClock/index", "path": "pages/realName/workAttendance/managementClock/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//-- {
//--
"path": "pages/realName/workAttendance/statistics/index", "path": "pages/realName/workAttendance/statistics/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{//-- {
//--
"path": "pages/realName/workAttendance/statistics/detail", "path": "pages/realName/workAttendance/statistics/detail",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{// {
//
"path": "pages/realName/my/my", "path": "pages/realName/my/my",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},{//- },
{
//-
"path": "pages/realName/my/news", "path": "pages/realName/my/news",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},{//- },
{
//-
"path": "pages/realName/my/myUpload", "path": "pages/realName/my/myUpload",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},{//- },
{
//-
"path": "pages/realName/my/myDownload", "path": "pages/realName/my/myDownload",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
@ -608,33 +670,36 @@
}, },
{ {
"path": "pages/HealthExaminationApp/myAppointment/bookSuccessfully", "path": "pages/HealthExaminationApp/myAppointment/bookSuccessfully",
"style" : "style": {
{
"navigationBarTitleText": "体检预约" "navigationBarTitleText": "体检预约"
} }
}, },
{ {
"path": "pages/HealthExaminationApp/myAppointment/healthExamDetails", "path": "pages/HealthExaminationApp/myAppointment/healthExamDetails",
"style" : "style": {
{
"navigationBarTitleText": "体检预约单" "navigationBarTitleText": "体检预约单"
} }
}, },
{ {
"path": "pages/HealthExaminationApp/index/userInfo", "path": "pages/HealthExaminationApp/index/userInfo",
"style" : "style": {
{
"navigationBarTitleText": "个人信息" "navigationBarTitleText": "个人信息"
} }
}, },
{ {
"path": "pages/HealthExaminationApp/index/message", "path": "pages/HealthExaminationApp/index/message",
"style" : "style": {
{
"navigationBarTitleText": "消息通知" "navigationBarTitleText": "消息通知"
} }
} },
/* */
{
"path": "pages/workPlan/index/index",
"style": {
"navigationStyle": "custom"
}
}
], ],
"globalStyle": { "globalStyle": {
"fontFamily": "Helvetica, Arial, sans-serif", "fontFamily": "Helvetica, Arial, sans-serif",

View File

@ -8,8 +8,14 @@
<view class="msg1">今日消息</view> <view class="msg1">今日消息</view>
<view class="msg2"> <view class="msg2">
<view class="msg-content"> <view class="msg-content">
<u-notice-bar :text="msgList" direction="column" icon="" bgColor="" color="#000" <u-notice-bar
font-size="16"></u-notice-bar> :text="msgList"
direction="column"
icon=""
bgColor=""
color="#000"
font-size="16"
></u-notice-bar>
</view> </view>
<view class="box"> <view class="box">
<u-badge max="99" :value="value" shape="horn" bgColor="red"></u-badge> <u-badge max="99" :value="value" shape="horn" bgColor="red"></u-badge>
@ -38,52 +44,79 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view> <view>
<!-- 普通弹窗 --> <!-- 普通弹窗 -->
<uni-popup ref="popup" background-color="#fff" :is-mask-click="false"> <uni-popup ref="popup" background-color="#fff" :is-mask-click="false">
<view style="text-align: center;font-size: 40rpx;padding-top: 30rpx;">密码修改</view> <view style="text-align: center; font-size: 40rpx; padding-top: 30rpx">密码修改</view>
<view class="popup-content"> <view class="popup-content">
<u--form :model="restForm" ref="uForm3" :rules="rules3" labelWidth="60"> <u--form :model="restForm" ref="uForm3" :rules="rules3" labelWidth="60">
<view <view style="color: red; line-height: 30rpx; font-size: 24rpx; padding-top: 20rpx; text-align: center">
style="color: red;line-height: 30rpx;font-size: 24rpx;padding-top: 20rpx;text-align: center;">
您是第一次登录系统需要修改密码 您是第一次登录系统需要修改密码
</view> </view>
<u-form-item label="新密码" prop="password"> <u-form-item label="新密码" prop="password">
<u-input class="login-input" :type="isOpen?'text':'password'" placeholder="请输入密码" prefixIcon="lock" <u-input
v-model="restForm.password" save="false" autocomplete="new-password"> class="login-input"
:type="isOpen ? 'text' : 'password'"
placeholder="请输入密码"
prefixIcon="lock"
v-model="restForm.password"
save="false"
autocomplete="new-password"
>
<template slot="suffix"> <template slot="suffix">
<image @click="isOpen=!isOpen" <image
style="width: 40rpx;height: 40rpx;margin-right: 10rpx; z-index: 999;" @click="isOpen = !isOpen"
:src="isOpen?'../../static/images/design_ic_visibility.png':'../../static/images/design_ic_visibility_off.png'"> style="width: 40rpx; height: 40rpx; margin-right: 10rpx; z-index: 999"
</image> :src="
isOpen
? '../../static/images/design_ic_visibility.png'
: '../../static/images/design_ic_visibility_off.png'
"
></image>
</template> </template>
</u-input> </u-input>
</u-form-item> </u-form-item>
<u-form-item label="新密码" prop="passwordA"> <u-form-item label="新密码" prop="passwordA">
<u-input class="login-input" :type="isOpen2?'text':'password'" placeholder="请再次输入密码" prefixIcon="lock" <u-input
v-model="restForm.passwordA" save="false" autocomplete="new-password"> class="login-input"
:type="isOpen2 ? 'text' : 'password'"
placeholder="请再次输入密码"
prefixIcon="lock"
v-model="restForm.passwordA"
save="false"
autocomplete="new-password"
>
<template slot="suffix"> <template slot="suffix">
<image @click="isOpen2=!isOpen2" <image
style="width: 40rpx;height: 40rpx;margin-right: 10rpx; z-index: 999;" @click="isOpen2 = !isOpen2"
:src="isOpen2?'../../static/images/design_ic_visibility.png':'../../static/images/design_ic_visibility_off.png'"> style="width: 40rpx; height: 40rpx; margin-right: 10rpx; z-index: 999"
</image> :src="
isOpen2
? '../../static/images/design_ic_visibility.png'
: '../../static/images/design_ic_visibility_off.png'
"
></image>
</template> </template>
</u-input> </u-input>
</u-form-item> </u-form-item>
<view style="color: red;line-height: 30rpx;font-size: 24rpx;padding-top: 20rpx;"> <view style="color: red; line-height: 30rpx; font-size: 24rpx; padding-top: 20rpx">
密码必须至少包含一个大写字母一个小写字母一个数字和一个特殊符号并且长度在8到16个字符之间 密码必须至少包含一个大写字母一个小写字母一个数字和一个特殊符号并且长度在8到16个字符之间
</view> </view>
<view style="display: flex;"> <view style="display: flex">
<u-button class="loginBtn" style="margin-top: 30rpx;width: 30%;color: black;" <u-button
@click="logout" color="#d0d2d5">退出</u-button> class="loginBtn"
<u-button class="loginBtn" style="margin-top: 30rpx;width: 30%;" @click="submit" style="margin-top: 30rpx; width: 30%; color: black"
color="#00367a">确认</u-button> @click="logout"
color="#d0d2d5"
>
退出
</u-button>
<u-button class="loginBtn" style="margin-top: 30rpx; width: 30%" @click="submit" color="#00367a">
确认
</u-button>
</view> </view>
</u--form> </u--form>
</view> </view>
</uni-popup> </uni-popup>
@ -95,7 +128,7 @@
<script> <script>
import TabbarConfig from '@/totalTabbar.js' import TabbarConfig from '@/totalTabbar.js'
import AES from "@/utils/realNameAes.js"; import AES from '@/utils/realNameAes.js'
import config from '@/config' import config from '@/config'
import Crypoto from '@/utils/aescbc' import Crypoto from '@/utils/aescbc'
@ -105,45 +138,45 @@
getMyAppByUser, getMyAppByUser,
updatePwdByApp, updatePwdByApp,
getNoticeAnnoByUserId getNoticeAnnoByUserId
} from "@/api/index.js" } from '@/api/index.js'
export default { export default {
data() { data() {
const equalToPassword = (rule, value, callback) => { const equalToPassword = (rule, value, callback) => {
if (this.restForm.password !== value) { if (this.restForm.password !== value) {
callback(new Error("两次输入的密码不一致")); callback(new Error('两次输入的密码不一致'))
} else { } else {
callback(); callback()
}
} }
};
// 816, // 816,
var ISPWD = var ISPWD = /^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*,\._\+(){}])[0-9a-zA-Z!@#$%^&*,\\._\+(){}]{8,16}$/
/^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*,\._\+(){}])[0-9a-zA-Z!@#$%^&*,\\._\+(){}]{8,16}$/;
// //
const validatePassword = (rule, value, callback) => { const validatePassword = (rule, value, callback) => {
if (!ISPWD.test(this.restForm.password)) { if (!ISPWD.test(this.restForm.password)) {
callback(new Error("用户密码必须包含大写字母、小写字母、数字和特殊符号")); callback(new Error('用户密码必须包含大写字母、小写字母、数字和特殊符号'))
} else { } else {
callback(); callback()
} }
} }
return { return {
tabbar: TabbarConfig, tabbar: TabbarConfig,
value6: 0, value6: 0,
type: "error", type: 'error',
value: 0, value: 0,
allApp: [], allApp: [],
myApp: [], myApp: [],
msgList: [], msgList: [],
restForm: { restForm: {
password: "", password: '',
passwordA: "" passwordA: ''
}, },
rules3: { rules3: {
password: [{ password: [
{
required: true, required: true,
trigger: "blur", trigger: 'blur',
message: "请输入您的密码" message: '请输入您的密码'
}, },
{ {
min: 8, min: 8,
@ -157,7 +190,8 @@
trigger: 'blur' trigger: 'blur'
} }
], ],
passwordA: [{ passwordA: [
{
required: true, required: true,
message: '请再次输入新密码', message: '请再次输入新密码',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
@ -165,12 +199,12 @@
{ {
required: true, required: true,
validator: equalToPassword, validator: equalToPassword,
trigger: "blur" trigger: 'blur'
} }
] ]
}, },
isOpen: false, isOpen: false,
isOpen2:false, isOpen2: false
} }
}, },
onShow() { onShow() {
@ -187,10 +221,9 @@
// //
uni.setTabBarItem({ uni.setTabBarItem({
index: 0, index: 0,
iconPath:"static/images/dh1.png" iconPath: 'static/images/dh1.png'
}) })
} }
}) })
}, },
gotoYy(name) { gotoYy(name) {
@ -286,7 +319,6 @@
}) })
} }
}) })
} else if (name == '健康体检移动端') { } else if (name == '健康体检移动端') {
uni.request({ uni.request({
url: config.tjBaseUrl + '/app/loginNoPassword', url: config.tjBaseUrl + '/app/loginNoPassword',
@ -296,7 +328,7 @@
'Content-Type': 'application/x-www-form-urlencoded' 'Content-Type': 'application/x-www-form-urlencoded'
}, },
success: res => { success: res => {
console.log('🚀 ~ gotoYy ~ res:', res,) console.log('🚀 ~ gotoYy ~ res:', res)
console.log('🚀 ~ gotoYy ~ res:', res.data.obj) console.log('🚀 ~ gotoYy ~ res:', res.data.obj)
if (res.statusCode == 200) { if (res.statusCode == 200) {
uni.removeStorageSync('tjToken') uni.removeStorageSync('tjToken')
@ -325,21 +357,26 @@
}) })
} }
if (name === '作业计划移动端') {
uni.reLaunch({
url: '/pages/workPlan/index/index'
})
}
}, },
getDayNoticeAnnoByUserId() { getDayNoticeAnnoByUserId() {
getDayNoticeAnnoByUserId({}).then(response => { getDayNoticeAnnoByUserId({}).then(response => {
console.log(response); console.log(response)
if (response.code == 200) { if (response.code == 200) {
this.msgList = response.data.map(item => item.noticeTitle); this.msgList = response.data.map(item => item.noticeTitle)
this.value = this.msgList.length this.value = this.msgList.length
} else { } else {
uni.$u.toast('获取今日消息失败'); uni.$u.toast('获取今日消息失败')
} }
}); })
}, },
getAppList() { getAppList() {
getAppList({}).then(response => { getAppList({}).then(response => {
console.log(response); console.log(response)
if (response.code == 200) { if (response.code == 200) {
this.allApp = response.data this.allApp = response.data
@ -348,35 +385,37 @@
this.$refs.popup.open("center") this.$refs.popup.open("center")
} */ } */
} else { } else {
uni.$u.toast('获取全部应用失败'); uni.$u.toast('获取全部应用失败')
} }
}); })
}, },
getMyAppByUser() { getMyAppByUser() {
getMyAppByUser({}).then(response => { getMyAppByUser({}).then(response => {
console.log(response); console.log(response)
if (response.code == 200) { if (response.code == 200) {
console.log('我的应用-----------', response)
this.myApp = response.data this.myApp = response.data
} else { } else {
uni.$u.toast('获取我的应用失败'); uni.$u.toast('获取我的应用失败')
} }
}); })
}, },
logout() { logout() {
this.$store.dispatch('LogOut').then(res => { this.$store.dispatch('LogOut').then(res => {
uni.redirectTo({ uni.redirectTo({
url: "/pages/login" url: '/pages/login'
}) })
}) })
}, },
closePwd() { closePwd() {
// open uni-popup type // open uni-popup type
this.$refs.popup.close("center") this.$refs.popup.close('center')
}, },
submit() { submit() {
let _this = this let _this = this
this.$refs.uForm3.validate().then(res => { this.$refs.uForm3
.validate()
.then(res => {
let form = { let form = {
id: this.$store.state.user.userId, id: this.$store.state.user.userId,
pd: this.restForm.password, pd: this.restForm.password,
@ -387,18 +426,19 @@
this.closePwd() this.closePwd()
this.$refs.uToast.show({ this.$refs.uToast.show({
type: 'success', type: 'success',
message: "密码修改成功", message: '密码修改成功'
}) })
// setTimeout(_this.logout(), 50000); // setTimeout(_this.logout(), 50000);
} else { } else {
uni.$u.toast(res.msg) uni.$u.toast(res.msg)
} }
}) })
}).catch(errors => { })
.catch(errors => {
// uni.$u.toast('') // uni.$u.toast('')
}) })
}, }
}, }
} }
</script> </script>
@ -426,7 +466,7 @@
.normal-login-container { .normal-login-container {
.top { .top {
height: 40vh; height: 40vh;
background-image: url("../../static/images/bg-top.png"); background-image: url('../../static/images/bg-top.png');
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
@ -478,7 +518,6 @@
text-overflow: ellipsis; text-overflow: ellipsis;
/* 使用省略号表示文本溢出 */ /* 使用省略号表示文本溢出 */
} }
} }
} }

View File

@ -10,7 +10,6 @@ export default {
data() { data() {
return { return {
chartData: {}, chartData: {},
// opts type="column" config-ucharts.js ['column'] opts
opts: { opts: {
timing: 'easeOut', timing: 'easeOut',
duration: 1000, duration: 1000,
@ -143,13 +142,10 @@ export default {
}, },
methods: { methods: {
getServerData() { getServerData() {
//
getHomePageListApi().then(res => { getHomePageListApi().then(res => {
const { constructionLine, infrastructureSubstation, productionLine, productionSubstation, network, other } = const { constructionLine, infrastructureSubstation, productionLine, productionSubstation, network, other } =
res.data.proMsgBean res.data.proMsgBean
setTimeout(() => { setTimeout(() => {
//
let data = { let data = {
categories: ['基建线路', '基建变电', '生产线路', '生成变电', '配网', '其他'], categories: ['基建线路', '基建变电', '生产线路', '生成变电', '配网', '其他'],
series: [ series: [
@ -168,7 +164,6 @@ export default {
</script> </script>
<style scoped> <style scoped>
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
.charts-container { .charts-container {
width: 100%; width: 100%;
height: 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> </template>
<script> <script>
import { getHomePageListApi } from '@/api/phaseTwo/homePage'
export default { export default {
data() { data() {
return { return {
chartData: {}, chartData: {},
// opts type="ring" config-ucharts.js ['ring'] opts
opts: { opts: {
timing: 'easeOut', timing: 'easeOut',
duration: 1000, duration: 1000,
@ -48,7 +48,7 @@ export default {
offsetY: 0 offsetY: 0
}, },
subtitle: { subtitle: {
name: '6327', name: 0,
fontSize: 25, fontSize: 25,
color: '#7cb5ec', color: '#7cb5ec',
offsetX: 0, offsetX: 0,
@ -104,24 +104,47 @@ export default {
}, },
methods: { methods: {
getServerData() { getServerData() {
// 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(() => { setTimeout(() => {
// let data = {
let res = {
series: [ series: [
{ {
data: [ data: [
{ name: '< 20', value: 50, legendText: `< 20 0.4% ${31}` }, {
{ name: '20-30', value: 30, legendText: `< 20 0.4% ${31}` }, name: '< 20',
{ name: '30-40', value: 20, legendText: `< 20 0.4% ${31}` }, value: twentyNum,
{ name: '40-50', value: 18, legendText: `< 20 0.4% ${31}` }, legendText: `< 20 ${((twentyNum / amountNum) * 100).toFixed(2)}% ${twentyNum}`
{ name: '50-60', value: 8, legendText: `< 20 0.4% ${31}` } },
{
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(res)) this.chartData = JSON.parse(JSON.stringify(data))
}, 500) }, 500)
})
} }
} }
} }

View File

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

View File

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