This commit is contained in:
2024-07-16 23:21:46 +08:00
parent 09ae489412
commit e23f56660d
499 changed files with 1518 additions and 71326 deletions

View File

@@ -3,76 +3,104 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'table', 'echarts', 'echart
var Controller = {
index: function () {
// 基于准备好的dom初始化echarts实例
var myChart = Echarts.init(document.getElementById('echart'), 'walden');
// 指定图表的配置项和数据
var option = {
title: {
text: '',
subtext: ''
},
color: [
"#18d1b1",
"#3fb1e3",
"#626c91",
"#a0a7e6",
"#c4ebad",
"#96dee8"
],
tooltip: {
trigger: 'axis'
},
legend: {
data: [__('Register user')]
},
toolbox: {
show: false,
feature: {
magicType: {show: true, type: ['stack', 'tiled']},
saveAsImage: {show: true}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: Config.column
},
yAxis: {},
grid: [{
left: 'left',
top: 'top',
right: '10',
bottom: 30
}],
series: [{
name: __('Register user'),
type: 'line',
smooth: true,
areaStyle: {
normal: {}
},
lineStyle: {
normal: {
width: 1.5
}
},
data: Config.userdata
}]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
$(window).resize(function () {
myChart.resize();
// var myChart = Echarts.init(document.getElementById('echart'), 'walden');
//
// // 指定图表的配置项和数据
// var option = {
// title: {
// text: '',
// subtext: ''
// },
// color: [
// "#18d1b1",
// "#3fb1e3",
// "#626c91",
// "#a0a7e6",
// "#c4ebad",
// "#96dee8"
// ],
// tooltip: {
// trigger: 'axis'
// },
// legend: {
// data: [__('Register user')]
// },
// toolbox: {
// show: false,
// feature: {
// magicType: {show: true, type: ['stack', 'tiled']},
// saveAsImage: {show: true}
// }
// },
// xAxis: {
// type: 'category',
// boundaryGap: false,
// data: Config.column
// },
// yAxis: {},
// grid: [{
// left: 'left',
// top: 'top',
// right: '10',
// bottom: 30
// }],
// series: [{
// name: __('Register user'),
// type: 'line',
// smooth: true,
// areaStyle: {
// normal: {}
// },
// lineStyle: {
// normal: {
// width: 1.5
// }
// },
// data: Config.userdata
// }]
// };
//
// // 使用刚指定的配置项和数据显示图表。
// myChart.setOption(option);
//
// $(window).resize(function () {
// myChart.resize();
// });
//
// $(document).on("click", ".btn-refresh", function () {
// setTimeout(function () {
// myChart.resize();
// }, 0);
// });
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'tt/userbaseinfo/index' + location.search,
table: 'fa_tt_userbaseinfo',
}
});
$(document).on("click", ".btn-refresh", function () {
setTimeout(function () {
myChart.resize();
}, 0);
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'doctor', title: __('Doctor'), operate: 'LIKE'},
{field: 'username', title: __('Username'), operate: 'LIKE'},
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
}
};

View File

@@ -45,7 +45,53 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'phone', title: __('Phone'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'wechat_no', title: __('Wechat_no'), operate: 'LIKE'},
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
buttons: [
{
name: 'getReport',
text: __('查询病历报告'),
title: __('查询病历报告'),
classname: 'btn btn-xs btn-primary btn-dialog',
icon: 'fa fa-list',
url: 'Ttmedicalreport/edit',
callback: function (data) {
Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
},
visible: function (row) {
//返回true时按钮显示,返回false隐藏
return true;
}
},
// {
// name: 'ajax',
// text: __('发送Ajax'),
// title: __('发送Ajax'),
// classname: 'btn btn-xs btn-success btn-magic btn-ajax',
// icon: 'fa fa-magic',
// url: 'example/bootstraptable/detail',
// confirm: '确认发送',
// success: function (data, ret) {
// Layer.alert(ret.msg + ",返回数据:" + JSON.stringify(data));
// //如果需要阻止成功提示则必须使用return false;
// //return false;
// },
// error: function (data, ret) {
// console.log(data, ret);
// Layer.alert(ret.msg);
// return false;
// }
// },
// {
// name: 'addtabs',
// text: __('新选项卡中打开'),
// title: __('新选项卡中打开'),
// classname: 'btn btn-xs btn-warning btn-addtabs',
// icon: 'fa fa-folder-o',
// url: 'example/bootstraptable/detail'
// }
],
}
]
]
});

View File

@@ -0,0 +1,53 @@
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'ttmedicalreport/index' + location.search,
add_url: 'ttmedicalreport/add',
edit_url: 'ttmedicalreport/edit',
del_url: 'ttmedicalreport/del',
multi_url: 'ttmedicalreport/multi',
import_url: 'ttmedicalreport/import',
table: 'tt_medical_report',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'doctor', title: __('Doctor'), operate: 'LIKE'},
{field: 'username', title: __('Username'), operate: 'LIKE'},
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});

View File

@@ -0,0 +1,103 @@
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'ty/userbaseinfo/index' + location.search,
add_url: 'ty/userbaseinfo/add',
edit_url: 'ty/userbaseinfo/edit',
del_url: 'ty/userbaseinfo/del',
multi_url: 'ty/userbaseinfo/multi',
import_url: 'ty/userbaseinfo/import',
table: 'ty_userbaseinfo',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
fixedColumns: true,
fixedRightNumber: 1,
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'username', title: __('Username'), operate: 'LIKE'},
{field: 'name', title: __('Name'), operate: 'LIKE'},
{field: 'gender', title: __('Gender'), operate: 'LIKE'},
{field: 'age', title: __('Age')},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
buttons: [
{
name: 'getReport',
text: __('查询病历报告'),
title: __('查询病历报告'),
classname: 'btn btn-xs btn-primary btn-dialog',
icon: 'fa fa-list',
url: 'Tymedicalreport/edit',
callback: function (data) {
Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
},
visible: function (row) {
//返回true时按钮显示,返回false隐藏
return true;
}
},
// {
// name: 'ajax',
// text: __('发送Ajax'),
// title: __('发送Ajax'),
// classname: 'btn btn-xs btn-success btn-magic btn-ajax',
// icon: 'fa fa-magic',
// url: 'example/bootstraptable/detail',
// confirm: '确认发送',
// success: function (data, ret) {
// Layer.alert(ret.msg + ",返回数据:" + JSON.stringify(data));
// //如果需要阻止成功提示则必须使用return false;
// //return false;
// },
// error: function (data, ret) {
// console.log(data, ret);
// Layer.alert(ret.msg);
// return false;
// }
// },
// {
// name: 'addtabs',
// text: __('新选项卡中打开'),
// title: __('新选项卡中打开'),
// classname: 'btn btn-xs btn-warning btn-addtabs',
// icon: 'fa fa-folder-o',
// url: 'example/bootstraptable/detail'
// }
],
}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});

View File

@@ -0,0 +1,53 @@
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'tymedicalreport/index' + location.search,
add_url: 'tymedicalreport/add',
edit_url: 'tymedicalreport/edit',
del_url: 'tymedicalreport/del',
multi_url: 'tymedicalreport/multi',
import_url: 'tymedicalreport/import',
table: 'ty_medical_report',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'doctor', title: __('Doctor'), operate: 'LIKE'},
{field: 'username', title: __('Username'), operate: 'LIKE'},
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});