|
|
@@ -33,7 +33,7 @@
|
|
|
<!--工具条-->
|
|
|
<div id="tb" class="i-toolbar">
|
|
|
<a class="easyui-linkbutton" iconcls="icon-add" plain="true" onclick="jump()">添加</a>
|
|
|
- <a class="easyui-linkbutton" iconcls="icon-edit" plain="true" onclick="tbReportEdit()">修改</a>
|
|
|
+ <a class="easyui-linkbutton" iconcls="icon-edit" plain="true" onclick="tbReportEdit()">修改</a>
|
|
|
<a class="easyui-linkbutton" iconcls="icon-excel" plain="true" onclick="tbExport()">导出</a>
|
|
|
<a class="easyui-linkbutton" iconcls="icon-reload" plain="true" onclick="restore()">刷新</a>
|
|
|
<a class="easyui-linkbutton" iconcls="icon-print" plain="true" onclick="downfile()">下载附件</a>
|
|
|
@@ -42,21 +42,24 @@
|
|
|
时间:
|
|
|
<input id="opentime" type="text" class="easyui-datebox" style="width:165px; height:32px;">
|
|
|
-
|
|
|
- <input id="closetime" type="text" class="easyui-datebox" style="width:165px; height:32px;">
|
|
|
+ <input id="closetime" type="text" class="easyui-datebox" style="width:165px; height:32px;">
|
|
|
|
|
|
</div>
|
|
|
<div style="padding-top:10px;">
|
|
|
项目名称:
|
|
|
<input id="name" class="inp">
|
|
|
参与人员:
|
|
|
- <input id="people" class="inp" placeholder="多人请用/进行连接">
|
|
|
- <select id="modelSelect" class="combobox inp">
|
|
|
- <option selected value="">请选择型号</option>
|
|
|
- </select>
|
|
|
+ <input id="people" class="inp" placeholder="多人请用/进行连接">
|
|
|
+ <select id="modelSelect" class="combobox inp">
|
|
|
+ <option selected value="">请选择型号</option>
|
|
|
+ </select>
|
|
|
<a class="easyui-linkbutton" onclick="select()">搜索</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <table id="fqcitemsDatagrid" data-options="toolbar: '#fqcitemsToolbar',onDblClickRow: fqcitemsDatagridDblClickRow,showFooter:false">
|
|
|
+
|
|
|
+ </table>
|
|
|
</div>
|
|
|
<div id="tableLayout" data-options="singleSelect:true,border:false,region:'center',split:true,title:'',iconCls:'icon-grid'" title="East" style="width:700px;">
|
|
|
<div id="tableTabs" class="easyui-tabs" data-options="singleSelect:true,border:false" style="width: 100%; height: 100%">
|
|
|
@@ -64,17 +67,17 @@
|
|
|
<table id="myTable" class="easyui-datagrid" data-options="method:'get',border:false,fit:true,fitColumns:true">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
- <th data-options="field:'id',title:'id',align:'center',sortable:false,hidden:true"></th>
|
|
|
- <th data-options="field:'name',title:'项目名称',align:'center',sortable:false"></th>
|
|
|
- <th data-options="field:'modelid',title:'产品ID',align:'center',sortable:false,hidden:true"></th>
|
|
|
- <th data-options="field:'modelname',title:'产品编码',align:'center',sortable:false"></th>
|
|
|
- <th data-options="field:'participants',title:'参与人员',align:'center',sortable:false"></th>
|
|
|
- <th data-options="field:'problem',title:'问题',align:'center',sortable:false"></th>
|
|
|
- <th data-options="field:'solution',title:'解决方式',align:'center',sortable:false"></th>
|
|
|
- <th data-options="field:'solutioneffect',title:'解决效果',align:'center',sortable:false"></th>
|
|
|
- <th data-options="field:'showannex',title:'项目相关资料',align:'center',sortable:false"></th>
|
|
|
- <th data-options="field:'createtime',title:'创建时间',align:'center',sortable:false"></th>
|
|
|
- <th data-options="field:'username',title:'创建人',align:'center',sortable:false"></th>
|
|
|
+ <th data-options="field:'id',title:'id',align:'center',sortable:true,checkbox:true,hidden:true"></th>
|
|
|
+ <th data-options="field:'name',title:'项目名称',align:'center',sortable:true"></th>
|
|
|
+ <th data-options="field:'modelid',title:'产品ID',align:'center',sortable:true,hidden:true"></th>
|
|
|
+ <th data-options="field:'modelname',title:'产品编码',align:'center',sortable:true"></th>
|
|
|
+ <th data-options="field:'participants',title:'参与人员',align:'center',sortable:true"></th>
|
|
|
+ <th data-options="field:'problem',title:'问题',align:'center',sortable:true"></th>
|
|
|
+ <th data-options="field:'solution',title:'解决方式',align:'center',sortable:true"></th>
|
|
|
+ <th data-options="field:'solutioneffect',title:'解决效果',align:'center',sortable:true"></th>
|
|
|
+ <th data-options="field:'showannex',title:'项目相关资料',align:'center',sortable:true"></th>
|
|
|
+ <th data-options="field:'createtime',title:'创建时间',align:'center',sortable:true"></th>
|
|
|
+ <th data-options="field:'username',title:'创建人',align:'center',sortable:true"></th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
</table>
|
|
|
@@ -116,8 +119,13 @@
|
|
|
});
|
|
|
};
|
|
|
/**添加 */
|
|
|
- const jump = () => {
|
|
|
- parent.window.location.href = 'Richtext.html';
|
|
|
+ const jump = () => {
|
|
|
+ $('#myTable').datagridDialog({
|
|
|
+ title: '编辑数据',
|
|
|
+ width: window.screen.width - 100,
|
|
|
+ height: window.screen.height - 200,
|
|
|
+ url: 'Richtext.html'
|
|
|
+ });
|
|
|
};
|
|
|
/**获取所有内容 */
|
|
|
const getcontent = () => {
|
|
|
@@ -162,9 +170,23 @@
|
|
|
})
|
|
|
//填充表格
|
|
|
$('#myTable').datagrid({
|
|
|
- data: json,
|
|
|
+ data: json,
|
|
|
//配置项,显示选中行数据
|
|
|
- onSelect: function (rowIndex, rowData) {
|
|
|
+ onSelect: function (rowIndex, rowData) {
|
|
|
+ // 获取当前datagrid对象
|
|
|
+ var dg = $(this);
|
|
|
+ // 获取所有行的索引
|
|
|
+ var rows = dg.datagrid('getRows');
|
|
|
+ var rowIndices = $.map(rows, function (row, index) {
|
|
|
+ return index;
|
|
|
+ });
|
|
|
+ // 遍历所有行,取消选中状态(如果有的话)
|
|
|
+ $.each(rowIndices, function (i, index) {
|
|
|
+ // 取消选中所有行(除了当前点击的行)
|
|
|
+ if (index !== rowIndex) {
|
|
|
+ dg.datagrid('unselectRow', index);
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
@@ -189,12 +211,15 @@
|
|
|
}
|
|
|
};
|
|
|
/**修改 */
|
|
|
- const tbReportEdit = () => {
|
|
|
+ const tbReportEdit=()=> {
|
|
|
var selectedRow = $('#myTable').datagrid('getSelected');
|
|
|
- if (selectedRow) {
|
|
|
- parent.window.location.href = 'Richtext.html?id=' + selectedRow.id;
|
|
|
- }
|
|
|
- };
|
|
|
+ $('#myTable').datagridDialog({
|
|
|
+ title: '编辑数据',
|
|
|
+ width: window.screen.width - 100,
|
|
|
+ height: window.screen.height - 200,
|
|
|
+ url: 'Richtext.html?id=' + selectedRow.id
|
|
|
+ });
|
|
|
+ }
|
|
|
// 响应式数据:产品型号列表
|
|
|
let models = [];
|
|
|
/** 获取产品型号 */
|