You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
131 lines
4.6 KiB
131 lines
4.6 KiB
@@master_page.html |
|
<div id="apibox"> |
|
<!--<div class="card"> |
|
<div class="card-header"><h4>登录配置</h4></div> |
|
<div class="card-body"> |
|
<div class="form-group"> |
|
<div class="p-b-10"> |
|
账号admin初始化密码是123456 ,如要修改 <a href="/rezero/sys_user.html">点击</a> |
|
</div> |
|
<label class="lyear-checkbox"> |
|
<input type="checkbox" v-model="ReZero.config.Enable" @change="saveLoginConfig"> |
|
<span class="p-l-5">启用登录</span> |
|
</label> |
|
</div> |
|
</div> |
|
</div>--> |
|
|
|
<div class="card"> |
|
<div class="card-header"><h4>实体管理配置</h4></div> |
|
<div class="card-body"> |
|
<div class="form-group"> |
|
<label class="lyear-checkbox"> |
|
<input type="checkbox" v-model="setting.importUnunderline" @change="saveSetting"> |
|
<span class="p-l-5">导入实体去掉下划线</span> |
|
</label> |
|
</div> |
|
</div> |
|
</div> |
|
|
|
<div class="card"> |
|
<div class="card-header"><h4>内部缓存</h4></div> |
|
<div class="card-body"> |
|
<div class="p-b-10"> |
|
外部修改数据库需要清空 ,缓存内容主要包含:数据库信息、实体信息和接口信息。 |
|
</div> |
|
<div class="form-group"> |
|
<button type="button" @click="clearInternalCache" class="btn btn-primary">清空</button> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
<script> |
|
var vueObj = new Vue({ |
|
el: '#apibox', |
|
data: { |
|
ReZero: { |
|
config: { |
|
Enable: false |
|
} |
|
}, |
|
setting: { |
|
importUnunderline: false |
|
} |
|
}, |
|
mounted() { |
|
//this.getLoginConfig(); |
|
this.getSettingItem(1, 1); |
|
}, |
|
methods: { |
|
//getLoginConfig: function () { |
|
// axios.get('/PrivateReZeroRoute/100003/getLoginConfig') |
|
// .then(response => { |
|
// this.ReZero.config.Enable = response.data; |
|
// }) |
|
// .catch(error => { |
|
// console.error(error); |
|
// }); |
|
//}, |
|
//saveLoginConfig: function () { |
|
// var url = "/PrivateReZeroRoute/100003/saveLoginConfig"; |
|
// axios.post(url, { enable: this.ReZero.config.Enable }, jwHeader) |
|
// .then(response => { |
|
// tools.alert("登录配置保存成功"); |
|
// this.error = null; |
|
// }) |
|
// .catch(error => { |
|
// this.error = error.message; |
|
// this.data = null; |
|
// }); |
|
//}, |
|
saveSetting: function () { |
|
this.saveSettingItem(1, 1, this.setting.importUnunderline); |
|
}, |
|
getSettingItem: function (typeId, childTypeId) { |
|
var url = "/PrivateReZeroRoute/100003/GetSetting"; |
|
axios.post(url, { typeId: typeId, childTypeId: childTypeId }, jwHeader) |
|
.then(response => { |
|
this.setting.importUnunderline = response.data.BoolValue; |
|
this.error = null; |
|
}) |
|
.catch(error => { |
|
this.error = error.message; |
|
this.data = null; |
|
}); |
|
}, |
|
saveSettingItem: function (typeId, childTypeId, value) { |
|
var url = "/PrivateReZeroRoute/100003/UpdateSetting"; |
|
axios.post(url, { typeId: typeId, childTypeId: childTypeId, value: value }, jwHeader) |
|
.then(response => { |
|
tools.alert("实体管理配置保存成功"); |
|
this.error = null; |
|
}) |
|
.catch(error => { |
|
this.error = error.message; |
|
this.data = null; |
|
}); |
|
}, |
|
clearInternalCache: function () { |
|
axios.get("/PrivateReZeroRoute/100003/ClearAllInternalCache", jwHeader) |
|
.then(response => { |
|
tools.alert("清除成功"); |
|
this.error = null; |
|
}) |
|
.catch(error => { |
|
this.error = error.message; |
|
this.data = null; |
|
}); |
|
} |
|
} |
|
}); |
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|