style:修改字典枚举

master
黄伟杰 2 weeks ago
parent d3565c0b44
commit c89ce1b06b

@ -329,6 +329,39 @@ export default {
validatorIsEnableRequired: 'Enabled status is required',
validatorJudgmentCriteriaRequired: 'Judgment criteria is required'
},
moldInspectionPlan: {
moduleName: 'Inspection Plan',
subTitle: 'Mold management inspection plan',
detailTitle: 'Inspection Plan Detail',
basicInfo: 'Basic Info',
planName: 'Plan Name',
planType: 'Plan Type',
planTypeMaintain: 'Maintenance',
planTypeInspect: 'Inspection',
description: 'Description',
subjectName: 'Inspection Items',
creatorName: 'Creator',
createTime: 'Created At',
updateTime: 'Updated At',
searchPlaceholder: 'Enter plan name',
createTitle: 'Create Inspection Plan',
editTitle: 'Edit Inspection Plan',
empty: 'No inspection plan data',
loadEditFailed: 'Failed to load edit data',
confirmDelete: 'Confirm delete this inspection plan?',
placeholderPlanName: 'Enter plan name',
placeholderPlanType: 'Select plan type',
placeholderDescription: 'Enter description',
placeholderSubjectSelect: 'Select inspection items',
subjectSelectTitle: 'Select Inspection Items',
noSubjectData: 'No inspection items',
validatorPlanNameRequired: 'Plan name is required',
validatorPlanTypeRequired: 'Plan type is required',
subjectListTitle: 'Related Inspection Items',
subjectCode: 'Item Code',
inspectionMethod: 'Inspection Method',
judgmentCriteria: 'Judgment Criteria'
},
mine: {
clickLogin: 'Tap to sign in',
username: 'Username: {name}',

@ -71,7 +71,9 @@ const literalMap = {
'上下模': 'moldOperate.moduleName',
'上下模详情': 'moldOperate.detailTitle',
'点检项库': 'moldInspectionItems.moduleName',
'点检项库详情': 'moldInspectionItems.detailTitle'
'点检项库详情': 'moldInspectionItems.detailTitle',
'点检模板': 'moldInspectionPlan.moduleName',
'点检模板详情': 'moldInspectionPlan.detailTitle'
}
function applyTabBarLanguage() {

@ -329,6 +329,39 @@ export default {
validatorIsEnableRequired: '是否启用不能为空',
validatorJudgmentCriteriaRequired: '判定基准不能为空'
},
moldInspectionPlan: {
moduleName: '点检模板',
subTitle: '模具管理点检模板维护',
detailTitle: '点检模板详情',
basicInfo: '基础信息',
planName: '模板名称',
planType: '模板类型',
planTypeMaintain: '保养',
planTypeInspect: '点检',
description: '描述',
subjectName: '点检项',
creatorName: '创建人',
createTime: '创建时间',
updateTime: '更新时间',
searchPlaceholder: '请输入模板名称',
createTitle: '新增点检模板',
editTitle: '编辑点检模板',
empty: '暂无点检模板数据',
loadEditFailed: '加载编辑数据失败',
confirmDelete: '确认删除该点检模板吗?',
placeholderPlanName: '请输入模板名称',
placeholderPlanType: '请选择模板类型',
placeholderDescription: '请输入描述',
placeholderSubjectSelect: '请选择点检项',
subjectSelectTitle: '选择点检项',
noSubjectData: '暂无点检项数据',
validatorPlanNameRequired: '模板名称不能为空',
validatorPlanTypeRequired: '模板类型不能为空',
subjectListTitle: '关联点检项',
subjectCode: '项目编码',
inspectionMethod: '检验方式',
judgmentCriteria: '判定基准'
},
mine: {
clickLogin: '点击登录',
username: '用户名:{name}',

@ -505,6 +505,20 @@
"navigationStyle": "custom"
}
},
{
"path": "moldInspectionPlan/index",
"style": {
"navigationBarTitleText": "点检模板",
"navigationStyle": "custom"
}
},
{
"path": "moldInspectionPlan/detail",
"style": {
"navigationBarTitleText": "点检模板详情",
"navigationStyle": "custom"
}
},
{
"path": "planList/index",
"style": {

@ -267,9 +267,9 @@
</view>
<view class="function-item" @click="handleClick('点检模板')">
<view class="function-icon" style="background: rgba(0, 188, 212, 0.1);">
<text class="icon-inner">📄</text>
<uni-icons type="paperclip" size="22" color="#00bcd4"></uni-icons>
</view>
<text class="function-name">点检模板</text>
<text class="function-name">{{ t('moldInspectionPlan.moduleName') }}</text>
</view>
<view class="function-item" @click="handleClick('点检任务')">
<view class="function-icon" style="background: rgba(0, 188, 212, 0.1);">
@ -381,7 +381,7 @@ function handleClick(name) {
moldOperate: '/pages_function/pages/moldoperate/index',
moldInspectionItems: '/pages_function/pages/moldInspectionItems/index',
'点检项库': '',
'点检模板': '',
'点检模板': '/pages_function/pages/moldInspectionPlan/index',
'点检任务': '',
'点检记录': '',
'维修项目': '',

@ -210,7 +210,7 @@ import {
getEquipmentMaintenanceByDeviceId,
getEquipmentRepairListByDeviceId
} from '@/api/mes/equipment'
import { getDictLabel } from '@/utils/dict'
import { DICT_TYPE, getDictLabel } from '@/utils/dict'
const loading = ref(false)
const deviceId = ref(undefined)
@ -249,7 +249,7 @@ function getDetailField(field) {
const statusMeta = computed(() => {
const d = detailData.value
const raw = d ? pickFirst(d, detailFieldCandidates.deviceStatus) : undefined
const label = getDictLabel('mes_tz_status', raw, detailValue(raw))
const label = getDictLabel(DICT_TYPE.MES_TZ_STATUS, raw, detailValue(raw))
return formatStatus(label)
})
const statusLabel = computed(() => statusMeta.value.label)

@ -203,7 +203,7 @@ import {
getMoldMaintenanceByMoldId,
getMoldRepairListByMoldId
} from '@/api/mes/mold'
import { getDictLabel, initAllDict } from '@/utils/dict'
import { DICT_TYPE, getDictLabel, initAllDict } from '@/utils/dict'
const loading = ref(false)
const moldId = ref(undefined)
@ -228,7 +228,7 @@ function getDetailField(field) {
const statusMeta = computed(() => {
const d = detailData.value
const raw = d ? d.status : undefined
const label = getDictLabel('erp_mold_status', raw, detailValue(raw))
const label = getDictLabel(DICT_TYPE.ERP_MOLD_STATUS, raw, detailValue(raw))
return formatStatus(label)
})
const statusLabel = computed(() => statusMeta.value.label)

@ -50,11 +50,11 @@ import { reactive } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n'
import AppTitleHeader from '@/components/common/AppTitleHeader.vue'
import { useDict } from '@/utils/dict'
import { DICT_TYPE, useDict } from '@/utils/dict'
import { getMoldInspectionItemDetail } from '@/api/mes/moldInspectionItems'
const { t } = useI18n()
const { Inspection_method, value_types, infra_boolean_string } = useDict('Inspection_method', 'value_types', 'infra_boolean_string')
const { Inspection_method, value_types, infra_boolean_string } = useDict(DICT_TYPE.INSPECTION_METHOD, DICT_TYPE.VALUE_TYPES, DICT_TYPE.INFRA_BOOLEAN_STRING)
const inspectionMethodOptions = Inspection_method
const valueTypeOptions = value_types
const boolOptions = infra_boolean_string

@ -126,11 +126,11 @@ import { computed, reactive, ref } from 'vue'
import { onShow } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n'
import AppTitleHeader from '@/components/common/AppTitleHeader.vue'
import { useDict } from '@/utils/dict'
import { DICT_TYPE, useDict } from '@/utils/dict'
import { getMoldInspectionItemPage, getMoldInspectionItemDetail, createMoldInspectionItem, updateMoldInspectionItem, deleteMoldInspectionItem } from '@/api/mes/moldInspectionItems'
const { t } = useI18n()
const { Inspection_method, value_types, infra_boolean_string } = useDict('Inspection_method', 'value_types', 'infra_boolean_string')
const { Inspection_method, value_types, infra_boolean_string } = useDict(DICT_TYPE.INSPECTION_METHOD, DICT_TYPE.VALUE_TYPES, DICT_TYPE.INFRA_BOOLEAN_STRING)
const formPopupRef = ref(null)
const searchKeyword = ref('')

@ -196,7 +196,7 @@ import { ref, computed } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import AppTitleHeader from '@/components/common/AppTitleHeader.vue'
import { getMoldDetail, getMoldInspectionByMoldId, getMoldMaintenanceByMoldId, getMoldRepairListByMoldId } from '@/api/mes/mold'
import { getDictLabel, initAllDict } from '@/utils/dict'
import { DICT_TYPE, getDictLabel, initAllDict } from '@/utils/dict'
const loading = ref(false)
const moldId = ref(undefined)
@ -216,7 +216,7 @@ function getDetailField(field) {
const statusMeta = computed(() => {
const d = detailData.value
const raw = d ? d.status : undefined
const label = getDictLabel('erp_mold_status', raw, detailValue(raw))
const label = getDictLabel(DICT_TYPE.ERP_MOLD_STATUS, raw, detailValue(raw))
return formatStatus(label)
})
const statusLabel = computed(() => statusMeta.value.label)

@ -283,7 +283,7 @@ import { onLoad } from '@dcloudio/uni-app'
import AppTitleHeader from '@/components/common/AppTitleHeader.vue'
import { createMold, deleteMold, getMoldBrandTree, getMoldDetail, getMoldPage, updateMold, uploadMoldImage } from '@/api/mes/mold'
import { getProductUnitSimpleList, getUnitList } from '@/api/mes/product'
import { getDictLabel, initAllDict } from '@/utils/dict'
import { DICT_TYPE, getDictLabel, initAllDict } from '@/utils/dict'
const brandPickerRef = ref(null)
const statusPickerRef = ref(null)
@ -331,7 +331,7 @@ const selectedBrandLabel = computed(() => {
const statusOptions = computed(() => {
const options = []
for (let i = 0; i <= 9; i += 1) {
const label = getDictLabel('erp_mold_status', i, '')
const label = getDictLabel(DICT_TYPE.ERP_MOLD_STATUS, i, '')
if (label && label !== String(i)) {
options.push({ label, value: i })
}
@ -723,7 +723,7 @@ function normalizeDetailData(res) {
}
function moldStatusText(status) {
return getDictLabel('erp_mold_status', status, textValue(status))
return getDictLabel(DICT_TYPE.ERP_MOLD_STATUS, status, textValue(status))
}
function statusClass(status) {

@ -69,13 +69,13 @@ import { ref, computed } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import AppTitleHeader from '@/components/common/AppTitleHeader.vue'
import { getMoldBrandDetail } from '@/api/mes/mold'
import { getDictLabel, initAllDict } from '@/utils/dict'
import { DICT_TYPE, getDictLabel, initAllDict } from '@/utils/dict'
const detailId = ref(undefined)
const detailData = ref(null)
const orgTypeText = computed(() =>
getDictLabel('mes_org_type', detailData.value?.orgType, textValue(detailData.value?.orgType))
getDictLabel(DICT_TYPE.MES_ORG_TYPE, detailData.value?.orgType, textValue(detailData.value?.orgType))
)
const enableText = computed(() => {

@ -149,7 +149,7 @@ import { ref, reactive } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import AppTitleHeader from '@/components/common/AppTitleHeader.vue'
import { createMoldBrand, deleteMoldBrand, getMoldBrandDetail, getMoldBrandPage, updateMoldBrand } from '@/api/mes/mold'
import { getDictLabel, initAllDict } from '@/utils/dict'
import { DICT_TYPE, getDictLabel, initAllDict } from '@/utils/dict'
const formPopupRef = ref(null)
const searchKeyword = ref('')
@ -263,7 +263,7 @@ function normalizePageData(res) {
}
function orgTypeLabel(value) {
return getDictLabel('mes_org_type', value, textValue(value))
return getDictLabel(DICT_TYPE.MES_ORG_TYPE, value, textValue(value))
}
function textValue(value) {

@ -69,10 +69,10 @@ import { onLoad } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n'
import AppTitleHeader from '@/components/common/AppTitleHeader.vue'
import { getMoldGetDetail } from '@/api/mes/moldget'
import { useDict } from '@/utils/dict'
import { DICT_TYPE, useDict } from '@/utils/dict'
const { t } = useI18n()
const { erp_audit_status } = useDict('erp_audit_status')
const { erp_audit_status } = useDict(DICT_TYPE.ERP_AUDIT_STATUS)
const detail = ref({})
const items = ref([])

@ -184,10 +184,10 @@ import { useI18n } from 'vue-i18n'
import AppTitleHeader from '@/components/common/AppTitleHeader.vue'
import { getMoldList } from '@/api/mes/mold'
import { getMoldGetPage, getMoldGetDetail, createMoldGet, updateMoldGet, updateMoldGetStatus, deleteMoldGet, getWarehouseSimpleList, getSimpleUserList } from '@/api/mes/moldget'
import { useDict } from '@/utils/dict'
import { DICT_TYPE, useDict } from '@/utils/dict'
const { t } = useI18n()
const { erp_audit_status, erp_mold_status, infra_boolean_string } = useDict('erp_audit_status', 'erp_mold_status', 'infra_boolean_string')
const { erp_audit_status, erp_mold_status, infra_boolean_string } = useDict(DICT_TYPE.ERP_AUDIT_STATUS, DICT_TYPE.ERP_MOLD_STATUS, DICT_TYPE.INFRA_BOOLEAN_STRING)
const list = ref([])
const loading = ref(false)

@ -72,10 +72,10 @@ import { onLoad } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n'
import AppTitleHeader from '@/components/common/AppTitleHeader.vue'
import { getMoldReturnDetail } from '@/api/mes/moldreturn'
import { useDict } from '@/utils/dict'
import { DICT_TYPE, useDict } from '@/utils/dict'
const { t } = useI18n()
const { erp_audit_status } = useDict('erp_audit_status')
const { erp_audit_status } = useDict(DICT_TYPE.ERP_AUDIT_STATUS)
const detail = ref({})
const items = ref([])
const currentTab = ref(0)

@ -199,10 +199,10 @@ import AppTitleHeader from '@/components/common/AppTitleHeader.vue'
import { getMoldList } from '@/api/mes/mold'
import { getMoldReturnPage, getMoldReturnDetail, createMoldReturn, updateMoldReturn, updateMoldReturnStatus, deleteMoldReturn } from '@/api/mes/moldreturn'
import { getWarehouseSimpleList } from '@/api/mes/moldget'
import { useDict } from '@/utils/dict'
import { DICT_TYPE, useDict } from '@/utils/dict'
const { t } = useI18n()
const { erp_audit_status, erp_mold_status } = useDict('erp_audit_status', 'erp_mold_status')
const { erp_audit_status, erp_mold_status } = useDict(DICT_TYPE.ERP_AUDIT_STATUS, DICT_TYPE.ERP_MOLD_STATUS)
const list = ref([])
const loading = ref(false)

@ -2,6 +2,16 @@ import useDictStore from "@/store/modules/dict";
import { getDicts, getSimpleDictList } from "@/api/system/dict/data";
import { Ref, ref, toRefs } from "vue";
export enum DICT_TYPE {
INFRA_BOOLEAN_STRING = "infra_boolean_string",
ERP_MOLD_STATUS = "erp_mold_status",
ERP_AUDIT_STATUS = "erp_audit_status",
MES_ORG_TYPE = "mes_org_type",
MES_TZ_STATUS = "mes_tz_status",
INSPECTION_METHOD = "Inspection_method",
VALUE_TYPES = "value_types",
}
type DictItem = {
label: string;
value: string | number;

Loading…
Cancel
Save