主耶实现版本功能的展示

doctree
zcy 2023-01-08 01:02:04 +08:00
parent adba9c676e
commit e1b158e086
4 changed files with 129 additions and 66 deletions

View File

@ -108,6 +108,8 @@ class ArticleTree extends Controller
$redis->connect('127.0.0.1', 6379); $redis->connect('127.0.0.1', 6379);
//查看服务是否运行 //查看服务是否运行
$commentModel = new Models\DocComment(); $commentModel = new Models\DocComment();
$vertime = urldecode((string)$this->params[1]);
$doccoment = $commentModel->DocComments((int)$this->params[0]); $doccoment = $commentModel->DocComments((int)$this->params[0]);
if(sizeof($this->params) > 0){ if(sizeof($this->params) > 0){
@ -118,15 +120,26 @@ class ArticleTree extends Controller
$firstpagedocs = []; $firstpagedocs = [];
$child_docs = $docModel->getChildrenDocs($this->params[0]); $child_docs = $docModel->getChildrenDocs($this->params[0]);
$doc = [];
if($vertime != ""){
$doc = $docModel->docHistoryTree((int)$this->params[0],$vertime);
$doc = array_merge($doc,$child_docs);
}else{
$doc = $docModel->docTree((int)$this->params[0]); $doc = $docModel->docTree((int)$this->params[0]);
$doc = array_merge($doc,$child_docs); $doc = array_merge($doc,$child_docs);
}
$top5 = $docModel->top5Doc(); $top5 = $docModel->top5Doc();
$doc_history = $docModel->doc_history((int)$this->params[0]);
$markdowntoc = new \ParsedownToC(); $markdowntoc = new \ParsedownToC();
$doc[0]['content'] = $markdowntoc->body($doc[0]['content']); $doc[0]['content'] = $markdowntoc->body($doc[0]['content']);
$doc[0]['toc'] = $markdowntoc->contentsList(); $doc[0]['toc'] = $markdowntoc->contentsList();
// $doc_history = $docModel->doc_history((int)$this->params[0]);
if($vertime == ""){
}else{
}
$markdown = new Parsedown; $markdown = new Parsedown;
foreach ($doc as $key => $value) { foreach ($doc as $key => $value) {
@ -152,7 +165,7 @@ class ArticleTree extends Controller
"docs"=>$doc, "docs"=>$doc,
"comments" => $doccoment, "comments" => $doccoment,
"comment_count" => count($doccoment), "comment_count" => count($doccoment),
"doc_type"=>$doc[0]["type"], // "doc_type"=>$doc[0]["type"],
"openapi"=>\App\Config::OpenApiUrl(), "openapi"=>\App\Config::OpenApiUrl(),
"treedoc"=>$doc_all, "treedoc"=>$doc_all,
"topdoc"=>$top5, "topdoc"=>$top5,

View File

@ -125,7 +125,16 @@ class Doc extends Model
return $recv; return $recv;
} }
} }
public function docHistoryTree($id,$time){
if(is_integer($id)){
$db = static::getDB();
$stmt = $db->query('select * from
doc_history where doc_id = '.$id . '
and edit_time = '.'\''. $time.'\'');
$recv = $stmt->fetchAll();
return $recv;
}
}
public function titleDoc($title){ public function titleDoc($title){
$db = static::getDB(); $db = static::getDB();
$stmt = $db->query('select * from doc_copy1 where title = \''.$title.'\''); $stmt = $db->query('select * from doc_copy1 where title = \''.$title.'\'');
@ -162,6 +171,7 @@ class Doc extends Model
$result = $stmt->fetchAll(); $result = $stmt->fetchAll();
return $result; return $result;
} }
public function getAllTypeDocs(){ public function getAllTypeDocs(){
$typedocs = []; $typedocs = [];
$doctypes = $this->getTypes(); $doctypes = $this->getTypes();

View File

@ -214,10 +214,12 @@ function expandNode(e) {
<div class="panel panel-default" id="doc_id_{{ doc.id }}" style="letter-spacing: 0.4px;"> <div class="panel panel-default" id="doc_id_{{ doc.id }}" style="letter-spacing: 0.4px;">
<div class="panel-heading" style="font-size: 20px ; background: #1d5987;color: white"> <div class="panel-heading" style="font-size: 20px ; background: #1d5987;color: white">
{{ doc.title }} 历史版本: {{ doc.title }} 历史版本:
<select NAME="TEMP" οnchange="" style="font-size: 20px ; background: #1d5987;color: white;margin-left: 15px; "> <select NAME="TEMP" onchange="location = this.value;" style="font-size: 20px ; background: #1d5987;color: white;margin-left: 15px; ">
<option value></option> <option value></option>
{% for vertime in vestimes %} {% for vertime in vestimes %}
<option value="AAAAAA">{{vertime.edit_time}}</option> <option value="{{vertime.edit_time}}" >
{{vertime.edit_time}}
</option>
{% endfor %} {% endfor %}
</select> </select>
<div style="float: right; margin-right: 30px;"> <div style="float: right; margin-right: 30px;">

View File

@ -24,7 +24,7 @@
<ul class="nav nav-tabs" style="font-size: 12px;"> <ul class="nav nav-tabs" style="font-size: 12px;">
<li> <a href="#duilib111" data-toggle="tab">万能协议调试器</a></li> <li> <a href="#duilib111" data-toggle="tab">万能协议调试器</a></li>
<li> <a href="#webrtc" data-toggle="tab">webrtc native demo</a></li> <li> <a href="#webrtc" data-toggle="tab">webrtc native demo</a></li>
<li> <a href="#ui2css" data-toggle="tab">数据采集器(软硬件)</a></li> <li> <a href="#capture" data-toggle="tab">数据采集器(软硬件)</a></li>
<li> <a href="#wireless_open" data-toggle="tab">无线开关</a></li> <li> <a href="#wireless_open" data-toggle="tab">无线开关</a></li>
<li> <a href="#learning_tool" data-toggle="tab">深度学习模型验证工具</a></li> <li> <a href="#learning_tool" data-toggle="tab">深度学习模型验证工具</a></li>
@ -123,6 +123,44 @@
深度学习验证工具 深度学习验证工具
</p> </p>
</div> </div>
<div class="tab-pane fade in active" id="capture">
<p style="display: block;font-size: 25px ; text-align: left;">
虚拟示波器
</p>
<p style="display: block;font-size: 20px ; text-align: left;">
硬件实物图:
</p>
<img src="https://www.testingcloud.club/sapi/api/image_download/0e10df17-8d97-11ed-837a-525400986ccb.jpeg">
<p style="display: block;font-size: 20px ; text-align: left;">
实现原理
</p>
<img src="https://www.testingcloud.club/sapi/api/image_download/a9818cce-8d98-11ed-837a-525400986ccb.png">
<p style="display: block;font-size: 20px ; text-align: left;">
基本性能
</p>
<p style="display: block;font-size: 20px ; text-align: left;">
采集频率: 取决于外部adc模块和ebaz4205矿板的以太网接口速率,最高可以达到100M/8 约为12.5MPS
</p>
<p style="display: block;font-size: 20px ; text-align: left;">
上位机实现功能: 采集,显示波形,存储wave文件。
</p>
<p style="display: block;font-size: 20px ; text-align: left;">
参数可运行时配置
</p>
<p style="display: block;font-size: 20px ; text-align: left;">
上位机:
</p>
<img src="https://www.testingcloud.club/sapi/api/image_download/ee7421f4-8da0-11ed-837a-525400986ccb.png">
<p style="display: block;font-size: 16px ; text-align: left;">
显示缓冲区大小可调
</p>
<p style="display: block;font-size: 16px ; text-align: left;">
刷新率可调节
</p>
<p style="display: block;font-size: 16px ; text-align: left;">
触发显示刷新可调节
</p>
</div>
</div> </div>
</div> </div>
</div> </div>