Browse Source

表格无数据字段

dev
wenlele 2 years ago
parent
commit
68315e3626
  1. 33
      api/app/lib/controllers/control/toolLink.js
  2. 3
      api/app/lib/routes/control/index.js
  3. BIN
      web/client/assets/images/problem/shield.png
  4. 3
      web/client/src/sections/control/containers/control.jsx
  5. 2
      web/client/src/sections/problem/components/tableData.jsx

33
api/app/lib/controllers/control/toolLink.js

@ -110,6 +110,37 @@ async function del (ctx) {
}
}
async function count (ctx) {
try {
const { models } = ctx.fs.dc;
const { userId, pepUserId , userInfo} = ctx.fs.api
const { clickHouse } = ctx.app.fs
const { utils: { judgeSuper, anxinStrucIdRange } } = ctx.app.fs
const { database: anxinyun } = clickHouse.anxinyun.opts.config
const { pepProjectId } = ctx.request.body
ctx.status = 200;
ctx.body = {}
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
module.exports = {
list, edit, del,
list, edit, del, count
};

3
api/app/lib/routes/control/index.js

@ -11,4 +11,7 @@ module.exports = function (app, router, opts) {
app.fs.api.logAttr['DEL/console/toollink'] = { content: '删除常用工具', visible: true };
router.del('/console/toollink/:linkId', toolLink.del);
app.fs.api.logAttr['GET/console/count'] = { content: '查询告警数量', visible: true };
router.get('/console/count', toolLink.count);
};

BIN
web/client/assets/images/problem/shield.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 868 KiB

3
web/client/src/sections/control/containers/control.jsx

@ -164,7 +164,8 @@ const Control = (props) => {
}
return (11 ? <img src="/assets/images/install/watting.png" alt="" style={{ width: 'calc(100% + 16px)', position: "relative", top: -12, left: -8, }} /> :
return (
11 ? <img src="/assets/images/install/watting.png" alt="" style={{ width: 'calc(100% + 16px)', position: "relative", top: -12, left: -8, }} /> :
<>
<div style={{ padding: '0px 40px', width: '100%' }} className='console'>
{/* 头部 */}

2
web/client/src/sections/problem/components/tableData.jsx

@ -264,7 +264,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
columns={exhibition}
dataSource={route == 'useAbnormal' || route == 'videoAbnormal' ? tableData.slice(query.page * query.limit, (query.page + 1) * query.limit) || [] : tableData}
bordered={false}
empty="暂无数据"
empty={<div><img src="/assets/images/problem/shield.png" style={{ width: 20 }} />暂无告警数据</div>}
style={{}}
pagination={false}
onRow={(record, index) => {

Loading…
Cancel
Save