OSS备份管理功能上线
This commit is contained in:
parent
c65c7e1619
commit
d6734600fe
@ -5,7 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class ToolsApplication {
|
||||
public static final String version="1.1.2";
|
||||
public static final String version="1.1.3";
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("当前版本号:" + version);
|
||||
|
@ -14,9 +14,12 @@ public class NasDepotManager {
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping("/add.do")
|
||||
public JSONObject addNasPath(String path) {
|
||||
public JSONObject addNasPath(String path,String type) {
|
||||
JSONObject json=new JSONObject();
|
||||
long size=RedisTools.list_add(DEPOT_NAME, path);
|
||||
JSONObject item=new JSONObject();
|
||||
item.put("path",path);
|
||||
item.put("type",type);
|
||||
long size=RedisTools.list_add(DEPOT_NAME,item.toJSONString());
|
||||
if(size==0){
|
||||
json.put("code",0);
|
||||
json.put("msg","添加失败");
|
||||
|
@ -38,16 +38,14 @@
|
||||
console.log(2)
|
||||
let ta=table.render({
|
||||
elem: "#oss",
|
||||
height: 312,
|
||||
url: "/nas/depot/list.do",
|
||||
page: false,
|
||||
toolbar: '#topTools',
|
||||
parseData: function (json) {
|
||||
let item = [];
|
||||
for (let i in json.data) {
|
||||
item[i] = {'item': json.data[i]}
|
||||
item[i] =JSON.parse(json.data[i])
|
||||
}
|
||||
console.log(item)
|
||||
return {
|
||||
"code": 0,
|
||||
"msg": json.msg,
|
||||
@ -55,15 +53,16 @@
|
||||
}
|
||||
},
|
||||
cols: [[
|
||||
{field: 'item', title: '地址', sort: true},
|
||||
{field: 'path', title: '地址', width: 400,sort: true},
|
||||
{field: 'type', title: '类型',width: 150, sort: true},
|
||||
{ field: "right", width: 200, toolbar: '#listTools' }
|
||||
]],
|
||||
done:function (){
|
||||
table.on('tool(myOssFilter)', function (obj) {
|
||||
console.log('del')
|
||||
console.log(obj.data)
|
||||
if (obj.event === 'del') {
|
||||
layer.msg(obj.data.item)
|
||||
$.post('/nas/depot/remove.do',{'path':obj.data.item},function (json) {
|
||||
$.post('/nas/depot/remove.do',{'path':JSON.stringify(obj.data)},function (json) {
|
||||
layer.msg(json.msg)
|
||||
});
|
||||
}
|
||||
@ -75,10 +74,18 @@
|
||||
formType: 2,
|
||||
value: '/media/yutou/4t/public/',
|
||||
title: '请输入地址',
|
||||
}, function(value, index, elem){
|
||||
$.post('/nas/depot/add.do',{'path':value},function (json) {
|
||||
}, function(path, index, elem){
|
||||
layer.prompt({
|
||||
formType: 2,
|
||||
value: 'depot/photo/music',
|
||||
title: '请选择类型',
|
||||
},function (type,index,elem) {
|
||||
$.post('/nas/depot/add.do',{'path':path,'type':type},function (json) {
|
||||
layer.msg(json.msg)
|
||||
});
|
||||
layer.close(index);
|
||||
})
|
||||
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user