|
@@ -66,357 +66,360 @@
|
|
|
<table id="search-result" class="table table-hover"></table>
|
|
|
</div>
|
|
|
|
|
|
-
|
|
|
- <script>
|
|
|
- let authorityCase = false;
|
|
|
- let notSort = false;
|
|
|
- $("[name='my-checkbox']").bootstrapSwitch({
|
|
|
- onText: "普通案例", // 设置ON文本
|
|
|
- offText: "权威案例", // 设置OFF文本
|
|
|
- onColor: "success",// 设置ON文本颜色(info/success/warning/danger/primary)
|
|
|
- offColor: "info", // 设置OFF文本颜色 (info/success/warning/danger/primary)
|
|
|
- size: "large", // 设置控件大小,从小到大 (mini/small/normal/large)
|
|
|
- // 当开关状态改变时触发
|
|
|
- onSwitchChange: function (event, state) {
|
|
|
- if (state == true) {
|
|
|
- authorityCase = false;
|
|
|
- } else {
|
|
|
- authorityCase = true;
|
|
|
- }
|
|
|
+</div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+<script>
|
|
|
+ let authorityCase = false;
|
|
|
+ let notSort = false;
|
|
|
+ $("[name='my-checkbox']").bootstrapSwitch({
|
|
|
+ onText: "普通案例", // 设置ON文本
|
|
|
+ offText: "权威案例", // 设置OFF文本
|
|
|
+ onColor: "success",// 设置ON文本颜色(info/success/warning/danger/primary)
|
|
|
+ offColor: "info", // 设置OFF文本颜色 (info/success/warning/danger/primary)
|
|
|
+ size: "large", // 设置控件大小,从小到大 (mini/small/normal/large)
|
|
|
+ // 当开关状态改变时触发
|
|
|
+ onSwitchChange: function (event, state) {
|
|
|
+ if (state == true) {
|
|
|
+ authorityCase = false;
|
|
|
+ } else {
|
|
|
+ authorityCase = true;
|
|
|
}
|
|
|
- });
|
|
|
- $("[name='sort-checkbox']").bootstrapSwitch({
|
|
|
- onText: "排序", // 设置ON文本
|
|
|
- offText: "不排序", // 设置OFF文本
|
|
|
- onColor: "success",// 设置ON文本颜色(info/success/warning/danger/primary)
|
|
|
- offColor: "warning", // 设置OFF文本颜色 (info/success/warning/danger/primary)
|
|
|
- size: "large", // 设置控件大小,从小到大 (mini/small/normal/large)
|
|
|
- // 当开关状态改变时触发
|
|
|
- onSwitchChange: function (event, state) {
|
|
|
- if (state == true) {
|
|
|
- notSort = false;
|
|
|
- } else {
|
|
|
- notSort = true;
|
|
|
- }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $("[name='sort-checkbox']").bootstrapSwitch({
|
|
|
+ onText: "排序", // 设置ON文本
|
|
|
+ offText: "不排序", // 设置OFF文本
|
|
|
+ onColor: "success",// 设置ON文本颜色(info/success/warning/danger/primary)
|
|
|
+ offColor: "warning", // 设置OFF文本颜色 (info/success/warning/danger/primary)
|
|
|
+ size: "large", // 设置控件大小,从小到大 (mini/small/normal/large)
|
|
|
+ // 当开关状态改变时触发
|
|
|
+ onSwitchChange: function (event, state) {
|
|
|
+ if (state == true) {
|
|
|
+ notSort = false;
|
|
|
+ } else {
|
|
|
+ notSort = true;
|
|
|
}
|
|
|
- });
|
|
|
- let flag = false;
|
|
|
-
|
|
|
- function init() {
|
|
|
- $('#search-result').bootstrapTable({
|
|
|
- method: 'post',
|
|
|
- dataType: "json",
|
|
|
- // url: "http://xjk:8288/judgment/query", // 请求路径
|
|
|
- url: "/judgment/query", // 请求路径
|
|
|
- striped: true, // 是否显示行间隔色
|
|
|
- pageNumber: 1, // 初始化加载第一页
|
|
|
- pagination: true, // 是否分页
|
|
|
- sidePagination: 'server', // server:服务器端分页|client:前端分页
|
|
|
- pageSize: 10, // 单页记录数
|
|
|
- pageList: [10, 20, 30],
|
|
|
- /* onClickRow: function (row, value, r, index) {
|
|
|
- console.log("click :")
|
|
|
- record_click(row.record, row, index)
|
|
|
- },*/
|
|
|
- queryParams: function (params) { // 上传服务器的参数
|
|
|
- let map = {}
|
|
|
- let search_list = $('#search-list').children();
|
|
|
- for (let i = 0; i < search_list.length; i++) {
|
|
|
- map[search_list[i].getAttribute('search_content').trim()] = search_list[i].getAttribute('search_enum').trim();
|
|
|
- }
|
|
|
- var temp = {
|
|
|
- content: map,
|
|
|
- authorityCase: authorityCase,
|
|
|
- sort: notSort ? "NOT_SORT" : null,
|
|
|
- size: params.limit,
|
|
|
- from: params.offset,
|
|
|
+ }
|
|
|
+ });
|
|
|
+ let flag = false;
|
|
|
+
|
|
|
+ function init() {
|
|
|
+ $('#search-result').bootstrapTable({
|
|
|
+ method: 'post',
|
|
|
+ dataType: "json",
|
|
|
+ // url: "http://xjk:8288/judgment/query", // 请求路径
|
|
|
+ url: "/judgment/query", // 请求路径
|
|
|
+ striped: true, // 是否显示行间隔色
|
|
|
+ pageNumber: 1, // 初始化加载第一页
|
|
|
+ pagination: true, // 是否分页
|
|
|
+ sidePagination: 'server', // server:服务器端分页|client:前端分页
|
|
|
+ pageSize: 10, // 单页记录数
|
|
|
+ pageList: [10, 20, 30],
|
|
|
+ /* onClickRow: function (row, value, r, index) {
|
|
|
+ console.log("click :")
|
|
|
+ record_click(row.record, row, index)
|
|
|
+ },*/
|
|
|
+ queryParams: function (params) { // 上传服务器的参数
|
|
|
+ let map = {}
|
|
|
+ let search_list = $('#search-list').children();
|
|
|
+ for (let i = 0; i < search_list.length; i++) {
|
|
|
+ map[search_list[i].getAttribute('search_content').trim()] = search_list[i].getAttribute('search_enum').trim();
|
|
|
+ }
|
|
|
+ var temp = {
|
|
|
+ content: map,
|
|
|
+ authorityCase: authorityCase,
|
|
|
+ sort: notSort ? "NOT_SORT" : null,
|
|
|
+ size: params.limit,
|
|
|
+ from: params.offset,
|
|
|
+ };
|
|
|
+ console.log(temp)
|
|
|
+ return temp;
|
|
|
+ },
|
|
|
+ onLoadSuccess: function () { //加载成功时执行
|
|
|
+ // alert("加载数据成功");
|
|
|
+ },
|
|
|
+ onLoadError: function () { //加载失败时执行
|
|
|
+ alert("加载数据失败");
|
|
|
+ },
|
|
|
+ responseHandler: function (res) {
|
|
|
+ console.log(res.hits.hits)
|
|
|
+ console.log('查询耗时:', res.took)
|
|
|
+ var rows = res.hits.hits.map(function (value, index, array) {
|
|
|
+ return {
|
|
|
+ "doc_id": value._id,
|
|
|
+ "title": value._source.title,
|
|
|
+ "case_no": value._source.case_no,
|
|
|
+ "court_name": value._source.court_name,
|
|
|
+ "judge_date": value._source.judge_date ? value._source.judge_date.split(' ')[0] : value._source.judge_date,
|
|
|
+ "score": value._score,
|
|
|
+ "record": value._source,
|
|
|
+ "highlight": value.highlight,
|
|
|
};
|
|
|
- console.log(temp)
|
|
|
- return temp;
|
|
|
+ });
|
|
|
+ $("#model").html('召回数量:' + res.hits.total + "<br/>查询耗时:" + res.took)
|
|
|
+ return { //return bootstrap-table能处理的数据格式
|
|
|
+ "total": res.hits.total,
|
|
|
+ "rows": rows
|
|
|
+ }
|
|
|
+ },
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ title: 'id',
|
|
|
+ field: 'doc_id',
|
|
|
+ visible: false
|
|
|
},
|
|
|
- onLoadSuccess: function () { //加载成功时执行
|
|
|
- // alert("加载数据成功");
|
|
|
+ {
|
|
|
+ title: '案件doc_id',
|
|
|
+ field: 'doc_id',
|
|
|
+
|
|
|
},
|
|
|
- onLoadError: function () { //加载失败时执行
|
|
|
- alert("加载数据失败");
|
|
|
+ {
|
|
|
+ title: 'title',
|
|
|
+ field: 'title',
|
|
|
},
|
|
|
- responseHandler: function (res) {
|
|
|
- console.log(res.hits.hits)
|
|
|
- console.log('查询耗时:', res.took)
|
|
|
- var rows = res.hits.hits.map(function (value, index, array) {
|
|
|
- return {
|
|
|
- "doc_id": value._id,
|
|
|
- "title": value._source.title,
|
|
|
- "case_no": value._source.case_no,
|
|
|
- "court_name": value._source.court_name,
|
|
|
- "judge_date": value._source.judge_date ? value._source.judge_date.split(' ')[0] : value._source.judge_date,
|
|
|
- "score": value._score,
|
|
|
- "record": value._source,
|
|
|
- "highlight": value.highlight,
|
|
|
- };
|
|
|
- });
|
|
|
- $("#model").html('召回数量:' + res.hits.total + "<br/>查询耗时:" + res.took)
|
|
|
- return { //return bootstrap-table能处理的数据格式
|
|
|
- "total": res.hits.total,
|
|
|
- "rows": rows
|
|
|
- }
|
|
|
+ {
|
|
|
+ title: '案号',
|
|
|
+ field: 'case_no',
|
|
|
},
|
|
|
- columns: [
|
|
|
- {
|
|
|
- title: 'id',
|
|
|
- field: 'doc_id',
|
|
|
- visible: false
|
|
|
- },
|
|
|
- {
|
|
|
- title: '案件doc_id',
|
|
|
- field: 'doc_id',
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- title: 'title',
|
|
|
- field: 'title',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '案号',
|
|
|
- field: 'case_no',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '来源',
|
|
|
- field: 'highlight',
|
|
|
- formatter: highlight,
|
|
|
- cellStyle: formatTableUnit,
|
|
|
- // formatter :paramsMatter,
|
|
|
- },
|
|
|
- {
|
|
|
- title: '法院',
|
|
|
- field: 'court_name',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '审理日期',
|
|
|
- field: 'judge_date',
|
|
|
- },
|
|
|
- // {
|
|
|
- // title: '排序分',
|
|
|
- // field: 'score',
|
|
|
- // } ,
|
|
|
- {
|
|
|
- title: '操作',
|
|
|
- field: 'record',
|
|
|
- formatter: option
|
|
|
- }
|
|
|
-
|
|
|
- ]
|
|
|
- })
|
|
|
- flag = true
|
|
|
- }
|
|
|
-
|
|
|
+ {
|
|
|
+ title: '来源',
|
|
|
+ field: 'highlight',
|
|
|
+ formatter: highlight,
|
|
|
+ cellStyle: formatTableUnit,
|
|
|
+ // formatter :paramsMatter,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '法院',
|
|
|
+ field: 'court_name',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '审理日期',
|
|
|
+ field: 'judge_date',
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // title: '排序分',
|
|
|
+ // field: 'score',
|
|
|
+ // } ,
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ field: 'record',
|
|
|
+ formatter: option
|
|
|
+ }
|
|
|
|
|
|
- $("#search").keypress(function (event) {
|
|
|
- if (event.which === 13) {
|
|
|
- search(true);
|
|
|
- }
|
|
|
+ ]
|
|
|
})
|
|
|
+ flag = true
|
|
|
+ }
|
|
|
|
|
|
- $("[name='click_menu']").click(function () {
|
|
|
- $('#search-scope').text($(this).text());
|
|
|
- $('#search-scope').attr('enum_value', $(this).attr('enum_value'));
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
- function highlight(value, row, index) {
|
|
|
- let m = {
|
|
|
- "addenda": "附录文本",
|
|
|
- "case_no": "案号",
|
|
|
- "case_no.keyword": "案号",
|
|
|
- "clerk": "书记员",
|
|
|
- "court_name.keyword": "法院",
|
|
|
- "court_name": "法院",
|
|
|
- "court_view": "法院观点",
|
|
|
- "fact": "审理经过",
|
|
|
- "judge": "承办法官",
|
|
|
- "judge_result": "裁判结果",
|
|
|
- "party_info": "当事人",
|
|
|
- "title": "标题",
|
|
|
- }
|
|
|
- if (!value) {
|
|
|
- return '';
|
|
|
- }
|
|
|
- let htm =
|
|
|
- '<div class="row my-label" style="overflow:scroll;overflow-y:hidden">'
|
|
|
-
|
|
|
- for (let mKey in m) {
|
|
|
- if (value[mKey]) {
|
|
|
- let s = value[mKey].map(function (v, i, a) {
|
|
|
- v = v.replaceAll(")", ")").replaceAll("(", "(");
|
|
|
- if (v.indexOf("</font>)<font class='my-bold'>") > 0 && v.indexOf("</font>(<font class='my-bold'>") > 0) {
|
|
|
- v = v.replaceAll("</font>)<font class='my-bold'>", ")").replaceAll("</font>(<font class='my-bold'>", "(")
|
|
|
- }
|
|
|
- return '<span class="my-badge">' + v + '</span>'
|
|
|
- }).join(',')
|
|
|
- htm += '<p>' + m[mKey] + ':' + s + '</p>'
|
|
|
- }
|
|
|
- }
|
|
|
- htm += '</div>'
|
|
|
- return htm;
|
|
|
- }
|
|
|
|
|
|
- // 定义删除、更新按钮
|
|
|
- function option(value, row, index) {
|
|
|
- console.log(row.doc_id)
|
|
|
- var p = 'https://www.winhc.cn/searchCase/' + Base64.encodeURI(row.doc_id);
|
|
|
- return '<button class="btn btn-primary btn-lg" onclick="javascript:window.open(\'' + p + '\')">详情</button>';
|
|
|
+ $("#search").keypress(function (event) {
|
|
|
+ if (event.which === 13) {
|
|
|
+ search(true);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- function search(clear = false) {
|
|
|
-
|
|
|
- let search_scope = $('#search-scope').text();
|
|
|
- let search_enum = $('#search-scope').attr('enum_value');
|
|
|
- let search_content = $('#search-content').val();
|
|
|
- if (search_content !== '') {
|
|
|
- if (clear) {
|
|
|
- $('#search-list').empty();
|
|
|
- }
|
|
|
- $('#search-list').html($('#search-list').html() + ' <span class="my-badge" search_enum="' + search_enum + '" search_content="' + search_content + '">' + search_scope + ': ' + search_content + '</span>')
|
|
|
- }
|
|
|
-
|
|
|
- if (!flag) {
|
|
|
- console.info('init...')
|
|
|
- init()
|
|
|
- } else {
|
|
|
- console.info('search...')
|
|
|
- $('#search-result').bootstrapTable('refresh', {pageSize: 10, pageNumber: 1});
|
|
|
- }
|
|
|
- $('#search-scope').text('全部内容');
|
|
|
- $('#search-scope').attr('enum_value', 'ALL');
|
|
|
- $('#search-content').val("");
|
|
|
+ })
|
|
|
+
|
|
|
+ $("[name='click_menu']").click(function () {
|
|
|
+ $('#search-scope').text($(this).text());
|
|
|
+ $('#search-scope').attr('enum_value', $(this).attr('enum_value'));
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ function highlight(value, row, index) {
|
|
|
+ let m = {
|
|
|
+ "addenda": "附录文本",
|
|
|
+ "case_no": "案号",
|
|
|
+ "case_no.keyword": "案号",
|
|
|
+ "clerk": "书记员",
|
|
|
+ "court_name.keyword": "法院",
|
|
|
+ "court_name": "法院",
|
|
|
+ "court_view": "法院观点",
|
|
|
+ "fact": "审理经过",
|
|
|
+ "judge": "承办法官",
|
|
|
+ "judge_result": "裁判结果",
|
|
|
+ "party_info": "当事人",
|
|
|
+ "title": "标题",
|
|
|
}
|
|
|
-
|
|
|
- //表格超出宽度鼠标悬停显示td内容
|
|
|
- function paramsMatter(value, row, index) {
|
|
|
- let m = {
|
|
|
- "addenda": "附录文本",
|
|
|
- "case_no": "案号",
|
|
|
- "case_no.keyword": "案号",
|
|
|
- "clerk": "书记员",
|
|
|
- "court_name.keyword": "法院",
|
|
|
- "court_name": "法院",
|
|
|
- "court_view": "法院观点",
|
|
|
- "fact": "审理经过",
|
|
|
- "judge": "承办法官",
|
|
|
- "judge_result": "裁判结果",
|
|
|
- "party_info": "当事人",
|
|
|
- "title": "标题",
|
|
|
- }
|
|
|
- if (!value) {
|
|
|
- return '';
|
|
|
- }
|
|
|
- let htm =
|
|
|
- '<div class="row my-label" style="overflow:scroll;">'
|
|
|
-
|
|
|
- for (let mKey in m) {
|
|
|
- if (value[mKey]) {
|
|
|
- let s = value[mKey].map(function (v, i, a) {
|
|
|
- v = v.replaceAll(")", ")").replaceAll("(", "(");
|
|
|
- if (v.indexOf("</font>)<font class='my-bold'>") > 0 && v.indexOf("</font>(<font class='my-bold'>") > 0) {
|
|
|
- v = v.replaceAll("</font>)<font class='my-bold'>", ")").replaceAll("</font>(<font class='my-bold'>", "(")
|
|
|
- }
|
|
|
- return '<span class="my-badge">' + v + '</span>'
|
|
|
- }).join(',')
|
|
|
- htm += '<p>' + m[mKey] + ':' + s + '</p>'
|
|
|
- }
|
|
|
- }
|
|
|
- htm += '</div>'
|
|
|
-
|
|
|
-
|
|
|
- var span = document.createElement("span");
|
|
|
- span.setAttribute("title", htm);
|
|
|
- span.innerHTML = htm;
|
|
|
- return span.outerHTML;
|
|
|
+ if (!value) {
|
|
|
+ return '';
|
|
|
}
|
|
|
-
|
|
|
- //td宽度以及内容超过宽度隐藏
|
|
|
- function formatTableUnit(value, row, index) {
|
|
|
- return {
|
|
|
- css: {
|
|
|
- "white-space": "nowrap",
|
|
|
- "text-overflow": "ellipsis",
|
|
|
- "overflow": "hidden",
|
|
|
- "max-width": "240px"
|
|
|
- }
|
|
|
+ let htm =
|
|
|
+ '<div class="row my-label" style="overflow:scroll;overflow-y:hidden">'
|
|
|
+
|
|
|
+ for (let mKey in m) {
|
|
|
+ if (value[mKey]) {
|
|
|
+ let s = value[mKey].map(function (v, i, a) {
|
|
|
+ v = v.replaceAll(")", ")").replaceAll("(", "(");
|
|
|
+ if (v.indexOf("</font>)<font class='my-bold'>") > 0 && v.indexOf("</font>(<font class='my-bold'>") > 0) {
|
|
|
+ v = v.replaceAll("</font>)<font class='my-bold'>", ")").replaceAll("</font>(<font class='my-bold'>", "(")
|
|
|
+ }
|
|
|
+ return '<span class="my-badge">' + v + '</span>'
|
|
|
+ }).join(',')
|
|
|
+ htm += '<p>' + m[mKey] + ':' + s + '</p>'
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- </script>
|
|
|
-
|
|
|
- <style>
|
|
|
-
|
|
|
- #search-wrap .search-content {
|
|
|
- box-shadow: none;
|
|
|
- border: 0 none;
|
|
|
- outline: none;
|
|
|
- font-family: "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", Arial, Helvetica, sans-serif;
|
|
|
- margin-top: 3px;
|
|
|
- margin-left: 18px;
|
|
|
- width: 298px;
|
|
|
- height: 30px;
|
|
|
- }
|
|
|
-
|
|
|
- .my-label {
|
|
|
- margin-left: 2px;
|
|
|
+ htm += '</div>'
|
|
|
+ return htm;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 定义删除、更新按钮
|
|
|
+ function option(value, row, index) {
|
|
|
+ console.log(row.doc_id)
|
|
|
+ var p = 'https://www.winhc.cn/searchCase/' + Base64.encodeURI(row.doc_id);
|
|
|
+ return '<button class="btn btn-primary btn-lg" onclick="javascript:window.open(\'' + p + '\')">详情</button>';
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ function search(clear = false) {
|
|
|
+
|
|
|
+ let search_scope = $('#search-scope').text();
|
|
|
+ let search_enum = $('#search-scope').attr('enum_value');
|
|
|
+ let search_content = $('#search-content').val();
|
|
|
+ if (search_content !== '') {
|
|
|
+ if (clear) {
|
|
|
+ $('#search-list').empty();
|
|
|
+ }
|
|
|
+ $('#search-list').html($('#search-list').html() + ' <span class="my-badge" search_enum="' + search_enum + '" search_content="' + search_content + '">' + search_scope + ': ' + search_content + '</span>')
|
|
|
}
|
|
|
|
|
|
- .my-bold {
|
|
|
- font-weight: bold;
|
|
|
- color: black;
|
|
|
+ if (!flag) {
|
|
|
+ console.info('init...')
|
|
|
+ init()
|
|
|
+ } else {
|
|
|
+ console.info('search...')
|
|
|
+ $('#search-result').bootstrapTable('refresh', {pageSize: 10, pageNumber: 1});
|
|
|
}
|
|
|
-
|
|
|
- .my-badge {
|
|
|
- display: inline-block;
|
|
|
- min-width: 10px;
|
|
|
- padding: 3px 7px;
|
|
|
- font-size: 12px;
|
|
|
- font-weight: 700;
|
|
|
- line-height: 1;
|
|
|
- color: #fff;
|
|
|
- text-align: center;
|
|
|
- white-space: nowrap;
|
|
|
- vertical-align: baseline;
|
|
|
- background-color: #49AF4F;
|
|
|
- border-radius: 10px;
|
|
|
+ $('#search-scope').text('全部内容');
|
|
|
+ $('#search-scope').attr('enum_value', 'ALL');
|
|
|
+ $('#search-content').val("");
|
|
|
+ }
|
|
|
+
|
|
|
+ //表格超出宽度鼠标悬停显示td内容
|
|
|
+ function paramsMatter(value, row, index) {
|
|
|
+ let m = {
|
|
|
+ "addenda": "附录文本",
|
|
|
+ "case_no": "案号",
|
|
|
+ "case_no.keyword": "案号",
|
|
|
+ "clerk": "书记员",
|
|
|
+ "court_name.keyword": "法院",
|
|
|
+ "court_name": "法院",
|
|
|
+ "court_view": "法院观点",
|
|
|
+ "fact": "审理经过",
|
|
|
+ "judge": "承办法官",
|
|
|
+ "judge_result": "裁判结果",
|
|
|
+ "party_info": "当事人",
|
|
|
+ "title": "标题",
|
|
|
}
|
|
|
-
|
|
|
- #search-wrap .search-choise {
|
|
|
- box-shadow: none;
|
|
|
- border: 0 none;
|
|
|
- outline: none;
|
|
|
- margin-left: 18px;
|
|
|
- font-family: "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", Arial, Helvetica, sans-serif;
|
|
|
+ if (!value) {
|
|
|
+ return '';
|
|
|
}
|
|
|
-
|
|
|
- #search-wrap .search-choise option {
|
|
|
- box-shadow: none;
|
|
|
- border: 0 none;
|
|
|
- outline: none;
|
|
|
- margin-left: 18px;
|
|
|
- font-family: "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", Arial, Helvetica, sans-serif;
|
|
|
+ let htm =
|
|
|
+ '<div class="row my-label" style="overflow:scroll;">'
|
|
|
+
|
|
|
+ for (let mKey in m) {
|
|
|
+ if (value[mKey]) {
|
|
|
+ let s = value[mKey].map(function (v, i, a) {
|
|
|
+ v = v.replaceAll(")", ")").replaceAll("(", "(");
|
|
|
+ if (v.indexOf("</font>)<font class='my-bold'>") > 0 && v.indexOf("</font>(<font class='my-bold'>") > 0) {
|
|
|
+ v = v.replaceAll("</font>)<font class='my-bold'>", ")").replaceAll("</font>(<font class='my-bold'>", "(")
|
|
|
+ }
|
|
|
+ return '<span class="my-badge">' + v + '</span>'
|
|
|
+ }).join(',')
|
|
|
+ htm += '<p>' + m[mKey] + ':' + s + '</p>'
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
- #search-wrap .search-btn {
|
|
|
- border: 0px;
|
|
|
- float: right;
|
|
|
- /* margin: 4px 4px 4px 0; */
|
|
|
- width: 66px;
|
|
|
- outline: none;
|
|
|
- height: 36px;
|
|
|
- border-radius: 0px 18px 18px 0px;
|
|
|
- background-color: #49AF4F;
|
|
|
- color: #FFF;
|
|
|
- text-align: center;
|
|
|
- line-height: 28px;
|
|
|
+ htm += '</div>'
|
|
|
+
|
|
|
+
|
|
|
+ var span = document.createElement("span");
|
|
|
+ span.setAttribute("title", htm);
|
|
|
+ span.innerHTML = htm;
|
|
|
+ return span.outerHTML;
|
|
|
+ }
|
|
|
+
|
|
|
+ //td宽度以及内容超过宽度隐藏
|
|
|
+ function formatTableUnit(value, row, index) {
|
|
|
+ return {
|
|
|
+ css: {
|
|
|
+ "white-space": "nowrap",
|
|
|
+ "text-overflow": "ellipsis",
|
|
|
+ "overflow": "hidden",
|
|
|
+ "max-width": "240px"
|
|
|
+ }
|
|
|
}
|
|
|
- </style>
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+<style>
|
|
|
+
|
|
|
+ #search-wrap .search-content {
|
|
|
+ box-shadow: none;
|
|
|
+ border: 0 none;
|
|
|
+ outline: none;
|
|
|
+ font-family: "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", Arial, Helvetica, sans-serif;
|
|
|
+ margin-top: 3px;
|
|
|
+ margin-left: 18px;
|
|
|
+ width: 298px;
|
|
|
+ height: 30px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .my-label {
|
|
|
+ margin-left: 2px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .my-bold {
|
|
|
+ font-weight: bold;
|
|
|
+ color: black;
|
|
|
+ }
|
|
|
+
|
|
|
+ .my-badge {
|
|
|
+ display: inline-block;
|
|
|
+ min-width: 10px;
|
|
|
+ padding: 3px 7px;
|
|
|
+ font-size: 12px;
|
|
|
+ font-weight: 700;
|
|
|
+ line-height: 1;
|
|
|
+ color: #fff;
|
|
|
+ text-align: center;
|
|
|
+ white-space: nowrap;
|
|
|
+ vertical-align: baseline;
|
|
|
+ background-color: #49AF4F;
|
|
|
+ border-radius: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ #search-wrap .search-choise {
|
|
|
+ box-shadow: none;
|
|
|
+ border: 0 none;
|
|
|
+ outline: none;
|
|
|
+ margin-left: 18px;
|
|
|
+ font-family: "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", Arial, Helvetica, sans-serif;
|
|
|
+ }
|
|
|
+
|
|
|
+ #search-wrap .search-choise option {
|
|
|
+ box-shadow: none;
|
|
|
+ border: 0 none;
|
|
|
+ outline: none;
|
|
|
+ margin-left: 18px;
|
|
|
+ font-family: "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", Arial, Helvetica, sans-serif;
|
|
|
+ }
|
|
|
+
|
|
|
+ #search-wrap .search-btn {
|
|
|
+ border: 0px;
|
|
|
+ float: right;
|
|
|
+ /* margin: 4px 4px 4px 0; */
|
|
|
+ width: 66px;
|
|
|
+ outline: none;
|
|
|
+ height: 36px;
|
|
|
+ border-radius: 0px 18px 18px 0px;
|
|
|
+ background-color: #49AF4F;
|
|
|
+ color: #FFF;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 28px;
|
|
|
+ }
|
|
|
+</style>
|
|
|
</body>
|
|
|
|
|
|
</html>
|