优化切换

dev3
wuwx 2024-06-18 16:16:06 +08:00
parent 39849edb6d
commit b522ebed2e
3 changed files with 52 additions and 44 deletions

View File

@ -2,7 +2,7 @@
"name" : "海通Pad", "name" : "海通Pad",
"appid" : "__UNI__F864E80", "appid" : "__UNI__F864E80",
"description" : "", "description" : "",
"versionName" : "1.1.1", "versionName" : "1.1.2",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */

15
package-lock.json generated
View File

@ -1,7 +1,7 @@
{ {
"name": "下拉多选,单选,搜索", "name": "下拉多选,单选,搜索",
"version": "1.0.2", "version": "1.0.2",
"lockfileVersion": 3, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
@ -12,9 +12,16 @@
} }
}, },
"node_modules/crypto-js": { "node_modules/crypto-js": {
"version": "4.1.1", "version": "4.2.0",
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", "resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz",
"integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
}
},
"dependencies": {
"crypto-js": {
"version": "4.2.0",
"resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz",
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
} }
} }
} }

View File

@ -53,8 +53,8 @@
<view class="change" @click.stop="clickTab('cc')" :class="[filterType == 'CABIN_LEVEL_TYPE' ? 'ava' : '']">舱层</view> <view class="change" @click.stop="clickTab('cc')" :class="[filterType == 'CABIN_LEVEL_TYPE' ? 'ava' : '']">舱层</view>
</view> </view>
</view> </view>
<template v-if="zzlFlag"> <template v-if="zzlFlag && ZLFlag">
<view class="tjHead" @click="clickTjHead('zzl')" v-if="ZLFlag"> <view class="tjHead" @click="clickTjHead('zzl')">
<view class="title"> <view class="title">
<p>总指令进度</p> <p>总指令进度</p>
<text>{{zTjList.totalSentCount}}/{{zTjList.totalSum}}</text> <text>{{zTjList.totalSentCount}}/{{zTjList.totalSum}}</text>
@ -72,7 +72,7 @@
</view> </view>
</view> </view>
<view class="tjInfo" v-for="(item,index) in zTjList.instructionStatisticsList" :key="index" :class="{active:zTjActive == index}" <view class="tjInfo" v-for="(item,index) in zTjList.instructionStatisticsList" :key="index" :class="{active:zTjActive == index}"
@click="clickTjList(item,index,'zzl')" v-if="ZLFlag"> @click="clickTjList(item,index,'zzl')">
<view class="title"> <view class="title">
<p>{{item.titleBar}}</p> <p>{{item.titleBar}}</p>
<text>{{item.totalSentCount}}/{{item.zsum}}</text> <text>{{item.totalSentCount}}/{{item.zsum}}</text>
@ -106,7 +106,7 @@
contentColor="#0067CF" contentColor="#0067CF"
backColor="#f2f2f2" textPosition="outside" percentum precision="0" /> backColor="#f2f2f2" textPosition="outside" percentum precision="0" />
</view> </view>
<view class="tjInfo" v-for="(item,index) in jobProgressList" :key="item.id" @click="jobProgress(item,index,'zzl')" :class="{active:jobActive == index || brdName == item.label || potName == item.label || mnfBl == item.label || shipDeck == item.label}"> <view class="tjInfo" v-for="(item,index) in jobProgressList" :key="index" @click="jobProgress(item,index,'zzl')" :class="{active:jobActive == index || brdName == item.label || potName == item.label || mnfBl == item.label || shipDeck == item.label}">
<view class="label">{{ item.label }}{{filterType == 'CABIN_LEVEL_TYPE' ? '层' : ''}}</view> <view class="label">{{ item.label }}{{filterType == 'CABIN_LEVEL_TYPE' ? '层' : ''}}</view>
<lx-progress-bar title="" :total="item.totalProgress" :firstValue="item.progress" <lx-progress-bar title="" :total="item.totalProgress" :firstValue="item.progress"
contentColor="#0067CF" contentColor="#0067CF"
@ -126,8 +126,8 @@
<view class="itemList"> <view class="itemList">
<!-- <custom-waterfalls-flow :value="itemList" :column="2" :columnSpace="1"> --> <!-- <custom-waterfalls-flow :value="itemList" :column="2" :columnSpace="1"> -->
<!-- <template v-slot:default="item"> --> <!-- <template v-slot:default="item"> -->
<template v-for="item in itemList"> <template v-for="(item,index) in itemList">
<view class="exp"> <view class="exp" :key="index">
<view class="item"> <view class="item">
<view class="row"> <view class="row">
<view class="title"> <view class="title">
@ -313,8 +313,8 @@
<view class="change" @click.stop="clickTab('cc')" :class="[filterType == 'CABIN_LEVEL_TYPE' ? 'ava' : '']">舱层</view> <view class="change" @click.stop="clickTab('cc')" :class="[filterType == 'CABIN_LEVEL_TYPE' ? 'ava' : '']">舱层</view>
</view> </view>
</view> </view>
<template v-if="fzlFlag"> <template v-if="fzlFlag && ZLFlag">
<view class="tjHead" @click="clickTjHead('fzl')" v-if="ZLFlag"> <view class="tjHead" @click="clickTjHead('fzl')">
<view class="title"> <view class="title">
<p>分指令进度</p> <p>分指令进度</p>
<text>{{zTjList.branchSentCount}}/{{zTjList.branchSum}}</text> <text>{{zTjList.branchSentCount}}/{{zTjList.branchSum}}</text>
@ -332,7 +332,7 @@
</view> </view>
</view> </view>
<view class="tjInfo" v-for="(item,index) in zTjList.instructionStatisticsList" :key="index" :class="{active:zTjActive == index}" <view class="tjInfo" v-for="(item,index) in zTjList.instructionStatisticsList" :key="index" :class="{active:zTjActive == index}"
@click="clickTjList(item,index,'fzl')" v-if="ZLFlag"> @click="clickTjList(item,index,'fzl')">
<view class="title"> <view class="title">
<p>{{item.titleBar}}</p> <p>{{item.titleBar}}</p>
<text>{{item.branchSentCount}}/{{item.fsum}}</text> <text>{{item.branchSentCount}}/{{item.fsum}}</text>
@ -366,7 +366,7 @@
contentColor="#0067CF" contentColor="#0067CF"
backColor="#f2f2f2" textPosition="outside" percentum precision="0" /> backColor="#f2f2f2" textPosition="outside" percentum precision="0" />
</view> </view>
<view class="tjInfo" v-for="(item,index) in jobProgressList" :key="item.id" @click="jobProgress(item,index,'fzl')" :class="{active:jobActive == index || brdName == item.label || potName == item.label || mnfBl == item.label}"> <view class="tjInfo" v-for="(item,index) in jobProgressList" :key="index" @click="jobProgress(item,index,'fzl')" :class="{active:jobActive == index || brdName == item.label || potName == item.label || mnfBl == item.label}">
<view class="label">{{ item.label }}{{filterType == 'CABIN_LEVEL_TYPE' ? '层' : ''}}</view> <view class="label">{{ item.label }}{{filterType == 'CABIN_LEVEL_TYPE' ? '层' : ''}}</view>
<lx-progress-bar title="" :total="item.totalProgress" :firstValue="item.progress" <lx-progress-bar title="" :total="item.totalProgress" :firstValue="item.progress"
contentColor="#0067CF" contentColor="#0067CF"
@ -387,7 +387,7 @@
<view class="itemList"> <view class="itemList">
<!-- <custom-waterfalls-flow :value="itemList" :column="2" :columnSpace="1"> --> <!-- <custom-waterfalls-flow :value="itemList" :column="2" :columnSpace="1"> -->
<!-- <template v-slot:default="item"> --> <!-- <template v-slot:default="item"> -->
<view v-for="item in itemList" :key="item.lwpId" class="exp" @click="clickItem(item)" :class="{actives:item.flag}"> <view v-for="(item,index) in itemList" :key="index" class="exp" @click="clickItem(item)" :class="{actives:item.flag}">
<view class="item"> <view class="item">
<view class="row"> <view class="row">
<view class="title"> <view class="title">
@ -566,7 +566,7 @@
contentColor="#0067CF" contentColor="#0067CF"
backColor="#f2f2f2" textPosition="outside" percentum precision="0" /> backColor="#f2f2f2" textPosition="outside" percentum precision="0" />
</view> </view>
<view class="tjInfo" v-for="(item,index) in jobProgressList" :key="item.id" @click="jobProgress(item,index,'bzz')" :class="{active:jobActive == index || brdName == item.label || potName == item.label || mnfBl == item.label}"> <view class="tjInfo" v-for="(item,index) in jobProgressList" :key="index" @click="jobProgress(item,index,'bzz')" :class="{active:jobActive == index || brdName == item.label || potName == item.label || mnfBl == item.label}">
<view class="label">{{ item.label }}{{filterType == 'CABIN_LEVEL_TYPE' ? '层' : ''}}</view> <view class="label">{{ item.label }}{{filterType == 'CABIN_LEVEL_TYPE' ? '层' : ''}}</view>
<lx-progress-bar title="" :total="item.totalProgress" :firstValue="item.progress" <lx-progress-bar title="" :total="item.totalProgress" :firstValue="item.progress"
contentColor="#0067CF" contentColor="#0067CF"
@ -586,8 +586,8 @@
<view class="itemList"> <view class="itemList">
<!-- <custom-waterfalls-flow :value="itemList" :column="2" :columnSpace="1"> --> <!-- <custom-waterfalls-flow :value="itemList" :column="2" :columnSpace="1"> -->
<!-- <template v-slot:default="item"> --> <!-- <template v-slot:default="item"> -->
<template v-for="item in itemList"> <template v-for="(item,index) in itemList">
<view class="exp" @click="openPOP(item)"> <view class="exp" @click="openPOP(item)" :key="index">
<view class="item"> <view class="item">
<view class="row"> <view class="row">
<view class="title"> <view class="title">
@ -736,7 +736,7 @@
<view class="imgLi"> <view class="imgLi">
<view class="maskBox"> <view class="maskBox">
<view class="line"> <view class="line">
<view class="testLine" v-for="item2 in item.shipSpace" :key="item2" <view class="testLine" v-for="(item2,index2) in item.shipSpace" :key="index2"
:style="{height:item.maxHeight+'px'}"> :style="{height:item.maxHeight+'px'}">
</view> </view>
<template v-if="goodsInfo.length && goodsInfo.length > 0"> <template v-if="goodsInfo.length && goodsInfo.length > 0">
@ -1043,8 +1043,8 @@
</uni-popup> </uni-popup>
<uni-popup ref="bzzPOP" type="dialog"> <uni-popup ref="bzzPOP" type="dialog">
<view class="bzzBox"> <view class="bzzBox">
<template v-for="item in bzzPOPList"> <template v-for="(item,index) in bzzPOPList">
<view class="exp"> <view class="exp" :key="index">
<view class="item"> <view class="item">
<view class="row"> <view class="row">
<view class="title"> <view class="title">
@ -1324,6 +1324,7 @@
this.getTotalProgress() // this.getTotalProgress() //
this.getRoleId() // ID this.getRoleId() // ID
}, },
components: { components: {
HeadView, HeadView,
HeadInfo, HeadInfo,
@ -1332,7 +1333,10 @@
methods: { methods: {
// tabs // tabs
changeTabs(e) { changeTabs(e) {
this.getQueryCheckRecord(0) // this.itemList = []
this.jobProgressList = []
this.tabsValue = e.value
this.tabsName = e.label
this.mnfBl = '' this.mnfBl = ''
this.brdId = '' this.brdId = ''
this.brdName = '' this.brdName = ''
@ -1340,16 +1344,18 @@
this.bvmName = '' this.bvmName = ''
this.potId = '' this.potId = ''
this.potName = '' this.potName = ''
this.itemList = []
this.sendValue = '' this.sendValue = ''
this.tabsValue = e.value
this.tabsName = e.label
this.zTjActive = -1 this.zTjActive = -1
this.shipDeck = "" this.shipDeck = ""
this.current = 1 this.current = 1
this.zTjType = true this.zTjType = true
this.activeIndex = 0 this.activeIndex = 0
this.jobProgressList = [] this.zzlFlag = true
this.fzlFlag = true
this.directorList = []
if(e.label == '总指令' || e.label == '分指令') {
this.getStatistics() //
}
if (e.label == '分指令' || e.label == '班组长分指令') { if (e.label == '分指令' || e.label == '班组长分指令') {
this.loadOtherOrder() this.loadOtherOrder()
this.askDisabled = true this.askDisabled = true
@ -1367,13 +1373,8 @@
this.getDc() this.getDc()
this.askDisabled = true this.askDisabled = true
} }
if(e.label == '总指令' || e.label == '分指令') { this.getQueryCheckRecord(0) //
this.getStatistics() //
}
this.directorList = []
this.getRoleId() this.getRoleId()
this.zzlFlag = true
this.fzlFlag = true
}, },
// //
refresh() { refresh() {
@ -1498,8 +1499,8 @@
method: 'GET', // method: 'GET', //
success: (res) => { success: (res) => {
this.ZLFlag = res.data.data.length > 0 ? true : false this.ZLFlag = res.data.data.length > 0 ? true : false
if(!this.ZLFlag) return
this.zTjList = {} this.zTjList = {}
if(!this.ZLFlag) return
this.zTjList = res.data.data[0] this.zTjList = res.data.data[0]
this.zTjList["totalSum"] = this.zTjList.totalSentCount + this.zTjList.totalNotSentCount this.zTjList["totalSum"] = this.zTjList.totalSentCount + this.zTjList.totalNotSentCount
this.zTjList["branchSum"] = this.zTjList.branchSentCount + this.zTjList this.zTjList["branchSum"] = this.zTjList.branchSentCount + this.zTjList
@ -1519,7 +1520,7 @@
if(this.goodsClassifySelected == null) this.goodsClassifySelected = 0 if(this.goodsClassifySelected == null) this.goodsClassifySelected = 0
uni.request({ uni.request({
// url: `${this.$local}/api/shipInstructions/page?vvyId=${this.shipInfo.vvyId}&brdId=${this.brdId}&mnfBl=${this.mnfBl}&potId=${this.potId}&bvmId=${this.bvmId}&shipDeck=${this.shipDeck}&size=${this.pageSize}&current=${this.current}`, // url: `${this.$local}/api/shipInstructions/page?vvyId=${this.shipInfo.vvyId}&brdId=${this.brdId}&mnfBl=${this.mnfBl}&potId=${this.potId}&bvmId=${this.bvmId}&shipDeck=${this.shipDeck}&size=${this.pageSize}&current=${this.current}`,
url: `${this.$local}/api/loadShipCommand/queryCommandCardForTotal?vvyId=${this.shipInfo.vvyId}&brdId=${this.brdId}&mnfBl=${this.mnfBl}&potId=${this.potId}&bvmId=${this.bvmId}&shipDeck=${this.shipDeck}&size=${this.pageSize}&current=${this.current}&goodsClassifySelected=${this.goodsClassifySelected}`, url: `${this.$local}/api/loadShipCommand/queryCommandCardForTotal?vvyId=${this.shipInfo.vvyId}&brdId=${this.brdId}&mnfBl=${this.mnfBl}&potId=${this.potId}&bvmId=${this.bvmId}&shipDeck=${this.shipDeck}&size=999&current=${this.current}&goodsClassifySelected=${this.goodsClassifySelected}`,
header: { header: {
'Content-Type': 'application/json', // 'Content-Type': 'application/json', //
'Authorization': `Bearer ${this.loginObj.access_token}` 'Authorization': `Bearer ${this.loginObj.access_token}`
@ -1527,10 +1528,10 @@
method: 'GET', // method: 'GET', //
success: (res) => { success: (res) => {
this.itemList.push(...res.data.data.records) this.itemList.push(...res.data.data.records)
if (res.data.data.records.length == 10) { // if (res.data.data.records.length == 10) {
this.current++ // this.current++
this.loadSumOrder() // this.loadSumOrder()
} // }
this.itemList.forEach((v, index) => { this.itemList.forEach((v, index) => {
v.image = '../../static/images/theme/car1.png' v.image = '../../static/images/theme/car1.png'
v.index = index v.index = index
@ -1552,7 +1553,7 @@
if(this.goodsClassifySelected == null) this.goodsClassifySelected = 0 if(this.goodsClassifySelected == null) this.goodsClassifySelected = 0
uni.request({ uni.request({
// url: `${this.$local}/api/shipInstructions/pageCommandForBranch?vvyId=${this.shipInfo.vvyId}&brdId=${this.brdId}&mnfBl=${this.mnfBl}&potId=${this.potId}&bvmId=${this.bvmId}&sendStatus=${this.sendValue}&shipDeck=${this.shipDeck}&teamFlag=${teamFlag}&size=${this.pageSize}&current=${this.current}`, // url: `${this.$local}/api/shipInstructions/pageCommandForBranch?vvyId=${this.shipInfo.vvyId}&brdId=${this.brdId}&mnfBl=${this.mnfBl}&potId=${this.potId}&bvmId=${this.bvmId}&sendStatus=${this.sendValue}&shipDeck=${this.shipDeck}&teamFlag=${teamFlag}&size=${this.pageSize}&current=${this.current}`,
url: `${this.$local}/api/loadShipCommand/queryCommandCardForBranch?vvyId=${this.shipInfo.vvyId}&brdId=${this.brdId}&mnfBl=${this.mnfBl}&potId=${this.potId}&bvmId=${this.bvmId}&sendStatus=${this.sendValue}&shipDeck=${this.shipDeck}&teamFlag=${teamFlag}&size=${this.pageSize}&current=${this.current}&goodsClassifySelected=${this.goodsClassifySelected}`, url: `${this.$local}/api/loadShipCommand/queryCommandCardForBranch?vvyId=${this.shipInfo.vvyId}&brdId=${this.brdId}&mnfBl=${this.mnfBl}&potId=${this.potId}&bvmId=${this.bvmId}&sendStatus=${this.sendValue}&shipDeck=${this.shipDeck}&teamFlag=${teamFlag}&size=999&current=${this.current}&goodsClassifySelected=${this.goodsClassifySelected}`,
header: { header: {
'Content-Type': 'application/json', // 'Content-Type': 'application/json', //
'Authorization': `Bearer ${this.loginObj.access_token}` 'Authorization': `Bearer ${this.loginObj.access_token}`
@ -1560,10 +1561,10 @@
method: 'GET', // method: 'GET', //
success: (res) => { success: (res) => {
this.itemList.push(...res.data.data.records) this.itemList.push(...res.data.data.records)
if (res.data.data.records.length == 10) { // if (res.data.data.records.length == 10) {
this.current++ // this.current++
this.loadOtherOrder() // this.loadOtherOrder()
} // }
this.itemList.forEach((v, index) => { this.itemList.forEach((v, index) => {
v.image = '../../static/images/theme/car1.png' v.image = '../../static/images/theme/car1.png'
v.index = index v.index = index