| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043 |
- <!--
- * @Title:
- * @Description: 首页
- * @Author: swp
- * @Date: 2022-08-24 10:49:21
- * @LastEditors:
- * @LastEditTime: 2022-08-24 10:49:21
- -->
- <template>
- <view class="container">
- <!-- <uni-nav-bar :fixed="true" backgroundColor="#f7f7f7" statusBar="false" height="75px">
- <block slot="left">
- <view class="view-flex-block-center">
- <image src="/static/images/logo_start.png"
- style="width: 100rpx;height: 100rpx;background: lightgray;border-radius: 50%;" mode="widthFix">
- </image>
- </view>
- </block>
- <view class="view-flex-inline">
- <uni-list style="background-color: #f7f7f7;" :border="false">
- <uni-list-item v-if="isLogin" :border="false" style="background-color: #f7f7f7;" showArrow
- :title="userName" :note="userNote" :clickable="true" @click="onUserInfoClick()" />
- <uni-list-item v-else :border="false" style="background-color: #f7f7f7;" showArrow title="登录/注册"
- note="快速登录 注册体验更多功能" :clickable="true" @click="onLoginClick()" />
- </uni-list>
- </view>
- <block slot="right">
- <view style="margin-right:0rpx" @click="onNoticeMoreClick">
- <uni-badge class="uni-badge-left-margin" absolute="rightTop" :is-dot="noticeDot" :text="noticeValue"
- size="small">
- <uni-icons class="input-uni-icon" type="email" size="24" color="#000000" />
- </uni-badge>
- </view>
- <view style="margin-right:10rpx;margin-left: 10px;" @click="onNoticeMoreClick">
- <uni-badge class="uni-badge-left-margin" absolute="rightTop" size="small">
- <uni-icons class="input-uni-icon" type="scan" size="24" color="#000000" />
- </uni-badge>
- </view>
- </block>
- </uni-nav-bar> -->
- <!-- <uni-card title="快捷操作" :is-shadow="false">
- <view class="view-flex-inline">
- <text class="text-under-line" style="color: coral;font-size: 1rem;"
- @click="toShortcutCreateOrder">发起工单</text>
- <text class="text-under-line" style="color: coral;font-size: 1rem;margin-left: 40px;"
- @click="toShortcutInspectionPlan">创建巡检保养计划</text>
- </view>
- </uni-card> -->
- <!-- <uni-group> -->
- <swiper circular :indicator-dots="false" :autoplay="true" :interval="2000" :duration="500">
- <swiper-item v-for="item in ads" :key="item.id" style="height: 200px;line-height: 300rpx;">
- <image :src="toOss(item.url)" style="width: 100%;width: 100%;" mode="widthFix"></image>
- </swiper-item>
- </swiper>
- <!-- </uni-group> -->
- <uni-list>
- <uni-list-item title="待办工单" showArrow :thumb="todoOrderImg" thumb-size="base" style="height: 80px;" clickable
- @click="toDo()">
- <template v-slot:footer>
- <view class="point" style="margin-right: 5px;">
- <view class="dot">
- {{todoOrderCount}}
- </view>
- </view>
- </template>
- </uni-list-item>
- <uni-list-item title="待审批工单" showArrow :thumb="closeApproveOrderImg" thumb-size="base"
- style="height: 80px;" clickable @click="toOrderCloseApprove()" >
- <template v-slot:footer>
- <view class="point" style="margin-right: 5px;">
- <view class="dot">
- {{closeApproveOrderCount}}
- </view>
- </view>
- </template>
- </uni-list-item>
- <uni-list-item title="待巡检任务" showArrow :thumb="todoInspectionImg" thumb-size="base" style="height: 80px;" clickable
- @click="toInspection()">
- <template v-slot:footer>
- <view class="point" style="margin-right: 5px;">
- <view class="dot">
- {{inspectionTodoNoticeCount}}
- </view>
- </view>
- </template>
- </uni-list-item>
- <uni-list-item title="待审批巡检任务" showArrow :thumb="closeApproveInspectionImg" thumb-size="base"
- style="height: 80px;" clickable @click="toInspectionCloseApprove()">
- <template v-slot:footer>
- <view class="point" style="margin-right: 5px;">
- <view class="dot">
- {{inspectionCloseApproveCount}}
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- <uni-group>
- <uni-row>
- <uni-col :span="12">
- <view style="padding-left: 20px;padding-right: 20px;">
- <button type="primary" style="font-size: 0.8rem;background-color: rgb(31,121,253);" @click="toShortcutCreateOrder">
- <view class="view-flex-inline-center">
- <uni-icons type="plusempty" size="18" color="white" />
- <span style="margin-left: 5px;">新建工单</span>
- </view>
- </button>
- </view>
- </uni-col>
- <uni-col :span="12">
- <view class="view-flex-inline-center" style="padding-left: 20px;padding-right: 20px;">
- <button type="primary" style="font-size: 0.8rem;background-color: rgb(86,93,253);" @click="toShortcutInspectionPlan">
- <view class="view-flex-inline-center">
- <uni-icons type="plusempty" size="18" color="white" />
- <span style="margin-left: 5px;">巡检保养计划</span>
- </view>
- </button>
- </view>
- </uni-col>
- </uni-row>
- </uni-group>
- <uni-group>
- </uni-group>
- <!-- <uni-card title="待办工单" :thumbnail="checkLogo" :is-shadow="false">
- <uni-section title="新工单" type="circle">
- <view v-if="unconfirmOrderCount>0">
- <uni-list>
- <uni-list-item v-for="item in unconfirmOrderList" :key="item.id" showArrow clickable
- @click="toConfirm(item)" rightText="去接单">
- <template v-slot:body>
- <view class="list-item-block">
- <view class="line">
- <uni-icons type="personadd" size="18" color="lightblue" />
- <view class="text" style="width: 90%;color: gray;">
- 创建人: <span
- style="margin-left: 5px;color: cornflowerblue;">{{item.createOrderPersonName}}</span>
- </view>
- </view>
- <view class="line">
- <uni-icons type="calendar" size="18" color="lightblue" />
- <view class="text" style="width: 90%;color: gray;">
- 创建时间: <span
- style="margin-left: 5px;color: cornflowerblue;">{{item.createTime}}</span>
- </view>
- </view>
- <view class="line">
- <uni-icons type="help" size="18" color="lightblue" />
- <view class="text text-ellipsis" style="width: 90%;color: gray;">
- 问题描述: <span
- style="margin-left: 5px;color: cornflowerblue;">{{item.orderDesc}}</span>
- </view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- </view>
- <view v-else class="view-flex-inline">
- <image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
- </image>
- <view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
- <text>暂无新工单</text>
- </view>
- </view>
- </uni-section>
- <uni-section title="待处理工单" type="circle">
- <view v-if="todoOrderCount>0">
- <uni-list>
- <uni-list-item v-for="item in todoOrderList" :key="item.id" showArrow clickable
- @click="toDo(item)" rightText="去处理">
- <template v-slot:body>
- <view class="list-item-block">
- <view class="line">
- <uni-icons type="personadd" size="18" color="lightblue" />
- <view class="text" style="width: 90%;color: gray;">
- 处理人: <span
- style="margin-left: 5px;color: cornflowerblue;">{{item.orderConfirmName}}</span>
- </view>
- </view>
- <view class="line">
- <uni-icons type="calendar" size="18" color="lightblue" />
- <view class="text" style="width: 90%;color: gray;">
- 完成时限: <span
- style="margin-left: 5px;color: cornflowerblue;">{{item.orderCompleteTime}}</span>
- </view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- </view>
- <view v-else class="view-flex-inline">
- <image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
- </image>
- <view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
- <text>暂无待处理工单</text>
- </view>
- </view>
- </uni-section>
- <uni-section title="工单完结审批" type="circle">
- <view v-if="closeApproveOrderCount>0">
- <uni-list>
- <uni-list-item v-for="item in closeApproveOrderList" :key="item.id" showArrow clickable
- @click="toOrderCloseApprove(item)" rightText="去审批">
- <template v-slot:body>
- <view class="list-item-block">
- <view class="line">
- <uni-icons type="personadd" size="18" color="lightblue" />
- <view class="text" style="width: 90%;color: gray;">
- 填报人: <span
- style="margin-left: 5px;color: cornflowerblue;">{{item.processorName}}</span>
- </view>
- </view>
- <view class="line">
- <uni-icons type="calendar" size="18" color="lightblue" />
- <view class="text" style="width: 90%;color: gray;">
- 填报时间: <span
- style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessTime}}</span>
- </view>
- </view>
- <view class="line">
- <uni-icons type="help" size="18" color="lightblue" />
- <view class="text text-ellipsis" style="width: 90%;color: gray;">
- 反馈意见: <span
- style="margin-left: 5px;color: cornflowerblue;">{{item.processDesc}}</span>
- </view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- </view>
- <view v-else class="view-flex-inline">
- <image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
- </image>
- <view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
- <text>暂无待审批工单</text>
- </view>
- </view>
- </uni-section>
- </uni-card> -->
- <!-- <uni-card title="巡检保养任务" :thumbnail="checkLogo" :is-shadow="false">
- <uni-section title="待巡检提醒" type="circle">
- <view v-if="inspectionTodoNoticeCount>0">
- <uni-list>
- <uni-list-item v-for="item in inspectionTodoNoticeList" :key="item.id" showArrow clickable
- @click="toInspection(item)" rightText="去巡检">
- <template v-slot:body>
- <view class="list-item-block">
- <view class="line">
-
- <view class="text" style="width: 90%;color: gray;">
- 巡检标题: <span
- style="margin-left: 5px;color: cornflowerblue;">{{item.inspectionTitle}}</span>
- </view>
- </view>
- <view v-if="item.planScheduledType ==1">
- <view class="line">
- <view class="text" style="width: 90%;color: gray;">
- 计划执行周期: <span style="margin-left: 5px;color: cornflowerblue;">仅一次</span>
- </view>
- </view>
- <view class="line">
- <view class="text" style="width: 90%;color: gray;">
- 巡检完成时间: <span
- style="margin-left: 5px;color: cornflowerblue;">{{item.inspectionCompleteTime}}</span>
- </view>
- </view>
- </view>
- <view v-else-if="item.planScheduledType ==2">
- <view class="line">
- <view class="text" style="width: 90%;color: gray;">
- 计划执行周期: <span style="margin-left: 5px;color: cornflowerblue;">定期</span>
- </view>
- </view>
- <view class="line">
- <view v-if="item.timeType ==1" class="text" style="width: 90%;color: gray;">
- 周期设置: <span style="margin-left: 5px;color: cornflowerblue;">按天</span>
- </view>
- <view v-else-if="item.timeType ==2" class="text"
- style="width: 90%;color: gray;">
- 周期设置: <span style="margin-left: 5px;color: cornflowerblue;">按周</span>
- </view>
- <view v-else-if="item.timeType ==3" class="text"
- style="width: 90%;color: gray;">
- 周期设置: <span style="margin-left: 5px;color: cornflowerblue;">按月</span>
- </view>
- </view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- </view>
- <view v-else class="view-flex-inline">
- <image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
- </image>
- <view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
- <text>暂无待巡检任务</text>
- </view>
- </view>
- </uni-section>
- <uni-section title="巡检完结审批" type="circle">
- <view v-if="inspectionCloseApproveCount>0">
- <uni-list>
- <uni-list-item v-for="item in inspectionCloseApproveList" :key="item.id" showArrow clickable
- @click="toInspectionCloseApprove(item)" rightText="去审批">
- <template v-slot:body>
- <view class="list-item-block">
- <view class="line">
- <view class="text" style="width: 90%;color: gray;">
- 巡检标题: <span
- style="margin-left: 5px;color: cornflowerblue;">{{item.inspectionTitle}}</span>
- </view>
- </view>
- <view class="line">
- <view class="text" style="width: 90%;color: gray;">
- 处理人: <span
- style="margin-left: 5px;color: cornflowerblue;">{{item.servicePersonName}}</span>
- </view>
- </view>
- <view class="line">
- <view class="text" style="width: 90%;color: gray;">
- 处理时间: <span
- style="margin-left: 5px;color: cornflowerblue;">{{item.inspectionReportTime}}</span>
- </view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- </view>
- <view v-else class="view-flex-inline">
- <image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
- </image>
- <view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
- <text>暂无待审批巡检任务</text>
- </view>
- </view>
- </uni-section>
- </uni-card> -->
- <view class="goods-carts" style="background-color: #f7f7f7;">
- <uni-row>
- <uni-col :span="4">
- <view class="view-flex-inline-center" style="height: 70px;">
- <image src="/static/images/user/touxiang@2x.png"
- style="width: 60rpx;height: 60rpx;border-radius: 50%;" mode="widthFix">
- </image>
- </view>
- </uni-col>
- <uni-col :span="16">
- <uni-list style="background-color: #f7f7f7;" :border="false">
- <uni-list-item v-if="isLogin" :border="false" style="background-color: #f7f7f7;" showArrow
- :title="userName" :note="userNote" :clickable="true" @click="onUserInfoClick()" />
- <uni-list-item v-else :border="false" style="background-color: #f7f7f7;" showArrow title="登录/注册"
- note="快速登录 注册体验更多功能" :clickable="true" @click="onLoginClick()" />
- </uni-list>
- </uni-col>
- <uni-col :span="4">
- </uni-col>
- </uni-row>
- </view>
- </view>
- </template>
- <script>
- import
- navBtns
- from "@/api/home.js";
- import {
- role
- } from "@/api/role.js";
- import {
- oss
- } from '@/common/setting';
- import http from '@/http/api.js';
- export default {
- components: {},
- data() {
- return {
- title: '泰山电教维护服务',
- permission: {
- 'admin': false,
- 'orgAdmin': false,
- 'companyAdmin': false,
- 'companyServciePerson': false,
- 'yjServicePerson': false,
- },
- userLoginStatus: 0,
- userName: 'guest',
- userNote: '泰山云服务已服务您180天',
- postName: '',
- currentRole: '',
- current: 0,
- navButton: [],
- navButtonIndex: [],
- //more/loading/noMore
- loadMoreStatus: "noMore",
- timer: false,
- pageSize: 10,
- pageCurrent: 1,
- total: 0,
- noticeDot: false,
- noticeValue: 0,
- unconfirmOrderCount: 0,
- unconfirmOrderList: [],
- todoOrderCount: 1,
- todoOrderList: [],
- costsApproveOrderCount: 0,
- costsApproveOrderList: [],
- closeApproveOrderCount: 0,
- closeApproveOrderList: [],
- todoOrderImg: "/static/images/home/icon_sy_dbgd@2x.png",
- closeApproveOrderImg: "/static/images/home/ico_sy_dspgd@2x.png",
- todoInspectionImg: "/static/images/home/icon_sy_xjbyrw@2x.png",
- closeApproveInspectionImg: "/static/images/home/icon_sy_dsprw@2x.png",
- inspectionTodoNoticeCount: 0,
- inspectionTodoNoticeList: [],
- inspectionCloseApproveCount: 0,
- inspectionCloseApproveList: [],
- ads: [],
- };
- },
- computed: {},
- onLoad() {
- // this.permission.admin = false;
- // this.permission.orgAdmin = false;
- // this.permission.companyAdmin = false;
- // this.permission.companyServciePerson = false;
- // this.permission.yjServicePerson = false;
- // this.navButton = navBtns.navButtons;
- // if (this.userInfo.role_name === role.admin) {
- // this.permission.admin = true;
- // this.navButtonIndex = navBtns.sysAdminNavButton;
- // this.currentRole = role.admin;
- // } else if (this.userInfo.role_name === role.orgAdmin) {
- // this.permission.orgAdmin = true;
- // this.currentRole = role.orgAdmin;
- // this.navButtonIndex = navBtns.orgAdminNavButton;
- // } else if (this.userInfo.role_name === role.companyAdmin) {
- // this.permission.companyAdmin = true;
- // this.currentRole = role.companyAdmin;
- // this.navButtonIndex = navBtns.companyAdminNavButton;
- // } else if (this.userInfo.role_name === role.companyServciePerson) {
- // this.permission.companyServciePerson = true;
- // this.currentRole = role.companyServciePerson;
- // this.navButtonIndex = navBtns.companyServicePersonNavButton;
- // if (this.userInfo.post_id == '1706859505948098562') {
- // this.postName = "engineer";
- // } else if (this.userInfo.post_id == '1730535542909140993') {
- // this.postName = "servicePerson";
- // }
- // }
- // if (this.$u.func.checkLogin()) {
- // console.log("timer start +++++++ ")
- // this.timer = true;
- // setTimeout(this.timeCall, 10);
- // }
- // console.log(JSON.stringify(this.isLogin))
- // if (this.$u.func.checkLogin()) {} else {
- // this.$u.func.logout();
- // }
- this.$u.func.checkLoginExpires();
- if (this.isLogin) {
- this.getTodoOrderConfirmList();
- this.getTodoOrderList();
- this.getTodoCloseOrderList();
- this.getTodoInspectionList();
- this.getInspectionCloseApproveList();
- }
- this.getAds();
- },
- onUnload() {
- //this.timer = false;
- },
- onReady() {},
- onShow() {
- // if (this.$u.func.checkLogin()) {
- // if (this.userInfo.role_name !== this.currentRole) {
- // this.permission.admin = false;
- // this.permission.orgAdmin = false;
- // this.permission.companyAdmin = false;
- // this.permission.companyServciePerson = false;
- // this.permission.yjServicePerson = false;
- // this.navButton = navBtns.navButtons;
- // if (this.userInfo.role_name === role.admin) {
- // this.permission.admin = true;
- // this.navButtonIndex = navBtns.sysAdminNavButton;
- // this.currentRole = role.admin;
- // } else if (this.userInfo.role_name === role.orgAdmin) {
- // this.permission.orgAdmin = true;
- // this.currentRole = role.orgAdmin;
- // this.navButtonIndex = navBtns.orgAdminNavButton;
- // } else if (this.userInfo.role_name === role.companyAdmin) {
- // this.permission.companyAdmin = true;
- // this.currentRole = role.companyAdmin;
- // this.navButtonIndex = navBtns.companyAdminNavButton;
- // } else if (this.userInfo.role_name === role.companyServciePerson) {
- // this.permission.companyServciePerson = true;
- // this.currentRole = role.companyServciePerson;
- // this.navButtonIndex = navBtns.companyServicePersonNavButton;
- // if (this.userInfo.post_id == '1706859505948098562') {
- // this.postName = "engineer";
- // } else if (this.userInfo.post_id == '1730535542909140993') {
- // this.postName = "servicePerson";
- // }
- // }
- // }
- // if (this.timer == false) {
- // this.timer = true;
- // setTimeout(this.timeCall, 10);
- // }
- // } else {
- // this.$u.func.logout();
- // }
- this.$u.func.checkLoginExpires();
- if (this.isLogin) {
- this.getTodoOrderConfirmList();
- this.getTodoOrderList();
- this.getTodoCloseOrderList();
- this.getTodoInspectionList();
- this.getInspectionCloseApproveList();
- }
- this.getAds();
- },
- onHide() {
- //this.timer = false;
- },
- methods: {
- toOss(path) {
- return oss + path;
- },
- onLoginClick() {
- console.log("onLoginClick")
- var url = '/pages/login/login-account?skipPage=1';
- uni.navigateTo({
- url: url
- })
- },
- onUserInfoClick() {
- console.log("onUserInfoClick")
- var url = '/pages/user/center-simple';
- uni.navigateTo({
- url: url
- })
- },
- timeCall() {
- if (this.timer == true) {
- this.getHomeInfo();
- setTimeout(this.timeCall, 10000);
- }
- },
- toConfirm(item) {
- var url = '/pages/check-order/order-confirm?orderType=' + item.orderType + '&orderId=' + item.id;
- uni.navigateTo({
- url: url
- })
- },
- toDo() {
- uni.navigateTo({
- url: '/pages/check-order/check-order-manage'
- })
-
- // var url = '/pages/check-order/orderprocessreport?orderId=' + item.id + '&skipPage=1';
- // uni.navigateTo({
- // url: url
- // })
- },
- toOrderProcess(item) {
- var url = '/pages/check-order/orderprocessreport?skipPage=1&costsApprove=2&orderType=' + item.orderType +
- '&orderProcessId=' + item
- .orderProcessId + '&orderId=' + item.id;
- uni.navigateTo({
- url: url
- })
- },
- toOrderCostsApprove(item) {
- var url = '/pages/check-order/ordercostsapprove?orderType=' + item.orderType + '&orderId=' + item.id;
- uni.navigateTo({
- url: url
- })
- },
- toOrderCloseApprove() {
- // console.log("toOrderCloseApprove")
- // var url = '/pages/check-order/order-close-approve?orderType=' + item.orderType + '&orderId=' + item.id;
- // uni.navigateTo({
- // url: url
- // })
- },
- toShortcutCreateOrder() {
- if (this.isLogin) {
- let url = '/pages/check-order/order-add';
- uni.navigateTo({
- url: url
- })
- } else {
- let toUrl = encodeURIComponent("/pages/check-order/order-add");
- let url = '/pages/check-order/order-advertising?toUrl=' + toUrl;
- uni.navigateTo({
- url: url
- })
- }
- },
- toShortcutInspectionPlan() {
- if (this.isLogin) {
- let url = '/pages/equipment-inspection/inspection-plan';
- uni.navigateTo({
- url: url
- })
- } else {
- let toUrl = encodeURIComponent("/pages/equipment-inspection/inspection-plan");
- let url = '/pages/equipment-inspection/inspection-advertising?toUrl=' + toUrl;
- uni.navigateTo({
- url: url
- })
- }
- },
- toInspection(item) {
- uni.navigateTo({
- url: '/pages/equipment-inspection/equipment-inspection-report?id=' + item.id
- })
- },
- toInspectionCloseApprove(item) {
- uni.navigateTo({
- url: '/pages/equipment-inspection/inspection-close-approve?id=' + item.id
- })
- },
- onNoticeMoreClick() {
- uni.navigateTo({
- url: '/pages/news/noticelist'
- })
- },
- getHomeInfo() {
- this.getTodoOrderConfirmList();
- this.getTodoOrderList();
- //this.getTodoCostsApproveOrderList();
- this.getTodoCloseOrderList();
- },
- getAds() {
- let that = this;
- let postData = {};
- http.request({
- url: '/galaxy-business/ads/manage/show/list',
- method: 'GET',
- data: postData,
- }).then(res => {
- console.log(JSON.stringify(res))
- // that.unconfirmOrderCount = 0;
- if (res.data != null) {
- that.ads = res.data.length;
- that.ads = res.data;
- }
- }).catch(err => {
- console.log(JOSN.stringify(err))
- })
- },
- getTodoOrderConfirmList() {
- let that = this;
- let postData = {};
- http.request({
- url: '/galaxy-business/order/todo/confirm/list',
- method: 'GET',
- data: postData,
- }).then(res => {
- console.log(JSON.stringify(res))
- that.unconfirmOrderCount = 0;
- if (res.data != null) {
- that.unconfirmOrderCount = res.data.length;
- that.unconfirmOrderList = res.data;
- }
- }).catch(err => {
- console.log(JOSN.stringify(err))
- })
- },
- getTodoOrderList() {
- let that = this;
- let postData = {};
- http.request({
- url: '/galaxy-business/order/todo/list',
- method: 'GET',
- data: postData,
- }).then(res => {
- console.log(JSON.stringify(res))
- that.todoOrderCount = 0;
- if (res.data != null) {
- that.todoOrderCount = res.data.length;
- that.todoOrderList = res.data;
- }
- }).catch(err => {
- console.log(JOSN.stringify(err))
- })
- },
- getTodoCostsApproveOrderList() {
- let that = this;
- let postData = {};
- http.request({
- url: '/galaxy-business/order/todo/costsapprove/list',
- method: 'GET',
- data: postData,
- }).then(res => {
- that.costsApproveOrderCount = 0;
- if (res.data != null) {
- that.costsApproveOrderCount = res.data.length;
- that.costsApproveOrderList = res.data;
- }
- }).catch(err => {
- console.log(JOSN.stringify(err))
- })
- },
- getTodoCloseOrderList() {
- let that = this;
- let postData = {};
- http.request({
- url: '/galaxy-business/order/todo/closeapprove/list',
- method: 'GET',
- data: postData,
- }).then(res => {
- that.closeApproveOrderCount = 0;
- if (res.data != null) {
- that.closeApproveOrderCount = res.data.length;
- that.closeApproveOrderList = res.data;
- }
- }).catch(err => {
- console.log(JOSN.stringify(err))
- })
- },
- getTodoInspectionList() {
- let that = this;
- let postData = {};
- http.request({
- url: '/galaxy-business/equipment/inspection/todo/list',
- method: 'GET',
- data: postData,
- }).then(res => {
- that.to = 0;
- if (res.data != null) {
- console.log(JSON.stringify(res))
- that.inspectionTodoNoticeCount = res.data.length;
- that.inspectionTodoNoticeList = res.data;
- }
- }).catch(err => {
- console.log(JOSN.stringify(err))
- })
- },
- getInspectionCloseApproveList() {
- let that = this;
- let postData = {};
- http.request({
- url: '/galaxy-business/equipment/inspection/close-approve/list',
- method: 'GET',
- data: postData,
- }).then(res => {
- that.inspectionCloseApproveCount = 0;
- if (res.data != null) {
- that.inspectionCloseApproveCount = res.data.length;
- that.inspectionCloseApproveList = res.data;
- }
- }).catch(err => {
- console.log(JOSN.stringify(err))
- })
- },
- }
- };
- </script>
- <style lang="scss" scoped>
- $nav-height: 75px;
- .user-box {
- display: flex;
- justify-content: space-between;
- padding: 0 20rpx 0 64rpx;
- margin-top: 36rpx;
- .left {
- display: flex;
- flex-direction: column;
- align-items: center;
- .avatar {
- width: 128rpx;
- height: 128rpx;
- background: #ffffff;
- border-radius: 50%;
- }
- .user-name {
- margin-top: 20rpx;
- font-size: 36rpx;
- font-family: Source Han Sans CN;
- font-weight: 500;
- color: #ffffff;
- }
- .tag {
- margin-top: 20rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- padding: 5rpx 16rpx;
- border: 1px solid #f5f5f5;
- border-radius: 7rpx;
- font-size: 19rpx;
- font-family: Source Han Sans CN;
- font-weight: 300;
- color: #ffffff;
- }
- }
- .edit-btn {
- margin-top: 20rpx;
- margin-bottom: 10px;
- flex-shrink: 0;
- display: flex;
- justify-content: center;
- align-items: center;
- width: 165rpx;
- height: 54rpx;
- border: 2rpx solid #f5f5f5;
- border-radius: 11rpx;
- font-size: 27rpx;
- font-family: Source Han Sans CN;
- font-weight: 400;
- color: #ffffff;
- }
- }
- .decoration {
- width: 6px;
- height: 6px;
- margin-right: 4px;
- border-radius: 50%;
- background-color: cadetblue;
- }
- .input-uni-icon {
- line-height: $nav-height;
- }
- .item-block {
- display: flex;
- flex-direction: column;
- justify-content: flex-start;
- width: 100%;
- }
- .line {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- width: 100%;
- }
- .line .block {
- display: flex;
- flex-direction: column;
- justify-content: center;
- }
- .line-end {
- display: flex;
- flex-direction: row;
- justify-content: flex-end;
- width: 100%;
- }
- .line-end .block {
- display: flex;
- flex-direction: column;
- justify-content: center;
- }
- .line-center {
- display: flex;
- flex-direction: row;
- justify-content: center;
- width: 100%;
- height: 100%;
- }
- .line-center .block {
- display: flex;
- flex-direction: column;
- justify-content: center;
- }
- .rtu-name {
- margin-left: 5rpx;
- font-size: 0.7rem;
- font-weight: bold;
- }
- .rtu-code {
- margin-left: 5rpx;
- font-size: 0.6rem;
- color: gray;
- }
- .item-text-line {
- width: 100%;
- display: flex;
- flex-direction: row;
- align-items: flex-start;
- padding-left: 0px;
- padding-right: 0px;
- .block {
- height: 100%;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- }
- .item-title {
- font-size: 0.7rem;
- }
- .item-text {
- padding-left: 2px;
- padding-right: 5px;
- font-size: 0.7rem;
- }
- .item-text-ell {
- width: 100%;
- overflow: hidden;
- font-size: 0.7rem;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- .item-number {
- font-size: 0.7rem;
- margin-left: 2px;
- margin-right: 5px;
- }
- }
- .item-title-image {
- /* #ifndef APP-NVUE */
- display: block;
- /* #endif */
- margin-right: 5px;
- width: 20px;
- height: 20px;
- border-radius: 50%;
- }
- .uni-badge-left-margin {
- margin-left: 0px;
- }
- .logo {
- flex-shrink: 0;
- width: 80rpx;
- height: auto;
- }
- .container {
- // background-color: #f7f7f7;
- // min-height: 100vh;
- overflow: hidden;
- padding: 0 0 75rpx;
- }
- .nav {
- margin: 0rpx 0;
- box-sizing: border-box;
- padding: 0 10rpx;
- &-item {
- width: 100%;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: space-between;
- height: 130rpx;
- &-img {
- width: 80rpx;
- height: 80rpx;
- }
- &-name {
- font-size: 0.7rem;
- font-family: PingFang SC;
- font-weight: 500;
- color: #585b61;
- }
- }
- }
- .point {
- display: flex;
- flex-direction: row;
- align-items: center;
- // margin: 15rpx 0;
- }
- .dot {
- //margin-left: -22rpx;
- background-color: #19be6b;
- box-shadow: 0 0 5rpx 5rpx #71d5a1;
- color: white;
- width: 40rpx;
- height: 40rpx;
- // padding: 5rpx;
- font-size: 28rpx;
- text-align: center;
- border-radius: 40rpx;
- }
- .goods-carts {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: column;
- position: fixed;
- left: 0;
- right: 0;
- /* #ifdef H5 */
- left: var(--window-left);
- right: var(--window-right);
- /* #endif */
- bottom: var(--window-bottom);
- }
- </style>
|