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'
|
||||
}
|
||||
|
||||
226
manifest.json
226
manifest.json
@@ -1,31 +1,31 @@
|
||||
{
|
||||
"name" : "凉山矿业设备管理系统",
|
||||
"appid" : "__UNI__EF98982",
|
||||
"description" : "凉山矿业设备管理系统",
|
||||
"versionName" : "1.0.8",
|
||||
"versionCode" : "108",
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
"nvueCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
"name": "凉山矿业设备管理系统",
|
||||
"appid": "__UNI__460BC4C",
|
||||
"description": "凉山矿业设备管理系统",
|
||||
"versionName": "1.0.0",
|
||||
"versionCode": "100",
|
||||
"transformPx": false,
|
||||
"app-plus": {
|
||||
"usingComponents": true,
|
||||
"nvueCompiler": "uni-app",
|
||||
"compilerVersion": 3,
|
||||
"splashscreen": {
|
||||
"alwaysShowBeforeRender": true,
|
||||
"waiting": true,
|
||||
"autoclose": true,
|
||||
"delay": 0
|
||||
},
|
||||
"modules" : {
|
||||
"LivePusher" : {},
|
||||
"Camera" : {}
|
||||
"modules": {
|
||||
"LivePusher": {},
|
||||
"Camera": {}
|
||||
},
|
||||
"distribute" : {
|
||||
"android" : {
|
||||
"packagename" : "tech.zzjc.mas.lskylims",
|
||||
"keystore" : "zzjc_android.jks",
|
||||
"password" : "zzjc@20190226",
|
||||
"aliasname" : "app",
|
||||
"permissions" : [
|
||||
"distribute": {
|
||||
"android": {
|
||||
"packagename": "tech.zzjc.mas.lskylims",
|
||||
"keystore": "zzjc_android.jks",
|
||||
"password": "zzjc@20190226",
|
||||
"aliasname": "app",
|
||||
"permissions": [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
|
||||
@@ -50,134 +50,134 @@
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
"ios" : {
|
||||
"dSYMs" : false
|
||||
"ios": {
|
||||
"dSYMs": false
|
||||
},
|
||||
"sdkConfigs" : {},
|
||||
"icons" : {
|
||||
"android" : {
|
||||
"hdpi" : "unpackage/res/icons/72x72.png",
|
||||
"xhdpi" : "unpackage/res/icons/96x96.png",
|
||||
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
||||
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
||||
"sdkConfigs": {},
|
||||
"icons": {
|
||||
"android": {
|
||||
"hdpi": "unpackage/res/icons/72x72.png",
|
||||
"xhdpi": "unpackage/res/icons/96x96.png",
|
||||
"xxhdpi": "unpackage/res/icons/144x144.png",
|
||||
"xxxhdpi": "unpackage/res/icons/192x192.png"
|
||||
},
|
||||
"ios" : {
|
||||
"appstore" : "unpackage/res/icons/1024x1024.png",
|
||||
"ipad" : {
|
||||
"app" : "unpackage/res/icons/76x76.png",
|
||||
"app@2x" : "unpackage/res/icons/152x152.png",
|
||||
"notification" : "unpackage/res/icons/20x20.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
||||
"settings" : "unpackage/res/icons/29x29.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"spotlight" : "unpackage/res/icons/40x40.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
||||
"ios": {
|
||||
"appstore": "unpackage/res/icons/1024x1024.png",
|
||||
"ipad": {
|
||||
"app": "unpackage/res/icons/76x76.png",
|
||||
"app@2x": "unpackage/res/icons/152x152.png",
|
||||
"notification": "unpackage/res/icons/20x20.png",
|
||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||
"proapp@2x": "unpackage/res/icons/167x167.png",
|
||||
"settings": "unpackage/res/icons/29x29.png",
|
||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||
"spotlight": "unpackage/res/icons/40x40.png",
|
||||
"spotlight@2x": "unpackage/res/icons/80x80.png"
|
||||
},
|
||||
"iphone" : {
|
||||
"app@2x" : "unpackage/res/icons/120x120.png",
|
||||
"app@3x" : "unpackage/res/icons/180x180.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"notification@3x" : "unpackage/res/icons/60x60.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"settings@3x" : "unpackage/res/icons/87x87.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
||||
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
||||
"iphone": {
|
||||
"app@2x": "unpackage/res/icons/120x120.png",
|
||||
"app@3x": "unpackage/res/icons/180x180.png",
|
||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||
"notification@3x": "unpackage/res/icons/60x60.png",
|
||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||
"settings@3x": "unpackage/res/icons/87x87.png",
|
||||
"spotlight@2x": "unpackage/res/icons/80x80.png",
|
||||
"spotlight@3x": "unpackage/res/icons/120x120.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 可选,JSON对象,应用UserAgent相关配置 **/
|
||||
"useragent" : {
|
||||
"useragent": {
|
||||
/* 可选,字符串类型,设置的默认userAgent值 */
|
||||
"value" : "LIMS-PDA/1.0.8",
|
||||
"value": "LIMS-PDA/1.0.8",
|
||||
/* 可选,Boolean类型,是否将value值作为追加值连接到系统默认userAgent值之后 */
|
||||
"concatenate" : true
|
||||
"concatenate": true
|
||||
},
|
||||
/* 可选,JSON对象,Android平台应用UserAgent相关配置,优先级高于useragent配置 */
|
||||
"useragent_android" : {
|
||||
"useragent_android": {
|
||||
/* 可选,字符串类型,设置的默认userAgent值 */
|
||||
"value" : "LIMS-PDA/1.0.8",
|
||||
"value": "LIMS-PDA/1.0.8",
|
||||
/* 可选,Boolean类型,是否将value值作为追加值连接到系统默认userAgent值之后 */
|
||||
"concatenate" : true
|
||||
"concatenate": true
|
||||
},
|
||||
/* 可选,JSON对象,iOS平台应用UserAgent相关配置,优先级高于useragent配置 */
|
||||
"useragent_ios" : {
|
||||
"useragent_ios": {
|
||||
/* 可选,字符串类型,设置的默认userAgent值 */
|
||||
"value" : "LIMS-PDA/1.0.8",
|
||||
"value": "LIMS-PDA/1.0.8",
|
||||
/* 可选,Boolean类型,是否将value值作为追加值连接到系统默认userAgent值之后 */
|
||||
"concatenate" : true
|
||||
"concatenate": true
|
||||
}
|
||||
},
|
||||
"quickapp" : {},
|
||||
"mp-weixin" : {
|
||||
"appid" : "",
|
||||
"setting" : {
|
||||
"urlCheck" : false,
|
||||
"minified" : false
|
||||
"quickapp": {},
|
||||
"mp-weixin": {
|
||||
"appid": "",
|
||||
"setting": {
|
||||
"urlCheck": false,
|
||||
"minified": false
|
||||
},
|
||||
"optimization" : {
|
||||
"subPackages" : true
|
||||
"optimization": {
|
||||
"subPackages": true
|
||||
},
|
||||
"usingComponents" : true,
|
||||
"mergeVirtualHostAttributes" : true
|
||||
"usingComponents": true,
|
||||
"mergeVirtualHostAttributes": true
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
"mp-alipay": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
"mp-baidu": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
"mp-toutiao": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
},
|
||||
"vueVersion" : "3",
|
||||
"h5" : {
|
||||
"devServer" : {
|
||||
"port" : 33888,
|
||||
"https" : false,
|
||||
"proxy" : {
|
||||
"/api" : {
|
||||
"vueVersion": "3",
|
||||
"h5": {
|
||||
"devServer": {
|
||||
"port": 33888,
|
||||
"https": false,
|
||||
"proxy": {
|
||||
"/api": {
|
||||
// "target" : "http://mas.new.will-way.cn/api/",
|
||||
//"target" : "http://192.168.31.180:9090/",
|
||||
"target" : "http://127.0.0.1:9999/",
|
||||
"changeOrigin" : true,
|
||||
"ws" : true,
|
||||
"pathRewrite" : {
|
||||
"^/api" : ""
|
||||
"target": "http://127.0.0.1:9999/",
|
||||
"changeOrigin": true,
|
||||
"ws": true,
|
||||
"pathRewrite": {
|
||||
"^/api": ""
|
||||
}
|
||||
},
|
||||
"/sys" : {
|
||||
"/sys": {
|
||||
// "target" : "http://mas.new.will-way.cn/api/",
|
||||
//"target" : "http://192.168.31.180:9090/",
|
||||
"target" : "http://127.0.0.1:9999/sys",
|
||||
"changeOrigin" : true,
|
||||
"ws" : true,
|
||||
"pathRewrite" : {
|
||||
"^/api" : ""
|
||||
"target": "http://127.0.0.1:9999/sys",
|
||||
"changeOrigin": true,
|
||||
"ws": true,
|
||||
"pathRewrite": {
|
||||
"^/api": ""
|
||||
}
|
||||
},
|
||||
"/report" : {
|
||||
"target" : "http://127.0.0.1:9999/report/",
|
||||
"changeOrigin" : true,
|
||||
"ws" : true,
|
||||
"pathRewrite" : {
|
||||
"^/api" : ""
|
||||
"/report": {
|
||||
"target": "http://127.0.0.1:9999/report/",
|
||||
"changeOrigin": true,
|
||||
"ws": true,
|
||||
"pathRewrite": {
|
||||
"^/api": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"optimization" : {
|
||||
"treeShaking" : {
|
||||
"enable" : true
|
||||
"optimization": {
|
||||
"treeShaking": {
|
||||
"enable": true
|
||||
}
|
||||
},
|
||||
"router" : {
|
||||
"base" : "./"
|
||||
"router": {
|
||||
"base": "./"
|
||||
},
|
||||
"template" : "template.h5.html"
|
||||
"template": "template.h5.html"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -2,28 +2,17 @@
|
||||
<view>
|
||||
<navbar-back :autoBack="false" title="单据补打" @leftClick="customBack"></navbar-back>
|
||||
|
||||
<u-row class="content-title" gutter="16">
|
||||
<u-row gutter="16">
|
||||
<u-col span="4">
|
||||
<view class="content-title-name">
|
||||
<text>任务列表</text>
|
||||
</view>
|
||||
<u-gap height="5" bg-color="#0055A2"></u-gap>
|
||||
</u-col>
|
||||
<u-col span="8">
|
||||
<view class="content-title-name">
|
||||
<text>样品列表</text>
|
||||
</view>
|
||||
<u-gap height="5" bg-color="#0055A2"></u-gap>
|
||||
</u-col>
|
||||
</u-row>
|
||||
|
||||
<u-row class="content-main-height" gutter="16" align="top">
|
||||
<!-- 左侧任务列表 -->
|
||||
<u-col span="4">
|
||||
<scroll-view
|
||||
style="height: 75vh"
|
||||
scroll-y
|
||||
scroll-with-animation
|
||||
class="content-main-height content-main-left"
|
||||
class="content-main-left"
|
||||
:scroll-top="scrollTop"
|
||||
ref="menuScrollView"
|
||||
>
|
||||
@@ -54,29 +43,31 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
</u-col>
|
||||
|
||||
<!-- 右侧样品列表 -->
|
||||
<u-col span="8">
|
||||
<view class="content-main-height">
|
||||
<scroll-view scroll-y scroll-with-animation class="content-main-right">
|
||||
<view class="content-title-name">
|
||||
<text>样品列表</text>
|
||||
</view>
|
||||
<u-gap height="5" bg-color="#0055A2"></u-gap>
|
||||
<view>
|
||||
<scroll-view scroll-y scroll-with-animation style="height: calc(75vh - 60px)">
|
||||
<block v-for="(sample, index) in sampleList" :key="index">
|
||||
<view style="padding: 5px; font-size: 16px">
|
||||
<view class="p5 fs16">
|
||||
<u-row>
|
||||
<u-col span="2" style="text-align: center">
|
||||
<u-col span="2" class="text-center">
|
||||
<view>
|
||||
<text>【{{ sample.sort }}】</text>
|
||||
</view>
|
||||
</u-col>
|
||||
<u-col span="5">
|
||||
<view>
|
||||
<text style="padding-left: 10px">{{ sample.sampleCode }}</text>
|
||||
<text class="pl10">{{ sample.sampleCode }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text style="padding-left: 10px">{{ sample.sampleName }}</text>
|
||||
<text class="pl10">{{ sample.sampleName }}</text>
|
||||
</view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
<u-line style="padding: 10rpx" color="#bbb" />
|
||||
<u-line class="p5" color="#bbb" />
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
@@ -100,6 +91,14 @@
|
||||
</view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
|
||||
<u-row class="content-main-height" gutter="16" align="top">
|
||||
<!-- 左侧任务列表 -->
|
||||
<u-col span="4"> </u-col>
|
||||
|
||||
<!-- 右侧样品列表 -->
|
||||
<u-col span="8"> </u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -252,22 +251,15 @@ function checkPrintConfig() {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content-title {
|
||||
.content-title-name {
|
||||
height: 50px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.content-title-name {
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content-main-height {
|
||||
height: calc(100vh - 125px);
|
||||
}
|
||||
|
||||
.content-main-left {
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
@@ -302,17 +294,14 @@ function checkPrintConfig() {
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
.content-main-right {
|
||||
height: calc(100vh - 205px);
|
||||
}
|
||||
|
||||
.content-main-right-operation {
|
||||
height: 80px;
|
||||
padding-top: 15px;
|
||||
padding-right: 15px;
|
||||
height: 50px;
|
||||
padding-top: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.btn-operation {
|
||||
font-size: 18px;
|
||||
width: 95%;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -2,62 +2,41 @@
|
||||
<view>
|
||||
<navbar-back :autoBack="false" title="样品分析-收样" @leftClick="customBack"></navbar-back>
|
||||
|
||||
<u-row class="content-title" gutter="16">
|
||||
<u-row gutter="16">
|
||||
<u-col span="4">
|
||||
<view class="content-title-name">
|
||||
<text>任务列表</text>
|
||||
<up-badge v-if="taskList.length > 0" class="ml5" :value="taskList.length" type="warning"></up-badge>
|
||||
</view>
|
||||
<u-gap height="5" bg-color="#0055A2"></u-gap>
|
||||
<scroll-view
|
||||
style="height: 75vh"
|
||||
scroll-y
|
||||
scroll-with-animation
|
||||
class="content-main-left"
|
||||
:scroll-top="scrollTop"
|
||||
>
|
||||
<TaskItem
|
||||
v-for="(task, index) in taskList"
|
||||
:key="index"
|
||||
:task="task"
|
||||
:seq="index + 1"
|
||||
:active="current === index"
|
||||
@click="switchTask(index)"
|
||||
/>
|
||||
</scroll-view>
|
||||
</u-col>
|
||||
<u-col span="8">
|
||||
<view class="content-title-name">
|
||||
<text>样品列表</text>
|
||||
</view>
|
||||
<u-gap height="5" bg-color="#0055A2"></u-gap>
|
||||
</u-col>
|
||||
</u-row>
|
||||
|
||||
<u-row class="content-main-height" gutter="16" align="top">
|
||||
<!-- 任务列表 -->
|
||||
<u-col span="4">
|
||||
<scroll-view
|
||||
scroll-y
|
||||
scroll-with-animation
|
||||
class="content-main-height content-main-left"
|
||||
:scroll-top="scrollTop"
|
||||
>
|
||||
<view
|
||||
v-for="(task, index) in taskList"
|
||||
:key="index"
|
||||
class="u-tab-item"
|
||||
:class="[current === index ? 'u-tab-item-active' : '']"
|
||||
@tap.stop="switchTask(index)"
|
||||
>
|
||||
<u-row style="width: 100%">
|
||||
<u-col span="2" style="text-align: center">
|
||||
<u-icon :color="taskStyle(task)" name="tags-fill" size="34"></u-icon>
|
||||
</u-col>
|
||||
<u-col span="10">
|
||||
<view class="fs18">{{ task.taskNo }}</view>
|
||||
<view style="margin-top: 10px">{{ task.taskName }}</view>
|
||||
<view class="x-f" style="margin-top: 10px">
|
||||
<u-icon name="clock"></u-icon>
|
||||
<text style="margin-left: 5px">{{ task.taskOperTime }}</text>
|
||||
</view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</u-col>
|
||||
|
||||
<!-- 样品列表 -->
|
||||
<u-col span="8">
|
||||
<view class="content-main-height">
|
||||
<scroll-view scroll-y scroll-with-animation class="content-main-right">
|
||||
<view>
|
||||
<scroll-view scroll-y scroll-with-animation style="height: calc(75vh - 60px)">
|
||||
<block v-for="(sample, index) in sampleList" :key="index">
|
||||
<view style="padding: 5px; font-size: 16px">
|
||||
<view sclass="p5 fs16">
|
||||
<u-row>
|
||||
<u-col span="3" style="text-align: center">
|
||||
<u-col span="3" class="text-center">
|
||||
<u-row>
|
||||
<u-col span="6" style="text-align: center">
|
||||
<u-checkbox
|
||||
@@ -74,10 +53,10 @@
|
||||
<u-col span="9" class="sample_desc">
|
||||
<view>
|
||||
<view
|
||||
><text style="padding-left: 10px">{{ sample.sampleCode }}</text></view
|
||||
><text class="pl10">{{ sample.sampleCode }}</text></view
|
||||
>
|
||||
<view>
|
||||
<text style="padding-left: 10px">
|
||||
<text class="pl10">
|
||||
{{ getDataSourceTypeShow(sample.dataSourceType) }}{{ sample.sampleName }}
|
||||
</text>
|
||||
</view>
|
||||
@@ -87,7 +66,7 @@
|
||||
</view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
<u-line style="padding: 5px" color="#bbb" />
|
||||
<u-line class="p5" color="#bbb" />
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
@@ -112,13 +91,27 @@
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import nx from '@/nx'
|
||||
import { onLoad, onBackPress } from '@dcloudio/uni-app'
|
||||
import TaskItem from './components/task-item.vue'
|
||||
import { getDataSourceTypeShow } from '../common'
|
||||
|
||||
// 响应式数据
|
||||
const currentNode = ref('F30')
|
||||
const scrollTop = ref(0)
|
||||
const current = ref(0)
|
||||
const taskList = ref([])
|
||||
const sampleList = ref([])
|
||||
const taskList = ref([
|
||||
{ id: 1, taskNo: 'TASK-1', taskName: '任务1', taskOperTime: '2022-03-01 10:00:00' },
|
||||
{ id: 1, taskNo: 'TASK-1', taskName: '任务1', taskOperTime: '2022-03-01 10:00:00' },
|
||||
{ id: 1, taskNo: 'TASK-1', taskName: '任务1', taskOperTime: '2022-03-01 10:00:00' },
|
||||
{ id: 1, taskNo: 'TASK-1', taskName: '任务1', taskOperTime: '2022-03-01 10:00:00' },
|
||||
{ id: 1, taskNo: 'TASK-1', taskName: '任务1', taskOperTime: '2022-03-01 10:00:00' },
|
||||
{ id: 1, taskNo: 'TASK-1', taskName: '任务1', taskOperTime: '2022-03-01 10:00:00' },
|
||||
{ id: 1, taskNo: 'TASK-1', taskName: '任务1', taskOperTime: '2022-03-01 10:00:00' },
|
||||
{ id: 1, taskNo: 'TASK-1', taskName: '任务1', taskOperTime: '2022-03-01 10:00:00' },
|
||||
{ id: 1, taskNo: 'TASK-1', taskName: '任务1', taskOperTime: '2022-03-01 10:00:00' }
|
||||
])
|
||||
const sampleList = ref([
|
||||
{ id: 1, sampleCode: 'SAMPLE-1', sampleName: '样品1', sort: 1, checked: false, sampleProcessNo: 'F30' }
|
||||
])
|
||||
const dicSampleProcessCodeList = ref([])
|
||||
|
||||
// 计算属性
|
||||
@@ -133,16 +126,6 @@ const selectSample = sample => {
|
||||
sample.checked = !sample.checked
|
||||
}
|
||||
|
||||
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 ''
|
||||
}
|
||||
|
||||
const confirmReceipt = () => {
|
||||
const errNodeList = sampleList.value.filter(item => item.sampleProcessNo !== currentNode.value)
|
||||
if (errNodeList.length > 0) {
|
||||
@@ -250,16 +233,10 @@ const getProcessNameShow = val => {
|
||||
return item ? item.processName : val
|
||||
}
|
||||
|
||||
const getDataSourceTypeShow = val => {
|
||||
if (val === 2) return '【筛上】'
|
||||
if (val === 3) return '【筛下】'
|
||||
return ''
|
||||
}
|
||||
|
||||
// 生命周期
|
||||
onLoad(() => {
|
||||
getDicSampleProcessCodeList()
|
||||
getAssayTask()
|
||||
// getAssayTask()
|
||||
})
|
||||
|
||||
onBackPress(() => {
|
||||
@@ -269,59 +246,29 @@ onBackPress(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content-title {
|
||||
.content-title-name {
|
||||
height: 50px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.content-title-name {
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content-main-height {
|
||||
height: calc(100vh - 125px);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.content-main-left {
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
|
||||
.u-tab-item {
|
||||
padding: 5px;
|
||||
height: 100px;
|
||||
background: #f6f6f6;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 16px;
|
||||
color: #444;
|
||||
line-height: 1;
|
||||
border-bottom: 2px dotted;
|
||||
}
|
||||
|
||||
.u-tab-item-active {
|
||||
position: relative;
|
||||
color: #0055a2;
|
||||
font-weight: 600;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.content-main-right {
|
||||
height: calc(100vh - 205px);
|
||||
}
|
||||
|
||||
.content-main-right-operation {
|
||||
height: 80px;
|
||||
padding-top: 15px;
|
||||
padding-right: 15px;
|
||||
height: 50px;
|
||||
padding-top: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.btn-operation {
|
||||
height: 50px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,80 +1,59 @@
|
||||
<template>
|
||||
<view>
|
||||
<navbar-back :autoBack="false" title="审核查询" @leftClick="customBack"></navbar-back>
|
||||
<u-row class="content-title" gutter="16">
|
||||
<u-row gutter="16">
|
||||
<u-col span="4">
|
||||
<view class="content-title-name">
|
||||
<text>任务列表</text>
|
||||
<up-badge v-if="taskList.length > 0" class="ml5" :value="taskList.length" type="warning"></up-badge>
|
||||
</view>
|
||||
<u-gap height="5" bg-color="#0055A2"></u-gap>
|
||||
<scroll-view
|
||||
style="height: 75vh"
|
||||
scroll-y
|
||||
scroll-with-animation
|
||||
class="content-main-left"
|
||||
:scroll-top="scrollTop"
|
||||
>
|
||||
<TaskItem
|
||||
v-for="(task, index) in taskList"
|
||||
:key="index"
|
||||
:task="task"
|
||||
:seq="index + 1"
|
||||
:active="current === index"
|
||||
@click="switchTask(index)"
|
||||
/>
|
||||
</scroll-view>
|
||||
</u-col>
|
||||
<u-col span="8">
|
||||
<view class="content-title-name">
|
||||
<text>样品列表</text>
|
||||
</view>
|
||||
<u-gap height="5" bg-color="#0055A2"></u-gap>
|
||||
</u-col>
|
||||
</u-row>
|
||||
<u-row class="content-main-height" gutter="16" align="top">
|
||||
<u-col span="4">
|
||||
<scroll-view
|
||||
scroll-y
|
||||
scroll-with-animation
|
||||
class="content-main-height content-main-left"
|
||||
:scroll-top="scrollTop"
|
||||
>
|
||||
<view
|
||||
v-for="(task, index) in taskList"
|
||||
:key="index"
|
||||
class="u-tab-item"
|
||||
:class="[current.value === index ? 'u-tab-item-active' : '']"
|
||||
@tap.stop="swichTask(index)"
|
||||
>
|
||||
<u-row style="width: 100%">
|
||||
<u-col span="2" style="text-align: center">
|
||||
<u-icon :color="taskStyle(task)" name="tags-fill" size="34"></u-icon>
|
||||
</u-col>
|
||||
<u-col span="10">
|
||||
<view>
|
||||
<text style="font-size: 18px">{{ task.taskNo }}</text>
|
||||
</view>
|
||||
<view style="margin-top: 10px">
|
||||
<text>{{ task.taskName }} {{ task.assayOper }}</text>
|
||||
</view>
|
||||
<view class="x-f" style="margin-top: 10px">
|
||||
<u-icon color="" name="clock"></u-icon>
|
||||
<text style="margin-left: 5px">{{ task.reportTime }}</text>
|
||||
</view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</u-col>
|
||||
<u-col span="8">
|
||||
<view class="content-main-height">
|
||||
<scroll-view scroll-y scroll-with-animation class="content-main-right">
|
||||
<view>
|
||||
<scroll-view scroll-y scroll-with-animation style="height: calc(75vh - 60px)">
|
||||
<block v-for="(sample, index) in sampleList" :key="index">
|
||||
<view style="padding: 5px; font-size: 16px">
|
||||
<view class="p5 fs16">
|
||||
<u-row
|
||||
@click="showSampleDetail(sample.id, index)"
|
||||
:class="selectedIndex.value === index ? 'selected_Sample' : ''"
|
||||
>
|
||||
<u-col span="2" style="text-align: center" :style="sampleStyle(sample)">
|
||||
<u-col span="2" class="text-center" :style="sampleStyle(sample)">
|
||||
<view>
|
||||
<text>【{{ sample.sort }}】</text>
|
||||
</view>
|
||||
</u-col>
|
||||
<u-col span="5">
|
||||
<view>
|
||||
<text style="padding-left: 10px">{{ sample.sampleCode }}</text>
|
||||
<text class="pl5">{{ sample.sampleCode }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text style="padding-left: 10px">
|
||||
<text class="pl5">
|
||||
{{ getDataSourceTypeShow(sample.dataSourceType) }}{{ sample.sampleName }}
|
||||
</text>
|
||||
</view>
|
||||
<view v-if="sample.sampleWeight">
|
||||
<text style="padding-left: 10px">{{ sample.sampleWeight }} g</text>
|
||||
<text class="pl5">{{ sample.sampleWeight }} g</text>
|
||||
</view>
|
||||
</u-col>
|
||||
<u-col span="5">
|
||||
@@ -83,7 +62,7 @@
|
||||
</view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
<u-line style="padding: 5px" color="#bbb" />
|
||||
<u-line class="p5" color="#bbb" />
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
@@ -104,7 +83,7 @@
|
||||
|
||||
<sample-detail-popup
|
||||
ref="sampleDetailPopup"
|
||||
:showPopup="showDetailPopup"
|
||||
v-model:showPopup="showDetailPopup"
|
||||
:detailPopupParam="detailPopupParam"
|
||||
></sample-detail-popup>
|
||||
</view>
|
||||
@@ -114,7 +93,9 @@
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import { onLoad, onBackPress } from '@dcloudio/uni-app'
|
||||
import SampleDetailPopup from '@/components/sample/sample-detail-popup.vue'
|
||||
import TaskItem from './components/task-item.vue'
|
||||
import nx from '@/nx'
|
||||
import { getDataSourceTypeShow } from '../common'
|
||||
|
||||
// 响应式数据
|
||||
const scrollTop = ref(0)
|
||||
@@ -138,12 +119,6 @@ const customBack = () => {
|
||||
uni.reLaunch({ url: '/pages/analysis/index/index' })
|
||||
}
|
||||
|
||||
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 ''
|
||||
}
|
||||
|
||||
const sampleStyle = sample => {
|
||||
if ((sample.weightSubmitStatus === 0 || sample.weightSubmitStatus === 1) && sample.reviewCount > 0) {
|
||||
return 'color: red'
|
||||
@@ -154,7 +129,7 @@ const sampleStyle = sample => {
|
||||
return ''
|
||||
}
|
||||
|
||||
const swichTask = async index => {
|
||||
const switchTask = async index => {
|
||||
if (index === current.value) return
|
||||
current.value = index
|
||||
selectedIndex.value = -1
|
||||
@@ -217,18 +192,9 @@ const previewPDF = () => {
|
||||
uni.navigateTo({ url })
|
||||
}
|
||||
|
||||
const getDataSourceTypeShow = val => {
|
||||
if (val === 2) return '【筛上】'
|
||||
if (val === 3) return '【筛下】'
|
||||
return ''
|
||||
}
|
||||
|
||||
// 生命周期
|
||||
onMounted(() => {
|
||||
getAssayTask()
|
||||
uni.$on('sample-detail-popup_close', () => {
|
||||
showDetailPopup.value = false
|
||||
})
|
||||
// getAssayTask()
|
||||
})
|
||||
|
||||
onBackPress(() => {
|
||||
@@ -238,59 +204,28 @@ onBackPress(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* 样式部分保持不变 */
|
||||
.content-title {
|
||||
.content-title-name {
|
||||
height: 50px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
}
|
||||
.content-title-name {
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.content-main-height {
|
||||
height: calc(100vh - 125px);
|
||||
}
|
||||
|
||||
.content-main-left {
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
.u-tab-item {
|
||||
padding: 5px;
|
||||
height: 100px;
|
||||
background: #f6f6f6;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 16px;
|
||||
color: #444;
|
||||
line-height: 1;
|
||||
border-width: 2px;
|
||||
border-bottom: dotted;
|
||||
}
|
||||
.u-tab-item-active {
|
||||
position: relative;
|
||||
color: #0055a2;
|
||||
font-weight: 600;
|
||||
background: #fff;
|
||||
}
|
||||
.u-tab-item-active::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
height: 16px;
|
||||
left: 0;
|
||||
top: 20px;
|
||||
}
|
||||
.content-main-right {
|
||||
height: calc(100vh - 205px);
|
||||
}
|
||||
.content-main-right-operation {
|
||||
height: 80px;
|
||||
padding-top: 15px;
|
||||
padding-right: 15px;
|
||||
height: 50px;
|
||||
padding-top: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.btn-operation {
|
||||
font-size: 18px;
|
||||
width: 95%;
|
||||
}
|
||||
.selected_Sample {
|
||||
|
||||
@@ -1,75 +1,53 @@
|
||||
<template>
|
||||
<view>
|
||||
<navbar-back :autoBack="false" title="数据上报" @leftClick="customBack"></navbar-back>
|
||||
<u-row class="content-title" gutter="16">
|
||||
<u-row gutter="16">
|
||||
<u-col span="4">
|
||||
<view class="content-title-name">
|
||||
<text>任务列表</text>
|
||||
<up-badge v-if="taskList.length > 0" class="ml5" :value="taskList.length" type="warning"></up-badge>
|
||||
</view>
|
||||
<u-gap height="5" bg-color="#0055A2"></u-gap>
|
||||
<scroll-view
|
||||
style="height: 75vh"
|
||||
scroll-y
|
||||
scroll-with-animation
|
||||
class="content-main-left"
|
||||
:scroll-top="scrollTop"
|
||||
>
|
||||
<TaskItem
|
||||
v-for="(task, index) in taskList"
|
||||
:key="index"
|
||||
:task="task"
|
||||
:active="current === index"
|
||||
@click="switchTask(index)"
|
||||
/>
|
||||
</scroll-view>
|
||||
</u-col>
|
||||
<u-col span="8">
|
||||
<view class="content-title-name">
|
||||
<text>样品列表</text>
|
||||
</view>
|
||||
<u-gap height="5" bg-color="#0055A2"></u-gap>
|
||||
</u-col>
|
||||
</u-row>
|
||||
<u-row class="content-main-height" gutter="16" align="top">
|
||||
<u-col span="4">
|
||||
<scroll-view
|
||||
scroll-y
|
||||
scroll-with-animation
|
||||
class="content-main-height content-main-left"
|
||||
:scroll-top="scrollTop"
|
||||
>
|
||||
<view
|
||||
v-for="(task, index) in taskList"
|
||||
:key="index"
|
||||
class="u-tab-item"
|
||||
:class="current === index ? 'u-tab-item-active' : ''"
|
||||
@tap.stop="swichTask(index)"
|
||||
>
|
||||
<u-row style="width: 100%">
|
||||
<u-col span="2" style="text-align: center">
|
||||
<u-icon :color="taskStyle(task)" name="tags-fill" size="34"></u-icon>
|
||||
</u-col>
|
||||
<u-col span="10">
|
||||
<view>
|
||||
<text style="font-size: 18px">{{ task.taskNo }}</text>
|
||||
</view>
|
||||
<view style="margin-top: 10px">
|
||||
<text>{{ task.taskName }} {{ task.assayOper }}</text>
|
||||
</view>
|
||||
<view class="x-f" style="margin-top: 10px">
|
||||
<u-icon color="" name="clock"></u-icon>
|
||||
<text style="margin-left: 5px">{{ task.taskOperTime }}</text>
|
||||
</view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</u-col>
|
||||
<u-col span="8">
|
||||
<view class="content-main-height">
|
||||
<scroll-view scroll-y scroll-with-animation class="content-main-right">
|
||||
<view>
|
||||
<scroll-view scroll-y scroll-with-animation style="height: calc(75vh - 60px)">
|
||||
<block v-for="(sample, index) in sampleList" :key="index">
|
||||
<view style="padding: 5px; font-size: 16px">
|
||||
<view class="p5 fs16">
|
||||
<u-row
|
||||
@click="showSampleDetail(sample.id, index)"
|
||||
:class="selectedIndex === index ? 'selected_Sample' : ''"
|
||||
>
|
||||
<u-col span="2" style="text-align: center" :style="sampleStyle(sample)">
|
||||
<u-col span="2" class="text-center" :style="sampleStyle(sample)">
|
||||
<view>
|
||||
<text>【{{ sample.sort }}】</text>
|
||||
</view>
|
||||
</u-col>
|
||||
<u-col span="5">
|
||||
<view>
|
||||
<text style="padding-left: 10px">{{ sample.sampleCode }}</text>
|
||||
<text class="pl10">{{ sample.sampleCode }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text style="padding-left: 10px"
|
||||
<text class="pl10"
|
||||
>{{ getDataSourceTypeShow(sample.dataSourceType) }}{{ sample.sampleName }}</text
|
||||
>
|
||||
</view>
|
||||
@@ -80,19 +58,18 @@
|
||||
</view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
<u-line style="padding: 5px" color="#bbb" />
|
||||
<u-line class="p5" color="#bbb" />
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
<view class="content-main-right-operation">
|
||||
<u-row>
|
||||
<u-col span="3"></u-col>
|
||||
<u-col span="3">
|
||||
<u-row :gutter="16">
|
||||
<u-col span="4">
|
||||
<u-button class="btn-operation" type="primary" @click="previewPDF" v-if="currentTaskId">
|
||||
任务单预览
|
||||
</u-button>
|
||||
</u-col>
|
||||
<u-col span="3">
|
||||
<u-col span="4">
|
||||
<u-button
|
||||
class="btn-operation"
|
||||
v-if="currentTaskId"
|
||||
@@ -103,7 +80,7 @@
|
||||
撤回任务单
|
||||
</u-button>
|
||||
</u-col>
|
||||
<u-col span="3">
|
||||
<u-col span="4">
|
||||
<u-button class="btn-operation" :disabled="dataReportDisabled" type="success" @click="dataReport">
|
||||
数据上报
|
||||
</u-button>
|
||||
@@ -113,7 +90,6 @@
|
||||
</view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
|
||||
<!-- 样品详情 -->
|
||||
<sample-detail-popup
|
||||
ref="sampleDetailPopup"
|
||||
@@ -127,6 +103,8 @@
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import { onLoad, onBackPress } from '@dcloudio/uni-app'
|
||||
import SampleDetailPopup from '@/components/sample/sample-detail-popup.vue'
|
||||
import TaskItem from './components/task-item.vue'
|
||||
import { getDataSourceTypeShow } from '../common'
|
||||
import nx from '@/nx'
|
||||
|
||||
// 响应式数据
|
||||
@@ -155,12 +133,6 @@ const customBack = () => {
|
||||
uni.reLaunch({ url: '/pages/analysis/index/index' })
|
||||
}
|
||||
|
||||
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 ''
|
||||
}
|
||||
|
||||
const sampleStyle = sample => {
|
||||
if ((sample.weightSubmitStatus === 0 || sample.weightSubmitStatus === 1) && sample.reviewCount > 0) {
|
||||
return 'color: red'
|
||||
@@ -171,7 +143,7 @@ const sampleStyle = sample => {
|
||||
return ''
|
||||
}
|
||||
|
||||
const swichTask = async index => {
|
||||
const switchTask = async index => {
|
||||
if (index === current.value) return
|
||||
current.value = index
|
||||
const task = taskList.value[index]
|
||||
@@ -300,12 +272,6 @@ const getProcessNameShow = val => {
|
||||
return item ? item.processName : val
|
||||
}
|
||||
|
||||
const getDataSourceTypeShow = val => {
|
||||
if (val === 2) return '【筛上】'
|
||||
if (val === 3) return '【筛下】'
|
||||
return ''
|
||||
}
|
||||
|
||||
const printTask = () => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
@@ -333,68 +299,30 @@ onBackPress(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* 样式保持不变 */
|
||||
.content-title {
|
||||
.content-title-name {
|
||||
height: 50px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.content-title-name {
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content-main-height {
|
||||
height: calc(100vh - 125px);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.content-main-left {
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
|
||||
.u-tab-item {
|
||||
padding: 5px;
|
||||
height: 100px;
|
||||
background: #f6f6f6;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 16px;
|
||||
color: #444;
|
||||
line-height: 1;
|
||||
border-width: 2px;
|
||||
border-bottom: dotted;
|
||||
}
|
||||
|
||||
.u-tab-item-active {
|
||||
position: relative;
|
||||
color: #0055a2;
|
||||
font-weight: 600;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.u-tab-item-active::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
height: 16px;
|
||||
left: 0;
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
.content-main-right {
|
||||
height: calc(100vh - 205px);
|
||||
}
|
||||
|
||||
.content-main-right-operation {
|
||||
height: 80px;
|
||||
padding-top: 15px;
|
||||
padding-right: 15px;
|
||||
height: 50px;
|
||||
padding-top: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.btn-operation {
|
||||
font-size: 18px;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
|
||||
@@ -1013,7 +1013,7 @@ const loadDevice = () => {
|
||||
}
|
||||
}
|
||||
nx.$measure.setRegData(JSON.stringify(regData))
|
||||
nx.$measure.reOpen()
|
||||
nx.$measure.open()
|
||||
}
|
||||
|
||||
// 键盘监听
|
||||
|
||||
@@ -574,32 +574,12 @@ function reviver(key, value) {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.navbar-right {
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.content-title {
|
||||
width: 100%;
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.content-title-name {
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content-main-height {
|
||||
height: calc(100vh - 125px);
|
||||
}
|
||||
|
||||
.content-main-left {
|
||||
height: calc(100vh - 205px);
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
|
||||
.form-item-my {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -628,121 +608,4 @@ function reviver(key, value) {
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.u-tab-item {
|
||||
height: 80px;
|
||||
background: #f6f6f6;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 18px;
|
||||
color: #444;
|
||||
font-weight: 400;
|
||||
line-height: 1;
|
||||
border-width: 2px;
|
||||
border-bottom: dotted;
|
||||
}
|
||||
|
||||
.u-tab-item-active {
|
||||
position: relative;
|
||||
color: #0055a2;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.u-tab-item-active::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
height: 16px;
|
||||
left: 0;
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
.content-main-left-operation {
|
||||
height: 80px;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.content-main-right {
|
||||
height: calc(100vh - 205px);
|
||||
}
|
||||
|
||||
.content-main-right-operation {
|
||||
height: 80px;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.auncel-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.auncel {
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
background-image: url(/static/images/auncel.png);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.auncel-title {
|
||||
width: 100%;
|
||||
height: 210px;
|
||||
}
|
||||
|
||||
.auncel-weight {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.weight {
|
||||
width: 100%;
|
||||
min-width: 200px;
|
||||
height: 100px;
|
||||
padding: 0 15px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
//background-color: #2c405a;
|
||||
}
|
||||
|
||||
.weight-data {
|
||||
flex-grow: 1;
|
||||
height: 100%;
|
||||
color: #4cd964;
|
||||
text-align: right;
|
||||
line-height: 100px;
|
||||
letter-spacing: 2px;
|
||||
font-size: 75px;
|
||||
font-family: zzjc-lcd;
|
||||
}
|
||||
|
||||
.weight-data-yellow {
|
||||
flex-grow: 1;
|
||||
height: 100%;
|
||||
color: #ffff00;
|
||||
text-align: right;
|
||||
line-height: 100px;
|
||||
letter-spacing: 2px;
|
||||
font-size: 75px;
|
||||
font-family: zzjc-lcd;
|
||||
}
|
||||
|
||||
.weight-data-warning {
|
||||
flex-grow: 1;
|
||||
height: 100%;
|
||||
color: #ff3333;
|
||||
text-align: right;
|
||||
line-height: 100px;
|
||||
font-size: 75px;
|
||||
font-family: zzjc-lcd;
|
||||
}
|
||||
|
||||
.weight-unit {
|
||||
color: #ffffff;
|
||||
font-size: 65px;
|
||||
line-height: 100px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -5,56 +5,38 @@
|
||||
<u-col span="4">
|
||||
<view class="content-title-name">
|
||||
<text>任务列表</text>
|
||||
<up-badge v-if="taskList.length > 0" class="ml5" :value="taskList.length" type="warning"></up-badge>
|
||||
</view>
|
||||
<u-gap height="5" bg-color="#0055A2"></u-gap>
|
||||
<scroll-view
|
||||
style="height: 75vh"
|
||||
scroll-y
|
||||
scroll-with-animation
|
||||
class="content-main-left"
|
||||
:scroll-top="scrollTop"
|
||||
>
|
||||
<TaskItem
|
||||
v-for="(task, index) in taskList"
|
||||
:key="index"
|
||||
:task="task"
|
||||
:active="current === index"
|
||||
@click="switchTask(index)"
|
||||
/>
|
||||
</scroll-view>
|
||||
</u-col>
|
||||
<u-col span="8">
|
||||
<view class="content-title-name">
|
||||
<text>样品列表</text>
|
||||
</view>
|
||||
<u-gap height="5" bg-color="#0055A2"></u-gap>
|
||||
</u-col>
|
||||
</u-row>
|
||||
<u-row class="content-main-height" gutter="16" align="top">
|
||||
<u-col span="4">
|
||||
<scroll-view
|
||||
scroll-y
|
||||
scroll-with-animation
|
||||
class="content-main-height content-main-left"
|
||||
:scroll-top="scrollTop"
|
||||
>
|
||||
<view
|
||||
v-for="(task, index) in taskList"
|
||||
:key="index"
|
||||
class="u-tab-item"
|
||||
:class="[current === index ? 'u-tab-item-active' : '']"
|
||||
@tap.stop="swichTask(index)"
|
||||
>
|
||||
<u-row style="width: 100%">
|
||||
<u-col span="2" style="text-align: center">
|
||||
<u-icon :color="taskStyle(task)" name="tags-fill" size="34"></u-icon>
|
||||
</u-col>
|
||||
<u-col span="10">
|
||||
<view class="fs18">{{ task.taskNo }}</view>
|
||||
<view style="margin-top: 10px">{{ task.taskName }}</view>
|
||||
<view class="x-f" style="margin-top: 10px">
|
||||
<u-icon color="" name="clock"></u-icon>
|
||||
<text style="margin-left: 5px">{{ task.taskOperTime }}</text>
|
||||
</view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</u-col>
|
||||
<u-col span="8">
|
||||
<view class="content-main-height">
|
||||
<scroll-view scroll-y scroll-with-animation class="content-main-right">
|
||||
<view>
|
||||
<scroll-view scroll-y scroll-with-animation style="height: calc(75vh - 60px)">
|
||||
<block v-for="(sample, index) in sampleList" :key="index">
|
||||
<view v-if="currentTask.reviewCount === sample.reviewCount" style="padding: 5px; font-size: 16px">
|
||||
<view v-if="currentTask.reviewCount === sample.reviewCount" class="p5 fs16">
|
||||
<u-row>
|
||||
<u-col span="3" style="text-align: center">
|
||||
<u-col span="3" class="text-center">
|
||||
<u-row>
|
||||
<u-col span="6" style="text-align: center">
|
||||
<u-col span="6" class="text-center">
|
||||
<u-checkbox
|
||||
v-model="sample.checked"
|
||||
v-if="
|
||||
@@ -65,7 +47,7 @@
|
||||
@change="() => selectSample(sample)"
|
||||
></u-checkbox>
|
||||
</u-col>
|
||||
<u-col span="6" style="text-align: center">
|
||||
<u-col span="6" class="text-center">
|
||||
<view
|
||||
><text>【{{ sample.sort }}】</text></view
|
||||
>
|
||||
@@ -76,10 +58,10 @@
|
||||
<view class="sample_desc">
|
||||
<view>
|
||||
<view
|
||||
><text style="padding-left: 10px">{{ sample.sampleCode }}</text></view
|
||||
><text class="pl10">{{ sample.sampleCode }}</text></view
|
||||
>
|
||||
<view>
|
||||
<text style="padding-left: 10px">
|
||||
<text class="pl10">
|
||||
{{ getDataSourceTypeShow(sample.dataSourceType) }}{{ sample.sampleName }}
|
||||
</text>
|
||||
</view>
|
||||
@@ -96,13 +78,13 @@
|
||||
</view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
<u-line style="padding: 5px" color="#bbb" />
|
||||
<u-line class="p5" color="#bbb" />
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
<view class="content-main-right-operation">
|
||||
<u-row>
|
||||
<u-col span="3.5"></u-col>
|
||||
<u-col span="4"></u-col>
|
||||
<u-col span="4">
|
||||
<u-button class="btn-operation" type="warning" @click="showRollbackModal">申请退回样品</u-button>
|
||||
</u-col>
|
||||
@@ -136,6 +118,8 @@ import { ref, computed, onMounted } from 'vue'
|
||||
import { onLoad, onBackPress } from '@dcloudio/uni-app'
|
||||
import nx from '@/nx'
|
||||
import { useScreenOrientation } from '@/nx/hooks/useScreenOrientation'
|
||||
import { getDataSourceTypeShow } from '../common'
|
||||
import TaskItem from './components/task-item.vue'
|
||||
|
||||
// 响应式数据
|
||||
const currentNode = ref('F31')
|
||||
@@ -162,12 +146,6 @@ const selectSample = sample => {
|
||||
sample.checked = !sample.checked
|
||||
}
|
||||
|
||||
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 ''
|
||||
}
|
||||
|
||||
const showRollbackModal = () => {
|
||||
const checkedSampleList = sampleList.value.filter(item => item.checked)
|
||||
if (checkedSampleList.length === 0) {
|
||||
@@ -228,7 +206,7 @@ const startWork = () => {
|
||||
})
|
||||
}
|
||||
|
||||
const swichTask = async index => {
|
||||
const switchTask = async index => {
|
||||
if (index === current.value) return
|
||||
current.value = index
|
||||
rollbackContent.value = ''
|
||||
@@ -280,18 +258,12 @@ const getProcessNameShow = val => {
|
||||
return item ? item.processName : val
|
||||
}
|
||||
|
||||
const getDataSourceTypeShow = val => {
|
||||
if (val === 2) return '【筛上】'
|
||||
if (val === 3) return '【筛下】'
|
||||
return ''
|
||||
}
|
||||
|
||||
// 生命周期
|
||||
onLoad(() => {
|
||||
const { lockOrientation } = useScreenOrientation()
|
||||
lockOrientation('landscape')
|
||||
getDicSampleProcessCodeList()
|
||||
getAssayTask()
|
||||
// getAssayTask()
|
||||
})
|
||||
|
||||
onBackPress(() => {
|
||||
@@ -301,60 +273,27 @@ onBackPress(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* 样式保持不变 */
|
||||
.content-title {
|
||||
.content-title-name {
|
||||
height: 50px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
}
|
||||
.content-title-name {
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.content-main-height {
|
||||
height: calc(100vh - 125px);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.content-main-left {
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
.u-tab-item {
|
||||
padding: 5px;
|
||||
height: 100px;
|
||||
background: #f6f6f6;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 16px;
|
||||
color: #444;
|
||||
line-height: 1;
|
||||
border-width: 2px;
|
||||
border-bottom: dotted;
|
||||
}
|
||||
.u-tab-item-active {
|
||||
position: relative;
|
||||
color: #0055a2;
|
||||
font-weight: 600;
|
||||
background: #fff;
|
||||
}
|
||||
.u-tab-item-active::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
height: 16px;
|
||||
left: 0;
|
||||
top: 20px;
|
||||
}
|
||||
.content-main-right {
|
||||
height: calc(100vh - 205px);
|
||||
}
|
||||
|
||||
.content-main-right-operation {
|
||||
height: 80px;
|
||||
padding-top: 15px;
|
||||
padding-right: 15px;
|
||||
height: 50px;
|
||||
padding-top: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.btn-operation {
|
||||
height: 50px;
|
||||
font-size: 18px;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
@@ -52,8 +52,8 @@ import callCheckUpdate from '@/nx/utils/check-update'
|
||||
const loading = ref(false)
|
||||
const captchaEnable = true
|
||||
let loginInfo = reactive({
|
||||
username: '',
|
||||
password: '',
|
||||
username: 'admin',
|
||||
password: 'P@ssword25',
|
||||
captchaVerification: ''
|
||||
})
|
||||
onShow(() => {
|
||||
@@ -117,6 +117,7 @@ function onCaptchaError(error) {
|
||||
icon: 'none',
|
||||
title: error?.message || '验证码验证失败'
|
||||
})
|
||||
loading.value = false
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user