将数据操作全部改为迁移脚本

This commit is contained in:
zhengxinonly
2021-06-14 02:10:29 +08:00
parent 9e8a5357be
commit d7c7237cd4
37 changed files with 452 additions and 536 deletions
+1 -1
View File
@@ -33,7 +33,7 @@
</div>
<div class="layui-form-item">
<label class="layui-form-label">邮箱</label>
<div class="layui-input-block">
<div class="layui-input-block">x`
<input type="text" value="{{ dept.email }}" name="email" lay-verify="title" autocomplete="off"
placeholder="请输入标题"
class="layui-input">
+1
View File
@@ -58,6 +58,7 @@
<div id="sideMenu"></div>
</div>
</div>
<!-- 内容主题 -->
<div class="layui-body">
<div id="content"></div>
</div>
+2 -2
View File
@@ -93,7 +93,7 @@
dtree.renderSelect({
elem: '#selectParent',
url: '/admin/power/selectParent',
url: '{{ url_for('rights.select_parent') }}',
method: 'get',
selectInputName: { nodeId: 'parentId', context: 'powerName' },
skin: 'layui',
@@ -126,7 +126,7 @@
form.on('submit(power-save)', function (data) {
data.field.icon = 'layui-icon ' + data.field.icon
$.ajax({
url: '/admin/power/save',
url: '{{ url_for('rights.save') }}',
data: JSON.stringify(data.field),
dataType: 'json',
contentType: 'application/json',
+3 -3
View File
@@ -105,7 +105,7 @@
dtree.renderSelect({
elem: '#selectParent',
url: '/admin/power/selectParent',
url: '{{ url_for('rights.select_parent')}}',
method: 'get',
selectInputName: { nodeId: 'parentId', context: 'powerName' },
skin: 'layui',
@@ -138,7 +138,7 @@
form.on('submit(power-save)', function (data) {
data.field.icon = 'layui-icon ' + data.field.icon
$.ajax({
url: '/admin/power/update',
url: '{{ url_for('rights.update') }}',
data: JSON.stringify(data.field),
dataType: 'json',
contentType: 'application/json',
@@ -191,7 +191,7 @@
}
}
window.init("{{ power.type}}")
window.init("{{ power.type }}")
})
</script>
<script>
+3 -3
View File
@@ -92,7 +92,7 @@
let treetable = layui.treetable
let popup = layui.popup
let MODULE_PATH = '/admin/power/'
let MODULE_PATH = '/rights/'
window.render = function () {
treetable.render({
@@ -105,7 +105,7 @@
treeDefaultClose: true,
toolbar: '#power-toolbar',
elem: '#power-table',
url: '/admin/power/data',
url: '{{ url_for('rights.data') }}',
page: false,
cols: [
[
@@ -180,7 +180,7 @@
}
let loading = layer.load()
$.ajax({
url: '/admin/power/' + operate,
url: MODULE_PATH + operate,
data: JSON.stringify({ powerId: this.value }),
dataType: 'json',
contentType: 'application/json',