fixed
This commit is contained in:
@@ -135,6 +135,7 @@ class Reporttt
|
|||||||
'username'=>$user['username'],//登录的医生
|
'username'=>$user['username'],//登录的医生
|
||||||
'report_content'=>$choice['message']['content'],
|
'report_content'=>$choice['message']['content'],
|
||||||
'name'=>$basedata['name'],
|
'name'=>$basedata['name'],
|
||||||
|
'phone'=>$basedata['phone'],
|
||||||
];
|
];
|
||||||
$res_content[] = $choice['message']['content'];
|
$res_content[] = $choice['message']['content'];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ use wanghua\general_utility_tools_php\Mmodel;
|
|||||||
use wanghua\general_utility_tools_php\tool\Tools;
|
use wanghua\general_utility_tools_php\tool\Tools;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 疼痛科随访记录
|
* 随访记录(数智人医生)
|
||||||
*
|
*
|
||||||
* @icon fa fa-circle-o
|
* @icon fa fa-circle-o
|
||||||
*/
|
*/
|
||||||
@@ -67,10 +67,20 @@ class Followup extends Backend
|
|||||||
if(empty($report_dataid)){
|
if(empty($report_dataid)){
|
||||||
return Tools::set_fail( '请选择诊断报告');
|
return Tools::set_fail( '请选择诊断报告');
|
||||||
}
|
}
|
||||||
|
$report = Db::table('fa_tt_medical_report')->where('id',$report_dataid)->find();
|
||||||
|
if(empty($report['phone'])){
|
||||||
|
return Tools::set_fail( '病人手机号不存在');
|
||||||
|
}
|
||||||
|
$userbase = Db::table('fa_tt_userbaseinfo')
|
||||||
|
->where('name',$report['name'])
|
||||||
|
->where('phone',$report['phone'])
|
||||||
|
->find();
|
||||||
$data = [
|
$data = [
|
||||||
'report_dataid'=>$report_dataid,
|
'report_dataid'=>$report_dataid,
|
||||||
'content'=>$content,
|
'content'=>$content,
|
||||||
'create_time'=>date('Y-m-d H:i:s')
|
'create_time'=>input('create_time'),
|
||||||
|
'name'=>$report['name'],
|
||||||
|
'phone'=>$userbase['phone'],
|
||||||
];
|
];
|
||||||
Db::table('fa_tt_followup')->insert($data);
|
Db::table('fa_tt_followup')->insert($data);
|
||||||
return Tools::set_ok('添加成功');
|
return Tools::set_ok('添加成功');
|
||||||
@@ -99,10 +109,18 @@ class Followup extends Backend
|
|||||||
if(empty($report_dataid)){
|
if(empty($report_dataid)){
|
||||||
return Tools::set_fail( '请选择诊断报告');
|
return Tools::set_fail( '请选择诊断报告');
|
||||||
}
|
}
|
||||||
|
$report = Db::table('fa_tt_medical_report')->where('id',$report_dataid)->find();
|
||||||
|
|
||||||
|
$userbase = Db::table('fa_tt_userbaseinfo')
|
||||||
|
->where('username',$report['username'])
|
||||||
|
->where('name',$report['name'])
|
||||||
|
->find();
|
||||||
$data = [
|
$data = [
|
||||||
'report_dataid'=>$report_dataid,
|
'report_dataid'=>$report_dataid,
|
||||||
'content'=>$content,
|
'content'=>$content,
|
||||||
'create_time'=>date('Y-m-d H:i:s')
|
'create_time'=>input('create_time'),
|
||||||
|
'name'=>$report['name'],
|
||||||
|
'phone'=>$userbase['phone'],
|
||||||
];
|
];
|
||||||
Db::table('fa_ty_followup')->insert($data);
|
Db::table('fa_ty_followup')->insert($data);
|
||||||
return Tools::set_ok('添加成功');
|
return Tools::set_ok('添加成功');
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\controller\ty;
|
||||||
|
|
||||||
|
use app\common\controller\Backend;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 随访记录(听译助手)
|
||||||
|
*
|
||||||
|
* @icon fa fa-circle-o
|
||||||
|
*/
|
||||||
|
class Followup extends Backend
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Followup模型对象
|
||||||
|
* @var \app\admin\model\ty\Followup
|
||||||
|
*/
|
||||||
|
protected $model = null;
|
||||||
|
|
||||||
|
public function _initialize()
|
||||||
|
{
|
||||||
|
parent::_initialize();
|
||||||
|
$this->model = new \app\admin\model\ty\Followup;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
|
||||||
|
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
|
||||||
|
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'Id' => 'ID',
|
'Id' => 'ID',
|
||||||
'Name' => '姓名',
|
'Report_dataid' => '报告ID',
|
||||||
'Phone' => '电话',
|
'Name' => '姓名',
|
||||||
'Content' => '随访内容',
|
'Phone' => '电话',
|
||||||
'Create_time' => '随访时间'
|
'Content' => '随访内容',
|
||||||
|
'Create_time' => '随访时间'
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'Id' => 'ID',
|
||||||
|
'Report_dataid' => '报告ID',
|
||||||
|
'Name' => '姓名',
|
||||||
|
'Phone' => '电话',
|
||||||
|
'Content' => '随访内容',
|
||||||
|
'Create_time' => '随访时间'
|
||||||
|
];
|
||||||
40
digital_doctor_admin/application/admin/model/ty/Followup.php
Normal file
40
digital_doctor_admin/application/admin/model/ty/Followup.php
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\model\ty;
|
||||||
|
|
||||||
|
use think\Model;
|
||||||
|
|
||||||
|
|
||||||
|
class Followup extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 表名
|
||||||
|
protected $name = 'ty_followup';
|
||||||
|
|
||||||
|
// 自动写入时间戳字段
|
||||||
|
protected $autoWriteTimestamp = false;
|
||||||
|
|
||||||
|
// 定义时间戳字段名
|
||||||
|
protected $createTime = false;
|
||||||
|
protected $updateTime = false;
|
||||||
|
protected $deleteTime = false;
|
||||||
|
|
||||||
|
// 追加属性
|
||||||
|
protected $append = [
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\validate\ty;
|
||||||
|
|
||||||
|
use think\Validate;
|
||||||
|
|
||||||
|
class Followup extends Validate
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 验证规则
|
||||||
|
*/
|
||||||
|
protected $rule = [
|
||||||
|
];
|
||||||
|
/**
|
||||||
|
* 提示消息
|
||||||
|
*/
|
||||||
|
protected $message = [
|
||||||
|
];
|
||||||
|
/**
|
||||||
|
* 验证场景
|
||||||
|
*/
|
||||||
|
protected $scene = [
|
||||||
|
'add' => [],
|
||||||
|
'edit' => [],
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,11 @@
|
|||||||
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||||
|
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Report_dataid')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-report_dataid" data-rule="required" class="form-control" name="row[report_dataid]" type="number">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Report_dataid')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-report_dataid" data-rule="required" class="form-control" name="row[report_dataid]" type="number">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-name" class="form-control" name="row[name]" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Phone')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-phone" class="form-control" name="row[phone]" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group layer-footer">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Report_dataid')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-report_dataid" data-rule="required" class="form-control" name="row[report_dataid]" type="number" value="{$row.report_dataid|htmlentities}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-name" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Phone')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-phone" class="form-control" name="row[phone]" type="text" value="{$row.phone|htmlentities}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:$row.create_time?datetime($row.create_time):''}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group layer-footer">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<div class="panel panel-default panel-intro">
|
||||||
|
{:build_heading()}
|
||||||
|
|
||||||
|
<div class="panel-body">
|
||||||
|
<div id="myTabContent" class="tab-content">
|
||||||
|
<div class="tab-pane fade active in" id="one">
|
||||||
|
<div class="widget-body no-padding">
|
||||||
|
<div id="toolbar" class="toolbar">
|
||||||
|
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
||||||
|
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('ty/followup/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||||
|
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('ty/followup/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
|
||||||
|
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('ty/followup/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
|
||||||
|
data-operate-edit="{:$auth->check('ty/followup/edit')}"
|
||||||
|
data-operate-del="{:$auth->check('ty/followup/del')}"
|
||||||
|
width="100%">
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -26,6 +26,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||||||
[
|
[
|
||||||
{checkbox: true},
|
{checkbox: true},
|
||||||
{field: 'id', title: __('Id')},
|
{field: 'id', title: __('Id')},
|
||||||
|
{field: 'report_dataid', title: __('Report_dataid')},
|
||||||
{field: 'name', title: __('Name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
{field: 'name', title: __('Name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||||
{field: 'phone', title: __('Phone'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
{field: 'phone', title: __('Phone'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||||
|
|||||||
@@ -57,9 +57,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||||||
//按钮【按钮一】的回调
|
//按钮【按钮一】的回调
|
||||||
|
|
||||||
let content = $('#c-content').val();
|
let content = $('#c-content').val();
|
||||||
|
let create_time = $('#c-create_time').val();
|
||||||
|
|
||||||
let url = 'tt/Followup/submitfollowup';
|
let url = 'tt/Followup/submitfollowup';
|
||||||
$.post(url,{content:content,report_dataid:report_dataid},function (res) {
|
$.post(url,{content:content,report_dataid:report_dataid,create_time:create_time},function (res) {
|
||||||
|
|
||||||
layer.msg(res.msg);
|
layer.msg(res.msg);
|
||||||
if(res.code==200){
|
if(res.code==200){
|
||||||
|
|||||||
54
digital_doctor_admin/public/assets/js/backend/ty/followup.js
Normal file
54
digital_doctor_admin/public/assets/js/backend/ty/followup.js
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||||
|
|
||||||
|
var Controller = {
|
||||||
|
index: function () {
|
||||||
|
// 初始化表格参数配置
|
||||||
|
Table.api.init({
|
||||||
|
extend: {
|
||||||
|
index_url: 'ty/followup/index' + location.search,
|
||||||
|
add_url: 'ty/followup/add',
|
||||||
|
edit_url: 'ty/followup/edit',
|
||||||
|
del_url: 'ty/followup/del',
|
||||||
|
multi_url: 'ty/followup/multi',
|
||||||
|
import_url: 'ty/followup/import',
|
||||||
|
table: 'ty_followup',
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var table = $("#table");
|
||||||
|
|
||||||
|
// 初始化表格
|
||||||
|
table.bootstrapTable({
|
||||||
|
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||||
|
pk: 'id',
|
||||||
|
sortName: 'id',
|
||||||
|
columns: [
|
||||||
|
[
|
||||||
|
{checkbox: true},
|
||||||
|
{field: 'id', title: __('Id')},
|
||||||
|
{field: 'report_dataid', title: __('Report_dataid')},
|
||||||
|
{field: 'name', title: __('Name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||||
|
{field: 'phone', title: __('Phone'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||||
|
{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;
|
||||||
|
});
|
||||||
@@ -58,9 +58,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||||||
//按钮【按钮一】的回调
|
//按钮【按钮一】的回调
|
||||||
|
|
||||||
let content = $('#c-content').val();
|
let content = $('#c-content').val();
|
||||||
|
let create_time = $('#c-create_time').val();
|
||||||
|
|
||||||
let url = 'tt/Followup/submitFollowUpTy';
|
let url = 'tt/Followup/submitFollowUpTy';
|
||||||
$.post(url,{content:content,report_dataid:report_dataid},function (res) {
|
$.post(url,{content:content,report_dataid:report_dataid,create_time:create_time},function (res) {
|
||||||
|
|
||||||
layer.msg(res.msg);
|
layer.msg(res.msg);
|
||||||
if(res.code==200){
|
if(res.code==200){
|
||||||
|
|||||||
Reference in New Issue
Block a user