<div> <div class="col-lg-11 paddingLeft0"> <div class="col-lg-12 paddingLeft0" style="max-width:1200px;"> <table style="border:0px;height:100%;" > <tr> <td style="width:350px;"> <div style="padding-left:0px;display:inline;"> <button class="btn btn-primary" type="button" data-ng-click="createLearnCorpus()">新建</button> <button class="btn btn-primary" type="button" data-ng-click="deleteLearnCorpus()">删除</button> <button class="btn btn-primary" type="button" data-ng-click="importLearnCorpus()">导入</button> <button class="btn btn-primary" type="button" data-ng-click="exportLearnCorpus()">导出</button> <button class="btn btn-primary" type="button" data-ng-click="downloadTemplate()">模板下載</button> <input id="excel-uploader" type="file" style="display: none;" accept=".xls,.xlsx"> <button class="btn btn-primary" type="button" data-ng-click="restartAlice()">重启</button> </div> </td> <td> <div style="display:inline;"> <input type="text" class="form-control" placeholder="请输入问题ID" data-ng-model="search.questId" style="width:150px;margin-left:8px;"> </div> </td> <td> <div style="padding-left: 0px;display: inline-block;"> <input type="text" class="form-control" placeholder="请输入问题标题" data-ng-model="search.title" style="width:150px;margin-left:8px;"> </div> </td> <td> <div style="display:inline;"> <select data-ng-model="org" class="form-control" style="width:180px;margin-left:8px;" data-ng-options="orgType.orgName for orgType in orgTypeList"> </select> </div> </td> <td> <div style="display:inline;"> <select data-ng-model="search.type" class="form-control" style="width:180px;margin-left:8px;" data-ng-options="learnType.typeId as learnType.typeName for learnType in learnTypeList"> </select> </div> </td> <td> <div style="padding-left:8px;display:inline;"> <button class="btn btn-default" type="button" data-ng-click="queryData()">查询</button> </div> </td> </tr> </table> </div> <div data-ng-if="LearnCorpusList.length ==0"> 还没有任何训练内容 </div> <div data-ng-if="LearnCorpusList.length > 0" class="col-lg-12 paddingLeft0" style="max-width:1200px;margin-top:8px;"> <table id="tb_1" cellspacing="0" cellpadding="2" width="100%" border="1" class="table table-bordered table-striped table-hover" style="text-align: center;word-break: break-all;" id="tableID"> <tbody> <tr> <td style="text-align: center;background-color: #2aa58d;color: #ffffff;"></td> <td style="text-align: center;background-color: #2aa58d;color: #ffffff;" >序号</td> <td style="text-align: center;background-color: #2aa58d;color: #ffffff;" >ID</td> <td style="text-align: center;background-color: #2aa58d;color: #ffffff;" >标题(问)</td> <td style="text-align: center;background-color: #2aa58d;color: #ffffff;max-width:400px; " >内容(答)</td> <td style="text-align: center;background-color: #2aa58d;color: #ffffff;" >关键字</td> <td style="text-align: center;background-color: #2aa58d;color: #ffffff;" >是否全局问题</td> <td style="text-align: center;background-color: #2aa58d;color: #ffffff;" >问题分类</td> <td style="text-align: center;background-color: #2aa58d;color: #ffffff;" >所属单位</td> <td style="text-align: center;background-color: #2aa58d;color: #ffffff;">状态</td> <td style="text-align: center;background-color: #2aa58d;color: #ffffff;">创建人</td> <td style="text-align: center;background-color: #2aa58d;color: #ffffff;">创建时间</td> <td style="text-align: center;background-color: #2aa58d;color: #ffffff;">删除 </td> </tr> <tr data-ng-repeat="item in LearnCorpusList track by $index" data-ng-class="{'eeeColor':selectedspaceIdList[space.spaceId]}"> <td data-ng-click="toggleGroup(item.corpusId)" style="cursor: pointer;"> <input type="checkbox" data-ng-checked="selectedCorpusIdList[item.corpusId]" > </td> <td style="" title="{{$index + 1}}" ng-click="modifyLearnCorpus(item)"> {{ $index + 1 }} </td> <td style="width:100px; cursor: pointer; text-align:left;" title="鼠标单击,复制ID" data-ng-click="copyItem(item)" nowrap> <b>{{item.corpusId}}</b> </td> <td style=" cursor: pointer; text-align:left;" title="查看详情" ng-click="modifyLearnCorpus(item)"> {{item.title}} </td> <td title="查看详情" ng-click="modifyLearnCorpus(item)" style="max-width: 500px;cursor: pointer;text-align: left;"> <div ng-bind-html="item.templateInfoTrue" style="max-height:200px;overflow:hidden;max-width:500px;"></div> </td> <td style=" cursor: pointer; text-align:left;" title="查看详情" ng-click="modifyLearnCorpus(item)"> {{item.pattern}} </td> <td style=" cursor: pointer; text-align:left;" title="查看详情" ng-click="modifyLearnCorpus(item)"> <p ng-if="item.shareFlag == 1">是</p> <p ng-if="item.shareFlag == 0">否</p> </td> <td style=" cursor: pointer; text-align:left;" title="查看详情" ng-click="modifyLearnCorpus(item)"> {{item.typeName}} </td> <td style=" cursor: pointer; text-align:left;" title="查看详情" ng-click="modifyLearnCorpus(item)"> {{item.orgName}} </td> <td class="hand" style="text-align:left;" ng-click="modifyLearnCorpus(item)" nowrap> <div ng-if="!item.relatedVos" style="color:#fc8080;"> 无关联 </div> <div ng-if="item.relatedVos"> 已关联[{{item.relatedVos.length}}] </div> </td> <td style=" cursor: pointer; text-align:left;" title="查看详情" ng-click="modifyLearnCorpus(item)"> {{item.userName}} </td> <td style=" cursor: pointer; text-align:left;" title="查看详情" ng-click="modifyLearnCorpus(item)"> {{item.createDate | date:'yyyy-MM-dd HH:mm'}} </td> <td class="hand" nowrap> <a class="hand" title="鼠标单击,复制ID" data-ng-click="copyItem(item)"> <span class="glyphicon glyphicon-share"></span> </a> <a class="hand" title="删除" data-ng-click="deleteItem(item)"> <span class="glyphicon glyphicon-trash"></span> </a> </td> </tr> </tbody> </table> <script> var tTD; //用来存储当前更改宽度的Table Cell,避免快速移动鼠标的问题 var table = document.getElementById("tb_1"); for (j = 0; j < table.rows[0].cells.length; j++) { table.rows[0].cells[j].onmousedown = function (event) { //记录单元格 tTD = this; if (event.offsetX > tTD.offsetWidth - 10) { tTD.mouseDown = true; tTD.oldX = event.x; tTD.oldWidth = tTD.offsetWidth; } //记录Table宽度 //table = tTD; while (table.tagName != ‘TABLE') table = table.parentElement; //tTD.tableWidth = table.offsetWidth; }; table.rows[0].cells[j].onmouseup = function (event) { //结束宽度调整 if (tTD == undefined) tTD = this; tTD.mouseDown = false; tTD.style.cursor = 'default'; }; table.rows[0].cells[j].onmousemove = function (event) { //更改鼠标样式 if (event.offsetX > this.offsetWidth - 10) this.style.cursor = 'col-resize'; else this.style.cursor = 'default'; //取出暂存的Table Cell if (tTD == undefined) tTD = this; //调整宽度 if (tTD.mouseDown != null && tTD.mouseDown == true) { tTD.style.cursor = 'default'; if (tTD.oldWidth + (event.x - tTD.oldX)>0) tTD.width = tTD.oldWidth + (event.x - tTD.oldX); //调整列宽 tTD.style.width = tTD.width; tTD.style.cursor = 'col-resize'; //调整该列中的每个Cell table = tTD; while (table.tagName != 'TABLE') table = table.parentElement; for (j = 0; j < table.rows.length; j++) { table.rows[j].cells[tTD.cellIndex].width = tTD.width; } //调整整个表 //table.width = tTD.tableWidth + (tTD.offsetWidth – tTD.oldWidth); //table.style.width = table.width; } }; } </script> </div> <div class=" panel-default ng-cloak ng-table-pager" style="clear:both;padding-left:0px;margin-top:-30px;height:50px;max-width: 1200px;"> <div class="ng-table-counts btn-group pull-right" style="padding-left:30px;"> <span>每页显示</span> <select ng-model="ctrlScope.pageSize" id="itemType" ng-change="setpageSize()" style="width: 110px; padding: 5px;height: 35px;"> <option ng-repeat="x in pageSizeList" ng-selected="x == pageSize">{{x}}</option> </select> <span>条数据</span> </div> <div data-ng-if="pages.length" class="ng-table-counts btn-group pull-right"> <ul class="pagination ng-table-pagination" style="margin-top:0px;"> <li data-ng-class="{'active': !page.active && page.type != 'more' }" data-ng-repeat="page in pages" data-ng-switch="page.type"> <a data-ng-switch-when="prev" data-ng-click="gotoPage(page.number)" href=""> « </a> <a data-ng-switch-when="first" data-ng-click="gotoPage(page.number)" href=""><span data-ng-bind="page.number"></span></a> <a data-ng-switch-when="page" data-ng-click="gotoPage(page.number)" href=""><span data-ng-bind="page.number"></span></a> <a data-ng-switch-when="more" href="">…</a> <a data-ng-switch-when="last" data-ng-click="gotoPage(page.number)" href=""><span data-ng-bind="page.number"></span></a> <a data-ng-switch-when="next" data-ng-click="gotoPage(page.number)" href=""> » </a></li> </ul> </div> </div> </div> </div>