Compare commits
3 Commits
081a77ac4c
...
d050dbc6e7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d050dbc6e7 | ||
|
|
3b2f6b2517 | ||
|
|
45a010b3a4 |
@@ -181,7 +181,7 @@ const initSSE = () => {
|
|||||||
eventSource.value = http.sse('/sse/createSse')
|
eventSource.value = http.sse('/sse/createSse')
|
||||||
|
|
||||||
eventSource.value.onmessage = event => {
|
eventSource.value.onmessage = event => {
|
||||||
console.log('收到消息内容是:', event.data)
|
// console.log('收到消息内容是:', event.data)
|
||||||
const res = JSON.parse(event.data)
|
const res = JSON.parse(event.data)
|
||||||
progressData.value.percentage = res.data
|
progressData.value.percentage = res.data
|
||||||
progressData.value.message = res.message
|
progressData.value.message = res.message
|
||||||
|
|||||||
@@ -342,6 +342,17 @@
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
padding: 10px 15px;
|
padding: 10px 15px;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 隐藏滚动条的CSS
|
||||||
|
scrollbar-width: none; /* Firefox */
|
||||||
|
-ms-overflow-style: none; /* IE 10+ */
|
||||||
|
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: 0px;
|
||||||
|
background: transparent; /* Chrome Safari */
|
||||||
|
}
|
||||||
|
|
||||||
//设置dialog内部form样式
|
//设置dialog内部form样式
|
||||||
.el-form {
|
.el-form {
|
||||||
.el-form-item {
|
.el-form-item {
|
||||||
@@ -379,6 +390,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//全局el-form-item间距
|
//全局el-form-item间距
|
||||||
.el-form-item {
|
.el-form-item {
|
||||||
margin-right: 10px !important;
|
margin-right: 10px !important;
|
||||||
|
|||||||
@@ -124,23 +124,25 @@ let dialogTitle = computed(() => {
|
|||||||
const formRuleRef = ref<FormInstance>()
|
const formRuleRef = ref<FormInstance>()
|
||||||
const rules: Ref<Record<string, Array<FormItemRule>>> = ref({
|
const rules: Ref<Record<string, Array<FormItemRule>>> = ref({
|
||||||
name: [{ required: true, trigger: 'blur', message: '菜单名称必填!' }],
|
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(
|
// watch(
|
||||||
() => formContent.value.type,
|
// () => formContent.value.type,
|
||||||
newVal => {
|
// newVal => {
|
||||||
if (newVal === 1) {
|
// if (newVal === 1) {
|
||||||
// 选择按钮时,路由地址和组件地址无需校验
|
// // 选择按钮时,路由地址和组件地址无需校验
|
||||||
rules.value.path = []
|
// rules.value.path = []
|
||||||
rules.value.component = []
|
// rules.value.component = []
|
||||||
} else {
|
// } else {
|
||||||
// 其他情况下,路由地址和组件地址需要校验
|
// // 其他情况下,路由地址和组件地址需要校验
|
||||||
rules.value.path = [{ required: true, trigger: 'blur', message: '路由地址必填!' }]
|
// rules.value.path = [{ required: true, trigger: 'blur', message: '路由地址必填!' }]
|
||||||
rules.value.component = [{ required: true, trigger: 'blur', message: '组件地址必填!' }]
|
// rules.value.component = [{ required: true, trigger: 'blur', message: '组件地址必填!' }]
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
)
|
// )
|
||||||
|
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
||||||
const close = () => {
|
const close = () => {
|
||||||
@@ -196,12 +198,12 @@ const save = () => {
|
|||||||
const open = async (sign: string, data: Function.ResFunction) => {
|
const open = async (sign: string, data: Function.ResFunction) => {
|
||||||
// 重置表单
|
// 重置表单
|
||||||
dialogFormRef.value?.resetFields()
|
dialogFormRef.value?.resetFields()
|
||||||
|
// 清空表单校验
|
||||||
|
dialogFormRef.value?.clearValidate()
|
||||||
const response = await getFunctionListNoButton()
|
const response = await getFunctionListNoButton()
|
||||||
functionList.value = response.data as unknown as Function.ResFunction[]
|
functionList.value = response.data as unknown as Function.ResFunction[]
|
||||||
titleType.value = sign
|
titleType.value = sign
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
rules.value.path = [{ required: true, trigger: 'blur', message: '路由地址必填!' }]
|
|
||||||
rules.value.component = [{ required: true, trigger: 'blur', message: '组件地址必填!' }]
|
|
||||||
|
|
||||||
if (formContent.value.pid === '0') {
|
if (formContent.value.pid === '0') {
|
||||||
formContent.value.pid = ''
|
formContent.value.pid = ''
|
||||||
|
|||||||
@@ -371,6 +371,7 @@ const createNodes = (device: Device.ResPqDev[], standardDev: StandardDevice.ResP
|
|||||||
const outputChannelX = 1050
|
const outputChannelX = 1050
|
||||||
const standardWidth = 1170
|
const standardWidth = 1170
|
||||||
|
|
||||||
|
|
||||||
// 添加被检通道
|
// 添加被检通道
|
||||||
// let currentYPosition = 50; // 初始Y位置
|
// let currentYPosition = 50; // 初始Y位置
|
||||||
let actualChannelsTotalLength = 0;
|
let actualChannelsTotalLength = 0;
|
||||||
@@ -384,7 +385,7 @@ const createNodes = (device: Device.ResPqDev[], standardDev: StandardDevice.ResP
|
|||||||
|
|
||||||
let currentYPosition = (vueFlowElement.value - 60 * actualChannelsTotalLength) / 2; // 初始Y位置
|
let currentYPosition = (vueFlowElement.value - 60 * actualChannelsTotalLength) / 2; // 初始Y位置
|
||||||
const deviceSpacing = 30; // 设备间的垂直间距
|
const deviceSpacing = 30; // 设备间的垂直间距
|
||||||
|
console.log('currentYPosition', currentYPosition)
|
||||||
Object.entries(channelCounts).forEach(([deviceId, count]) => {
|
Object.entries(channelCounts).forEach(([deviceId, count]) => {
|
||||||
// 从deviceMonitor中获取实际通道信息
|
// 从deviceMonitor中获取实际通道信息
|
||||||
let actualChannels = []; // 存储实际的通道号
|
let actualChannels = []; // 存储实际的通道号
|
||||||
@@ -460,8 +461,6 @@ const createNodes = (device: Device.ResPqDev[], standardDev: StandardDevice.ResP
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 添加被检设备
|
// 添加被检设备
|
||||||
// let deviceCurrentYPosition = 50; // 与通道计算保持一致的初始位置
|
// let deviceCurrentYPosition = 50; // 与通道计算保持一致的初始位置
|
||||||
let deviceCurrentYPosition = (vueFlowElement.value - 60 * actualChannelsTotalLength) / 2; // 与通道计算保持一致的初始位置
|
let deviceCurrentYPosition = (vueFlowElement.value - 60 * actualChannelsTotalLength) / 2; // 与通道计算保持一致的初始位置
|
||||||
@@ -500,10 +499,6 @@ const createNodes = (device: Device.ResPqDev[], standardDev: StandardDevice.ResP
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 添加标准设备
|
// 添加标准设备
|
||||||
// let standardDeviceCurrentYPosition = 50; // 与标准通道计算保持一致的初始位置
|
// let standardDeviceCurrentYPosition = 50; // 与标准通道计算保持一致的初始位置
|
||||||
let standardDeviceCurrentYPosition = (vueFlowElement.value - 60 * totalCount) / 2; // 与标准通道计算保持一致的初始位置
|
let standardDeviceCurrentYPosition = (vueFlowElement.value - 60 * totalCount) / 2; // 与标准通道计算保持一致的初始位置
|
||||||
@@ -552,4 +547,11 @@ defineExpose({ open, handleNext })
|
|||||||
.vue-flow__node.no-handle-node .vue-flow__handle {
|
.vue-flow__node.no-handle-node .vue-flow__handle {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 放大连线点 */
|
||||||
|
.vue-flow__handle {
|
||||||
|
width: 12px !important; /* 原来默认是 6px */
|
||||||
|
height: 12px !important; /* 原来默认是 6px */
|
||||||
|
background-color: #3b82f6 !important; /* 更明显的颜色 */
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ const defaultOperate = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const updateTableData = async () => {
|
const updateTableData = async () => {
|
||||||
console.log('左侧树被选中的叶子节点checkIndex', checkIndex.value)
|
|
||||||
if (checkIndex.value !== '') {
|
if (checkIndex.value !== '') {
|
||||||
checkListLevel.length = 0
|
checkListLevel.length = 0
|
||||||
checkResultData.length = 0
|
checkResultData.length = 0
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
pauseDisabled.value = false
|
pauseDisabled.value = false
|
||||||
} else if(newValue.code !== 10201) {
|
} else if(newValue.code !== 10201) {
|
||||||
ElMessage.error('源连接失败!')
|
ElMessage.error('源连接失败!')
|
||||||
console.log('错误信息:',webMsgSend)
|
// console.log('错误信息:',webMsgSend)
|
||||||
connectDisabeld.value = false
|
connectDisabeld.value = false
|
||||||
startDisabeld.value = true
|
startDisabeld.value = true
|
||||||
pauseDisabled.value = true
|
pauseDisabled.value = true
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ const open = async (sign: string, data: StandardDevice.ResPqStandardDevice,devTy
|
|||||||
|
|
||||||
|
|
||||||
const handleDevTypeChange = (value: string) => {
|
const handleDevTypeChange = (value: string) => {
|
||||||
console.log('handleDevTypeChange', value)
|
|
||||||
// 在这里处理选中事件的逻辑
|
// 在这里处理选中事件的逻辑
|
||||||
const dev = devTypeOptions.value.find(t =>t.id === value)
|
const dev = devTypeOptions.value.find(t =>t.id === value)
|
||||||
if (dev) {
|
if (dev) {
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ const currentIndex = ref(0);
|
|||||||
// currentIndex.value++;
|
// currentIndex.value++;
|
||||||
// if (currentIndex.value > 14)
|
// if (currentIndex.value > 14)
|
||||||
// currentIndex.value = 0;
|
// currentIndex.value = 0;
|
||||||
// // console.log(currentIndex.value);
|
// console.log(currentIndex.value);
|
||||||
|
|
||||||
// }, 2000);
|
// }, 2000);
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
align-center
|
align-center
|
||||||
v-bind="dialogBig"
|
v-bind="dialogBig"
|
||||||
@close="close"
|
@close="close"
|
||||||
|
|
||||||
>
|
>
|
||||||
<el-form ref="dialogFormRef" :model="formContent" :rules="rules">
|
<el-form ref="dialogFormRef" :model="formContent" :rules="rules">
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
@@ -365,6 +366,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
</el-collapse>
|
</el-collapse>
|
||||||
@@ -1233,6 +1235,7 @@ const props = defineProps<{
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
// :deep(.dialog-small .el-dialog__body){
|
// :deep(.dialog-small .el-dialog__body){
|
||||||
// max-height: 330px !important;
|
// max-height: 330px !important;
|
||||||
// }
|
// }
|
||||||
@@ -1251,4 +1254,6 @@ const props = defineProps<{
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ const getTableList = (params: any) => {
|
|||||||
//查看详情
|
//查看详情
|
||||||
const detailsRef: any = ref()
|
const detailsRef: any = ref()
|
||||||
const handleDetails = () => {
|
const handleDetails = () => {
|
||||||
console.log(detailsRef.value, '+++++++++++++++')
|
|
||||||
detailsRef.value.open('查看计划')
|
detailsRef.value.open('查看计划')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
12
package.json
12
package.json
@@ -37,7 +37,15 @@
|
|||||||
"electron-builder": "^25.1.8"
|
"electron-builder": "^25.1.8"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ee-core": "^4.0.1",
|
|
||||||
"electron-updater": "^6.3.8"
|
"autofit.js": "^3.2.8",
|
||||||
|
"dayjs": "^1.10.7",
|
||||||
|
"ee-core": "2.10.0",
|
||||||
|
"electron-updater": "^5.3.0",
|
||||||
|
"event-source-polyfill": "^1.0.31",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
|
"mqtt": "^5.10.1",
|
||||||
|
"sass": "^1.80.4"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user