diff --git a/api/app/lib/controllers/alarm/data.js b/api/app/lib/controllers/alarm/data.js
index 68cd57e..00c969e 100644
--- a/api/app/lib/controllers/alarm/data.js
+++ b/api/app/lib/controllers/alarm/data.js
@@ -128,16 +128,19 @@ async function list (ctx) {
`).toPromise() :
[];
- const alarmDetailCount = await clickHouse.dataAlarm.query(`
+ const detailCountAlarm = alarmRes
+ .map(ar => "'" + ar.AlarmId + "'")
+ const alarmDetailCount = detailCountAlarm.length ? await clickHouse.dataAlarm.query(`
SELECT
count(Time) AS count, AlarmId
FROM
alarm_details
WHERE
- AlarmId IN (${confirmedAlarm.join(',')})
+ AlarmId IN (${detailCountAlarm.join(',')})
AND AlarmState < 3
GROUP BY AlarmId
- `).toPromise()
+ `).toPromise() :
+ []
alarmRes.forEach(ar => {
diff --git a/api/app/lib/controllers/alarm/video.js b/api/app/lib/controllers/alarm/video.js
new file mode 100644
index 0000000..8bff5e7
--- /dev/null
+++ b/api/app/lib/controllers/alarm/video.js
@@ -0,0 +1,30 @@
+'use strict';
+
+async function alarmList (ctx) {
+ try {
+ const { models } = ctx.fs.dc;
+ const { clickHouse } = ctx.app.fs
+
+ // const alarmRes= await clickHouse.vcmp.query(`
+ // SELECT
+ // *
+ // FROM
+ // camera_status_alarm
+ // LEFT JOIN
+
+ // `).toPromise()
+
+ 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 = {
+
+};
\ No newline at end of file
diff --git a/web/client/index.ejs b/web/client/index.ejs
index a2612bd..9cbe876 100644
--- a/web/client/index.ejs
+++ b/web/client/index.ejs
@@ -5,7 +5,7 @@
-
+