diff --git a/.env.development b/.env.development index 93df8ef..739c1ab 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ # 开发环境配置 ENV = 'development' -VITE_APP_API_HOST = 'http://localhost:8888' +VITE_APP_API_HOST = 'http://127.0.0.1:7000' # 开发环境 VITE_APP_BASE_API = '/dev-api' diff --git a/src/assets/images/door.rar b/src/assets/images/door.rar new file mode 100644 index 0000000..30a44de Binary files /dev/null and b/src/assets/images/door.rar differ diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index e988239..75f0c7d 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -1,26 +1,14 @@ @@ -327,12 +294,15 @@ const fkPlanId = ref('') const planType = ref(1) // 执行任务,填写表单 function handleExecute(row) { + // 1-巡检 2-点检 planType.value = row.type + // 1-检查 2-保养 + const innerType = row.innerType fkPlanId.value = row.planId executeKey.value = row.id setTaskStartTime({ id: executeKey.value }) // open2.value = true; - proxy.$router.push({ name: 'TheTaskExecuteView', query: { planType: row.type, fkPlanId: row.planId, executeKey: row.id } }) + proxy.$router.push({ name: 'TheTaskExecuteView', query: { planType: row.type, fkPlanId: row.planId, executeKey: row.id, innerType } }) // proxy.$router.push({ path: '/deviceManagement/deviceTaskExecute', query: { planType: row.type, fkPlanId: row.taskId, executeKey: row.id } }); } diff --git a/src/views/deviceManagement/deviceformconfig/index.vue b/src/views/deviceManagement/deviceformconfig/index.vue index b661365..596701b 100644 --- a/src/views/deviceManagement/deviceformconfig/index.vue +++ b/src/views/deviceManagement/deviceformconfig/index.vue @@ -9,49 +9,37 @@ - + {{ $t('btn.add') }} - + - - + + - + @@ -60,10 +48,7 @@ - @@ -180,7 +165,7 @@ const state = reactive({ multiple: true, form: {}, rules: { - id: [{ required: true, message: 'id 雪花不能为空', trigger: 'blur' }] + //id: [{ required: true, message: 'id 雪花不能为空', trigger: 'blur' }] }, options: { // 表单类型 选项列表 格式 eg:{ dictLabel: '标签', dictValue: '0'} @@ -190,8 +175,16 @@ const state = reactive({ // 使用字典 var dictParams = [{ dictType: 'mes_device_inspect_form_config', columnName: 'typeOptions' }] - +import { getOneDict } from '@/utils/dict.js' +async function initDict() { + const dictSelectList = ['mes_device_inspect_form_config'] + const statusRes = await getOneDict(dictSelectList[0]) + if (statusRes.code === 200) { + state.options.typeOptions = statusRes.data[0].list + } +} proxy.getDicts(dictParams).then((response) => { + console.log(response) response.data.forEach((element) => { state.options[element.columnName] = element.list.map((item) => { item.dictValue = parseInt(item.dictValue) @@ -229,6 +222,7 @@ function handleAdd() { open.value = true title.value = '添加设备检查项表单配置表' opertype.value = 1 + initDict() } // 修改按钮操作 function handleUpdate(row) { @@ -240,7 +234,7 @@ function handleUpdate(row) { open.value = true title.value = '修改设备检查项表单配置表' opertype.value = 2 - + initDict() form.value = { ...data }