From 4cba18780b53a1a1dd4ca64d27b7c7c4a05c900c Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Thu, 26 Dec 2024 19:20:48 +0800
Subject: [PATCH] =?UTF-8?q?YT-1838pda=E6=94=B6=E8=B4=A7=E4=BB=BB=E5=8A=A1?=
=?UTF-8?q?=EF=BC=8C=E7=8F=AD=E6=AC=A1=E5=BA=94=E6=98=BE=E7=A4=BA=E4=B8=AD?=
=?UTF-8?q?=E6=96=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/common/directory.js | 20 ++++++++++++++++++++
src/mycomponents/balance/shift.vue | 11 +++++++++--
src/mycomponents/item/item.vue | 4 ++--
src/pages/index/index.vue | 2 +-
4 files changed, 32 insertions(+), 5 deletions(-)
diff --git a/src/common/directory.js b/src/common/directory.js
index e21c2b51..502af6e7 100644
--- a/src/common/directory.js
+++ b/src/common/directory.js
@@ -24,6 +24,7 @@ let locationAreaTypeList = [];
let businessList = [];
let countScopeTypeList = [];
let priorityList = []
+let shiftList = []
@@ -68,6 +69,7 @@ export function clearCacheData() {
businessList = []
countScopeTypeList = []
priorityList = []
+ shiftList = []
}
//获取字典信息
@@ -75,6 +77,7 @@ export function getDirectoryInfo(type) {
var result = [];
var list = uni.getStorageSync("dictionary")
+ console.log(455,uni.getStorageSync("dictionary"))
if (list != undefined && list.length > 0) {
for (let item of list) {
if (item.type == type) {
@@ -690,4 +693,21 @@ export function getDeliverMethod(value) {
}
}
return resultInfo
+}
+//获取班次
+export function getShiftName(value) {
+ var resultInfo = "";
+ if (shiftList.length == 0) {
+ shiftList = getDirectoryInfo("shift")
+ }
+ console.log(333,shiftList)
+ if (shiftList.length > 0) {
+ for (let item of shiftList) {
+ if (item.value == value) {
+ resultInfo = item.label
+ break;
+ }
+ }
+ }
+ return resultInfo
}
\ No newline at end of file
diff --git a/src/mycomponents/balance/shift.vue b/src/mycomponents/balance/shift.vue
index af509ce9..fd9c1ff9 100644
--- a/src/mycomponents/balance/shift.vue
+++ b/src/mycomponents/balance/shift.vue
@@ -1,7 +1,7 @@
{{title}}
- {{shift}}
+ {{handleGetShiftName()}}
@@ -9,6 +9,10 @@
import {
getSwitchInfoByCode
} from '@/common/basic.js';
+
+ import {
+ getShiftName
+ } from '@/common/directory.js';
export default {
components: {
},
@@ -35,7 +39,10 @@ import {
mounted() {
},
methods: {
-
+ handleGetShiftName(){
+ console.log(99,getShiftName(this.shift))
+ return getShiftName(this.shift)
+ }
}
}
diff --git a/src/mycomponents/item/item.vue b/src/mycomponents/item/item.vue
index a19b1279..ee12d3ae 100644
--- a/src/mycomponents/item/item.vue
+++ b/src/mycomponents/item/item.vue
@@ -6,9 +6,9 @@
{{dataContent.itemCode}}
- {{dataContent.itemName}}
+ {{dataContent.itemName}}
|
- {{dataContent.itemDesc1}}
+ {{dataContent.itemDesc1}}
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index e62d5805..aca3c477 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -364,7 +364,7 @@
"unplanned_issue_reason", "scrap_reason", "inspect_failed_reason",
"request_status", "inspect_type", "next_action", "sample_method", "transfer_mode",
"count_stage", "inspect_result", "area_type","count_scope_type","priority",
- "receive_status",'deliver_method','duty','duty_details'
+ "receive_status",'deliver_method','duty','duty_details','shift'
]
}
getDictionaryItem(params).then(res => {