Commit 853ceb29 by pangchong

feat: 提交

parent 542358e1
import { http } from 'mocp/utils/http' import { http } from 'mocp/utils/http'
export const getWorkTaskListApi = (data, config) => { export const getAogListApi = (data, config) => {
return http({ return http({
method: 'POST', method: 'POST',
url: '/workbench/getWorkTaskList', url: '/technical-support/getAogList',
data,
config
})
}
export const WorkTaskIsSuccessApi = (data, config) => {
return http({
method: 'POST',
url: '/workbench/WorkTaskIsSuccess',
data, data,
config config
}) })
......
// 建议以文件名首字母作为前缀aog_ // 建议以文件名首字母作为前缀aog_
export const aog_state = [ export const aog_state = [
{ label: 'OPEN', value: '1' }, { label: 'OPEN', value: '1' },
{ label: 'CLOSE', value: '2' } { label: '跟踪', value: '2' },
{ label: 'CLOSE', value: '3' }
] ]
...@@ -3,3 +3,4 @@ export * from './assign-work' ...@@ -3,3 +3,4 @@ export * from './assign-work'
export * from './move-decision' export * from './move-decision'
export * from './technology-evaluation' export * from './technology-evaluation'
export * from './work-assignment' export * from './work-assignment'
export * from './aog'
import useUserStore from 'mocp/store/user' import useUserStore from 'mocp/store/user'
const baseURL = 'https://hna-platform.anyremote.cn' // const baseURL = 'https://hna-platform.anyremote.cn'
const baseURL = 'https://moc.hnatechnic.com/api'
class ServiceLoading { class ServiceLoading {
open(loading) { open(loading) {
......
...@@ -11,32 +11,31 @@ ...@@ -11,32 +11,31 @@
navRightType="icon" navRightType="icon"
navRightIcon="saixuan-01" navRightIcon="saixuan-01"
@handleRightClick="handleRightClick" @handleRightClick="handleRightClick"
:api="getWorkTaskListApi" :api="getAogListApi"
:padding="24" :padding="24"
> >
<template #="{ dataList }"> <template #="{ dataList }">
<view class="item" v-for="item in dataList" :key="item.id" @tap="goDetails(item)"> <view class="item" v-for="item in dataList" :key="item.id" @tap="goDetails(item)">
<view class="item-title"> <view class="item-title">
<view class="left"> <view class="left">
<custom-state :value="useGetDictByValue('wa_state', item.state)"></custom-state> <custom-state :value="useGetDictByValue('aog_state', item.state)"></custom-state>
<text class="txt u-line-1" v-if="item.machineNumber">{{ item.machineNumber }}</text> <text class="txt u-line-1" v-if="item.aogNum">{{ item.aogNum }}</text>
</view>
<view class="right">
<global-tag :type="useGetDictByValue('wa_isSuccessType', item.isSuccess)">
{{ useGetDictByValue('wa_isSuccess', item.isSuccess) }}
</global-tag>
</view> </view>
</view> </view>
<view class="item-content u-line-3"> <view class="item-content u-line-3">
{{ item.taskDescription || '无' }} {{ item.faultDesc || '无' }}
</view> </view>
<view class="item-footer"> <view class="item-footer">
<view class="label"> <view class="left">
<global-icon icon="calendar"></global-icon> <text class="txt u-line-1" v-if="item.machineNumber">{{ item.machineNumber }}</text>
<text class="txt"> <text class="txt u-line-1" v-if="item.model">{{ item.model }}</text>
{{ timeStampFormat(item.feedbackTime, { format: 'YYYY/MM/DD' }) }} <text class="txt u-line-1" v-if="item.aviation">
{{ useGetDictByValue('', item.aviation, { data: baseStore.getAirlineSelect }) }}
</text> </text>
</view> </view>
<view class="right">
<text class="txt u-line-1" v-if="item.terminal">{{ item.terminal }}</text>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -45,13 +44,14 @@ ...@@ -45,13 +44,14 @@
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import { timeStampFormat } from 'mocp/utils/tool'
import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict' import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import { onUnload } from '@dcloudio/uni-app' import { onUnload } from '@dcloudio/uni-app'
import { getWorkTaskListApi } from 'mocp/api/work-assignment'
import useAogStore from 'mocp/store/aog' import useAogStore from 'mocp/store/aog'
import { getAogListApi } from 'mocp/api/aog'
import useBaseStore from 'mocp/store/base'
const baseStore = useBaseStore()
//跳转 //跳转
const aogStore = useAogStore() const aogStore = useAogStore()
const { searchData } = storeToRefs(aogStore) const { searchData } = storeToRefs(aogStore)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="search-form"> <view class="search-form">
<up-form labelPosition="left" labelWidth="auto"> <up-form labelPosition="left" labelWidth="auto">
<up-form-item label="状态" prop="state" :borderBottom="true"> <up-form-item label="状态" prop="state" :borderBottom="true">
<global-picker v-model="formData.state" pickAlign="right" clearable dictkey="wa_state"></global-picker> <global-picker v-model="formData.state" pickAlign="right" clearable dictkey="aog_state"></global-picker>
</up-form-item> </up-form-item>
<up-form-item label="机号" prop="machineNumber" :borderBottom="true"> <up-form-item label="机号" prop="machineNumber" :borderBottom="true">
<global-picker pickAlign="right" v-model="formData.machineNumber" :options="deviceNumList" clearable filter></global-picker> <global-picker pickAlign="right" v-model="formData.machineNumber" :options="deviceNumList" clearable filter></global-picker>
......
...@@ -7,8 +7,11 @@ ...@@ -7,8 +7,11 @@
<view class="navbar-box-weather" v-if="weatherInfo"> <view class="navbar-box-weather" v-if="weatherInfo">
<!-- <image src="/static/mocp/image/panel/weather.png" /> --> <!-- <image src="/static/mocp/image/panel/weather.png" /> -->
<view class="info"> <view class="info">
<view class="place">{{ baseStore.getTerminalObject[userStore.userInfo?.terminal] }}</view> <view class="place">{{ baseStore.getTerminalObject[userStore.userInfo?.terminal || 'WUH'] }}</view>
<view class="txt">{{ weatherInfo.weatherInfoTxt }} {{ weatherInfo.temperature }}°</view> <view class="msg">
<up-parse :content="weatherInfo.weatherInfoTxt"></up-parse>
<view class="txt">{{ weatherInfo.temperature }}°</view>
</view>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -28,9 +28,13 @@ ...@@ -28,9 +28,13 @@
.place { .place {
font-size: 28rpx; font-size: 28rpx;
} }
.msg {
display: flex;
justify-content: flex-end;
align-items: center;
}
.txt { .txt {
margin-left: 8rpx; margin-left: 8rpx;
font-size: 24rpx;
} }
} }
} }
......
...@@ -25,7 +25,7 @@ const baseStore = useBaseStore() ...@@ -25,7 +25,7 @@ const baseStore = useBaseStore()
//天气信息 //天气信息
const weatherInfo = ref() const weatherInfo = ref()
const findWeatherSynopsesMessages = async () => { const findWeatherSynopsesMessages = async () => {
const res = await findWeatherSynopsesMessagesApi({ airportCode: userStore.userInfo.terminal }) const res = await findWeatherSynopsesMessagesApi({ airportCode: userStore.userInfo.terminal || 'WUH' })
if (res.code == 200 && res.data) { if (res.code == 200 && res.data) {
weatherInfo.value = res.data[res.data.length - 1] weatherInfo.value = res.data[res.data.length - 1]
uni.$emit('sendWeatherInfo', weatherInfo.value) uni.$emit('sendWeatherInfo', weatherInfo.value)
......
...@@ -50,13 +50,30 @@ ...@@ -50,13 +50,30 @@
line-height: 40rpx; line-height: 40rpx;
} }
&-footer { &-footer {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 16rpx;
.label { .label {
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: 16rpx;
.txt { .txt {
margin-left: 16rpx; margin-left: 16rpx;
} }
} }
.left {
color: $mocp-primary-6;
display: flex;
align-items: center;
justify-content: space-between;
.txt {
color: $mocp-text-5;
font-size: 28rpx;
margin-left: 16rpx;
&:first-child {
margin-left: 0;
}
}
}
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment