Commit b7fe5601388c72c8255478c1bf9fe8a2a5ca054f

Authored by zhangtingjun
1 parent ba09dc1a

移动端新增菜单

Showing 94 changed files with 9931 additions and 65 deletions
... ... @@ -28,7 +28,7 @@
28 28 // #ifdef H5
29 29 const userInfo = JSON.parse(sessionStorage.getItem('userInfo') || localStorage.getItem('userInfo'));
30 30 // #endif
31   - return userInfo.isThirdLogin
  31 + return userInfo?.isThirdLogin
32 32 },
33 33
34 34 // 判断i18n是中文还是英文
... ...
  1 +/**
  2 + * params ((page,pageSize))
  3 + * data ((deviceProfileIds))
  4 + */
  5 +//保养计划列表
  6 +const getMaintenancePlanListApi = (urlParams, data) => {
  7 + const { page, pageSize } = urlParams
  8 + return uni.$u.http.post(`/yt/preservePlan/pageData?page=${page}&pageSize=${pageSize}`, data)
  9 +}
  10 +
  11 +// 保养计划列表详情
  12 +const getMaintenancePlanDetail = (id) => {
  13 + return uni.$u.http.get(`/yt/preservePlan/detail?id=${id}`)
  14 +}
  15 +
  16 +
  17 +//保养记录列表
  18 +const getMaintenanceRecordListApi = (urlParams, data) => {
  19 + const { page, pageSize } = urlParams
  20 + return uni.$u.http.post(`/yt/preserveRecord/pageData?page=${page}&pageSize=${pageSize}`, data)
  21 +}
  22 +
  23 +// 保养记录列表详情
  24 +const getMaintenanceRecordDetail = (id) => {
  25 + return uni.$u.http.get(`/yt/preserveRecord/detail?id=${id}`)
  26 +}
  27 +
  28 +
  29 +//保养明细列表
  30 +const getMaintenanceDetailApi = (urlParams, data) => {
  31 + const { page, pageSize } = urlParams
  32 + return uni.$u.http.post(`/yt/preservePlan/pageDetail?page=${page}&pageSize=${pageSize}`, data)
  33 +}
  34 +
  35 +//巡检计划列表
  36 +const getPatrolPlanListApi = (urlParams) => {
  37 + const { page, pageSize,type='',name='',startTimeStart='',startTimeEnd='',endTimeStart='',endTimeEnd=''} = urlParams
  38 + return uni.$u.http.get(`/yt/inspectionPlan?page=${page}&pageSize=${pageSize}&type=${type}&name=${name}&startTimeStart=${startTimeStart}&startTimeEnd=${startTimeEnd}&endTimeStart=${endTimeStart}&endTimeEnd=${endTimeEnd}`)
  39 +}
  40 +
  41 +// 巡检计划列表详情
  42 +const getPatrolPlanDetail = (id) => {
  43 + return uni.$u.http.get(`/yt/inspectionPlan/detail?id=${id}`)
  44 +}
  45 +
  46 +//巡检记录列表
  47 +const getPatrolRecordListApi = (urlParams) => {
  48 + const { page, pageSize,inspectionPlanId='',inspectorId='',startTime='',endTime='',recordResult='',inspectionPlanName='',deviceId = ''} = urlParams
  49 + return uni.$u.http.get(`/yt/inspectionRecord?page=${page}&pageSize=${pageSize}&inspectionPlanId=${inspectionPlanId}&inspectorId=${inspectorId}&startTime=${startTime}&endTime=${endTime}&recordResult=${recordResult}&inspectionPlanName=${inspectionPlanName}&deviceId=${deviceId}`)
  50 +}
  51 +
  52 +// 巡检记录列表详情
  53 +const getPatrolRecordDetail = (id) => {
  54 + return uni.$u.http.get(`/yt/inspectionRecord/detail?id=${id}`)
  55 +}
  56 +
  57 +
  58 +export default {
  59 + getMaintenancePlanListApi,
  60 + getMaintenancePlanDetail,
  61 + getMaintenanceRecordListApi,
  62 + getMaintenanceRecordDetail,
  63 + getMaintenanceDetailApi,
  64 + getPatrolPlanListApi,
  65 + getPatrolPlanDetail,
  66 + getPatrolRecordListApi,
  67 + getPatrolRecordDetail
  68 +
  69 +}
... ...
  1 +/**
  2 + * params ((page,pageSize))
  3 + * data ((deviceProfileIds))
  4 + */
  5 +
  6 +//设备类型
  7 +const getDeviceTypeApi = (data) => {
  8 + return uni.$u.http.post(`/yt/deviceCagegory/getAllCagegory`, data)
  9 +}
  10 +
  11 +//设备台账列表
  12 +const getLedgerListApi = (urlParams, data) => {
  13 + const { page, pageSize } = urlParams
  14 + return uni.$u.http.post(`/yt/da/pageData?page=${page}&pageSize=${pageSize}`, data)
  15 +}
  16 +
  17 +// 设备台账列表详情
  18 +const getLedgerListDetail = (id) => {
  19 + return uni.$u.http.get(`/yt/da/detail?id=${id}`)
  20 +}
  21 +
  22 +//故障原因列表
  23 +const getFaultListApi = (urlParams, data) => {
  24 + const { page, pageSize } = urlParams
  25 + return uni.$u.http.post(`/yt/mr/pageData?page=${page}&pageSize=${pageSize}`, data)
  26 +}
  27 +
  28 +// 故障原因列表详情
  29 +const getFaultListDetail = (id) => {
  30 + return uni.$u.http.get(`/yt/mr/detail?id=${id}`)
  31 +}
  32 +
  33 +
  34 +//巡检/保养方案列表
  35 +const getCheckPlanApi = (urlParams) => {
  36 + const { page, pageSize,type='',name='', status=''} = urlParams
  37 + return uni.$u.http.get(`/yt/checkPlan?page=${page}&pageSize=${pageSize}&type=${type}&name=${name}&status=${status}`)
  38 +}
  39 +
  40 +//巡检/保养方案列表详情
  41 +const getCheckPlanDetail = (id) => {
  42 + return uni.$u.http.get(`/yt/checkPlan/get?id=${id}`)
  43 +}
  44 +
  45 +
  46 +export default {
  47 + getFaultListApi,
  48 + getFaultListDetail,
  49 + getCheckPlanApi,
  50 + getCheckPlanDetail,
  51 + getLedgerListApi,
  52 + getLedgerListDetail,
  53 + getDeviceTypeApi
  54 +
  55 +}
... ...
  1 +/**
  2 + * params ((page,pageSize))
  3 + * data ((deviceProfileIds))
  4 + */
  5 +//维修工单列表
  6 +const getRepairWorkListApi = (urlParams, data) => {
  7 + const { page, pageSize } = urlParams
  8 + return uni.$u.http.post(`/yt/repairOrder/pageData?page=${page}&pageSize=${pageSize}`, data)
  9 +}
  10 +
  11 +// 维修工单列表详情
  12 +const getRepairWorkDetail = (id) => {
  13 + return uni.$u.http.get(`/yt/repairOrder/detail?id=${id}`)
  14 +}
  15 +
  16 +//维修记录
  17 +const getRepairRecordApi = (urlParams, data) => {
  18 + const { page, pageSize } = urlParams
  19 + return uni.$u.http.post(`/yt/repairRecord/pageData?page=${page}&pageSize=${pageSize}`, data)
  20 +}
  21 +
  22 +// 维修工单列表详情
  23 +const getRepairRecordDetail = (id) => {
  24 + return uni.$u.http.get(`/yt/repairRecord/detail?id=${id}`)
  25 +}
  26 +
  27 +
  28 +
  29 +export default {
  30 + getRepairWorkListApi,
  31 + getRepairWorkDetail,
  32 + getRepairRecordApi,
  33 + getRepairRecordDetail
  34 +
  35 +}
... ...
... ... @@ -21,11 +21,23 @@ import alarmApi from './alarmApi/index.js'
21 21 //设备
22 22 import deviceApi from './deviceApi/index.js'
23 23
  24 +//设备基础信息管理
  25 +import deviceManagementApi from './deviceManagementApi/index.js'
  26 +
  27 +//设备报修维修
  28 +import deviceRepairApi from './deviceRepairApi/index.js'
  29 +
  30 +//设备巡检保养
  31 +import deviceInspectApi from './deviceInspectApi/index.js'
  32 +
24 33 export default {
25 34 loginApi,
26 35 feedbackApi,
27 36 notifyApi,
28 37 homeApi,
29 38 alarmApi,
30   - deviceApi
  39 + deviceApi,
  40 + deviceManagementApi,
  41 + deviceRepairApi,
  42 + deviceInspectApi
31 43 }
... ...
  1 +<template>
  2 + <u-popup @close="$emit('close')" closeable bgColor="#fff" :show="show" mode="bottom" :round="20"
  3 + @touchmove.stop.prevent="disabledScroll">
  4 + <view class="filter" @touchmove.stop.prevent="disabledScroll">
  5 + <view class="filter-title"><text>{{ $t('common.filterCriteria') }}</text></view>
  6 + <view class="query-item" v-for="(item, index) in filterList">
  7 + <view class="query-title">
  8 + <text>{{ item.title }}</text>
  9 + </view>
  10 + <view class="query-list">
  11 + <view v-for="(itemChild, indexChild) in item.typeList" :key="indexChild" @click="handleClickTag(indexChild, item.typeList)"
  12 + :class="['tag-item', { checked: itemChild.checked, 'mr-30': (indexChild + 1) % 3 !== 0 }]">
  13 + {{ $t(itemChild.name) }}
  14 + </view>
  15 + </view>
  16 + <view class="select-date" v-if="item.isDate">
  17 + <view class="datetime-picker">
  18 + <uni-datetime-picker return-type="string" v-model="item.range" type="datetimerange"
  19 + :rangeSeparator="$t('common.toText')" />
  20 + </view>
  21 + </view>
  22 + </view>
  23 + <view class="button-group">
  24 + <view>
  25 + <u-button :customStyle="{ color: '#333' }" color="#e3e3e5" shape="circle" :text="$t('common.resetting')"
  26 + @click="resetFilter"></u-button>
  27 + </view>
  28 + <view>
  29 + <u-button color="#3388ff" shape="circle" :text="$t('common.confirm')" @click="confirmFilter"></u-button>
  30 + </view>
  31 + </view>
  32 + </view>
  33 + </u-popup>
  34 +</template>
  35 +
  36 +<script>
  37 + export default {
  38 + components: {
  39 +
  40 + },
  41 + props: {
  42 + show: Boolean,
  43 + filterList: {
  44 + type: Array,
  45 + default: () => []
  46 + },
  47 + filterName:Object
  48 + },
  49 + data() {
  50 + return {
  51 +
  52 +
  53 +
  54 + }
  55 + },
  56 +
  57 + methods: {
  58 + disabledScroll() {
  59 + return;
  60 + },
  61 + //点击选中的标签
  62 + handleClickTag(currentIndex, list) {
  63 + list.map((item, index) => {
  64 + item.checked = index === currentIndex;
  65 + });
  66 + },
  67 + //重置
  68 + resetFilter() {
  69 + this.filterList.forEach((item)=>{
  70 +
  71 + if(item.isDate){
  72 + item.range = []
  73 + }else{
  74 + item.typeList.forEach((item1)=>{
  75 + if(item1.name === '全部'){
  76 + item1.checked = true
  77 + }else{
  78 + item1.checked = false
  79 + }
  80 + })
  81 + }
  82 + })
  83 +
  84 + },
  85 + //确定
  86 + confirmFilter() {
  87 + let checkedList = this.filterName
  88 + this.filterList.forEach((item)=>{
  89 +
  90 + if(item.isDate){
  91 + if (Array.isArray(item.range)) {
  92 + checkedList[item.startDate] = item.range[0] ? item.range[0] : ''
  93 + checkedList[item.endDate] = item.range[1] ? item.range[1] : ''
  94 + }
  95 + }else{
  96 + item.typeList.forEach((item1)=>{
  97 + if(item1.checked){
  98 + checkedList[item.titleCode] = item1.code
  99 + }
  100 + })
  101 + }
  102 +
  103 + })
  104 + this.$emit('queryCondition', checkedList)
  105 + },
  106 +
  107 + change(e) {
  108 + // this.single = e;
  109 + // console.log("-change事件:", e);
  110 + },
  111 + }
  112 + }
  113 +</script>
  114 +
  115 +<style lang="scss" scoped>
  116 + .filter {
  117 + padding: 0 30rpx;
  118 +
  119 + .filter-title {
  120 + text-align: center;
  121 + margin-top: 14px;
  122 + font-size: 16px;
  123 + font-weight: 700;
  124 + }
  125 +
  126 + .button-group {
  127 + display: flex;
  128 + margin-top: 40rpx;
  129 + justify-content: space-between;
  130 +
  131 + view {
  132 + width: 330rpx;
  133 + }
  134 + }
  135 + .select-date {
  136 + display: flex;
  137 + flex-direction: column;
  138 + justify-content: space-between;
  139 + }
  140 +
  141 + .datetime-picker {
  142 + width: 640rpx;
  143 + margin-left: 5rpx;
  144 + margin-right: 70rpx;
  145 + margin-top: 35rpx;
  146 + }
  147 + .query-item {
  148 + margin-top: 40rpx;
  149 +
  150 + .query-title {
  151 + color: #333;
  152 + font-size: 14px;
  153 + font-weight: 700;
  154 + }
  155 +
  156 + .query-list {
  157 + display: flex;
  158 + flex-wrap: wrap;
  159 +
  160 + .tag-item {
  161 + margin-top: 30rpx;
  162 + min-width: 198rpx;
  163 + padding: 0 12rpx;
  164 + height: 68rpx;
  165 + border-radius: 32rpx;
  166 + display: flex;
  167 + justify-content: center;
  168 + align-items: center;
  169 + color: #333;
  170 + font-size: 13px;
  171 + border: 1px solid #fff;
  172 + background-color: #f6f6f6;
  173 + }
  174 +
  175 + .checked {
  176 + border: 1px solid #377dff4d;
  177 + background-color: #377dff0d;
  178 + color: #377dffff;
  179 + }
  180 +
  181 + .mr-30 {
  182 + margin-right: 30rpx;
  183 + }
  184 + }
  185 + }
  186 +
  187 + }
  188 +</style>
... ...
  1 +<template>
  2 + <u-sticky>
  3 + <view class="device-top">
  4 + <view class="search">
  5 + <view>
  6 + <view class="search-left" :style="{ width: width + 'rpx'}">
  7 + <slot></slot>
  8 + </view>
  9 + </view>
  10 + <view @click="$emit('openSearchDialog')" class="search-right" v-if="isShowSelect">
  11 + <text>{{ $t('common.screen') }}</text>
  12 + <image src="../../static/shaixuan.png" />
  13 + </view>
  14 + </view>
  15 + <u-line />
  16 + <view class="org" v-if="isShowTree">
  17 + <u-cell @click="$emit('openOrg')" isLink :title="title" :border="false">
  18 + <view slot="label" class="label" style="display: flex; align-items: center;margin-top: 20rpx;">
  19 + <image src="../../static/org.png" style="width: 24rpx;height: 28rpx;"></image>
  20 + <view style="margin-left: 10rpx; color: #666;">
  21 + {{totalText}}
  22 + <text style="margin-left: 20rpx;">{{ total }}</text>
  23 + </view>
  24 + </view>
  25 + </u-cell>
  26 + </view>
  27 + </view>
  28 + </u-sticky>
  29 +</template>
  30 +
  31 +<script>
  32 + export default {
  33 + props: {
  34 + isShowSelect:{
  35 + type: Boolean,
  36 + default: true
  37 + },
  38 + isShowTree:{
  39 + type: Boolean,
  40 + default: false
  41 + },
  42 + title:{
  43 + type: String,
  44 + default: ''
  45 + },
  46 + totalText:{
  47 + type: String,
  48 + default: ''
  49 + },
  50 + total:{
  51 + type:Number
  52 + },
  53 + width:{
  54 + type:Number
  55 + }
  56 +
  57 +
  58 + }
  59 + }
  60 +</script>
  61 +
  62 +<style lang="scss" scoped>
  63 + /deep/ .u-button--primary {
  64 + background-color: #377dff !important;
  65 + border-color: #377dff !important;
  66 + }
  67 +
  68 + /deep/ .u-button--info {
  69 + background-color: #e3e3e5 !important;
  70 + border-color: #e3e3e5 !important;
  71 + }
  72 +
  73 + /deep/ .u-cell__right-icon-wrap {
  74 + margin-top: -55rpx !important;
  75 + }
  76 +
  77 + /deep/ .uni-calendar--fixed {
  78 + bottom: 172rpx !important;
  79 + }
  80 +
  81 + .pop-no-scroll {
  82 + overflow: hidden;
  83 + position: fixed;
  84 + height: 100%;
  85 + width: 100%;
  86 + }
  87 +
  88 + .device-top {
  89 + padding: 10rpx 30rpx;
  90 + background-color: #fff;
  91 +
  92 + .search {
  93 + display: flex;
  94 + justify-content: space-between;
  95 + padding-bottom: 10rpx;
  96 +
  97 + .search-left {
  98 + width: 580rpx;
  99 + background-color: #f8f9fa;
  100 + border-radius: 200rpx;
  101 + }
  102 +
  103 + .search-right {
  104 + display: flex;
  105 + align-items: center;
  106 +
  107 + text {
  108 + color: #333;
  109 + font-size: 14px;
  110 + }
  111 +
  112 + image {
  113 + width: 40rpx;
  114 + height: 40rpx;
  115 + }
  116 + }
  117 + }
  118 + }
  119 +</style>
... ...
  1 +<template>
  2 + <view class="device-list">
  3 + <view @click="$emit('openDeviceDetail',item)"
  4 + class="list-item" v-for="item in list" :key="item.id">
  5 + <view class="u-flex item">
  6 + <view class="item-text text-clip title-bottom">
  7 + <view>
  8 + <text class="text-span-bold">{{ item.title ? item.title : '' }}</text>
  9 + </view>
  10 + </view>
  11 + <view class="item-text text-clip" v-for="itemChild in item.child">
  12 + <view class="text-container">
  13 + {{$t(itemChild.label)}}:
  14 + <text class="text-span">{{ itemChild.name ? itemChild.name : ''}}</text>
  15 + </view>
  16 + </view>
  17 + </view>
  18 + <view class="item right-item">
  19 + <view class="u-flex" style="margin-top: -6rpx">
  20 + <image class="right-image" :src="item.iconUrl ? item.iconUrl :''" />
  21 + <view>
  22 + <text class="right-text" :style="{ color:item.color ? item.color :'' }">
  23 + {{item.status ? item.status : ''}}
  24 + </text>
  25 + </view>
  26 + </view>
  27 + </view>
  28 + </view>
  29 + </view>
  30 +</template>
  31 +
  32 +<script>
  33 + export default {
  34 + props: {
  35 + list: {
  36 + type: Array,
  37 + default: []
  38 + }
  39 + },
  40 + methods: {
  41 + }
  42 + }
  43 +</script>
  44 +
  45 +<style lang="scss" scoped>
  46 + .device-list {
  47 + display: flex;
  48 + flex-direction: column;
  49 + padding-left: 20rpx;
  50 + .list-item:last-child{
  51 + margin-bottom: 40rpx;
  52 + }
  53 +
  54 + .list-item {
  55 + width: 713rpx;
  56 + // height: 200rpx;
  57 + background-color: #fff;
  58 + margin-top: 24rpx;
  59 + display: flex;
  60 + border-radius: 10px;
  61 + justify-content: space-between;
  62 + position: relative;
  63 +
  64 + .item {
  65 + margin: 30rpx;
  66 + flex-direction: column;
  67 + justify-content: space-between;
  68 +
  69 + .item-text {
  70 + width: 480rpx;
  71 +
  72 + .text-container {
  73 + display: flex;
  74 +
  75 + .text-span {
  76 + color: #666;
  77 + font-size: 14px;
  78 + display: flex;
  79 + margin-left: 20rpx;
  80 + }
  81 + }
  82 +
  83 +
  84 +
  85 + .text-span-bold {
  86 + color: #333;
  87 + font-size: 15px;
  88 + font-weight: bold;
  89 + }
  90 + }
  91 + .title-bottom{
  92 + margin-bottom: 10rpx;
  93 + }
  94 + }
  95 +
  96 + .right-item {
  97 + // margin:30rpx 30rpx 30rpx 0 ;
  98 + position: absolute;
  99 + right: 0;
  100 + top: 0;
  101 + .right-image {
  102 + width: 30rpx;
  103 + height: 30rpx;
  104 + margin-top: 5rpx;
  105 + margin-right: 5rpx;
  106 + }
  107 +
  108 + .right-text {
  109 + color: #377dff;
  110 + font-size: 13px;
  111 + margin-left: 5rpx;
  112 + margin-top: 20rpx;
  113 + }
  114 + }
  115 + }
  116 + }
  117 +</style>
... ...
... ... @@ -135,6 +135,34 @@
135 135 }
136 136 ]
137 137 //#endif
  138 + //#ifdef H5
  139 + list: [{
  140 + name: 'menu.homePage',
  141 + url: 'pages/index/index',
  142 + icon: '/static/home-un.png',
  143 + iconFill: '/static/home-yes.png'
  144 + },
  145 + {
  146 + name: 'menu.device',
  147 + url: 'pages/device/device',
  148 + icon: '/static/device-un.png',
  149 + iconFill: '/static/device-yes.png'
  150 + },
  151 + {
  152 + name: 'menu.alarm',
  153 + url: 'pages/alarm/alarm',
  154 + icon: '/static/alert-un.png',
  155 + iconFill: '/static/alert-yes.png',
  156 + badge: this.$store.state.badgeInfo
  157 + },
  158 + {
  159 + name: 'menu.my',
  160 + url: 'pages/personal/personal',
  161 + icon: '/static/my-un.png',
  162 + iconFill: '/static/my-yes.png'
  163 + }
  164 + ]
  165 + //#endif
