diff --git a/src/views/mes/md/workstation/workshop/WorkshopForm.vue b/src/views/mes/md/workstation/workshop/WorkshopForm.vue
index 157cc922e..6bca39882 100644
--- a/src/views/mes/md/workstation/workshop/WorkshopForm.vue
+++ b/src/views/mes/md/workstation/workshop/WorkshopForm.vue
@@ -6,6 +6,7 @@
:rules="formRules"
label-width="100px"
v-loading="formLoading"
+ :disabled="isDetail"
>
@@ -62,7 +63,7 @@
- 确 定
+ 确 定
取 消
@@ -79,9 +80,17 @@ const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
const dialogVisible = ref(false) // 弹窗的是否展示
-const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中
-const formType = ref('') // 表单的类型:create - 新增;update - 修改
+const formType = ref('') // 表单的类型:create - 新增;update - 修改;detail - 详情
+const isDetail = computed(() => formType.value === 'detail') // 是否详情模式(只读)
+const dialogTitle = computed(() => {
+ const titles: Record = {
+ create: '新增车间',
+ update: '修改车间',
+ detail: '查看车间'
+ }
+ return titles[formType.value] || formType.value
+})
const userList = ref([]) // 用户列表
const formData = ref({
id: undefined,
@@ -102,7 +111,6 @@ const formRef = ref() // 表单 Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
- dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
// 加载用户列表
diff --git a/src/views/mes/md/workstation/workshop/index.vue b/src/views/mes/md/workstation/workshop/index.vue
index 6e6793d27..b4ffa2005 100644
--- a/src/views/mes/md/workstation/workshop/index.vue
+++ b/src/views/mes/md/workstation/workshop/index.vue
@@ -54,7 +54,13 @@
-
+
+
+
+ {{ scope.row.code }}
+
+
+