eims-ui-mobile/src/pages.json
@@ -67,6 +67,7 @@ "path": "pages/equ/equ-list", "type": "page", "layout": "default", "needLogin": true, "style": { "navigationBarTitleText": "设å¤å表" } @@ -91,6 +92,7 @@ { "path": "pages/inspect/insp-record", "type": "page", "needLogin": true, "style": { "navigationBarTitleText": "ç¹æ£è®°å½", "navigationStyle": "custom", @@ -101,6 +103,7 @@ "path": "pages/inspect/insp-st", "type": "page", "layout": "default", "needLogin": true, "style": { "navigationBarTitleText": "ç¹æ£æ±æ»" } @@ -114,17 +117,39 @@ } }, { "path": "pages/maint/maint-order", "type": "page", "needLogin": true, "style": { "navigationBarTitleText": "ä¿å »å·¥å", "navigationStyle": "custom", "navigationBarBackgroundColor": "#4D80F0" } }, { "path": "pages/maint/maint-st", "type": "page", "layout": "default", "needLogin": true, "style": { "navigationBarTitleText": "ä¿å »æ±æ»" } }, { "path": "pages/maint/order-detail", "type": "page", "needLogin": true, "style": { "navigationBarTitleText": "å·¥åæç»", "navigationStyle": "custom", "navigationBarBackgroundColor": "#4D80F0" } }, { "path": "pages/my/index", "type": "page", "layout": "tabbar", "needLogin": true, "style": { "navigationBarTitleText": "æç" } @@ -133,6 +158,7 @@ "path": "pages/spare/index", "type": "page", "layout": "tabbar", "needLogin": true, "style": { "navigationBarTitleText": "spare" } eims-ui-mobile/src/pages/equ/equ-list.vue
@@ -1,6 +1,7 @@ <route lang="json5" type="page"> { layout: 'default', needLogin: true, style: { navigationBarTitleText: '设å¤å表', }, eims-ui-mobile/src/pages/inspect/insp-record.vue
@@ -1,5 +1,6 @@ <route lang="json5"> { needLogin: true, style: { navigationBarTitleText: 'ç¹æ£è®°å½', navigationStyle: 'custom', @@ -52,7 +53,7 @@ <view class="text-color-gray text-xs mt-2 flex"> <text>ç¶æï¼</text> <template v-if="dataCount > 0 && dataCount === checkCount"> <wd-icon class="icon-color-success" name="check-outline" size="40rpx"></wd-icon> <wd-icon class="icon-color-success" name="check-outline" size="34rpx"></wd-icon> <text class="ml-1">已宿</text> </template> <template v-else> @@ -330,5 +331,6 @@ :deep(.wd-navbar__title) { color: white; font-weight: 0; font-size: 32rpx; } </style> eims-ui-mobile/src/pages/inspect/insp-st.vue
@@ -1,6 +1,7 @@ <route lang="json5" type="page"> { layout: 'default', needLogin: true, style: { navigationBarTitleText: 'ç¹æ£æ±æ»', }, @@ -54,7 +55,7 @@ <view class="text-color-gray text-xs mt-2 flex"> <text>ç¶æï¼</text> <template v-if="item.recordCount === item.checkCount"> <wd-icon class="icon-color-success" name="check-outline" size="40rpx"></wd-icon> <wd-icon class="icon-color-success" name="check-outline" size="34rpx"></wd-icon> <text class="ml-1">已宿</text> </template> <template v-else> @@ -120,7 +121,6 @@ paging.value.reload() } onLoad(() => { queryList() uni.$on('insp-st-refresh', reloadData) }) onUnload(() => { eims-ui-mobile/src/pages/maint/maint-order.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,388 @@ <route lang="json5" type="page"> { needLogin: true, style: { navigationBarTitleText: 'ä¿å »å·¥å', navigationStyle: 'custom', navigationBarBackgroundColor: '#4D80F0', }, } </route> <template> <z-paging ref="paging" v-model="dataList" @query="queryList" show-refresher-update-time> <template #top> <wd-navbar title="ä¿å »å·¥å" left-arrow @click-left="goBack" right-text="æäº¤" @click-right="handleClickRight" custom-style="background: #4D80F0;" safeAreaInsetTop ></wd-navbar> <wd-cell> <template #title> <text class="text-color-gray">设å¤</text> </template> </wd-cell> <view class="h-[2px] w-full bg-base"></view> <wd-card type="rectangle"> <template #title> <view class="flex justify-between"> <view class="flex items-center menu-title-box"> <view class="menu-indicator"></view> <view class="ml-1 text-sm align-center">{{ maintSt.equName }}</view> <view class="text-color-gray ml-2 text-mini">{{ maintSt.assetNo }}</view> </view> <view class="flex items-center"> <text class="text-color-gray text-mini">{{ maintSt.planTime }}</text> </view> </view> </template> <view class="flex h-[100rpx]" items-center> <image class="slot-img text-center" src="/static/images/camera.png" /> <view class="flex-1"> <view class="text-color-gray text-xs mt-1 flex"> <text class="mr-3">工忻æ°: {{ maintSt.orderCount }}</text> | <text class="mx-3">已宿: {{ maintSt.wcCount }}</text> </view> <view class="text-color-gray text-xs mt-2 flex"> <text class="mr-3">å¾ ä¿å »: {{ maintSt.dbyCount }}</text> | <text class="mx-3">ä¿å »ä¸: {{ maintSt.byCount }}</text> | <text class="ml-3">å¾ éªè¯: {{ maintSt.dyzCount }}</text> </view> <view class="text-color-gray text-xs mt-2 flex"> <text>ç¶æï¼</text> <template v-if="maintSt.orderCount === maintSt.wcCount"> <wd-icon class="icon-color-success" name="check-outline" size="34rpx"></wd-icon> <text class="ml-1">已宿</text> </template> <template v-else> <wd-icon class="icon-color-base" name="detection" size="40rpx"></wd-icon> <text class="ml-1">è¿è¡ä¸</text> </template> </view> </view> </view> </wd-card> </template> <view class="bg-base"> <view class="w-full h-[24rpx]"></view> <wd-cell class="mb-[2px]"> <template #title> <text class="text-color-gray">ä¿å »é¡¹</text> </template> </wd-cell> <wd-card type="rectangle" v-for="(item, index) in dataList" :key="item.id"> <template #title> <view class="flex justify-between"> <view class="flex items-center menu-title-box"> <view class="menu-indicator"></view> <view class="ml-1 text-sm align-center w-[50%]"> <wd-text :text="item.maintName" :lines="1"></wd-text> </view> <view class="text-color-gray ml-2 text-mini">{{ item.maintCode }}</view> </view> <view class="flex items-center w-[20%] justify-end"> <text class="text-color-gray text-mini"> {{ item?.planTime }} </text> </view> </view> </template> <view class="flex h-[140rpx]" items-center> <image class="slot-img text-center" src="/static/ico/ico-platform.png" /> <view class="flex-1 text-color-gray text-xs flex-row"> <view class="mr-3 mt-2">计åä¿å »æ¥æ: {{ item.planTime }}</view> <view class="mr-3 mt-2">ä¿å »å¼å§æ¶é´: {{ item.startTime }}</view> <view class="mr-3 mt-2">ä¿å »ç»ææ¶é´: {{ item.endTime }}</view> <view class="text-color-gray text-xs mt-2 flex"> <text>ç¶æï¼</text> <template v-if="item.status === '0'"> <wd-icon class="icon-color-warning" name="books" size="34rpx"></wd-icon> <text class="ml-1">å¾ ä¿å »</text> </template> <template v-else-if="item.status === '1'"> <wd-icon class="icon-color-base" name="books" size="34rpx"></wd-icon> <text class="ml-1">ä¿å »ä¸</text> </template> <template v-else-if="item.status === '2'"> <wd-icon class="icon-color-purple" name="books" size="34rpx"></wd-icon> <text class="ml-1">å¾ éªè¯</text> </template> <template v-else-if="item.status === '3'"> <wd-icon class="icon-color-success" name="check-outline" size="34rpx"></wd-icon> <text class="ml-1">已宿</text> </template> <text class="mx-3">|</text> <wd-icon class="icon-color-base" name="camera" size="30rpx"></wd-icon> <text class="ml-1">{{ item.maintUserName }}</text> </view> </view> <!--æä½å·¥æç»´ä¿®å·¥è§è²--> <template v-if="isOperatorOrRepair()"> <wd-button v-if="item.status === '0'" size="small" icon="edit-outline" @click.stop="handleStartMaint(item)" > å¼å§ä¿å » </wd-button> <wd-button v-if="item.status === '1'" size="small" icon="edit-outline" @click.stop="itemClick(item)" > ä¿å »ä¸ </wd-button> <wd-button v-if="item.status === '2'" size="small" icon="edit-outline" @click.stop="itemClick(item)" > å¾ éªè¯ </wd-button> <wd-button v-if="item.status === '3'" size="small" icon="check-outline" @click.stop="itemClick(item)" > 已宿 </wd-button> </template> <!--管çåè§è²--> <template v-else-if="isLeader()"> <wd-button v-if="item.status === '0'" size="small" icon="warn-bold" disabled > å¾ ä¿å » </wd-button> <wd-button v-if="item.status === '1'" size="small" icon="warn-bold" disabled > ä¿å »ä¸ </wd-button> <wd-button v-if="item.status === '2'" size="small" icon="edit-outline" @click.stop="itemClick(item)" > å¾ éªè¯ </wd-button> <wd-button v-if="item.status === '3'" size="small" icon="check-outline" @click.stop="itemClick(item)" > 已宿 </wd-button> </template> </view> </wd-card> <wd-cell> <template #title> <text class="text-color-gray">å ¶ä»ä¿¡æ¯</text> </template> </wd-cell> <view class="h-[2px] w-full bg-base"></view> <wd-textarea label="ç¹è®°äºé¡¹" label-width="200rpx" type="textarea" v-model="maintSt.specialNote" auto-height :maxlength="200" show-word-limit placeholder="请è¾å ¥ç¹è®°äºé¡¹" clearable /> </view> </z-paging> </template> <script setup lang="ts"> import type { MaintStVO } from '@/service/maint.d' import { getMaintSt, getMaintStOrderList, updateMaintOrder } from '@/service/maint' import { ref, reactive } from 'vue' import { useToast, useMessage } from 'wot-design-uni' import { isLeader, isOperatorOrRepair } from '@/utils/RoleUtils' const message = useMessage() const paging = ref(null) const dataList = ref([]) interface QueryParams { pageNum: number pageSize: number maintCode: string status?: string } const maintSt = reactive<MaintStVO>({ id: '', equName: '', assetNo: '', planTime: '', orderCount: null, wcCount: null, dbyCount: null, byCount: null, dyzCount: null, specialNote: '', }) const queryList = (pageNum?: number, pageSize?: number) => { const params: QueryParams = { pageNum, pageSize, maintCode: maintCode.value, } getMaintStOrderList(params) .then((res: any) => { // 请å¿å¨ç½ç»è¯·æ±åè°ä¸ç»dataListèµå¼ï¼ï¼åªéè¦è°ç¨completeå°±å¯ä»¥äº paging.value.complete(res.rows) }) .catch((res) => { // å¦æè¯·æ±å¤±è´¥åpaging.value.complete(false)ï¼ä¼èªå¨å±ç¤ºéè¯¯é¡µé¢ // 注æï¼æ¯æ¬¡é½éè¦å¨catchä¸åè¿å¥è¯å¾éº»ç¦ï¼z-pagingæä¾äºæ¹æ¡å¯ä»¥å ¨å±ç»ä¸å¤ç // å¨åºå±çç½ç»è¯·æ±æåºå¼å¸¸æ¶ï¼åuni.$emit('z-paging-error-emit');å³å¯ paging.value.complete(false) }) } function itemClick(item) { goToOrderDetail(item) } function goToOrderDetail(item) { uni.navigateTo({ url: `/pages/maint/order-detail?id=${item.id}`, }) } function handleStartMaint(item) { message .confirm({ msg: 'ç¡®å®å¼å§ä¿å »ï¼', title: 'æç¤º', beforeConfirm: ({ resolve }) => { // 确认å¼å§ä¿®æ¹ç¶æä¸º1-ä¿å »ä¸ const data = Object.assign({}, item) data.status = '1' updateOrder(data, resolve) }, }) .then(() => {}) .catch((error) => { console.log(error) }) } /** * æ´æ°ä¿å »å·¥å * @param item * @param resolve */ function updateOrder(data: any, resolve: any) { updateMaintOrder(data) .then((res: any) => { resolve(true) if (res?.code === 200) { reloadData() } }) .catch((res) => { console.error(res) }) } function reloadData() { paging.value.reload() } const goBack = () => { uni.navigateBack() } function handleClickRight() {} /** * æ¥è¯¢ä¿å »æç»éè¦çcode */ const maintCode = computed(() => `${maintSt.equId}_${maintSt.planTime}`) onLoad((options) => { const itemString = decodeURIComponent(options.maintSt) const item = JSON.parse(itemString) Object.assign(maintSt, item) }) </script> <style scoped lang="scss"> .menu-title-box { height: 30rpx; line-height: 30rpx; } .slot-img { width: 72rpx; height: 72rpx; margin-right: 24rpx; } .text-mini { font-size: 22rpx; } .menu-indicator { width: 6rpx; height: 22rpx; border-radius: 10rpx; background-color: $uni-color-primary; } :deep(.wd-card__footer) { padding: 10rpx !important; } .col-title-box { } .bg-primary { background: $uni-color-primary; } :deep(.wd-navbar__text) { font-size: 26rpx; color: white; } :deep(.wd-icon-arrow-left:before), :deep(.wd-navbar__title) { color: white; font-weight: 0; font-size: 32rpx; } </style> eims-ui-mobile/src/pages/maint/maint-st.vue
@@ -1,6 +1,7 @@ <route lang="json5" type="page"> { layout: 'default', needLogin: true, style: { navigationBarTitleText: 'ä¿å »æ±æ»', }, @@ -23,13 +24,15 @@ <view class="flex justify-between"> <view class="flex items-center menu-title-box"> <view class="menu-indicator"></view> <view class="ml-1 text-sm align-center">{{ item.equName }}</view> <view class="ml-1 text-sm align-center w-[50%]"> <wd-text :text="item.equName" :lines="1"></wd-text> </view> <view class="text-color-gray ml-2 text-mini">{{ item.assetNo }}</view> </view> <view class="flex items-center"> <view class="flex items-center w-[20%] justify-end"> <text class="text-color-gray text-mini"> {{ status === 'Day' ? item?.planTimeStr : item?.planTimeStr?.substring(0, 7) || '' }} {{ item?.planTime }} </text> </view> </view> @@ -38,21 +41,21 @@ <image class="slot-img text-center" src="/static/images/camera.png" /> <view class="flex-1"> <view class="text-color-gray text-xs mt-1 flex"> <text class="mr-3">ç¹æ£æ»æ°: {{ item.recordCount }}</text> <text class="mr-3">工忻æ°: {{ item.orderCount }}</text> | <text class="mx-3">å·²ç¹æ£: {{ item.checkCount }}</text> | <text class="ml-3">æªç¹æ£: {{ item.unCheckCount }}</text> <text class="mx-3">已宿: {{ item.wcCount }}</text> </view> <view class="text-color-gray text-xs mt-2 flex"> <text class="mr-3">æ£å¸¸: {{ item.normalNum }}</text> <text class="mr-3">å¾ ä¿å »: {{ item.dbyCount }}</text> | <text class="mx-3">å¼å¸¸: {{ item.abNormalNum }}</text> <text class="mx-3">ä¿å »ä¸: {{ item.byCount }}</text> | <text class="ml-3">å¾ éªè¯: {{ item.dyzCount }}</text> </view> <view class="text-color-gray text-xs mt-2 flex"> <text>ç¶æï¼</text> <template v-if="item.recordCount === item.checkCount"> <wd-icon class="icon-color-success" name="check-outline" size="40rpx"></wd-icon> <template v-if="item.orderCount === item.wcCount"> <wd-icon class="icon-color-success" name="check-outline" size="34rpx"></wd-icon> <text class="ml-1">已宿</text> </template> <template v-else> @@ -83,7 +86,7 @@ const equName = ref<string>('-1') const statusList = ref<Record<string, any>[]>([ { label: 'å ¨é¨', value: '-1' }, { label: 'ææç¶æ', value: '-1' }, { label: 'å¾ ä¿å »', value: '0' }, { label: 'ä¿å »ä¸', value: '1' }, { label: 'å¾ éªè¯', value: '2' }, @@ -128,9 +131,9 @@ } function itemClick(item) { const inspCode = `${item.equId}_${item.planTime}_${status.value}` const itemString = encodeURIComponent(JSON.stringify(item)) uni.navigateTo({ url: `/pages/inspect/insp-record?id=${item.id}&inspCode=${inspCode}&specialNote=${item.specialNote ?? ''}&equName=${item.equName ?? ''}&assetNo=${item.assetNo ?? ''}&planTimeStr=${item.planTimeStr ?? ''}`, url: `/pages/maint/maint-order?maintSt=${itemString}`, }) } eims-ui-mobile/src/pages/maint/order-detail.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,228 @@ <route lang="json5" type="page"> { needLogin: true, style: { navigationBarTitleText: 'å·¥åæç»', navigationStyle: 'custom', navigationBarBackgroundColor: '#4D80F0', }, } </route> <template> <view class="bg-base h-[100vh]"> <wd-navbar title="å·¥åæç»" left-arrow @click-left="goBack" right-text="æäº¤" @click-right="handleClickRight" custom-style="background: #4D80F0;" safeAreaInsetTop ></wd-navbar> <wd-form ref="form" :model="order" :rules="rules"> <wd-cell-group custom-class="group" title="设å¤ä¿¡æ¯" border> <wd-cell title="设å¤åç§°" title-width="200rpx" is-link> <text>{{ order?.equName }}</text> </wd-cell> <wd-cell title="èµäº§ç¼å·" title-width="200rpx" is-link> <text>{{ order?.assetNo }}</text> </wd-cell> </wd-cell-group> <wd-cell-group custom-class="mt-2" title="ä¿å »ä¿¡æ¯" border> <wd-cell title="ä¿å »åå·" title-width="200rpx" is-link> <text>{{ order?.maintCode }}</text> </wd-cell> <wd-cell title="ä¿å »é¡¹" title-width="200rpx" is-link> <text>{{ order?.maintName }}</text> </wd-cell> <wd-cell title="计åä¿å »æ¥æ" title-width="200rpx" is-link> <text>{{ order?.planTime }}</text> </wd-cell> <wd-datetime-picker label="ä¿å »å¼å§æ¶é´" label-width="200rpx" placeholder="è¯·éæ©æ¶é´" prop="startTime" v-model="startTime" @open="openStartTime" @confirm="handleStartTime" /> <wd-datetime-picker label="ä¿å »ç»ææ¶é´" label-width="200rpx" placeholder="è¯·éæ©æ¶é´" prop="endTime" v-model="endTime" @open="openEndTime" @confirm="handleEndTime" /> <wd-textarea label="å·¥ä½æè¿°" label-width="200rpx" type="textarea" v-model="order.maintDesc" auto-height :maxlength="200" show-word-limit placeholder="请è¾å ¥å·¥ä½æè¿°" clearable /> <wd-cell title="ä¿å »å¾ç" title-width="200rpx" prop="fileList"> <wd-upload :auto-upload="false" :file-list="fileList" @change="handleFileChange" ></wd-upload> </wd-cell> <wd-textarea label="夿³¨" label-width="200rpx" type="textarea" v-model="order.remark" auto-height :maxlength="200" show-word-limit placeholder="请è¾å ¥å¤æ³¨" clearable /> </wd-cell-group> </wd-form> </view> </template> <script setup lang="ts"> import { getMaintOrder, updateMaintOrder } from '@/service/maint' import { formatDate } from '@/utils/DateUtils' import { reactive } from 'vue' import { FormRules } from 'wot-design-uni/components/wd-form/types' import { useToast, useMessage } from 'wot-design-uni' const message = useMessage() const fileList = ref<[]>() const startTime = ref<number>(0) const endTime = ref<number>(0) interface MaintOrder { id: string equName: string maintCode: string maintName: string planTime: string startTime: string endTime?: string maintDesc: string remark: string } const order = reactive<MaintOrder>({ id: '', equName: '', maintCode: '', maintName: '', planTime: '', startTime: '', endTime: '', maintDesc: '', remark: '', }) const rules: FormRules = { startTime: [ { required: true, message: 'è¯·éæ©ä¿å »å¼å§æ¶é´', }, ], endTime: [ { required: true, message: 'è¯·éæ©ä¿å »ç»ææ¶é´', }, ], maintDesc: [ { required: true, message: '请è¾å ¥å·¥ä½æè¿°', }, ], } function openStartTime() { if (startTime.value === 0) { startTime.value = Date.now() } } function openEndTime() { if (endTime.value === 0) { endTime.value = Date.now() } } function handleStartTime(value) { order.startTime = formatDate(new Date(value.value)) } function handleEndTime(value) { order.endTime = formatDate(new Date(value.value)) } function handleFileChange({ fileList }) {} function initMaintOrder(id: any) { getMaintOrder(id) .then((res: any) => { Object.assign(order, res) startTime.value = new Date(order.startTime).getTime() endTime.value = new Date(order.endTime).getTime() }) .catch((res) => {}) } function updateOrder(resolve: any) { updateMaintOrder(order) .then((res: any) => { resolve(true) }) .catch((res) => { console.error(res) }) } const goBack = () => { uni.navigateBack() } function handleClickRight() { message .confirm({ msg: 'ç¡®å®æäº¤ï¼', title: 'æç¤º', beforeConfirm: ({ resolve }) => { updateOrder(resolve) }, }) .then(() => {}) .catch((error) => { console.log(error) }) } onLoad((options) => { initMaintOrder(options.id) }) </script> <style scoped lang="scss"> :deep(.wd-navbar__text) { font-size: 26rpx; color: white; } :deep(.wd-icon-arrow-left:before), :deep(.wd-navbar__title) { color: white; font-weight: bold !important; font-size: 32rpx; } </style> eims-ui-mobile/src/pages/my/index.vue
@@ -1,6 +1,7 @@ <route lang="json5" type="page"> { layout: 'tabbar', needLogin: true, style: { navigationBarTitleText: 'æç', }, eims-ui-mobile/src/pages/spare/index.vue
@@ -1,6 +1,7 @@ <route lang="json5" type="page"> { layout: 'tabbar', needLogin: true, style: { navigationBarTitleText: 'spare', }, eims-ui-mobile/src/service/maint.d.ts
@@ -7,38 +7,146 @@ /** * */ title: string; title?: string; /** * */ equId: number | string; status: string; equId?: number | string; equName?: string; assetNo?: string; status?: string; /** * */ planTime: string; planTime?: string; /** * ä¿å »äºº */ maintUser: number; maintUser?: number; orderCount?: number, wcCount?: number, dbyCount?: number, byCount?: number, dyzCount?: number, /** * éªè¯äºº */ verifyUser: number; verifyTime: string; verifyUser?: number; verifyTime?: string; /** * ç¹è®°äºé¡¹ */ specialNote: string; specialNote?: string; /** * 夿³¨ */ remark: string; remark?: string; } export interface MaintOrderVO { /** * */ id: number | string; /** * */ equId?: number | string; equName?: string; assetNo?: string; /** * 计å表åä½-ä¿å »ç±»åï¼åå ¸ï¼ */ maintType?: string; /** * å·¥ä½æè¿° */ maintDesc?: string; /** * 计å表åä½-ä¿å »å¨æ */ maintCycle?: number; /** * 计å表åä½-ä¿å »å¨æåä½ï¼åå ¸ï¼ */ maintCycleUnit?: string; /** * 计å表åä½- ä¿å »è§åï¼åå ¸ï¼ä¿å »æ¶é´è®¡ç®ï¼1-æå¨æ 2-æä¸æ¬¡ä¿å »æ¶é´ */ maintRule?: string; /** * 计å表åä½-ä¿å »äºº */ maintUser?: number; maintUserName?: string; /** * 计å表åä½-ä¿å »é¨é¨ */ maintDept?: number; /** * ä¿å »åå· */ maintCode?: string; maintName?: string; /** * */ status?: string; verifyUser?: number; /** * éªè¯äºº */ verifyUserName?: string; /** * ä¿å »è®¡åæ¶é´ */ planTime?: number | string; /** * ä¿å »å¼å§æ¶é´ */ startTime: any; /** * ä¿å »ç»ææ¶é´ */ endTime: any; /** * 计åid */ planId?: number | string; /** * å建æ¶é´ */ createTime?: string; /** * 夿³¨ */ remark?: string; } eims-ui-mobile/src/service/maint.ts
@@ -1,5 +1,14 @@ import { http } from '@/utils/http' import type { MaintStVO } from './maint.d' import type { MaintStVO, MaintOrderVO } from './maint.d' type ID = number | string /** * æ ¹æ®idæ¥è¯¢æ±æ» * @param id */ export const getMaintSt = (id: ID) => { return http.get<MaintStVO>(`/eims/maintSt/${id}`) } /** * ä¿å »æ±æ»å表 @@ -7,3 +16,26 @@ export const getMaintStList = (params: any) => { return http.get<MaintStVO[]>('/eims/maintSt/list', params) } /** * æ ¹æ®idæ¥è¯¢å·¥å * @param id */ export const getMaintOrder = (id: ID) => { return http.get<MaintOrderVO>(`/eims/maintOrder/${id}`) } /** * ä¿å »æ±æ»å表ä¸ä¿å »å·¥åå表 */ export const getMaintStOrderList = (params: any) => { return http.get<MaintOrderVO[]>('/eims/maintOrder/detailList', params) } /** * æ´æ°ä¿å »å·¥å * @param data */ export const updateMaintOrder = (data: any) => { return http.put<void>('/eims/maintOrder', data) } eims-ui-mobile/src/static/ico/ico-platform.png
eims-ui-mobile/src/style/index.scss
@@ -36,6 +36,13 @@ color: $uni-color-success; } .icon-color-warning { color: $uni-color-warning; } .icon-color-purple { color: #824eed; } .bg-base { background: $uni-bg-color-grey; } eims-ui-mobile/src/types/uni-pages.d.ts
@@ -11,7 +11,9 @@ "/pages/inspect/insp-record" | "/pages/inspect/insp-st" | "/pages/login/index" | "/pages/maint/maint-order" | "/pages/maint/maint-st" | "/pages/maint/order-detail" | "/pages/my/index" | "/pages/spare/index"; } eims-ui-mobile/src/utils/DateUtils.ts
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,5 @@ import dayjs from 'dayjs' export function formatDate(inputDate: Date) { return dayjs(inputDate).format('YYYY-MM-DD HH:mm:ss') } eims-ui-mobile/src/utils/RoleUtils.ts
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,41 @@ import { useUserStore } from '@/store' // import { ROLE_OPERATOR, ROLE_REPAIR, ROLE_LEADER, ROLE_LINE, ROLE_SUPER_ADMIN } from '@/utils/constants' /** * è¶ çº§ç®¡çå */ export const ROLE_SUPER_ADMIN = 'superadmin' /** * é¢å¯¼ */ export const ROLE_LEADER = 'leader' /** * æä½å */ export const ROLE_OPERATOR = 'operator' /** * çº¿é¿ */ export const ROLE_LINE = 'line' /** * ç»´ä¿®å */ export const ROLE_REPAIR = 'repair' /** * ç»å½è§è²æ¯æä½å·¥æç»´ä¿®å·¥ */ export const isOperatorOrRepair = () => { const roles = useUserStore()?.userInfo?.roles || [] return roles.includes(ROLE_OPERATOR) || roles.includes(ROLE_REPAIR) } /** * ç»å½è§è²æ¯æä½å·¥æç»´ä¿®å·¥ */ export const isLeader = () => { const roles = useUserStore()?.userInfo?.roles || [] return ( roles.includes(ROLE_LINE) || roles.includes(ROLE_SUPER_ADMIN) || roles.includes(ROLE_LEADER) ) } eims/ruoyi-modules/lb-eims/src/main/java/org/dromara/eims/service/impl/EimsMaintOrderServiceImpl.java
@@ -21,7 +21,9 @@ import org.dromara.common.satoken.utils.LoginHelper; import org.dromara.eims.domain.EimsMaintPlan; import org.dromara.eims.domain.bo.EimsMaintPlanBo; import org.dromara.eims.domain.vo.EimsEquVo; import org.dromara.eims.domain.vo.MaintOrdeGroupVo; import org.dromara.eims.mapper.EimsEquMapper; import org.dromara.eims.mapper.EimsMaintPlanMapper; import org.dromara.system.domain.SysDept; import org.dromara.system.domain.vo.SysDeptVo; @@ -49,6 +51,7 @@ private final EimsMaintOrderMapper baseMapper; private final EimsMaintPlanMapper planMapper; private final SysDeptMapper sysDeptMapper; private final EimsEquMapper equMapper; /** * æ¥è¯¢ä¿å »å·¥å @@ -58,7 +61,13 @@ */ @Override public EimsMaintOrderVo queryById(Long id){ return baseMapper.selectVoById(id); EimsMaintOrderVo orderVo = baseMapper.selectVoById(id); EimsEquVo equVo = equMapper.selectVoById(orderVo.getEquId()); if(equVo!=null){ orderVo.setEquName(equVo.getEquName()); orderVo.setAssetNo(equVo.getAssetNo()); } return orderVo; } /**