138 166 };
139 167 },
140 168 created() {
... ...
... ... @@ -9,7 +9,14 @@ import { getTabbarHeight } from '@/plugins/utils'
9 9 * socketPrefix websocket前缀 ((https, wss),( http, ws))
10 10 */
11 11 // const baseUrl = 'http://222.180.200.114:30427/api'
12   -const baseUrl = 'http://192.168.1.235:9527/api'
  12 +// const baseUrl = 'http://192.168.1.235:9527/api'
  13 +// const baseUrl = 'http://10.9.0.205:9527/api'
  14 +
  15 +const baseUrl = 'http://10.9.4.101:8080/api'
  16 +
  17 +const baseImgUrl = 'http://10.9.4.101:8080'
  18 +
  19 +
13 20
14 21 //
15 22 // const baseVisualUrl = 'http://222.180.200.114:30427'
... ... @@ -56,6 +63,7 @@ const courtConfig = {
56 63 baseWebSocketUrl, //服务端websocket地址
57 64 socketPrefix, //websocket前缀
58 65 systemInfo: systemInfo, //系统信息
  66 + baseImgUrl,
59 67 mapData: {
60 68 key: '', //地图key
61 69 sk: '',
... ...
... ... @@ -18,7 +18,7 @@ uni.$u.http.setConfig((config) => {
18 18 uni.getStorageSync("userInfo").isToken ||
19 19 undefined;
20 20 // #ifdef H5
21   - window.sessionStorage.getItem("userInfo").isToken;
  21 + window.sessionStorage.getItem("userInfo")?.isToken;
22 22 // #endif
23 23 /* config 为默认全局配置*/
24 24 // const getConfiguration = uni.getStorageSync('getConfiguration').isConfiguration
... ...
  1 +const list = [
  2 + {
  3 + name: 'deviceInspect.basicInfo',
  4 + },
  5 + {
  6 + name: 'deviceInspect.preserveRecord',
  7 + }
  8 +]
  9 +
  10 +
  11 +export { list }
... ...
  1 +<template>
  2 + <view class="device-detail-page">
  3 + <!-- 公共组件-每个页面必须引入 -->
  4 + <public-module></public-module>
  5 + <u-sticky :bgColor="bgColor">
  6 + <u-tabs :list="list.map(item=>({...item,name:$t(item.name)}))" :current="currentTab" :lineWidth="30" @click=" handleTabClick " :activeStyle="{activeColor}"
  7 + :inactiveStyle="inActiveColor" :scrollable="isScrollable" itemStyle="padding: 0 11px;display:flex;flex-direction:row;align-items:center;justify-content:center;height:44px" />
  8 + </u-sticky>
  9 + <view class="mt-3">
  10 + <view class="basic-box" v-show="currentTab == 0">
  11 + <view class="basic-header">
  12 + <view class="u-flex">
  13 + <view class="basic-text text-clip ml-2">
  14 + {{ listDetail.preserveCode }}
  15 + </view>
  16 + <view v-if="listDetail.status" class="basic-text-status ml-2" :style="{ color: planType[listDetail.status].color}">
  17 + {{ listDetail.status ? planType[listDetail.status].name : '' }}
  18 + </view>
  19 + </view>
  20 + </view>
  21 + <view class="detail">
  22 + <view class="detail-item">
  23 + <view class="detail-label">{{ $t('deviceInspect.preserveCode') }}</view>
  24 + <view class="detail-value">{{ listDetail.preserveCode}}</view>
  25 + </view>
  26 + <u-line length="90%" margin="0 auto"></u-line>
  27 + <view class="detail-item">
  28 + <view class="detail-label">{{ $t('deviceInspect.preserveName') }}</view>
  29 + <view class="detail-value">{{ listDetail.preserveName}}</view>
  30 + </view>
  31 + <u-line length="90%" margin="0 auto"></u-line>
  32 + <view class="detail-item">
  33 + <view class="detail-label">{{ $t('deviceInspect.frequency') }}</view>
  34 + <view class="detail-value">{{ listDetail.frequency }}</view>
  35 + </view>
  36 + <u-line length="90%" margin="0 auto"></u-line>
  37 + <view class="detail-item">
  38 + <view class="detail-label">{{ $t('deviceInspect.times') }}</view>
  39 + <view class="detail-value">{{ listDetail.times }}</view>
  40 + </view>
  41 + </view>
  42 + </view>
  43 + <view class="record-box" v-show="currentTab == 1">
  44 + <!-- 列表分页 -->
  45 + <mescroll-body ref="mescrollRef" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback"
  46 + @up="upCallback">
  47 + <page-list :list="listData" @openDeviceDetail="openDeviceDetail"></page-list>
  48 + <mescroll-empty v-if="!listData.length" />
  49 + </mescroll-body>
  50 + </view>
  51 +
  52 + </view>
  53 + </view>
  54 +</template>
  55 +
  56 +<script>
  57 +import fTabbar from "@/components/module/f-tabbar/f-tabbar";
  58 +import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js';
  59 +import api from '@/api/index.js'
  60 +import {planType,preserveType} from '@/pages/deviceInspect/enum/index.js'
  61 +import { list } from './config/data.js'
  62 +import baseUrl from '@/config/baseUrl.js'
  63 +import pageList from '@/components/common/page-list'
  64 +
  65 +
  66 +export default {
  67 + mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
  68 + components: {
  69 + fTabbar,
  70 + pageList
  71 +
  72 + },
  73 + data() {
  74 + return {
  75 + bgColor: '#fff',
  76 + activeColor: {
  77 + fontWeight: 'bold',
  78 + color: '#333',
  79 + },
  80 + inActiveColor: {
  81 + color: '#999',
  82 + },
  83 + listDetail:{},
  84 + list,
  85 + currentTab: 0,
  86 + isScrollable: false,
  87 + planType,
  88 + downOption: {
  89 + auto: false //是否在初始化后,自动执行downCallback; 默认true
  90 + },
  91 + upOption: {
  92 + isBounce: false,
  93 + auto: false // 不自动加载
  94 + },
  95 + page: {
  96 + num: 0,
  97 + size: 10
  98 + },
  99 + startDate:'', //开始时间
  100 + endDate:'', //结束时间
  101 + preservePlanId:'', //保养计划id
  102 + preserveBy:'', //保养人id
  103 + preserveStatus:'', //状态
  104 + deviceId:'', //设备id
  105 + listData:[]
  106 +
  107 + };
  108 + },
  109 + onUnload() {
  110 +
  111 + },
  112 + async onLoad(options) {
  113 + // 隐藏原生的tabbar
  114 + uni.hideTabBar();
  115 + if (getApp().getBindNot()) {
  116 + return
  117 + }
  118 + let id = options.id
  119 + const res = await api.deviceInspectApi.getMaintenancePlanDetail(id)
  120 + if (!res) return
  121 + this.listDetail = {...res}
  122 +
  123 +
  124 + },
  125 + onShow(){
  126 + this.$nextTick(()=>{
  127 + uni.setNavigationBarTitle({
  128 + title:this.$t('menu.maintenancePlanDetail')
  129 + })
  130 + })
  131 +
  132 +
  133 + },
  134 + watch: {
  135 + currentTab: {
  136 + immediate: true,
  137 + handler(val) {
  138 + if(val == 1){
  139 + this.page.num = 1
  140 + this.loadData(this.page.num);
  141 + }
  142 +
  143 + }
  144 + },
  145 +
  146 +
  147 +
  148 + },
  149 +
  150 + methods: {
  151 + handleTabClick({index}) {
  152 + this.currentTab = index;
  153 + },
  154 +
  155 + formatImage(url) {
  156 + return baseUrl.baseImgUrl + url
  157 + },
  158 + //下拉刷新
  159 + downCallback() {
  160 + if (getApp().getBindNot()) {
  161 + setTimeout(() => {
  162 + this.mescroll.endByPage(0, 0)
  163 + }, 200)
  164 + return
  165 + }
  166 + this.listData = [];
  167 + this.page.num = 1;
  168 + this.loadData(this.page.num);
  169 + this.resetQuery();
  170 + },
  171 + //上拉加载
  172 + upCallback() {
  173 + if (getApp().getBindNot()) {
  174 + setTimeout(() => {
  175 + this.mescroll.endByPage(0, 0)
  176 + }, 200)
  177 + return
  178 + }
  179 + this.page.num += 1;
  180 + this.loadData(this.page.num);
  181 + },
  182 + //获取列表
  183 + async loadData(pageNo,params={}) {
  184 + try {
  185 + let httpData = {
  186 + page: pageNo,
  187 + pageSize: 10,
  188 + };
  189 + const httpPostData = {
  190 + startDate:this.startDate, //开始时间
  191 + endDate:this.endDate, //结束时间
  192 + preservePlanId:this.listDetail.id, //保养计划id
  193 + preserveBy:this.preserveBy, //保养人id
  194 + preserveStatus:this.preserveStatus, //状态
  195 + deviceId:'', //设备id
  196 + ...params
  197 + }
  198 + const {
  199 + total,
  200 + items
  201 + } = await api.deviceInspectApi.getMaintenanceRecordListApi(httpData, httpPostData)
  202 +
  203 + let data = items
  204 + let newList = data.map((item)=>{
  205 + return {
  206 + id:item.id,
  207 + title:item.recordCode,
  208 + status:item.preserveStatus ? preserveType[item.preserveStatus].name : '',
  209 + iconUrl:item.preserveStatus ? preserveType[item.preserveStatus].iconUrl : '',
  210 + color:item.preserveStatus ? preserveType[item.preserveStatus].color : '',
  211 + child:[
  212 + {
  213 + label:'deviceInspect.preserveDate',
  214 + name:item.preserveDate
  215 + },
  216 + {
  217 + label:'deviceInspect.preserveByName',
  218 + name:item.preserveByName
  219 + },
  220 + {
  221 + label:'deviceInspect.preserveStatus',
  222 + name:item.preserveStatus ? preserveType[item.preserveStatus].name :''
  223 + }
  224 +
  225 + ],
  226 + detail:{
  227 + ...item
  228 + }
  229 + }
  230 + })
  231 + uni.stopPullDownRefresh();
  232 + this.mescroll.endByPage(items.length); //必传参数(当前页的数据个数, 总页数)
  233 + if (pageNo == 1) {
  234 + this.listData = newList;
  235 + } else {
  236 + this.listData = this.listData.concat(newList);
  237 + }
  238 +
  239 +
  240 + } catch {
  241 + this.mescroll.endErr();
  242 + }
  243 + },
  244 +
  245 +
  246 + },
  247 +};
  248 +</script>
  249 +
  250 +<style lang="scss" scoped>
  251 +.device-detail-page {
  252 + min-height: 100vh;
  253 + background-color: #f8f9fa;
  254 + // padding: 0 30rpx;
  255 + .mt-3{
  256 + // padding: 0 30rpx;
  257 + margin-top: 0;
  258 + .basic-box{
  259 + margin-top: 30rpx;
  260 + padding: 0 30rpx;
  261 + }
  262 + .record-box{
  263 + // padding: 0 30rpx 0 15rpx;
  264 + }
  265 + }
  266 + .basic-header {
  267 + display: flex;
  268 + justify-content: space-between;
  269 + align-items: center;
  270 + height: 140rpx;
  271 + background-color: #fff;
  272 + border-radius: 20rpx;
  273 + padding-left: 40rpx;
  274 + padding-right:20rpx;
  275 +
  276 +
  277 + .basic-text {
  278 + width: 370rpx;
  279 + }
  280 +
  281 + .cu-item {
  282 + background: #3388ff;
  283 + border-radius: 12px;
  284 + width: 120rpx;
  285 + height: 48rpx;
  286 + text-align: center;
  287 + line-height: 40rpx;
  288 +
  289 + text {
  290 + font-size: 12px;
  291 + font-family: PingFangSC-Regular, PingFang SC;
  292 + font-weight: 400;
  293 + color: #ffffff;
  294 + }
  295 + }
  296 +
  297 + .basic-text-status {
  298 + font-size: 14px;
  299 + }
  300 + }
  301 + .detail {
  302 + background-color: #fff;
  303 + margin-top: 30rpx;
  304 + border-radius: 20rpx;
  305 + width: 690rpx;
  306 +
  307 + .detail-item {
  308 + padding: 30rpx;
  309 + display: flex;
  310 + align-items: center;
  311 +
  312 + .detail-label {
  313 + color: #333;
  314 + font-size: 15px;
  315 + }
  316 +
  317 + .detail-value {
  318 + color: #666;
  319 + font-size: 14px;
  320 + margin-left: 30rpx;
  321 + .detail-img{
  322 + width: 60rpx;
  323 + height: 60rpx;
  324 + }
  325 + }
  326 + }
  327 + }
  328 +}
  329 +</style>
... ...
  1 +const list = [
  2 + {
  3 + name: 'deviceInspect.basicInfo',
  4 + },
  5 + {
  6 + name: 'deviceInspect.preserveDetail',
  7 + }
  8 +]
  9 +
  10 +
  11 +export { list }
... ...
  1 +<template>
  2 + <view class="device-detail-page">
  3 + <!-- 公共组件-每个页面必须引入 -->
  4 + <public-module></public-module>
  5 + <u-sticky :bgColor="bgColor">
  6 + <u-tabs :list="list.map(item=>({...item,name:$t(item.name)}))" :current="currentTab" :lineWidth="30" @click=" handleTabClick " :activeStyle="{activeColor}"
  7 + :inactiveStyle="inActiveColor" :scrollable="isScrollable" itemStyle="padding: 0 11px;display:flex;flex-direction:row;align-items:center;justify-content:center;height:44px" />
  8 + </u-sticky>
  9 + <view class="mt-3">
  10 + <view class="basic-box" v-show="currentTab == 0">
  11 + <view class="basic-header">
  12 + <view class="u-flex">
  13 + <view class="basic-text text-clip ml-2">
  14 + {{ listDetail.recordCode }}
  15 + </view>
  16 + <view v-if="listDetail.preserveStatus" class="basic-text-status ml-2" :style="{ color: preserveType[listDetail.preserveStatus].color}">
  17 + {{ listDetail.preserveStatus ? preserveType[listDetail.preserveStatus].name : '' }}
  18 + </view>
  19 + </view>
  20 + </view>
  21 + <view class="detail">
  22 + <view class="detail-item">
  23 + <view class="detail-label">{{ $t('deviceInspect.recordCode') }}</view>
  24 + <view class="detail-value">{{ listDetail.recordCode}}</view>
  25 + </view>
  26 + <u-line length="90%" margin="0 auto"></u-line>
  27 + <view class="detail-item">
  28 + <view class="detail-label">{{ $t('deviceInspect.preserveDate') }}</view>
  29 + <view class="detail-value">{{ listDetail.preserveDate}}</view>
  30 + </view>
  31 + <u-line length="90%" margin="0 auto"></u-line>
  32 + <view class="detail-item">
  33 + <view class="detail-label">{{ $t('deviceInspect.preserveByName') }}</view>
  34 + <view class="detail-value">{{ listDetail.preserveByName }}</view>
  35 + </view>
  36 + <u-line length="90%" margin="0 auto"></u-line>
  37 + <view class="detail-item">
  38 + <view class="detail-label">{{ $t('deviceInspect.preservePlanName') }}</view>
  39 + <view class="detail-value">{{ listDetail.preservePlanName }}</view>
  40 + </view>
  41 + </view>
  42 + </view>
  43 + <view class="record-box" v-show="currentTab == 1">
  44 + <!-- 列表分页 -->
  45 + <mescroll-body ref="mescrollRef" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback"
  46 + @up="upCallback">
  47 + <page-list :list="listData" @openDeviceDetail="openDeviceDetail"></page-list>
  48 + <mescroll-empty v-if="!listData.length" />
  49 + </mescroll-body>
  50 + </view>
  51 +
  52 + </view>
  53 + </view>
  54 +</template>
  55 +
  56 +<script>
  57 +import fTabbar from "@/components/module/f-tabbar/f-tabbar";
  58 +import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js';
  59 +import api from '@/api/index.js'
  60 +import {planType,preserveType,detailType} from '@/pages/deviceInspect/enum/index.js'
  61 +import { list } from './config/data.js'
  62 +import baseUrl from '@/config/baseUrl.js'
  63 +import pageList from '@/components/common/page-list'
  64 +
  65 +
  66 +export default {
  67 + mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
  68 + components: {
  69 + fTabbar,
  70 + pageList
  71 +
  72 + },
  73 + data() {
  74 + return {
  75 + bgColor: '#fff',
  76 + activeColor: {
  77 + fontWeight: 'bold',
  78 + color: '#333',
  79 + },
  80 + inActiveColor: {
  81 + color: '#999',
  82 + },
  83 + listDetail:{},
  84 + list,
  85 + preserveType,
  86 + currentTab: 0,
  87 + detailType,
  88 + isScrollable: false,
  89 + planType,
  90 + downOption: {
  91 + auto: false //是否在初始化后,自动执行downCallback; 默认true
  92 + },
  93 + upOption: {
  94 + isBounce: false,
  95 + auto: false // 不自动加载
  96 + },
  97 + page: {
  98 + num: 0,
  99 + size: 10
  100 + },
  101 + preservePlanId:'', //保养计划id
  102 + listData:[]
  103 +
  104 + };
  105 + },
  106 + onUnload() {
  107 +
  108 + },
  109 + async onLoad(options) {
  110 + // 隐藏原生的tabbar
  111 + uni.hideTabBar();
  112 + if (getApp().getBindNot()) {
  113 + return
  114 + }
  115 + let id = options.id
  116 + const res = await api.deviceInspectApi.getMaintenanceRecordDetail(id)
  117 + if (!res) return
  118 + this.listDetail = {...res}
  119 +
  120 +
  121 + },
  122 + onShow(){
  123 + this.$nextTick(()=>{
  124 + uni.setNavigationBarTitle({
  125 + title:this.$t('menu.maintenanceRecordDetail')
  126 + })
  127 + })
  128 +
  129 +
  130 + },
  131 + watch: {
  132 + currentTab: {
  133 + immediate: true,
  134 + handler(val) {
  135 + if(val == 1){
  136 + this.page.num = 1
  137 + this.loadData(this.page.num);
  138 + }
  139 +
  140 + }
  141 + },
  142 +
  143 +
  144 +
  145 + },
  146 +
  147 + methods: {
  148 + handleTabClick({index}) {
  149 + this.currentTab = index;
  150 + },
  151 +
  152 + formatImage(url) {
  153 + return baseUrl.baseImgUrl + url
  154 + },
  155 + //下拉刷新
  156 + downCallback() {
  157 + if (getApp().getBindNot()) {
  158 + setTimeout(() => {
  159 + this.mescroll.endByPage(0, 0)
  160 + }, 200)
  161 + return
  162 + }
  163 + this.listData = [];
  164 + this.page.num = 1;
  165 + this.loadData(this.page.num);
  166 + this.resetQuery();
  167 + },
  168 + //上拉加载
  169 + upCallback() {
  170 + if (getApp().getBindNot()) {
  171 + setTimeout(() => {
  172 + this.mescroll.endByPage(0, 0)
  173 + }, 200)
  174 + return
  175 + }
  176 + this.page.num += 1;
  177 + this.loadData(this.page.num);
  178 + },
  179 + //获取列表
  180 + async loadData(pageNo) {
  181 + try {
  182 + let httpData = {
  183 + page: pageNo,
  184 + pageSize: 10,
  185 + };
  186 + const httpPostData = {
  187 + preservePlanId:this.listDetail.preservePlanId, //保养计划id
  188 + }
  189 + const {
  190 + total,
  191 + items
  192 + } = await api.deviceInspectApi.getMaintenanceDetailApi(httpData, httpPostData)
  193 +
  194 + let data = items
  195 + let newList = data.map((item)=>{
  196 + return {
  197 + id:item.id,
  198 + title:item.deviceInfo ? item.deviceInfo.name : '',
  199 + status:item.detailStatus ? detailType[item.detailStatus].name : '',
  200 + iconUrl:item.detailStatus ? detailType[item.detailStatus].iconUrl : '',
  201 + color:item.detailStatus ? detailType[item.detailStatus].color : '',
  202 + child:[
  203 + {
  204 + label:'deviceInspect.preserveDetail',
  205 + name:item.preserveDetail
  206 + },
  207 + {
  208 + label:'deviceInspect.checkPlanName',
  209 + name:item.checkPlanName
  210 + }
  211 + ],
  212 + detail:{
  213 + ...item
  214 + }
  215 + }
  216 + })
  217 + uni.stopPullDownRefresh();
  218 + this.mescroll.endByPage(items.length); //必传参数(当前页的数据个数, 总页数)
  219 + if (pageNo == 1) {
  220 + this.listData = newList;
  221 + } else {
  222 + this.listData = this.listData.concat(newList);
  223 + }
  224 +
  225 +
  226 + } catch {
  227 + this.mescroll.endErr();
  228 + }
  229 + },
  230 +
  231 +
  232 + },
  233 +};
  234 +</script>
  235 +
  236 +<style lang="scss" scoped>
  237 +.device-detail-page {
  238 + min-height: 100vh;
  239 + background-color: #f8f9fa;
  240 + // padding: 0 30rpx;
  241 + .mt-3{
  242 + // padding: 0 30rpx;
  243 + margin-top: 0;
  244 + .basic-box{
  245 + margin-top: 30rpx;
  246 + padding: 0 30rpx;
  247 + }
  248 + .record-box{
  249 + // padding: 0 30rpx 0 15rpx;
  250 + }
  251 + }
  252 + .basic-header {
  253 + display: flex;
  254 + justify-content: space-between;
  255 + align-items: center;
  256 + height: 140rpx;
  257 + background-color: #fff;
  258 + border-radius: 20rpx;
  259 + padding-left: 40rpx;
  260 + padding-right:20rpx;
  261 +
  262 +
  263 + .basic-text {
  264 + width: 370rpx;
  265 + }
  266 +
  267 + .cu-item {
  268 + background: #3388ff;
  269 + border-radius: 12px;
  270 + width: 120rpx;
  271 + height: 48rpx;
  272 + text-align: center;
  273 + line-height: 40rpx;
  274 +
  275 + text {
  276 + font-size: 12px;
  277 + font-family: PingFangSC-Regular, PingFang SC;
  278 + font-weight: 400;
  279 + color: #ffffff;
  280 + }
  281 + }
  282 +
  283 + .basic-text-status {
  284 + font-size: 14px;
  285 + }
  286 + }
  287 + .detail {
  288 + background-color: #fff;
  289 + margin-top: 30rpx;
  290 + border-radius: 20rpx;
  291 + width: 690rpx;
  292 +
  293 + .detail-item {
  294 + padding: 30rpx;
  295 + display: flex;
  296 + align-items: center;
  297 +
  298 + .detail-label {
  299 + color: #333;
  300 + font-size: 15px;
  301 + }
  302 +
  303 + .detail-value {
  304 + color: #666;
  305 + font-size: 14px;
  306 + margin-left: 30rpx;
  307 + .detail-img{
  308 + width: 60rpx;
  309 + height: 60rpx;
  310 + }
  311 + }
  312 + }
  313 + }
  314 +}
  315 +</style>
... ...
  1 +const list = [
  2 + {
  3 + name: 'deviceInspect.basicInfo',
  4 + },
  5 + {
  6 + name: 'deviceInspect.patrolRecord',
  7 + }
  8 +]
  9 +
  10 +
  11 +export { list }
... ...
  1 +<template>
  2 + <view class="device-detail-page">
  3 + <!-- 公共组件-每个页面必须引入 -->
  4 + <public-module></public-module>
  5 + <u-sticky :bgColor="bgColor">
  6 + <u-tabs :list="list.map(item=>({...item,name:$t(item.name)}))" :current="currentTab" :lineWidth="30" @click=" handleTabClick " :activeStyle="{activeColor}"
  7 + :inactiveStyle="inActiveColor" :scrollable="isScrollable" itemStyle="padding: 0 11px;display:flex;flex-direction:row;align-items:center;justify-content:center;height:44px" />
  8 + </u-sticky>
  9 + <view class="mt-3">
  10 + <view class="basic-box" v-show="currentTab == 0">
  11 + <view class="basic-header">
  12 + <view class="u-flex">
  13 + <view class="basic-text text-clip ml-2">
  14 + {{ listDetail.code }}
  15 + </view>
  16 + <view v-if="listDetail.status" class="basic-text-status ml-2" :style="{ color: inspectionType[listDetail.status].color}">
  17 + {{ listDetail.status ? inspectionType[listDetail.status].name : '' }}
  18 + </view>
  19 + </view>
  20 + </view>
  21 + <view class="detail">
  22 + <view class="detail-item">
  23 + <view class="detail-label">{{ $t('deviceInspect.preserveCode') }}</view>
  24 + <view class="detail-value">{{ listDetail.code}}</view>
  25 + </view>
  26 + <u-line length="90%" margin="0 auto"></u-line>
  27 + <view class="detail-item">
  28 + <view class="detail-label">{{ $t('deviceInspect.preserveName') }}</view>
  29 + <view class="detail-value">{{ listDetail.name}}</view>
  30 + </view>
  31 + <u-line length="90%" margin="0 auto"></u-line>
  32 + <view class="detail-item">
  33 + <view class="detail-label">{{ $t('deviceInspect.startTime') }}</view>
  34 + <view class="detail-value">{{ listDetail.startTime }}</view>
  35 + </view>
  36 + <u-line length="90%" margin="0 auto"></u-line>
  37 + <view class="detail-item">
  38 + <view class="detail-label">{{ $t('deviceInspect.endTime') }}</view>
  39 + <view class="detail-value">{{ listDetail.endTime }}</view>
  40 + </view>
  41 + </view>
  42 + </view>
  43 + <view class="record-box" v-show="currentTab == 1">
  44 + <!-- 列表分页 -->
  45 + <mescroll-body ref="mescrollRef" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback"
  46 + @up="upCallback">
  47 + <page-list :list="listData" @openDeviceDetail="openDeviceDetail"></page-list>
  48 + <mescroll-empty v-if="!listData.length" />
  49 + </mescroll-body>
  50 + </view>
  51 +
  52 + </view>
  53 + </view>
  54 +</template>
  55 +
  56 +<script>
  57 +import fTabbar from "@/components/module/f-tabbar/f-tabbar";
  58 +import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js';
  59 +import api from '@/api/index.js'
  60 +import {planType,preserveType,detailType,inspectionType,inspectionResult} from '@/pages/deviceInspect/enum/index.js'
  61 +import { list } from './config/data.js'
  62 +import baseUrl from '@/config/baseUrl.js'
  63 +import pageList from '@/components/common/page-list'
  64 +
  65 +
  66 +export default {
  67 + mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
  68 + components: {
  69 + fTabbar,
  70 + pageList
  71 +
  72 + },
  73 + data() {
  74 + return {
  75 + bgColor: '#fff',
  76 + activeColor: {
  77 + fontWeight: 'bold',
  78 + color: '#333',
  79 + },
  80 + inActiveColor: {
  81 + color: '#999',
  82 + },
  83 + listDetail:{},
  84 + list,
  85 + inspectionType,
  86 + preserveType,
  87 + currentTab: 0,
  88 + detailType,
  89 + isScrollable: false,
  90 + planType,
  91 + downOption: {
  92 + auto: false //是否在初始化后,自动执行downCallback; 默认true
  93 + },
  94 + upOption: {
  95 + isBounce: false,
  96 + auto: false // 不自动加载
  97 + },
  98 + page: {
  99 + num: 0,
  100 + size: 10
  101 + },
  102 + preservePlanId:'', //保养计划id
  103 + listData:[]
  104 +
  105 + };
  106 + },
  107 + onUnload() {
  108 +
  109 + },
  110 + async onLoad(options) {
  111 + // 隐藏原生的tabbar
  112 + uni.hideTabBar();
  113 + if (getApp().getBindNot()) {
  114 + return
  115 + }
  116 + let id = options.id
  117 + const res = await api.deviceInspectApi.getPatrolPlanDetail(id)
  118 + if (!res) return
  119 + this.listDetail = {...res}
  120 +
  121 +
  122 + },
  123 + onShow(){
  124 + this.$nextTick(()=>{
  125 + uni.setNavigationBarTitle({
  126 + title:this.$t('menu.patrolPlanDetail')
  127 + })
  128 + })
  129 +
  130 +
  131 + },
  132 + watch: {
  133 + currentTab: {
  134 + immediate: true,
  135 + handler(val) {
  136 + if(val == 1){
  137 + this.page.num = 1
  138 + this.loadData(this.page.num);
  139 + }
  140 +
  141 + }
  142 + },
  143 +
  144 +
  145 +
  146 + },
  147 +
  148 + methods: {
  149 + handleTabClick({index}) {
  150 + this.currentTab = index;
  151 + },
  152 +
  153 + formatImage(url) {
  154 + return baseUrl.baseImgUrl + url
  155 + },
  156 + //下拉刷新
  157 + downCallback() {
  158 + if (getApp().getBindNot()) {
  159 + setTimeout(() => {
  160 + this.mescroll.endByPage(0, 0)
  161 + }, 200)
  162 + return
  163 + }
  164 + this.listData = [];
  165 + this.page.num = 1;
  166 + this.loadData(this.page.num);
  167 + this.resetQuery();
  168 + },
  169 + //上拉加载
  170 + upCallback() {
  171 + if (getApp().getBindNot()) {
  172 + setTimeout(() => {
  173 + this.mescroll.endByPage(0, 0)
  174 + }, 200)
  175 + return
  176 + }
  177 + this.page.num += 1;
  178 + this.loadData(this.page.num);
  179 + },
  180 + //获取列表
  181 + async loadData(pageNo) {
  182 +
  183 + try {
  184 + let httpData = {
  185 + page: pageNo,
  186 + pageSize: 10,
  187 + inspectionPlanId:this.listDetail.id,
  188 + inspectorId:'',
  189 + startTime:'',
  190 + endTime:'',
  191 + recordResult:''
  192 + };
  193 +
  194 + const {
  195 + total,
  196 + items
  197 + } = await api.deviceInspectApi.getPatrolRecordListApi(httpData)
  198 +
  199 + let data = items
  200 +
  201 + let newList = data.map((item)=>{
  202 + return {
  203 + id:item.id,
  204 + title:item.code,
  205 + status:item.recordResult ? inspectionResult[item.recordResult].name : '',
  206 + iconUrl:item.recordResult ? inspectionResult[item.recordResult].iconUrl : '',
  207 + color:item.recordResult ? inspectionResult[item.recordResult].color : '',
  208 + child:[
  209 + {
  210 + label:'deviceInspect.recordCode',
  211 + name:item.code
  212 + },
  213 + {
  214 + label:'deviceInspect.patrolPlan',
  215 + name:item.tkInspectionPlanDTO ? item.tkInspectionPlanDTO.name : ''
  216 + },
  217 + {
  218 + label:'deviceInspect.patrolByName',
  219 + name:item.userDTO ? item.userDTO.realName : ''
  220 + },
  221 + {
  222 + label:'deviceInspect.checkDate',
  223 + name:item.checkDate
  224 + },
  225 + ],
  226 + detail:{
  227 + ...item
  228 + }
  229 + }
  230 + })
  231 + uni.stopPullDownRefresh();
  232 + this.mescroll.endByPage(items.length); //必传参数(当前页的数据个数, 总页数)
  233 + if (pageNo == 1) {
  234 + this.listData = newList;
  235 + } else {
  236 + this.listData = this.listData.concat(newList);
  237 + }
  238 +
  239 +
  240 + } catch {
  241 + this.mescroll.endErr();
  242 + }
  243 + },
  244 +
  245 +
  246 + },
  247 +};
  248 +</script>
  249 +
  250 +<style lang="scss" scoped>
  251 +.device-detail-page {
  252 + min-height: 100vh;
  253 + background-color: #f8f9fa;
  254 + // padding: 0 30rpx;
  255 + .mt-3{
  256 + // padding: 0 30rpx;
  257 + margin-top: 0;
  258 + .basic-box{
  259 + margin-top: 30rpx;
  260 + padding: 0 30rpx;
  261 + }
  262 + .record-box{
  263 + // padding: 0 30rpx 0 15rpx;
  264 + }
  265 + }
  266 + .basic-header {
  267 + display: flex;
  268 + justify-content: space-between;
  269 + align-items: center;
  270 + height: 140rpx;
  271 + background-color: #fff;
  272 + border-radius: 20rpx;
  273 + padding-left: 40rpx;
  274 + padding-right:20rpx;
  275 +
  276 +
  277 + .basic-text {
  278 + width: 370rpx;
  279 + }
  280 +
  281 + .cu-item {
  282 + background: #3388ff;
  283 + border-radius: 12px;
  284 + width: 120rpx;
  285 + height: 48rpx;
  286 + text-align: center;
  287 + line-height: 40rpx;
  288 +
  289 + text {
  290 + font-size: 12px;
  291 + font-family: PingFangSC-Regular, PingFang SC;
  292 + font-weight: 400;
  293 + color: #ffffff;
  294 + }
  295 + }
  296 +
  297 + .basic-text-status {
  298 + font-size: 14px;
  299 + }
  300 + }
  301 + .detail {
  302 + background-color: #fff;
  303 + margin-top: 30rpx;
  304 + border-radius: 20rpx;
  305 + width: 690rpx;
  306 +
  307 + .detail-item {
  308 + padding: 30rpx;
  309 + display: flex;
  310 + align-items: center;
  311 +
  312 + .detail-label {
  313 + color: #333;
  314 + font-size: 15px;
  315 + }
  316 +
  317 + .detail-value {
  318 + color: #666;
  319 + font-size: 14px;
  320 + margin-left: 30rpx;
  321 + .detail-img{
  322 + width: 60rpx;
  323 + height: 60rpx;
  324 + }
  325 + }
  326 + }
  327 + }
  328 +}
  329 +</style>
... ...
  1 +const list = [
  2 + {
  3 + name: 'deviceInspect.basicInfo',
  4 + },
  5 + {
  6 + name: 'deviceInspect.patrolDetail',
  7 + }
  8 +]
  9 +
  10 +
  11 +export { list }
... ...
  1 +<template>
  2 + <view class="device-detail-page">
  3 + <!-- 公共组件-每个页面必须引入 -->
  4 + <public-module></public-module>
  5 + <u-sticky :bgColor="bgColor">
  6 + <u-tabs :list="list.map(item=>({...item,name:$t(item.name)}))" :current="currentTab" :lineWidth="30" @click=" handleTabClick " :activeStyle="{activeColor}"
  7 + :inactiveStyle="inActiveColor" :scrollable="isScrollable" itemStyle="padding: 0 11px;display:flex;flex-direction:row;align-items:center;justify-content:center;height:44px" />
  8 + </u-sticky>
  9 + <view class="mt-3">
  10 + <view class="basic-box" v-show="currentTab == 0">
  11 + <view class="basic-header">
  12 + <view class="u-flex">
  13 + <view class="basic-text text-clip ml-2">
  14 + {{ listDetail.code }}
  15 + </view>
  16 + <view v-if="listDetail.recordResult" class="basic-text-status ml-2" :style="{ color: inspectionResult[listDetail.recordResult].color}">
  17 + {{ listDetail.recordResult ? inspectionResult[listDetail.recordResult].name : '' }}
  18 + </view>
  19 + </view>
  20 + </view>
  21 + <view class="detail">
  22 + <view class="detail-item">
  23 + <view class="detail-label">{{ $t('deviceInspect.recordCode') }}</view>
  24 + <view class="detail-value">{{ listDetail.code}}</view>
  25 + </view>
  26 + <u-line length="90%" margin="0 auto"></u-line>
  27 + <view class="detail-item">
  28 + <view class="detail-label">{{ $t('deviceInspect.patrolPlan') }}</view>
  29 + <view class="detail-value">{{ listDetail.tkInspectionPlanDTO ? listDetail.tkInspectionPlanDTO.name :''}}</view>
  30 + </view>
  31 + <u-line length="90%" margin="0 auto"></u-line>
  32 + <view class="detail-item">
  33 + <view class="detail-label">{{ $t('deviceInspect.patrolByName') }}</view>
  34 + <view class="detail-value">{{ listDetail.userDTO ? listDetail.userDTO.realName : '' }}</view>
  35 + </view>
  36 + <u-line length="90%" margin="0 auto"></u-line>
  37 + <view class="detail-item">
  38 + <view class="detail-label">{{ $t('deviceInspect.checkDate') }}</view>
  39 + <view class="detail-value">{{ listDetail.checkDate }}</view>
  40 + </view>
  41 + </view>
  42 + </view>
  43 + <view class="record-box" v-show="currentTab == 1">
  44 + <!-- 列表分页 -->
  45 + <mescroll-body ref="mescrollRef" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback"
  46 + @up="upCallback">
  47 + <page-list :list="listData" @openDeviceDetail="openDeviceDetail"></page-list>
  48 + <mescroll-empty v-if="!listData.length" />
  49 + </mescroll-body>
  50 + </view>
  51 +
  52 + </view>
  53 + </view>
  54 +</template>
  55 +
  56 +<script>
  57 +import fTabbar from "@/components/module/f-tabbar/f-tabbar";
  58 +import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js';
  59 +import api from '@/api/index.js'
  60 +import {planType,preserveType,detailType,inspectionType,inspectionResult} from '@/pages/deviceInspect/enum/index.js'
  61 +import { list } from './config/data.js'
  62 +import baseUrl from '@/config/baseUrl.js'
  63 +import pageList from '@/components/common/page-list'
  64 +
  65 +
  66 +export default {
  67 + mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
  68 + components: {
  69 + fTabbar,
  70 + pageList
  71 +
  72 + },
  73 + data() {
  74 + return {
  75 + bgColor: '#fff',
  76 + activeColor: {
  77 + fontWeight: 'bold',
  78 + color: '#333',
  79 + },
  80 + inActiveColor: {
  81 + color: '#999',
  82 + },
  83 + listDetail:{},
  84 + list,
  85 + inspectionType,
  86 + inspectionResult,
  87 + preserveType,
  88 + currentTab: 0,
  89 + detailType,
  90 + isScrollable: false,
  91 + planType,
  92 + downOption: {
  93 + auto: false //是否在初始化后,自动执行downCallback; 默认true
  94 + },
  95 + upOption: {
  96 + isBounce: false,
  97 + auto: false // 不自动加载
  98 + },
  99 + page: {
  100 + num: 0,
  101 + size: 10
  102 + },
  103 + preservePlanId:'', //保养计划id
  104 + listData:[]
  105 +
  106 + };
  107 + },
  108 + onUnload() {
  109 +
  110 + },
  111 + async onLoad(options) {
  112 + // 隐藏原生的tabbar
  113 + uni.hideTabBar();
  114 + if (getApp().getBindNot()) {
  115 + return
  116 + }
  117 + let id = options.id
  118 + const res = await api.deviceInspectApi.getPatrolRecordDetail(id)
  119 + if (!res) return
  120 + this.listDetail = {...res}
  121 +
  122 +
  123 + },
  124 + onShow(){
  125 + this.$nextTick(()=>{
  126 + uni.setNavigationBarTitle({
  127 + title:this.$t('menu.patrolRecordDetail')
  128 + })
  129 + })
  130 +
  131 +
  132 + },
  133 + watch: {
  134 + currentTab: {
  135 + immediate: true,
  136 + handler(val) {
  137 + if(val == 1){
  138 + this.loadData();
  139 + }
  140 +
  141 + }
  142 + },
  143 +
  144 +
  145 +
  146 + },
  147 +
  148 + methods: {
  149 + handleTabClick({index}) {
  150 + this.currentTab = index;
  151 + },
  152 +
  153 + formatImage(url) {
  154 + return baseUrl.baseImgUrl + url
  155 + },
  156 + //下拉刷新
  157 + downCallback() {
  158 + if (getApp().getBindNot()) {
  159 + setTimeout(() => {
  160 + this.mescroll.endByPage(0, 0)
  161 + }, 200)
  162 + return
  163 + }
  164 + this.loadData();
  165 + // this.listData = [];
  166 + // this.page.num = 1;
  167 + // this.loadData(this.page.num);
  168 + // this.resetQuery();
  169 + },
  170 + //上拉加载
  171 + upCallback() {
  172 + if (getApp().getBindNot()) {
  173 + setTimeout(() => {
  174 + this.mescroll.endByPage(0, 0)
  175 + }, 200)
  176 + return
  177 + }
  178 +
  179 + // this.page.num += 1;
  180 + this.loadData();
  181 + },
  182 + //获取列表
  183 + loadData() {
  184 + let data = this.listDetail.tkInspectionDetailsDTOList
  185 + let newList = data.map((item)=>{
  186 + return {
  187 + id:item.id,
  188 + title:item.patrolDevice,
  189 + status:item.recordResult ? inspectionResult[item.recordResult].name : '',
  190 + iconUrl:item.recordResult ? inspectionResult[item.recordResult].iconUrl : '',
  191 + color:item.recordResult ? inspectionResult[item.recordResult].color : '',
  192 + child:[
  193 + {
  194 + label:'deviceInspect.patrolDevice',
  195 + name:item.tkDeviceAccountDTO ? item.tkDeviceAccountDTO.name : ''
  196 + },
  197 + {
  198 + label:'deviceInspect.patrolContent',
  199 + name:item.planDetails
  200 + },
  201 + ],
  202 + detail:{
  203 + ...item
  204 + }
  205 + }
  206 + })
  207 + this.listData = newList
  208 +
  209 + },
  210 +
  211 +
  212 + },
  213 +};
  214 +</script>
  215 +
  216 +<style lang="scss" scoped>
  217 +.device-detail-page {
  218 + min-height: 100vh;
  219 + background-color: #f8f9fa;
  220 + // padding: 0 30rpx;
  221 + .mt-3{
  222 + // padding: 0 30rpx;
  223 + margin-top: 0;
  224 + .basic-box{
  225 + margin-top: 30rpx;
  226 + padding: 0 30rpx;
  227 + }
  228 + .record-box{
  229 + // padding: 0 30rpx 0 15rpx;
  230 + }
  231 + }
  232 + .basic-header {
  233 + display: flex;
  234 + justify-content: space-between;
  235 + align-items: center;
  236 + height: 140rpx;
  237 + background-color: #fff;
  238 + border-radius: 20rpx;
  239 + padding-left: 40rpx;
  240 + padding-right:20rpx;
  241 +
  242 +
  243 + .basic-text {
  244 + width: 370rpx;
  245 + }
  246 +
  247 + .cu-item {
  248 + background: #3388ff;
  249 + border-radius: 12px;
  250 + width: 120rpx;
  251 + height: 48rpx;
  252 + text-align: center;
  253 + line-height: 40rpx;
  254 +
  255 + text {
  256 + font-size: 12px;
  257 + font-family: PingFangSC-Regular, PingFang SC;
  258 + font-weight: 400;
  259 + color: #ffffff;
  260 + }
  261 + }
  262 +
  263 + .basic-text-status {
  264 + font-size: 14px;
  265 + }
  266 + }
  267 + .detail {
  268 + background-color: #fff;
  269 + margin-top: 30rpx;
  270 + border-radius: 20rpx;
  271 + width: 690rpx;
  272 +
  273 + .detail-item {
  274 + padding: 30rpx;
  275 + display: flex;
  276 + align-items: center;
  277 +
  278 + .detail-label {
  279 + color: #333;
  280 + font-size: 15px;
  281 + }
  282 +
  283 + .detail-value {
  284 + color: #666;
  285 + font-size: 14px;
  286 + margin-left: 30rpx;
  287 + .detail-img{
  288 + width: 60rpx;
  289 + height: 60rpx;
  290 + }
  291 + }
  292 + }
  293 + }
  294 +}
  295 +</style>
... ...
  1 +<template>
  2 + <view class="device-detail-page">
  3 + <!-- 公共组件-每个页面必须引入 -->
  4 + <public-module></public-module>
  5 + <view class="mt-3">
  6 + <view class="basic-header">
  7 + <view class="u-flex">
  8 + <view class="basic-text text-clip ml-2">
  9 + {{ listDetail.reason }}
  10 + </view>
  11 + <view v-if="listDetail.status" class="basic-text-status ml-2" :style="{ color: faultDevice[listDetail.status].color}">
  12 + {{ listDetail.status ? faultDevice[listDetail.status].name : ''}}
  13 + </view>
  14 + </view>
  15 + </view>
  16 + <view class="detail">
  17 + <view class="detail-item">
  18 + <view class="detail-label">{{ $t('deviceMangement.recordNumber') }}</view>
  19 + <view class="detail-value">{{ listDetail.code}}</view>
  20 + </view>
  21 + <u-line length="90%" margin="0 auto"></u-line>
  22 + <view class="detail-item">
  23 + <view class="detail-label">{{ $t('deviceMangement.faultName') }}</view>
  24 + <view class="detail-value">{{ listDetail.reason }}</view>
  25 + </view>
  26 +
  27 + </view>
  28 + </view>
  29 + </view>
  30 +</template>
  31 +
  32 +<script>
  33 +import fTabbar from "@/components/module/f-tabbar/f-tabbar";
  34 +import api from '@/api/index.js'
  35 +import {faultDevice} from '@/pages/deviceManagement/enum/index.js'
  36 +
  37 +
  38 +export default {
  39 + components: {
  40 + fTabbar,
  41 +
  42 + },
  43 + data() {
  44 + return {
  45 + listDetail:{},
  46 + faultDevice
  47 + };
  48 + },
  49 + onUnload() {
  50 +
  51 + },
  52 + async onLoad(options) {
  53 + // 隐藏原生的tabbar
  54 + uni.hideTabBar();
  55 + if (getApp().getBindNot()) {
  56 + return
  57 + }
  58 + let id = options.id
  59 + const res = await api.deviceManagementApi.getFaultListDetail(id)
  60 + if (!res) return
  61 + this.listDetail = {...res}
  62 +
  63 + },
  64 + onShow(){
  65 + this.$nextTick(()=>{
  66 + uni.setNavigationBarTitle({
  67 + title:this.$t('menu.faultCauseDetail')
  68 + })
  69 + })
  70 +
  71 + },
  72 +
  73 + methods: {
  74 +
  75 +
  76 + },
  77 +};
  78 +</script>
  79 +
  80 +<style lang="scss" scoped>
  81 +.device-detail-page {
  82 + min-height: 100vh;
  83 + background-color: #f8f9fa;
  84 + padding: 0 30rpx;
  85 + .basic-header {
  86 + display: flex;
  87 + justify-content: space-between;
  88 + align-items: center;
  89 + height: 140rpx;
  90 + background-color: #fff;
  91 + border-radius: 20rpx;
  92 + padding-left: 40rpx;
  93 + padding-right:20rpx;
  94 +
  95 + .basic-text {
  96 + width: 370rpx;
  97 + }
  98 +
  99 + .cu-item {
  100 + background: #3388ff;
  101 + border-radius: 12px;
  102 + width: 120rpx;
  103 + height: 48rpx;
  104 + text-align: center;
  105 + line-height: 40rpx;
  106 +
  107 + text {
  108 + font-size: 12px;
  109 + font-family: PingFangSC-Regular, PingFang SC;
  110 + font-weight: 400;
  111 + color: #ffffff;
  112 + }
  113 + }
  114 +
  115 + .basic-text-status {
  116 + font-size: 14px;
  117 + }
  118 + }
  119 + .detail {
  120 + background-color: #fff;
  121 + margin-top: 30rpx;
  122 + border-radius: 20rpx;
  123 + width: 690rpx;
  124 +
  125 + .detail-item {
  126 + padding: 30rpx;
  127 + display: flex;
  128 + align-items: center;
  129 +
  130 + .detail-label {
  131 + color: #333;
  132 + font-size: 15px;
  133 + }
  134 +
  135 + .detail-value {
  136 + color: #666;
  137 + font-size: 14px;
  138 + margin-left: 30rpx;
  139 + }
  140 + }
  141 + }
  142 +}
  143 +</style>
... ...
  1 +<template>
  2 + <view class="device-detail-page">
  3 + <!-- 公共组件-每个页面必须引入 -->
  4 + <public-module></public-module>
  5 + <view class="mt-3">
  6 + <view class="basic-header">
  7 + <view class="u-flex">
  8 + <view class="basic-text text-clip ml-2">
  9 + {{ listDetail.name }}
  10 + </view>
  11 + <view v-if="listDetail.status" class="basic-text-status ml-2" :style="{ color: faultDevice[listDetail.status].color}">
  12 + {{ listDetail.status ? faultDevice[listDetail.status].name : '' }}
  13 + </view>
  14 + </view>
  15 + </view>
  16 + <view class="detail">
  17 + <view class="detail-item">
  18 + <view class="detail-label">{{ $t('deviceMangement.schemeCode') }}</view>
  19 + <view class="detail-value">{{ listDetail.code}}</view>
  20 + </view>
  21 + <u-line length="90%" margin="0 auto"></u-line>
  22 + <view class="detail-item">
  23 + <view class="detail-label">{{ $t('deviceMangement.schemeName') }}</view>
  24 + <view class="detail-value">{{ listDetail.name }}</view>
  25 + </view>
  26 + <u-line length="90%" margin="0 auto"></u-line>
  27 + <view class="detail-item">
  28 + <view class="detail-label">{{ $t('deviceMangement.schemeType') }}</view>
  29 + <view class="detail-value">{{ listDetail.type ? schemeType[listDetail.type].name : '' }}</view>
  30 + </view>
  31 + <u-line length="90%" margin="0 auto"></u-line>
  32 + <view class="detail-item">
  33 + <view class="detail-label">{{ $t('deviceMangement.schemeDetails') }}</view>
  34 + <view class="detail-value">{{ listDetail.planDetails }}</view>
  35 + </view>
  36 +
  37 + </view>
  38 + </view>
  39 + </view>
  40 +</template>
  41 +
  42 +<script>
  43 +import fTabbar from "@/components/module/f-tabbar/f-tabbar";
  44 +import api from '@/api/index.js'
  45 +import {faultDevice,schemeType} from '@/pages/deviceManagement/enum/index.js'
  46 +
  47 +
  48 +export default {
  49 + components: {
  50 + fTabbar,
  51 +
  52 + },
  53 + data() {
  54 + return {
  55 + listDetail:{},
  56 + faultDevice,
  57 + schemeType
  58 + };
  59 + },
  60 + onUnload() {
  61 +
  62 + },
  63 + async onLoad(options) {
  64 + // 隐藏原生的tabbar
  65 + uni.hideTabBar();
  66 + if (getApp().getBindNot()) {
  67 + return
  68 + }
  69 + let id = options.id
  70 + const res = await api.deviceManagementApi.getCheckPlanDetail(id)
  71 + if (!res) return
  72 + this.listDetail = {...res}
  73 +
  74 + },
  75 + onShow(){
  76 + this.$nextTick(()=>{
  77 + uni.setNavigationBarTitle({
  78 + title:this.$t('menu.inspectionPlanDetail')
  79 + })
  80 + })
  81 +
  82 + },
  83 +
  84 + methods: {
  85 +
  86 +
  87 + },
  88 +};
  89 +</script>
  90 +
  91 +<style lang="scss" scoped>
  92 +.device-detail-page {
  93 + min-height: 100vh;
  94 + background-color: #f8f9fa;
  95 + padding: 0 30rpx;
  96 + .basic-header {
  97 + display: flex;
  98 + justify-content: space-between;
  99 + align-items: center;
  100 + height: 140rpx;
  101 + background-color: #fff;
  102 + border-radius: 20rpx;
  103 + padding-left: 40rpx;
  104 + padding-right:20rpx;
  105 +
  106 + .basic-text {
  107 + width: 370rpx;
  108 + }
  109 +
  110 + .cu-item {
  111 + background: #3388ff;
  112 + border-radius: 12px;
  113 + width: 120rpx;
  114 + height: 48rpx;
  115 + text-align: center;
  116 + line-height: 40rpx;
  117 +
  118 + text {
  119 + font-size: 12px;
  120 + font-family: PingFangSC-Regular, PingFang SC;
  121 + font-weight: 400;
  122 + color: #ffffff;
  123 + }
  124 + }
  125 +
  126 + .basic-text-status {
  127 + font-size: 14px;
  128 + }
  129 + }
  130 + .detail {
  131 + background-color: #fff;
  132 + margin-top: 30rpx;
  133 + border-radius: 20rpx;
  134 + width: 690rpx;
  135 +
  136 + .detail-item {
  137 + padding: 30rpx;
  138 + display: flex;
  139 + align-items: center;
  140 +
  141 + .detail-label {
  142 + color: #333;
  143 + font-size: 15px;
  144 + }
  145 +
  146 + .detail-value {
  147 + color: #666;
  148 + font-size: 14px;
  149 + margin-left: 30rpx;
  150 + }
  151 + }
  152 + }
  153 +}
  154 +</style>
... ...
  1 +const list = [
  2 + {
  3 + name: 'deviceMangement.basicInfo',
  4 + },
  5 + {
  6 + name: 'deviceMangement.inspectionRecords',
  7 + },
  8 + {
  9 + name: 'deviceMangement.maintenanceRecords',
  10 + },
  11 + {
  12 + name: 'deviceMangement.repairRecords',
  13 + },
  14 +]
  15 +
  16 +const issueStatus = [
  17 + {
  18 + checked: true,
  19 + name: 'common.allText',
  20 + type: '',
  21 + },
  22 + {
  23 + checked: false,
  24 + name: 'device.inQueue',
  25 + type: 'QUEUED',
  26 + },
  27 + {
  28 + checked: false,
  29 + name: 'device.hasBeenSent',
  30 + type: 'SENT',
  31 + },
  32 + {
  33 + checked: false,
  34 + name: 'device.successSent',
  35 + type: 'DELIVERED',
  36 + },
  37 + {
  38 + checked: false,
  39 + name: 'device.responseSuccess',
  40 + type: 'SUCCESSFUL',
  41 + },
  42 + {
  43 + checked: false,
  44 + name: 'device.timeout',
  45 + type: 'TIMEOUT',
  46 + },
  47 + {
  48 + checked: false,
  49 + name: 'device.expired',
  50 + type: 'EXPIRED',
  51 + },
  52 + {
  53 + checked: false,
  54 + name: 'device.ResponseFailed',
  55 + type: 'FAILED',
  56 + },
  57 + {
  58 + checked: false,
  59 + name: 'device.deletedText',
  60 + type: 'DELETED',
  61 + },
  62 +]
  63 +
  64 +const commandTypeList = [
  65 + {
  66 + value: 'OneWay',
  67 + name: 'device.onwWay',
  68 + },
  69 + {
  70 + value: 'TwoWay',
  71 + name: 'device.twoWay',
  72 + },
  73 +]
  74 +
  75 +const deviceTypeNum = {
  76 + GBT: 'GBT28181',
  77 +}
  78 +
  79 +export { list, issueStatus, commandTypeList, deviceTypeNum }
... ...
  1 +<template>
  2 + <view class="device-detail-page">
  3 + <!-- 公共组件-每个页面必须引入 -->
  4 + <public-module></public-module>
  5 + <u-sticky :bgColor="bgColor">
  6 + <u-tabs :list="list.map(item=>({...item,name:$t(item.name)}))" :current="currentTab" :lineWidth="30" @click=" handleTabClick " :activeStyle="{activeColor}"
  7 + :inactiveStyle="inActiveColor" :scrollable="isScrollable" itemStyle="padding: 0 11px;display:flex;flex-direction:row;align-items:center;justify-content:start;height:44px" />
  8 + </u-sticky>
  9 + <view class="mt-3">
  10 + <view class="basic-box" v-show="currentTab == 0">
  11 + <view class="basic-header">
  12 + <view class="u-flex">
  13 + <view class="basic-text text-clip ml-2">
  14 + {{ listDetail.code }}
  15 + </view>
  16 + <view v-if="listDetail.status" class="basic-text-status ml-2" :style="{ color: ledgerType[listDetail.status].color}">
  17 + {{ listDetail.status ? ledgerType[listDetail.status].name : '' }}
  18 + </view>
  19 + </view>
  20 + </view>
  21 + <view class="detail">
  22 + <view class="detail-item">
  23 + <view class="detail-label">{{ $t('deviceMangement.deviceCode') }}</view>
  24 + <view class="detail-value">{{ listDetail.code}}</view>
  25 + </view>
  26 + <u-line length="90%" margin="0 auto"></u-line>
  27 + <view class="detail-item">
  28 + <view class="detail-label">{{ $t('deviceMangement.deviceName') }}</view>
  29 + <view class="detail-value">{{ listDetail.name }}</view>
  30 + </view>
  31 + <u-line length="90%" margin="0 auto"></u-line>
  32 + <view class="detail-item">
  33 + <view class="detail-label">{{ $t('deviceMangement.deviceType') }}</view>
  34 + <view class="detail-value">{{ listDetail.categoryName }}</view>
  35 + </view>
  36 + <u-line length="90%" margin="0 auto"></u-line>
  37 + <view class="detail-item">
  38 + <view class="detail-label">{{ $t('deviceMangement.directorName') }}</view>
  39 + <view class="detail-value">{{ listDetail.directorName }}</view>
  40 + </view>
  41 + <u-line length="90%" margin="0 auto"></u-line>
  42 + <view class="detail-item">
  43 + <view class="detail-label">{{ $t('deviceMangement.brand') }}</view>
  44 + <view class="detail-value">{{ listDetail.brand }}</view>
  45 + </view>
  46 + <u-line length="90%" margin="0 auto"></u-line>
  47 + <view class="detail-item">
  48 + <view class="detail-label">{{ $t('deviceMangement.deviceOnline') }}</view>
  49 + <view class="detail-value">{{ listDetail.isOnline ? '是' :'否' }}</view>
  50 + </view>
  51 + <u-line length="90%" margin="0 auto"></u-line>
  52 + <view class="detail-item">
  53 + <view class="detail-label">{{ $t('deviceMangement.modelNum') }}</view>
  54 + <view class="detail-value">{{ listDetail.modelNum }}</view>
  55 + </view>
  56 + <u-line length="90%" margin="0 auto"></u-line>
  57 + <view class="detail-item">
  58 + <view class="detail-label">{{ $t('deviceMangement.productDate') }}</view>
  59 + <view class="detail-value">{{ listDetail.productDate }}</view>
  60 + </view>
  61 + <u-line length="90%" margin="0 auto"></u-line>
  62 + <view class="detail-item">
  63 + <view class="detail-label">{{ $t('deviceMangement.receiveDate') }}</view>
  64 + <view class="detail-value">{{ listDetail.receiveDate }}</view>
  65 + </view>
  66 + <u-line length="90%" margin="0 auto"></u-line>
  67 + <view class="detail-item">
  68 + <view class="detail-label">{{ $t('deviceMangement.registeDate') }}</view>
  69 + <view class="detail-value">{{ listDetail.registeDate }}</view>
  70 + </view>
  71 + <u-line length="90%" margin="0 auto"></u-line>
  72 + <view class="detail-item">
  73 + <view class="detail-label">{{ $t('deviceMangement.deviceImg') }}</view>
  74 + <view class="detail-value">
  75 + <image class="detail-img" :src="formatImage(listDetail.deviceImg)"/>
  76 + </view>
  77 + </view>
  78 + <u-line length="90%" margin="0 auto"></u-line>
  79 + <view class="detail-item">
  80 + <view class="detail-label">{{ $t('deviceMangement.description') }}</view>
  81 + <view class="detail-value">{{ listDetail.description }}</view>
  82 + </view>
  83 +
  84 + </view>
  85 + </view>
  86 + <view class="record-box" v-show="currentTab == 1">
  87 + <!-- 列表分页 -->
  88 + <mescroll-body ref="mescrollRef" :up="upOption" :down="downOption" @down="downCallback"
  89 + @up="upCallback">
  90 + <page-list :list="listData" @openDeviceDetail="openDeviceDetail"></page-list>
  91 + <mescroll-empty v-if="!listData.length" />
  92 + </mescroll-body>
  93 + </view>
  94 + <view class="record-box" v-show="currentTab == 2">
  95 + <!-- 列表分页 -->
  96 + <mescroll-body ref="mescrollRef" :up="upOption" :down="downOption" @down="downCallback"
  97 + @up="upCallback">
  98 + <page-list :list="listData" @openDeviceDetail="openDeviceDetail"></page-list>
  99 + <mescroll-empty v-if="!listData.length" />
  100 + </mescroll-body>
  101 + </view>
  102 + <view class="record-box" v-show="currentTab == 3">
  103 + <!-- 列表分页 -->
  104 + <mescroll-body ref="mescrollRef" :up="upOption" :down="downOption" @down="downCallback"
  105 + @up="upCallback">
  106 + <page-list :list="listData" @openDeviceDetail="openDeviceDetail"></page-list>
  107 + <mescroll-empty v-if="!listData.length" />
  108 + </mescroll-body>
  109 + </view>
  110 + </view>
  111 + </view>
  112 +</template>
  113 +
  114 +<script>
  115 +import fTabbar from "@/components/module/f-tabbar/f-tabbar";
  116 +import api from '@/api/index.js'
  117 +import {ledgerType} from '@/pages/deviceManagement/enum/index.js'
  118 +import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js';
  119 +import baseUrl from '@/config/baseUrl.js'
  120 +import {preserveType,inspectionResult} from '@/pages/deviceInspect/enum/index.js'
  121 +import { list } from './config/data.js'
  122 +import pageList from '@/components/common/page-list'
  123 +
  124 +
  125 +export default {
  126 + mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
  127 + components: {
  128 + fTabbar,
  129 + pageList
  130 +
  131 + },
  132 + data() {
  133 + return {
  134 + bgColor: '#fff',
  135 + activeColor: {
  136 + fontWeight: 'bold',
  137 + color: '#333',
  138 + },
  139 + inActiveColor: {
  140 + color: '#999',
  141 + },
  142 + listDetail:{},
  143 + ledgerType,
  144 + list,
  145 + currentTab: 0,
  146 + isScrollable: false,
  147 + downOption: {
  148 + auto: false //是否在初始化后,自动执行downCallback; 默认true
  149 + },
  150 + upOption: {
  151 + isBounce: false,
  152 + auto: false // 不自动加载
  153 + },
  154 + page: {
  155 + num: 0,
  156 + size: 10
  157 + },
  158 + listData:[],
  159 + };
  160 + },
  161 + onUnload() {
  162 +
  163 + },
  164 + async onLoad(options) {
  165 + // 隐藏原生的tabbar
  166 + uni.hideTabBar();
  167 + if (getApp().getBindNot()) {
  168 + return
  169 + }
  170 + let id = options.id
  171 + const res = await api.deviceManagementApi.getLedgerListDetail(id)
  172 + if (!res) return
  173 + this.listDetail = {...res}
  174 +
  175 + },
  176 + onShow(){
  177 + this.$nextTick(()=>{
  178 + uni.setNavigationBarTitle({
  179 + title:this.$t('menu.deviceLedgerDetail')
  180 + })
  181 + })
  182 +
  183 + },
  184 + watch: {
  185 + currentTab: {
  186 + immediate: true,
  187 + handler(val) {
  188 + this.page.num = 1
  189 + if(val == 1){
  190 + this.loadInspectionData(this.page.num)
  191 + }else if(val == 2){
  192 + this.loadPreserveData(this.page.num);
  193 + }else if(val == 3){
  194 + this.loadRepairData(this.page.num);
  195 + }
  196 +
  197 + }
  198 + },
  199 +
  200 + },
  201 +
  202 + methods: {
  203 + handleTabClick({index}) {
  204 + this.currentTab = index;
  205 + },
  206 +
  207 + formatImage(url) {
  208 + // return baseUrl.baseImgUrl + url
  209 + return window.location.origin + url
  210 + },
  211 +
  212 + //下拉刷新
  213 + downCallback() {
  214 + if (getApp().getBindNot()) {
  215 + setTimeout(() => {
  216 + this.mescroll.endByPage(0, 0)
  217 + }, 200)
  218 + return
  219 + }
  220 + this.listData = [];
  221 + this.page.num = 1;
  222 + if(this.currentTab == 1){
  223 + this.loadInspectionData(this.page.num)
  224 + }else if(this.currentTab == 2){
  225 + this.loadPreserveData(this.page.num);
  226 + }else if(this.currentTab == 3){
  227 + this.loadRepairData(this.page.num);
  228 + }
  229 +
  230 + },
  231 + //上拉加载
  232 + upCallback() {
  233 + if (getApp().getBindNot()) {
  234 + setTimeout(() => {
  235 + this.mescroll.endByPage(0, 0)
  236 + }, 200)
  237 + return
  238 + }
  239 + this.page.num += 1;
  240 + if(this.currentTab == 1){
  241 + this.loadInspectionData(this.page.num)
  242 + }else if(this.currentTab == 2){
  243 + this.loadPreserveData(this.page.num);
  244 + }else if(this.currentTab == 3){
  245 + this.loadRepairData(this.page.num);
  246 + }
  247 + },
  248 +
  249 + //获取巡检记录列表
  250 + async loadInspectionData(pageNo) {
  251 +
  252 + try {
  253 + let httpData = {
  254 + page: pageNo,
  255 + pageSize: 10,
  256 + inspectionPlanId:'',
  257 + inspectorId:'',
  258 + startTime:'',
  259 + endTime:'',
  260 + recordResult:'',
  261 + deviceId:this.listDetail.id
  262 + };
  263 +
  264 + const {
  265 + total,
  266 + items
  267 + } = await api.deviceInspectApi.getPatrolRecordListApi(httpData)
  268 +
  269 + let data = items
  270 +
  271 + let newList = data.map((item)=>{
  272 + return {
  273 + id:item.id,
  274 + title:item.code,
  275 + status:item.recordResult ? inspectionResult[item.recordResult].name : '',
  276 + iconUrl:item.recordResult ? inspectionResult[item.recordResult].iconUrl : '',
  277 + color:item.recordResult ? inspectionResult[item.recordResult].color : '',
  278 + child:[
  279 + {
  280 + label:'deviceInspect.recordCode',
  281 + name:item.code
  282 + },
  283 + {
  284 + label:'deviceInspect.patrolPlan',
  285 + name:item.tkInspectionPlanDTO ? item.tkInspectionPlanDTO.name :''
  286 + },
  287 + {
  288 + label:'deviceInspect.patrolByName',
  289 + name:item.userDTO ? item.userDTO.realName : ''
  290 + },
  291 + {
  292 + label:'deviceInspect.checkDate',
  293 + name:item.checkDate
  294 + },
  295 + ],
  296 + detail:{
  297 + ...item
  298 + }
  299 + }
  300 + })
  301 + uni.stopPullDownRefresh();
  302 + this.mescroll.endByPage(items.length); //必传参数(当前页的数据个数, 总页数)
  303 + if (pageNo == 1) {
  304 + this.listData = newList;
  305 + } else {
  306 + this.listData = this.listData.concat(newList);
  307 + }
  308 +
  309 +
  310 + } catch {
  311 + this.mescroll.endErr();
  312 + }
  313 + },
  314 +
  315 + //获取保养记录列表
  316 + async loadPreserveData(pageNo) {
  317 +
  318 + try {
  319 + let httpData = {
  320 + page: pageNo,
  321 + pageSize: 10,
  322 + };
  323 + const httpPostData = {
  324 + startDate:'', //开始时间
  325 + endDate:'', //结束时间
  326 + preservePlanId:'', //保养计划id
  327 + preserveBy:'', //保养人id
  328 + preserveStatus:'', //状态
  329 + deviceId:this.listDetail.id, //设备id
  330 + deviceName:'',
  331 + preservePlanName:'',
  332 + }
  333 + const {
  334 + total,
  335 + items
  336 + } = await api.deviceInspectApi.getMaintenanceRecordListApi(httpData, httpPostData)
  337 +
  338 + let data = items
  339 +
  340 + let newList = data.map((item)=>{
  341 + return {
  342 + id:item.id,
  343 + title:item.recordCode,
  344 + status:item.preserveStatus ? preserveType[item.preserveStatus].name : '',
  345 + iconUrl:item.preserveStatus ? preserveType[item.preserveStatus].iconUrl : '',
  346 + color:item.preserveStatus ? preserveType[item.preserveStatus].color : '',
  347 + child:[
  348 + {
  349 + label:'deviceInspect.preserveDate',
  350 + name:item.preserveDate
  351 + },
  352 + {
  353 + label:'deviceInspect.preserveByName',
  354 + name:item.preserveByName
  355 + },
  356 + {
  357 + label:'deviceInspect.preserveStatus',
  358 + name:item.preserveStatus ? preserveType[item.preserveStatus].name :''
  359 + }
  360 +
  361 + ],
  362 + detail:{
  363 + ...item
  364 + }
  365 + }
  366 + })
  367 + uni.stopPullDownRefresh();
  368 + this.mescroll.endByPage(items.length); //必传参数(当前页的数据个数, 总页数)
  369 + if (pageNo == 1) {
  370 + this.listData = newList;
  371 + } else {
  372 + this.listData = this.listData.concat(newList);
  373 + }
  374 +
  375 +
  376 + } catch {
  377 + this.mescroll.endErr();
  378 + }
  379 + },
  380 +
  381 + //获取维修记录列表
  382 + async loadRepairData(pageNo,params={}) {
  383 + try {
  384 + let httpData = {
  385 + page: pageNo,
  386 + pageSize: 10,
  387 + };
  388 + const httpPostData = {
  389 + orderCode:'', //工单id
  390 + reportBy:'', //报修人id
  391 + repairBy:'', //维修人id
  392 + deviceId:this.listDetail.id, //设备id
  393 + ...params
  394 + }
  395 + const {
  396 + total,
  397 + items
  398 + } = await api.deviceRepairApi.getRepairRecordApi(httpData, httpPostData)
  399 +
  400 + let data = items
  401 + let newList = data.map((item)=>{
  402 + return {
  403 + id:item.id,
  404 + title:item.code,
  405 + child:[
  406 + {
  407 + label:'deviceRepair.code',
  408 + name:item.code
  409 + },
  410 + {
  411 + label:'deviceRepair.repairDate',
  412 + name:item.repairDate
  413 + },
  414 + {
  415 + label:'deviceRepair.repairName',
  416 + name:item.repairName
  417 + },
  418 + {
  419 + label:'deviceRepair.malfunctionReasonName',
  420 + name:item.malfunctionReasonName
  421 + },
  422 + {
  423 + label:'deviceRepair.repairDescription',
  424 + name:item.description
  425 + }
  426 +
  427 + ],
  428 + detail:{
  429 + ...item
  430 + }
  431 + }
  432 + })
  433 + uni.stopPullDownRefresh();
  434 + this.mescroll.endByPage(items.length); //必传参数(当前页的数据个数, 总页数)
  435 + if (pageNo == 1) {
  436 + this.listData = newList;
  437 + } else {
  438 + this.listData = this.listData.concat(newList);
  439 + }
  440 +
  441 +
  442 + } catch {
  443 + this.mescroll.endErr();
  444 + }
  445 + },
  446 +
  447 +
  448 + },
  449 +};
  450 +</script>
  451 +
  452 +<style lang="scss" scoped>
  453 +.device-detail-page {
  454 + min-height: 100vh;
  455 + background-color: #f8f9fa;
  456 + // padding: 0 30rpx;
  457 + .mt-3{
  458 + margin-top: 0;
  459 + .basic-box{
  460 + margin-top: 30rpx;
  461 + padding: 0 30rpx;
  462 + }
  463 + }
  464 + .basic-header {
  465 + display: flex;
  466 + justify-content: space-between;
  467 + align-items: center;
  468 + height: 140rpx;
  469 + background-color: #fff;
  470 + border-radius: 20rpx;
  471 + padding-left: 40rpx;
  472 + padding-right:20rpx;
  473 +
  474 + .basic-text {
  475 + width: 370rpx;
  476 + }
  477 +
  478 + .cu-item {
  479 + background: #3388ff;
  480 + border-radius: 12px;
  481 + width: 120rpx;
  482 + height: 48rpx;
  483 + text-align: center;
  484 + line-height: 40rpx;
  485 +
  486 + text {
  487 + font-size: 12px;
  488 + font-family: PingFangSC-Regular, PingFang SC;
  489 + font-weight: 400;
  490 + color: #ffffff;
  491 + }
  492 + }
  493 +
  494 + .basic-text-status {
  495 + font-size: 14px;
  496 + }
  497 + }
  498 + .detail {
  499 + background-color: #fff;
  500 + margin-top: 30rpx;
  501 + border-radius: 20rpx;
  502 + width: 690rpx;
  503 +
  504 + .detail-item {
  505 + padding: 30rpx;
  506 + display: flex;
  507 + align-items: center;
  508 +
  509 + .detail-label {
  510 + color: #333;
  511 + font-size: 15px;
  512 + }
  513 +
  514 + .detail-value {
  515 + color: #666;
  516 + font-size: 14px;
  517 + margin-left: 30rpx;
  518 + .detail-img{
  519 + width: 60rpx;
  520 + height: 60rpx;
  521 + }
  522 + }
  523 + }
  524 + }
  525 +}
  526 +</style>
... ...
  1 +<template>
  2 + <view class="device-detail-page">
  3 + <!-- 公共组件-每个页面必须引入 -->
  4 + <public-module></public-module>
  5 + <view class="mt-3">
  6 + <view class="basic-header">
  7 + <view class="u-flex">
  8 + <view class="basic-text text-clip ml-2">
  9 + {{ listDetail.code }}
  10 + </view>
  11 + <!-- <view v-if="listDetail.status" class="basic-text-status ml-2" :style="{ color: faultDevice[listDetail.status].color}">
  12 + {{ listDetail.status ? faultDevice[listDetail.status].name : ''}}
  13 + </view> -->
  14 + </view>
  15 + </view>
  16 + <view class="detail">
  17 + <view class="detail-item">
  18 + <view class="detail-label">{{ $t('deviceRepair.code') }}</view>
  19 + <view class="detail-value">{{ listDetail.code}}</view>
  20 + </view>
  21 + <u-line length="90%" margin="0 auto"></u-line>
  22 + <view class="detail-item">
  23 + <view class="detail-label">{{ $t('deviceRepair.orderCodeName') }}</view>
  24 + <view class="detail-value">{{ listDetail.tkRepairOrderDTO ? listDetail.tkRepairOrderDTO.orderCode : '' }}</view>
  25 + </view>
  26 + <u-line length="90%" margin="0 auto"></u-line>
  27 + <view class="detail-item">
  28 + <view class="detail-label">{{ $t('deviceRepair.repairDevice') }}</view>
  29 + <view class="detail-value">{{ listDetail.deviceAccountName }}</view>
  30 + </view>
  31 + <u-line length="90%" margin="0 auto"></u-line>
  32 + <view class="detail-item">
  33 + <view class="detail-label">{{ $t('deviceRepair.reportDate') }}</view>
  34 + <view class="detail-value">{{ listDetail.tkRepairOrderDTO ? listDetail.tkRepairOrderDTO.reportDate : '' }}</view>
  35 + </view>
  36 + <u-line length="90%" margin="0 auto"></u-line>
  37 + <view class="detail-item">
  38 + <view class="detail-label">{{ $t('deviceRepair.reportByName') }}</view>
  39 + <view class="detail-value">{{ listDetail.tkRepairOrderDTO ? listDetail.tkRepairOrderDTO.reportByName :'' }}</view>
  40 + </view>
  41 + <u-line length="90%" margin="0 auto"></u-line>
  42 + <view class="detail-item">
  43 + <view class="detail-label">{{ $t('deviceRepair.situationImg') }}</view>
  44 + <view class="detail-value">
  45 + <image class="detail-img" v-if="listDetail.tkRepairOrderDTO" :src="formatImage(listDetail.tkRepairOrderDTO.situationImg)"/>
  46 + </view>
  47 + </view>
  48 + <u-line length="90%" margin="0 auto"></u-line>
  49 + <view class="detail-item">
  50 + <view class="detail-label">{{ $t('deviceRepair.description') }}</view>
  51 + <view class="detail-value">{{ listDetail.tkRepairOrderDTO ? listDetail.tkRepairOrderDTO.description : ''}}</view>
  52 + </view>
  53 + <u-line length="90%" margin="0 auto"></u-line>
  54 + <view class="detail-item">
  55 + <view class="detail-label">{{ $t('deviceRepair.repairDate') }}</view>
  56 + <view class="detail-value">{{ listDetail.repairDate }}</view>
  57 + </view>
  58 + <u-line length="90%" margin="0 auto"></u-line>
  59 + <view class="detail-item">
  60 + <view class="detail-label">{{ $t('deviceRepair.repairName') }}</view>
  61 + <view class="detail-value">{{ listDetail.repairName }}</view>
  62 + </view>
  63 + <u-line length="90%" margin="0 auto"></u-line>
  64 + <view class="detail-item">
  65 + <view class="detail-label">{{ $t('deviceRepair.malfunctionReasonName') }}</view>
  66 + <view class="detail-value">{{ listDetail.malfunctionReasonName }}</view>
  67 + </view>
  68 + <u-line length="90%" margin="0 auto"></u-line>
  69 + <view class="detail-item">
  70 + <view class="detail-label">{{ $t('deviceRepair.repairDescription') }}</view>
  71 + <view class="detail-value">{{ listDetail.description }}</view>
  72 + </view>
  73 +
  74 + </view>
  75 + </view>
  76 + </view>
  77 +</template>
  78 +
  79 +<script>
  80 +import fTabbar from "@/components/module/f-tabbar/f-tabbar";
  81 +import api from '@/api/index.js'
  82 +import {faultDevice} from '@/pages/deviceManagement/enum/index.js'
  83 +import baseUrl from '@/config/baseUrl.js'
  84 +
  85 +
  86 +export default {
  87 + components: {
  88 + fTabbar,
  89 +
  90 + },
  91 + data() {
  92 + return {
  93 + listDetail:{},
  94 + faultDevice
  95 + };
  96 + },
  97 + onUnload() {
  98 +
  99 + },
  100 + async onLoad(options) {
  101 + // 隐藏原生的tabbar
  102 + uni.hideTabBar();
  103 + if (getApp().getBindNot()) {
  104 + return
  105 + }
  106 + let id = options.id
  107 + const res = await api.deviceRepairApi.getRepairRecordDetail(id)
  108 + if (!res) return
  109 + this.listDetail = {...res}
  110 +
  111 + },
  112 + onShow(){
  113 + this.$nextTick(()=>{
  114 + uni.setNavigationBarTitle({
  115 + title:this.$t('menu.repairRecordDetail')
  116 + })
  117 + })
  118 +
  119 + },
  120 +
  121 + methods: {
  122 + formatImage(url) {
  123 + // return baseUrl.baseImgUrl + url
  124 + return window.location.origin + url
  125 + },
  126 +
  127 +
  128 + },
  129 +};
  130 +</script>
  131 +
  132 +<style lang="scss" scoped>
  133 +.device-detail-page {
  134 + min-height: 100vh;
  135 + background-color: #f8f9fa;
  136 + padding: 0 30rpx;
  137 + .basic-header {
  138 + display: flex;
  139 + justify-content: space-between;
  140 + align-items: center;
  141 + height: 140rpx;
  142 + background-color: #fff;
  143 + border-radius: 20rpx;
  144 + padding-left: 40rpx;
  145 + padding-right:20rpx;
  146 +
  147 + .basic-text {
  148 + width: 370rpx;
  149 + }
  150 +
  151 + .cu-item {
  152 + background: #3388ff;
  153 + border-radius: 12px;
  154 + width: 120rpx;
  155 + height: 48rpx;
  156 + text-align: center;
  157 + line-height: 40rpx;
  158 +
  159 + text {
  160 + font-size: 12px;
  161 + font-family: PingFangSC-Regular, PingFang SC;
  162 + font-weight: 400;
  163 + color: #ffffff;
  164 + }
  165 + }
  166 +
  167 + .basic-text-status {
  168 + font-size: 14px;
  169 + }
  170 + }
  171 + .detail {
  172 + background-color: #fff;
  173 + margin-top: 30rpx;
  174 + border-radius: 20rpx;
  175 + width: 690rpx;
  176 +
  177 + .detail-item {
  178 + padding: 30rpx;
  179 + display: flex;
  180 + align-items: center;
  181 +
  182 + .detail-label {
  183 + color: #333;
  184 + font-size: 15px;
  185 + }
  186 +
  187 + .detail-value {
  188 + color: #666;
  189 + font-size: 14px;
  190 + margin-left: 30rpx;
  191 + .detail-img{
  192 + width: 60rpx;
  193 + height: 60rpx;
  194 + }
  195 + }
  196 + }
  197 + }
  198 +}
  199 +</style>
... ...
  1 +const list = [
  2 + {
  3 + name: 'deviceRepair.basicInfo',
  4 + },
  5 + {
  6 + name: 'deviceRepair.repairRecord',
  7 + }
  8 +]
  9 +
  10 +
  11 +export { list }
... ...
  1 +<template>
  2 + <view class="device-detail-page">
  3 + <!-- 公共组件-每个页面必须引入 -->
  4 + <public-module></public-module>
  5 + <u-sticky :bgColor="bgColor">
  6 + <u-tabs :list="list.map(item=>({...item,name:$t(item.name)}))" :current="currentTab" :lineWidth="30" @click=" handleTabClick " :activeStyle="{activeColor}"
  7 + :inactiveStyle="inActiveColor" :scrollable="isScrollable" itemStyle="padding: 0 11px;display:flex;flex-direction:row;align-items:center;justify-content:center;height:44px" />
  8 + </u-sticky>
  9 + <view class="mt-3">
  10 + <view class="basic-box" v-show="currentTab == 0">
  11 + <view class="basic-header">
  12 + <view class="u-flex">
  13 + <view class="basic-text text-clip ml-2">
  14 + {{ listDetail.orderCode }}
  15 + </view>
  16 + <view v-if="listDetail.status" class="basic-text-status ml-2" :style="{ color: repairType[listDetail.status].color}">
  17 + {{ listDetail.status ? repairType[listDetail.status].name : '' }}
  18 + </view>
  19 + </view>
  20 + </view>
  21 + <view class="detail">
  22 + <view class="detail-item">
  23 + <view class="detail-label">{{ $t('deviceRepair.orderCode') }}</view>
  24 + <view class="detail-value">{{ listDetail.orderCode}}</view>
  25 + </view>
  26 + <u-line length="90%" margin="0 auto"></u-line>
  27 + <view class="detail-item">
  28 + <view class="detail-label">{{ $t('deviceRepair.device') }}</view>
  29 + <view class="detail-value">{{ listDetail.deviceInfo ? listDetail.deviceInfo.name : '' }}</view>
  30 + </view>
  31 + <u-line length="90%" margin="0 auto"></u-line>
  32 + <view class="detail-item">
  33 + <view class="detail-label">{{ $t('deviceRepair.brand') }}</view>
  34 + <view class="detail-value">{{ listDetail.deviceInfo ? listDetail.deviceInfo.brand : '' }}</view>
  35 + </view>
  36 + <u-line length="90%" margin="0 auto"></u-line>
  37 + <view class="detail-item">
  38 + <view class="detail-label">{{ $t('deviceRepair.modelNum') }}</view>
  39 + <view class="detail-value">{{ listDetail.deviceInfo ? listDetail.deviceInfo.modelNum :'' }}</view>
  40 + </view>
  41 + <u-line length="90%" margin="0 auto"></u-line>
  42 + <view class="detail-item">
  43 + <view class="detail-label">{{ $t('deviceRepair.specifications') }}</view>
  44 + <view class="detail-value">{{ listDetail.deviceInfo ? listDetail.deviceInfo.specifications :'' }}</view>
  45 + </view>
  46 + <u-line length="90%" margin="0 auto"></u-line>
  47 + <view class="detail-item">
  48 + <view class="detail-label">{{ $t('deviceRepair.reportDate') }}</view>
  49 + <view class="detail-value">{{ listDetail.reportDate }}</view>
  50 + </view>
  51 + <u-line length="90%" margin="0 auto"></u-line>
  52 + <view class="detail-item">
  53 + <view class="detail-label">{{ $t('deviceRepair.directorName') }}</view>
  54 + <view class="detail-value">{{ listDetail.deviceInfo ? listDetail.deviceInfo.directorName : '' }}</view>
  55 + </view>
  56 + <u-line length="90%" margin="0 auto"></u-line>
  57 + <view class="detail-item">
  58 + <view class="detail-label">{{ $t('deviceRepair.reportByName') }}</view>
  59 + <view class="detail-value">{{ listDetail.reportByName }}</view>
  60 + </view>
  61 + <u-line length="90%" margin="0 auto"></u-line>
  62 + <view class="detail-item">
  63 + <view class="detail-label">{{ $t('deviceRepair.emergency') }}</view>
  64 + <view class="detail-value">{{ listDetail.emergency ? '是' :'否' }}</view>
  65 + </view>
  66 + <u-line length="90%" margin="0 auto"></u-line>
  67 + <view class="detail-item">
  68 + <view class="detail-label">{{ $t('deviceRepair.situationImg') }}</view>
  69 + <view class="detail-value">
  70 + <image class="detail-img" v-if="listDetail.situationImg" :src="formatImage(listDetail.situationImg)"/>
  71 + </view>
  72 + </view>
  73 + <u-line length="90%" margin="0 auto"></u-line>
  74 + <view class="detail-item">
  75 + <view class="detail-label">{{ $t('deviceMangement.description') }}</view>
  76 + <view class="detail-value">{{ listDetail.description }}</view>
  77 + </view>
  78 +
  79 + </view>
  80 + </view>
  81 + <view class="record-box" v-show="currentTab == 1">
  82 + <!-- 列表分页 -->
  83 + <mescroll-body ref="mescrollRef" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback"
  84 + @up="upCallback">
  85 + <page-list :list="listData" @openDeviceDetail="openDeviceDetail"></page-list>
  86 + <mescroll-empty v-if="!listData.length" />
  87 + </mescroll-body>
  88 + </view>
  89 +
  90 + </view>
  91 + </view>
  92 +</template>
  93 +
  94 +<script>
  95 +import fTabbar from "@/components/module/f-tabbar/f-tabbar";
  96 +import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js';
  97 +import api from '@/api/index.js'
  98 +import {repairType} from '@/pages/deviceRepair/enum/index.js'
  99 +import { list } from './config/data.js'
  100 +import baseUrl from '@/config/baseUrl.js'
  101 +import pageList from '@/components/common/page-list'
  102 +
  103 +
  104 +export default {
  105 + mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
  106 + components: {
  107 + fTabbar,
  108 + pageList
  109 +
  110 + },
  111 + data() {
  112 + return {
  113 + bgColor: '#fff',
  114 + activeColor: {
  115 + fontWeight: 'bold',
  116 + color: '#333',
  117 + },
  118 + inActiveColor: {
  119 + color: '#999',
  120 + },
  121 + listDetail:{},
  122 + list,
  123 + currentTab: 0,
  124 + isScrollable: false,
  125 + repairType,
  126 + downOption: {
  127 + auto: false //是否在初始化后,自动执行downCallback; 默认true
  128 + },
  129 + upOption: {
  130 + isBounce: false,
  131 + auto: false // 不自动加载
  132 + },
  133 + page: {
  134 + num: 0,
  135 + size: 10
  136 + },
  137 + orderCode:'', //工单id
  138 + reportBy:'', //报修人id
  139 + repairBy:'', //维修人id
  140 + deviceId:'', //设备id,
  141 + listData:[]
  142 +
  143 + };
  144 + },
  145 + onUnload() {
  146 +
  147 + },
  148 + async onLoad(options) {
  149 + // 隐藏原生的tabbar
  150 + uni.hideTabBar();
  151 + if (getApp().getBindNot()) {
  152 + return
  153 + }
  154 + let id = options.id
  155 + const res = await api.deviceRepairApi.getRepairWorkDetail(id)
  156 + if (!res) return
  157 + this.listDetail = {...res}
  158 +
  159 +
  160 + },
  161 + onShow(){
  162 + this.$nextTick(()=>{
  163 + uni.setNavigationBarTitle({
  164 + title:this.$t('menu.repairWorkOrderDetail')
  165 + })
  166 + })
  167 +
  168 +
  169 + },
  170 + watch: {
  171 + currentTab: {
  172 + immediate: true,
  173 + handler(val) {
  174 + if(val == 1){
  175 + this.page.num = 1
  176 + this.loadData(this.page.num);
  177 + }
  178 +
  179 + }
  180 + },
  181 +
  182 +
  183 +
  184 + },
  185 +
  186 + methods: {
  187 + handleTabClick({index}) {
  188 + this.currentTab = index;
  189 + },
  190 +
  191 + formatImage(url) {
  192 + // return baseUrl.baseImgUrl + url
  193 + return window.location.origin + url
  194 + },
  195 + //下拉刷新
  196 + downCallback() {
  197 + if (getApp().getBindNot()) {
  198 + setTimeout(() => {
  199 + this.mescroll.endByPage(0, 0)
  200 + }, 200)
  201 + return
  202 + }
  203 + this.listData = [];
  204 + this.page.num = 1;
  205 + this.loadData(this.page.num);
  206 + this.resetQuery();
  207 + },
  208 + //上拉加载
  209 + upCallback() {
  210 + if (getApp().getBindNot()) {
  211 + setTimeout(() => {
  212 + this.mescroll.endByPage(0, 0)
  213 + }, 200)
  214 + return
  215 + }
  216 + this.page.num += 1;
  217 + this.loadData(this.page.num);
  218 + },
  219 + //获取列表
  220 + async loadData(pageNo,params={}) {
  221 + try {
  222 + let httpData = {
  223 + page: pageNo,
  224 + pageSize: 10,
  225 + };
  226 + const httpPostData = {
  227 + orderCode:this.listDetail.orderCode, //工单id
  228 + reportBy:this.reportBy, //报修人id
  229 + repairBy:this.repairBy, //维修人id
  230 + deviceId:this.deviceId, //设备id
  231 + deviceName:'',
  232 + ...params
  233 + }
  234 + const {
  235 + total,
  236 + items
  237 + } = await api.deviceRepairApi.getRepairRecordApi(httpData, httpPostData)
  238 +
  239 + let data = items
  240 + let newList = data.map((item)=>{
  241 + return {
  242 + id:item.id,
  243 + title:item.code,
  244 + child:[
  245 + {
  246 + label:'deviceRepair.code',
  247 + name:item.code
  248 + },
  249 + {
  250 + label:'deviceRepair.repairDate',
  251 + name:item.repairDate
  252 + },
  253 + {
  254 + label:'deviceRepair.repairName',
  255 + name:item.repairName
  256 + },
  257 + {
  258 + label:'deviceRepair.malfunctionReasonName',
  259 + name:item.malfunctionReasonName
  260 + },
  261 + {
  262 + label:'deviceRepair.repairDescription',
  263 + name:item.description
  264 + }
  265 +
  266 + ],
  267 + detail:{
  268 + ...item
  269 + }
  270 + }
  271 + })
  272 + uni.stopPullDownRefresh();
  273 + this.mescroll.endByPage(items.length); //必传参数(当前页的数据个数, 总页数)
  274 + if (pageNo == 1) {
  275 + this.listData = newList;
  276 + } else {
  277 + this.listData = this.listData.concat(newList);
  278 + }
  279 +
  280 +
  281 + } catch {
  282 + this.mescroll.endErr();
  283 + }
  284 + },
  285 +
  286 +
  287 + },
  288 +};
  289 +</script>
  290 +
  291 +<style lang="scss" scoped>
  292 +.device-detail-page {
  293 + min-height: 100vh;
  294 + background-color: #f8f9fa;
  295 + // padding: 0 30rpx;
  296 + .mt-3{
  297 + // padding: 0 30rpx;
  298 + margin-top: 0;
  299 + .basic-box{
  300 + margin-top: 30rpx;
  301 + padding: 0 30rpx;
  302 + }
  303 + .record-box{
  304 + // padding: 0 30rpx 0 15rpx;
  305 + }
  306 + }
  307 + .basic-header {
  308 + display: flex;
  309 + justify-content: space-between;
  310 + align-items: center;
  311 + height: 140rpx;
  312 + background-color: #fff;
  313 + border-radius: 20rpx;
  314 + padding-left: 40rpx;
  315 + padding-right:20rpx;
  316 +
  317 +
  318 + .basic-text {
  319 + width: 370rpx;
  320 + }
  321 +
  322 + .cu-item {
  323 + background: #3388ff;
  324 + border-radius: 12px;
  325 + width: 120rpx;
  326 + height: 48rpx;
  327 + text-align: center;
  328 + line-height: 40rpx;
  329 +
  330 + text {
  331 + font-size: 12px;
  332 + font-family: PingFangSC-Regular, PingFang SC;
  333 + font-weight: 400;
  334 + color: #ffffff;
  335 + }
  336 + }
  337 +
  338 + .basic-text-status {
  339 + font-size: 14px;
  340 + }
  341 + }
  342 + .detail {
  343 + background-color: #fff;
  344 + margin-top: 30rpx;
  345 + border-radius: 20rpx;
  346 + width: 690rpx;
  347 +
  348 + .detail-item {
  349 + padding: 30rpx;
  350 + display: flex;
  351 + align-items: center;
  352 +
  353 + .detail-label {
  354 + color: #333;
  355 + font-size: 15px;
  356 + }
  357 +
  358 + .detail-value {
  359 + color: #666;
  360 + font-size: 14px;
  361 + margin-left: 30rpx;
  362 + .detail-img{
  363 + width: 60rpx;
  364 + height: 60rpx;
  365 + }
  366 + }
  367 + }
  368 + }
  369 +}
  370 +</style>
... ...
... ... @@ -21,5 +21,8 @@
21 21 "personalData": "Personal data",
22 22 "phoneLogin": "Mobile verification code login",
23 23 "forgotPassword": "Forgot password",
24   - "my": "mine"
  24 + "my": "mine",
  25 + "deviceLedger":"Device Ledger",
  26 + "faultCause":"Fault Cause",
  27 + "faultCauseDetail":"Fault Cause Detail"
25 28 }
... ...
  1 +export default {
  2 + pleasePlanName:'Please Plan Name',
  3 + preserveCode:'Preserve Code',
  4 + preserveName:'Preserve Name',
  5 + status:'Status',
  6 + frequency:'Frequency',
  7 + times:'Times',
  8 + preserveRecord:'Preserve Record',
  9 + basicInfo:'BasicInfo',
  10 + recordCode:'RecordCode',
  11 + preserveDate:'PreserveDate',
  12 + preserveByName:'PreserveByName',
  13 + preserveStatus:'PreserveStatus',
  14 + preservePlanName:'PreservePlanName',
  15 + pleasePreservePlanName:'Please preserve plan name',
  16 + preserveDetail:'Preserve Detail',
  17 + checkPlanName:'Check Plan Name',
  18 + startTime:'StartTime',
  19 + endTime:'EndTime',
  20 + patrolRecord:'PatrolRecord',
  21 + patrolPlan:'PatrolPlan',
  22 + checkDate:'CheckDate',
  23 + pleasePatrolPlanName:'Please patrol plan name',
  24 + patrolByName:'PatrolByName',
  25 + patrolDetail:'PatrolDetail',
  26 + patrolDevice:'PatrolDevice',
  27 + patrolContent:'PatrolContent',
  28 + checkResult:'CheckResult'
  29 +}
... ...
  1 +export default {
  2 + pleaseEnterFaultName:'Please enter fault name',
  3 + faultName:'Fault Name',
  4 + recordNumber:'Record Number',
  5 + schemeCode:'Scheme Code',
  6 + schemeName:'Scheme Name',
  7 + schemeType:'Scheme Type',
  8 + schemeDetails:'Scheme Details',
  9 + pleaseEnterSchemeName:'Please enter scheme name',
  10 + pleaseEnterDeviceCode: 'Please enter device code',
  11 + deviceName:'Device Name',
  12 + deviceCode:'Device Code',
  13 + deviceType:'Device Type',
  14 + brand:'Brand',
  15 + directorName:'Director Name',
  16 + basicInfo:'Basic Info',
  17 + inspectionRecords:'Inspection Records',
  18 + maintenanceRecords:'Maintenance Records',
  19 + repairRecords:'Repair Records',
  20 + deviceOnline:'Device Online',
  21 + modelNum:'Model Num',
  22 + productDate:'Product Date',
  23 + receiveDate:'Receive Date',
  24 + registeDate:'Registe Date',
  25 + deviceImg:'Device Img',
  26 + description:'Description'
  27 +}
... ...
  1 +export default {
  2 + orderCode: 'Order Code',
  3 + device:'Device',
  4 + brand:'Brand',
  5 + modelNum:'Model Num',
  6 + specifications:'Specifications',
  7 + reportDate:'Report Date',
  8 + reportByName: 'ReportByName',
  9 + status: 'Status',
  10 + emergency:'Emergency',
  11 + situationImg:'SituationImg',
  12 + description:'Description',
  13 + directorName:'Director Name',
  14 + pleaseDeviceName:'Please device name',
  15 + repairRecord:'Repair Record',
  16 + basicInfo:'BasicInfo',
  17 + code:'Code',
  18 + repairDate:'Repair Date',
  19 + repairName:'Repair Name',
  20 + malfunctionReasonName:'Malfunction ReasonName',
  21 + repairDescription:'Repair Description',
  22 + orderCodeName:'OrderCode Name',
  23 + repairDevice:'Repair Device',
  24 + pleaseOrderCodeName:'Please OrderCode Name',
  25 +}
... ...
... ... @@ -6,7 +6,10 @@ import menu from './menu'
6 6 import components from './components'
7 7 import alarm from './alarm'
8 8 import userCenter from './userCenter'
  9 +import deviceMangement from './deviceMangement'
  10 +import deviceRepair from './deviceRepair'
  11 +import deviceInspect from './deviceInspect'
9 12 export default {
10   - homePage, common, login, device, menu, components, alarm, userCenter,
  13 + homePage, common, login, device, menu, components, alarm, userCenter,deviceMangement,deviceRepair,deviceInspect,
11 14 spreadTail: 'Connecting the world to create value'
12 15 }
... ...
... ... @@ -22,5 +22,22 @@ export default {
22 22 personalData: 'Personal data',
23 23 phoneLogin: 'Mobile verification code login',
24 24 forgotPassword: 'Forgot password',
25   - my: 'mine'
  25 + my: 'mine',
  26 + deviceLedger:"Device Ledger",
  27 + deviceLedgerDetail:'Device Ledger Detail',
  28 + faultCause:"Fault Cause",
  29 + faultCauseDetail:"Fault Cause Detail",
  30 + inspectionPlanDetail:'Inspection Plan Detail',
  31 + repairWorkOrder:'Repair WorkOrder',
  32 + repairWorkOrderDetail:'Repair WorkOrder Detail',
  33 + repairRecord:'Repair Record',
  34 + repairRecordDetail:'Repair Record Detail',
  35 + maintenancePlan:'Maintenance Plan',
  36 + maintenancePlanDetail:'Maintenance Plan Detail',
  37 + maintenanceRecord:'Maintenance Record',
  38 + maintenanceRecordDetail:'Maintenance Record Detail',
  39 + patrolPlan:'Patrol Plan',
  40 + patrolPlanDetail:'Patrol Plan Detail',
  41 + patrolRecord:'Patrol Record',
  42 + patrolRecordDetail:'Patrol Record Detail'
26 43 }
... ...
... ... @@ -88,5 +88,5 @@ export default {
88 88 issuanceStatus: '下发状态',
89 89 commandTime: '命令下发时间',
90 90 responseResults: '响应结果',
91   - commandContent: '命令内容',
  91 + commandContent: '命令内容'
92 92 }
... ...
  1 +export default {
  2 + pleasePlanName:'请输入计划名称',
  3 + preserveCode:'计划编号',
  4 + preserveName:'计划名称',
  5 + status:'状态',
  6 + frequency:'维护频率',
  7 + times:'维护次数',
  8 + preserveRecord:'保养记录',
  9 + basicInfo:'基本信息',
  10 + recordCode:'记录编号',
  11 + preserveDate:'保养日期',
  12 + preserveByName:'保养人员',
  13 + preserveStatus:'维护结果',
  14 + preservePlanName:'保养计划',
  15 + pleasePreservePlanName:'请输入保养计划名称',
  16 + preserveDetail:'保养明细',
  17 + checkPlanName:'方案名称',
  18 + startTime:'开始日期',
  19 + endTime:'结束日期',
  20 + patrolRecord:'巡检记录',
  21 + patrolPlan:'巡检计划',
  22 + checkDate:'巡检日期',
  23 + pleasePatrolPlanName:'请输入巡检计划名称',
  24 + patrolByName:'巡检人',
  25 + patrolDetail:'巡检明细',
  26 + patrolDevice:'巡检设备',
  27 + patrolContent:'巡检内容',
  28 + checkResult:'检查结果'
  29 +}
... ...
  1 +export default {
  2 + pleaseEnterFaultName: '请输入故障名称',
  3 + faultName:'故障名称',
  4 + recordNumber:'记录编号',
  5 + schemeCode:'方案编号',
  6 + schemeName:'方案名称',
  7 + schemeType:'方案类型',
  8 + schemeDetails:'方案明细',
  9 + pleaseEnterSchemeName: '请输入方案名称',
  10 + pleaseEnterDeviceCode: '请输入设备编码',
  11 + deviceName:'设备名称',
  12 + deviceCode:'设备编码',
  13 + deviceType:'设备类型',
  14 + brand:'品牌',
  15 + directorName:'负责人',
  16 + basicInfo:'基本信息',
  17 + inspectionRecords:'巡检记录',
  18 + maintenanceRecords:'保养记录',
  19 + repairRecords:'维修记录' ,
  20 + deviceOnline:'设备联网',
  21 + modelNum:'型号',
  22 + productDate:'出厂日期',
  23 + receiveDate:'验收日期',
  24 + registeDate:'登记日期',
  25 + deviceImg:'图片',
  26 + description:'备注'
  27 +}
... ...
  1 +export default {
  2 + orderCode: '维修单编号',
  3 + device:'设备',
  4 + brand:'品牌',
  5 + modelNum:'型号',
  6 + specifications:'规格',
  7 + reportDate:'报修时间',
  8 + reportByName: '报修人员',
  9 + status: '状态',
  10 + emergency:'是否紧急',
  11 + situationImg:'故障详情拍照',
  12 + description:'故障描述',
  13 + directorName:'设备负责人',
  14 + pleaseDeviceName:'请输入设备名称',
  15 + repairRecord:'维修记录',
  16 + basicInfo:'基本信息',
  17 + code:'记录编号',
  18 + repairDate:'维修时间',
  19 + repairName:'维修人员',
  20 + malfunctionReasonName:'故障原因',
  21 + repairDescription:'维修情况说明',
  22 + orderCodeName:'维修工单',
  23 + repairDevice:'维修设备',
  24 + pleaseOrderCodeName:'请输入维修工单名称',
  25 +
  26 +
  27 +}
... ...
... ... @@ -6,7 +6,11 @@ import menu from './menu'
6 6 import components from './components'
7 7 import alarm from './alarm'
8 8 import userCenter from './userCenter'
  9 +import deviceMangement from './deviceMangement'
  10 +import deviceRepair from './deviceRepair'
  11 +import deviceInspect from './deviceInspect'
  12 +
9 13 export default {
10   - homePage, common, login, device, menu, components, alarm, userCenter,
  14 + homePage, common, login, device, menu, components, alarm, userCenter,deviceMangement,deviceRepair,deviceInspect,
11 15 spreadTail: '连接世界 创造价值',
12 16 }
... ...
... ... @@ -23,4 +23,22 @@ export default {
23 23 phoneLogin: '手机验证码登录',
24 24 forgotPassword: '忘记密码',
25 25 my: "我的",
  26 + deviceLedger:'设备台账',
  27 + deviceLedgerDetail:'设备台账详情',
  28 + faultCause:'故障原因管理',
  29 + faultCauseDetail:'故障原因管理详情',
  30 + inspectionPlan:'巡检/保养方案',
  31 + inspectionPlanDetail:'巡检/保养方案详情',
  32 + repairWorkOrder:'维修工单',
  33 + repairWorkOrderDetail:'维修工单详情',
  34 + repairRecord:'维修记录',
  35 + repairRecordDetail:'维修记录详情',
  36 + maintenancePlan:'保养计划',
  37 + maintenancePlanDetail:'保养计划详情',
  38 + maintenanceRecord:'保养记录',
  39 + maintenanceRecordDetail:'保养记录详情',
  40 + patrolPlan:'巡检计划',
  41 + patrolPlanDetail:'巡检计划详情',
  42 + patrolRecord:'巡检记录',
  43 + patrolRecordDetail:'巡检记录详情'
26 44 }
... ...
... ... @@ -21,5 +21,9 @@
21 21 "personalData": "个人资料",
22 22 "phoneLogin": "手机验证码登录",
23 23 "forgotPassword": "忘记密码",
24   - "my": "我的"
  24 + "my": "我的",
  25 + "deviceLedger":"设备台账",
  26 + "faultCause":"故障原因管理",
  27 + "faultCauseDetail":"故障原因管理详情",
  28 + "inspectionPlan":"巡检/保养方案"
25 29 }
... ...
... ... @@ -10,6 +10,7 @@
10 10 "license": "ISC",
11 11 "dependencies": {
12 12 "moment": "^2.29.2",
  13 + "uview-ui": "^2.0.38",
13 14 "vue-i18n": "^9.1.9"
14 15 }
15 16 },
... ... @@ -372,6 +373,14 @@
372 373 "node": ">=4"
373 374 }
374 375 },
  376 + "node_modules/uview-ui": {
  377 + "version": "2.0.38",
  378 + "resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.38.tgz",
  379 + "integrity": "sha512-6egHDf9lXHKpG3hEjRE0vMx4+VWwKk/ReTf5x18KrIKqdvdPRqO3+B8Unh7vYYwrIxzAWIlmhZ9RJpKI/4UqPQ==",
  380 + "engines": {
  381 + "HBuilderX": "^3.1.0"
  382 + }
  383 + },
