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, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "建设单位", comment: "业主单位",
primaryKey: false, primaryKey: false,
field: "build_unit", field: "build_unit",
autoIncrement: false autoIncrement: false
@ -101,7 +101,7 @@ module.exports = dc => {
type: DataTypes.BOOLEAN, type: DataTypes.BOOLEAN,
allowNull: false, allowNull: false,
defaultValue: null, defaultValue: null,
comment: null, comment: "是否已完成",
primaryKey: false, primaryKey: false,
field: "done", field: "done",
autoIncrement: false autoIncrement: false
@ -137,7 +137,7 @@ module.exports = dc => {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "质量检测单位", comment: "质量监督单位",
primaryKey: false, primaryKey: false,
field: "qutity_unit", field: "qutity_unit",
autoIncrement: false 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.build_unit IS '业主单位';
COMMENT ON COLUMN project.qutity_unit COMMENT IS '质量监督单位'; COMMENT ON COLUMN project.qutity_unit IS '质量监督单位';
COMMENT ON COLUMN project.done COMMENT 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' }}> <div style={{ display: 'flex', width: '100%', justifyContent: 'space-between', margin: '12px 0' }}>
<span style={{ fontSize: 16, color: 'gray', minWidth: '26%' }}>{obj.key}</span> <span style={{ fontSize: 16, color: 'gray', minWidth: '26%' }}>{obj.key}</span>
{ {
obj.name != 'scenePic' && obj.name != 'handlePic' ? obj.name != 'scenePic' && obj.name != 'handlePic' ?
<Input <Input
style={{ width: '70%' }} style={{ width: '70%' }}
@ -86,7 +84,14 @@ const DetailForm = (props) => {
return <div style={{ width: '44%', margin: 6 }}> return <div style={{ width: '44%', margin: 6 }}>
<Image src={qndmn + '/' + imgSrc} width={'100%'} style={{ marginBottom: 4 }} /> <Image src={qndmn + '/' + imgSrc} width={'100%'} style={{ marginBottom: 4 }} />
</div> </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> </div>

Loading…
Cancel
Save