update
1.优化
This commit is contained in:
@@ -354,6 +354,8 @@
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
if (qhInterval.value) clearInterval(qhInterval.value);
|
||||
if (cInterval.value) clearInterval(cInterval.value);
|
||||
// 监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常。
|
||||
window.onbeforeunload = function () {
|
||||
closeSocket();
|
||||
|
||||
@@ -247,7 +247,6 @@
|
||||
...formRecord.value,
|
||||
...result,
|
||||
};
|
||||
console.log(formRecord.value);
|
||||
}
|
||||
function handleClicksearch() {
|
||||
formState.value = {
|
||||
@@ -264,7 +263,6 @@
|
||||
orgCode2.value = '';
|
||||
orgCode1.value = '';
|
||||
formState.value = {};
|
||||
console.log(formState.value, formRecord.value, 'asjshj');
|
||||
formRecord.value = {};
|
||||
closeDialog();
|
||||
}
|
||||
@@ -277,7 +275,6 @@
|
||||
...formRecord.value,
|
||||
salvageUserDepart: '',
|
||||
};
|
||||
console.log(formState.value, formRecord.value);
|
||||
}
|
||||
defineExpose({
|
||||
openDialog,
|
||||
|
||||
@@ -78,14 +78,17 @@
|
||||
condition: chooseType.value,
|
||||
centerId: props.centerId,
|
||||
};
|
||||
statisticsNewApi(params).then((res) => {
|
||||
console.log(res);
|
||||
if (res.code != 200 || !res.result) {
|
||||
return;
|
||||
}
|
||||
setSession(LEFT_KEY1, JSON.stringify(res.result));
|
||||
setValue(res.result);
|
||||
});
|
||||
statisticsNewApi(params)
|
||||
.then((res) => {
|
||||
if (res.code != 200 || !res.result) {
|
||||
return;
|
||||
}
|
||||
setSession(LEFT_KEY1, JSON.stringify(res.result));
|
||||
setValue(res.result);
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
});
|
||||
}
|
||||
|
||||
function setValue(result) {
|
||||
|
||||
@@ -96,12 +96,15 @@
|
||||
twoLApi({
|
||||
sex: chooseType.value,
|
||||
depart: selectValue.value,
|
||||
}).then((res) => {
|
||||
console.log(res, 'resessss');
|
||||
if (res.code == 200) {
|
||||
initChart(res.result);
|
||||
}
|
||||
});
|
||||
})
|
||||
.then((res: any) => {
|
||||
if (res.code == 200) {
|
||||
initChart(res.result);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
function initChart(value) {
|
||||
|
||||
@@ -147,13 +147,17 @@
|
||||
});
|
||||
|
||||
function getList() {
|
||||
twoRApi({}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
localStorage.removeItem('twoRList');
|
||||
twoRList.value = res.result;
|
||||
localStorage.setItem('twoRList', JSON.stringify(res.result));
|
||||
}
|
||||
});
|
||||
twoRApi({})
|
||||
.then((res: any) => {
|
||||
if (res.code == 200) {
|
||||
localStorage.removeItem('twoRList');
|
||||
twoRList.value = res.result;
|
||||
localStorage.setItem('twoRList', JSON.stringify(res.result));
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
function handleClickNum1(type, date, normal) {
|
||||
emit('handleClick', { type, date, normal });
|
||||
|
||||
Reference in New Issue
Block a user