375 384 "node_modules/vue": {
376 385 "version": "3.5.11",
377 386 "resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.11.tgz",
... ...
... ... @@ -13,6 +13,7 @@
13 13 "license": "ISC",
14 14 "dependencies": {
15 15 "moment": "^2.29.2",
  16 + "uview-ui": "^2.0.38",
16 17 "vue-i18n": "^9.1.9"
17 18 }
18 19 }
... ...
... ... @@ -91,7 +91,70 @@
91 91 "style": {
92 92 "navigationBarTitleText": ""
93 93 }
  94 + },
  95 + {
  96 + "path": "pages/deviceManagement/ledger/ledger",
  97 + "style": {
  98 + "navigationBarTitleText": ""
  99 + }
  100 + },
  101 + {
  102 + "path": "pages/deviceManagement/deviceType/deviceType",
  103 + "style": {
  104 + "navigationBarTitleText": ""
  105 + }
  106 + },
  107 + {
  108 + "path": "pages/deviceManagement/faultCause/faultCause",
  109 + "style": {
  110 + "navigationBarTitleText": ""
  111 + }
  112 + },
  113 + {
  114 + "path": "pages/deviceManagement/inspectionPlan/inspectionPlan",
  115 + "style": {
  116 + "navigationBarTitleText": ""
  117 + }
  118 + },
  119 + {
  120 + "path": "pages/deviceRepair/repairWorkOrder/repairWorkOrder",
  121 + "style": {
  122 + "navigationBarTitleText": ""
  123 + }
  124 + },
  125 + {
  126 + "path": "pages/deviceRepair/repairRecord/repairRecord",
  127 + "style": {
  128 + "navigationBarTitleText": ""
  129 + }
  130 + },
  131 + {
  132 + "path": "pages/deviceInspect/maintenancePlan/maintenancePlan",
  133 + "style": {
  134 + "navigationBarTitleText": ""
  135 + }
  136 + },
  137 + {
  138 + "path": "pages/deviceInspect/maintenanceRecord/maintenanceRecord",
  139 + "style": {
  140 + "navigationBarTitleText": ""
  141 + }
  142 + },
  143 + {
  144 + "path": "pages/deviceInspect/patrolPlan/patrolPlan",
  145 + "style": {
  146 + "navigationBarTitleText": ""
  147 + }
  148 + },
  149 + {
  150 + "path": "pages/deviceInspect/patrolRecord/patrolRecord",
  151 + "style": {
  152 + "navigationBarTitleText": ""
  153 + }
94 154 }
  155 +
  156 +
  157 +
