From aeeec8ea851d792c15ecbd8220214188178be809 Mon Sep 17 00:00:00 2001
From: 13937891274 <kxc0822>
Date: 星期二, 09 八月 2022 15:34:47 +0800
Subject: [PATCH] 页面修改
---
src/components/equipmentDailog/DailogS.vue | 84 +++++++++++++++++++----------------------
src/components/equipmentDailog/Dailog.vue | 16 ++------
2 files changed, 43 insertions(+), 57 deletions(-)
diff --git a/src/components/equipmentDailog/Dailog.vue b/src/components/equipmentDailog/Dailog.vue
index ff93503..224bb22 100644
--- a/src/components/equipmentDailog/Dailog.vue
+++ b/src/components/equipmentDailog/Dailog.vue
@@ -6,7 +6,7 @@
<el-input v-model="form.qName" placeholder="请填写装置设施名称" />
</el-form-item>
<el-form-item label="装置设施位号" size="default" prop="positionNum">
- <el-input disabled v-model="form.positionNum" placeholder="请填写装置设施位号" />
+ <el-input v-model="form.positionNum" placeholder="请填写装置设施位号" />
</el-form-item>
<el-form-item label="装置设施用途" size="default" prop="qUsage">
<el-input v-model="form.qUsage" placeholder="请填写装置设施用途" />
@@ -14,7 +14,7 @@
<el-form-item label="装置设施型号" size="default" prop="model">
<el-input v-model="form.model" placeholder="请填写装置设施型号" />
</el-form-item>
- <el-form-item label="类型/类别外键" size="default" prop="equipmentTypeName">
+ <el-form-item label="类型/类别外键" size="default" prop="equipmentTypeId">
<el-input v-model="form.equipmentTypeName" placeholder="请选择">
<template #append>
<el-button :icon="Search" @click="opencategory"></el-button>
@@ -333,7 +333,7 @@
</span>
</template>
</el-dialog>
- <categoryDailog ref="categoryShow" @typeId="Tid"></categoryDailog>
+ <categoryDailog ref="categoryShow"></categoryDailog>
<regionDailog ref="regionShow"></regionDailog>
<DailogSearchUser ref="UserShow" @SearchUser="userId"></DailogSearchUser>
<maintenanceDailog ref="maintenanceShow" @onMain="main"></maintenanceDailog>
@@ -460,8 +460,7 @@
repaireDetailList: [],
- equipmentTypeId: "",
- equipmentTypeName:"",
+ equipmentTypeId: 1,
useDate: '',
@@ -521,7 +520,6 @@
qUsage: [],
model: [],
equipmentTypeId: [],
- equipmentTypeName:[],
departmentId: [],
setPart: [],
produceTime: [],
@@ -733,11 +731,6 @@
form.value.stopSubmitPersonName = val.realName;
}
};
- const Tid=(data:any)=>{
- form.value.equipmentTypeId=data.id
- form.value.equipmentTypeName=data.typeName
- form.value.positionNum=data.sortNum
- }
//全屏
const full = ref(false);
const toggleFullscreen = () => {
@@ -766,7 +759,6 @@
};
const data = ref();
return {
- Tid,
deepClone,
rules,
userId,
diff --git a/src/components/equipmentDailog/DailogS.vue b/src/components/equipmentDailog/DailogS.vue
index 749925a..829e3d5 100644
--- a/src/components/equipmentDailog/DailogS.vue
+++ b/src/components/equipmentDailog/DailogS.vue
@@ -1,13 +1,13 @@
<template>
- <el-dialog :fullscreen="full" v-model="dialogVisible" draggable :title="titles" width="60%">
+ <el-dialog :fullscreen="full" v-model="dialogVisible" draggable :title="titles" width="60%" @close="resetForm(ruleFormRef)">
<el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button>
- <el-form :model="form" label-width="130px" :disabled="disabled">
+ <el-form :model="form" ref="ruleFormRef" label-width="130px" :rules="rules" :disabled="disabled">
<el-row>
<el-col :span="11">
- <el-form-item label="类型/类别外键" size="default">
+ <el-form-item label="类型/类别外键" size="default" prop="equipmentTypeId">
<el-input v-model="form.equipmentTypeId" placeholder="请选择">
<template #append>
- <el-button :icon="Search" @click="opencategory"></el-button>
+ <el-button :icon="Search" @click="opencategory" disabled></el-button>
</template>
</el-input>
</el-form-item>
@@ -39,10 +39,10 @@
</el-form-item>
</el-col>
<el-col :span="11" :offset="2">
- <el-form-item label="联系人" size="default">
+ <el-form-item label="联系人" size="default" prop="connectPersonName">
<el-input v-model="form.connectPersonName" placeholder="请选择">
<template #append>
- <el-button :icon="Search" @click="openUser(0)"></el-button>
+ <el-button :icon="Search" @click="openUser(1)"></el-button>
</template>
</el-input>
</el-form-item>
@@ -50,19 +50,19 @@
</el-row>
<el-row>
<el-col :span="11">
- <el-form-item label="录入人" size="default">
+ <el-form-item label="录入人" size="default" prop="inputPersonName">
<el-input v-model="form.inputPersonName" placeholder="请选择">
<template #append>
- <el-button :icon="Search" @click="openUser(1)"></el-button>
+ <el-button :icon="Search" @click="openUser(2)"></el-button>
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="11" :offset="2">
- <el-form-item label="责任人" size="default">
+ <el-form-item label="责任人" size="default" prop="responsibilityPersonName">
<el-input v-model="form.responsibilityPersonName" placeholder="请选择">
<template #append>
- <el-button :icon="Search" @click="openUser(2)"></el-button>
+ <el-button :icon="Search" @click="openUser(3)"></el-button>
</template>
</el-input>
</el-form-item>
@@ -241,23 +241,21 @@
</el-tabs>
<template #footer>
<span class="dialog-footer">
- <el-button @click="resetForm">关闭</el-button>
- <el-button type="primary" @click="submitForm">确定</el-button>
+ <el-button @click="resetForm(ruleFormRef)">关闭</el-button>
+ <el-button type="primary" @click="submitForm(ruleFormRef)">确定</el-button>
</span>
</template>
</el-dialog>
<categoryDailog ref="categoryShow"></categoryDailog>
<RegionsDialog ref="planShow" @SearchUser="onUser"></RegionsDialog>
- <DailogSearchUser ref="UserOneShow" @SearchUser="userId"></DailogSearchUser>
-<!-- <DailogSearchUser ref="UserTwoShow" @SearchUser="userId"></DailogSearchUser>-->
-<!-- <DailogSearchUser ref="UserThreeShow" @SearchUser="userId"></DailogSearchUser>-->
+ <DailogSearchUser ref="UserShow" @SearchUser="userId"></DailogSearchUser>
<maintenanceDailog ref="maintenanceShow" @onMain="main"></maintenanceDailog>
<detectDailog ref="detectShow" @onDelect="delect"></detectDailog>
<repairDailog ref="repairShow" @onRepair="Repair"></repairDailog>
<standardDailog ref="standardShow" @onStand="Stand"></standardDailog>
</template>
<script lang="ts">
-import { defineComponent, ref } from 'vue';
+import { defineComponent, ref ,reactive} from 'vue';
import { Search, Plus, FullScreen } from '@element-plus/icons-vue';
import { timeDate } from '/@/assets/index.ts';
import categoryDailog from './categoryDailog.vue';
@@ -267,7 +265,7 @@
import repairDailog from './repairDailog.vue';
import standardDailog from './standardDailog.vue';
import DailogSearchUser from '/@/components/DailogSearchUser/index.vue';
-import { ElMessage, ElMessageBox } from 'element-plus';
+import { ElMessage, ElMessageBox ,FormInstance ,FormRules,} from 'element-plus';
import type { UploadProps, UploadUserFile } from 'element-plus';
import { facilityManagementApi } from '/@/api/facilityManagement';
import { goalManagementApi } from '/@/api/goalManagement';
@@ -276,12 +274,12 @@
setup(props, { emit }) {
const dialogVisible = ref(false);
const form = ref({
- equipmentTypeId: '',
+ equipmentTypeId: 1,
treatment: '',
inputPersonId: '',
- inputPersonName:'',
+ inputPersonName: '',
departmentId: '',
delRepaireDetailList: [],
@@ -292,11 +290,11 @@
checkDetailList: [],
responsibilityPersonId: '',
- responsibilityPersonName:'',
+ responsibilityPersonName: '',
delTakecareStardardeDetailList: [],
connectPersonId: '',
- connectPersonName:'',
+ connectPersonName: '',
scenePic: '',
@@ -338,6 +336,7 @@
delTestDetails: '',
});
+ const ruleFormRef = ref<FormInstance>();
const titles = ref();
const disabled = ref(false);
const Dailogtype = ref(false);
@@ -410,29 +409,20 @@
form.value.emergencePlanId = e.id;
};
- const UserOneShow = ref();
- // const UserTwoShow = ref();
- // const UserThreeShow = ref();
- const openUser = (type: number) => {
- // if (type == 0) {
- // UserOneShow.value.openDailog();
- // } else if (type == 1) {
- // UserTwoShow.value.openDailog();
- // } else if (type == 2) {
- // UserThreeShow.value.openDailog();
- // }
- UserOneShow.value.openDailog();
+ const UserShow = ref();
+ const openUser = (type: any) => {
+ UserShow.value.openDailog(type);
};
- const userId = ( type: number,val: any) => {
- if (type == 0) {
- form.value.connectPersonId = val.uid;
- form.value.connectPersonName = val.realName;
- } else if (type == 1) {
- form.value.inputPersonId = val.uid;
- form.value.inputPersonName = val.username;
+ const userId = (val: any, type: number) => {
+ if (type == 1) {
+ form.value.connectPersonId = val.uid;
+ form.value.connectPersonName = val.realName;
} else if (type == 2) {
- form.value.responsibilityPersonId = val.id;
- form.value.responsibilityPersonName = val.username;
+ form.value.inputPersonId = val.uid;
+ form.value.inputPersonName = val.realName;
+ } else if (type == 3) {
+ form.value.responsibilityPersonId = val.id;
+ form.value.responsibilityPersonName = val.realName;
}
};
const maintenanceShow = ref();
@@ -535,7 +525,11 @@
form.value.checkStandardeDetailList[index.value] = val;
}
};
+ const rules = reactive<FormRules>({
+ equipmentTypeId: {
+ }
+ })
//图片提交
const imageUrl = ref('');
@@ -594,6 +588,7 @@
delect,
Repair,
Stand,
+ ruleFormRef,
index,
activeName,
categoryShow,
@@ -601,10 +596,9 @@
planShow,
onUser,
openPlan,
- UserOneShow,
- // UserTwoShow,
- // UserThreeShow,
+ UserShow,
openUser,
+ rules,
maintenanceShow,
openMaintenance,
detectShow,
--
Gitblit v1.9.2