Compare commits
3 Commits
fdd0da6b46
...
db556f469e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db556f469e | ||
|
|
30bc01d15e | ||
|
|
83c876b88c |
@ -5,7 +5,7 @@ VITE_APP_TITLE = 伊特机械MES
|
|||||||
VITE_APP_ENV = 'development'
|
VITE_APP_ENV = 'development'
|
||||||
|
|
||||||
# 开发环境
|
# 开发环境
|
||||||
VITE_APP_BASE_API = 'http://192.168.12.230:8888/api'
|
VITE_APP_BASE_API = 'http://192.168.12.4:8888/api'
|
||||||
#VITE_APP_BASE_API = 'http://192.168.5.14:9100/gateway'
|
#VITE_APP_BASE_API = 'http://192.168.5.14:9100/gateway'
|
||||||
#VITE_APP_BASE_API = '/dev-api'
|
#VITE_APP_BASE_API = '/dev-api'
|
||||||
|
|
||||||
|
|||||||
2211
pnpm-lock.yaml
2211
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -30,11 +30,13 @@ export interface UserInfo {
|
|||||||
id: number
|
id: number
|
||||||
username: string
|
username: string
|
||||||
nickname: string
|
nickname: string
|
||||||
|
postNames:string
|
||||||
avatar: string
|
avatar: string
|
||||||
email: string
|
email: string
|
||||||
phone: string
|
phone: string
|
||||||
gender: number
|
gender: number
|
||||||
status: number
|
status: number
|
||||||
|
//userId:number|string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MenuInfo {
|
export interface MenuInfo {
|
||||||
|
|||||||
27
src/api/proterminal.ts
Normal file
27
src/api/proterminal.ts
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import { request } from '@/utils/request'
|
||||||
|
|
||||||
|
//登录工位选择
|
||||||
|
export function workstation(userId:any) {
|
||||||
|
return request({
|
||||||
|
url: `/terminal/workstation/${userId}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//任务列表
|
||||||
|
export function tasklist(data:any) {
|
||||||
|
return request({
|
||||||
|
url: '/terminal/task',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//任务详情
|
||||||
|
export function taskdetail(data:any) {
|
||||||
|
return request({
|
||||||
|
url: '/terminal/detail/content',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -18,6 +18,10 @@ export const useUserStore = defineStore('user', () => {
|
|||||||
const nickname = computed(() => user.value?.nickname || user.value?.username || '')
|
const nickname = computed(() => user.value?.nickname || user.value?.username || '')
|
||||||
const avatar = computed(() => user.value?.avatar || '')
|
const avatar = computed(() => user.value?.avatar || '')
|
||||||
|
|
||||||
|
const postNames = computed(() => user.value?.postNames || '')
|
||||||
|
|
||||||
|
const userid = computed(() => user.value?.id || '')
|
||||||
|
|
||||||
function setinit(v:any) {
|
function setinit(v:any) {
|
||||||
init.value = v
|
init.value = v
|
||||||
}
|
}
|
||||||
@ -92,6 +96,8 @@ export const useUserStore = defineStore('user', () => {
|
|||||||
nickname,
|
nickname,
|
||||||
avatar,
|
avatar,
|
||||||
init,
|
init,
|
||||||
|
postNames,
|
||||||
|
userid,
|
||||||
setinit,
|
setinit,
|
||||||
login,
|
login,
|
||||||
getInfo,
|
getInfo,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="islogin" class="conten">
|
<div v-if="islogin == '1'" class="conten">
|
||||||
<!-- <template v-if="tablet">
|
<!-- <template v-if="tablet">
|
||||||
平板
|
平板
|
||||||
</template> -->
|
</template> -->
|
||||||
@ -7,18 +7,19 @@
|
|||||||
<div class="head">
|
<div class="head">
|
||||||
<div style="box-sizing: border-box;padding: 5px;">
|
<div style="box-sizing: border-box;padding: 5px;">
|
||||||
<div class="mbx">
|
<div class="mbx">
|
||||||
<div>钣金车间</div>
|
<div>{{mbxone}}</div>
|
||||||
<n-icon :component="ArrowRedoOutline" size="20" />
|
<n-icon :component="ArrowRedoOutline" size="20" />
|
||||||
<div>激光切割</div>
|
<div>{{ mbtwo }}</div>
|
||||||
<n-icon :component="ArrowRedoOutline" size="20" />
|
<n-icon :component="ArrowRedoOutline" size="20" />
|
||||||
<div>激光切割01</div>
|
<div>{{mbthree}}</div>
|
||||||
</div>
|
</div>
|
||||||
<n-icon :component="BuildSharp" size="20" color="#ccc" />
|
<n-icon :component="BuildSharp" size="20" color="#ccc" />
|
||||||
|
|
||||||
<div style="display: flex;align-items: center;padding-left: 10px;">
|
<div style="display: flex;align-items: center;padding-left: 10px;">
|
||||||
<img src="../../assets/images/qiyelogo.png" width="40" height="40" style="border-radius: 50%;" />
|
<img v-if="userStore.avatar" :src="userStore.avatar" width="40" height="40" style="border-radius: 50%;" />
|
||||||
<div style="padding: 0 10px;">张三三</div>
|
<n-icon v-else :component="PersonCircleSharp" size="35" color="#ccc" />
|
||||||
<div style="padding: 2px 5px;border-radius: 5px;font-size: 12px;background: #bd6d07;">工段长</div>
|
<div style="padding: 0 10px;font-size: 16px;">{{userStore.nickname}}</div>
|
||||||
|
<div style="padding: 2px 5px;border-radius: 5px;font-size: 12px;background: #bd6d07;">{{userStore.postNames}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -48,7 +49,7 @@
|
|||||||
|
|
||||||
刷新
|
刷新
|
||||||
</n-button>
|
</n-button>
|
||||||
<n-button ghost style="color: #fff;" @click="islogin = false">
|
<n-button ghost style="color: #fff;" @click="switchworks">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<n-icon>
|
<n-icon>
|
||||||
<SwapHorizontalOutline />
|
<SwapHorizontalOutline />
|
||||||
@ -59,7 +60,7 @@
|
|||||||
</n-button>
|
</n-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="total">
|
<div class="total" style="display: none;">
|
||||||
<div>
|
<div>
|
||||||
<div style="display: flex;align-items: center;font-size: 18px;color:#dfdfdf;">
|
<div style="display: flex;align-items: center;font-size: 18px;color:#dfdfdf;">
|
||||||
<n-icon size="20">
|
<n-icon size="20">
|
||||||
@ -107,7 +108,7 @@
|
|||||||
<div style="font-size: 34px;line-height: 45px;color:#f3f3f3;">80%</div>
|
<div style="font-size: 34px;line-height: 45px;color:#f3f3f3;">80%</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<n-grid x-gap="20" style="padding: 20px;">
|
<n-grid x-gap="20" style="padding:50px 20px 20px;">
|
||||||
<n-gi :span="5" class="mocz">
|
<n-gi :span="5" class="mocz">
|
||||||
<div style="display: flex;align-items: center;justify-content: space-between;padding:8px 12px;">
|
<div style="display: flex;align-items: center;justify-content: space-between;padding:8px 12px;">
|
||||||
<div style="display: flex;align-items: center;font-size: 18px;color:#dfdfdf;">
|
<div style="display: flex;align-items: center;font-size: 18px;color:#dfdfdf;">
|
||||||
@ -116,22 +117,27 @@
|
|||||||
</n-icon>
|
</n-icon>
|
||||||
<div style="padding-left: 8px;">工单列表</div>
|
<div style="padding-left: 8px;">工单列表</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-size: 14px;color:#b7b7b7;">共 40 项</div>
|
<div style="font-size: 14px;color:#b7b7b7;">共 {{ taskdata.length }} 项</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding: 20px;border: 2px dashed #afafaf;border-left: none;border-right: none;">
|
<div style="padding: 20px;border: 2px dashed #afafaf;border-left: none;border-right: none;">
|
||||||
<n-grid x-gap="10">
|
<n-grid x-gap="10">
|
||||||
<n-gi :span="10">
|
<!-- <n-gi :span="10">
|
||||||
<n-select
|
<n-select
|
||||||
v-model:value="queryparam.type"
|
v-model:value="queryparam.type"
|
||||||
:options="typeopt"
|
:options="typeopt"
|
||||||
remote
|
remote
|
||||||
@update:value=""
|
@update:value=""
|
||||||
/>
|
/>
|
||||||
</n-gi>
|
</n-gi> -->
|
||||||
<n-gi :span="14">
|
<n-gi :span="24">
|
||||||
<n-input-group>
|
<n-input-group>
|
||||||
<n-input :style="{ width: '100%' }" placeholder="请输入编号或产品" />
|
<n-input
|
||||||
<n-button style="color:#dfdfdf;">
|
:style="{ width: '100%' }"
|
||||||
|
placeholder="请输入编号或产品"
|
||||||
|
v-model:value="pgcode"
|
||||||
|
@keyup.enter="queryhand"
|
||||||
|
/>
|
||||||
|
<n-button style="color:#dfdfdf;" @click="queryhand">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<n-icon size="22">
|
<n-icon size="22">
|
||||||
<Search />
|
<Search />
|
||||||
@ -143,19 +149,28 @@
|
|||||||
</n-grid>
|
</n-grid>
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 450px;padding: 20px;overflow-y: auto;">
|
<div style="height: 450px;padding: 20px;overflow-y: auto;">
|
||||||
<div v-for="n in 20" @click="getgd(n)" class="gditem" :class="{gdactv:gdindex == n}">
|
<div v-for="(n,i) in taskdata" @click="getgd(i)" class="gditem" :class="{gdactv:gdindex == i}">
|
||||||
<div style="display: flex;align-items: center;justify-content: space-between;font-size: 24px;">
|
<div style="display: flex;align-items: center;justify-content: space-between;font-size: 24px;">
|
||||||
<div>GD123456789100{{ n }}</div>
|
<div>{{ n.assingCode }}</div>
|
||||||
<div style="margin-left: 10px;padding: 4px 10px;border-radius: 10px;font-size: 12px;background: #bd6d07;">生产中</div>
|
<div style="margin-left: 10px;padding: 4px 10px;border-radius: 10px;font-size: 12px;background: #bd6d07;">{{ticketStatus[n.assingStatus]}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-size: 16px;color: #b7b7b7;">内包含页单玻门无底柜</div>
|
<div style="font-size: 16px;color: #b7b7b7;">{{n.processName}}</div>
|
||||||
<div style="color: #b7b7b7;">C128(500×600×800)AS</div>
|
<div style="display: flex;color: #b7b7b7;">
|
||||||
<div style="color: #b7b7b7;">07-10 08:00 至 08-25 13:00</div>
|
<div style="padding-right: 30px;">派工数量 : {{n.quantity}}</div>
|
||||||
|
<div>完成数量 : {{n.completedQuantity}}</div>
|
||||||
|
</div>
|
||||||
|
<div style="color: #b7b7b7;">{{n.beginTime}} 至 {{ n.endTime }}</div>
|
||||||
<div style="display: flex;width: 100%;align-items: center;">
|
<div style="display: flex;width: 100%;align-items: center;">
|
||||||
<div style="flex: 1;position: relative;margin-right: 10px;height: 6px;background: #afafaf;">
|
<div style="flex: 1;position: relative;margin-right: 10px;height: 6px;background: #afafaf;">
|
||||||
<div style="position: absolute;width: 45%;height: 6px;background: #007f5b;"></div>
|
<div :style="{
|
||||||
|
position:'absolute',
|
||||||
|
width:setw(n.completedQuantity,n.quantity),
|
||||||
|
height:'6px',
|
||||||
|
background:'#007f5b'
|
||||||
|
}"></div>
|
||||||
</div>
|
</div>
|
||||||
<div>45%</div>
|
<!--completedQuantity 已完成数; quantity 派工总数 Math.floor()-->
|
||||||
|
<div>{{toFixed2(n.completedQuantity,n.quantity)}} %</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -440,7 +455,7 @@
|
|||||||
|
|
||||||
<div style="display: flex;align-items: center;padding-left: 10px;">
|
<div style="display: flex;align-items: center;padding-left: 10px;">
|
||||||
<n-icon :component="PersonOutline" size="25" color="#ccc" />
|
<n-icon :component="PersonOutline" size="25" color="#ccc" />
|
||||||
<div style="padding: 0 10px;">未登录</div>
|
<div style="padding: 0 10px;">{{userStore.nickname}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -474,7 +489,6 @@
|
|||||||
<div style="font-size: 12px;color: #b7b7b7;">绑定后,终端将自动显示该工位的生产任务</div>
|
<div style="font-size: 12px;color: #b7b7b7;">绑定后,终端将自动显示该工位的生产任务</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<n-form
|
<n-form
|
||||||
ref="loginformRef"
|
ref="loginformRef"
|
||||||
:model="logindata"
|
:model="logindata"
|
||||||
@ -486,32 +500,41 @@
|
|||||||
marginTop:'20px'
|
marginTop:'20px'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
|
|
||||||
<n-form-item label="所属车间" label-style="color:#fff;" path="workshop">
|
<n-form-item label="所属车间" label-style="color:#fff;" path="workshop">
|
||||||
<n-select
|
<n-select
|
||||||
v-model:value="logindata.workshop"
|
v-model:value="logindata.workshopId"
|
||||||
|
:render-label="renderlabel"
|
||||||
remote
|
remote
|
||||||
placeholder="请选择车间"
|
placeholder="请选择车间"
|
||||||
|
@update:value="wkupdate"
|
||||||
:options="workshoplist"
|
:options="workshoplist"
|
||||||
/>
|
/>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item label="所属工段" label-style="color:#fff;" path="section">
|
<n-form-item label="所属工段" label-style="color:#fff;" path="section">
|
||||||
|
<!--:disabled="logindata.workshop?false:true"-->
|
||||||
|
|
||||||
<n-select
|
<n-select
|
||||||
:disabled="logindata.workshop?false:true"
|
:disabled="logindata.workshopId?false:true"
|
||||||
v-model:value="logindata.section"
|
:render-label="renderlabeltwo"
|
||||||
|
v-model:value="logindata.sectionId"
|
||||||
placeholder="请选择工段"
|
placeholder="请选择工段"
|
||||||
:options="workshoplist"
|
@update:value="secupdate"
|
||||||
|
:options="sectionlist"
|
||||||
/>
|
/>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item label="所属工位" label-style="color:#fff;" path="workstation">
|
<n-form-item label="所属工位" label-style="color:#fff;" path="workstation">
|
||||||
|
<!--:disabled="logindata.section?false:true"-->
|
||||||
<n-select
|
<n-select
|
||||||
:disabled="logindata.section?false:true"
|
:disabled="logindata.sectionId?false:true"
|
||||||
v-model:value="logindata.workstation"
|
:render-label="renderlabelthree"
|
||||||
|
v-model:value="logindata.deviceId"
|
||||||
placeholder="请选择工位"
|
placeholder="请选择工位"
|
||||||
:options="workshoplist"
|
:options="workstationlist"
|
||||||
/>
|
/>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-button
|
<n-button
|
||||||
:disabled="logindata.workstation?false:true"
|
:disabled="logindata.deviceId?false:true"
|
||||||
type="info"
|
type="info"
|
||||||
style="width: 100%;margin-top: 20px;"
|
style="width: 100%;margin-top: 20px;"
|
||||||
size="large"
|
size="large"
|
||||||
@ -565,9 +588,8 @@ import {
|
|||||||
type FormInst,
|
type FormInst,
|
||||||
} from 'naive-ui'
|
} from 'naive-ui'
|
||||||
import {
|
import {
|
||||||
PrismOutline,
|
|
||||||
ArrowRedoSharp,
|
|
||||||
ArrowRedoOutline,
|
ArrowRedoOutline,
|
||||||
|
PersonCircleSharp,
|
||||||
BuildSharp,
|
BuildSharp,
|
||||||
Contract,
|
Contract,
|
||||||
Sync,
|
Sync,
|
||||||
@ -595,21 +617,28 @@ import {
|
|||||||
import Circlebom from './circle.vue'
|
import Circlebom from './circle.vue'
|
||||||
|
|
||||||
import { useUserStore } from '@/stores/user'
|
import { useUserStore } from '@/stores/user'
|
||||||
import { dictDataApi } from '@/api/org'
|
|
||||||
import {
|
import {
|
||||||
disworlist,
|
tasklist,
|
||||||
editdiswor,
|
workstation,
|
||||||
transfer,
|
taskdetail
|
||||||
pauseresume,
|
} from '@/api/proterminal'
|
||||||
//workload
|
|
||||||
} from '@/api/production'
|
|
||||||
|
|
||||||
import { submitLogApi } from '@/api/submitLog'
|
|
||||||
|
|
||||||
import { SysUser, userApi } from '@/api/system'
|
|
||||||
import { label } from 'three/tsl'
|
import { label } from 'three/tsl'
|
||||||
|
import { Value } from 'three/examples/jsm/inspector/ui/Values.js'
|
||||||
|
|
||||||
|
//import { dictDataApi } from '@/api/org'
|
||||||
|
|
||||||
|
|
||||||
|
// import { submitLogApi } from '@/api/submitLog'
|
||||||
|
|
||||||
|
// import { SysUser, userApi } from '@/api/system'
|
||||||
|
// import { label } from 'three/tsl'
|
||||||
|
|
||||||
//const dialog = useDialog()
|
//const dialog = useDialog()
|
||||||
|
const message = useMessage()
|
||||||
|
|
||||||
|
const userStore = useUserStore()
|
||||||
|
|
||||||
|
|
||||||
//是否平板
|
//是否平板
|
||||||
let tablet = ref(false)
|
let tablet = ref(false)
|
||||||
@ -630,9 +659,31 @@ function exitFullscreen() {
|
|||||||
isfullscr.value = false
|
isfullscr.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
const message = useMessage()
|
function toFixed2(m:number,d:number) {
|
||||||
|
if(m == 0){
|
||||||
|
return '0.00'
|
||||||
|
}
|
||||||
|
return ((m/d)*100).toFixed(2)
|
||||||
|
}
|
||||||
|
|
||||||
const userStore = useUserStore()
|
function setw(m:number,d:number) {
|
||||||
|
if((m/d*100) < 1 && (m/d*100) > 0){
|
||||||
|
return '1%'
|
||||||
|
}
|
||||||
|
return (m/d*100).toFixed(2)+'%'
|
||||||
|
}
|
||||||
|
|
||||||
|
//工单状态
|
||||||
|
const ticketStatus :any = {
|
||||||
|
1:'待执行',
|
||||||
|
2:'执行中',
|
||||||
|
3:'质检中',
|
||||||
|
4:'流转中',
|
||||||
|
5:'已完成',
|
||||||
|
6:'部分质检中',
|
||||||
|
7:'部分流转中',
|
||||||
|
8:'部分完成'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
let queryparam = reactive<any>({
|
let queryparam = reactive<any>({
|
||||||
@ -720,12 +771,16 @@ function guizds() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//登录
|
//登录
|
||||||
let islogin = ref(false)
|
let islogin = ref<any>(sessionStorage.getItem('gwlogin'))
|
||||||
|
|
||||||
let logindata = reactive({
|
let logindata = reactive<any>({
|
||||||
workshop:'', //所属车间
|
workshopId: null, //所属车间id
|
||||||
section:'', //所属工段
|
sectionId: null, //所属工段id
|
||||||
workstation:'' //所属工位
|
deviceId: null, //所属工位id
|
||||||
|
|
||||||
|
// workshop:'', //所属车间
|
||||||
|
// section:'', //所属工段
|
||||||
|
// workstation:'' //所属工位
|
||||||
})
|
})
|
||||||
let loginrules = {
|
let loginrules = {
|
||||||
// workshop: [
|
// workshop: [
|
||||||
@ -752,32 +807,158 @@ let loginrules = {
|
|||||||
}
|
}
|
||||||
const loginformRef =ref()
|
const loginformRef =ref()
|
||||||
|
|
||||||
let workshoplist = [
|
//所属车间
|
||||||
{
|
let workshoplist = ref<any>([])
|
||||||
label:'一车间',
|
|
||||||
value:'1'
|
//所属工段
|
||||||
},
|
let sectionlist =ref<any>([])
|
||||||
{
|
|
||||||
label:'二车间',
|
//所属工位
|
||||||
value:'2'
|
let workstationlist = ref<any>([])
|
||||||
},
|
|
||||||
{
|
//所属工段集合
|
||||||
label:'三车间',
|
let secobj = ref<any>({})
|
||||||
value:'3'
|
|
||||||
|
//所属工位集合
|
||||||
|
let wkstobj = ref<any>({})
|
||||||
|
|
||||||
|
let wkdata = JSON.parse(sessionStorage.getItem('gwdata') as string)
|
||||||
|
|
||||||
|
let pgcode = ref<any>('')
|
||||||
|
|
||||||
|
function getrwlist(data:any) {
|
||||||
|
tasklist(data).then(rps => {
|
||||||
|
taskdata.value = rps
|
||||||
|
})
|
||||||
}
|
}
|
||||||
]
|
|
||||||
|
|
||||||
function loginhand() {
|
function queryhand() {
|
||||||
|
getrwlist({
|
||||||
|
userId: userStore.userid,
|
||||||
|
...wkdata,
|
||||||
|
code:pgcode.value
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
loginformRef.value?.validate((e:any) => {
|
function init() {
|
||||||
if (!e) {
|
if(islogin.value == '1'){
|
||||||
message.success('绑定成功')
|
getrwlist({
|
||||||
islogin.value = true
|
userId: userStore.userid,
|
||||||
|
...wkdata,
|
||||||
|
code:''
|
||||||
|
})
|
||||||
|
|
||||||
|
}else{
|
||||||
|
//工位选项
|
||||||
|
workstation(userStore.userid).then((rps:any) => {
|
||||||
|
if(rps && rps.length > 0){
|
||||||
|
workshoplist.value = rps.map((n:any) => {
|
||||||
|
return {
|
||||||
|
label: n.value,
|
||||||
|
value:n.key
|
||||||
|
}
|
||||||
|
})
|
||||||
|
rps.forEach((n:any) => {
|
||||||
|
let list = n.childList.map((m:any) => {
|
||||||
|
return {
|
||||||
|
label:m.value,
|
||||||
|
value:m.key,
|
||||||
|
childList:m.childList
|
||||||
|
}
|
||||||
|
})
|
||||||
|
secobj.value[n.key] = list
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function wkupdate(v:any,n:any) {
|
||||||
|
//let arr = secobj.value[n.value]
|
||||||
|
sectionlist.value = secobj.value[n.value]
|
||||||
|
sectionlist.value.forEach((j:any) => {
|
||||||
|
let list = j.childList.map((m:any) => {
|
||||||
|
return {
|
||||||
|
label:m.value,
|
||||||
|
value:m.key
|
||||||
|
}
|
||||||
|
})
|
||||||
|
wkstobj.value[j.key] = list
|
||||||
|
// return {
|
||||||
|
// label:j.value,
|
||||||
|
// Value:j.key
|
||||||
|
// }
|
||||||
|
})
|
||||||
|
|
||||||
|
console.log(sectionlist.value)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function secupdate(v:any,n:any) {
|
||||||
|
workstationlist.value = n.childList.map((n:any) => {
|
||||||
|
return {
|
||||||
|
label:n.value,
|
||||||
|
value:n.key
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let mbxone = ref(sessionStorage.getItem('mbxone'))
|
||||||
|
let mbtwo = ref(sessionStorage.getItem('mbtwo'))
|
||||||
|
let mbthree = ref(sessionStorage.getItem('mbthree'))
|
||||||
|
|
||||||
|
function renderlabel(n:any) {
|
||||||
|
mbxone.value = n.label
|
||||||
|
sessionStorage.setItem('mbxone',n.label)
|
||||||
|
return n.label
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderlabeltwo(n:any) {
|
||||||
|
mbtwo.value = n.label
|
||||||
|
sessionStorage.setItem('mbtwo',n.label)
|
||||||
|
return n.label
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderlabelthree(n:any) {
|
||||||
|
mbthree.value = n.label
|
||||||
|
sessionStorage.setItem('mbthree',n.label)
|
||||||
|
return n.label
|
||||||
|
}
|
||||||
|
|
||||||
|
//任务列表
|
||||||
|
let taskdata = ref<any>([])
|
||||||
|
|
||||||
|
//登录绑定
|
||||||
|
function loginhand() {
|
||||||
|
loginformRef.value?.validate((e:any) => {
|
||||||
|
if (!e) {
|
||||||
|
message.success('绑定成功')
|
||||||
|
//tasklist()
|
||||||
|
sessionStorage.setItem('gwlogin','1')
|
||||||
|
sessionStorage.setItem('gwdata',JSON.stringify(logindata))
|
||||||
|
|
||||||
|
islogin.value = '1'
|
||||||
|
|
||||||
|
getrwlist({
|
||||||
|
userId: userStore.userid,
|
||||||
|
...logindata,
|
||||||
|
code:''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//切换工位
|
||||||
|
function switchworks() {
|
||||||
|
sessionStorage.setItem('gwlogin','0')
|
||||||
|
islogin.value = '0'
|
||||||
|
}
|
||||||
|
|
||||||
|
init()
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
||||||
// getlist()
|
// getlist()
|
||||||
@ -897,6 +1078,7 @@ window.addEventListener('resize', () => {
|
|||||||
padding: 10px;
|
padding: 10px;
|
||||||
background: #2d475c;
|
background: #2d475c;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.gdactv{
|
.gdactv{
|
||||||
background: #0c5207;
|
background: #0c5207;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user