95 158 ],
96 159 "subPackages": [{
97 160 "root": "alarm-subpackage",
... ... @@ -184,7 +247,76 @@
184 247 }
185 248 }
186 249 ]
  250 + },
  251 + {
  252 + "root": "deviceManagement-subpackage",
  253 + "pages": [{
  254 + "path": "faultCause-detail/faultCause-detail",
  255 + "style": {
  256 + "navigationBarTitleText": ""
  257 + }
  258 + },
  259 + {
  260 + "path": "inspectionPlan-detail/inspectionPlan-detail",
  261 + "style": {
  262 + "navigationBarTitleText": ""
  263 + }
  264 + },
  265 + {
  266 + "path": "ledger-detail/ledger-detail",
  267 + "style": {
  268 + "navigationBarTitleText": ""
  269 + }
  270 + }
  271 + ]
  272 + },
  273 + {
  274 + "root": "deviceRepair-subpackage",
  275 + "pages": [{
  276 + "path": "repairWorkOrder-detail/repairWorkOrder-detail",
  277 + "style": {
  278 + "navigationBarTitleText": ""
  279 + }
  280 + },
  281 + {
  282 + "path": "repairRecord-detail/repairRecord-detail",
  283 + "style": {
  284 + "navigationBarTitleText": ""
  285 + }
  286 + }
  287 +
  288 + ]
  289 + },
  290 + {
  291 + "root": "deviceInspect-subpackage",
  292 + "pages": [{
  293 + "path": "maintenancePlan-detail/maintenancePlan-detail",
  294 + "style": {
  295 + "navigationBarTitleText": ""
  296 + }
  297 + },
  298 + {
  299 + "path": "maintenanceRecord-detail/maintenanceRecord-detail",
  300 + "style": {
  301 + "navigationBarTitleText": ""
  302 + }
  303 + },
  304 + {
  305 + "path": "patrolPlan-detail/patrolPlan-detail",
  306 + "style": {
  307 + "navigationBarTitleText": ""
  308 + }
  309 + },
  310 + {
  311 + "path": "patrolRecord-detail/patrolRecord-detail",
  312 + "style": {
  313 + "navigationBarTitleText": ""
  314 + }
  315 + }
  316 +
  317 + ]
187 318 }
  319 +
