Browse Source

feat:图片显示+导出

dev
zhaobing 2 years ago
parent
commit
864ce66b6a
  1. 6
      api/app/lib/models/project.js
  2. 6
      scripts/1.2.3/schema/7.update_project.sql
  3. 9
      web/client/src/sections/fillion/components/patrolTable.js

6
api/app/lib/models/project.js

@ -47,7 +47,7 @@ module.exports = dc => {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "建设单位",
comment: "业主单位",
primaryKey: false,
field: "build_unit",
autoIncrement: false
@ -101,7 +101,7 @@ module.exports = dc => {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: null,
comment: null,
comment: "是否已完成",
primaryKey: false,
field: "done",
autoIncrement: false
@ -137,7 +137,7 @@ module.exports = dc => {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "质量检测单位",
comment: "质量监督单位",
primaryKey: false,
field: "qutity_unit",
autoIncrement: false

6
scripts/1.2.3/schema/7.update_project.sql

@ -1,8 +1,8 @@
COMMENT ON COLUMN project.build_unit COMMENT IS '业主单位';
COMMENT ON COLUMN project.qutity_unit COMMENT IS '质量监督单位';
COMMENT ON COLUMN project.done COMMENT IS '是否已完成';
COMMENT ON COLUMN project.build_unit IS '业主单位';
COMMENT ON COLUMN project.qutity_unit IS '质量监督单位';
COMMENT ON COLUMN project.done IS '是否已完成';

9
web/client/src/sections/fillion/components/patrolTable.js

@ -64,8 +64,6 @@ const DetailForm = (props) => {
<div style={{ display: 'flex', width: '100%', justifyContent: 'space-between', margin: '12px 0' }}>
<span style={{ fontSize: 16, color: 'gray', minWidth: '26%' }}>{obj.key}</span>
{
obj.name != 'scenePic' && obj.name != 'handlePic' ?
<Input
style={{ width: '70%' }}
@ -86,7 +84,14 @@ const DetailForm = (props) => {
return <div style={{ width: '44%', margin: 6 }}>
<Image src={qndmn + '/' + imgSrc} width={'100%'} style={{ marginBottom: 4 }} />
</div>
}) : data.handlePic && data.handlePic instanceof Array ? data.handlePic.map(imgSrc => {
return <div style={{ width: '44%', margin: 6 }}>
<Image src={qndmn + '/' + imgSrc} width={'100%'} style={{ marginBottom: 4 }} />
</div>
}) : '暂无图片'
}
</div>

Loading…
Cancel
Save