style:样式调整
This commit is contained in:
@@ -31,5 +31,5 @@ export function getUpgradeBaseUrl() {
|
||||
}
|
||||
export function getWebSocketUrl() {
|
||||
// return uni.getStorageSync('base_url').replace('/api', '') + '/ws'
|
||||
return 'ws://localhost:8330'
|
||||
return 'ws://192.168.26.178:8330'
|
||||
}
|
||||
|
||||
224
manifest.json
224
manifest.json
File diff suppressed because it is too large
Load Diff
@@ -165,7 +165,7 @@ export default {
|
||||
},
|
||||
//发送消息
|
||||
send(data) {
|
||||
console.log('发送消息。。。')
|
||||
console.log('发送消息。。。', data)
|
||||
if (!this.isOpen) {
|
||||
//关闭则打开
|
||||
this.open()
|
||||
|
||||
@@ -131,7 +131,6 @@ http.interceptors.response.use(
|
||||
// }
|
||||
|
||||
const userStore = $store('user')
|
||||
const isLogin = userStore.isLogin
|
||||
response.config.custom.showLoading && closeLoading()
|
||||
|
||||
console.log('response', JSON.parse(JSON.stringify(response.data)))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view>
|
||||
<navbar-back title="天平状态"></navbar-back>
|
||||
<up-grid border :col="3">
|
||||
<up-grid border :col="4">
|
||||
<up-grid-item v-for="(auncel, index) in auncelList" :index="index" :key="index">
|
||||
<view class="auncel-item" :style="{ backgroundImage: `url(${balanceBackground})` }">
|
||||
<view class="auncel-header">
|
||||
@@ -25,7 +25,7 @@ import { ref, computed, onMounted, onUnmounted } from 'vue'
|
||||
import { onUnload, onHide } from '@dcloudio/uni-app'
|
||||
import { getTenantId } from '@/defaultBaseUrl'
|
||||
import nx from '@/nx'
|
||||
const balanceBackground = new URL('/static/images/auncel.png', import.meta.url).href
|
||||
const balanceBackground = '/static/images/auncel.png'
|
||||
|
||||
// refs
|
||||
const auncelList = ref([])
|
||||
@@ -36,7 +36,7 @@ const userInfo = computed(() => nx.$store('user').userInfo)
|
||||
// 页面加载
|
||||
onMounted(() => {
|
||||
getPageData()
|
||||
// #ifdef H5
|
||||
|
||||
const regData = {
|
||||
msgId: nx.$helper.uuid(),
|
||||
cmd: 'register',
|
||||
@@ -48,8 +48,7 @@ onMounted(() => {
|
||||
}
|
||||
}
|
||||
nx.$measure.setRegData(JSON.stringify(regData))
|
||||
nx.$measure.reOpen()
|
||||
// #endif
|
||||
nx.$measure.open()
|
||||
|
||||
// 监听 WebSocket 数据
|
||||
uni.$on('deviceData', handleDeviceData)
|
||||
|
||||
5
pages/analysis/common/index.js
Normal file
5
pages/analysis/common/index.js
Normal file
@@ -0,0 +1,5 @@
|
||||
export const getDataSourceTypeShow = val => {
|
||||
if (val === 2) return '【筛上】'
|
||||
if (val === 3) return '【筛下】'
|
||||
return ''
|
||||
}
|
||||
79
pages/analysis/sample/components/task-item.vue
Normal file
79
pages/analysis/sample/components/task-item.vue
Normal file
@@ -0,0 +1,79 @@
|
||||
<!-- components/TaskItem.vue -->
|
||||
<template>
|
||||
<view class="u-tab-item" :class="{ 'u-tab-item-active': active }" @tap.stop="handleClick">
|
||||
<u-row class="full-width">
|
||||
<u-col span="2" class="text-center" style="position: relative">
|
||||
<u-icon :color="taskStyle(task)" name="tags-fill" size="34"></u-icon>
|
||||
<text class="seq">{{ seq }}</text>
|
||||
</u-col>
|
||||
<u-col span="10">
|
||||
<view class="fs18">{{ task.taskNo }}</view>
|
||||
<view class="mt3 mb3">{{ task.taskName }}{{ task.assayOper }}</view>
|
||||
<view class="x-f">
|
||||
<u-icon name="clock"></u-icon>
|
||||
<text class="ml5">{{ task.taskOperTime }}</text>
|
||||
</view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
task: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
active: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
seq: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const emit = defineEmits(['click'])
|
||||
|
||||
const handleClick = () => {
|
||||
emit('click')
|
||||
}
|
||||
|
||||
// 与原逻辑一致的 taskStyle 方法
|
||||
const taskStyle = task => {
|
||||
if ((task.weightTaskStatus === 0 || task.weightTaskStatus === 1) && task.reviewCount > 0) return 'red'
|
||||
if (task.weightTaskStatus === 2 && task.reviewCount > 0) return 'green'
|
||||
return ''
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.u-tab-item {
|
||||
padding: 3px;
|
||||
background: #f6f6f6;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 16px;
|
||||
color: #444;
|
||||
border-bottom: 2px dotted;
|
||||
}
|
||||
|
||||
.u-tab-item-active {
|
||||
position: relative;
|
||||
color: #0055a2;
|
||||
font-weight: 600;
|
||||
background: #fff;
|
||||
}
|
||||
.seq {
|
||||
position: absolute;
|
||||
top: 9px;
|
||||
left: 12px;
|
||||
color: #fff;
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user