mirror of
https://gitee.com/xiongmao1988/rax-medical.git
synced 2026-06-12 20:41:45 +08:00
🐛 修复切换库是定时器不刷新的bug
This commit is contained in:
parent
d9f9a3764d
commit
fb19336228
|
|
@ -198,7 +198,7 @@ const medicineCustom: any[] = [
|
||||||
{ name: '阿托品', plus: 1, total: 100 },
|
{ name: '阿托品', plus: 1, total: 100 },
|
||||||
{ name: '罗库溴铵', plus: 0.1, total: 10 }
|
{ name: '罗库溴铵', plus: 0.1, total: 10 }
|
||||||
];
|
];
|
||||||
const database = ref('数据模拟20231109185403');
|
const database = ref('');
|
||||||
const databaseOptions = ref([] as { value: string, label: string }[]);
|
const databaseOptions = ref([] as { value: string, label: string }[]);
|
||||||
const messageSum = ref(10);
|
const messageSum = ref(10);
|
||||||
const userName = ref('admin');
|
const userName = ref('admin');
|
||||||
|
|
@ -243,8 +243,7 @@ function getFeatureTable() {
|
||||||
chartDom3.value.chartSet();
|
chartDom3.value.chartSet();
|
||||||
chartDom4.value.chartSet();
|
chartDom4.value.chartSet();
|
||||||
}, 0);
|
}, 0);
|
||||||
}else{
|
} else {
|
||||||
console.log(res);
|
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: res.message,
|
message: res.message,
|
||||||
type: 'error',
|
type: 'error',
|
||||||
|
|
@ -280,7 +279,7 @@ function getChartData() {
|
||||||
function getData(callback: () => void) {
|
function getData(callback: () => void) {
|
||||||
// if (isStart.value) {
|
// if (isStart.value) {
|
||||||
post('/getfeature', { database: database.value, start: 0, end: 1 }, (res: any) => {
|
post('/getfeature', { database: database.value, start: 0, end: 1 }, (res: any) => {
|
||||||
const obj = res.data[0] || {};
|
const obj = (res.data && res.data[0]) || {};
|
||||||
if (obj.ID !== chartNowData.ID) {
|
if (obj.ID !== chartNowData.ID) {
|
||||||
chartNowData = obj;
|
chartNowData = obj;
|
||||||
const isHR = obj.HR >= 50 && obj.HR <= 80;
|
const isHR = obj.HR >= 50 && obj.HR <= 80;
|
||||||
|
|
@ -300,7 +299,7 @@ function getChartData() {
|
||||||
// chartDom4.value.updateChart(obj.ST, obj.Time || obj.TIME);
|
// chartDom4.value.updateChart(obj.ST, obj.Time || obj.TIME);
|
||||||
}
|
}
|
||||||
callback();
|
callback();
|
||||||
})
|
});
|
||||||
// } else {
|
// } else {
|
||||||
// callback();
|
// callback();
|
||||||
// }
|
// }
|
||||||
|
|
@ -310,11 +309,10 @@ function getChartData() {
|
||||||
function getDatabases() {
|
function getDatabases() {
|
||||||
post('/getdatabases', {}, (res: any) => {
|
post('/getdatabases', {}, (res: any) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
console.log(res);
|
|
||||||
databaseOptions.value = [];
|
databaseOptions.value = [];
|
||||||
const hideDatabase = ['information_schema', 'mysql', 'performance_schema'];
|
const hideDatabase = ['information_schema', 'mysql', 'performance_schema'];
|
||||||
res.data.forEach((item: any, index: number) => {
|
res.data.forEach((item: any, index: number) => {
|
||||||
if(!hideDatabase.some(e => e === item.Database)) databaseOptions.value.push({value: item.Database, label: item.Database});
|
if (!hideDatabase.some(e => e === item.Database)) databaseOptions.value.push({ value: item.Database, label: item.Database });
|
||||||
})
|
})
|
||||||
database.value = databaseOptions.value[0].label;
|
database.value = databaseOptions.value[0].label;
|
||||||
initData();
|
initData();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user