188 320 ],
189 321 "globalStyle": {
190 322 "navigationBarTextStyle": "black",
... ...
  1 +const planType = {
  2 + 'NOTSTART':{
  3 + color:'#666666',
  4 + name:'未开始',
  5 + iconUrl:'/static/unonline.png'
  6 + },
  7 + 'UNDERWAY':{
  8 + color:'#FFD700',
  9 + name:'进行中',
  10 + iconUrl:'/static/time.png'
  11 + },
  12 + 'COMPLETED':{
  13 + color:'#377DFF',
  14 + name:'已完成',
  15 + iconUrl:'/static/online.png'
  16 + },
  17 + 'STOP':{
  18 + color:'#DE4437',
  19 + name:'停用',
  20 + iconUrl:'/static/baojing.png'
  21 + }
  22 +}
  23 +
  24 +const preserveType = {
  25 + 'INCOMPLETE':{
  26 + color:'#666666',
  27 + name:'未完成',
  28 + iconUrl:'/static/unonline.png'
  29 + },
  30 + 'COMPLETE':{
  31 + color:'#377DFF',
  32 + name:'已完成',
  33 + iconUrl:'/static/online.png'
  34 + }
  35 +}
  36 +
  37 +const detailType = {
  38 + 'UNEXECUTED':{
  39 + color:'#666666',
  40 + name:'未执行',
  41 + iconUrl:'/static/unonline.png'
  42 + },
  43 + 'EXECUTED':{
  44 + color:'#377DFF',
  45 + name:'已执行',
  46 + iconUrl:'/static/online.png'
  47 + }
  48 +}
  49 +
  50 +
  51 +const inspectionType = {
  52 + 'NOT_START':{
  53 + color:'#666666',
  54 + name:'未开始',
  55 + iconUrl:'/static/unonline.png'
  56 + },
  57 + 'UNDERWAY':{
  58 + color:'#FFD700',
  59 + name:'进行中',
  60 + iconUrl:'/static/time.png'
  61 + },
  62 + 'FINISH':{
  63 + color:'#377DFF',
  64 + name:'已完成',
  65 + iconUrl:'/static/online.png'
  66 + },
  67 + 'STOP':{
  68 + color:'#DE4437',
  69 + name:'停用',
  70 + iconUrl:'/static/baojing.png'
  71 + }
  72 +}
  73 +
  74 +const inspectionResult = {
  75 + true:{
  76 + color:'#377DFF',
  77 + name:'正常',
  78 + iconUrl:'/static/online.png'
  79 +
  80 + },
  81 + false:{
  82 + color:'#DE4437',
  83 + name:'异常',
  84 + iconUrl:'/static/baojing.png'
  85 + }
  86 +}
  87 +
  88 +
  89 +
  90 +
  91 +export {
  92 + planType,
  93 + preserveType,
  94 + detailType,
  95 + inspectionType,
  96 + inspectionResult
  97 +}
... ...
  1 +<template>
  2 + <view class="faultCause-page">
  3 + <!-- 头部 -->
  4 + <header-searchNoOrg @openSearchDialog="openSearchDialog">
  5 + <!-- 不能写在封装组件里传placeholder,mp-wenxin端编译要报错 -->
  6 + <u--input prefixIcon="search" :placeholder="$t('deviceInspect.pleasePlanName')" shape="circle"
  7 + @change="inputChanged">
  8 + </u--input>
  9 + </header-searchNoOrg>
  10 + <!-- 列表分页 -->
  11 + <mescroll-body ref="mescrollRef" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback"
  12 + @up="upCallback">
  13 + <page-list :list="list" @openDeviceDetail="openDeviceDetail"></page-list>
  14 + <mescroll-empty v-if="!list.length" />
  15 + </mescroll-body>
  16 + <view style="height: 20rpx"></view>
  17 + <!-- 筛选 -->
  18 + <filter-popup ref="devicePopupRef" :filterList="filterList" :filterName="filterName" :show="show" @close="close" @queryCondition="getQueryCondition" ></filter-popup>
  19 + </view>
  20 +</template>
  21 +
  22 +<script>
  23 +import headerSearchNoOrg from '@/components/common/header-searchNoOrg.vue';
  24 +import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js';
  25 +import api from '@/api/index.js'
  26 +import {
  27 + useNavigateTo
  28 +} from '@/plugins/utils.js'
  29 +import pageList from '@/components/common/page-list'
  30 +import filterPopup from '@/components/common/filter-popup.vue'
  31 +import {planType} from '../enum/index.js'
  32 +
  33 +export default {
  34 + mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
  35 + components: {
  36 + pageList,
  37 + filterPopup,
  38 + headerSearchNoOrg
  39 + },
  40 + data() {
  41 + return {
  42 + downOption: {
  43 + auto: false //是否在初始化后,自动执行downCallback; 默认true
  44 + },
  45 + upOption: {
  46 + isBounce: false,
  47 + auto: false // 不自动加载
  48 + },
  49 + show: false,
  50 + list: [],
  51 + page: {
  52 + num: 0,
  53 + size: 10
  54 + },
  55 + preserveName:'',//保养计划名称
  56 + status:'', //状态
  57 + filterName:{ //筛选的字段
  58 + status:''
  59 + },
  60 + filterList:[ //筛选弹框字段
  61 + {
  62 + title:'状态',
  63 + titleCode:'status',
  64 + typeList:[
  65 + {
  66 + checked:true,
  67 + name:'全部',
  68 + code:''
  69 + },
  70 + {
  71 + checked:false,
  72 + name:'未开始',
  73 + code:'NOTSTART'
  74 + },
  75 + {
  76 + checked:false,
  77 + name:'进行中',
  78 + code:'UNDERWAY'
  79 + },
  80 + {
  81 + checked:false,
  82 + name:'已完成',
  83 + code:'COMPLETED'
  84 + },
  85 + {
  86 + checked:false,
  87 + name:'停用',
  88 + code:'STOP'
  89 + }
  90 + ]
  91 + },
  92 +
  93 + ]
  94 +
  95 + };
  96 + },
  97 + onLoad(e) {
  98 + // 隐藏原生的tabbar
  99 + uni.hideTabBar();
  100 + if (getApp().getBindNot()) {
  101 + return
  102 + }
  103 + },
  104 + onShow() {
  105 + this.$nextTick(()=>{
  106 + uni.setNavigationBarTitle({
  107 + title:this.$t('menu.maintenancePlan')
  108 + })
  109 + })
  110 + if (getApp().getBindNot()) {
  111 + return
  112 + }
  113 + this.page.num = 1
  114 + this.loadData(this.page.num);
  115 + },
  116 + methods: {
  117 +
  118 + //输入框查询
  119 + inputChanged(e) {
  120 + if (getApp().getBindNot()) {
  121 + return
  122 + }
  123 + this.page.num = 1;
  124 + this.preserveName = e;
  125 + this.loadData(1);
  126 + },
  127 + //筛选弹窗重置操作
  128 + resetQuery() {
  129 + this.$refs.devicePopupRef.resetFilter()
  130 + this.status = ''
  131 + },
  132 + //筛选弹窗确认操作
  133 + getQueryCondition(value) {
  134 + this.page.num = 1;
  135 + this.status = value.status
  136 + this.loadData(this.page.num, value);
  137 + this.close()
  138 + },
  139 + //下拉刷新
  140 + downCallback() {
  141 + if (getApp().getBindNot()) {
  142 + setTimeout(() => {
  143 + this.mescroll.endByPage(0, 0)
  144 + }, 200)
  145 + return
  146 + }
  147 + this.list = [];
  148 + this.page.num = 1;
  149 + this.loadData(this.page.num);
  150 + this.resetQuery();
  151 + },
  152 + //上拉加载
  153 + upCallback() {
  154 + if (getApp().getBindNot()) {
  155 + setTimeout(() => {
  156 + this.mescroll.endByPage(0, 0)
  157 + }, 200)
  158 + return
  159 + }
  160 + this.page.num += 1;
  161 + this.loadData(this.page.num);
  162 + },
  163 + //获取列表
  164 + async loadData(pageNo,params={}) {
  165 + try {
  166 + let httpData = {
  167 + page: pageNo,
  168 + pageSize: 10,
  169 + };
  170 + const httpPostData = {
  171 + preserveName:this.preserveName,
  172 + status:this.status,
  173 + ...params
  174 + }
  175 + const {
  176 + total,
  177 + items
  178 + } = await api.deviceInspectApi.getMaintenancePlanListApi(httpData, httpPostData)
  179 +
  180 + let data = items
  181 + let newList = data.map((item)=>{
  182 + return {
  183 + id:item.id,
  184 + title:item.preserveCode,
  185 + status:item.status ? planType[item.status].name : '',
  186 + iconUrl:item.status ? planType[item.status].iconUrl : '',
  187 + color:item.status ? planType[item.status].color : '',
  188 + child:[
  189 + {
  190 + label:'deviceInspect.preserveName',
  191 + name:item.preserveName
  192 + },
  193 + {
  194 + label:'deviceInspect.frequency',
  195 + name:item.frequency
  196 + },
  197 + {
  198 + label:'deviceInspect.times',
  199 + name:item.times
  200 + },
  201 + ],
  202 + detail:{
  203 + ...item
  204 + }
  205 + }
  206 + })
  207 + uni.stopPullDownRefresh();
  208 + this.mescroll.endByPage(items.length); //必传参数(当前页的数据个数, 总页数)
  209 + if (pageNo == 1) {
  210 + this.list = newList;
  211 + } else {
  212 + this.list = this.list.concat(newList);
  213 + }
  214 +
  215 +
  216 + } catch {
  217 + this.mescroll.endErr();
  218 + }
  219 + },
  220 +
  221 + //打开筛选弹框
  222 + openSearchDialog() {
  223 + if (getApp().getBindNot()) {
  224 + uni.$u.toast(this.$t('deviceMangement.pleaseBindAccount'))
  225 + return
  226 + }
  227 + this.show = true;
  228 + },
  229 +
  230 + //关闭筛选弹框
  231 + close() {
  232 + this.show = false;
  233 + },
  234 +
  235 + //列表详情
  236 + openDeviceDetail(values) {
  237 + const { id } = values || {}
  238 + uni.navigateTo({
  239 + url: `/deviceInspect-subpackage/maintenancePlan-detail/maintenancePlan-detail?id=${id}`
  240 + });
  241 + },
  242 + }
  243 +};
  244 +</script>
  245 +
  246 +<style lang="scss" scoped>
  247 +.faultCause-page {
  248 + min-height: 100vh;
  249 + background-color: #f8f9fa;
  250 +}
  251 +
  252 +.device-top {
  253 + padding: 10rpx 30rpx;
  254 + background-color: #fff;
  255 +
  256 + .search {
  257 + display: flex;
  258 + justify-content: space-between;
  259 + padding-bottom: 10rpx;
  260 +
  261 + .search-left {
  262 + width: 580rpx;
  263 + background-color: #f8f9fa;
  264 + border-radius: 200rpx;
  265 + }
  266 +
  267 + .search-right {
  268 + display: flex;
  269 + align-items: center;
  270 +
  271 + text {
  272 + color: #333;
  273 + font-size: 14px;
  274 + }
  275 +
  276 + image {
  277 + width: 40rpx;
  278 + height: 40rpx;
  279 + }
  280 + }
  281 + }
  282 +}
  283 +</style>
... ...
  1 +<template>
  2 + <view class="faultCause-page">
  3 + <!-- 头部 -->
  4 + <header-searchNoOrg @openSearchDialog="openSearchDialog">
  5 + <!-- 不能写在封装组件里传placeholder,mp-wenxin端编译要报错 -->
  6 + <u--input prefixIcon="search" :placeholder="$t('deviceInspect.pleasePreservePlanName')" shape="circle"
  7 + @change="inputChanged">
  8 + </u--input>
  9 + </header-searchNoOrg>
  10 + <!-- 列表分页 -->
  11 + <mescroll-body ref="mescrollRef" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback"
  12 + @up="upCallback">
  13 + <page-list :list="list" @openDeviceDetail="openDeviceDetail"></page-list>
  14 + <mescroll-empty v-if="!list.length" />
  15 + </mescroll-body>
  16 + <view style="height: 20rpx"></view>
  17 + <!-- 筛选 -->
  18 + <filter-popup ref="devicePopupRef" :filterList="filterList" :filterName="filterName" :show="show" @close="close" @queryCondition="getQueryCondition" ></filter-popup>
  19 + </view>
  20 +</template>
  21 +
  22 +<script>
  23 +import headerSearchNoOrg from '@/components/common/header-searchNoOrg.vue';
  24 +import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js';
  25 +import api from '@/api/index.js'
  26 +import {
  27 + useNavigateTo
  28 +} from '@/plugins/utils.js'
  29 +import pageList from '@/components/common/page-list'
  30 +import filterPopup from '@/components/common/filter-popup.vue'
  31 +import {planType,preserveType} from '../enum/index.js'
  32 +
  33 +export default {
  34 + mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
  35 + components: {
  36 + pageList,
  37 + filterPopup,
  38 + headerSearchNoOrg
  39 + },
  40 + data() {
  41 + return {
  42 + downOption: {
  43 + auto: false //是否在初始化后,自动执行downCallback; 默认true
  44 + },
  45 + upOption: {
  46 + isBounce: false,
  47 + auto: false // 不自动加载
  48 + },
  49 + show: false,
  50 + list: [],
  51 + page: {
  52 + num: 0,
  53 + size: 10
  54 + },
  55 + startDate:'', //开始时间
  56 + endDate:'', //结束时间
  57 + preservePlanId:'', //保养计划id
  58 + preservePlanName:'', //保养计划名称
  59 + preserveBy:'', //保养人id
  60 + preserveStatus:'', //状态
  61 + deviceId:'', //设备id
  62 + deviceName:'', //设备名称
  63 + filterName:{ //筛选的字段
  64 + preserveStatus:'',
  65 + startDate:'',
  66 + endDate:''
  67 + },
  68 + filterList:[ //筛选弹框字段
  69 + {
  70 + title:'维护结果',
  71 + titleCode:'preserveStatus',
  72 + typeList:[
  73 + {
  74 + checked:true,
  75 + name:'全部',
  76 + code:''
  77 + },
  78 + {
  79 + checked:false,
  80 + name:'未完成',
  81 + code:'INCOMPLETE'
  82 + },
  83 + {
  84 + checked:false,
  85 + name:'已完成',
  86 + code:'COMPLETE'
  87 + }
  88 + ]
  89 + },
  90 + {
  91 + title:'保养日期',
  92 + isDate:true,
  93 + startDate:'startDate',
  94 + endDate:'endDate',
  95 + range:[]
  96 + }
  97 +
  98 + ]
  99 +
  100 + };
  101 + },
  102 + onLoad(e) {
  103 + // 隐藏原生的tabbar
  104 + uni.hideTabBar();
  105 + if (getApp().getBindNot()) {
  106 + return
  107 + }
  108 + },
  109 + onShow() {
  110 + this.$nextTick(()=>{
  111 + uni.setNavigationBarTitle({
  112 + title:this.$t('menu.maintenanceRecord')
  113 + })
  114 + })
  115 + if (getApp().getBindNot()) {
  116 + return
  117 + }
  118 + this.page.num = 1
  119 + this.loadData(this.page.num);
  120 + },
  121 + methods: {
  122 +
  123 + //输入框查询
  124 + inputChanged(e) {
  125 + if (getApp().getBindNot()) {
  126 + return
  127 + }
  128 + this.page.num = 1;
  129 + this.preservePlanName = e;
  130 + this.loadData(1);
  131 + },
  132 + //筛选弹窗重置操作
  133 + resetQuery() {
  134 + this.$refs.devicePopupRef.resetFilter()
  135 + this.preserveStatus = ''
  136 + this.startDate = ''
  137 + this.endDate = ''
  138 + },
  139 + //筛选弹窗确认操作
  140 + getQueryCondition(value) {
  141 + this.page.num = 1;
  142 + this.preserveStatus = value.preserveStatus
  143 + this.startDate = value.startDate
  144 + this.endDate = value.endDate
  145 + this.loadData(this.page.num, value);
  146 + this.close()
  147 + },
  148 + //下拉刷新
  149 + downCallback() {
  150 + if (getApp().getBindNot()) {
  151 + setTimeout(() => {
  152 + this.mescroll.endByPage(0, 0)
  153 + }, 200)
  154 + return
  155 + }
  156 + this.list = [];
  157 + this.page.num = 1;
  158 + this.loadData(this.page.num);
  159 + this.resetQuery();
  160 + },
  161 + //上拉加载
  162 + upCallback() {
  163 + if (getApp().getBindNot()) {
  164 + setTimeout(() => {
  165 + this.mescroll.endByPage(0, 0)
  166 + }, 200)
  167 + return
  168 + }
  169 + this.page.num += 1;
  170 + this.loadData(this.page.num);
  171 + },
  172 + //获取列表
  173 + async loadData(pageNo,params={}) {
  174 + try {
  175 + let httpData = {
  176 + page: pageNo,
  177 + pageSize: 10,
  178 + };
  179 + const httpPostData = {
  180 + startDate:this.startDate, //开始时间
  181 + endDate:this.endDate, //结束时间
  182 + preservePlanId:this.preservePlanId, //保养计划id
  183 + preservePlanName:this.preservePlanName, //保养计划名称
  184 + preserveBy:this.preserveBy, //保养人id
  185 + preserveStatus:this.preserveStatus, //状态
  186 + deviceId:this.deviceId, //设备id
  187 + deviceName:this.deviceName,//设备名称
  188 + ...params
  189 + }
  190 + const {
  191 + total,
  192 + items
  193 + } = await api.deviceInspectApi.getMaintenanceRecordListApi(httpData, httpPostData)
  194 +
  195 + let data = items
  196 + let newList = data.map((item)=>{
  197 + return {
  198 + id:item.id,
  199 + title:item.recordCode,
  200 + status:item.preserveStatus ? preserveType[item.preserveStatus].name : '',
  201 + iconUrl:item.preserveStatus ? preserveType[item.preserveStatus].iconUrl : '',
  202 + color:item.preserveStatus ? preserveType[item.preserveStatus].color : '',
  203 + child:[
  204 + {
  205 + label:'deviceInspect.preserveDate',
  206 + name:item.preserveDate
  207 + },
  208 + {
  209 + label:'deviceInspect.preserveByName',
  210 + name:item.preserveByName
  211 + },
  212 + {
  213 + label:'deviceInspect.preservePlanName',
  214 + name:item.preservePlanName
  215 + }
  216 +
  217 + ],
  218 + detail:{
  219 + ...item
  220 + }
  221 + }
  222 + })
  223 + uni.stopPullDownRefresh();
  224 + this.mescroll.endByPage(items.length); //必传参数(当前页的数据个数, 总页数)
  225 + if (pageNo == 1) {
  226 + this.list = newList;
  227 + } else {
  228 + this.list = this.list.concat(newList);
  229 + }
  230 +
  231 +
  232 + } catch {
  233 + this.mescroll.endErr();
  234 + }
  235 + },
  236 +
  237 + //打开筛选弹框
  238 + openSearchDialog() {
  239 + if (getApp().getBindNot()) {
  240 + uni.$u.toast(this.$t('deviceMangement.pleaseBindAccount'))
  241 + return
  242 + }
  243 + this.show = true;
  244 + },
  245 +
  246 + //关闭筛选弹框
  247 + close() {
  248 + this.show = false;
  249 + },
  250 +
  251 + //列表详情
  252 + openDeviceDetail(values) {
  253 + const { id } = values || {}
  254 + uni.navigateTo({
  255 + url: `/deviceInspect-subpackage/maintenanceRecord-detail/maintenanceRecord-detail?id=${id}`
  256 + });
  257 + },
  258 + }
  259 +};
  260 +</script>
  261 +
  262 +<style lang="scss" scoped>
  263 +.faultCause-page {
  264 + min-height: 100vh;
  265 + background-color: #f8f9fa;
  266 +}
  267 +
  268 +.device-top {
  269 + padding: 10rpx 30rpx;
  270 + background-color: #fff;
  271 +
  272 + .search {
  273 + display: flex;
  274 + justify-content: space-between;
  275 + padding-bottom: 10rpx;
  276 +
  277 + .search-left {
  278 + width: 580rpx;
  279 + background-color: #f8f9fa;
  280 + border-radius: 200rpx;
  281 + }
  282 +
  283 + .search-right {
  284 + display: flex;
  285 + align-items: center;
  286 +
  287 + text {
  288 + color: #333;
  289 + font-size: 14px;
  290 + }
  291 +
  292 + image {
  293 + width: 40rpx;
  294 + height: 40rpx;
  295 + }
  296 + }
  297 + }
  298 +}
  299 +</style>
... ...
  1 +<template>
  2 + <view class="faultCause-page">
  3 + <!-- 头部 -->
  4 + <header-searchNoOrg @openSearchDialog="openSearchDialog">
  5 + <!-- 不能写在封装组件里传placeholder,mp-wenxin端编译要报错 -->
  6 + <u--input prefixIcon="search" :placeholder="$t('deviceInspect.pleasePlanName')" shape="circle"
  7 + @change="inputChanged">
  8 + </u--input>
  9 + </header-searchNoOrg>
  10 + <!-- 列表分页 -->
  11 + <mescroll-body ref="mescrollRef" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback"
  12 + @up="upCallback">
  13 + <page-list :list="list" @openDeviceDetail="openDeviceDetail"></page-list>
  14 + <mescroll-empty v-if="!list.length" />
  15 + </mescroll-body>
  16 + <view style="height: 20rpx"></view>
  17 + <!-- 筛选 -->
  18 + <filter-popup ref="devicePopupRef" :filterList="filterList" :filterName="filterName" :show="show" @close="close" @queryCondition="getQueryCondition" ></filter-popup>
  19 + </view>
  20 +</template>
  21 +
  22 +<script>
  23 +import headerSearchNoOrg from '@/components/common/header-searchNoOrg.vue';
  24 +import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js';
  25 +import api from '@/api/index.js'
  26 +import {
  27 + useNavigateTo
  28 +} from '@/plugins/utils.js'
  29 +import pageList from '@/components/common/page-list'
  30 +import filterPopup from '@/components/common/filter-popup.vue'
  31 +import {planType,preserveType,inspectionType} from '../enum/index.js'
  32 +
  33 +export default {
  34 + mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
  35 + components: {
  36 + pageList,
  37 + filterPopup,
  38 + headerSearchNoOrg
  39 + },
  40 + data() {
  41 + return {
  42 + downOption: {
  43 + auto: false //是否在初始化后,自动执行downCallback; 默认true
  44 + },
  45 + upOption: {
  46 + isBounce: false,
  47 + auto: false // 不自动加载
  48 + },
  49 + show: false,
  50 + list: [],
  51 + page: {
  52 + num: 0,
  53 + size: 10
  54 + },
  55 + startTimeStart:'', //开始日期-开始时间
  56 + startTimeEnd:'', //开始日期-结束时间
  57 + endTimeStart:'', //结束日期-开始时间
  58 + endTimeEnd:'', //结束日期-结束时间
  59 + type:'', //状态
  60 + name:'', //名称
  61 + filterName:{ //筛选的字段
  62 + type:'',
  63 + startTimeStart:'',
  64 + startTimeEnd:'',
  65 + endTimeStart:'',
  66 + endTimeEnd:''
  67 + },
  68 + filterList:[ //筛选弹框字段
  69 + {
  70 + title:'状态',
  71 + titleCode:'type',
  72 + typeList:[
  73 + {
  74 + checked:true,
  75 + name:'全部',
  76 + code:''
  77 + },
  78 + {
  79 + checked:false,
  80 + name:'未开始',
  81 + code:'NOT_START'
  82 + },
  83 + {
  84 + checked:false,
  85 + name:'进行中',
  86 + code:'UNDERWAY'
  87 + },
  88 + {
  89 + checked:false,
  90 + name:'已完成',
  91 + code:'FINISH'
  92 + },
  93 + {
  94 + checked:false,
  95 + name:'停用',
  96 + code:'STOP'
  97 + }
  98 + ]
  99 + },
  100 + {
  101 + title:'开始日期',
  102 + isDate:true,
  103 + startDate:'startTimeStart',
  104 + endDate:'startTimeEnd',
  105 + range:[]
  106 + },
  107 + {
  108 + title:'结束日期',
  109 + isDate:true,
  110 + startDate:'endTimeStart',
  111 + endDate:'endTimeEnd',
  112 + range:[]
  113 + }
  114 +
  115 + ]
  116 +
  117 + };
  118 + },
  119 + onLoad(e) {
  120 + // 隐藏原生的tabbar
  121 + uni.hideTabBar();
  122 + if (getApp().getBindNot()) {
  123 + return
  124 + }
  125 + },
  126 + onShow() {
  127 + this.$nextTick(()=>{
  128 + uni.setNavigationBarTitle({
  129 + title:this.$t('menu.patrolPlan')
  130 + })
  131 + })
  132 + if (getApp().getBindNot()) {
  133 + return
  134 + }
  135 + this.page.num = 1
  136 + this.loadData(this.page.num);
  137 + },
  138 + methods: {
  139 +
  140 + //输入框查询
  141 + inputChanged(e) {
  142 + if (getApp().getBindNot()) {
  143 + return
  144 + }
  145 + this.page.num = 1;
  146 + this.name = e;
  147 + this.loadData(1);
  148 + },
  149 + //筛选弹窗重置操作
  150 + resetQuery() {
  151 + this.$refs.devicePopupRef.resetFilter()
  152 + this.type = ''
  153 + this.startTimeStart = ''
  154 + this.startTimeEnd = ''
  155 + this.endTimeStart = ''
  156 + this.endTimeEnd = ''
  157 + },
  158 + //筛选弹窗确认操作
  159 + getQueryCondition(value) {
  160 + this.page.num = 1;
  161 + this.type = value.type
  162 + this.startTimeStart = value.startTimeStart
  163 + this.startTimeEnd = value.startTimeEnd
  164 + this.endTimeStart = value.endTimeStart
  165 + this.endTimeEnd = value.endTimeEnd
  166 + this.loadData(this.page.num, value);
  167 + this.close()
  168 + },
  169 + //下拉刷新
  170 + downCallback() {
  171 + if (getApp().getBindNot()) {
  172 + setTimeout(() => {
  173 + this.mescroll.endByPage(0, 0)
  174 + }, 200)
  175 + return
  176 + }
  177 + this.list = [];
  178 + this.page.num = 1;
  179 + this.loadData(this.page.num);
  180 + this.resetQuery();
  181 + },
  182 + //上拉加载
  183 + upCallback() {
  184 + if (getApp().getBindNot()) {
  185 + setTimeout(() => {
  186 + this.mescroll.endByPage(0, 0)
  187 + }, 200)
  188 + return
  189 + }
  190 + this.page.num += 1;
  191 + this.loadData(this.page.num);
  192 + },
  193 + //获取列表
  194 + async loadData(pageNo,params={}) {
  195 + try {
  196 + let httpData = {
  197 + page: pageNo,
  198 + pageSize: 10,
  199 + type:this.type,
  200 + name:this.name,
  201 + startTimeStart:this.startTimeStart,
  202 + startTimeEnd:this.startTimeEnd,
  203 + endTimeStart:this.endTimeStart,
  204 + endTimeEnd:this.endTimeEnd
  205 + };
  206 + const {
  207 + total,
  208 + items
  209 + } = await api.deviceInspectApi.getPatrolPlanListApi(httpData)
  210 +
  211 + let data = items
  212 +
  213 + let newList = data.map((item)=>{
  214 +
  215 + return {
  216 + id:item.id,
  217 + title:item.code,
  218 + status:item.status ? inspectionType[item.status].name : '',
  219 + iconUrl:item.status ? inspectionType[item.status].iconUrl : '',
  220 + color:item.status ? inspectionType[item.status].color : '',
  221 + child:[
  222 + {
  223 + label:'deviceInspect.preserveName',
  224 + name:item.name
  225 + },
  226 + {
  227 + label:'deviceInspect.startTime',
  228 + name:item.startTime
  229 + },
  230 + {
  231 + label:'deviceInspect.endTime',
  232 + name:item.endTime
  233 + }
  234 + ],
  235 + detail:{
  236 + ...item
  237 + }
  238 + }
  239 + })
  240 +
  241 + uni.stopPullDownRefresh();
  242 + this.mescroll.endByPage(items.length); //必传参数(当前页的数据个数, 总页数)
  243 + if (pageNo == 1) {
  244 + this.list = newList;
  245 + } else {
  246 + this.list = this.list.concat(newList);
  247 + }
  248 +
  249 +
  250 +
  251 + } catch {
  252 + this.mescroll.endErr();
  253 + }
  254 + },
  255 +
  256 + //打开筛选弹框
  257 + openSearchDialog() {
  258 + if (getApp().getBindNot()) {
  259 + uni.$u.toast(this.$t('deviceMangement.pleaseBindAccount'))
  260 + return
  261 + }
  262 + this.show = true;
  263 + },
  264 +
  265 + //关闭筛选弹框
  266 + close() {
  267 + this.show = false;
  268 + },
  269 +
  270 + //列表详情
  271 + openDeviceDetail(values) {
  272 + const { id } = values || {}
  273 + uni.navigateTo({
  274 + url: `/deviceInspect-subpackage/patrolPlan-detail/patrolPlan-detail?id=${id}`
  275 + });
  276 + },
  277 + }
  278 +};
  279 +</script>
  280 +
  281 +<style lang="scss" scoped>
  282 +.faultCause-page {
  283 + min-height: 100vh;
  284 + background-color: #f8f9fa;
  285 +}
  286 +
  287 +.device-top {
  288 + padding: 10rpx 30rpx;
  289 + background-color: #fff;
  290 +
  291 + .search {
  292 + display: flex;
  293 + justify-content: space-between;
  294 + padding-bottom: 10rpx;
  295 +
  296 + .search-left {
  297 + width: 580rpx;
  298 + background-color: #f8f9fa;
  299 + border-radius: 200rpx;
  300 + }
  301 +
  302 + .search-right {
  303 + display: flex;
  304 + align-items: center;
  305 +
  306 + text {
  307 + color: #333;
  308 + font-size: 14px;
  309 + }
  310 +
  311 + image {
  312 + width: 40rpx;
  313 + height: 40rpx;
  314 + }
  315 + }
  316 + }
  317 +}
  318 +</style>
... ...
  1 +<template>
  2 + <view class="faultCause-page">
  3 + <!-- 头部 -->
  4 + <header-searchNoOrg @openSearchDialog="openSearchDialog">
  5 + <!-- 不能写在封装组件里传placeholder,mp-wenxin端编译要报错 -->
  6 + <u--input prefixIcon="search" :placeholder="$t('deviceInspect.pleasePatrolPlanName')" shape="circle"
  7 + @change="inputChanged">
  8 + </u--input>
  9 + </header-searchNoOrg>
  10 + <!-- 列表分页 -->
  11 + <mescroll-body ref="mescrollRef" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback"
  12 + @up="upCallback">
  13 + <page-list :list="list" @openDeviceDetail="openDeviceDetail"></page-list>
  14 + <mescroll-empty v-if="!list.length" />
  15 + </mescroll-body>
  16 + <view style="height: 20rpx"></view>
  17 + <!-- 筛选 -->
  18 + <filter-popup ref="devicePopupRef" :filterList="filterList" :filterName="filterName" :show="show" @close="close" @queryCondition="getQueryCondition" ></filter-popup>
  19 + </view>
  20 +</template>
  21 +
  22 +<script>
  23 +import headerSearchNoOrg from '@/components/common/header-searchNoOrg.vue';
  24 +import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js';
  25 +import api from '@/api/index.js'
  26 +import {
  27 + useNavigateTo
  28 +} from '@/plugins/utils.js'
  29 +import pageList from '@/components/common/page-list'
  30 +import filterPopup from '@/components/common/filter-popup.vue'
  31 +import {planType,preserveType,inspectionType,inspectionResult} from '../enum/index.js'
  32 +
  33 +export default {
  34 + mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
  35 + components: {
  36 + pageList,
  37 + filterPopup,
  38 + headerSearchNoOrg
  39 + },
  40 + data() {
  41 + return {
  42 + downOption: {
  43 + auto: false //是否在初始化后,自动执行downCallback; 默认true
  44 + },
  45 + upOption: {
  46 + isBounce: false,
  47 + auto: false // 不自动加载
  48 + },
  49 + show: false,
  50 + list: [],
  51 + page: {
  52 + num: 0,
  53 + size: 10
  54 + },
  55 + inspectionPlanId:'',
  56 + inspectionPlanName:'',
  57 + inspectorId:'',
  58 + startTime:'',
  59 + endTime:'',
  60 + recordResult:'',
  61 + filterName:{ //筛选的字段
  62 + recordResult:'',
  63 + startTime:'',
  64 + endTime:''
  65 + },
  66 + filterList:[ //筛选弹框字段
  67 + {
  68 + title:'状态',
  69 + titleCode:'recordResult',
  70 + typeList:[
  71 + {
  72 + checked:true,
  73 + name:'全部',
  74 + code:''
  75 + },
  76 + {
  77 + checked:false,
  78 + name:'正常',
  79 + code:'true'
  80 + },
  81 + {
  82 + checked:false,
  83 + name:'异常',
  84 + code:'false'
  85 + },
  86 +
  87 + ]
  88 + },
  89 + {
  90 + title:'巡检日期',
  91 + isDate:true,
  92 + startDate:'startTime',
  93 + endDate:'endTime',
  94 + range:[]
  95 + },
  96 +
  97 + ]
  98 +
  99 + };
  100 + },
  101 + onLoad(e) {
  102 + // 隐藏原生的tabbar
  103 + uni.hideTabBar();
  104 + if (getApp().getBindNot()) {
  105 + return
  106 + }
  107 + },
  108 + onShow() {
  109 + this.$nextTick(()=>{
  110 + uni.setNavigationBarTitle({
  111 + title:this.$t('menu.patrolRecord')
  112 + })
  113 + })
  114 + if (getApp().getBindNot()) {
  115 + return
  116 + }
  117 + this.page.num = 1
  118 + this.loadData(this.page.num);
  119 + },
  120 + methods: {
  121 +
  122 + //输入框查询
  123 + inputChanged(e) {
  124 + if (getApp().getBindNot()) {
  125 + return
  126 + }
  127 + this.page.num = 1;
  128 + this.inspectionPlanName = e;
  129 + this.loadData(1);
  130 + },
  131 + //筛选弹窗重置操作
  132 + resetQuery() {
  133 + this.$refs.devicePopupRef.resetFilter()
  134 + this.recordResult = ''
  135 + this.startTime = ''
  136 + this.endTime = ''
  137 + },
  138 + //筛选弹窗确认操作
  139 + getQueryCondition(value) {
  140 +
  141 + this.page.num = 1;
  142 + this.recordResult = value.recordResult
  143 + this.startTime = value.startTime
  144 + this.endTime = value.endTime
  145 + this.loadData(this.page.num, value);
  146 + this.close()
  147 + },
  148 + //下拉刷新
  149 + downCallback() {
  150 + if (getApp().getBindNot()) {
  151 + setTimeout(() => {
  152 + this.mescroll.endByPage(0, 0)
  153 + }, 200)
  154 + return
  155 + }
  156 + this.list = [];
  157 + this.page.num = 1;
  158 + this.loadData(this.page.num);
  159 + this.resetQuery();
  160 + },
  161 + //上拉加载
  162 + upCallback() {
  163 + if (getApp().getBindNot()) {
  164 + setTimeout(() => {
  165 + this.mescroll.endByPage(0, 0)
  166 + }, 200)
  167 + return
  168 + }
  169 + this.page.num += 1;
  170 + this.loadData(this.page.num);
  171 + },
  172 + //获取列表
  173 + async loadData(pageNo,params={}) {
  174 + try {
  175 + let httpData = {
  176 + page: pageNo,
  177 + pageSize: 10,
  178 + inspectionPlanId:this.inspectionPlanId, //巡检计划id
  179 + inspectionPlanName:this.inspectionPlanName, //巡检计划名称
  180 + inspectorId:this.inspectorId,//巡检员id
  181 + startTime:this.startTime, //开始时间
  182 + endTime:this.endTime, //结束时间
  183 + recordResult:this.recordResult//巡检结果,
  184 +
  185 + };
  186 + const {
  187 + total,
  188 + items
  189 + } = await api.deviceInspectApi.getPatrolRecordListApi(httpData)
  190 + let data = items
  191 + let newList = data.map((item)=>{
  192 +
  193 + return {
  194 + id:item.id,
  195 + title:item.code,
  196 + status:item.recordResult ? inspectionResult[item.recordResult].name : '',
  197 + iconUrl:item.recordResult ? inspectionResult[item.recordResult].iconUrl : '',
  198 + color:item.recordResult ? inspectionResult[item.recordResult].color : '',
  199 + child:[
  200 + {
  201 + label:'deviceInspect.patrolPlan',
  202 + name:item.tkInspectionPlanDTO ? item.tkInspectionPlanDTO.name :''
  203 + },
  204 + {
  205 + label:'deviceInspect.patrolByName',
  206 + name:item.userDTO ? item.userDTO.realName : ''
  207 + },
  208 + {
  209 + label:'deviceInspect.checkDate',
  210 + name:item.checkDate
  211 + },
  212 + ],
  213 + detail:{
  214 + ...item
  215 + }
  216 + }
  217 + })
  218 +
  219 + uni.stopPullDownRefresh();
  220 + this.mescroll.endByPage(items.length); //必传参数(当前页的数据个数, 总页数)
  221 + if (pageNo == 1) {
  222 + this.list = newList;
  223 + } else {
  224 + this.list = this.list.concat(newList);
  225 + }
  226 +
  227 +
  228 +
  229 + } catch {
  230 + this.mescroll.endErr();
  231 + }
  232 + },
  233 +
  234 + //打开筛选弹框
  235 + openSearchDialog() {
  236 + if (getApp().getBindNot()) {
  237 + uni.$u.toast(this.$t('deviceMangement.pleaseBindAccount'))
  238 + return
  239 + }
  240 + this.show = true;
  241 + },
  242 +
  243 + //关闭筛选弹框
  244 + close() {
  245 + this.show = false;
  246 + },
  247 +
  248 + //列表详情
  249 + openDeviceDetail(values) {
  250 + const { id } = values || {}
  251 + uni.navigateTo({
  252 + url: `/deviceInspect-subpackage/patrolRecord-detail/patrolRecord-detail?id=${id}`
  253 + });
  254 + },
  255 + }
  256 +};
  257 +</script>
  258 +
  259 +<style lang="scss" scoped>
  260 +.faultCause-page {
  261 + min-height: 100vh;
  262 + background-color: #f8f9fa;
  263 +}
  264 +
  265 +.device-top {
  266 + padding: 10rpx 30rpx;
  267 + background-color: #fff;
  268 +
  269 + .search {
  270 + display: flex;
  271 + justify-content: space-between;
  272 + padding-bottom: 10rpx;
  273 +
  274 + .search-left {
  275 + width: 580rpx;
  276 + background-color: #f8f9fa;
  277 + border-radius: 200rpx;
  278 + }
  279 +
  280 + .search-right {
  281 + display: flex;
  282 + align-items: center;
  283 +
  284 + text {
  285 + color: #333;
  286 + font-size: 14px;
  287 + }
  288 +
  289 + image {
  290 + width: 40rpx;
  291 + height: 40rpx;
  292 + }
  293 + }
  294 + }
  295 +}
  296 +</style>
... ...
  1 +<template>
  2 + <view class="org-content">
  3 + <!-- 公共组件-每个页面必须引入 -->
  4 + <public-module></public-module>
  5 + <view>
  6 + <luyj-tree @sendValue="confirm" :is-check="isCheck" :search-placeholder="$t('common.pleaseEnterContent')" :search-if="true" v-slot:default="{ item }" :max="max" :trees="tree">
  7 + <view>
  8 + <view class="content-item">
  9 + <view class="word">{{ item.name }}</view>
  10 + </view>
  11 + </view>
  12 + </luyj-tree>
  13 + <mescroll-empty v-if="!tree.length" />
  14 + </view>
  15 + </view>
  16 +</template>
  17 +
  18 +<script>
  19 +import { transOrgFunc } from '@/config/common.js';
  20 +import api from '@/api/index.js'
  21 +
  22 +export default {
  23 + data() {
  24 + return {
  25 + isCheck: true, // 是否可选
  26 + tree: [],
  27 + max: 5,
  28 + id: ''
  29 + };
  30 + },
  31 + onShow(){
  32 + uni.setNavigationBarTitle({
  33 + title:this.$t('menu.organizationScreening')
  34 + })
  35 + },
  36 + onLoad(e) {
  37 + // 隐藏原生的tabbar
  38 + uni.hideTabBar();
  39 + this.loadData();
  40 + },
  41 + methods: {
  42 + async loadData() {
  43 + const res = await api.deviceManagementApi.getDeviceTypeApi({name:''})
  44 + if (res) {
  45 + const list = transOrgFunc(res);
  46 + this.tree = list;
  47 + }
  48 + },
  49 + confirm(val) {
  50 + this.id = val[0].id;
  51 + let pages = getCurrentPages(); //获取所有页面栈实例列表
  52 + let nowPage = pages[pages.length - 1]; //当前页页面实例
  53 + let prevPage = pages[pages.length - 2]; //上一页页面实例
  54 + prevPage.$vm.categoryId = this.id;
  55 + uni.navigateBack({
  56 + delta: 1
  57 + });
  58 + }
  59 + }
  60 +};
  61 +</script>
  62 +
  63 +<style lang="scss" scoped>
  64 +.org-content {
  65 + padding: 0 10rpx;
  66 +}
  67 +</style>
... ...
  1 +const faultDevice = {
  2 + 'ENABLE':{
  3 + color:'#377DFF',
  4 + name:'启用',
  5 + iconUrl:'/static/online.png'
  6 + },
  7 + 'DISABLE':{
  8 + color:'#DE4437',
  9 + name:'停用',
  10 + iconUrl:'/static/baojing.png'
  11 + }
  12 +}
  13 +
  14 +const schemeType = {
  15 + 'INSPECTION':{
  16 + name:'巡检方案',
  17 + },
  18 + 'MAINTENANCE':{
  19 + name:'保养方案',
  20 + }
  21 +}
  22 +
  23 +const ledgerType = {
  24 + 'FAULT':{
  25 + name:'故障',
  26 + color:'#DE4437',
  27 + iconUrl:'/static/danger.png'
  28 + },
  29 + 'NORMAL':{
  30 + name:'正常',
  31 + color:'#377DFF',
  32 + iconUrl:'/static/online.png'
  33 + },
  34 + 'SCRAP':{
  35 + name:'报废',
  36 + color:'#666666',
  37 + iconUrl:'/static/unonline.png'
  38 + }
  39 +}
  40 +
  41 +export {
  42 + faultDevice,
  43 + schemeType,
  44 + ledgerType
  45 +}
... ...
  1 +<template>
  2 + <view class="faultCause-page">
  3 + <!-- 头部 -->
  4 + <header-searchNoOrg @openSearchDialog="openSearchDialog">
  5 + <!-- 不能写在封装组件里传placeholder,mp-wenxin端编译要报错 -->
  6 + <u--input prefixIcon="search" :placeholder="$t('deviceMangement.pleaseEnterFaultName')" shape="circle"
  7 + @change="inputChanged">
  8 + </u--input>
  9 + </header-searchNoOrg>
  10 + <!-- 列表分页 -->
  11 + <mescroll-body ref="mescrollRef" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback"
  12 + @up="upCallback">
  13 + <page-list :list="list" @openDeviceDetail="openDeviceDetail"></page-list>
  14 + <mescroll-empty v-if="!list.length" />
  15 + </mescroll-body>
  16 + <view style="height: 20rpx"></view>
  17 + <!-- 筛选 -->
  18 + <filter-popup ref="devicePopupRef" :filterList="filterList" :filterName="filterName" :show="show" @close="close" @queryCondition="getQueryCondition" ></filter-popup>
  19 + </view>
  20 +</template>
  21 +
  22 +<script>
  23 +import headerSearchNoOrg from '@/components/common/header-searchNoOrg.vue';
  24 +import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js';
  25 +import api from '@/api/index.js'
  26 +import {
  27 + useNavigateTo
  28 +} from '@/plugins/utils.js'
  29 +import pageList from '@/components/common/page-list'
  30 +import filterPopup from '@/components/common/filter-popup.vue'
  31 +import {faultDevice} from '../enum/index.js'
  32 +
  33 +export default {
  34 + mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
  35 + components: {
  36 + pageList,
  37 + filterPopup,
  38 + headerSearchNoOrg
  39 + },
  40 + data() {
  41 + return {
  42 + downOption: {
  43 + auto: false //是否在初始化后,自动执行downCallback; 默认true
  44 + },
  45 + upOption: {
  46 + isBounce: false,
  47 + auto: false // 不自动加载
  48 + },
  49 + show: false,
  50 + list: [],
  51 + page: {
  52 + num: 0,
  53 + size: 10
  54 + },
  55 + code:'', //故障编码
  56 + reason: '', //故障名称
  57 + status:'', //故障状态
  58 + filterName:{ //筛选的字段
  59 + status:''
  60 + },
  61 + filterList:[ //筛选弹框字段
  62 + {
  63 + title:'状态',
  64 + titleCode:'status',
  65 + typeList:[
  66 + {
  67 + checked:true,
  68 + name:'全部',
  69 + code:''
  70 + },
  71 + {
  72 + checked:false,
  73 + name:'启用',
  74 + code:'ENABLE'
  75 + },
  76 + {
  77 + checked:false,
  78 + name:'停用',
  79 + code:'DISABLE'
  80 + }
  81 + ]
  82 + },
  83 +
  84 + ]
  85 +
  86 + };
  87 + },
  88 + onLoad(e) {
  89 + // 隐藏原生的tabbar
  90 + uni.hideTabBar();
  91 + if (getApp().getBindNot()) {
  92 + return
  93 + }
  94 + },
  95 + onShow() {
  96 + this.$nextTick(()=>{
  97 + uni.setNavigationBarTitle({
  98 + title:this.$t('menu.faultCause')
  99 + })
  100 + })
  101 + if (getApp().getBindNot()) {
  102 + return
  103 + }
  104 + this.page.num = 1
  105 + this.loadData(this.page.num);
  106 + },
  107 + methods: {
  108 +
  109 + //输入框查询
  110 + inputChanged(e) {
  111 + if (getApp().getBindNot()) {
  112 + return
  113 + }
  114 + this.page.num = 1;
  115 + this.reason = e;
  116 + this.loadData(1);
  117 + },
  118 + //筛选弹窗重置操作
  119 + resetQuery() {
  120 + this.$refs.devicePopupRef.resetFilter()
  121 + this.status = ''
  122 + },
  123 + //筛选弹窗确认操作
  124 + getQueryCondition(value) {
  125 + this.page.num = 1;
  126 + this.status = value.status
  127 + this.loadData(this.page.num, value);
  128 + this.close()
  129 + },
  130 + //下拉刷新
  131 + downCallback() {
  132 + if (getApp().getBindNot()) {
  133 + setTimeout(() => {
  134 + this.mescroll.endByPage(0, 0)
  135 + }, 200)
  136 + return
  137 + }
  138 + this.list = [];
  139 + this.page.num = 1;
  140 + this.loadData(this.page.num);
  141 + this.resetQuery();
  142 + },
  143 + //上拉加载
  144 + upCallback() {
  145 + if (getApp().getBindNot()) {
  146 + setTimeout(() => {
  147 + this.mescroll.endByPage(0, 0)
  148 + }, 200)
  149 + return
  150 + }
  151 + this.page.num += 1;
  152 + this.loadData(this.page.num);
  153 + },
  154 + //获取故障原因列表
  155 + async loadData(pageNo,params={}) {
  156 + try {
  157 + let httpData = {
  158 + page: pageNo,
  159 + pageSize: 10,
  160 + };
  161 + const httpPostData = {
  162 + code:this.code,
  163 + reason:this.reason,
  164 + status:this.status,
  165 + ...params
  166 + }
  167 + const {
  168 + total,
  169 + items
  170 + } = await api.deviceManagementApi.getFaultListApi(httpData, httpPostData)
  171 +
  172 + let data = items
  173 + let newList = data.map((item)=>{
  174 + return {
  175 + id:item.id,
  176 + title:item.reason,
  177 + status:item.status ? faultDevice[item.status].name : '',
  178 + iconUrl:item.status ? faultDevice[item.status].iconUrl : '',
  179 + color:item.status ? faultDevice[item.status].color : '',
  180 + child:[
  181 + {
  182 + label:'deviceMangement.recordNumber',
  183 + name:item.code
  184 + },
  185 + {
  186 + label:'deviceMangement.faultName',
  187 + name:item.reason
  188 + },
  189 + ],
  190 + detail:{
  191 + ...item
  192 + }
  193 + }
  194 + })
  195 + uni.stopPullDownRefresh();
  196 + this.mescroll.endByPage(items.length); //必传参数(当前页的数据个数, 总页数)
  197 + if (pageNo == 1) {
  198 + this.list = newList;
  199 + } else {
  200 + this.list = this.list.concat(newList);
  201 + }
  202 +
  203 +
  204 + } catch {
  205 + this.mescroll.endErr();
  206 + }
  207 + },
  208 +
  209 + //打开筛选弹框
  210 + openSearchDialog() {
  211 + if (getApp().getBindNot()) {
  212 + uni.$u.toast(this.$t('deviceMangement.pleaseBindAccount'))
  213 + return
  214 + }
  215 + this.show = true;
  216 + },
  217 +
  218 + //关闭筛选弹框
  219 + close() {
  220 + this.show = false;
  221 + },
  222 +
  223 + //列表详情
  224 + openDeviceDetail(values) {
  225 + const { id } = values || {}
  226 + uni.navigateTo({
  227 + url: `/deviceManagement-subpackage/faultCause-detail/faultCause-detail?id=${id}`
  228 + });
  229 + },
  230 + }
  231 +};
  232 +</script>
  233 +
  234 +<style lang="scss" scoped>
  235 +.faultCause-page {
  236 + min-height: 100vh;
  237 + background-color: #f8f9fa;
  238 +}
  239 +
  240 +.device-top {
  241 + padding: 10rpx 30rpx;
  242 + background-color: #fff;
  243 +
  244 + .search {
  245 + display: flex;
  246 + justify-content: space-between;
  247 + padding-bottom: 10rpx;
  248 +
  249 + .search-left {
  250 + width: 580rpx;
  251 + background-color: #f8f9fa;
  252 + border-radius: 200rpx;
  253 + }
  254 +
  255 + .search-right {
  256 + display: flex;
  257 + align-items: center;
  258 +
  259 + text {
  260 + color: #333;
  261 + font-size: 14px;
  262 + }
  263 +
  264 + image {
  265 + width: 40rpx;
  266 + height: 40rpx;
  267 + }
  268 + }
  269 + }
  270 +}
  271 +</style>
... ...
  1 +<template>
  2 + <view class="faultCause-page">
  3 + <!-- 头部 -->
  4 + <header-searchNoOrg @openSearchDialog="openSearchDialog">
  5 + <!-- 不能写在封装组件里传placeholder,mp-wenxin端编译要报错 -->
  6 + <u--input prefixIcon="search" :placeholder="$t('deviceMangement.pleaseEnterSchemeName')" shape="circle"
  7 + @change="inputChanged">
  8 + </u--input>
  9 + </header-searchNoOrg>
  10 + <!-- 列表分页 -->
  11 + <mescroll-body ref="mescrollRef" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback"
  12 + @up="upCallback">
  13 + <page-list :list="list" @openDeviceDetail="openDeviceDetail"></page-list>
  14 + <mescroll-empty v-if="!list.length" />
  15 + </mescroll-body>
  16 + <view style="height: 20rpx"></view>
  17 + <!-- 筛选 -->
  18 + <filter-popup ref="devicePopupRef" :filterList="filterList" :filterName="filterName" :show="show" @close="close" @queryCondition="getQueryCondition" ></filter-popup>
  19 + </view>
  20 +</template>
  21 +
  22 +<script>
  23 +import headerSearchNoOrg from '@/components/common/header-searchNoOrg.vue';
  24 +import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js';
  25 +import api from '@/api/index.js'
  26 +import {
  27 + useNavigateTo
  28 +} from '@/plugins/utils.js'
  29 +import pageList from '@/components/common/page-list'
  30 +import filterPopup from '@/components/common/filter-popup.vue'
  31 +import {faultDevice,schemeType} from '../enum/index.js'
  32 +
  33 +export default {
  34 + mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
  35 + components: {
  36 + pageList,
  37 + filterPopup,
  38 + headerSearchNoOrg
  39 + },
  40 + data() {
  41 + return {
  42 + downOption: {
  43 + auto: false //是否在初始化后,自动执行downCallback; 默认true
  44 + },
  45 + upOption: {
  46 + isBounce: false,
  47 + auto: false // 不自动加载
  48 + },
  49 + show: false,
  50 + list: [],
  51 + page: {
  52 + num: 0,
  53 + size: 10
  54 + },
  55 + name:'', //方案名称
  56 + type:'', //方案类型
  57 + status:'', //方案类型
  58 + filterName:{ //筛选的字段
  59 + status:'',
  60 + type:''
  61 + },
  62 + filterList:[ //筛选弹框字段
  63 + {
  64 + title:'状态',
  65 + titleCode:'status',
  66 + typeList:[
  67 + {
  68 + checked:true,
  69 + name:'全部',
  70 + code:''
  71 + },
  72 + {
  73 + checked:false,
  74 + name:'启用',
  75 + code:'ENABLE'
  76 + },
  77 + {
  78 + checked:false,
  79 + name:'停用',
  80 + code:'DISABLE'
  81 + }
  82 + ]
  83 + },
  84 + {
  85 + title:'方案类型',
  86 + titleCode:'type',
  87 + typeList:[
  88 + {
  89 + checked:true,
  90 + name:'全部',
  91 + code:''
  92 + },
  93 + {
  94 + checked:false,
  95 + name:'巡检方案',
  96 + code:'INSPECTION'
  97 + },
  98 + {
  99 + checked:false,
  100 + name:'保养方案',
  101 + code:'MAINTENANCE'
  102 + }
  103 + ]
  104 + },
  105 +
  106 + ]
  107 +
  108 + };
  109 + },
  110 + onLoad(e) {
  111 + // 隐藏原生的tabbar
  112 + uni.hideTabBar();
  113 + if (getApp().getBindNot()) {
  114 + return
  115 + }
  116 + },
  117 + onShow() {
  118 + this.$nextTick(()=>{
  119 + uni.setNavigationBarTitle({
  120 + title:this.$t('menu.inspectionPlan')
  121 + })
  122 + })
  123 + if (getApp().getBindNot()) {
  124 + return
  125 + }
  126 + this.page.num = 1
  127 + this.loadData(this.page.num);
  128 + },
  129 + methods: {
  130 +
  131 + //输入框查询
  132 + inputChanged(e) {
  133 + if (getApp().getBindNot()) {
  134 + return
  135 + }
  136 + this.page.num = 1;
  137 + this.name = e;
  138 + this.loadData(1);
  139 + },
  140 + //筛选弹窗重置操作
  141 + resetQuery() {
  142 + this.$refs.devicePopupRef.resetFilter()
  143 + this.status = ''
  144 + this.type = ''
  145 + },
  146 + //筛选弹窗确认操作
  147 + getQueryCondition(value) {
  148 + this.page.num = 1;
  149 + this.type = value.type
  150 + this.status = value.status
  151 + this.loadData(this.page.num);
  152 + this.close()
  153 + },
  154 + //下拉刷新
  155 + downCallback() {
  156 + if (getApp().getBindNot()) {
  157 + setTimeout(() => {
  158 + this.mescroll.endByPage(0, 0)
  159 + }, 200)
  160 + return
  161 + }
  162 + this.list = [];
  163 + this.page.num = 1;
  164 + this.loadData(this.page.num);
  165 + this.resetQuery();
  166 + },
  167 + //上拉加载
  168 + upCallback() {
  169 + if (getApp().getBindNot()) {
  170 + setTimeout(() => {
  171 + this.mescroll.endByPage(0, 0)
  172 + }, 200)
  173 + return
  174 + }
  175 + this.page.num += 1;
  176 + this.loadData(this.page.num);
  177 + },
  178 + //获取故障原因列表
  179 + async loadData(pageNo) {
  180 + try {
  181 + let httpData = {
  182 + page: pageNo,
  183 + pageSize: 10,
  184 + type:this.type,
  185 + name:this.name,
  186 + status:this.status,
  187 + };
  188 + const {
  189 + total,
  190 + items
  191 + } = await api.deviceManagementApi.getCheckPlanApi(httpData)
  192 + let data = items
  193 + let newList = data.map((item)=>{
  194 + return {
  195 + id:item.id,
  196 + title:item.name,
  197 + status:item.status ? faultDevice[item.status].name : '',
  198 + iconUrl:item.status ? faultDevice[item.status].iconUrl : '',
  199 + color:item.status ? faultDevice[item.status].color : '',
  200 + child:[
  201 + {
  202 + label:'deviceMangement.schemeCode',
  203 + name:item.code
  204 + },
  205 + {
  206 + label:'deviceMangement.schemeName',
  207 + name:item.name
  208 + },
  209 + {
  210 + label:'deviceMangement.schemeType',
  211 + name:schemeType[item.type].name
  212 + },
  213 + {
  214 + label:'deviceMangement.schemeDetails',
  215 + name:item.planDetails
  216 + }
  217 + ],
  218 + detail:{
  219 + ...item
  220 + }
  221 + }
  222 + })
  223 + uni.stopPullDownRefresh();
  224 + this.mescroll.endByPage(items.length); //必传参数(当前页的数据个数, 总页数)
  225 + if (pageNo == 1) {
  226 + this.list = newList;
  227 + } else {
  228 + this.list = this.list.concat(newList);
  229 + }
  230 +
  231 +
  232 + } catch {
  233 + this.mescroll.endErr();
  234 + }
  235 + },
  236 +
  237 + //打开筛选弹框
  238 + openSearchDialog() {
  239 + if (getApp().getBindNot()) {
  240 + uni.$u.toast(this.$t('deviceMangement.pleaseBindAccount'))
  241 + return
  242 + }
  243 + this.show = true;
  244 + },
  245 +
  246 + //关闭筛选弹框
  247 + close() {
  248 + this.show = false;
  249 + },
  250 +
  251 + //列表详情
  252 + openDeviceDetail(values) {
  253 + const { id } = values || {}
  254 + uni.navigateTo({
  255 + url: `/deviceManagement-subpackage/inspectionPlan-detail/inspectionPlan-detail?id=${id}`
  256 + });
  257 + },
  258 + }
  259 +};
  260 +</script>
  261 +
  262 +<style lang="scss" scoped>
  263 +.faultCause-page {
  264 + min-height: 100vh;
  265 + background-color: #f8f9fa;
  266 +}
  267 +
  268 +.device-top {
  269 + padding: 10rpx 30rpx;
  270 + background-color: #fff;
  271 +
  272 + .search {
  273 + display: flex;
  274 + justify-content: space-between;
  275 + padding-bottom: 10rpx;
  276 +
  277 + .search-left {
  278 + width: 580rpx;
  279 + background-color: #f8f9fa;
  280 + border-radius: 200rpx;
  281 + }
  282 +
  283 + .search-right {
  284 + display: flex;
  285 + align-items: center;
  286 +
  287 + text {
  288 + color: #333;
  289 + font-size: 14px;
  290 + }
  291 +
  292 + image {
  293 + width: 40rpx;
  294 + height: 40rpx;
  295 + }
  296 + }
  297 + }
  298 +}
  299 +</style>
... ...
  1 +<template>
  2 + <view class="faultCause-page">
  3 + <!-- 头部 -->
  4 + <header-searchNoOrg @openOrg="openOrg" @openSearchDialog="openSearchDialog" :isShowTree="true" :title="$t('deviceMangement.deviceType')" :totalText="'设备数'" :total="total">
  5 + <!-- 不能写在封装组件里传placeholder,mp-wenxin端编译要报错 -->
  6 + <u--input prefixIcon="search" :placeholder="$t('deviceMangement.pleaseEnterDeviceCode')" shape="circle"
  7 + @change="inputChanged">
  8 + </u--input>
  9 + </header-searchNoOrg>
  10 + <!-- 列表分页 -->
  11 + <mescroll-body ref="mescrollRef" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback"
  12 + @up="upCallback">
  13 + <page-list :list="list" @openDeviceDetail="openDeviceDetail"></page-list>
  14 + <mescroll-empty v-if="!list.length" />
  15 + </mescroll-body>
  16 + <view style="height: 20rpx"></view>
  17 + <!-- 筛选 -->
  18 + <filter-popup ref="devicePopupRef" :filterList="filterList" :filterName="filterName" :show="show" @close="close" @queryCondition="getQueryCondition" ></filter-popup>
  19 + </view>
  20 +</template>
  21 +
  22 +<script>
  23 +import headerSearchNoOrg from '@/components/common/header-searchNoOrg.vue';
  24 +import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js';
  25 +import api from '@/api/index.js'
  26 +import {
  27 + useNavigateTo
  28 +} from '@/plugins/utils.js'
  29 +import pageList from '@/components/common/page-list'
  30 +import filterPopup from '@/components/common/filter-popup.vue'
  31 +import {ledgerType} from '../enum/index.js'
  32 +
  33 +export default {
  34 + mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
  35 + components: {
  36 + pageList,
  37 + filterPopup,
  38 + headerSearchNoOrg
  39 + },
  40 + data() {
  41 + return {
  42 + downOption: {
  43 + auto: false //是否在初始化后,自动执行downCallback; 默认true
  44 + },
  45 + upOption: {
  46 + isBounce: false,
  47 + auto: false // 不自动加载
  48 + },
  49 + show: false,
  50 + list: [],
  51 + total:0,
  52 + page: {
  53 + num: 0,
  54 + size: 10
  55 + },
  56 + code:'', //设备编码
  57 + categoryId: '', //设备类别id
  58 + directorId:'', //负责人id
  59 + status:'', //状态
  60 + filterName:{ //筛选的字段
  61 + status:''
  62 + },
  63 + filterList:[ //筛选弹框字段
  64 + {
  65 + title:'状态',
  66 + titleCode:'status',
  67 + typeList:[
  68 + {
  69 + checked:true,
  70 + name:'全部',
  71 + code:''
  72 + },
  73 + {
  74 + checked:false,
  75 + name:'故障',
  76 + code:'FAULT'
  77 + },
  78 + {
  79 + checked:false,
  80 + name:'正常',
  81 + code:'NORMAL'
  82 + },
  83 + {
  84 + checked:false,
  85 + name:'报废',
  86 + code:'SCRAP'
  87 + }
  88 + ]
  89 + },
  90 +
  91 + ]
  92 +
  93 + };
  94 + },
  95 + onLoad(e) {
  96 + // 隐藏原生的tabbar
  97 + uni.hideTabBar();
  98 + if (getApp().getBindNot()) {
  99 + return
  100 + }
  101 + },
  102 + onShow() {
  103 + this.$nextTick(()=>{
  104 + uni.setNavigationBarTitle({
  105 + title:this.$t('menu.deviceLedger')
  106 + })
  107 + })
  108 + if (getApp().getBindNot()) {
  109 + return
  110 + }
  111 + this.page.num = 1
  112 + this.loadData(this.page.num);
  113 + },
  114 + methods: {
  115 +
  116 + //输入框查询
  117 + inputChanged(e) {
  118 + if (getApp().getBindNot()) {
  119 + return
  120 + }
  121 + this.page.num = 1;
  122 + this.code = e;
  123 + this.loadData(1);
  124 + },
  125 + //筛选弹窗重置操作
  126 + resetQuery() {
  127 + this.$refs.devicePopupRef.resetFilter()
  128 + this.status = ''
  129 + },
  130 + //筛选弹窗确认操作
  131 + getQueryCondition(value) {
  132 + this.page.num = 1;
  133 + this.status = value.status
  134 + this.loadData(this.page.num, value);
  135 + this.close()
  136 + },
  137 + //下拉刷新
  138 + downCallback() {
  139 + if (getApp().getBindNot()) {
  140 + setTimeout(() => {
  141 + this.mescroll.endByPage(0, 0)
  142 + }, 200)
  143 + return
  144 + }
  145 + this.list = [];
  146 + this.page.num = 1;
  147 + this.loadData(this.page.num);
  148 + this.resetQuery();
  149 + },
  150 + //上拉加载
  151 + upCallback() {
  152 + if (getApp().getBindNot()) {
  153 + setTimeout(() => {
  154 + this.mescroll.endByPage(0, 0)
  155 + }, 200)
  156 + return
  157 + }
  158 + this.page.num += 1;
  159 + this.loadData(this.page.num);
  160 + },
  161 + //获取故障原因列表
  162 + async loadData(pageNo,params={}) {
  163 + try {
  164 + let httpData = {
  165 + page: pageNo,
  166 + pageSize: 10,
  167 + };
  168 + const httpPostData = {
  169 + code:this.code,
  170 + categoryId:this.categoryId,
  171 + status:this.status,
  172 + directorId:this.directorId,
  173 + ...params
  174 + }
  175 + const {
  176 + total,
  177 + items
  178 + } = await api.deviceManagementApi.getLedgerListApi(httpData, httpPostData)
  179 + this.total = total
  180 + let data = items
  181 + let newList = data.map((item)=>{
  182 + return {
  183 + id:item.id,
  184 + title:item.code,
  185 + status:item.status ? ledgerType[item.status].name : '',
  186 + iconUrl:item.status ? ledgerType[item.status].iconUrl : '',
  187 + color:item.status ? ledgerType[item.status].color : '',
  188 + child:[
  189 + {
  190 + label:'deviceMangement.deviceName',
  191 + name:item.name
  192 + },
  193 + {
  194 + label:'deviceMangement.deviceType',
  195 + name:item.categoryName
  196 + },
  197 + {
  198 + label:'deviceMangement.brand',
  199 + name:item.brand
  200 + },
  201 + {
  202 + label:'deviceMangement.directorName',
  203 + name:item.directorName
  204 + },
  205 + ],
  206 + detail:{
  207 + ...item
  208 + }
  209 + }
  210 + })
  211 + uni.stopPullDownRefresh();
  212 + this.mescroll.endByPage(items.length); //必传参数(当前页的数据个数, 总页数)
  213 + if (pageNo == 1) {
  214 + this.list = newList;
  215 + } else {
  216 + this.list = this.list.concat(newList);
  217 + }
  218 +
  219 +
  220 + } catch {
  221 + this.mescroll.endErr();
  222 + }
  223 + },
  224 +
  225 + //打开筛选弹框
  226 + openSearchDialog() {
  227 + if (getApp().getBindNot()) {
  228 + uni.$u.toast(this.$t('deviceMangement.pleaseBindAccount'))
  229 + return
  230 + }
  231 + this.show = true;
  232 + },
  233 +
  234 + //关闭筛选弹框
  235 + close() {
  236 + this.show = false;
  237 + },
  238 +
  239 + //列表详情
  240 + openDeviceDetail(values) {
  241 + const { id } = values || {}
  242 + uni.navigateTo({
  243 + url: `/deviceManagement-subpackage/ledger-detail/ledger-detail?id=${id}`
  244 + });
  245 + },
  246 +
  247 + openOrg() {
  248 + if (getApp().getBindNot()) {
  249 + uni.$u.toast(this.$t('device.pleaseBindAccount'))
  250 + return
  251 + }
  252 + useNavigateTo('/pages/deviceManagement/deviceType/deviceType')
  253 + },
  254 + }
  255 +};
  256 +</script>
  257 +
  258 +<style lang="scss" scoped>
  259 +.faultCause-page {
  260 + min-height: 100vh;
  261 + background-color: #f8f9fa;
  262 +}
  263 +
  264 +.device-top {
  265 + padding: 10rpx 30rpx;
  266 + background-color: #fff;
  267 +
  268 + .search {
  269 + display: flex;
  270 + justify-content: space-between;
  271 + padding-bottom: 10rpx;
  272 +
  273 + .search-left {
  274 + width: 580rpx;
  275 + background-color: #f8f9fa;
  276 + border-radius: 200rpx;
  277 + }
  278 +
  279 + .search-right {
  280 + display: flex;
  281 + align-items: center;
  282 +
  283 + text {
  284 + color: #333;
  285 + font-size: 14px;
  286 + }
  287 +
  288 + image {
  289 + width: 40rpx;
  290 + height: 40rpx;
  291 + }
  292 + }
  293 + }
  294 +}
  295 +</style>
... ...
  1 +const repairType = {
  2 + 'SCHEDULING':{
  3 + color:'#FFD700',
  4 + name:'排期中',
  5 + iconUrl:'/static/time.png'
  6 + },
  7 + 'REPAIRFINISH':{
  8 + color:'#666666',
  9 + name:'维修完成',
  10 + iconUrl:'/static/unonline.png'
  11 +
  12 + },
  13 + 'ACCEPTANCEPASSED':{
  14 + color:'#377DFF',
  15 + name:'验收通过',
  16 + iconUrl:'/static/online.png'
  17 +
  18 + },
  19 +}
  20 +
  21 +
  22 +export {
  23 + repairType
  24 +}
... ...
  1 +<template>
  2 + <view class="faultCause-page">
  3 + <!-- 头部 -->
  4 + <header-searchNoOrg @openSearchDialog="openSearchDialog" :isShowSelect="false" :width="700">
  5 + <!-- 不能写在封装组件里传placeholder,mp-wenxin端编译要报错 -->
  6 + <u--input prefixIcon="search" :placeholder="$t('deviceRepair.pleaseOrderCodeName')" shape="circle"
  7 + @change="inputChanged">
  8 + </u--input>
  9 + </header-searchNoOrg>
  10 + <!-- 列表分页 -->
  11 + <mescroll-body ref="mescrollRef" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback"
  12 + @up="upCallback">
  13 + <page-list :list="list" @openDeviceDetail="openDeviceDetail"></page-list>
  14 + <mescroll-empty v-if="!list.length" />
  15 + </mescroll-body>
  16 + <view style="height: 20rpx"></view>
  17 + <!-- 筛选 -->
  18 + <!-- <filter-popup ref="devicePopupRef" :filterList="filterList" :filterName="filterName" :show="show" @close="close" @queryCondition="getQueryCondition" ></filter-popup> -->
  19 + </view>
  20 +</template>
  21 +
  22 +<script>
  23 +import headerSearchNoOrg from '@/components/common/header-searchNoOrg.vue';
  24 +import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js';
  25 +import api from '@/api/index.js'
  26 +import {
  27 + useNavigateTo
  28 +} from '@/plugins/utils.js'
  29 +import pageList from '@/components/common/page-list'
  30 +import filterPopup from '@/components/common/filter-popup.vue'
  31 +import {repairType} from '../enum/index.js'
  32 +
  33 +export default {
  34 + mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
  35 + components: {
  36 + pageList,
  37 + filterPopup,
  38 + headerSearchNoOrg
  39 + },
  40 + data() {
  41 + return {
  42 + downOption: {
  43 + auto: false //是否在初始化后,自动执行downCallback; 默认true
  44 + },
  45 + upOption: {
  46 + isBounce: false,
  47 + auto: false // 不自动加载
  48 + },
  49 + show: false,
  50 + list: [],
  51 + page: {
  52 + num: 0,
  53 + size: 10
  54 + },
  55 + orderCode:'', //工单id
  56 + reportBy:'', //报修人id
  57 + repairBy:'', //维修人id
  58 + deviceId:'', //设备id,
  59 +
  60 + };
  61 + },
  62 + onLoad(e) {
  63 + // 隐藏原生的tabbar
  64 + uni.hideTabBar();
  65 + if (getApp().getBindNot()) {
  66 + return
  67 + }
  68 + },
  69 + onShow() {
  70 + this.$nextTick(()=>{
  71 + uni.setNavigationBarTitle({
  72 + title:this.$t('menu.repairRecord')
  73 + })
  74 + })
  75 + if (getApp().getBindNot()) {
  76 + return
  77 + }
  78 + this.page.num = 1
  79 + this.loadData(this.page.num);
  80 + },
  81 + methods: {
  82 +
  83 + //输入框查询
  84 + inputChanged(e) {
  85 + if (getApp().getBindNot()) {
  86 + return
  87 + }
  88 + this.page.num = 1;
  89 + this.orderCode = e;
  90 + this.loadData(1);
  91 + },
  92 + //筛选弹窗重置操作
  93 + resetQuery() {
  94 + this.$refs.devicePopupRef.resetFilter()
  95 + this.status = ''
  96 + this.emergency = null
  97 + },
  98 + //筛选弹窗确认操作
  99 + getQueryCondition(value) {
  100 + this.page.num = 1;
  101 + this.status = value.status
  102 + this.loadData(this.page.num, value);
  103 + this.close()
  104 + },
  105 + //下拉刷新
  106 + downCallback() {
  107 + if (getApp().getBindNot()) {
  108 + setTimeout(() => {
  109 + this.mescroll.endByPage(0, 0)
  110 + }, 200)
  111 + return
  112 + }
  113 + this.list = [];
  114 + this.page.num = 1;
  115 + this.loadData(this.page.num);
  116 + this.resetQuery();
  117 + },
  118 + //上拉加载
  119 + upCallback() {
  120 + if (getApp().getBindNot()) {
  121 + setTimeout(() => {
  122 + this.mescroll.endByPage(0, 0)
  123 + }, 200)
  124 + return
  125 + }
  126 + this.page.num += 1;
  127 + this.loadData(this.page.num);
  128 + },
  129 + //获取列表
  130 + async loadData(pageNo,params={}) {
  131 + try {
  132 + let httpData = {
  133 + page: pageNo,
  134 + pageSize: 10,
  135 + };
  136 + const httpPostData = {
  137 + orderCode:this.orderCode, //工单id
  138 + reportBy:this.reportBy, //报修人id
  139 + repairBy:this.repairBy, //维修人id
  140 + deviceId:this.deviceId, //设备id
  141 + ...params
  142 + }
  143 + const {
  144 + total,
  145 + items
  146 + } = await api.deviceRepairApi.getRepairRecordApi(httpData, httpPostData)
  147 +
  148 + let data = items
  149 + let newList = data.map((item)=>{
  150 + return {
  151 + id:item.id,
  152 + title:item.code,
  153 + child:[
  154 + {
  155 + label:'deviceRepair.orderCodeName',
  156 + name:item.tkRepairOrderDTO.orderCode || ''
  157 + },
  158 + {
  159 + label:'deviceRepair.repairDevice',
  160 + name:item.deviceAccountName
  161 + },
  162 + {
  163 + label:'deviceRepair.repairDate',
  164 + name:item.repairDate
  165 + },
  166 + {
  167 + label:'deviceRepair.repairName',
  168 + name:item.repairName
  169 + },
  170 + {
  171 + label:'deviceRepair.repairDescription',
  172 + name:item.description
  173 + }
  174 + ],
  175 + detail:{
  176 + ...item
  177 + }
  178 + }
  179 + })
  180 + uni.stopPullDownRefresh();
  181 + this.mescroll.endByPage(items.length); //必传参数(当前页的数据个数, 总页数)
  182 + if (pageNo == 1) {
  183 + this.list = newList;
  184 + } else {
  185 + this.list = this.list.concat(newList);
  186 + }
  187 +
  188 + } catch {
  189 + this.mescroll.endErr();
  190 + }
  191 + },
  192 +
  193 + //打开筛选弹框
  194 + openSearchDialog() {
  195 + if (getApp().getBindNot()) {
  196 + uni.$u.toast(this.$t('deviceMangement.pleaseBindAccount'))
  197 + return
  198 + }
  199 + this.show = true;
  200 + },
  201 +
  202 + //关闭筛选弹框
  203 + close() {
  204 + this.show = false;
  205 + },
  206 +
  207 + //列表详情
  208 + openDeviceDetail(values) {
  209 + const { id } = values || {}
  210 + uni.navigateTo({
  211 + url: `/deviceRepair-subpackage/repairRecord-detail/repairRecord-detail?id=${id}`
  212 + });
  213 + },
  214 + }
  215 +};
  216 +</script>
  217 +
  218 +<style lang="scss" scoped>
  219 +.faultCause-page {
  220 + min-height: 100vh;
  221 + background-color: #f8f9fa;
  222 +}
  223 +
  224 +.device-top {
  225 + padding: 10rpx 30rpx;
  226 + background-color: #fff;
  227 +
  228 + .search {
  229 + display: flex;
  230 + justify-content: space-between;
  231 + padding-bottom: 10rpx;
  232 +
  233 + .search-left {
  234 + width: 580rpx;
  235 + background-color: #f8f9fa;
  236 + border-radius: 200rpx;
  237 + }
  238 +
  239 + .search-right {
  240 + display: flex;
  241 + align-items: center;
  242 +
  243 + text {
  244 + color: #333;
  245 + font-size: 14px;
  246 + }
  247 +
  248 + image {
  249 + width: 40rpx;
  250 + height: 40rpx;
  251 + }
  252 + }
  253 + }
  254 +}
  255 +</style>
... ...
  1 +<template>
  2 + <view class="faultCause-page">
  3 + <!-- 头部 -->
  4 + <header-searchNoOrg @openSearchDialog="openSearchDialog">
  5 + <!-- 不能写在封装组件里传placeholder,mp-wenxin端编译要报错 -->
  6 + <u--input prefixIcon="search" :placeholder="$t('deviceRepair.pleaseDeviceName')" shape="circle"
  7 + @change="inputChanged">
  8 + </u--input>
  9 + </header-searchNoOrg>
  10 + <!-- 列表分页 -->
  11 + <mescroll-body ref="mescrollRef" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback"
  12 + @up="upCallback">
  13 + <page-list :list="list" @openDeviceDetail="openDeviceDetail"></page-list>
  14 + <mescroll-empty v-if="!list.length" />
  15 + </mescroll-body>
  16 + <view style="height: 20rpx"></view>
  17 + <!-- 筛选 -->
  18 + <filter-popup ref="devicePopupRef" :filterList="filterList" :filterName="filterName" :show="show" @close="close" @queryCondition="getQueryCondition" ></filter-popup>
  19 + </view>
  20 +</template>
  21 +
  22 +<script>
  23 +import headerSearchNoOrg from '@/components/common/header-searchNoOrg.vue';
  24 +import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js';
  25 +import api from '@/api/index.js'
  26 +import {
  27 + useNavigateTo
  28 +} from '@/plugins/utils.js'
  29 +import pageList from '@/components/common/page-list'
  30 +import filterPopup from '@/components/common/filter-popup.vue'
  31 +import {repairType} from '../enum/index.js'
  32 +
  33 +export default {
  34 + mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
  35 + components: {
  36 + pageList,
  37 + filterPopup,
  38 + headerSearchNoOrg
  39 + },
  40 + data() {
  41 + return {
  42 + downOption: {
  43 + auto: false //是否在初始化后,自动执行downCallback; 默认true
  44 + },
  45 + upOption: {
  46 + isBounce: false,
  47 + auto: false // 不自动加载
  48 + },
  49 + show: false,
  50 + list: [],
  51 + page: {
  52 + num: 0,
  53 + size: 10
  54 + },
  55 + deviceId:'', //设备id
  56 + startDate: '', //开始时间
  57 + endDate:'', //结束时间
  58 + status:'', //状态
  59 + emergency:null, //是否紧急
  60 + deviceName:'', //设备名称
  61 + filterName:{ //筛选的字段
  62 + status:'',
  63 + emergency:null,
  64 + startDate:'',
  65 + endDate:''
  66 + },
  67 + filterList:[ //筛选弹框字段
  68 + {
  69 + title:'状态',
  70 + titleCode:'status',
  71 + typeList:[
  72 + {
  73 + checked:true,
  74 + name:'全部',
  75 + code:''
  76 + },
  77 + {
  78 + checked:false,
  79 + name:'排期中',
  80 + code:'SCHEDULING'
  81 + },
  82 + {
  83 + checked:false,
  84 + name:'维修完成',
  85 + code:'REPAIRFINISH'
  86 + },
  87 + {
  88 + checked:false,
  89 + name:'验收通过',
  90 + code:'ACCEPTANCEPASSED'
  91 + }
  92 + ]
  93 + },
  94 + {
  95 + title:'是否紧急',
  96 + titleCode:'emergency',
  97 + typeList:[
  98 + {
  99 + checked:true,
  100 + name:'全部',
  101 + code:null
  102 + },
  103 + {
  104 + checked:false,
  105 + name:'是',
  106 + code:true
  107 + },
  108 + {
  109 + checked:false,
  110 + name:'否',
  111 + code:false
  112 + },
  113 + ]
  114 + },
  115 + {
  116 + title:'报修时间',
  117 + isDate:true,
  118 + startDate:'startDate',
  119 + endDate:'endDate',
  120 + range:[]
  121 + }
  122 +
  123 + ]
  124 +
  125 + };
  126 + },
  127 + onLoad(e) {
  128 + // 隐藏原生的tabbar
  129 + uni.hideTabBar();
  130 + if (getApp().getBindNot()) {
  131 + return
  132 + }
  133 + },
  134 + onShow() {
  135 + this.$nextTick(()=>{
  136 + uni.setNavigationBarTitle({
  137 + title:this.$t('menu.repairWorkOrder')
  138 + })
  139 + })
  140 + if (getApp().getBindNot()) {
  141 + return
  142 + }
  143 + this.page.num = 1
  144 + this.loadData(this.page.num);
  145 + },
  146 + methods: {
  147 +
  148 + //输入框查询
  149 + inputChanged(e) {
  150 + if (getApp().getBindNot()) {
  151 + return
  152 + }
  153 + this.page.num = 1;
  154 + this.deviceName = e;
  155 + this.loadData(1);
  156 + },
  157 + //筛选弹窗重置操作
  158 + resetQuery() {
  159 + this.$refs.devicePopupRef.resetFilter()
  160 + this.status = ''
  161 + this.emergency = null
  162 + this.startDate = ''
  163 + this.endDate = ''
  164 + },
  165 + //筛选弹窗确认操作
  166 + getQueryCondition(value) {
  167 + this.page.num = 1;
  168 + this.status = value.status
  169 + this.emergency = value.emergency
  170 + this.startDate = value.startDate
  171 + this.endDate = value.endDate
  172 + this.loadData(this.page.num);
  173 + this.close()
  174 + },
  175 + //下拉刷新
  176 + downCallback() {
  177 + if (getApp().getBindNot()) {
  178 + setTimeout(() => {
  179 + this.mescroll.endByPage(0, 0)
  180 + }, 200)
  181 + return
  182 + }
  183 + this.list = [];
  184 + this.page.num = 1;
  185 + this.loadData(this.page.num);
  186 + this.resetQuery();
  187 + },
  188 + //上拉加载
  189 + upCallback() {
  190 + if (getApp().getBindNot()) {
  191 + setTimeout(() => {
  192 + this.mescroll.endByPage(0, 0)
  193 + }, 200)
  194 + return
  195 + }
  196 + this.page.num += 1;
  197 + this.loadData(this.page.num);
  198 + },
  199 + //获取列表
  200 + async loadData(pageNo,params={}) {
  201 + try {
  202 + let httpData = {
  203 + page: pageNo,
  204 + pageSize: 10,
  205 + };
  206 + const httpPostData = {
  207 + deviceId:this.deviceId,
  208 + startDate:this.startDate,
  209 + endDate:this.endDate,
  210 + status:this.status,
  211 + emergency:this.emergency,
  212 + deviceName:this.deviceName,
  213 + ...params
  214 + }
  215 + const {
  216 + total,
  217 + items
  218 + } = await api.deviceRepairApi.getRepairWorkListApi(httpData, httpPostData)
  219 +
  220 + let data = items
  221 + let newList = data.map((item)=>{
  222 + return {
  223 + id:item.id,
  224 + title:item.orderCode,
  225 + status:item.status ? repairType[item.status].name : '',
  226 + iconUrl:item.status ? repairType[item.status].iconUrl : '',
  227 + color:item.status ? repairType[item.status].color : '',
  228 + child:[
  229 + {
  230 + label:'deviceRepair.device',
  231 + name:item.deviceInfo.name
  232 + },
  233 + {
  234 + label:'deviceRepair.description',
  235 + name:item.description
  236 + },
  237 + {
  238 + label:'deviceRepair.reportDate',
  239 + name:item.reportDate
  240 + },
  241 + {
  242 + label:'deviceRepair.reportByName',
  243 + name:item.reportByName
  244 + },
  245 + {
  246 + label:'deviceRepair.emergency',
  247 + name:item.emergency ? '是' : '否'
  248 + },
  249 + ],
  250 + detail:{
  251 + ...item
  252 + }
  253 + }
  254 + })
  255 + uni.stopPullDownRefresh();
  256 + this.mescroll.endByPage(items.length); //必传参数(当前页的数据个数, 总页数)
  257 + if (pageNo == 1) {
  258 + this.list = newList;
  259 + } else {
  260 + this.list = this.list.concat(newList);
  261 + }
  262 +
  263 +
  264 + } catch {
  265 + this.mescroll.endErr();
  266 + }
  267 + },
  268 +
  269 + //打开筛选弹框
  270 + openSearchDialog() {
  271 + if (getApp().getBindNot()) {
  272 + uni.$u.toast(this.$t('deviceMangement.pleaseBindAccount'))
  273 + return
  274 + }
  275 + this.show = true;
  276 + },
  277 +
  278 + //关闭筛选弹框
  279 + close() {
  280 + this.show = false;
  281 + },
  282 +
  283 + //列表详情
  284 + openDeviceDetail(values) {
  285 + const { id } = values || {}
  286 + uni.navigateTo({
  287 + url: `/deviceRepair-subpackage/repairWorkOrder-detail/repairWorkOrder-detail?id=${id}`
  288 + });
  289 + },
  290 + }
  291 +};
  292 +</script>
  293 +
  294 +<style lang="scss" scoped>
  295 +.faultCause-page {
  296 + min-height: 100vh;
  297 + background-color: #f8f9fa;
  298 +}
  299 +
  300 +.device-top {
  301 + padding: 10rpx 30rpx;
  302 + background-color: #fff;
  303 +
  304 + .search {
  305 + display: flex;
  306 + justify-content: space-between;
  307 + padding-bottom: 10rpx;
  308 +
  309 + .search-left {
  310 + width: 580rpx;
  311 + background-color: #f8f9fa;
  312 + border-radius: 200rpx;
  313 + }
  314 +
  315 + .search-right {
  316 + display: flex;
  317 + align-items: center;
  318 +
  319 + text {
  320 + color: #333;
  321 + font-size: 14px;
  322 + }
  323 +
  324 + image {
  325 + width: 40rpx;
  326 + height: 40rpx;
  327 + }
  328 + }
  329 + }
  330 +}
  331 +</style>
... ...
1 1 const basicGridList = [{
2   - event: 'openCamera',
3   - icon: '/static/camer.png',
4   - text: 'homePage.cameraManagement'
5   -},
6   -{
7   - event: 'openConfiguration',
8   - icon: '/static/status.png',
9   - text: 'homePage.configuration'
10   -},
11   -{
12   - event: 'visualBoard',
13   - icon: '/static/visual-board.png',
14   - text: 'homePage.bulletinBoard'
15   -},
16   -{
17   - event: 'largeScreen',
18   - icon: '/static/visual-newBoard.png',
19   - text: 'homePage.largeScreen'
20   -}
  2 + event: 'openCamera',
  3 + icon: '/static/camer.png',
  4 + text: 'homePage.cameraManagement'
  5 + },
  6 + {
  7 + event: 'openConfiguration',
  8 + icon: '/static/status.png',
  9 + text: 'homePage.configuration'
  10 + },
  11 + {
  12 + event: 'visualBoard',
  13 + icon: '/static/visual-board.png',
  14 + text: 'homePage.bulletinBoard'
  15 + },
  16 + {
  17 + event: 'largeScreen',
  18 + icon: '/static/visual-newBoard.png',
  19 + text: 'homePage.largeScreen'
  20 + }
21 21 ]
22 22
23 23 const basicStatistics = [{
24   - text: 'homePage.deviceStatistics',
25   - key: 'device',
26   - icon: '/static/device-total.png',
27   - leftParam: 'ONLINE',
28   - centerParam: 'OFFLINE',
29   - rightParam: 'INACTIVE',
30   - value: {
31   - leftValue: 0,
32   - centerValue: 0,
33   - rightValue: 0
  24 + text: 'homePage.deviceStatistics',
  25 + key: 'device',
  26 + icon: '/static/device-total.png',
  27 + leftParam: 'ONLINE',
  28 + centerParam: 'OFFLINE',
  29 + rightParam: 'INACTIVE',
  30 + value: {
  31 + leftValue: 0,
  32 + centerValue: 0,
  33 + rightValue: 0
  34 + },
  35 + label: {
  36 + leftText: "homePage.deviceLabel.onLine",
  37 + centerText: "homePage.deviceLabel.offLine",
  38 + rightText: "homePage.deviceLabel.beActivated"
  39 + }
34 40 },
35   - label: {
36   - leftText: "homePage.deviceLabel.onLine",
37   - centerText: "homePage.deviceLabel.offLine",
38   - rightText: "homePage.deviceLabel.beActivated"
39   - }
40   -},
41   -{
42   - text: 'homePage.alarmStatistics',
43   - key: 'alarm',
44   - icon: '/static/alert.png',
45   - leftParam: ['ACTIVE_UNACK'],
46   - centerParam: 'CLEARED_ACK',
47   - rightParam: 'CLEARED_UNACK',
48   - value: {
49   - leftValue: 0,
50   - centerValue: 0,
51   - rightValue: 0
  41 + {
  42 + text: 'homePage.alarmStatistics',
  43 + key: 'alarm',
  44 + icon: '/static/alert.png',
  45 + leftParam: ['ACTIVE_UNACK'],
  46 + centerParam: 'CLEARED_ACK',
  47 + rightParam: 'CLEARED_UNACK',
  48 + value: {
  49 + leftValue: 0,
  50 + centerValue: 0,
  51 + rightValue: 0
  52 + },
  53 + label: {
  54 + leftText: "homePage.alarmLabel.untreated",
  55 + centerText: "homePage.alarmLabel.processed",
  56 + rightText: "homePage.alarmLabel.falseAlarm"
  57 + }
52 58 },
53   - label: {
54   - leftText: "homePage.alarmLabel.untreated",
55   - centerText: "homePage.alarmLabel.processed",
56   - rightText: "homePage.alarmLabel.falseAlarm"
  59 +]
  60 +
  61 +const menuList = [{
  62 + text: '设备基础信息管理',
  63 + icon: '/static/sbjcgl.png',
  64 + children: [{
  65 + url: '/pages/deviceManagement/ledger/ledger',
  66 + icon: '/static/sbtz.png',
  67 + text: '设备台账',
  68 + width:'33.333%'
  69 + },
  70 + {
  71 + url: '/pages/deviceManagement/faultCause/faultCause',
  72 + icon: '/static/gzyygl.png',
  73 + text: '故障原因管理',
  74 + width:'33.333%'
  75 + },
  76 + {
  77 + url: '/pages/deviceManagement/inspectionPlan/inspectionPlan',
  78 + icon: '/static/xjbyfa.png',
  79 + text: '巡检/保养方案',
  80 + width:'33.333%'
  81 + },
  82 + ]
  83 + },
  84 + {
  85 + text: '设备报修维修',
  86 + icon: '/static/sbbxwx.png',
  87 + children: [{
  88 + url: '/pages/deviceRepair/repairWorkOrder/repairWorkOrder',
  89 + icon: '/static/wxgd.png',
  90 + text: '维修工单',
  91 + width:'25%'
  92 + },
  93 + {
  94 + url: '/pages/deviceRepair/repairRecord/repairRecord',
  95 + icon: '/static/wxjl.png',
  96 + text: '维修记录',
  97 + width:'25%'
  98 + },
  99 + ]
  100 + },
  101 + {
  102 + text: '设备巡检保养',
  103 + icon: '/static/sbxjby.png',
  104 + children: [{
  105 + url: '/pages/deviceInspect/maintenancePlan/maintenancePlan',
  106 + icon: '/static/byjh.png',
  107 + text: '保养计划',
  108 + width:'25%'
  109 + },
  110 + {
  111 + url: '/pages/deviceInspect/maintenanceRecord/maintenanceRecord',
  112 + icon: '/static/byjl.png',
  113 + text: '保养记录',
  114 + width:'25%'
  115 + },
  116 + {
  117 + url: '/pages/deviceInspect/patrolPlan/patrolPlan',
  118 + icon: '/static/xjjh.png',
  119 + text: '巡检计划',
  120 + width:'25%'
  121 + },
  122 + {
  123 + url: '/pages/deviceInspect/patrolRecord/patrolRecord',
  124 + icon: '/static/xjjl.png',
  125 + text: '巡检记录',
  126 + width:'25%'
  127 + }
  128 + ]
57 129 }
58   -},
59 130 ]
60 131
  132 +
61 133 export {
62 134 basicGridList,
63   - basicStatistics
64   -}
  135 + basicStatistics,
  136 + menuList
  137 +}
\ No newline at end of file
... ...
... ... @@ -36,6 +36,25 @@
36 36 </view>
37 37 </view>
38 38 </view>
  39 + <view class="menu">
  40 + <view class="menu-item" v-for="(item, index) in menuList">
  41 + <view class="menu-item-top">
  42 + <image class="item-image" :src="item.icon"></image>
  43 + <text class="item-text">{{item.text}}</text>
  44 + </view>
  45 + <view class="menu-item-bottom u-flex">
  46 + <view class="menu-item-child" v-for="(itemChild, indexChild) in item.children" @click="goToEnum(itemChild)" :style="{ width: itemChild.width}">
  47 + <view class="menu-child-icon">
  48 + <image class="image" :src="itemChild.icon"></image>
  49 + </view>
  50 + <view class="menu-child-text">
  51 + <text class="text">{{itemChild.text}}</text>
  52 + </view>
  53 + </view>
  54 +
  55 + </view>
  56 + </view>
  57 + </view>
39 58 </view>
40 59 <!-- 网格信息 -->
41 60 <view class="grid-container">
... ... @@ -64,7 +83,8 @@ import {
64 83 } from '@/plugins/utils.js'
65 84 import {
66 85 basicGridList,
67   - basicStatistics
  86 + basicStatistics,
  87 + menuList
68 88 } from './config/data.js'
69 89
70 90 export default {
... ... @@ -75,6 +95,7 @@ export default {
75 95 return {
76 96 basicGridList,
77 97 basicStatistics,
  98 + menuList
78 99 };
79 100 },
80 101 onReady(){
... ... @@ -180,6 +201,11 @@ export default {
180 201 this.navigatorAlarmStatus(type)
181 202 }
182 203 },
  204 + goToEnum(item){
  205 + uni.navigateTo({
  206 + url: item.url
  207 + });
  208 + },
183 209 //告警状态查询
184 210 navigatorAlarmStatus(e) {
185 211 uni.reLaunch({
... ...
... ... @@ -14,6 +14,7 @@
14 14 grid-gap: 20rpx;
15 15 margin-top: 50rpx;
16 16 margin-left: 10rpx;
  17 + margin-bottom: 40rpx;
17 18 }
18 19
19 20 .grid-item {
... ... @@ -83,7 +84,7 @@
83 84 flex-direction: column;
84 85 border-radius: 10px;
85 86 .item-child-top {
86   - justify-content: space-between;
  87 + // justify-content: space-between;
87 88 padding: 30rpx;
88 89 .item-image {
89 90 width: 50rpx;
... ... @@ -120,4 +121,62 @@
120 121 }
121 122 }
122 123 }
  124 + .menu{
  125 + .menu-item{
  126 + width: 700rpx;
  127 + background-color: #fff;
  128 + display: flex;
  129 + justify-content: space-between;
  130 + align-items: flex-start;
  131 + flex-direction: column;
  132 + border-radius: 10px;
  133 + margin-top: 20rpx;
  134 + padding:30rpx;
  135 + .menu-item-top{
  136 + // padding: 30rpx;
  137 + display: flex;
  138 + padding-bottom: 30rpx;
  139 + .item-image {
  140 + width: 50rpx;
  141 + height: 50rpx;
  142 + }
  143 + .item-text {
  144 + color: #333333;
  145 + font-size: 14px;
  146 + margin-left: 10rpx;
  147 + }
  148 + }
  149 + .menu-item-bottom{
  150 + width: 100%;
  151 + flex-wrap: wrap;
  152 + .menu-item-child:last-child{
  153 + // margin-right: 0;
  154 + }
  155 + .menu-item-child{
  156 + display: flex;
  157 + justify-content: center;
  158 + align-items: center;
  159 + flex-direction: column;
  160 + // margin-right: 5%;
  161 + height: 120rpx;
  162 + .menu-child-icon{
  163 + .image{
  164 + width: 92rpx;
  165 + height: 92rpx;
  166 + }
  167 + }
  168 + .menu-child-text{
  169 + margin-top: 12rpx;
  170 + .text{
  171 + color: #333333;
  172 + font-size: 14px;
  173 + margin-left: 10rpx;
  174 + }
  175 + }
  176 +
  177 + }
  178 + }
  179 + }
  180 +
  181 + }
123 182 }
... ...
  1 +## 2.0.10(2024-06-07)
  2 +- 优化 uni-app x 中,size 属性的类型
  3 +## 2.0.9(2024-01-12)
  4 +fix: 修复图标大小默认值错误的问题
  5 +## 2.0.8(2023-12-14)
  6 +- 修复 项目未使用 ts 情况下,打包报错的bug
  7 +## 2.0.7(2023-12-14)
  8 +- 修复 size 属性为 string 时,不加单位导致尺寸异常的bug
  9 +## 2.0.6(2023-12-11)
  10 +- 优化 兼容老版本icon类型,如 top ,bottom 等
  11 +## 2.0.5(2023-12-11)
  12 +- 优化 兼容老版本icon类型,如 top ,bottom 等
  13 +## 2.0.4(2023-12-06)
  14 +- 优化 uni-app x 下示例项目图标排序
  15 +## 2.0.3(2023-12-06)
  16 +- 修复 nvue下引入组件报错的bug
  17 +## 2.0.2(2023-12-05)
  18 +-优化 size 属性支持单位
  19 +## 2.0.1(2023-12-05)
  20 +- 新增 uni-app x 支持定义图标
  21 +## 1.3.5(2022-01-24)
  22 +- 优化 size 属性可以传入不带单位的字符串数值
  23 +## 1.3.4(2022-01-24)
  24 +- 优化 size 支持其他单位
  25 +## 1.3.3(2022-01-17)
  26 +- 修复 nvue 有些图标不显示的bug,兼容老版本图标
  27 +## 1.3.2(2021-12-01)
  28 +- 优化 示例可复制图标名称
  29 +## 1.3.1(2021-11-23)
  30 +- 优化 兼容旧组件 type 值
  31 +## 1.3.0(2021-11-19)
  32 +- 新增 更多图标
  33 +- 优化 自定义图标使用方式
  34 +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
  35 +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons)
  36 +## 1.1.7(2021-11-08)
  37 +## 1.2.0(2021-07-30)
  38 +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
  39 +## 1.1.5(2021-05-12)
  40 +- 新增 组件示例地址
  41 +## 1.1.4(2021-02-05)
  42 +- 调整为uni_modules目录规范
... ...
  1 +<template>
  2 + <text class="uni-icons" :style="styleObj">
  3 + <slot>{{unicode}}</slot>
  4 + </text>
  5 +</template>
  6 +
  7 +<script>
  8 + import { fontData, IconsDataItem } from './uniicons_file'
  9 +
  10 + /**
  11 + * Icons 图标
  12 + * @description 用于展示 icon 图标
  13 + * @tutorial https://ext.dcloud.net.cn/plugin?id=28
  14 + * @property {Number,String} size 图标大小
  15 + * @property {String} type 图标图案,参考示例
  16 + * @property {String} color 图标颜色
  17 + * @property {String} customPrefix 自定义图标
  18 + * @event {Function} click 点击 Icon 触发事件
  19 + */
  20 + export default {
  21 + name: "uni-icons",
  22 + props: {
  23 + type: {
  24 + type: String,
  25 + default: ''
  26 + },
  27 + color: {
  28 + type: String,
  29 + default: '#333333'
  30 + },
  31 + size: {
  32 + type: [Number, String],
  33 + default: 16
  34 + },
  35 + fontFamily: {
  36 + type: String,
  37 + default: ''
  38 + }
  39 + },
  40 + data() {
  41 + return {};
  42 + },
  43 + computed: {
  44 + unicode() : string {
  45 + let codes = fontData.find((item : IconsDataItem) : boolean => { return item.font_class == this.type })
  46 + if (codes !== null) {
  47 + return codes.unicode
  48 + }
  49 + return ''
  50 + },
  51 + iconSize() : string {
  52 + const size = this.size
  53 + if (typeof size == 'string') {
  54 + const reg = /^[0-9]*$/g
  55 + return reg.test(size as string) ? '' + size + 'px' : '' + size;
  56 + // return '' + this.size
  57 + }
  58 + return this.getFontSize(size as number)
  59 + },
  60 + styleObj() : UTSJSONObject {
  61 + if (this.fontFamily !== '') {
  62 + return { color: this.color, fontSize: this.iconSize, fontFamily: this.fontFamily }
  63 + }
  64 + return { color: this.color, fontSize: this.iconSize }
  65 + }
  66 + },
  67 + created() { },
  68 + methods: {
  69 + /**
  70 + * 字体大小
  71 + */
  72 + getFontSize(size : number) : string {
  73 + return size + 'px';
  74 + },
  75 + },
  76 + }
  77 +</script>
  78 +
  79 +<style scoped>
  80 + @font-face {
  81 + font-family: UniIconsFontFamily;
  82 + src: url('./uniicons.ttf');
  83 + }
  84 +
  85 + .uni-icons {
  86 + font-family: UniIconsFontFamily;
  87 + font-size: 18px;
  88 + font-style: normal;
  89 + color: #333;
  90 + }
  91 +</style>
... ...
  1 +<template>
  2 + <!-- #ifdef APP-NVUE -->
  3 + <text :style="styleObj" class="uni-icons" @click="_onClick">{{unicode}}</text>
  4 + <!-- #endif -->
  5 + <!-- #ifndef APP-NVUE -->
  6 + <text :style="styleObj" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick">
  7 + <slot></slot>
  8 + </text>
  9 + <!-- #endif -->
  10 +</template>
  11 +
  12 +<script>
  13 + import { fontData } from './uniicons_file_vue.js';
  14 +
  15 + const getVal = (val) => {
  16 + const reg = /^[0-9]*$/g
  17 + return (typeof val === 'number' || reg.test(val)) ? val + 'px' : val;
  18 + }
  19 +
  20 + // #ifdef APP-NVUE
  21 + var domModule = weex.requireModule('dom');
  22 + import iconUrl from './uniicons.ttf'
  23 + domModule.addRule('fontFace', {
  24 + 'fontFamily': "uniicons",
  25 + 'src': "url('" + iconUrl + "')"
  26 + });
  27 + // #endif
  28 +
  29 + /**
  30 + * Icons 图标
  31 + * @description 用于展示 icons 图标
  32 + * @tutorial https://ext.dcloud.net.cn/plugin?id=28
  33 + * @property {Number} size 图标大小
  34 + * @property {String} type 图标图案,参考示例
  35 + * @property {String} color 图标颜色
  36 + * @property {String} customPrefix 自定义图标
  37 + * @event {Function} click 点击 Icon 触发事件
  38 + */
  39 + export default {
  40 + name: 'UniIcons',
  41 + emits: ['click'],
  42 + props: {
  43 + type: {
  44 + type: String,
  45 + default: ''
  46 + },
  47 + color: {
  48 + type: String,
  49 + default: '#333333'
  50 + },
  51 + size: {
  52 + type: [Number, String],
  53 + default: 16
  54 + },
  55 + customPrefix: {
  56 + type: String,
  57 + default: ''
  58 + },
  59 + fontFamily: {
  60 + type: String,
  61 + default: ''
  62 + }
  63 + },
  64 + data() {
  65 + return {
  66 + icons: fontData
  67 + }
  68 + },
  69 + computed: {
  70 + unicode() {
  71 + let code = this.icons.find(v => v.font_class === this.type)
  72 + if (code) {
  73 + return code.unicode
  74 + }
  75 + return ''
  76 + },
  77 + iconSize() {
  78 + return getVal(this.size)
  79 + },
  80 + styleObj() {
  81 + if (this.fontFamily !== '') {
  82 + return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`
  83 + }
  84 + return `color: ${this.color}; font-size: ${this.iconSize};`
  85 + }
  86 + },
  87 + methods: {
  88 + _onClick() {
  89 + this.$emit('click')
  90 + }
  91 + }
  92 + }
  93 +</script>
  94 +
  95 +<style lang="scss">
  96 + /* #ifndef APP-NVUE */
  97 + @import './uniicons.css';
  98 +
  99 + @font-face {
  100 + font-family: uniicons;
  101 + src: url('./uniicons.ttf');
  102 + }
  103 +
  104 + /* #endif */
  105 + .uni-icons {
  106 + font-family: uniicons;
  107 + text-decoration: none;
  108 + text-align: center;
  109 + }
  110 +</style>
... ...
  1 +
  2 +.uniui-cart-filled:before {
  3 + content: "\e6d0";
  4 +}
  5 +
  6 +.uniui-gift-filled:before {
  7 + content: "\e6c4";
  8 +}
  9 +
  10 +.uniui-color:before {
  11 + content: "\e6cf";
  12 +}
  13 +
  14 +.uniui-wallet:before {
  15 + content: "\e6b1";
  16 +}
  17 +
  18 +.uniui-settings-filled:before {
  19 + content: "\e6ce";
  20 +}
  21 +
  22 +.uniui-auth-filled:before {
  23 + content: "\e6cc";
  24 +}
  25 +
  26 +.uniui-shop-filled:before {
  27 + content: "\e6cd";
  28 +}
  29 +
  30 +.uniui-staff-filled:before {
  31 + content: "\e6cb";
  32 +}
  33 +
  34 +.uniui-vip-filled:before {
  35 + content: "\e6c6";
  36 +}
  37 +
  38 +.uniui-plus-filled:before {
  39 + content: "\e6c7";
  40 +}
  41 +
  42 +.uniui-folder-add-filled:before {
  43 + content: "\e6c8";
  44 +}
  45 +
  46 +.uniui-color-filled:before {
  47 + content: "\e6c9";
  48 +}
  49 +
  50 +.uniui-tune-filled:before {
  51 + content: "\e6ca";
  52 +}
  53 +
  54 +.uniui-calendar-filled:before {
  55 + content: "\e6c0";
  56 +}
  57 +
  58 +.uniui-notification-filled:before {
  59 + content: "\e6c1";
  60 +}
  61 +
  62 +.uniui-wallet-filled:before {
  63 + content: "\e6c2";
  64 +}
  65 +
  66 +.uniui-medal-filled:before {
  67 + content: "\e6c3";
  68 +}
  69 +
  70 +.uniui-fire-filled:before {
  71 + content: "\e6c5";
  72 +}
  73 +
  74 +.uniui-refreshempty:before {
  75 + content: "\e6bf";
  76 +}
  77 +
  78 +.uniui-location-filled:before {
  79 + content: "\e6af";
  80 +}
  81 +
  82 +.uniui-person-filled:before {
  83 + content: "\e69d";
  84 +}
  85 +
  86 +.uniui-personadd-filled:before {
  87 + content: "\e698";
  88 +}
  89 +
  90 +.uniui-arrowthinleft:before {
  91 + content: "\e6d2";
  92 +}
  93 +
  94 +.uniui-arrowthinup:before {
  95 + content: "\e6d3";
  96 +}
  97 +
  98 +.uniui-arrowthindown:before {
  99 + content: "\e6d4";
  100 +}
  101 +
  102 +.uniui-back:before {
  103 + content: "\e6b9";
  104 +}
  105 +
  106 +.uniui-forward:before {
  107 + content: "\e6ba";
  108 +}
  109 +
  110 +.uniui-arrow-right:before {
  111 + content: "\e6bb";
  112 +}
  113 +
  114 +.uniui-arrow-left:before {
  115 + content: "\e6bc";
  116 +}
  117 +
  118 +.uniui-arrow-up:before {
  119 + content: "\e6bd";
  120 +}
  121 +
  122 +.uniui-arrow-down:before {
  123 + content: "\e6be";
  124 +}
  125 +
  126 +.uniui-arrowthinright:before {
  127 + content: "\e6d1";
  128 +}
  129 +
  130 +.uniui-down:before {
  131 + content: "\e6b8";
  132 +}
  133 +
  134 +.uniui-bottom:before {
  135 + content: "\e6b8";
  136 +}
  137 +
  138 +.uniui-arrowright:before {
  139 + content: "\e6d5";
  140 +}
  141 +
  142 +.uniui-right:before {
  143 + content: "\e6b5";
  144 +}
  145 +
  146 +.uniui-up:before {
  147 + content: "\e6b6";
  148 +}
  149 +
  150 +.uniui-top:before {
  151 + content: "\e6b6";
  152 +}
  153 +
  154 +.uniui-left:before {
  155 + content: "\e6b7";
  156 +}
  157 +
  158 +.uniui-arrowup:before {
  159 + content: "\e6d6";
  160 +}
  161 +
  162 +.uniui-eye:before {
  163 + content: "\e651";
  164 +}
  165 +
  166 +.uniui-eye-filled:before {
  167 + content: "\e66a";
  168 +}
  169 +
  170 +.uniui-eye-slash:before {
  171 + content: "\e6b3";
  172 +}
  173 +
  174 +.uniui-eye-slash-filled:before {
  175 + content: "\e6b4";
  176 +}
  177 +
  178 +.uniui-info-filled:before {
  179 + content: "\e649";
  180 +}
  181 +
  182 +.uniui-reload:before {
  183 + content: "\e6b2";
  184 +}
  185 +
  186 +.uniui-micoff-filled:before {
  187 + content: "\e6b0";
  188 +}
  189 +
  190 +.uniui-map-pin-ellipse:before {
  191 + content: "\e6ac";
  192 +}
  193 +
  194 +.uniui-map-pin:before {
  195 + content: "\e6ad";
  196 +}
  197 +
  198 +.uniui-location:before {
  199 + content: "\e6ae";
  200 +}
  201 +
  202 +.uniui-starhalf:before {
  203 + content: "\e683";
  204 +}
  205 +
  206 +.uniui-star:before {
  207 + content: "\e688";
  208 +}
  209 +
  210 +.uniui-star-filled:before {
  211 + content: "\e68f";
  212 +}
  213 +
  214 +.uniui-calendar:before {
  215 + content: "\e6a0";
  216 +}
  217 +
  218 +.uniui-fire:before {
  219 + content: "\e6a1";
  220 +}
  221 +
  222 +.uniui-medal:before {
  223 + content: "\e6a2";
  224 +}
  225 +
  226 +.uniui-font:before {
  227 + content: "\e6a3";
  228 +}
  229 +
  230 +.uniui-gift:before {
  231 + content: "\e6a4";
  232 +}
  233 +
  234 +.uniui-link:before {
  235 + content: "\e6a5";
  236 +}
  237 +
  238 +.uniui-notification:before {
  239 + content: "\e6a6";
  240 +}
  241 +
  242 +.uniui-staff:before {
  243 + content: "\e6a7";
  244 +}
  245 +
  246 +.uniui-vip:before {
  247 + content: "\e6a8";
  248 +}
  249 +
  250 +.uniui-folder-add:before {
  251 + content: "\e6a9";
  252 +}
  253 +
  254 +.uniui-tune:before {
  255 + content: "\e6aa";
  256 +}
  257 +
  258 +.uniui-auth:before {
  259 + content: "\e6ab";
  260 +}
  261 +
  262 +.uniui-person:before {
  263 + content: "\e699";
  264 +}
  265 +
  266 +.uniui-email-filled:before {
  267 + content: "\e69a";
  268 +}
  269 +
  270 +.uniui-phone-filled:before {
  271 + content: "\e69b";
  272 +}
  273 +
  274 +.uniui-phone:before {
  275 + content: "\e69c";
  276 +}
  277 +
  278 +.uniui-email:before {
  279 + content: "\e69e";
  280 +}
  281 +
  282 +.uniui-personadd:before {
  283 + content: "\e69f";
  284 +}
  285 +
  286 +.uniui-chatboxes-filled:before {
  287 + content: "\e692";
  288 +}
  289 +
  290 +.uniui-contact:before {
  291 + content: "\e693";
  292 +}
  293 +
  294 +.uniui-chatbubble-filled:before {
  295 + content: "\e694";
  296 +}
  297 +
  298 +.uniui-contact-filled:before {
  299 + content: "\e695";
  300 +}
  301 +
  302 +.uniui-chatboxes:before {
  303 + content: "\e696";
  304 +}
  305 +
  306 +.uniui-chatbubble:before {
  307 + content: "\e697";
  308 +}
  309 +
  310 +.uniui-upload-filled:before {
  311 + content: "\e68e";
  312 +}
  313 +
  314 +.uniui-upload:before {
  315 + content: "\e690";
  316 +}
  317 +
  318 +.uniui-weixin:before {
  319 + content: "\e691";
  320 +}
  321 +
  322 +.uniui-compose:before {
  323 + content: "\e67f";
  324 +}
  325 +
  326 +.uniui-qq:before {
  327 + content: "\e680";
  328 +}
  329 +
  330 +.uniui-download-filled:before {
  331 + content: "\e681";
  332 +}
  333 +
  334 +.uniui-pyq:before {
  335 + content: "\e682";
  336 +}
  337 +
  338 +.uniui-sound:before {
  339 + content: "\e684";
  340 +}
  341 +
  342 +.uniui-trash-filled:before {
  343 + content: "\e685";
  344 +}
  345 +
  346 +.uniui-sound-filled:before {
  347 + content: "\e686";
  348 +}
  349 +
  350 +.uniui-trash:before {
  351 + content: "\e687";
  352 +}
  353 +
  354 +.uniui-videocam-filled:before {
  355 + content: "\e689";
  356 +}
  357 +
  358 +.uniui-spinner-cycle:before {
  359 + content: "\e68a";
  360 +}
  361 +
  362 +.uniui-weibo:before {
  363 + content: "\e68b";
  364 +}
  365 +
  366 +.uniui-videocam:before {
  367 + content: "\e68c";
  368 +}
  369 +
  370 +.uniui-download:before {
  371 + content: "\e68d";
  372 +}
  373 +
  374 +.uniui-help:before {
  375 + content: "\e679";
  376 +}
  377 +
  378 +.uniui-navigate-filled:before {
  379 + content: "\e67a";
  380 +}
  381 +
  382 +.uniui-plusempty:before {
  383 + content: "\e67b";
  384 +}
  385 +
  386 +.uniui-smallcircle:before {
  387 + content: "\e67c";
  388 +}
  389 +
  390 +.uniui-minus-filled:before {
  391 + content: "\e67d";
  392 +}
  393 +
  394 +.uniui-micoff:before {
  395 + content: "\e67e";
  396 +}
  397 +
  398 +.uniui-closeempty:before {
  399 + content: "\e66c";
  400 +}
  401 +
  402 +.uniui-clear:before {
  403 + content: "\e66d";
  404 +}
  405 +
  406 +.uniui-navigate:before {
  407 + content: "\e66e";
  408 +}
  409 +
  410 +.uniui-minus:before {
  411 + content: "\e66f";
  412 +}
  413 +
  414 +.uniui-image:before {
  415 + content: "\e670";
  416 +}
  417 +
  418 +.uniui-mic:before {
  419 + content: "\e671";
  420 +}
  421 +
  422 +.uniui-paperplane:before {
  423 + content: "\e672";
  424 +}
  425 +
  426 +.uniui-close:before {
  427 + content: "\e673";
  428 +}
  429 +
  430 +.uniui-help-filled:before {
  431 + content: "\e674";
  432 +}
  433 +
  434 +.uniui-paperplane-filled:before {
  435 + content: "\e675";
  436 +}
  437 +
  438 +.uniui-plus:before {
  439 + content: "\e676";
  440 +}
  441 +
  442 +.uniui-mic-filled:before {
  443 + content: "\e677";
  444 +}
  445 +
  446 +.uniui-image-filled:before {
  447 + content: "\e678";
  448 +}
  449 +
  450 +.uniui-locked-filled:before {
  451 + content: "\e668";
  452 +}
  453 +
  454 +.uniui-info:before {
  455 + content: "\e669";
  456 +}
  457 +
  458 +.uniui-locked:before {
  459 + content: "\e66b";
  460 +}
  461 +
  462 +.uniui-camera-filled:before {
  463 + content: "\e658";
  464 +}
  465 +
  466 +.uniui-chat-filled:before {
  467 + content: "\e659";
  468 +}
  469 +
  470 +.uniui-camera:before {
  471 + content: "\e65a";
  472 +}
  473 +
  474 +.uniui-circle:before {
  475 + content: "\e65b";
  476 +}
  477 +
  478 +.uniui-checkmarkempty:before {
  479 + content: "\e65c";
  480 +}
  481 +
  482 +.uniui-chat:before {
  483 + content: "\e65d";
  484 +}
  485 +
  486 +.uniui-circle-filled:before {
  487 + content: "\e65e";
  488 +}
  489 +
  490 +.uniui-flag:before {
  491 + content: "\e65f";
  492 +}
  493 +
  494 +.uniui-flag-filled:before {
  495 + content: "\e660";
  496 +}
  497 +
  498 +.uniui-gear-filled:before {
  499 + content: "\e661";
  500 +}
  501 +
  502 +.uniui-home:before {
  503 + content: "\e662";
  504 +}
  505 +
  506 +.uniui-home-filled:before {
  507 + content: "\e663";
  508 +}
  509 +
  510 +.uniui-gear:before {
  511 + content: "\e664";
  512 +}
  513 +
  514 +.uniui-smallcircle-filled:before {
  515 + content: "\e665";
  516 +}
  517 +
  518 +.uniui-map-filled:before {
  519 + content: "\e666";
  520 +}
  521 +
  522 +.uniui-map:before {
  523 + content: "\e667";
  524 +}
  525 +
  526 +.uniui-refresh-filled:before {
  527 + content: "\e656";
  528 +}
  529 +
  530 +.uniui-refresh:before {
  531 + content: "\e657";
  532 +}
  533 +
  534 +.uniui-cloud-upload:before {
  535 + content: "\e645";
  536 +}
  537 +
  538 +.uniui-cloud-download-filled:before {
  539 + content: "\e646";
  540 +}
  541 +
  542 +.uniui-cloud-download:before {
  543 + content: "\e647";
  544 +}
  545 +
  546 +.uniui-cloud-upload-filled:before {
  547 + content: "\e648";
  548 +}
  549 +
  550 +.uniui-redo:before {
  551 + content: "\e64a";
  552 +}
  553 +
  554 +.uniui-images-filled:before {
  555 + content: "\e64b";
  556 +}
  557 +
  558 +.uniui-undo-filled:before {
  559 + content: "\e64c";
  560 +}
  561 +
  562 +.uniui-more:before {
  563 + content: "\e64d";
  564 +}
  565 +
  566 +.uniui-more-filled:before {
  567 + content: "\e64e";
  568 +}
  569 +
  570 +.uniui-undo:before {
  571 + content: "\e64f";
  572 +}
  573 +
  574 +.uniui-images:before {
  575 + content: "\e650";
  576 +}
  577 +
  578 +.uniui-paperclip:before {
  579 + content: "\e652";
  580 +}
  581 +
  582 +.uniui-settings:before {
  583 + content: "\e653";
  584 +}
  585 +
  586 +.uniui-search:before {
  587 + content: "\e654";
  588 +}
  589 +
  590 +.uniui-redo-filled:before {
  591 + content: "\e655";
  592 +}
  593 +
  594 +.uniui-list:before {
  595 + content: "\e644";
  596 +}
  597 +
  598 +.uniui-mail-open-filled:before {
  599 + content: "\e63a";
  600 +}
  601 +
  602 +.uniui-hand-down-filled:before {
  603 + content: "\e63c";
  604 +}
  605 +
  606 +.uniui-hand-down:before {
  607 + content: "\e63d";
  608 +}
  609 +
  610 +.uniui-hand-up-filled:before {
  611 + content: "\e63e";
  612 +}
  613 +
  614 +.uniui-hand-up:before {
  615 + content: "\e63f";
  616 +}
  617 +
  618 +.uniui-heart-filled:before {
  619 + content: "\e641";
  620 +}
  621 +
  622 +.uniui-mail-open:before {
  623 + content: "\e643";
  624 +}
  625 +
  626 +.uniui-heart:before {
  627 + content: "\e639";
  628 +}
  629 +
  630 +.uniui-loop:before {
  631 + content: "\e633";
  632 +}
  633 +
  634 +.uniui-pulldown:before {
  635 + content: "\e632";
  636 +}
  637 +
  638 +.uniui-scan:before {
  639 + content: "\e62a";
  640 +}
  641 +
  642 +.uniui-bars:before {
  643 + content: "\e627";
  644 +}
  645 +
  646 +.uniui-checkbox:before {
  647 + content: "\e62b";
  648 +}
  649 +
  650 +.uniui-checkbox-filled:before {
  651 + content: "\e62c";
  652 +}
  653 +
  654 +.uniui-shop:before {
  655 + content: "\e62f";
  656 +}
  657 +
  658 +.uniui-headphones:before {
  659 + content: "\e630";
  660 +}
  661 +
  662 +.uniui-cart:before {
  663 + content: "\e631";
  664 +}
... ...
  1 +
  2 +export type IconsData = {
  3 + id : string
  4 + name : string
  5 + font_family : string
  6 + css_prefix_text : string
  7 + description : string
  8 + glyphs : Array<IconsDataItem>
  9 +}
  10 +
  11 +export type IconsDataItem = {
  12 + font_class : string
  13 + unicode : string
  14 +}
  15 +
  16 +
  17 +export const fontData = [
  18 + {
  19 + "font_class": "arrow-down",
  20 + "unicode": "\ue6be"
  21 + },
  22 + {
  23 + "font_class": "arrow-left",
  24 + "unicode": "\ue6bc"
  25 + },
  26 + {
  27 + "font_class": "arrow-right",
  28 + "unicode": "\ue6bb"
  29 + },
  30 + {
  31 + "font_class": "arrow-up",
  32 + "unicode": "\ue6bd"
  33 + },
  34 + {
  35 + "font_class": "auth",
  36 + "unicode": "\ue6ab"
  37 + },
  38 + {
  39 + "font_class": "auth-filled",
  40 + "unicode": "\ue6cc"
  41 + },
  42 + {
  43 + "font_class": "back",
  44 + "unicode": "\ue6b9"
  45 + },
  46 + {
  47 + "font_class": "bars",
  48 + "unicode": "\ue627"
  49 + },
  50 + {
  51 + "font_class": "calendar",
  52 + "unicode": "\ue6a0"
  53 + },
  54 + {
  55 + "font_class": "calendar-filled",
  56 + "unicode": "\ue6c0"
  57 + },
  58 + {
  59 + "font_class": "camera",
  60 + "unicode": "\ue65a"
  61 + },
  62 + {
  63 + "font_class": "camera-filled",
  64 + "unicode": "\ue658"
  65 + },
  66 + {
  67 + "font_class": "cart",
  68 + "unicode": "\ue631"
  69 + },
  70 + {
  71 + "font_class": "cart-filled",
  72 + "unicode": "\ue6d0"
  73 + },
  74 + {
  75 + "font_class": "chat",
  76 + "unicode": "\ue65d"
  77 + },
  78 + {
  79 + "font_class": "chat-filled",
  80 + "unicode": "\ue659"
  81 + },
  82 + {
  83 + "font_class": "chatboxes",
  84 + "unicode": "\ue696"
  85 + },
  86 + {
  87 + "font_class": "chatboxes-filled",
  88 + "unicode": "\ue692"
  89 + },
  90 + {
  91 + "font_class": "chatbubble",
  92 + "unicode": "\ue697"
  93 + },
  94 + {
  95 + "font_class": "chatbubble-filled",
  96 + "unicode": "\ue694"
  97 + },
  98 + {
  99 + "font_class": "checkbox",
  100 + "unicode": "\ue62b"
  101 + },
  102 + {
  103 + "font_class": "checkbox-filled",
  104 + "unicode": "\ue62c"
  105 + },
  106 + {
  107 + "font_class": "checkmarkempty",
  108 + "unicode": "\ue65c"
  109 + },
  110 + {
  111 + "font_class": "circle",
  112 + "unicode": "\ue65b"
  113 + },
  114 + {
  115 + "font_class": "circle-filled",
  116 + "unicode": "\ue65e"
  117 + },
  118 + {
  119 + "font_class": "clear",
  120 + "unicode": "\ue66d"
  121 + },
  122 + {
  123 + "font_class": "close",
  124 + "unicode": "\ue673"
  125 + },
  126 + {
  127 + "font_class": "closeempty",
  128 + "unicode": "\ue66c"
  129 + },
  130 + {
  131 + "font_class": "cloud-download",
  132 + "unicode": "\ue647"
  133 + },
  134 + {
  135 + "font_class": "cloud-download-filled",
  136 + "unicode": "\ue646"
  137 + },
  138 + {
  139 + "font_class": "cloud-upload",
  140 + "unicode": "\ue645"
  141 + },
  142 + {
  143 + "font_class": "cloud-upload-filled",
  144 + "unicode": "\ue648"
  145 + },
  146 + {
  147 + "font_class": "color",
  148 + "unicode": "\ue6cf"
  149 + },
  150 + {
  151 + "font_class": "color-filled",
  152 + "unicode": "\ue6c9"
  153 + },
  154 + {
  155 + "font_class": "compose",
  156 + "unicode": "\ue67f"
  157 + },
  158 + {
  159 + "font_class": "contact",
  160 + "unicode": "\ue693"
  161 + },
  162 + {
  163 + "font_class": "contact-filled",
  164 + "unicode": "\ue695"
  165 + },
  166 + {
  167 + "font_class": "down",
  168 + "unicode": "\ue6b8"
  169 + },
  170 + {
  171 + "font_class": "bottom",
  172 + "unicode": "\ue6b8"
  173 + },
  174 + {
  175 + "font_class": "download",
  176 + "unicode": "\ue68d"
  177 + },
  178 + {
  179 + "font_class": "download-filled",
  180 + "unicode": "\ue681"
  181 + },
  182 + {
  183 + "font_class": "email",
  184 + "unicode": "\ue69e"
  185 + },
  186 + {
  187 + "font_class": "email-filled",
  188 + "unicode": "\ue69a"
  189 + },
  190 + {
  191 + "font_class": "eye",
  192 + "unicode": "\ue651"
  193 + },
  194 + {
  195 + "font_class": "eye-filled",
  196 + "unicode": "\ue66a"
  197 + },
  198 + {
  199 + "font_class": "eye-slash",
  200 + "unicode": "\ue6b3"
  201 + },
  202 + {
  203 + "font_class": "eye-slash-filled",
  204 + "unicode": "\ue6b4"
  205 + },
  206 + {
  207 + "font_class": "fire",
  208 + "unicode": "\ue6a1"
  209 + },
  210 + {
  211 + "font_class": "fire-filled",
  212 + "unicode": "\ue6c5"
  213 + },
  214 + {
  215 + "font_class": "flag",
  216 + "unicode": "\ue65f"
  217 + },
  218 + {
  219 + "font_class": "flag-filled",
  220 + "unicode": "\ue660"
  221 + },
  222 + {
  223 + "font_class": "folder-add",
  224 + "unicode": "\ue6a9"
  225 + },
  226 + {
  227 + "font_class": "folder-add-filled",
  228 + "unicode": "\ue6c8"
  229 + },
  230 + {
  231 + "font_class": "font",
  232 + "unicode": "\ue6a3"
  233 + },
  234 + {
  235 + "font_class": "forward",
  236 + "unicode": "\ue6ba"
  237 + },
  238 + {
  239 + "font_class": "gear",
  240 + "unicode": "\ue664"
  241 + },
  242 + {
  243 + "font_class": "gear-filled",
  244 + "unicode": "\ue661"
  245 + },
  246 + {
  247 + "font_class": "gift",
  248 + "unicode": "\ue6a4"
  249 + },
  250 + {
  251 + "font_class": "gift-filled",
  252 + "unicode": "\ue6c4"
  253 + },
  254 + {
  255 + "font_class": "hand-down",
  256 + "unicode": "\ue63d"
  257 + },
  258 + {
  259 + "font_class": "hand-down-filled",
  260 + "unicode": "\ue63c"
  261 + },
  262 + {
  263 + "font_class": "hand-up",
  264 + "unicode": "\ue63f"
  265 + },
  266 + {
  267 + "font_class": "hand-up-filled",
  268 + "unicode": "\ue63e"
  269 + },
  270 + {
  271 + "font_class": "headphones",
  272 + "unicode": "\ue630"
  273 + },
  274 + {
  275 + "font_class": "heart",
  276 + "unicode": "\ue639"
  277 + },
  278 + {
  279 + "font_class": "heart-filled",
  280 + "unicode": "\ue641"
  281 + },
  282 + {
  283 + "font_class": "help",
  284 + "unicode": "\ue679"
  285 + },
  286 + {
  287 + "font_class": "help-filled",
  288 + "unicode": "\ue674"
  289 + },
  290 + {
  291 + "font_class": "home",
  292 + "unicode": "\ue662"
  293 + },
  294 + {
  295 + "font_class": "home-filled",
  296 + "unicode": "\ue663"
  297 + },
  298 + {
  299 + "font_class": "image",
  300 + "unicode": "\ue670"
  301 + },
  302 + {
  303 + "font_class": "image-filled",
  304 + "unicode": "\ue678"
  305 + },
  306 + {
  307 + "font_class": "images",
  308 + "unicode": "\ue650"
  309 + },
  310 + {
  311 + "font_class": "images-filled",
  312 + "unicode": "\ue64b"
  313 + },
  314 + {
  315 + "font_class": "info",
  316 + "unicode": "\ue669"
  317 + },
  318 + {
  319 + "font_class": "info-filled",
  320 + "unicode": "\ue649"
  321 + },
  322 + {
  323 + "font_class": "left",
  324 + "unicode": "\ue6b7"
  325 + },
  326 + {
  327 + "font_class": "link",
  328 + "unicode": "\ue6a5"
  329 + },
  330 + {
  331 + "font_class": "list",
  332 + "unicode": "\ue644"
  333 + },
  334 + {
  335 + "font_class": "location",
  336 + "unicode": "\ue6ae"
  337 + },
  338 + {
  339 + "font_class": "location-filled",
  340 + "unicode": "\ue6af"
  341 + },
  342 + {
  343 + "font_class": "locked",
  344 + "unicode": "\ue66b"
  345 + },
  346 + {
  347 + "font_class": "locked-filled",
  348 + "unicode": "\ue668"
  349 + },
  350 + {
  351 + "font_class": "loop",
  352 + "unicode": "\ue633"
  353 + },
  354 + {
  355 + "font_class": "mail-open",
  356 + "unicode": "\ue643"
  357 + },
  358 + {
  359 + "font_class": "mail-open-filled",
  360 + "unicode": "\ue63a"
  361 + },
  362 + {
  363 + "font_class": "map",
  364 + "unicode": "\ue667"
  365 + },
  366 + {
  367 + "font_class": "map-filled",
  368 + "unicode": "\ue666"
  369 + },
  370 + {
  371 + "font_class": "map-pin",
  372 + "unicode": "\ue6ad"
  373 + },
  374 + {
  375 + "font_class": "map-pin-ellipse",
  376 + "unicode": "\ue6ac"
  377 + },
  378 + {
  379 + "font_class": "medal",
  380 + "unicode": "\ue6a2"
  381 + },
  382 + {
  383 + "font_class": "medal-filled",
  384 + "unicode": "\ue6c3"
  385 + },
  386 + {
  387 + "font_class": "mic",
  388 + "unicode": "\ue671"
  389 + },
  390 + {
  391 + "font_class": "mic-filled",
  392 + "unicode": "\ue677"
  393 + },
  394 + {
  395 + "font_class": "micoff",
  396 + "unicode": "\ue67e"
  397 + },
  398 + {
  399 + "font_class": "micoff-filled",
  400 + "unicode": "\ue6b0"
  401 + },
  402 + {
  403 + "font_class": "minus",
  404 + "unicode": "\ue66f"
  405 + },
  406 + {
  407 + "font_class": "minus-filled",
  408 + "unicode": "\ue67d"
  409 + },
  410 + {
  411 + "font_class": "more",
  412 + "unicode": "\ue64d"
  413 + },
  414 + {
  415 + "font_class": "more-filled",
  416 + "unicode": "\ue64e"
  417 + },
  418 + {
  419 + "font_class": "navigate",
  420 + "unicode": "\ue66e"
  421 + },
  422 + {
  423 + "font_class": "navigate-filled",
  424 + "unicode": "\ue67a"
  425 + },
  426 + {
  427 + "font_class": "notification",
  428 + "unicode": "\ue6a6"
  429 + },
  430 + {
  431 + "font_class": "notification-filled",
  432 + "unicode": "\ue6c1"
  433 + },
  434 + {
  435 + "font_class": "paperclip",
  436 + "unicode": "\ue652"
  437 + },
  438 + {
  439 + "font_class": "paperplane",
  440 + "unicode": "\ue672"
  441 + },
  442 + {
  443 + "font_class": "paperplane-filled",
  444 + "unicode": "\ue675"
  445 + },
  446 + {
  447 + "font_class": "person",
  448 + "unicode": "\ue699"
  449 + },
  450 + {
  451 + "font_class": "person-filled",
  452 + "unicode": "\ue69d"
  453 + },
  454 + {
  455 + "font_class": "personadd",
  456 + "unicode": "\ue69f"
  457 + },
  458 + {
  459 + "font_class": "personadd-filled",
  460 + "unicode": "\ue698"
  461 + },
  462 + {
  463 + "font_class": "personadd-filled-copy",
  464 + "unicode": "\ue6d1"
  465 + },
  466 + {
  467 + "font_class": "phone",
  468 + "unicode": "\ue69c"
  469 + },
  470 + {
  471 + "font_class": "phone-filled",
  472 + "unicode": "\ue69b"
  473 + },
  474 + {
  475 + "font_class": "plus",
  476 + "unicode": "\ue676"
  477 + },
  478 + {
  479 + "font_class": "plus-filled",
  480 + "unicode": "\ue6c7"
  481 + },
  482 + {
  483 + "font_class": "plusempty",
  484 + "unicode": "\ue67b"
  485 + },
  486 + {
  487 + "font_class": "pulldown",
  488 + "unicode": "\ue632"
  489 + },
  490 + {
  491 + "font_class": "pyq",
  492 + "unicode": "\ue682"
  493 + },
  494 + {
  495 + "font_class": "qq",
  496 + "unicode": "\ue680"
  497 + },
  498 + {
  499 + "font_class": "redo",
  500 + "unicode": "\ue64a"
  501 + },
  502 + {
  503 + "font_class": "redo-filled",
  504 + "unicode": "\ue655"
  505 + },
  506 + {
  507 + "font_class": "refresh",
  508 + "unicode": "\ue657"
  509 + },
  510 + {
  511 + "font_class": "refresh-filled",
  512 + "unicode": "\ue656"
  513 + },
  514 + {
  515 + "font_class": "refreshempty",
  516 + "unicode": "\ue6bf"
  517 + },
  518 + {
  519 + "font_class": "reload",
  520 + "unicode": "\ue6b2"
  521 + },
  522 + {
  523 + "font_class": "right",
  524 + "unicode": "\ue6b5"
  525 + },
  526 + {
  527 + "font_class": "scan",
  528 + "unicode": "\ue62a"
  529 + },
  530 + {
  531 + "font_class": "search",
  532 + "unicode": "\ue654"
  533 + },
  534 + {
  535 + "font_class": "settings",
  536 + "unicode": "\ue653"
  537 + },
  538 + {
  539 + "font_class": "settings-filled",
  540 + "unicode": "\ue6ce"
  541 + },
  542 + {
  543 + "font_class": "shop",
  544 + "unicode": "\ue62f"
  545 + },
  546 + {
  547 + "font_class": "shop-filled",
  548 + "unicode": "\ue6cd"
  549 + },
  550 + {
  551 + "font_class": "smallcircle",
  552 + "unicode": "\ue67c"
  553 + },
  554 + {
  555 + "font_class": "smallcircle-filled",
  556 + "unicode": "\ue665"
  557 + },
  558 + {
  559 + "font_class": "sound",
  560 + "unicode": "\ue684"
  561 + },
  562 + {
  563 + "font_class": "sound-filled",
  564 + "unicode": "\ue686"
  565 + },
  566 + {
  567 + "font_class": "spinner-cycle",
  568 + "unicode": "\ue68a"
  569 + },
  570 + {
  571 + "font_class": "staff",
  572 + "unicode": "\ue6a7"
  573 + },
  574 + {
  575 + "font_class": "staff-filled",
  576 + "unicode": "\ue6cb"
  577 + },
  578 + {
  579 + "font_class": "star",
  580 + "unicode": "\ue688"
  581 + },
  582 + {
  583 + "font_class": "star-filled",
  584 + "unicode": "\ue68f"
  585 + },
  586 + {
  587 + "font_class": "starhalf",
  588 + "unicode": "\ue683"
  589 + },
  590 + {
  591 + "font_class": "trash",
  592 + "unicode": "\ue687"
  593 + },
  594 + {
  595 + "font_class": "trash-filled",
  596 + "unicode": "\ue685"
  597 + },
  598 + {
  599 + "font_class": "tune",
  600 + "unicode": "\ue6aa"
  601 + },
  602 + {
  603 + "font_class": "tune-filled",
  604 + "unicode": "\ue6ca"
  605 + },
  606 + {
  607 + "font_class": "undo",
  608 + "unicode": "\ue64f"
  609 + },
  610 + {
  611 + "font_class": "undo-filled",
  612 + "unicode": "\ue64c"
  613 + },
  614 + {
  615 + "font_class": "up",
  616 + "unicode": "\ue6b6"
  617 + },
  618 + {
  619 + "font_class": "top",
  620 + "unicode": "\ue6b6"
  621 + },
  622 + {
  623 + "font_class": "upload",
  624 + "unicode": "\ue690"
  625 + },
  626 + {
  627 + "font_class": "upload-filled",
  628 + "unicode": "\ue68e"
  629 + },
  630 + {
  631 + "font_class": "videocam",
  632 + "unicode": "\ue68c"
  633 + },
  634 + {
  635 + "font_class": "videocam-filled",
  636 + "unicode": "\ue689"
  637 + },
  638 + {
  639 + "font_class": "vip",
  640 + "unicode": "\ue6a8"
  641 + },
  642 + {
  643 + "font_class": "vip-filled",
  644 + "unicode": "\ue6c6"
  645 + },
  646 + {
  647 + "font_class": "wallet",
  648 + "unicode": "\ue6b1"
  649 + },
  650 + {
  651 + "font_class": "wallet-filled",
  652 + "unicode": "\ue6c2"
  653 + },
  654 + {
  655 + "font_class": "weibo",
  656 + "unicode": "\ue68b"
  657 + },
  658 + {
  659 + "font_class": "weixin",
  660 + "unicode": "\ue691"
  661 + }
  662 +] as IconsDataItem[]
  663 +
  664 +// export const fontData = JSON.parse<IconsDataItem>(fontDataJson)
... ...
  1 +
  2 +export const fontData = [
  3 + {
  4 + "font_class": "arrow-down",
  5 + "unicode": "\ue6be"
  6 + },
  7 + {
  8 + "font_class": "arrow-left",
  9 + "unicode": "\ue6bc"
  10 + },
  11 + {
  12 + "font_class": "arrow-right",
  13 + "unicode": "\ue6bb"
  14 + },
  15 + {
  16 + "font_class": "arrow-up",
  17 + "unicode": "\ue6bd"
  18 + },
  19 + {
  20 + "font_class": "auth",
  21 + "unicode": "\ue6ab"
  22 + },
  23 + {
  24 + "font_class": "auth-filled",
  25 + "unicode": "\ue6cc"
  26 + },
  27 + {
  28 + "font_class": "back",
  29 + "unicode": "\ue6b9"
  30 + },
  31 + {
  32 + "font_class": "bars",
  33 + "unicode": "\ue627"
  34 + },
  35 + {
  36 + "font_class": "calendar",
  37 + "unicode": "\ue6a0"
  38 + },
  39 + {
  40 + "font_class": "calendar-filled",
  41 + "unicode": "\ue6c0"
  42 + },
  43 + {
  44 + "font_class": "camera",
  45 + "unicode": "\ue65a"
  46 + },
  47 + {
  48 + "font_class": "camera-filled",
  49 + "unicode": "\ue658"
  50 + },
  51 + {
  52 + "font_class": "cart",
  53 + "unicode": "\ue631"
  54 + },
  55 + {
  56 + "font_class": "cart-filled",
  57 + "unicode": "\ue6d0"
  58 + },
  59 + {
  60 + "font_class": "chat",
  61 + "unicode": "\ue65d"
  62 + },
  63 + {
  64 + "font_class": "chat-filled",
  65 + "unicode": "\ue659"
  66 + },
  67 + {
  68 + "font_class": "chatboxes",
  69 + "unicode": "\ue696"
  70 + },
  71 + {
  72 + "font_class": "chatboxes-filled",
  73 + "unicode": "\ue692"
  74 + },
  75 + {
  76 + "font_class": "chatbubble",
  77 + "unicode": "\ue697"
  78 + },
  79 + {
  80 + "font_class": "chatbubble-filled",
  81 + "unicode": "\ue694"
  82 + },
  83 + {
  84 + "font_class": "checkbox",
  85 + "unicode": "\ue62b"
  86 + },
  87 + {
  88 + "font_class": "checkbox-filled",
  89 + "unicode": "\ue62c"
  90 + },
  91 + {
  92 + "font_class": "checkmarkempty",
  93 + "unicode": "\ue65c"
  94 + },
  95 + {
  96 + "font_class": "circle",
  97 + "unicode": "\ue65b"
  98 + },
  99 + {
  100 + "font_class": "circle-filled",
  101 + "unicode": "\ue65e"
  102 + },
  103 + {
  104 + "font_class": "clear",
  105 + "unicode": "\ue66d"
  106 + },
  107 + {
  108 + "font_class": "close",
  109 + "unicode": "\ue673"
  110 + },
  111 + {
  112 + "font_class": "closeempty",
  113 + "unicode": "\ue66c"
  114 + },
  115 + {
  116 + "font_class": "cloud-download",
  117 + "unicode": "\ue647"
  118 + },
  119 + {
  120 + "font_class": "cloud-download-filled",
  121 + "unicode": "\ue646"
  122 + },
  123 + {
  124 + "font_class": "cloud-upload",
  125 + "unicode": "\ue645"
  126 + },
  127 + {
  128 + "font_class": "cloud-upload-filled",
  129 + "unicode": "\ue648"
  130 + },
  131 + {
  132 + "font_class": "color",
  133 + "unicode": "\ue6cf"
  134 + },
  135 + {
  136 + "font_class": "color-filled",
  137 + "unicode": "\ue6c9"
  138 + },
  139 + {
  140 + "font_class": "compose",
  141 + "unicode": "\ue67f"
  142 + },
  143 + {
  144 + "font_class": "contact",
  145 + "unicode": "\ue693"
  146 + },
  147 + {
  148 + "font_class": "contact-filled",
  149 + "unicode": "\ue695"
  150 + },
  151 + {
  152 + "font_class": "down",
  153 + "unicode": "\ue6b8"
  154 + },
  155 + {
  156 + "font_class": "bottom",
  157 + "unicode": "\ue6b8"
  158 + },
  159 + {
  160 + "font_class": "download",
  161 + "unicode": "\ue68d"
  162 + },
  163 + {
  164 + "font_class": "download-filled",
  165 + "unicode": "\ue681"
  166 + },
  167 + {
  168 + "font_class": "email",
  169 + "unicode": "\ue69e"
  170 + },
  171 + {
  172 + "font_class": "email-filled",
  173 + "unicode": "\ue69a"
  174 + },
  175 + {
  176 + "font_class": "eye",
  177 + "unicode": "\ue651"
  178 + },
  179 + {
  180 + "font_class": "eye-filled",
  181 + "unicode": "\ue66a"
  182 + },
  183 + {
  184 + "font_class": "eye-slash",
  185 + "unicode": "\ue6b3"
  186 + },
  187 + {
  188 + "font_class": "eye-slash-filled",
  189 + "unicode": "\ue6b4"
  190 + },
  191 + {
  192 + "font_class": "fire",
  193 + "unicode": "\ue6a1"
  194 + },
  195 + {
  196 + "font_class": "fire-filled",
  197 + "unicode": "\ue6c5"
  198 + },
  199 + {
  200 + "font_class": "flag",
  201 + "unicode": "\ue65f"
  202 + },
  203 + {
  204 + "font_class": "flag-filled",
  205 + "unicode": "\ue660"
  206 + },
  207 + {
  208 + "font_class": "folder-add",
  209 + "unicode": "\ue6a9"
  210 + },
  211 + {
  212 + "font_class": "folder-add-filled",
  213 + "unicode": "\ue6c8"
  214 + },
  215 + {
  216 + "font_class": "font",
  217 + "unicode": "\ue6a3"
  218 + },
  219 + {
  220 + "font_class": "forward",
  221 + "unicode": "\ue6ba"
  222 + },
  223 + {
  224 + "font_class": "gear",
  225 + "unicode": "\ue664"
  226 + },
  227 + {
  228 + "font_class": "gear-filled",
  229 + "unicode": "\ue661"
  230 + },
  231 + {
  232 + "font_class": "gift",
  233 + "unicode": "\ue6a4"
  234 + },
  235 + {
  236 + "font_class": "gift-filled",
  237 + "unicode": "\ue6c4"
  238 + },
  239 + {
  240 + "font_class": "hand-down",
  241 + "unicode": "\ue63d"
  242 + },
  243 + {
  244 + "font_class": "hand-down-filled",
  245 + "unicode": "\ue63c"
  246 + },
  247 + {
  248 + "font_class": "hand-up",
  249 + "unicode": "\ue63f"
  250 + },
  251 + {
  252 + "font_class": "hand-up-filled",
  253 + "unicode": "\ue63e"
  254 + },
  255 + {
  256 + "font_class": "headphones",
  257 + "unicode": "\ue630"
  258 + },
  259 + {
  260 + "font_class": "heart",
  261 + "unicode": "\ue639"
  262 + },
  263 + {
  264 + "font_class": "heart-filled",
  265 + "unicode": "\ue641"
  266 + },
  267 + {
  268 + "font_class": "help",
  269 + "unicode": "\ue679"
  270 + },
  271 + {
  272 + "font_class": "help-filled",
  273 + "unicode": "\ue674"
  274 + },
  275 + {
  276 + "font_class": "home",
  277 + "unicode": "\ue662"
  278 + },
  279 + {
  280 + "font_class": "home-filled",
  281 + "unicode": "\ue663"
  282 + },
  283 + {
  284 + "font_class": "image",
  285 + "unicode": "\ue670"
  286 + },
  287 + {
  288 + "font_class": "image-filled",
  289 + "unicode": "\ue678"
  290 + },
  291 + {
  292 + "font_class": "images",
  293 + "unicode": "\ue650"
  294 + },
  295 + {
  296 + "font_class": "images-filled",
  297 + "unicode": "\ue64b"
  298 + },
  299 + {
  300 + "font_class": "info",
  301 + "unicode": "\ue669"
  302 + },
  303 + {
  304 + "font_class": "info-filled",
  305 + "unicode": "\ue649"
  306 + },
  307 + {
  308 + "font_class": "left",
  309 + "unicode": "\ue6b7"
  310 + },
  311 + {
  312 + "font_class": "link",
  313 + "unicode": "\ue6a5"
  314 + },
  315 + {
  316 + "font_class": "list",
  317 + "unicode": "\ue644"
  318 + },
  319 + {
  320 + "font_class": "location",
  321 + "unicode": "\ue6ae"
  322 + },
  323 + {
  324 + "font_class": "location-filled",
  325 + "unicode": "\ue6af"
  326 + },
  327 + {
  328 + "font_class": "locked",
  329 + "unicode": "\ue66b"
  330 + },
  331 + {
  332 + "font_class": "locked-filled",
  333 + "unicode": "\ue668"
  334 + },
  335 + {
  336 + "font_class": "loop",
  337 + "unicode": "\ue633"
  338 + },
  339 + {
  340 + "font_class": "mail-open",
  341 + "unicode": "\ue643"
  342 + },
  343 + {
  344 + "font_class": "mail-open-filled",
  345 + "unicode": "\ue63a"
  346 + },
  347 + {
  348 + "font_class": "map",
  349 + "unicode": "\ue667"
  350 + },
  351 + {
  352 + "font_class": "map-filled",
  353 + "unicode": "\ue666"
  354 + },
  355 + {
  356 + "font_class": "map-pin",
  357 + "unicode": "\ue6ad"
  358 + },
  359 + {
  360 + "font_class": "map-pin-ellipse",
  361 + "unicode": "\ue6ac"
  362 + },
  363 + {
  364 + "font_class": "medal",
  365 + "unicode": "\ue6a2"
  366 + },
  367 + {
  368 + "font_class": "medal-filled",
  369 + "unicode": "\ue6c3"
  370 + },
  371 + {
  372 + "font_class": "mic",
  373 + "unicode": "\ue671"
  374 + },
  375 + {
  376 + "font_class": "mic-filled",
  377 + "unicode": "\ue677"
  378 + },
  379 + {
  380 + "font_class": "micoff",
  381 + "unicode": "\ue67e"
  382 + },
  383 + {
  384 + "font_class": "micoff-filled",
  385 + "unicode": "\ue6b0"
  386 + },
  387 + {
  388 + "font_class": "minus",
  389 + "unicode": "\ue66f"
  390 + },
  391 + {
  392 + "font_class": "minus-filled",
  393 + "unicode": "\ue67d"
  394 + },
  395 + {
  396 + "font_class": "more",
  397 + "unicode": "\ue64d"
  398 + },
  399 + {
  400 + "font_class": "more-filled",
  401 + "unicode": "\ue64e"
  402 + },
  403 + {
  404 + "font_class": "navigate",
  405 + "unicode": "\ue66e"
  406 + },
  407 + {
  408 + "font_class": "navigate-filled",
  409 + "unicode": "\ue67a"
  410 + },
  411 + {
  412 + "font_class": "notification",
  413 + "unicode": "\ue6a6"
  414 + },
  415 + {
  416 + "font_class": "notification-filled",
  417 + "unicode": "\ue6c1"
  418 + },
  419 + {
  420 + "font_class": "paperclip",
  421 + "unicode": "\ue652"
  422 + },
  423 + {
  424 + "font_class": "paperplane",
  425 + "unicode": "\ue672"
  426 + },
  427 + {
  428 + "font_class": "paperplane-filled",
  429 + "unicode": "\ue675"
  430 + },
  431 + {
  432 + "font_class": "person",
  433 + "unicode": "\ue699"
  434 + },
  435 + {
  436 + "font_class": "person-filled",
  437 + "unicode": "\ue69d"
  438 + },
  439 + {
  440 + "font_class": "personadd",
  441 + "unicode": "\ue69f"
  442 + },
  443 + {
  444 + "font_class": "personadd-filled",
  445 + "unicode": "\ue698"
  446 + },
  447 + {
  448 + "font_class": "personadd-filled-copy",
  449 + "unicode": "\ue6d1"
  450 + },
  451 + {
  452 + "font_class": "phone",
  453 + "unicode": "\ue69c"
  454 + },
  455 + {
  456 + "font_class": "phone-filled",
  457 + "unicode": "\ue69b"
  458 + },
  459 + {
  460 + "font_class": "plus",
  461 + "unicode": "\ue676"
  462 + },
  463 + {
  464 + "font_class": "plus-filled",
  465 + "unicode": "\ue6c7"
  466 + },
  467 + {
  468 + "font_class": "plusempty",
  469 + "unicode": "\ue67b"
  470 + },
  471 + {
  472 + "font_class": "pulldown",
  473 + "unicode": "\ue632"
  474 + },
  475 + {
  476 + "font_class": "pyq",
  477 + "unicode": "\ue682"
  478 + },
  479 + {
  480 + "font_class": "qq",
  481 + "unicode": "\ue680"
  482 + },
  483 + {
  484 + "font_class": "redo",
  485 + "unicode": "\ue64a"
  486 + },
  487 + {
  488 + "font_class": "redo-filled",
  489 + "unicode": "\ue655"
  490 + },
  491 + {
  492 + "font_class": "refresh",
  493 + "unicode": "\ue657"
  494 + },
  495 + {
  496 + "font_class": "refresh-filled",
  497 + "unicode": "\ue656"
  498 + },
  499 + {
  500 + "font_class": "refreshempty",
  501 + "unicode": "\ue6bf"
  502 + },
  503 + {
  504 + "font_class": "reload",
  505 + "unicode": "\ue6b2"
  506 + },
  507 + {
  508 + "font_class": "right",
  509 + "unicode": "\ue6b5"
  510 + },
  511 + {
  512 + "font_class": "scan",
  513 + "unicode": "\ue62a"
  514 + },
  515 + {
  516 + "font_class": "search",
  517 + "unicode": "\ue654"
  518 + },
  519 + {
  520 + "font_class": "settings",
  521 + "unicode": "\ue653"
  522 + },
  523 + {
  524 + "font_class": "settings-filled",
  525 + "unicode": "\ue6ce"
  526 + },
  527 + {
  528 + "font_class": "shop",
  529 + "unicode": "\ue62f"
  530 + },
  531 + {
  532 + "font_class": "shop-filled",
  533 + "unicode": "\ue6cd"
  534 + },
  535 + {
  536 + "font_class": "smallcircle",
  537 + "unicode": "\ue67c"
  538 + },
  539 + {
  540 + "font_class": "smallcircle-filled",
  541 + "unicode": "\ue665"
  542 + },
  543 + {
  544 + "font_class": "sound",
  545 + "unicode": "\ue684"
  546 + },
  547 + {
  548 + "font_class": "sound-filled",
  549 + "unicode": "\ue686"
  550 + },
  551 + {
  552 + "font_class": "spinner-cycle",
  553 + "unicode": "\ue68a"
  554 + },
  555 + {
  556 + "font_class": "staff",
  557 + "unicode": "\ue6a7"
  558 + },
  559 + {
  560 + "font_class": "staff-filled",
  561 + "unicode": "\ue6cb"
  562 + },
  563 + {
  564 + "font_class": "star",
  565 + "unicode": "\ue688"
  566 + },
  567 + {
  568 + "font_class": "star-filled",
  569 + "unicode": "\ue68f"
  570 + },
  571 + {
  572 + "font_class": "starhalf",
  573 + "unicode": "\ue683"
  574 + },
  575 + {
  576 + "font_class": "trash",
  577 + "unicode": "\ue687"
  578 + },
  579 + {
  580 + "font_class": "trash-filled",
  581 + "unicode": "\ue685"
  582 + },
  583 + {
  584 + "font_class": "tune",
  585 + "unicode": "\ue6aa"
  586 + },
  587 + {
  588 + "font_class": "tune-filled",
  589 + "unicode": "\ue6ca"
  590 + },
  591 + {
  592 + "font_class": "undo",
  593 + "unicode": "\ue64f"
  594 + },
  595 + {
  596 + "font_class": "undo-filled",
  597 + "unicode": "\ue64c"
  598 + },
  599 + {
  600 + "font_class": "up",
  601 + "unicode": "\ue6b6"
  602 + },
  603 + {
  604 + "font_class": "top",
  605 + "unicode": "\ue6b6"
  606 + },
  607 + {
  608 + "font_class": "upload",
  609 + "unicode": "\ue690"
  610 + },
  611 + {
  612 + "font_class": "upload-filled",
  613 + "unicode": "\ue68e"
  614 + },
  615 + {
  616 + "font_class": "videocam",
  617 + "unicode": "\ue68c"
  618 + },
  619 + {
  620 + "font_class": "videocam-filled",
  621 + "unicode": "\ue689"
  622 + },
  623 + {
  624 + "font_class": "vip",
  625 + "unicode": "\ue6a8"
  626 + },
  627 + {
  628 + "font_class": "vip-filled",
  629 + "unicode": "\ue6c6"
  630 + },
  631 + {
  632 + "font_class": "wallet",
  633 + "unicode": "\ue6b1"
  634 + },
  635 + {
  636 + "font_class": "wallet-filled",
  637 + "unicode": "\ue6c2"
  638 + },
  639 + {
  640 + "font_class": "weibo",
  641 + "unicode": "\ue68b"
  642 + },
  643 + {
  644 + "font_class": "weixin",
  645 + "unicode": "\ue691"
  646 + }
  647 +]
  648 +
  649 +// export const fontData = JSON.parse<IconsDataItem>(fontDataJson)
... ...
  1 +{
  2 + "id": "uni-icons",
  3 + "displayName": "uni-icons 图标",
  4 + "version": "2.0.10",
  5 + "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
  6 + "keywords": [
  7 + "uni-ui",
  8 + "uniui",
  9 + "icon",
  10 + "图标"
  11 +],
  12 + "repository": "https://github.com/dcloudio/uni-ui",
  13 + "engines": {
  14 + "HBuilderX": "^3.2.14"
  15 + },
  16 + "directories": {
  17 + "example": "../../temps/example_temps"
  18 + },
  19 +"dcloudext": {
  20 + "sale": {
  21 + "regular": {
  22 + "price": "0.00"
  23 + },
  24 + "sourcecode": {
  25 + "price": "0.00"
  26 + }
  27 + },
  28 + "contact": {
  29 + "qq": ""
  30 + },
  31 + "declaration": {
  32 + "ads": "无",
  33 + "data": "无",
  34 + "permissions": "无"
  35 + },
  36 + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
  37 + "type": "component-vue"
  38 + },
  39 + "uni_modules": {
  40 + "dependencies": ["uni-scss"],
  41 + "encrypt": [],
  42 + "platforms": {
  43 + "cloud": {
  44 + "tcb": "y",
  45 + "aliyun": "y",
  46 + "alipay": "n"
  47 + },
  48 + "client": {
  49 + "App": {
  50 + "app-vue": "y",
  51 + "app-nvue": "y",
  52 + "app-uvue": "y"
  53 + },
  54 + "H5-mobile": {
  55 + "Safari": "y",
  56 + "Android Browser": "y",
  57 + "微信浏览器(Android)": "y",
  58 + "QQ浏览器(Android)": "y"
  59 + },
  60 + "H5-pc": {
  61 + "Chrome": "y",
  62 + "IE": "y",
  63 + "Edge": "y",
  64 + "Firefox": "y",
  65 + "Safari": "y"
  66 + },
  67 + "小程序": {
  68 + "微信": "y",
  69 + "阿里": "y",
  70 + "百度": "y",
  71 + "字节跳动": "y",
  72 + "QQ": "y",
  73 + "钉钉": "y",
  74 + "快手": "y",
  75 + "飞书": "y",
  76 + "京东": "y"
  77 + },
  78 + "快应用": {
  79 + "华为": "y",
  80 + "联盟": "y"
  81 + },
  82 + "Vue": {
  83 + "vue2": "y",
  84 + "vue3": "y"
  85 + }
  86 + }
  87 + }
  88 + }
  89 +}
... ...
  1 +## Icons 图标
  2 +> **组件名:uni-icons**
  3 +> 代码块: `uIcons`
  4 +
  5 +用于展示 icons 图标 。
  6 +
  7 +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons)
  8 +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
... ...
  1 +## 1.0.3(2022-01-21)
  2 +- 优化 组件示例
  3 +## 1.0.2(2021-11-22)
  4 +- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题
  5 +## 1.0.1(2021-11-22)
  6 +- 修复 vue3中scss语法兼容问题
  7 +## 1.0.0(2021-11-18)
  8 +- init
... ...
  1 +@import './styles/index.scss';
... ...
  1 +{
  2 + "id": "uni-scss",
  3 + "displayName": "uni-scss 辅助样式",
  4 + "version": "1.0.3",
  5 + "description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。",
  6 + "keywords": [
  7 + "uni-scss",
  8 + "uni-ui",
  9 + "辅助样式"
  10 +],
  11 + "repository": "https://github.com/dcloudio/uni-ui",
  12 + "engines": {
  13 + "HBuilderX": "^3.1.0"
  14 + },
  15 + "dcloudext": {
  16 + "category": [
  17 + "JS SDK",
  18 + "通用 SDK"
  19 + ],
  20 + "sale": {
  21 + "regular": {
  22 + "price": "0.00"
  23 + },
  24 + "sourcecode": {
  25 + "price": "0.00"
  26 + }
  27 + },
  28 + "contact": {
  29 + "qq": ""
  30 + },
  31 + "declaration": {
  32 + "ads": "无",
  33 + "data": "无",
  34 + "permissions": "无"
  35 + },
  36 + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
  37 + },
  38 + "uni_modules": {
  39 + "dependencies": [],
  40 + "encrypt": [],
  41 + "platforms": {
  42 + "cloud": {
  43 + "tcb": "y",
  44 + "aliyun": "y"
  45 + },
  46 + "client": {
  47 + "App": {
  48 + "app-vue": "y",
  49 + "app-nvue": "u"
  50 + },
  51 + "H5-mobile": {
  52 + "Safari": "y",
  53 + "Android Browser": "y",
  54 + "微信浏览器(Android)": "y",
  55 + "QQ浏览器(Android)": "y"
  56 + },
  57 + "H5-pc": {
  58 + "Chrome": "y",
  59 + "IE": "y",
  60 + "Edge": "y",
  61 + "Firefox": "y",
  62 + "Safari": "y"
  63 + },
  64 + "小程序": {
  65 + "微信": "y",
  66 + "阿里": "y",
  67 + "百度": "y",
  68 + "字节跳动": "y",
  69 + "QQ": "y"
  70 + },
  71 + "快应用": {
  72 + "华为": "n",
  73 + "联盟": "n"
  74 + },
  75 + "Vue": {
  76 + "vue2": "y",
  77 + "vue3": "y"
  78 + }
  79 + }
  80 + }
  81 + }
  82 +}
... ...
  1 +`uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。
  2 +
  3 +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass)
  4 +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
... ...
  1 +@import './setting/_variables.scss';
  2 +@import './setting/_border.scss';
  3 +@import './setting/_color.scss';
  4 +@import './setting/_space.scss';
  5 +@import './setting/_radius.scss';
  6 +@import './setting/_text.scss';
  7 +@import './setting/_styles.scss';
... ...
  1 +.uni-border {
  2 + border: 1px $uni-border-1 solid;
  3 +}
\ No newline at end of file
... ...
  1 +
  2 +// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐
  3 +// @mixin get-styles($k,$c) {
  4 +// @if $k == size or $k == weight{
  5 +// font-#{$k}:#{$c}
  6 +// }@else{
  7 +// #{$k}:#{$c}
  8 +// }
  9 +// }
  10 +$uni-ui-color:(
  11 + // 主色
  12 + primary: $uni-primary,
  13 + primary-disable: $uni-primary-disable,
  14 + primary-light: $uni-primary-light,
  15 + // 辅助色
  16 + success: $uni-success,
  17 + success-disable: $uni-success-disable,
  18 + success-light: $uni-success-light,
  19 + warning: $uni-warning,
  20 + warning-disable: $uni-warning-disable,
  21 + warning-light: $uni-warning-light,
  22 + error: $uni-error,
  23 + error-disable: $uni-error-disable,
  24 + error-light: $uni-error-light,
  25 + info: $uni-info,
  26 + info-disable: $uni-info-disable,
  27 + info-light: $uni-info-light,
  28 + // 中性色
  29 + main-color: $uni-main-color,
  30 + base-color: $uni-base-color,
  31 + secondary-color: $uni-secondary-color,
  32 + extra-color: $uni-extra-color,
  33 + // 背景色
  34 + bg-color: $uni-bg-color,
  35 + // 边框颜色
  36 + border-1: $uni-border-1,
  37 + border-2: $uni-border-2,
  38 + border-3: $uni-border-3,
  39 + border-4: $uni-border-4,
  40 + // 黑色
  41 + black:$uni-black,
  42 + // 白色
  43 + white:$uni-white,
  44 + // 透明
  45 + transparent:$uni-transparent
  46 +) !default;
  47 +@each $key, $child in $uni-ui-color {
  48 + .uni-#{"" + $key} {
  49 + color: $child;
  50 + }
  51 + .uni-#{"" + $key}-bg {
  52 + background-color: $child;
  53 + }
  54 +}
  55 +.uni-shadow-sm {
  56 + box-shadow: $uni-shadow-sm;
  57 +}
  58 +.uni-shadow-base {
  59 + box-shadow: $uni-shadow-base;
  60 +}
  61 +.uni-shadow-lg {
  62 + box-shadow: $uni-shadow-lg;
  63 +}
  64 +.uni-mask {
  65 + background-color:$uni-mask;
  66 +}
... ...
  1 +@mixin radius($r,$d:null ,$important: false){
  2 + $radius-value:map-get($uni-radius, $r) if($important, !important, null);
  3 + // Key exists within the $uni-radius variable
  4 + @if (map-has-key($uni-radius, $r) and $d){
  5 + @if $d == t {
  6 + border-top-left-radius:$radius-value;
  7 + border-top-right-radius:$radius-value;
  8 + }@else if $d == r {
  9 + border-top-right-radius:$radius-value;
  10 + border-bottom-right-radius:$radius-value;
  11 + }@else if $d == b {
  12 + border-bottom-left-radius:$radius-value;
  13 + border-bottom-right-radius:$radius-value;
  14 + }@else if $d == l {
  15 + border-top-left-radius:$radius-value;
  16 + border-bottom-left-radius:$radius-value;
  17 + }@else if $d == tl {
  18 + border-top-left-radius:$radius-value;
  19 + }@else if $d == tr {
  20 + border-top-right-radius:$radius-value;
  21 + }@else if $d == br {
  22 + border-bottom-right-radius:$radius-value;
  23 + }@else if $d == bl {
  24 + border-bottom-left-radius:$radius-value;
  25 + }
  26 + }@else{
  27 + border-radius:$radius-value;
  28 + }
  29 +}
  30 +
  31 +@each $key, $child in $uni-radius {
  32 + @if($key){
  33 + .uni-radius-#{"" + $key} {
  34 + @include radius($key)
  35 + }
  36 + }@else{
  37 + .uni-radius {
  38 + @include radius($key)
  39 + }
  40 + }
  41 +}
  42 +
  43 +@each $direction in t, r, b, l,tl, tr, br, bl {
  44 + @each $key, $child in $uni-radius {
  45 + @if($key){
  46 + .uni-radius-#{"" + $direction}-#{"" + $key} {
  47 + @include radius($key,$direction,false)
  48 + }
  49 + }@else{
  50 + .uni-radius-#{$direction} {
  51 + @include radius($key,$direction,false)
  52 + }
  53 + }
  54 + }
  55 +}
