明树Git Lab

Commit 765f4d85 authored by zfp1's avatar zfp1

1

parent c359a449
Pipeline #106466 passed with stage
in 3 seconds
...@@ -431,7 +431,7 @@ async function getTzhpjInfo(req, res, next) { ...@@ -431,7 +431,7 @@ async function getTzhpjInfo(req, res, next) {
tzhpj.hpjbg = tzhpj.hpjbg.map(o => { return fileMap[o] }); tzhpj.hpjbg = tzhpj.hpjbg.map(o => { return fileMap[o] });
tzhpj.qsmzqpj = tzhpj.qsmzqpj.map(o => { return fileMap[o] }); tzhpj.qsmzqpj = tzhpj.qsmzqpj.map(o => { return fileMap[o] });
tzhpj.tzhpjwtzgs = await DB.ThTzhpjwtzg.findAll({ where: { projectId: tzhpj.projectId,sourceId: req.body.id }, raw: true }); tzhpj.tzhpjwtzgs = await DB.ThTzhpjwtzg.findAll({ where: { projectId: tzhpj.projectId,sourceId: req.body.id }});
return res.sendData(tzhpj); return res.sendData(tzhpj);
} catch (error) { } catch (error) {
next(error); next(error);
......
...@@ -36,6 +36,10 @@ const ThTzhpjwtzg = sequelize.define('ThTzhpjwtzg', { ...@@ -36,6 +36,10 @@ const ThTzhpjwtzg = sequelize.define('ThTzhpjwtzg', {
zgqx: { zgqx: {
type: DataTypes.DATE, type: DataTypes.DATE,
comment: "整改期限", comment: "整改期限",
get() {
const rawValue = this.getDataValue('zgqx');
return rawValue ? moment(rawValue).format('YYYY-MM-DD HH:mm:ss') : '';
}
}, },
sfgb: { sfgb: {
type: DataTypes.STRING, type: DataTypes.STRING,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment