微调
This commit is contained in:
@@ -124,23 +124,25 @@ let dialogTitle = computed(() => {
|
||||
const formRuleRef = ref<FormInstance>()
|
||||
const rules: Ref<Record<string, Array<FormItemRule>>> = ref({
|
||||
name: [{ required: true, trigger: 'blur', message: '菜单名称必填!' }],
|
||||
code: [{ required: true, trigger: 'blur', message: '编码必填!' }]
|
||||
code: [{ required: true, trigger: 'blur', message: '编码必填!' }],
|
||||
path : [{ required: true, trigger: 'blur', message: '路由地址必填!' }],
|
||||
component :[{ required: true, trigger: 'blur', message: '组件地址必填!' }]
|
||||
})
|
||||
|
||||
watch(
|
||||
() => formContent.value.type,
|
||||
newVal => {
|
||||
if (newVal === 1) {
|
||||
// 选择按钮时,路由地址和组件地址无需校验
|
||||
rules.value.path = []
|
||||
rules.value.component = []
|
||||
} else {
|
||||
// 其他情况下,路由地址和组件地址需要校验
|
||||
rules.value.path = [{ required: true, trigger: 'blur', message: '路由地址必填!' }]
|
||||
rules.value.component = [{ required: true, trigger: 'blur', message: '组件地址必填!' }]
|
||||
}
|
||||
}
|
||||
)
|
||||
// watch(
|
||||
// () => formContent.value.type,
|
||||
// newVal => {
|
||||
// if (newVal === 1) {
|
||||
// // 选择按钮时,路由地址和组件地址无需校验
|
||||
// rules.value.path = []
|
||||
// rules.value.component = []
|
||||
// } else {
|
||||
// // 其他情况下,路由地址和组件地址需要校验
|
||||
// rules.value.path = [{ required: true, trigger: 'blur', message: '路由地址必填!' }]
|
||||
// rules.value.component = [{ required: true, trigger: 'blur', message: '组件地址必填!' }]
|
||||
// }
|
||||
// }
|
||||
// )
|
||||
|
||||
// 关闭弹窗
|
||||
const close = () => {
|
||||
@@ -196,13 +198,13 @@ const save = () => {
|
||||
const open = async (sign: string, data: Function.ResFunction) => {
|
||||
// 重置表单
|
||||
dialogFormRef.value?.resetFields()
|
||||
// 清空表单校验
|
||||
dialogFormRef.value?.clearValidate()
|
||||
const response = await getFunctionListNoButton()
|
||||
functionList.value = response.data as unknown as Function.ResFunction[]
|
||||
titleType.value = sign
|
||||
dialogVisible.value = true
|
||||
rules.value.path = [{ required: true, trigger: 'blur', message: '路由地址必填!' }]
|
||||
rules.value.component = [{ required: true, trigger: 'blur', message: '组件地址必填!' }]
|
||||
|
||||
|
||||
if (formContent.value.pid === '0') {
|
||||
formContent.value.pid = ''
|
||||
}
|
||||
|
||||
@@ -370,7 +370,8 @@ const createNodes = (device: Device.ResPqDev[], standardDev: StandardDevice.ResP
|
||||
const inputChannelX = 350
|
||||
const outputChannelX = 1050
|
||||
const standardWidth = 1170
|
||||
|
||||
|
||||
|
||||
// 添加被检通道
|
||||
// let currentYPosition = 50; // 初始Y位置
|
||||
let actualChannelsTotalLength = 0;
|
||||
@@ -384,7 +385,7 @@ const createNodes = (device: Device.ResPqDev[], standardDev: StandardDevice.ResP
|
||||
|
||||
let currentYPosition = (vueFlowElement.value - 60 * actualChannelsTotalLength) / 2; // 初始Y位置
|
||||
const deviceSpacing = 30; // 设备间的垂直间距
|
||||
|
||||
console.log('currentYPosition', currentYPosition)
|
||||
Object.entries(channelCounts).forEach(([deviceId, count]) => {
|
||||
// 从deviceMonitor中获取实际通道信息
|
||||
let actualChannels = []; // 存储实际的通道号
|
||||
@@ -460,8 +461,6 @@ const createNodes = (device: Device.ResPqDev[], standardDev: StandardDevice.ResP
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
// 添加被检设备
|
||||
// let deviceCurrentYPosition = 50; // 与通道计算保持一致的初始位置
|
||||
let deviceCurrentYPosition = (vueFlowElement.value - 60 * actualChannelsTotalLength) / 2; // 与通道计算保持一致的初始位置
|
||||
@@ -500,10 +499,6 @@ const createNodes = (device: Device.ResPqDev[], standardDev: StandardDevice.ResP
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 添加标准设备
|
||||
// let standardDeviceCurrentYPosition = 50; // 与标准通道计算保持一致的初始位置
|
||||
let standardDeviceCurrentYPosition = (vueFlowElement.value - 60 * totalCount) / 2; // 与标准通道计算保持一致的初始位置
|
||||
@@ -552,4 +547,11 @@ defineExpose({ open, handleNext })
|
||||
.vue-flow__node.no-handle-node .vue-flow__handle {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* 放大连线点 */
|
||||
.vue-flow__handle {
|
||||
width: 12px !important; /* 原来默认是 6px */
|
||||
height: 12px !important; /* 原来默认是 6px */
|
||||
background-color: #3b82f6 !important; /* 更明显的颜色 */
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -358,7 +358,7 @@ const defaultOperate = () => {
|
||||
}
|
||||
|
||||
const updateTableData = async () => {
|
||||
console.log('左侧树被选中的叶子节点checkIndex', checkIndex.value)
|
||||
|
||||
if (checkIndex.value !== '') {
|
||||
checkListLevel.length = 0
|
||||
checkResultData.length = 0
|
||||
|
||||
@@ -225,7 +225,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
pauseDisabled.value = false
|
||||
} else if(newValue.code !== 10201) {
|
||||
ElMessage.error('源连接失败!')
|
||||
console.log('错误信息:',webMsgSend)
|
||||
// console.log('错误信息:',webMsgSend)
|
||||
connectDisabeld.value = false
|
||||
startDisabeld.value = true
|
||||
pauseDisabled.value = true
|
||||
|
||||
@@ -279,7 +279,7 @@ const open = async (sign: string, data: StandardDevice.ResPqStandardDevice,devTy
|
||||
|
||||
|
||||
const handleDevTypeChange = (value: string) => {
|
||||
console.log('handleDevTypeChange', value)
|
||||
|
||||
// 在这里处理选中事件的逻辑
|
||||
const dev = devTypeOptions.value.find(t =>t.id === value)
|
||||
if (dev) {
|
||||
|
||||
@@ -76,7 +76,7 @@ const currentIndex = ref(0);
|
||||
// currentIndex.value++;
|
||||
// if (currentIndex.value > 14)
|
||||
// currentIndex.value = 0;
|
||||
// // console.log(currentIndex.value);
|
||||
// console.log(currentIndex.value);
|
||||
|
||||
// }, 2000);
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
align-center
|
||||
v-bind="dialogBig"
|
||||
@close="close"
|
||||
|
||||
>
|
||||
<el-form ref="dialogFormRef" :model="formContent" :rules="rules">
|
||||
<el-row :gutter="24">
|
||||
@@ -365,6 +366,7 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
@@ -1233,6 +1235,7 @@ const props = defineProps<{
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
// :deep(.dialog-small .el-dialog__body){
|
||||
// max-height: 330px !important;
|
||||
// }
|
||||
@@ -1251,4 +1254,6 @@ const props = defineProps<{
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
@@ -207,7 +207,7 @@ const getTableList = (params: any) => {
|
||||
//查看详情
|
||||
const detailsRef: any = ref()
|
||||
const handleDetails = () => {
|
||||
console.log(detailsRef.value, '+++++++++++++++')
|
||||
|
||||
detailsRef.value.open('查看计划')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user