表单验证

This commit is contained in:
sjl
2024-10-30 15:19:47 +08:00
parent f9bb15ad24
commit 0c2f59a0a7
21 changed files with 736 additions and 603 deletions

View File

@@ -21,6 +21,7 @@
<el-button type='primary' link :icon='EditPen' @click="openEditDialog(scope.row)">编辑</el-button>
<el-button type='primary' link :icon='Delete' >删除</el-button>
<el-button type='primary' link :icon='List' @click="showDeviceOpen(scope.row)">设备</el-button>
<el-button type='primary' link :icon='List' @click="showtestSourceOpen(scope.row)">检测源</el-button>
</template>
</ProTable>
@@ -47,13 +48,14 @@ import type { Plan } from '@/api/plan/interface'
import PlanDialog from "@/views/plan/planList/components/PlanDialog.vue"; // 导入子组件
import Open from '@/views/plan/planList/components/PlanOpen.vue'
import { useViewSize } from '@/hooks/useViewSize'
import { useRouter } from "vue-router";
const { popupBaseView, viewWidth, viewHeight } = useViewSize()
const openView = ref()
const planData = planDataList
const dialogFormVisible = ref(false)
const dialogTitle = ref('')
const isReadOnly = ref(false)
const router = useRouter();
const dialogForm = ref<Plan.PlanList>({
id: '',
name: '',
@@ -117,7 +119,7 @@ const columns = reactive<ColumnProps<Plan.PlanList>[]>([
label: '父节点',
width: 200,
},
{ prop: 'operation', label: '操作', fixed: 'right' ,width: 350, },
{ prop: 'operation', label: '操作', fixed: 'right' ,width: 500, },
])
// 打开编辑对话框
@@ -129,6 +131,7 @@ const openEditDialog = (planSystem: Plan.PlanList) => {
};
const openAddDialog = () => {
dialogForm.value = {
id: '',
name: '',
@@ -157,6 +160,12 @@ const handleRowClick = (planSystem: Plan.PlanList) =>{
const showDeviceOpen = (planSystem: Plan.PlanList) => {
openView.value.open('设备列表')
}
const showtestSourceOpen=(planSystem: Plan.PlanList)=>{
router.push({
path: "/machine/testSource",
});
}
</script>
<style scoped>