This commit is contained in:
shijing 2022-11-15 09:42:52 +08:00
commit 5b1588f55c
3 changed files with 83 additions and 7 deletions

View File

@ -11,6 +11,22 @@ export default {
} }
} }
}, },
dbbackup: {
list: {
url: `${config.API_URL}/monitor/dbbackup/`,
name: "数据库备份",
req: async function(data){
return await http.get(this.url, data);
}
},
deletes: {
url: `${config.API_URL}/monitor/dbbackup/`,
name: "数据库备份",
req: async function(data){
return await http.delete(this.url, data);
}
}
},
file_logs: { file_logs: {
list: { list: {
url: `${config.API_URL}/monitor/log/`, url: `${config.API_URL}/monitor/log/`,

View File

@ -794,7 +794,8 @@ export default {
that.showTime(); that.showTime();
}, 1000); }, 1000);
let host = window.location.host; let host = window.location.host;
let jsUrl = host.indexOf('localhost')>-1?'http://222.222.144.147:6013/jsmap/jsmap.js':host+'/jsmap/jsmap.js'; // let jsUrl = host.indexOf('localhost')>-1?'http://222.222.144.147:6013/jsmap/jsmap.js':host+'/jsmap/jsmap.js';
let jsUrl = '/jsmap/jsmap.js';
that.loadScript('mapId',jsUrl, () => { that.loadScript('mapId',jsUrl, () => {
window.map = new jsmap.JSMap({ window.map = new jsmap.JSMap({
mapType: jsmap.JSMapType.MAP_3D, mapType: jsmap.JSMapType.MAP_3D,
@ -1017,8 +1018,7 @@ export default {
let that = this; let that = this;
//idjs //idjs
if (document.querySelector(`#${id}`)) { if (document.querySelector(`#${id}`)) {
// that.ElLoading = null; that.ElLoading = null;
that.ElLoading.close();
callback && callback() callback && callback()
return; return;
}else{ }else{
@ -1169,14 +1169,14 @@ export default {
if(item.id==that.audioList.id){ if(item.id==that.audioList.id){
}else{ }else{
that.audioList = item; that.audioList = item;
that.audioSrc=item.voice_f; that.audioSrc=item.voice;
if(item.location){ if(item.location){
window.map.flyToPosition(new jsmap.JSPoint(item.location.longitude, item.location.latitude), { range: 200,duration: 1000 }); window.map.flyToPosition(new jsmap.JSPoint(item.location.longitude, item.location.latitude), { range: 200,duration: 1000 });
} }
} }
}else{ }else{
that.audioList = item; that.audioList = item;
that.audioSrc = item.voice_f; that.audioSrc = item.voice;
that.music.play();// that.music.play();//
} }
} }
@ -2277,7 +2277,6 @@ export default {
}, },
speakerPlay(){ speakerPlay(){
this.speakerPlayStatus = true; this.speakerPlayStatus = true;
// this.music.src = this.warningData.list[0].voice_f;
this.music.play();// this.music.play();//
}, },
}, },
@ -2322,6 +2321,14 @@ export default {
background: rgba(48, 255, 220, 0.35); background: rgba(48, 255, 220, 0.35);
} }
.el-loading-spinner .el-loading-text{
color: #Ffa500;
}
.el-loading-spinner .path{
stroke: #Ffa500;
}
.el-radio.el-radio--small .el-radio__label { .el-radio.el-radio--small .el-radio__label {
color: #ffffff; color: #ffffff;
} }
@ -3825,7 +3832,7 @@ export default {
#mapContainer { #mapContainer {
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #3798ff; background-color: #49a1ff;
} }
#bigScreenUserTable { #bigScreenUserTable {

View File

@ -48,6 +48,41 @@
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<el-card>
<scTable
ref="table"
:apiObj="apiObj"
row-key="id"
stripe
highlightCurrentRow
hidePagination
@resetQuery="resetQuery"
>
<el-table-column label="#" type="index" width="50"></el-table-column>
<el-table-column
label="文件地址"
prop="filepath"
min-width="200"
></el-table-column>
<el-table-column
label="大小(MB)"
prop="size"
min-width="150"
></el-table-column>
<el-table-column label="操作" align="center" width="80">
<template #default="scope">
<el-popconfirm
title="确定删除吗?"
@confirm="table_del(scope.row, scope.$index)"
>
<template #reference>
<el-button type="danger" size="small">删除</el-button>
</template>
</el-popconfirm>
</template>
</el-table-column>
</scTable>
</el-card>
</el-main> </el-main>
</el-container> </el-container>
</template> </template>
@ -59,6 +94,8 @@ export default {
cpuData: {}, cpuData: {},
diskData: {}, diskData: {},
memoryData: {}, memoryData: {},
apiObj: this.$API.ops.dbbackup.list,
query: {},
}; };
}, },
mounted() { mounted() {
@ -79,6 +116,22 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
resetQuery() {
this.query = {};
},
//
async table_del(row) {
this.$API.ops.dbbackup.deletes
.req({filepaths: [row.filepath]})
.then((res) => {
this.$message.success("删除成功");
this.$refs.table.refresh();
return res;
})
.catch((err) => {
return err;
});
},
}, },
}; };
</script> </script>