Commit 6927af86 by liujinbo

信息通报

parent 65168c2e
.inforDisTags {
.txt {
font-size: 10px;
}
}
\ No newline at end of file
...@@ -17,20 +17,40 @@ ...@@ -17,20 +17,40 @@
tabsWidth="50%" tabsWidth="50%"
> >
<template #="{ dataList }"> <template #="{ dataList }">
<view class="item" v-for="item in dataList" :key="item.id" @tap="goDetails(item)"> <view
v-for="item in dataList"
:key="item.id"
@tap="goDetails(item)"
class="item"
>
<view class="item-title"> <view class="item-title">
<view class="left"> <view class="left">
<custom-state :value="useGetDictByValue('fleet_state', item.state)"></custom-state> <custom-state :value="item.status.toUpperCase()" />
<text class="txt u-line-1 fleetTxt"> <text class="txt u-line-1 fleetTxt">
{{ item.info }} {{ item.info }}
</text> </text>
</view> </view>
<view class="right inforDisTags">
<global-tag
v-for="tagItem of item.tags"
:key="tagItem.text"
:type="tagItem.type" class="txt">
{{ tagItem.text }}
</global-tag>
<!--<global-tag type="success" class="txt">
{{ getParamNameByValue('MajorCategory', item.majorCategory) }}
</global-tag>
<global-tag type="info" class="txt">
{{ getParamNameByValue('McoCurrentState', item.state) }}
</global-tag>-->
</view>
</view> </view>
<view class="item-content u-line-3 fleetItemCont"> <view class="item-content u-line-3 fleetItemCont">
{{ item.faultDescribe || '无' }} <global-icon icon="calendar"></global-icon>
</view> </view>
</view> </view>
</template> </template>
</global-page-swiper> </global-page-swiper>
</template> </template>
...@@ -42,7 +62,8 @@ import useInforDisclosureStore from 'mocp/store/inforDisclosure' ...@@ -42,7 +62,8 @@ import useInforDisclosureStore from 'mocp/store/inforDisclosure'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import { onUnload } from '@dcloudio/uni-app' import { onUnload } from '@dcloudio/uni-app'
import { getMocinfoListApi } from 'mocp/api/inforDisclosure' import { getMocinfoListApi } from 'mocp/api/inforDisclosure'
import { getParamsByType } from 'mocp/hooks/use-params/useParams' import { getParamNameByValue, getParamsByType } from 'mocp/hooks/use-params/useParams'
//跳转 //跳转
const inforDisclosure = useInforDisclosureStore() const inforDisclosure = useInforDisclosureStore()
...@@ -85,25 +106,33 @@ const localPagingCB = (data) => { ...@@ -85,25 +106,33 @@ const localPagingCB = (data) => {
status: item.failureState.toString() === '0' ? status: item.failureState.toString() === '0' ?
'open' : item.failureState.toString() === '1' ? 'open' : item.failureState.toString() === '1' ?
'close' : '作废', 'close' : '作废',
tags: [{ tags: [
{
text: item.pid === '0' ? '主项' : '子项', text: item.pid === '0' ? '主项' : '子项',
type: item.pid === '0' ? 'primary' : 'warning',
bg: item.pid === '0' ? 'blue' : 'lightblue', bg: item.pid === '0' ? 'blue' : 'lightblue',
color: 'white' color: 'white'
}, { },
{
text: RetentionBasisList[item.guarantee * 1]?.label, text: RetentionBasisList[item.guarantee * 1]?.label,
type: 'primary',
bg: '#E9E9E9', color: 'rgba(0,0,0,.4)' bg: '#E9E9E9', color: 'rgba(0,0,0,.4)'
}, },
{ {
text: OperationPhaseList[item.functionInfo * 1]?.label, text: OperationPhaseList[item.functionInfo * 1]?.label,
type: 'primary',
bg: '#E9E9E9', color: 'rgba(0,0,0,.4)' bg: '#E9E9E9', color: 'rgba(0,0,0,.4)'
}, { },
{
text: ReleaseStatuList[item.rleaseState]?.label, text: ReleaseStatuList[item.rleaseState]?.label,
type: 'info',
bg: '#E9E9E9', color: 'rgba(0,0,0,.4)' bg: '#E9E9E9', color: 'rgba(0,0,0,.4)'
}], }
],
id: item.id id: item.id
} }
}) })
console.log('@@mappedData', mappedData) console.log('@@mappedData', mappedData[0])
return mappedData return mappedData
} }
...@@ -122,7 +151,5 @@ onUnload(() => { ...@@ -122,7 +151,5 @@ onUnload(() => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import 'mocpStatic/css/list.scss'; @import 'mocpStatic/css/list.scss';
//@import './constants/fleet.scss'; @import './constants/inforDisclosure.scss';
</style> </style>
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