... ...
  1 +
  2 +@mixin fn($space,$direction,$size,$n) {
  3 + @if $n {
  4 + #{$space}-#{$direction}: #{$size*$uni-space-root}px
  5 + } @else {
  6 + #{$space}-#{$direction}: #{-$size*$uni-space-root}px
  7 + }
  8 +}
  9 +@mixin get-styles($direction,$i,$space,$n){
  10 + @if $direction == t {
  11 + @include fn($space, top,$i,$n);
  12 + }
  13 + @if $direction == r {
  14 + @include fn($space, right,$i,$n);
  15 + }
  16 + @if $direction == b {
  17 + @include fn($space, bottom,$i,$n);
  18 + }
  19 + @if $direction == l {
  20 + @include fn($space, left,$i,$n);
  21 + }
  22 + @if $direction == x {
  23 + @include fn($space, left,$i,$n);
  24 + @include fn($space, right,$i,$n);
  25 + }
  26 + @if $direction == y {
  27 + @include fn($space, top,$i,$n);
  28 + @include fn($space, bottom,$i,$n);
  29 + }
  30 + @if $direction == a {
  31 + @if $n {
  32 + #{$space}:#{$i*$uni-space-root}px;
  33 + } @else {
  34 + #{$space}:#{-$i*$uni-space-root}px;
  35 + }
  36 + }
  37 +}
  38 +
  39 +@each $orientation in m,p {
  40 + $space: margin;
  41 + @if $orientation == m {
  42 + $space: margin;
  43 + } @else {
  44 + $space: padding;
  45 + }
  46 + @for $i from 0 through 16 {
  47 + @each $direction in t, r, b, l, x, y, a {
  48 + .uni-#{$orientation}#{$direction}-#{$i} {
  49 + @include get-styles($direction,$i,$space,true);
  50 + }
  51 + .uni-#{$orientation}#{$direction}-n#{$i} {
  52 + @include get-styles($direction,$i,$space,false);
  53 + }
  54 + }
  55 + }
  56 +}
\ No newline at end of file
... ...
  1 +/* #ifndef APP-NVUE */
  2 +
  3 +$-color-white:#fff;
  4 +$-color-black:#000;
  5 +@mixin base-style($color) {
  6 + color: #fff;
  7 + background-color: $color;
  8 + border-color: mix($-color-black, $color, 8%);
  9 + &:not([hover-class]):active {
  10 + background: mix($-color-black, $color, 10%);
  11 + border-color: mix($-color-black, $color, 20%);
  12 + color: $-color-white;
  13 + outline: none;
  14 + }
  15 +}
  16 +@mixin is-color($color) {
  17 + @include base-style($color);
  18 + &[loading] {
  19 + @include base-style($color);
  20 + &::before {
  21 + margin-right:5px;
  22 + }
  23 + }
  24 + &[disabled] {
  25 + &,
  26 + &[loading],
  27 + &:not([hover-class]):active {
  28 + color: $-color-white;
  29 + border-color: mix(darken($color,10%), $-color-white);
  30 + background-color: mix($color, $-color-white);
  31 + }
  32 + }
  33 +
  34 +}
  35 +@mixin base-plain-style($color) {
  36 + color:$color;
  37 + background-color: mix($-color-white, $color, 90%);
  38 + border-color: mix($-color-white, $color, 70%);
  39 + &:not([hover-class]):active {
  40 + background: mix($-color-white, $color, 80%);
  41 + color: $color;
  42 + outline: none;
  43 + border-color: mix($-color-white, $color, 50%);
  44 + }
  45 +}
  46 +@mixin is-plain($color){
  47 + &[plain] {
  48 + @include base-plain-style($color);
  49 + &[loading] {
  50 + @include base-plain-style($color);
  51 + &::before {
  52 + margin-right:5px;
  53 + }
  54 + }
  55 + &[disabled] {
  56 + &,
  57 + &:active {
  58 + color: mix($-color-white, $color, 40%);
  59 + background-color: mix($-color-white, $color, 90%);
  60 + border-color: mix($-color-white, $color, 80%);
  61 + }
  62 + }
  63 + }
  64 +}
  65 +
  66 +
  67 +.uni-btn {
  68 + margin: 5px;
  69 + color: #393939;
  70 + border:1px solid #ccc;
  71 + font-size: 16px;
  72 + font-weight: 200;
  73 + background-color: #F9F9F9;
  74 + // TODO 暂时处理边框隐藏一边的问题
  75 + overflow: visible;
  76 + &::after{
  77 + border: none;
  78 + }
  79 +
  80 + &:not([type]),&[type=default] {
  81 + color: #999;
  82 + &[loading] {
  83 + background: none;
  84 + &::before {
  85 + margin-right:5px;
  86 + }
  87 + }
  88 +
  89 +
  90 +
  91 + &[disabled]{
  92 + color: mix($-color-white, #999, 60%);
  93 + &,
  94 + &[loading],
  95 + &:active {
  96 + color: mix($-color-white, #999, 60%);
  97 + background-color: mix($-color-white,$-color-black , 98%);
  98 + border-color: mix($-color-white, #999, 85%);
  99 + }
  100 + }
  101 +
  102 + &[plain] {
  103 + color: #999;
  104 + background: none;
  105 + border-color: $uni-border-1;
  106 + &:not([hover-class]):active {
  107 + background: none;
  108 + color: mix($-color-white, $-color-black, 80%);
  109 + border-color: mix($-color-white, $-color-black, 90%);
  110 + outline: none;
  111 + }
  112 + &[disabled]{
  113 + &,
  114 + &[loading],
  115 + &:active {
  116 + background: none;
  117 + color: mix($-color-white, #999, 60%);
  118 + border-color: mix($-color-white, #999, 85%);
  119 + }
  120 + }
  121 + }
  122 + }
  123 +
  124 + &:not([hover-class]):active {
  125 + color: mix($-color-white, $-color-black, 50%);
  126 + }
  127 +
  128 + &[size=mini] {
  129 + font-size: 16px;
  130 + font-weight: 200;
  131 + border-radius: 8px;
  132 + }
  133 +
  134 +
  135 +
  136 + &.uni-btn-small {
  137 + font-size: 14px;
  138 + }
  139 + &.uni-btn-mini {
  140 + font-size: 12px;
  141 + }
  142 +
  143 + &.uni-btn-radius {
  144 + border-radius: 999px;
  145 + }
  146 + &[type=primary] {
  147 + @include is-color($uni-primary);
  148 + @include is-plain($uni-primary)
  149 + }
  150 + &[type=success] {
  151 + @include is-color($uni-success);
  152 + @include is-plain($uni-success)
  153 + }
  154 + &[type=error] {
  155 + @include is-color($uni-error);
  156 + @include is-plain($uni-error)
  157 + }
  158 + &[type=warning] {
  159 + @include is-color($uni-warning);
  160 + @include is-plain($uni-warning)
  161 + }
  162 + &[type=info] {
  163 + @include is-color($uni-info);
  164 + @include is-plain($uni-info)
  165 + }
  166 +}
  167 +/* #endif */
... ...
  1 +@mixin get-styles($k,$c) {
  2 + @if $k == size or $k == weight{
  3 + font-#{$k}:#{$c}
  4 + }@else{
  5 + #{$k}:#{$c}
  6 + }
  7 +}
  8 +
  9 +@each $key, $child in $uni-headings {
  10 + /* #ifndef APP-NVUE */
  11 + .uni-#{$key} {
  12 + @each $k, $c in $child {
  13 + @include get-styles($k,$c)
  14 + }
  15 + }
  16 + /* #endif */
  17 + /* #ifdef APP-NVUE */
  18 + .container .uni-#{$key} {
  19 + @each $k, $c in $child {
  20 + @include get-styles($k,$c)
  21 + }
  22 + }
  23 + /* #endif */
  24 +}
... ...
  1 +// @use "sass:math";
  2 +@import '../tools/functions.scss';
  3 +// 间距基础倍数
  4 +$uni-space-root: 2 !default;
  5 +// 边框半径默认值
  6 +$uni-radius-root:5px !default;
  7 +$uni-radius: () !default;
  8 +// 边框半径断点
  9 +$uni-radius: map-deep-merge(
  10 + (
  11 + 0: 0,
  12 + // TODO 当前版本暂时不支持 sm 属性
  13 + // 'sm': math.div($uni-radius-root, 2),
  14 + null: $uni-radius-root,
  15 + 'lg': $uni-radius-root * 2,
  16 + 'xl': $uni-radius-root * 6,
  17 + 'pill': 9999px,
  18 + 'circle': 50%
  19 + ),
  20 + $uni-radius
  21 +);
  22 +// 字体家族
  23 +$body-font-family: 'Roboto', sans-serif !default;
  24 +// 文本
  25 +$heading-font-family: $body-font-family !default;
  26 +$uni-headings: () !default;
  27 +$letterSpacing: -0.01562em;
  28 +$uni-headings: map-deep-merge(
  29 + (
  30 + 'h1': (
  31 + size: 32px,
  32 + weight: 300,
  33 + line-height: 50px,
  34 + // letter-spacing:-0.01562em
  35 + ),
  36 + 'h2': (
  37 + size: 28px,
  38 + weight: 300,
  39 + line-height: 40px,
  40 + // letter-spacing: -0.00833em
  41 + ),
  42 + 'h3': (
  43 + size: 24px,
  44 + weight: 400,
  45 + line-height: 32px,
  46 + // letter-spacing: normal
  47 + ),
  48 + 'h4': (
  49 + size: 20px,
  50 + weight: 400,
  51 + line-height: 30px,
  52 + // letter-spacing: 0.00735em
  53 + ),
  54 + 'h5': (
  55 + size: 16px,
  56 + weight: 400,
  57 + line-height: 24px,
  58 + // letter-spacing: normal
  59 + ),
  60 + 'h6': (
  61 + size: 14px,
  62 + weight: 500,
  63 + line-height: 18px,
  64 + // letter-spacing: 0.0125em
  65 + ),
  66 + 'subtitle': (
  67 + size: 12px,
  68 + weight: 400,
  69 + line-height: 20px,
  70 + // letter-spacing: 0.00937em
  71 + ),
  72 + 'body': (
  73 + font-size: 14px,
  74 + font-weight: 400,
  75 + line-height: 22px,
  76 + // letter-spacing: 0.03125em
  77 + ),
  78 + 'caption': (
  79 + 'size': 12px,
  80 + 'weight': 400,
  81 + 'line-height': 20px,
  82 + // 'letter-spacing': 0.03333em,
  83 + // 'text-transform': false
  84 + )
  85 + ),
  86 + $uni-headings
  87 +);
  88 +
  89 +
  90 +
  91 +// 主色
  92 +$uni-primary: #2979ff !default;
  93 +$uni-primary-disable:lighten($uni-primary,20%) !default;
  94 +$uni-primary-light: lighten($uni-primary,25%) !default;
  95 +
  96 +// 辅助色
  97 +// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
  98 +$uni-success: #18bc37 !default;
  99 +$uni-success-disable:lighten($uni-success,20%) !default;
  100 +$uni-success-light: lighten($uni-success,25%) !default;
  101 +
  102 +$uni-warning: #f3a73f !default;
  103 +$uni-warning-disable:lighten($uni-warning,20%) !default;
  104 +$uni-warning-light: lighten($uni-warning,25%) !default;
  105 +
  106 +$uni-error: #e43d33 !default;
  107 +$uni-error-disable:lighten($uni-error,20%) !default;
  108 +$uni-error-light: lighten($uni-error,25%) !default;
  109 +
  110 +$uni-info: #8f939c !default;
  111 +$uni-info-disable:lighten($uni-info,20%) !default;
  112 +$uni-info-light: lighten($uni-info,25%) !default;
  113 +
  114 +// 中性色
  115 +// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
  116 +$uni-main-color: #3a3a3a !default; // 主要文字
  117 +$uni-base-color: #6a6a6a !default; // 常规文字
  118 +$uni-secondary-color: #909399 !default; // 次要文字
  119 +$uni-extra-color: #c7c7c7 !default; // 辅助说明
  120 +
  121 +// 边框颜色
  122 +$uni-border-1: #F0F0F0 !default;
  123 +$uni-border-2: #EDEDED !default;
  124 +$uni-border-3: #DCDCDC !default;
  125 +$uni-border-4: #B9B9B9 !default;
  126 +
  127 +// 常规色
  128 +$uni-black: #000000 !default;
  129 +$uni-white: #ffffff !default;
  130 +$uni-transparent: rgba($color: #000000, $alpha: 0) !default;
  131 +
  132 +// 背景色
  133 +$uni-bg-color: #f7f7f7 !default;
  134 +
  135 +/* 水平间距 */
  136 +$uni-spacing-sm: 8px !default;
  137 +$uni-spacing-base: 15px !default;
  138 +$uni-spacing-lg: 30px !default;
  139 +
  140 +// 阴影
  141 +$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default;
  142 +$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default;
  143 +$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default;
  144 +
  145 +// 蒙版
  146 +$uni-mask: rgba($color: #000000, $alpha: 0.4) !default;
... ...
  1 +// 合并 map
  2 +@function map-deep-merge($parent-map, $child-map){
  3 + $result: $parent-map;
  4 + @each $key, $child in $child-map {
  5 + $parent-has-key: map-has-key($result, $key);
  6 + $parent-value: map-get($result, $key);
  7 + $parent-type: type-of($parent-value);
  8 + $child-type: type-of($child);
  9 + $parent-is-map: $parent-type == map;
  10 + $child-is-map: $child-type == map;
  11 +
  12 + @if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){
  13 + $result: map-merge($result, ( $key: $child ));
  14 + }@else {
  15 + $result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) ));
  16 + }
  17 + }
  18 + @return $result;
  19 +};
... ...
  1 +// 间距基础倍数
  2 +$uni-space-root: 2;
  3 +// 边框半径默认值
  4 +$uni-radius-root:5px;
  5 +// 主色
  6 +$uni-primary: #2979ff;
  7 +// 辅助色
  8 +$uni-success: #4cd964;
  9 +// 警告色
  10 +$uni-warning: #f0ad4e;
  11 +// 错误色
  12 +$uni-error: #dd524d;
  13 +// 描述色
  14 +$uni-info: #909399;
  15 +// 中性色
  16 +$uni-main-color: #303133;
  17 +$uni-base-color: #606266;
  18 +$uni-secondary-color: #909399;
  19 +$uni-extra-color: #C0C4CC;
  20 +// 背景色
  21 +$uni-bg-color: #f5f5f5;
  22 +// 边框颜色
  23 +$uni-border-1: #DCDFE6;
  24 +$uni-border-2: #E4E7ED;
  25 +$uni-border-3: #EBEEF5;
  26 +$uni-border-4: #F2F6FC;
  27 +
  28 +// 常规色
  29 +$uni-black: #000000;
  30 +$uni-white: #ffffff;
  31 +$uni-transparent: rgba($color: #000000, $alpha: 0);
... ...
  1 +@import './styles/setting/_variables.scss';
  2 +// 间距基础倍数
  3 +$uni-space-root: 2;
  4 +// 边框半径默认值
  5 +$uni-radius-root:5px;
  6 +
  7 +// 主色
  8 +$uni-primary: #2979ff;
  9 +$uni-primary-disable:mix(#fff,$uni-primary,50%);
  10 +$uni-primary-light: mix(#fff,$uni-primary,80%);
  11 +
  12 +// 辅助色
  13 +// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
  14 +$uni-success: #18bc37;
  15 +$uni-success-disable:mix(#fff,$uni-success,50%);
  16 +$uni-success-light: mix(#fff,$uni-success,80%);
  17 +
  18 +$uni-warning: #f3a73f;
  19 +$uni-warning-disable:mix(#fff,$uni-warning,50%);
  20 +$uni-warning-light: mix(#fff,$uni-warning,80%);
  21 +
  22 +$uni-error: #e43d33;
  23 +$uni-error-disable:mix(#fff,$uni-error,50%);
  24 +$uni-error-light: mix(#fff,$uni-error,80%);
  25 +
  26 +$uni-info: #8f939c;
  27 +$uni-info-disable:mix(#fff,$uni-info,50%);
  28 +$uni-info-light: mix(#fff,$uni-info,80%);
  29 +
  30 +// 中性色
  31 +// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
  32 +$uni-main-color: #3a3a3a; // 主要文字
  33 +$uni-base-color: #6a6a6a; // 常规文字
  34 +$uni-secondary-color: #909399; // 次要文字
  35 +$uni-extra-color: #c7c7c7; // 辅助说明
  36 +
  37 +// 边框颜色
  38 +$uni-border-1: #F0F0F0;
  39 +$uni-border-2: #EDEDED;
  40 +$uni-border-3: #DCDCDC;
  41 +$uni-border-4: #B9B9B9;
  42 +
  43 +// 常规色
  44 +$uni-black: #000000;
  45 +$uni-white: #ffffff;
  46 +$uni-transparent: rgba($color: #000000, $alpha: 0);
  47 +
  48 +// 背景色
  49 +$uni-bg-color: #f7f7f7;
  50 +
  51 +/* 水平间距 */
  52 +$uni-spacing-sm: 8px;
  53 +$uni-spacing-base: 15px;
  54 +$uni-spacing-lg: 30px;
  55 +
  56 +// 阴影
  57 +$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5);
  58 +$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2);
  59 +$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5);
  60 +
  61 +// 蒙版
  62 +$uni-mask: rgba($color: #000000, $alpha: 0.4);
... ...