表单验证
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user