You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
2.9 KiB

12 months ago
<template>
<view class="">
<view class="uni-flex uni-column">
<view class="item" v-for="(item,index) in dataList">
<text class="item_title">{{item.title}} : </text>
<text v-if="(item.type=='')||(item.type==undefined)" class="text_wrap">{{item.content}} </text>
<text v-else-if="item.type=='dateTime'" class="text_wrap">{{formatDate(item.content)}} </text>
<text v-else-if="item.type=='boolean'" class="text_wrap">{{boolean(item.content)}} </text>
<text v-else-if="item.type=='transferMode'" class="text_wrap">{{getTransferModeName(item.content)}} </text>
<text v-else-if="item.type=='locationType'" class="text_wrap">{{getLocationTypeNameList(getDirectoryItemArray(item.content))}} </text>
<text v-else-if="item.type=='uom'" class="text_wrap">{{getUnitInfo(item.content)}} </text>
<text v-else-if="item.type=='inspectType'" class="text_wrap">{{getInspectType(item.content)}} </text>
<text v-else-if="item.type=='sampleMethod'" class="text_wrap">{{getSampleMethod(item.content)}} </text>
<text v-else-if="item.type=='requestState'" class="text_wrap">{{getRequestStateInfo(item.content)}} </text>
<text v-else-if="item.type=='inventoryStatus'" class="text_wrap">{{getInventoryStatusName(item.content)}} </text>
<text v-else-if="item.type=='locationCode'" class="text_wrap">{{getLocationTypeName(item.content)}} </text>
12 months ago
</view>
</view>
</view>
</template>
<script>
import {
dateFormat
} from '@/common/basic.js';
import {
getTransferModeName,
getLocationTypeNameList,
getDirectoryItemArray,
getUnitInfo,
getInspectType,
getSampleMethod,
getRequestStateInfo,
getInventoryStatusName,
getLocationTypeName
} from '@/common/directory.js';
12 months ago
export default {
components: {},
data() {
return {
}
},
mounted() {},
watch: {
// dataContent: {
// handler(newName, oldName) {
// },
// immediate: true,
// deep: true
// }
},
props: {
dataList: {
type: Array,
default: []
}
},
methods: {
avaliable(value) {
return value == "TRUE" ? "可用" : "不可用"
},
boolean(value) {
return value == "TRUE" ? "是" : "否"
},
formatDate(val) {
return dateFormat(val)
},
getTransferModeName(value){
return getTransferModeName(value)
},
getLocationTypeNameList(value){
return getLocationTypeNameList(value)
},
getDirectoryItemArray(value){
return getDirectoryItemArray(value)
},
getUnitInfo(value){
return getUnitInfo(value).label
},
getInspectType(value){
return getInspectType(value)
},
getSampleMethod(value){
return getSampleMethod(value)
},
getRequestStateInfo(value){
return getRequestStateInfo(value).label
},
getInventoryStatusName(value){
return getInventoryStatusName(value)
},
getLocationTypeName(value){
return getLocationTypeName(value)
12 months ago
}
}
}
</script>
<style>
</style>