Socket
Socket
Sign inDemoInstall

koa-rtapi

Package Overview
Dependencies
6
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.55 to 1.1.56

4

code/api/coder.api.js

@@ -65,3 +65,3 @@ 'use strict';

// 获取tables
let sql1 = "SELECT * FROM information_schema.TABLES WHERE table_schema=database()";
let sql1 = "SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA=database()";
if (body.hd) {

@@ -74,3 +74,3 @@ sql1 += ` AND TABLE_NAME like '${body.hd}%'`

for (let table of tables) {
const sql2 = `SELECT * FROM information_schema.COLUMNS WHERE table_name='${table.TABLE_NAME}'`;
const sql2 = `SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=database() AND table_name='${table.TABLE_NAME}'`;
table.COLUMNS = await new Access(body).query(sql2);

@@ -77,0 +77,0 @@ }

@@ -31,3 +31,3 @@ /*<%#

// <%# const nick = (c.COLUMN_COMMENT || name).substr(0,20); %>
{ field: '<%= name %>', name: '<%= nick %>', show: true, sortEnable: false, width: 200 },
{ field: '<%= name %>', name: '<%= nick %>', show: true, sortEnable: false, type: '<%= c.COLUMN_TYPE %>', width: 200 },
// <%# } %>

@@ -45,3 +45,3 @@ ],

.setCondition('<%= c.COLUMN_NAME %>', '<%= c.COLUMN_NAME %>=?') // <%= c.COLUMN_COMMENT %>
// <%# } %>
// <%# } %>

@@ -57,6 +57,11 @@ return result;

// <%# if (c.COLUMN_KEY === 'PRI') { continue; } %>
'<%= c.COLUMN_NAME %>': t.value(body['<%= c.COLUMN_NAME %>']), // <%= c.COLUMN_COMMENT %>
// <%# const cname = c.COLUMN_NAME; %>
// <%# if (/time|date/i.test(c.DATA_TYPE)) { %>
'<%= cname %>': new Date(t.value(body['<%= cname %>'])), // <%= c.COLUMN_COMMENT %>
// <%# } else { %>
'<%= cname %>': t.value(body['<%= cname %>']), // <%= c.COLUMN_COMMENT %>
// <%# } %>
// <%# } %>
};
}
}

@@ -51,5 +51,15 @@

var para = { id: id };
var fields = t.Context.para.fields || []; // 字段配置
t.Modal.post('@find', para).done(function (result) {
for (var k in t.row) {
t.row[k] = result[k];
var v = result[k];
// 处理时间
var f = fields.find(n => n.field === k);
if (f && /time|date/i.test(f.type)) {
v = xf.date(new Date(v), 'yyyy-MM-dd HH:mm:ss')
}
t.row[k] = v;
}

@@ -86,6 +96,6 @@ });

var all = this.$el.querySelectorAll('[disabled]');
for (var i = 0; i < all.length; i++) {
all[i].disabled = false;
}
var all = this.$el.querySelectorAll('[disabled]');
for (var i = 0; i < all.length; i++) {
all[i].disabled = false;
}

@@ -92,0 +102,0 @@ }

@@ -421,2 +421,9 @@

var v = row[field];
// 处理时间
var f = t.fields.find(n => n.field === field);
if (f && /time|date/i.test(f.type)) {
v = xf.date(new Date(v), 'yyyy-MM-dd HH:mm:ss')
}
if (typeof v !== 'string') { return v; }

@@ -423,0 +430,0 @@

{
"name": "koa-rtapi",
"version": "1.1.55",
"version": "1.1.56",
"description": "koa api in rtworld company",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc