Merge branch 'master-500-dev' of http://113.200.75.45:82/monitor_v3/hg-monitor-w…
…eb into master-500-dev-xwx
Showing
11 changed files
with
191 additions
and
157 deletions
@@ -2976,8 +2976,7 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | @@ -2976,8 +2976,7 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | ||
2976 | sort: true, | 2976 | sort: true, |
2977 | templet: '#weblogicIpTpl' | 2977 | templet: '#weblogicIpTpl' |
2978 | }, | 2978 | }, |
2979 | - {field: 'resName', title: '资源名称', minWidth: x_200, sort: true, | ||
2980 | - templet: '<div><span data-zymc="{{ d.resId }}" data-restype="{{d.resType}}" data-name="{{d.resName}}" data-childrennum="{{d.childrenNum}}" data-ip="{{ d.ip }}" data-resTypeName="{{ d.resTypeName }}" data-admin="{{ d.admin }}" data-adminName="{{ d.adminName }}" data-pingenable="{{d.pingEnable}}" class="layui-table-link">{{ d.resName }}</span></div>'}, | 2979 | + {field: 'resName', title: '资源名称', minWidth: x_200, sort: true,templet: '#resindex_resName'}, |
2981 | {field: 'health', title: '健康状态', minWidth: x_110, align: 'center', sort: true, templet: '#healthTpl'}, | 2980 | {field: 'health', title: '健康状态', minWidth: x_110, align: 'center', sort: true, templet: '#healthTpl'}, |
2982 | {field: 'serverState', title: '服务状态', minWidth: x_120, align: 'center', sort: true}, | 2981 | {field: 'serverState', title: '服务状态', minWidth: x_120, align: 'center', sort: true}, |
2983 | {field: 'queueLength', title: '队列长度', minWidth: x_110, align: 'center', templet: '#queueLengthTpl'}, | 2982 | {field: 'queueLength', title: '队列长度', minWidth: x_110, align: 'center', templet: '#queueLengthTpl'}, |
@@ -3024,9 +3023,7 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | @@ -3024,9 +3023,7 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | ||
3024 | "MIDDLEWARE_WEBLOGICCONSOLE": [ | 3023 | "MIDDLEWARE_WEBLOGICCONSOLE": [ |
3025 | {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, | 3024 | {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, |
3026 | { | 3025 | { |
3027 | - field: 'resName', title: '资源名称', minWidth: 250, sort: true, | ||
3028 | - templet: '<div><span data-zymc="{{ d.resId }}" data-restype="{{d.resType}}" data-name="{{d.resName}}" data-childrennum="{{d.childrenNum}}" data-ip="{{ d.ip }}" data-resTypeName="{{ d.resTypeName }}" data-admin="{{ d.admin }}" data-adminName="{{ d.adminName }}" data-pingenable="{{d.pingEnable}}" class="layui-table-link">{{ d.resName }}</span></div>' | ||
3029 | - }, | 3026 | + field: 'resName', title: '资源名称', minWidth: 250, sort: true,templet: '#resindex_resName' }, |
3030 | // {field: 'shortName', title: '别名', minWidth: 100, align: 'center', sort: true, templet:'#shortNameTpl'}, | 3027 | // {field: 'shortName', title: '别名', minWidth: 100, align: 'center', sort: true, templet:'#shortNameTpl'}, |
3031 | {field: 'health', title: '健康状态', minWidth: 83, align: 'center', sort: true, templet: '#healthTpl'}, | 3028 | {field: 'health', title: '健康状态', minWidth: 83, align: 'center', sort: true, templet: '#healthTpl'}, |
3032 | {field: 'lastColTime', title: '最近采集时间', minWidth: 161, align: 'center', sort: true}, | 3029 | {field: 'lastColTime', title: '最近采集时间', minWidth: 161, align: 'center', sort: true}, |
@@ -4797,18 +4794,18 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | @@ -4797,18 +4794,18 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | ||
4797 | "DATABASE_OGG": [ | 4794 | "DATABASE_OGG": [ |
4798 | {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, | 4795 | {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, |
4799 | { | 4796 | { |
4800 | - field: 'resName', title: '资源名称', width: resNameWidth, sort: true, | 4797 | + field: 'resName', title: '资源名称', minWidth: resNameWidth, sort: true, |
4801 | templet: '#resindex_resName' | 4798 | templet: '#resindex_resName' |
4802 | //lsq 资源名称用模板 2022-08-29 | 4799 | //lsq 资源名称用模板 2022-08-29 |
4803 | // templet: '<div><span data-zymc="{{ d.resId }}" data-restype="{{d.resType}}" data-name="{{d.resName}}" data-childrennum="{{d.childrenNum}}" data-ip="{{ d.ip }}" data-resTypeName="{{ d.resTypeName }}" data-admin="{{ d.adminName }}" data-pingenable="{{d.pingEnable}}" class="layui-table-link">{{ d.resName }}</span></div>' | 4800 | // templet: '<div><span data-zymc="{{ d.resId }}" data-restype="{{d.resType}}" data-name="{{d.resName}}" data-childrennum="{{d.childrenNum}}" data-ip="{{ d.ip }}" data-resTypeName="{{ d.resTypeName }}" data-admin="{{ d.adminName }}" data-pingenable="{{d.pingEnable}}" class="layui-table-link">{{ d.resName }}</span></div>' |
4804 | }, | 4801 | }, |
4805 | // {field: 'shortName', title: '别名', width: 100, align: 'center', sort: true, templet:'#shortNameTpl'}, | 4802 | // {field: 'shortName', title: '别名', width: 100, align: 'center', sort: true, templet:'#shortNameTpl'}, |
4806 | - {field: 'health', title: '健康状态', width: 86, align: 'center', sort: true, templet: '#healthTpl'}, | 4803 | + {field: 'health', title: '健康状态', width: 100, align: 'center', sort: true, templet: '#healthTpl'}, |
4807 | {field: 'lastColTime', title: '最近采集时间', width: 161, align: 'center', sort: true}, | 4804 | {field: 'lastColTime', title: '最近采集时间', width: 161, align: 'center', sort: true}, |
4808 | - {field: 'linkState', title: '连接状态', align: 'center', width: 85, templet: '#linkStateTpl', sort: true}, | ||
4809 | - {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true}, | ||
4810 | - {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true}, | ||
4811 | - {field: 'state', title: '资源状态', width: 98, align: 'center', sort: true, templet: '#resStateTpl'} | 4805 | + {field: 'linkState', title: '连接状态', align: 'center', width: 120, templet: '#linkStateTpl', sort: true}, |
4806 | + {field: 'adminName', title: '负责人', width: 133, align: 'center', sort: true}, | ||
4807 | + {field: 'adminPhone', title: '负责人电话', width: 128, align: 'center', sort: true}, | ||
4808 | + {field: 'state', title: '资源状态', width: 110, align: 'center', sort: true, templet: '#resStateTpl'} | ||
4812 | ], | 4809 | ], |
4813 | "HOST_X86_SIGN": [ | 4810 | "HOST_X86_SIGN": [ |
4814 | //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'}, | 4811 | //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'}, |
@@ -1708,7 +1708,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -1708,7 +1708,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
1708 | var alarmMsg = new msgTips({ | 1708 | var alarmMsg = new msgTips({ |
1709 | dom: ".right-bottom-tips", | 1709 | dom: ".right-bottom-tips", |
1710 | title: "告警消息", | 1710 | title: "告警消息", |
1711 | - message: `<p style="line-height: 40px">您有【${alarm}】条告警未处理,请及时关注</p>`, | 1711 | + message: `<p style="line-height: 20px">您有【${alarm}】条告警未处理,请及时关注</p>`, |
1712 | duration: 15000, | 1712 | duration: 15000, |
1713 | space: 10, | 1713 | space: 10, |
1714 | firstSpace: 8, | 1714 | firstSpace: 8, |
@@ -1749,7 +1749,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -1749,7 +1749,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
1749 | dom: ".right-bottom-tips", | 1749 | dom: ".right-bottom-tips", |
1750 | title: "工作日志未读消息", | 1750 | title: "工作日志未读消息", |
1751 | duration: 15000, | 1751 | duration: 15000, |
1752 | - message: `<p style="line-height: 40px">您有【${notRead}】条工作汇报未读,请及时关注</p>`, | 1752 | + message: `<p style="line-height: 20px">您有【${notRead}】条工作汇报未读,请及时关注</p>`, |
1753 | toastType: 'warning', | 1753 | toastType: 'warning', |
1754 | space: 10, | 1754 | space: 10, |
1755 | type: 'click', | 1755 | type: 'click', |
@@ -1783,7 +1783,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -1783,7 +1783,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
1783 | dom: ".right-bottom-tips", | 1783 | dom: ".right-bottom-tips", |
1784 | title: "监控资源即将过期提示消息", | 1784 | title: "监控资源即将过期提示消息", |
1785 | duration: 15000, | 1785 | duration: 15000, |
1786 | - message: `<p style="line-height: 40px">共有【${toTimeOut}】个资源的监控账号将在${toTimeOutDay}天内过期</p>`, | 1786 | + message: `<p style="line-height: 20px">共有【${toTimeOut}】个资源的监控账号将在${toTimeOutDay}天内过期</p>`, |
1787 | toastType: 'warning', | 1787 | toastType: 'warning', |
1788 | space: 10, | 1788 | space: 10, |
1789 | type: 'click', | 1789 | type: 'click', |
@@ -1843,7 +1843,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -1843,7 +1843,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
1843 | var duty = new msgTips({ | 1843 | var duty = new msgTips({ |
1844 | dom: ".right-bottom-tips", | 1844 | dom: ".right-bottom-tips", |
1845 | title: "值班调换消息", | 1845 | title: "值班调换消息", |
1846 | - message: `<p style="line-height: 40px">您有【${dutyMessage.count}】条调换值班信息未处理,请及时关注</p>`, | 1846 | + message: `<p style="line-height: 20px">您有【${dutyMessage.count}】条调换值班信息未处理,请及时关注</p>`, |
1847 | duration: 3 * 60 * 1000, | 1847 | duration: 3 * 60 * 1000, |
1848 | space: 10, | 1848 | space: 10, |
1849 | firstSpace: 8, | 1849 | firstSpace: 8, |
@@ -1530,7 +1530,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -1530,7 +1530,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
1530 | var alarmMsg = new msgTips({ | 1530 | var alarmMsg = new msgTips({ |
1531 | dom: ".right-bottom-tips", | 1531 | dom: ".right-bottom-tips", |
1532 | title: "告警消息", | 1532 | title: "告警消息", |
1533 | - message: `<p style="line-height: 40px">您有【${alarm}】条告警未处理,请及时关注</p>`, | 1533 | + message: `<p style="line-height: 20px">您有【${alarm}】条告警未处理,请及时关注</p>`, |
1534 | duration: 15000, | 1534 | duration: 15000, |
1535 | space: 10, | 1535 | space: 10, |
1536 | firstSpace: 8, | 1536 | firstSpace: 8, |
@@ -1571,7 +1571,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -1571,7 +1571,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
1571 | dom: ".right-bottom-tips", | 1571 | dom: ".right-bottom-tips", |
1572 | title: "工作日志未读消息", | 1572 | title: "工作日志未读消息", |
1573 | duration: 15000, | 1573 | duration: 15000, |
1574 | - message: `<p style="line-height: 40px">您有【${notRead}】条工作汇报未读,请及时关注</p>`, | 1574 | + message: `<p style="line-height: 20px">您有【${notRead}】条工作汇报未读,请及时关注</p>`, |
1575 | toastType: 'warning', | 1575 | toastType: 'warning', |
1576 | space: 10, | 1576 | space: 10, |
1577 | type: 'click', | 1577 | type: 'click', |
@@ -1588,7 +1588,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -1588,7 +1588,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
1588 | // dom:".right-bottom-tips", | 1588 | // dom:".right-bottom-tips", |
1589 | // title: "重复监控资源提示消息", | 1589 | // title: "重复监控资源提示消息", |
1590 | // duration:15000, | 1590 | // duration:15000, |
1591 | - // message:`<p style="line-height: 40px">共有【${doubleCheck}】个资源重复监控,请及时处理</p>`, | 1591 | + // message:`<p style="line-height: 20px">共有【${doubleCheck}】个资源重复监控,请及时处理</p>`, |
1592 | // toastType:'warning', | 1592 | // toastType:'warning', |
1593 | // space:10, | 1593 | // space:10, |
1594 | // type:'click', | 1594 | // type:'click', |
@@ -1605,7 +1605,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -1605,7 +1605,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
1605 | dom: ".right-bottom-tips", | 1605 | dom: ".right-bottom-tips", |
1606 | title: "监控资源即将过期提示消息", | 1606 | title: "监控资源即将过期提示消息", |
1607 | duration: 15000, | 1607 | duration: 15000, |
1608 | - message: `<p style="line-height: 40px">共有【${toTimeOut}】个资源的监控账号将在${toTimeOutDay}天内过期</p>`, | 1608 | + message: `<p style="line-height: 20px">共有【${toTimeOut}】个资源的监控账号将在${toTimeOutDay}天内过期</p>`, |
1609 | toastType: 'warning', | 1609 | toastType: 'warning', |
1610 | space: 10, | 1610 | space: 10, |
1611 | type: 'click', | 1611 | type: 'click', |
@@ -1665,7 +1665,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -1665,7 +1665,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
1665 | var duty = new msgTips({ | 1665 | var duty = new msgTips({ |
1666 | dom: ".right-bottom-tips", | 1666 | dom: ".right-bottom-tips", |
1667 | title: "值班调换消息", | 1667 | title: "值班调换消息", |
1668 | - message: `<p style="line-height: 40px">您有【${dutyMessage.count}】条调换值班信息未处理,请及时关注</p>`, | 1668 | + message: `<p style="line-height: 20px">您有【${dutyMessage.count}】条调换值班信息未处理,请及时关注</p>`, |
1669 | duration: 3 * 60 * 1000, | 1669 | duration: 3 * 60 * 1000, |
1670 | space: 10, | 1670 | space: 10, |
1671 | firstSpace: 8, | 1671 | firstSpace: 8, |
@@ -122,7 +122,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -122,7 +122,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
122 | var alarmMsg = new msgTips({ | 122 | var alarmMsg = new msgTips({ |
123 | dom: ".right-bottom-tips", | 123 | dom: ".right-bottom-tips", |
124 | title: "告警消息", | 124 | title: "告警消息", |
125 | - message: `<p style="line-height: 40px">您有【${alarm}】条告警未处理,请及时关注</p>`, | 125 | + message: `<p style="line-height: 20px">您有【${alarm}】条告警未处理,请及时关注</p>`, |
126 | duration: 15000, | 126 | duration: 15000, |
127 | space: 10, | 127 | space: 10, |
128 | firstSpace: 8, | 128 | firstSpace: 8, |
@@ -163,7 +163,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -163,7 +163,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
163 | dom: ".right-bottom-tips", | 163 | dom: ".right-bottom-tips", |
164 | title: "工作日志未读消息", | 164 | title: "工作日志未读消息", |
165 | duration: 15000, | 165 | duration: 15000, |
166 | - message: `<p style="line-height: 40px">您有【${notRead}】条工作汇报未读,请及时关注</p>`, | 166 | + message: `<p style="line-height: 20px">您有【${notRead}】条工作汇报未读,请及时关注</p>`, |
167 | toastType: 'warning', | 167 | toastType: 'warning', |
168 | space: 10, | 168 | space: 10, |
169 | type: 'click', | 169 | type: 'click', |
@@ -180,7 +180,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -180,7 +180,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
180 | // dom: ".right-bottom-tips", | 180 | // dom: ".right-bottom-tips", |
181 | // title: "重复监控资源提示消息", | 181 | // title: "重复监控资源提示消息", |
182 | // duration: 15000, | 182 | // duration: 15000, |
183 | - // message: `<p style="line-height: 40px">共有【${doubleCheck}】个资源重复监控,请及时处理</p>`, | 183 | + // message: `<p style="line-height: 20px">共有【${doubleCheck}】个资源重复监控,请及时处理</p>`, |
184 | // toastType: 'warning', | 184 | // toastType: 'warning', |
185 | // space: 10, | 185 | // space: 10, |
186 | // type: 'click', | 186 | // type: 'click', |
@@ -197,7 +197,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -197,7 +197,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
197 | dom: ".right-bottom-tips", | 197 | dom: ".right-bottom-tips", |
198 | title: "监控资源即将过期提示消息", | 198 | title: "监控资源即将过期提示消息", |
199 | duration: 15000, | 199 | duration: 15000, |
200 | - message: `<p style="line-height: 40px">共有【${toTimeOut}】个资源的监控账号将在${toTimeOutDay}天内过期</p>`, | 200 | + message: `<p style="line-height: 20px">共有【${toTimeOut}】个资源的监控账号将在${toTimeOutDay}天内过期</p>`, |
201 | toastType: 'warning', | 201 | toastType: 'warning', |
202 | space: 10, | 202 | space: 10, |
203 | type: 'click', | 203 | type: 'click', |
@@ -257,7 +257,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -257,7 +257,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
257 | var duty = new msgTips({ | 257 | var duty = new msgTips({ |
258 | dom: ".right-bottom-tips", | 258 | dom: ".right-bottom-tips", |
259 | title: "值班调换消息", | 259 | title: "值班调换消息", |
260 | - message: `<p style="line-height: 40px">您有【${dutyMessage.count}】条调换值班信息未处理,请及时关注</p>`, | 260 | + message: `<p style="line-height: 20px">您有【${dutyMessage.count}】条调换值班信息未处理,请及时关注</p>`, |
261 | duration: 3 * 60 * 1000, | 261 | duration: 3 * 60 * 1000, |
262 | space: 10, | 262 | space: 10, |
263 | firstSpace: 8, | 263 | firstSpace: 8, |
@@ -228,7 +228,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'msgTips' | @@ -228,7 +228,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'msgTips' | ||
228 | var alarmMsg = new msgTips({ | 228 | var alarmMsg = new msgTips({ |
229 | dom: ".right-bottom-tips", | 229 | dom: ".right-bottom-tips", |
230 | title: "告警消息", | 230 | title: "告警消息", |
231 | - message: `<p style="line-height: 40px">您有【${alarm}】条告警未处理,请及时关注</p>`, | 231 | + message: `<p style="line-height: 20px">您有【${alarm}】条告警未处理,请及时关注</p>`, |
232 | duration: 15000, | 232 | duration: 15000, |
233 | space: 10, | 233 | space: 10, |
234 | firstSpace: 8, | 234 | firstSpace: 8, |
@@ -269,7 +269,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'msgTips' | @@ -269,7 +269,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'msgTips' | ||
269 | dom: ".right-bottom-tips", | 269 | dom: ".right-bottom-tips", |
270 | title: "工作日志未读消息", | 270 | title: "工作日志未读消息", |
271 | duration: 15000, | 271 | duration: 15000, |
272 | - message: `<p style="line-height: 40px">您有【${notRead}】条工作汇报未读,请及时关注</p>`, | 272 | + message: `<p style="line-height: 20px">您有【${notRead}】条工作汇报未读,请及时关注</p>`, |
273 | toastType: 'warning', | 273 | toastType: 'warning', |
274 | space: 10, | 274 | space: 10, |
275 | type: 'click', | 275 | type: 'click', |
@@ -286,7 +286,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'msgTips' | @@ -286,7 +286,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'msgTips' | ||
286 | // dom:".right-bottom-tips", | 286 | // dom:".right-bottom-tips", |
287 | // title: "重复监控资源提示消息", | 287 | // title: "重复监控资源提示消息", |
288 | // duration:15000, | 288 | // duration:15000, |
289 | - // message:`<p style="line-height: 40px">共有【${doubleCheck}】个资源重复监控,请及时处理</p>`, | 289 | + // message:`<p style="line-height: 20px">共有【${doubleCheck}】个资源重复监控,请及时处理</p>`, |
290 | // toastType:'warning', | 290 | // toastType:'warning', |
291 | // space:10, | 291 | // space:10, |
292 | // type:'click', | 292 | // type:'click', |
@@ -303,7 +303,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'msgTips' | @@ -303,7 +303,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'msgTips' | ||
303 | dom: ".right-bottom-tips", | 303 | dom: ".right-bottom-tips", |
304 | title: "监控资源即将过期提示消息", | 304 | title: "监控资源即将过期提示消息", |
305 | duration: 15000, | 305 | duration: 15000, |
306 | - message: `<p style="line-height: 40px">共有【${toTimeOut}】个资源的监控账号将在${toTimeOutDay}天内过期</p>`, | 306 | + message: `<p style="line-height: 20px">共有【${toTimeOut}】个资源的监控账号将在${toTimeOutDay}天内过期</p>`, |
307 | toastType: 'warning', | 307 | toastType: 'warning', |
308 | space: 10, | 308 | space: 10, |
309 | type: 'click', | 309 | type: 'click', |
@@ -871,7 +871,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'msgTips' | @@ -871,7 +871,7 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'msgTips' | ||
871 | var duty = new msgTips({ | 871 | var duty = new msgTips({ |
872 | dom: ".right-bottom-tips", | 872 | dom: ".right-bottom-tips", |
873 | title: "值班调换消息", | 873 | title: "值班调换消息", |
874 | - message: `<p style="line-height: 40px">您有【${dutyMessage.count}】条调换值班信息未处理,请及时关注</p>`, | 874 | + message: `<p style="line-height: 20px">您有【${dutyMessage.count}】条调换值班信息未处理,请及时关注</p>`, |
875 | duration: 3 * 60 * 1000, | 875 | duration: 3 * 60 * 1000, |
876 | space: 10, | 876 | space: 10, |
877 | firstSpace: 8, | 877 | firstSpace: 8, |
@@ -525,7 +525,7 @@ layui.extend({ | @@ -525,7 +525,7 @@ layui.extend({ | ||
525 | new msgTips({ | 525 | new msgTips({ |
526 | dom: ".right-bottom-tips", | 526 | dom: ".right-bottom-tips", |
527 | title: title, | 527 | title: title, |
528 | - message: `<p style="line-height: 40px">${content}</p>`, | 528 | + message: `<p style="line-height: 20px">${content}</p>`, |
529 | duration: 10000, | 529 | duration: 10000, |
530 | space: 10, | 530 | space: 10, |
531 | firstSpace: 8, | 531 | firstSpace: 8, |
@@ -651,17 +651,17 @@ layui.extend({ | @@ -651,17 +651,17 @@ layui.extend({ | ||
651 | connectFlg = false; | 651 | connectFlg = false; |
652 | if (location.hash.indexOf('#/user/login') == -1) { | 652 | if (location.hash.indexOf('#/user/login') == -1) { |
653 | //lsq 注释掉多无提示框 2022-08-28 | 653 | //lsq 注释掉多无提示框 2022-08-28 |
654 | - /* // 调用测试接口,出现过期则会跳转到登录页面 | 654 | + // 调用测试接口,出现过期则会跳转到登录页面 |
655 | try { | 655 | try { |
656 | - | ||
657 | $.ajax({ | 656 | $.ajax({ |
658 | url: domainName + "/api-web/common/test", | 657 | url: domainName + "/api-web/common/test", |
659 | type: "get", | 658 | type: "get", |
660 | async: false, | 659 | async: false, |
661 | success: function (res) { | 660 | success: function (res) { |
662 | - $('head').append('<style id="ew-tree-table-css">' + res + '</style>'); | 661 | + console.log("检查登录状态:",'正常') |
663 | }, | 662 | }, |
664 | error:(error)=>{ | 663 | error:(error)=>{ |
664 | + console.error("检查登录状态:",error) | ||
665 | if(error.status === 401){ | 665 | if(error.status === 401){ |
666 | window.top.location.reload(); | 666 | window.top.location.reload(); |
667 | return; | 667 | return; |
@@ -675,7 +675,7 @@ layui.extend({ | @@ -675,7 +675,7 @@ layui.extend({ | ||
675 | tryIndex = 1; | 675 | tryIndex = 1; |
676 | // 服务异常:服务重启,网络问题等不可访问等因素 | 676 | // 服务异常:服务重启,网络问题等不可访问等因素 |
677 | tryFunc(); | 677 | tryFunc(); |
678 | - }*/ | 678 | + } |
679 | } else { | 679 | } else { |
680 | tryIndex = 1; | 680 | tryIndex = 1; |
681 | tryFunc(); | 681 | tryFunc(); |
@@ -132,7 +132,7 @@ | @@ -132,7 +132,7 @@ | ||
132 | <span class="icon-bg" @click.prevent="getFile(scope.row)"> | 132 | <span class="icon-bg" @click.prevent="getFile(scope.row)"> |
133 | <i class="el-icon-view" title="查看"/> | 133 | <i class="el-icon-view" title="查看"/> |
134 | </span> | 134 | </span> |
135 | - <span class="icon-bg" @click.prevent="aloneHandle(scope.row,'download')"> | 135 | + <span class="icon-bg" v-if="scope.row.type != 'folder'" @click.prevent="aloneHandle(scope.row,'download')"> |
136 | <i class="el-icon-download" title="下载"/> | 136 | <i class="el-icon-download" title="下载"/> |
137 | </span> | 137 | </span> |
138 | <span class="icon-bg" @click.prevent="aloneHandle(scope.row,'delete')"> | 138 | <span class="icon-bg" @click.prevent="aloneHandle(scope.row,'delete')"> |
1 | -<div> | 1 | +<div > |
2 | <!-- 表格--> | 2 | <!-- 表格--> |
3 | - <el-table :border="showBorder" :data="dataList" :default-expand-all="defaultExpand" :expand-row-keys="expands" | ||
4 | - :height="height" :row-key="getRowKeys" :size="size" @select="handleSelect" | ||
5 | - @select-all="handleSelectAll" | ||
6 | - @selection-change="handleSelectionChange" header-row-class-name="tbl-header-class" ref="multipleTable" | ||
7 | - stripe | ||
8 | - style="width: 100%;margin: 0px 0px; font-size:13.5px;" v-loading="loading" | 3 | + <el-table :border="showBorder" v-loading="loading" :size="size" ref="multipleTable" @selection-change="handleSelectionChange" :data="dataList" stripe header-row-class-name="tbl-header-class" :height="height" |
4 | + style="width: 100%;margin: 0px 0px; font-size:13.5px;" :row-key="getRowKeys" :expand-row-keys="expands" :default-expand-all="defaultExpand" | ||
5 | + @select="handleSelect" @select-all="handleSelectAll" | ||
9 | > | 6 | > |
10 | 7 | ||
11 | <el-table-column type="expand" v-if="showExpand"> | 8 | <el-table-column type="expand" v-if="showExpand"> |
12 | <template #default="scope"> | 9 | <template #default="scope"> |
13 | - <slot :scope="scope" name="expand"> | 10 | + <slot name="expand" :scope="scope" > |
14 | 11 | ||
15 | </slot> | 12 | </slot> |
16 | </template> | 13 | </template> |
17 | </el-table-column> | 14 | </el-table-column> |
18 | - <el-table-column align="center" type="selection" v-if="showSelection && columns.length > 0" width="55"/> | ||
19 | - <el-table-column :label="indexLabel" align="center" type="index" v-if="showIndex && columns.length > 0" | ||
20 | - width="50"/> | 15 | + <el-table-column v-if="showSelection && columns.length > 0" align="center" type="selection" width="55" /> |
16 | + <el-table-column v-if="showIndex && columns.length > 0" type="index" :label="indexLabel" align="center" width="80"/> | ||
21 | 17 | ||
22 | - <el-table-column :align="item.align == undefined ? 'center' : item.align " :label="item.label" :prop="item.prop" | ||
23 | - :sortable="item.sortable == undefined ? false : item.sortable" | ||
24 | - :width="getWidth(item.width)" | ||
25 | - v-for="item in columns"> | ||
26 | - <template v-if="!item.columns || item.columns.lendth==0" #default="scope"> | ||
27 | - <slot :column="item" :prop="item.prop" :row="scope.row"> | ||
28 | - <div v-if="typeof(item.click) == 'function' && typeof(item.render) == 'function'"> | ||
29 | - <span @click="item.click(scope.row)" style="cursor: pointer" | ||
30 | - v-html="item.render(scope.row)"></span> | 18 | + <el-table-column v-for="item in columns" :prop="item.prop" :label="item.label" :sortable="item.sortable == undefined ? false : item.sortable" :align="item.align == undefined ? 'center' : item.align " |
19 | + :width="getWidth(item.width)"> | ||
20 | + <template #default="scope"> | ||
21 | + <slot :row="scope.row" :prop="item.prop" :column="item"> | ||
22 | + <div v-if="typeof(item.click) == 'function' && typeof(item.render) == 'function'"> | ||
23 | + <span style="cursor: pointer" @click="item.click(scope.row)" v-html="item.render(scope.row)"></span> | ||
31 | </div> | 24 | </div> |
32 | - <div v-else-if="typeof(item.click) == 'function'"> | ||
33 | - <span @click="item.click(scope.row)" style="cursor: pointer"> {{scope.row[item.prop]}}</span> | 25 | + <div v-else-if="typeof(item.click) == 'function'" > |
26 | + <span style="cursor: pointer" @click="item.click(scope.row)"> {{scope.row[item.prop]}}</span> | ||
34 | </div> | 27 | </div> |
35 | - <div v-else-if="typeof(item.render) == 'function'"> | 28 | + <div v-else-if="typeof(item.render) == 'function'" > |
36 | <span v-html="item.render(scope.row)">{{scope.row[item.prop]}}</span> | 29 | <span v-html="item.render(scope.row)">{{scope.row[item.prop]}}</span> |
37 | </div> | 30 | </div> |
38 | 31 | ||
39 | <span v-else> | 32 | <span v-else> |
40 | - <el-tooltip placement="top"> | ||
41 | - <template #content> | 33 | + <el-tooltip placement="top-start" :disabled="scope.row.isShowTooltip == undefined || scope.row.isShowTooltip == false"> |
34 | + <template #content > | ||
42 | <div v-html="getTextContent(scope.row[item.prop])"> | 35 | <div v-html="getTextContent(scope.row[item.prop])"> |
43 | </div> | 36 | </div> |
44 | </template> | 37 | </template> |
45 | - <div style="overflow: hidden; text-overflow: ellipsis;display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;"> | 38 | + <div class="text-overflow-line2" @mouseenter="tableColMouseenter($event,scope.row)"> |
46 | {{scope.row[item.prop]}} | 39 | {{scope.row[item.prop]}} |
47 | </div> | 40 | </div> |
48 | </el-tooltip> | 41 | </el-tooltip> |
49 | </span> | 42 | </span> |
50 | </slot> | 43 | </slot> |
51 | </template> | 44 | </template> |
52 | - <el-table-column v-else :align="columnItem.align == undefined ? 'center' : columnItem.align " :label="columnItem.label" :prop="columnItem.prop" | ||
53 | - :sortable="columnItem.sortable == undefined ? false : columnItem.sortable" | ||
54 | - :width="getWidth(columnItem.width)" | ||
55 | - v-for="columnItem in item.columns"> | ||
56 | - <template #default="scope"> | ||
57 | - <slot :column="columnItem" :prop="columnItem.prop" :row="scope.row"> | ||
58 | - <div v-if="typeof(columnItem.click) == 'function' && typeof(columnItem.render) == 'function'"> | ||
59 | - <span @click="columnItem.click(scope.row)" style="cursor: pointer" | ||
60 | - v-html="columnItem.render(scope.row)"></span> | ||
61 | - </div> | ||
62 | - <div v-else-if="typeof(columnItem.click) == 'function'"> | ||
63 | - <span @click="columnItem.click(scope.row)" style="cursor: pointer"> {{scope.row[columnItem.prop]}}</span> | ||
64 | - </div> | ||
65 | - <div v-else-if="typeof(columnItem.render) == 'function'"> | ||
66 | - <span v-html="columnItem.render(scope.row)">{{scope.row[columnItem.prop]}}</span> | ||
67 | - </div> | ||
68 | - | ||
69 | - <span v-else> | ||
70 | - <el-tooltip placement="top"> | ||
71 | - <template #content> | ||
72 | - <div v-html="getTextContent(scope.row[columnItem.prop])"> | ||
73 | - </div> | ||
74 | - </template> | ||
75 | - <div style="overflow: hidden; text-overflow: ellipsis;display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;"> | ||
76 | - {{scope.row[columnItem.prop]}} | ||
77 | - </div> | ||
78 | - </el-tooltip> | ||
79 | - </span> | ||
80 | - </slot> | ||
81 | - </template> | ||
82 | - </el-table-column> | ||
83 | </el-table-column> | 45 | </el-table-column> |
84 | 46 | ||
85 | - <el-table-column align="center" label="操作" v-if="showTools && columns.length > 0" width="80"> | 47 | + <el-table-column v-if="showTools && columns.length > 0" fixed="right" label="操作" :width="toolsWith" align="center"> |
86 | <template #default="scope"> | 48 | <template #default="scope"> |
87 | - <slot :scope="scope" name="tools"></slot> | 49 | + <slot name="tools" :scope="scope" ></slot> |
88 | </template> | 50 | </template> |
89 | </el-table-column> | 51 | </el-table-column> |
90 | </el-table> | 52 | </el-table> |
91 | <!-- 分页 --> | 53 | <!-- 分页 --> |
92 | <div style='text-align: left;background-color: white' v-if="showPage"> | 54 | <div style='text-align: left;background-color: white' v-if="showPage"> |
93 | <el-pagination | 55 | <el-pagination |
56 | + @size-change="handleSizeChange" | ||
57 | + @prev-click="prePage" | ||
58 | + @next-click="nextPage" | ||
59 | + @current-change="handleCurrentChange" | ||
94 | :current-page="currentPage" | 60 | :current-page="currentPage" |
95 | - :layout="layout" | ||
96 | - :page-size="pageSize" | ||
97 | :page-sizes="pageSizes" | 61 | :page-sizes="pageSizes" |
98 | - :total="total" | ||
99 | - @current-change="handleCurrentChange" | ||
100 | - @next-click="nextPage" | ||
101 | - @prev-click="prePage" | ||
102 | - @size-change="handleSizeChange"> | 62 | + :page-size="pageSize" |
63 | + :layout="layout" | ||
64 | + :total="total"> | ||
103 | </el-pagination> | 65 | </el-pagination> |
104 | </div> | 66 | </div> |
105 | </div> | 67 | </div> |
@@ -36,7 +36,7 @@ export default { | @@ -36,7 +36,7 @@ export default { | ||
36 | // 分页页码设置 | 36 | // 分页页码设置 |
37 | pageSizes: { | 37 | pageSizes: { |
38 | type: Array, | 38 | type: Array, |
39 | - default: [10, 50, 100, 200, 300, 400] | 39 | + default: [10,50,100, 200, 300, 400] |
40 | }, | 40 | }, |
41 | // 默认展示 | 41 | // 默认展示 |
42 | pageSize: { | 42 | pageSize: { |
@@ -67,46 +67,50 @@ export default { | @@ -67,46 +67,50 @@ export default { | ||
67 | default: [] | 67 | default: [] |
68 | }, | 68 | }, |
69 | // 是否展示加载 | 69 | // 是否展示加载 |
70 | - loading: { | 70 | + loading:{ |
71 | type: Boolean, | 71 | type: Boolean, |
72 | default: false | 72 | default: false |
73 | }, | 73 | }, |
74 | - maxWidth: { | 74 | + maxWidth:{ |
75 | type: Number, | 75 | type: Number, |
76 | default: window.innerWidth | 76 | default: window.innerWidth |
77 | }, | 77 | }, |
78 | - showTools: { | 78 | + showTools:{ |
79 | type: Boolean, | 79 | type: Boolean, |
80 | default: false | 80 | default: false |
81 | }, | 81 | }, |
82 | + toolsWith:{ | ||
83 | + type: Number, | ||
84 | + default: 80 | ||
85 | + }, | ||
82 | // medium / small / mini | 86 | // medium / small / mini |
83 | - size: { | 87 | + size:{ |
84 | type: String, | 88 | type: String, |
85 | default: 'small' | 89 | default: 'small' |
86 | }, | 90 | }, |
87 | - multipleSelection: { | ||
88 | - type: Array, | ||
89 | - default: [] | 91 | + multipleSelection:{ |
92 | + type:Array, | ||
93 | + default:[] | ||
90 | }, | 94 | }, |
91 | //展开行 | 95 | //展开行 |
92 | - showExpand: { | 96 | + showExpand:{ |
93 | type: Boolean, | 97 | type: Boolean, |
94 | default: false | 98 | default: false |
95 | }, | 99 | }, |
96 | //行数据的key | 100 | //行数据的key |
97 | - getRowKeys: { | 101 | + getRowKeys:{ |
98 | type: String, | 102 | type: String, |
99 | default: 'id' | 103 | default: 'id' |
100 | }, | 104 | }, |
101 | //默认展开哪行 | 105 | //默认展开哪行 |
102 | - expands: { | 106 | + expands:{ |
103 | type: Array, | 107 | type: Array, |
104 | default: [] | 108 | default: [] |
105 | }, | 109 | }, |
106 | //是否默认展开所有行 | 110 | //是否默认展开所有行 |
107 | - defaultExpand: { | ||
108 | - type: Boolean, | ||
109 | - default: false | 111 | + defaultExpand:{ |
112 | + type:Boolean, | ||
113 | + default:false | ||
110 | } | 114 | } |
111 | }, | 115 | }, |
112 | data() { | 116 | data() { |
@@ -125,22 +129,22 @@ export default { | @@ -125,22 +129,22 @@ export default { | ||
125 | * 时间:2021/11/16 16:19 | 129 | * 时间:2021/11/16 16:19 |
126 | */ | 130 | */ |
127 | 131 | ||
128 | - let getWidth = (width) => { | ||
129 | - let maxWidth = (function () { | 132 | + let getWidth = (width) =>{ |
133 | + let maxWidth = (function (){ | ||
130 | let cols = props.columns; | 134 | let cols = props.columns; |
131 | - if (cols && cols.length > 0) { | 135 | + if(cols && cols.length > 0){ |
132 | // 求和 | 136 | // 求和 |
133 | let w = 0; | 137 | let w = 0; |
134 | cols.forEach(function (v) { | 138 | cols.forEach(function (v) { |
135 | - w += parseFloat(v.width); | 139 | + w += parseFloat(v.width) ; |
136 | }) | 140 | }) |
137 | 141 | ||
138 | let max = props.maxWidth; | 142 | let max = props.maxWidth; |
139 | - if (props.showTools) { | 143 | + if(props.showTools){ |
140 | max -= 80; | 144 | max -= 80; |
141 | } | 145 | } |
142 | 146 | ||
143 | - if (w < max) { | 147 | + if(w < max){ |
144 | return max / w * width; | 148 | return max / w * width; |
145 | } | 149 | } |
146 | } | 150 | } |
@@ -151,7 +155,7 @@ export default { | @@ -151,7 +155,7 @@ export default { | ||
151 | } | 155 | } |
152 | 156 | ||
153 | 157 | ||
154 | - let callback = () => { | 158 | + let callback = () =>{ |
155 | let params = { | 159 | let params = { |
156 | page: currentPage.value, limit: pageSize.value | 160 | page: currentPage.value, limit: pageSize.value |
157 | } | 161 | } |
@@ -183,7 +187,7 @@ export default { | @@ -183,7 +187,7 @@ export default { | ||
183 | let prePage = (val) => { | 187 | let prePage = (val) => { |
184 | // console.log(`当前页: ${val}`) | 188 | // console.log(`当前页: ${val}`) |
185 | // props.currentPage = val - 1; | 189 | // props.currentPage = val - 1; |
186 | - currentPage.value = val - 1; | 190 | + currentPage.value = val-1; |
187 | callback(); | 191 | callback(); |
188 | } | 192 | } |
189 | 193 | ||
@@ -191,7 +195,7 @@ export default { | @@ -191,7 +195,7 @@ export default { | ||
191 | let nextPage = (val) => { | 195 | let nextPage = (val) => { |
192 | // console.log(`当前页: ${val}`) | 196 | // console.log(`当前页: ${val}`) |
193 | // props.currentPage = val + 1; | 197 | // props.currentPage = val + 1; |
194 | - currentPage.value = val + 1; | 198 | + currentPage.value = val+1; |
195 | callback(); | 199 | callback(); |
196 | } | 200 | } |
197 | 201 | ||
@@ -201,13 +205,13 @@ export default { | @@ -201,13 +205,13 @@ export default { | ||
201 | // }); | 205 | // }); |
202 | 206 | ||
203 | //全选事件 | 207 | //全选事件 |
204 | - let handleSelectionChange = (val) => { | 208 | + let handleSelectionChange=(val)=>{ |
205 | // multipleSelection.value = val | 209 | // multipleSelection.value = val |
206 | emit('selectionChange', val) | 210 | emit('selectionChange', val) |
207 | 211 | ||
208 | } | 212 | } |
209 | //设置默认选中 | 213 | //设置默认选中 |
210 | - let toggleSelection = (rows) => { | 214 | + let toggleSelection=(rows)=> { |
211 | //console.log("rows",rows) | 215 | //console.log("rows",rows) |
212 | proxy.$nextTick(function () { | 216 | proxy.$nextTick(function () { |
213 | //console.log("set",props.dataList,props.multipleSelection) | 217 | //console.log("set",props.dataList,props.multipleSelection) |
@@ -223,18 +227,18 @@ export default { | @@ -223,18 +227,18 @@ export default { | ||
223 | }) | 227 | }) |
224 | } | 228 | } |
225 | 229 | ||
226 | - let getTextContent = (val) => { | ||
227 | - if (val && val != '' && val != null) { | ||
228 | - val = val + ''.replace(/[^\x00-\xff]/g, "$&\x01").replace(/.{50}\x01?/g, "$&<br/>").replace(/\x01/g, ""); | 230 | + let getTextContent = (val) =>{ |
231 | + if(val && val != '' && val != null){ | ||
232 | + val = val+''.replace(/[^\x00-\xff]/g,"$&\x01").replace(/.{50}\x01?/g,"$&<br/>").replace(/\x01/g,""); | ||
229 | } | 233 | } |
230 | - return val; | 234 | + return `<pre>${val}</pre>`; |
231 | 235 | ||
232 | } | 236 | } |
233 | //设置父节点选中后children也选中 | 237 | //设置父节点选中后children也选中 |
234 | - let setChecked = (row) => { | ||
235 | - let arr = []; | ||
236 | - if (row.children) { | ||
237 | - row.children.map(j => { | 238 | + let setChecked=(row)=>{ |
239 | + let arr=[]; | ||
240 | + if(row.children){ | ||
241 | + row.children.map(j=>{ | ||
238 | arr.push(j) | 242 | arr.push(j) |
239 | setChecked(j) | 243 | setChecked(j) |
240 | }) | 244 | }) |
@@ -242,43 +246,67 @@ export default { | @@ -242,43 +246,67 @@ export default { | ||
242 | toggleSelection(arr) | 246 | toggleSelection(arr) |
243 | } | 247 | } |
244 | //勾选数据行的Checkbox事件 | 248 | //勾选数据行的Checkbox事件 |
245 | - let handleSelect = (selection, row) => { | 249 | + let handleSelect=(selection, row)=>{ |
250 | + /* if(selection.some(el=>{ return row[props.getRowKeys] ===el[props.getRowKeys]})){ | ||
251 | + setChecked(row); | ||
252 | + }else{ | ||
253 | + setChecked(row); | ||
254 | + }*/ | ||
246 | setChecked(row); | 255 | setChecked(row); |
247 | 256 | ||
248 | - emit('handleSelect', selection) | 257 | + emit('handleSelect',selection) |
249 | } | 258 | } |
250 | //勾选全选checkbox事件 | 259 | //勾选全选checkbox事件 |
251 | - let handleSelectAll = (selection) => { | ||
252 | - const isSelect = selection.some(el => { | ||
253 | - const tableDataIds = props.dataList.map(j => j[props.getRowKeys]) | 260 | + let handleSelectAll=(selection)=>{ |
261 | + const isSelect=selection.some(el=>{ | ||
262 | + const tableDataIds=props.dataList.map(j=>j[props.getRowKeys]) | ||
254 | return tableDataIds.includes(el.id) | 263 | return tableDataIds.includes(el.id) |
255 | }) | 264 | }) |
256 | - const isCancel = !props.dataList.every(el => { | ||
257 | - const selectIds = selection.map(j => j[props.getRowKeys]) | 265 | + const isCancel=!props.dataList.every(el=>{ |
266 | + const selectIds=selection.map(j=>j[props.getRowKeys]) | ||
258 | return selectIds.includes(el.id) | 267 | return selectIds.includes(el.id) |
259 | }) | 268 | }) |
260 | - if (isSelect) { | 269 | + if(isSelect){ |
261 | setChecked(selection); | 270 | setChecked(selection); |
262 | } | 271 | } |
263 | - if (isCancel) { | ||
264 | - props.dataList.map(el => { | 272 | + if(isCancel){ |
273 | + props.dataList.map(el=>{ | ||
265 | setChecked(el); | 274 | setChecked(el); |
266 | }) | 275 | }) |
267 | } | 276 | } |
268 | 277 | ||
269 | - emit('handleSelectAll', selection) | 278 | + emit('handleSelectAll',selection) |
270 | } | 279 | } |
280 | + | ||
281 | + /** | ||
282 | + * 表格组件,超过2行展示tooltip | ||
283 | + * @param e | ||
284 | + * @param item | ||
285 | + */ | ||
286 | + const tableColMouseenter = (e, item) => { | ||
287 | + const ev = e.target; | ||
288 | + var height = $(ev).scroll().height() | ||
289 | + // 超过2行 46 | ||
290 | + if (height > 45) { | ||
291 | + // 实际高度 > 可视高度 文字溢出 | ||
292 | + item.isShowTooltip = true; | ||
293 | + } else { | ||
294 | + // 否则为不溢出 | ||
295 | + item.isShowTooltip = false; | ||
296 | + } | ||
297 | + } | ||
298 | + | ||
271 | // 挂载完 | 299 | // 挂载完 |
272 | Vue.onMounted(() => { | 300 | Vue.onMounted(() => { |
273 | //callback(); | 301 | //callback(); |
274 | 302 | ||
275 | }) | 303 | }) |
276 | - Vue.watch(() => props.dataList, (newValue, oldValue) => { | ||
277 | - setTimeout(function () { | ||
278 | - if (props.showSelection) { | ||
279 | - toggleSelection(props.multipleSelection) | ||
280 | - } | ||
281 | - }, 100) | 304 | + Vue.watch(()=>props.dataList,(newValue, oldValue)=>{ |
305 | + setTimeout(function (){ | ||
306 | + if(props.showSelection){ | ||
307 | + toggleSelection(props.multipleSelection) | ||
308 | + } | ||
309 | + },100) | ||
282 | 310 | ||
283 | 311 | ||
284 | }) | 312 | }) |
@@ -296,7 +324,8 @@ export default { | @@ -296,7 +324,8 @@ export default { | ||
296 | prePage, | 324 | prePage, |
297 | nextPage, | 325 | nextPage, |
298 | getWidth, | 326 | getWidth, |
299 | - getTextContent | 327 | + getTextContent, |
328 | + tableColMouseenter | ||
300 | } | 329 | } |
301 | } | 330 | } |
302 | } | 331 | } |
@@ -12,6 +12,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -12,6 +12,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
12 | var commonDetail = layui.commonDetail; | 12 | var commonDetail = layui.commonDetail; |
13 | var domainName = common.domainName; | 13 | var domainName = common.domainName; |
14 | var todayStr = ''; | 14 | var todayStr = ''; |
15 | + var knowledgeData = '';//lsq 定义获取告警中心知识库跳转设置数据 2022-08-30 | ||
15 | //对外暴露的接口 | 16 | //对外暴露的接口 |
16 | exports('activewarning', function () { | 17 | exports('activewarning', function () { |
17 | var sessions = layui.sessions; | 18 | var sessions = layui.sessions; |
@@ -48,6 +49,18 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -48,6 +49,18 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
48 | form.render("select"); | 49 | form.render("select"); |
49 | 50 | ||
50 | function initDate() { | 51 | function initDate() { |
52 | + //lsq 获取告警中心知识库跳转设置 2022-08-30 | ||
53 | + if(!knowledgeData){ | ||
54 | + admin.req({ | ||
55 | + url: common.domainName + '/api-web/manage/ddic/findSucDdics/warnKnowledge' | ||
56 | + , method: 'POST' | ||
57 | + , async: false | ||
58 | + }).done(function (res) { | ||
59 | + if(res && res.data && res.data.length>0){ | ||
60 | + knowledgeData=res.data[0]; | ||
61 | + } | ||
62 | + }) | ||
63 | + } | ||
51 | let startMin = {}; | 64 | let startMin = {}; |
52 | let endMax = {}; | 65 | let endMax = {}; |
53 | //开始时间 | 66 | //开始时间 |
@@ -778,8 +791,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -778,8 +791,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
778 | <span lay-tips="{{ d.resName }}" style="margin:0 5px;max-width: 160px;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;display: inline-block;" data-isBus="{{d.isBus}}" data-resid="{{d.resId}}" data-restype="{{d.resType}}" data-warn-zymc="{{d.id}}" data-ip="{{d.ip}}" | 791 | <span lay-tips="{{ d.resName }}" style="margin:0 5px;max-width: 160px;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;display: inline-block;" data-isBus="{{d.isBus}}" data-resid="{{d.resId}}" data-restype="{{d.resType}}" data-warn-zymc="{{d.id}}" data-ip="{{d.ip}}" |
779 | data-resname="{{d.resName}}" data-pingenable="{{d.pingEnable}}" >{{d.resName}}</span> | 792 | data-resname="{{d.resName}}" data-pingenable="{{d.pingEnable}}" >{{d.resName}}</span> |
780 | {{# } }} | 793 | {{# } }} |
781 | - <a class="layui-icon reslist-view-topo hide" data-resid="{{d.resId}}" lay-tips="查看资源拓扑"><i class="iconfont" style="font-size: 20px; | ||
782 | - color: #FEB61E;"></i></a> | 794 | + <a class="layui-icon reslist-view-topo hide" data-resid="{{d.resId}}" lay-tips="查看资源拓扑"></a> |
783 | </div> | 795 | </div> |
784 | </div> | 796 | </div> |
785 | ` | 797 | ` |
@@ -820,8 +832,18 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -820,8 +832,18 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
820 | , {field: 'adminName', title: '负责人', align: 'center', width: 180} | 832 | , {field: 'adminName', title: '负责人', align: 'center', width: 180} |
821 | , {field: 'noticeTime', title: '通知时间', align: 'center', width: 180, hide: true} | 833 | , {field: 'noticeTime', title: '通知时间', align: 'center', width: 180, hide: true} |
822 | , { | 834 | , { |
823 | - title: '操作', align: 'center', minWidth: 100, | ||
824 | - templet: '<div><span data-warn-view="{{d.id}}" class="layui-table-link">查看</span> <span data-warn-path="{{d.id}}" class="layui-table-link">轨迹</span></div>' | 835 | + title: '操作', align: 'center', minWidth: 150, |
836 | + templet: function (row){ | ||
837 | + let knoStr=''; | ||
838 | + if(knowledgeData && knowledgeData.ddicCode.indexOf(':on')!=-1){ | ||
839 | + let dataKno=` data-row='`+JSON.stringify([row])+`'`; | ||
840 | + knoStr=' <span data-warn-knowledge="'+row.id+'" '+dataKno+' class="layui-table-link">知识</span>' | ||
841 | + } | ||
842 | + return '<div><span data-warn-view="'+row.id+'" class="layui-table-link">查看</span>' + | ||
843 | + ' <span data-warn-path="'+row.id+'" class="layui-table-link">轨迹</span>' + | ||
844 | + knoStr + | ||
845 | + '</div>' | ||
846 | + } | ||
825 | } | 847 | } |
826 | ]; | 848 | ]; |
827 | 849 | ||
@@ -1031,6 +1053,30 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -1031,6 +1053,30 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
1031 | }); | 1053 | }); |
1032 | }); | 1054 | }); |
1033 | }); | 1055 | }); |
1056 | + //start lsq 知识库跳转 2022-08-30 | ||
1057 | + $('[data-warn-knowledge]').unbind('click').on('click',function(){ | ||
1058 | + //lsq 行数据 | ||
1059 | + let dataRowStr=$(this).data('row'); | ||
1060 | + let dataRow=dataRowStr[0]; | ||
1061 | + //lsq 配置的path地址 | ||
1062 | + let desc=knowledgeData.ddicDesc; | ||
1063 | + //lsq 获取path路径进行相对应得替换 | ||
1064 | + let descArr=desc.split("?"); | ||
1065 | + let descStr=''; | ||
1066 | + let path=''; | ||
1067 | + if(descArr && descArr.length>1){ | ||
1068 | + path+=descArr[0]+'?'; | ||
1069 | + //lsq path中有参数的部分 | ||
1070 | + descStr=descArr[1]; | ||
1071 | + //lsq 替换${kpiName}... | ||
1072 | + for(let key in dataRow){ | ||
1073 | + descStr= descStr.replace("${"+key+"}",dataRow[key]) | ||
1074 | + } | ||
1075 | + } | ||
1076 | + path+=descStr.replace('${accessToken}',accessToken); | ||
1077 | + window.open(path); | ||
1078 | + }) | ||
1079 | + //end lsq 2022-08-30 | ||
1034 | 1080 | ||
1035 | }); | 1081 | }); |
1036 | //点击严重重要一般统计告警 | 1082 | //点击严重重要一般统计告警 |
-
Please register or login to post a comment