新增[服务端缓存手动更新]
This commit is contained in:
@@ -111,6 +111,11 @@ const meta = {
|
|||||||
|
|
||||||
dataSave({name, data}) {
|
dataSave({name, data}) {
|
||||||
return red.postX('/data/save', {name, data: JSON.stringify(data)})
|
return red.postX('/data/save', {name, data: JSON.stringify(data)})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 刷新服务端缓存数据
|
||||||
|
refresh() {
|
||||||
|
return red.postX("/meta/refresh", {})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,12 @@
|
|||||||
<a data-tab href="#" v-text="item.name"></a>
|
<a data-tab href="#" v-text="item.name"></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class="pull-right" title="刷新服务端缓存数据">
|
||||||
|
<a @click="refresh()" href="javascript:;" style="padding: 6px 15px;border: 0;background-color: #404a53;color: #fff;">
|
||||||
|
<i class="icon icon-repeat"></i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="pull-right">
|
<li class="pull-right">
|
||||||
<a @click="logout()" href="javascript:;" style="padding: 6px 15px;border: 0;background-color: #404a53;color: #fff;">
|
<a @click="logout()" href="javascript:;" style="padding: 6px 15px;border: 0;background-color: #404a53;color: #fff;">
|
||||||
<i class="icon icon-user"></i> 退出
|
<i class="icon icon-user"></i> 退出
|
||||||
@@ -78,7 +84,7 @@
|
|||||||
<script src="./res/zui/lib/sortable/zui.sortable.js"></script>
|
<script src="./res/zui/lib/sortable/zui.sortable.js"></script>
|
||||||
<script src="./res/zui/lib/uploader/zui.uploader.min.js"></script>
|
<script src="./res/zui/lib/uploader/zui.uploader.min.js"></script>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { logout } from './api/user.js'
|
let { refresh } = meta
|
||||||
let { platList } = plat
|
let { platList } = plat
|
||||||
/*import meta from './api/meta.js'*/
|
/*import meta from './api/meta.js'*/
|
||||||
//import { getServiceInfo, getServiceDetail, getServiceList } from './api/meta.js'
|
//import { getServiceInfo, getServiceDetail, getServiceList } from './api/meta.js'
|
||||||
@@ -159,6 +165,9 @@
|
|||||||
this.menus = item.nodes || [item];
|
this.menus = item.nodes || [item];
|
||||||
this.pageId = item.name;
|
this.pageId = item.name;
|
||||||
},
|
},
|
||||||
|
refresh() {
|
||||||
|
refresh().then(res => red.showOk())
|
||||||
|
},
|
||||||
logout() {
|
logout() {
|
||||||
console.log(12321)
|
console.log(12321)
|
||||||
logout()
|
logout()
|
||||||
|
|||||||
@@ -61,7 +61,12 @@
|
|||||||
<option v-for="(t, index) in filter.filterType" :value="t.name" v-text="t.remark"></option>
|
<option v-for="(t, index) in filter.filterType" :value="t.name" v-text="t.remark"></option>
|
||||||
</select>
|
</select>
|
||||||
<span class="input-group-addon fix-border fix-padding"></span>
|
<span class="input-group-addon fix-border fix-padding"></span>
|
||||||
<input type="text" class="form-control" v-model="filter['value']">
|
<input v-if="!filter.inType || filter.inType == 'INPUT'" type="text" class="form-control" v-model="filter['value']">
|
||||||
|
<select v-if="filter.inType == 'DICT'" class="form-control" v-model="filter['value']" style="width: 100px">
|
||||||
|
<!-- option v-for="(t, index) in filter.filterType" :value="t.name" v-text="t.remark"></option -->
|
||||||
|
<option value=""> 字典值一</option>
|
||||||
|
<option value=""> 字典值二</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
<span class="input-group-addon fix-border fix-padding" style="padding: 5px" title="删除过滤条件">
|
<span class="input-group-addon fix-border fix-padding" style="padding: 5px" title="删除过滤条件">
|
||||||
<a href="javascript:;" @click="filter.checked = false;"><i class="icon icon-trash"></i></a>
|
<a href="javascript:;" @click="filter.checked = false;"><i class="icon icon-trash"></i></a>
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public final class MetaKit {
|
|||||||
protected static String dcate;
|
protected static String dcate;
|
||||||
private static final JsonConvert convert = JsonConvert.root();
|
private static final JsonConvert convert = JsonConvert.root();
|
||||||
// -----------------------------------
|
// -----------------------------------
|
||||||
protected static void init() {
|
public static void init() {
|
||||||
reload(MetaTable.class);
|
reload(MetaTable.class);
|
||||||
reload(MetaLink.class);
|
reload(MetaLink.class);
|
||||||
reload(MetaService.class);
|
reload(MetaService.class);
|
||||||
|
|||||||
@@ -299,6 +299,13 @@ public class MetadataService extends BaseService { //arango
|
|||||||
return jBean.setBody(plats);
|
return jBean.setBody(plats);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RestMapping(name = "refresh", comment = "刷新服务端缓存数据")
|
||||||
|
public JBean refresh() {
|
||||||
|
JBean jBean = new JBean();
|
||||||
|
MetaKit.init();
|
||||||
|
return jBean;
|
||||||
|
}
|
||||||
|
|
||||||
// ------------------------------------ 对外服务 --------------------------------------
|
// ------------------------------------ 对外服务 --------------------------------------
|
||||||
@RestMapping(name = "cfg", auth = false, comment = " 功能配置")
|
@RestMapping(name = "cfg", auth = false, comment = " 功能配置")
|
||||||
public JBean cfg(String name, @RestParam(name = "platToken") String token) {
|
public JBean cfg(String name, @RestParam(name = "platToken") String token) {
|
||||||
|
|||||||
Reference in New Issue
Block a user