微调
This commit is contained in:
@@ -100,14 +100,14 @@ const uploadExcel = async (param: UploadRequestOptions) => {
|
|||||||
|
|
||||||
|
|
||||||
async function handleImportResponse( res: any) {
|
async function handleImportResponse( res: any) {
|
||||||
console.log('res1', res.type);
|
//console.log('res1', res.type);
|
||||||
if (res.type === 'application/json') {
|
if (res.type === 'application/json') {
|
||||||
console.log('res2', res);
|
//console.log('res2', res);
|
||||||
const fileReader = new FileReader()
|
const fileReader = new FileReader()
|
||||||
fileReader.onloadend = () => {
|
fileReader.onloadend = () => {
|
||||||
try {
|
try {
|
||||||
const jsonData = JSON.parse(fileReader.result)
|
const jsonData = JSON.parse(fileReader.result)
|
||||||
console.log('123',jsonData)
|
// console.log('123',jsonData)
|
||||||
if (jsonData.code === 'A0000') {
|
if (jsonData.code === 'A0000') {
|
||||||
ElMessage.success('导入成功')
|
ElMessage.success('导入成功')
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ const tabsDrop = () => {
|
|||||||
// Tab Click
|
// Tab Click
|
||||||
const tabClick = (tabItem: TabsPaneContext) => {
|
const tabClick = (tabItem: TabsPaneContext) => {
|
||||||
const fullPath = tabItem.props.name as string
|
const fullPath = tabItem.props.name as string
|
||||||
console.log("🚀 ~ tabClick ~ fullPath:", tabItem)
|
// console.log("🚀 ~ tabClick ~ fullPath:", tabItem)
|
||||||
router.push(fullPath)
|
router.push(fullPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -335,6 +335,11 @@ const shouldShowOption = (item) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//开始创建webSocket客户端
|
||||||
|
const dataSocket = reactive({
|
||||||
|
socketServe: socketClient.Instance,
|
||||||
|
});
|
||||||
|
|
||||||
tableHeight.value = window.innerHeight - 600
|
tableHeight.value = window.innerHeight - 600
|
||||||
const deviceData = ref<Device.ResPqDev[]>([])
|
const deviceData = ref<Device.ResPqDev[]>([])
|
||||||
const operationShow = ref(false)
|
const operationShow = ref(false)
|
||||||
@@ -983,16 +988,13 @@ const handleTest = async (val: string) => {
|
|||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
//开始创建webSocket客户端
|
|
||||||
const data = reactive({
|
const url = 'ws://localhost:7777/hello?name=cdf';
|
||||||
socketServe: socketClient.Instance,
|
|
||||||
});
|
|
||||||
const url = 'ws://192.168.1.127:7777/hello?name=cdf';
|
|
||||||
socketClient.Instance.connect(url);
|
socketClient.Instance.connect(url);
|
||||||
data.socketServe = socketClient.Instance;
|
dataSocket.socketServe = socketClient.Instance;
|
||||||
data.socketServe.registerCallBack('aaa', (res: { code: number; }) => {
|
dataSocket.socketServe.registerCallBack('aaa', (res: { code: number; }) => {
|
||||||
// 处理来自服务器的消息
|
// 处理来自服务器的消息
|
||||||
console.log('Received message:', res)
|
//console.log('Received message:', res)
|
||||||
// 根据需要在这里添加更多的处理逻辑
|
// 根据需要在这里添加更多的处理逻辑
|
||||||
if (res.code === 20000) {
|
if (res.code === 20000) {
|
||||||
ElMessage.error(message.message)
|
ElMessage.error(message.message)
|
||||||
@@ -1136,6 +1138,8 @@ onBeforeMount(async () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const handleQuitClicked = () => {
|
const handleQuitClicked = () => {
|
||||||
|
console.log('handleQuitClicked')
|
||||||
|
dataSocket.socketServe.closeWs()
|
||||||
emit('batchGenerateClicked') // 触发事件
|
emit('batchGenerateClicked') // 触发事件
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -496,7 +496,7 @@ onUnmounted(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const handleBatchGenerate = async () => {
|
const handleBatchGenerate = async () => {
|
||||||
console.log('批量生成按钮被点击了');
|
// console.log('批量生成按钮被点击了');
|
||||||
// 在这里添加其他逻辑,比如显示对话框、更新状态等
|
// 在这里添加其他逻辑,比如显示对话框、更新状态等
|
||||||
await initPlan()
|
await initPlan()
|
||||||
treeRef.value.clickTableToTree(planList.value.data,currentId.value)
|
treeRef.value.clickTableToTree(planList.value.data,currentId.value)
|
||||||
|
|||||||
@@ -233,6 +233,11 @@ const columns = reactive<ColumnProps<Plan.ReqPlan>[]>([
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'createTime',
|
||||||
|
label: '创建时间',
|
||||||
|
width: 200,
|
||||||
|
},
|
||||||
{ prop: 'operation', label: '操作', fixed: 'right', width: 200 },
|
{ prop: 'operation', label: '操作', fixed: 'right', width: 200 },
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user