From f722ecea6ef955d0eae18883d1992cf9220a78d2 Mon Sep 17 00:00:00 2001 From: wangxk Date: Wed, 18 Jun 2025 09:22:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=98=E5=82=A8=E7=A9=BA=E9=97=B4=E5=92=8C?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86=EF=BC=8C=E8=AF=95=E9=AA=8C?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=AE=A1=E7=90=86=E5=85=B3=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/special/project/index.vue | 18 ++++++-- web/src/views/testdata/testtask/index.vue | 51 +++++++++++++++++------ 2 files changed, 54 insertions(+), 15 deletions(-) diff --git a/web/src/views/special/project/index.vue b/web/src/views/special/project/index.vue index eba21aa..e8fa908 100644 --- a/web/src/views/special/project/index.vue +++ b/web/src/views/special/project/index.vue @@ -9,6 +9,7 @@ import { onMounted, ref } from "vue"; import { ElMessage, ElMessageBox } from 'element-plus' import Page from '@/components/Pagination/page.vue' import { projectPage, addSdproject, updateSdproject, deleteSdprojectById, deleteSdprojectByIds } from "@/api/project"; +import { storagesBytype } from "@/api/storage"; import { getDict } from '@/api/dict' import { id } from "element-plus/es/locale"; //定义表格数据 @@ -47,10 +48,14 @@ function getdata() { } //获取字典项目类型 const dictType = ref([]) +const storagesarr = ref([]) function getDictOne() { getDict({ dictcode: 'zxxmlx' }).then((res: any) => { dictType.value = res.data }) + storagesBytype({type:'local'}).then((res: any) => { + storagesarr.value = res.data + }) } //弹框命名 const title = ref("") @@ -67,7 +72,7 @@ function addproject() { projectProps: "",//信息 projectTime: "",//时间 projectType: ""//类型 - , localStorageId: "1" + , localStorageId: "" } formitemarr.value.length = 0 } @@ -155,7 +160,7 @@ const projectForme: any = ref({ projectProps: "",//信息 projectTime: "",//时间 projectType: ""//类型 - , localStorageId: "1" + , localStorageId: "" }) //表单确定 async function submitForm(formEl: any) { @@ -192,9 +197,10 @@ async function submitForm(formEl: any) { //用户弹窗规则定义 const moderules = ref({ projectCode: [{ required: true, message: "请输入项目编号", trigger: "blur" }], - projectType: [{ required: true, message: "请输入项目类型", trigger: "blur" }], + projectType: [{ required: true, message: "请选择项目类型", trigger: "change" }], projectName: [{ required: true, message: "请输入项目名称", trigger: "blur" }], projectTime: [{ type: 'date', required: true, message: "请选择项目启动时间", trigger: "change" }], + localStorageId:[{ required: true, message: "请选择存储空间", trigger: "change" }] }); onMounted(() => { getdata() @@ -378,6 +384,12 @@ function attributeclose(){ format="YYYY-MM-DD HH:mm:ss" style="width:100%;" value-format="YYYY-MM-DD HH:mm:ss" /> + + + + + diff --git a/web/src/views/testdata/testtask/index.vue b/web/src/views/testdata/testtask/index.vue index 2e53b06..2cdc9a0 100644 --- a/web/src/views/testdata/testtask/index.vue +++ b/web/src/views/testdata/testtask/index.vue @@ -9,6 +9,7 @@ import { onMounted, ref } from "vue"; import { ElMessage, ElMessageBox } from 'element-plus' import Page from '@/components/Pagination/page.vue' import { tstaskPage, addtsTask, updatetsTask, deleteTsTaskById, deleteTsTaskByIds, confirmDeleteTask } from "@/api/testtask"; +import { storagesBytype } from "@/api/storage"; import { getDict } from '@/api/dict' //定义表格数据 const tableData: any = ref([]); @@ -93,8 +94,8 @@ function addproject() { testDescribe: "",// 试验描述 sensorDescribe: "",// 传感器描述 taskProps: "",//信息 - localStorageId: '1', - backupStorageId: '2' + localStorageId: '', + backupStorageId: '' } formitemarr.value.length = 0 } @@ -200,8 +201,8 @@ const projectForme: any = ref({ testDescribe: "",// 试验描述 sensorDescribe: "",// 传感器描述 taskProps: "",//信息 - localStorageId: '1', - backupStorageId: '2' + localStorageId: '', + backupStorageId: '' }) //表单确定 async function submitForm(formEl: any) { @@ -246,6 +247,8 @@ const moderules = ref({ taskType: [{ required: true, message: "请选择任务类型", trigger: "change" }], taskDate: [{ required: true, message: "请选择任务时间", trigger: "change" }], taskPlace: [{ required: true, message: "请输入任务地点", trigger: "blur" }], + localStorageId: [{ required: true, message: "请选择本地存储空间", trigger: "change" }], + backupStorageId: [{ required: true, message: "请选择minio存储空间", trigger: "change" }], }); onMounted(() => { getdata() @@ -253,10 +256,18 @@ onMounted(() => { }); //获取字典项目类型 const dictType = ref([]) +const localarr = ref([]) +const minioarr = ref([]) function getDictOne() { getDict({ dictcode: 'taskType' }).then((res: any) => { dictType.value = res.data }) + storagesBytype({ type: 'local' }).then((res: any) => { + localarr.value = res.data + }) + storagesBytype({ type: 'minio' }).then((res: any) => { + minioarr.value = res.data + }) } //项目类型转换 function typeName(arr: any, itemCode: any) { @@ -456,7 +467,7 @@ function attributeclose() {
- + @@ -467,6 +478,22 @@ function attributeclose() { value-format="YYYY-MM-DD" />
+
+ + + + + + + + + + +
@@ -502,16 +529,16 @@ function attributeclose() { 删除
- + -
- 添加属性 - 确定 - 取消 -
-
+
+ 添加属性 + 确定 + 取消 +
+