Skip to content

Commit

Permalink
调整审批王中图片后缀函数判断
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzhipei committed Jul 19, 2024
1 parent 33fbdaa commit fa95029
Show file tree
Hide file tree
Showing 13 changed files with 61 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,10 @@ InstanceReadOnlyTemplate.getValue = (value, field, locale, utcOffset) ->
value = _.map records, (item)->
fileName = item.original.name;
fileUrl = Steedos.absoluteUrl('/api/files/files/'+item._id);
match = fileName.match(/\.([^\.]+)$/);
fileType = match[0] || "";
filePreviewHtml = '';
if [".pdf", ".jpg", ".jpeg", ".png", ".gif"].indexOf(fileName.toLowerCase().slice(-4)) > -1
if [".pdf", ".jpg", ".jpeg", ".png", ".gif"].indexOf(fileType) > -1
filePreviewHtml = "&ensp;<a href='#{fileUrl}' target='_blank' class='antd-Link'><span class='antd-TplField'><span>预览</span></span></a>"
return "<div><a href='#{fileUrl+'?download=true'}' target='_blank'>#{fileName}</a> #{filePreviewHtml ? filePreviewHtml : ''}</div>"

Expand Down
8 changes: 5 additions & 3 deletions server/bundle/programs/server/packages/steedos_workflow.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"name": "standard-minifier-js",
"version": "2.6.0"
},
"totalMinifiedBytes": 4307095,
"totalMinifiedGzipBytes": 1085160,
"totalMinifiedBytes": 4306724,
"totalMinifiedGzipBytes": 1085076,
"minifiedBytesByPackage": {
"packages/meteor.js": 9504,
"packages/coffeescript.js": 32,
Expand Down Expand Up @@ -2533,7 +2533,7 @@
}
],
"packages/steedos_creator.js": [
103470,
103083,
{
"node_modules": {
"meteor": {
Expand Down Expand Up @@ -2586,7 +2586,7 @@
"core.coffee": 18669,
"colors.coffee": 1485,
"temp_navs.coffee": 3922,
"router.coffee": 6603,
"router.coffee": 6216,
"tenant.coffee": 283,
"animate.js": 405,
"colResizable-1.6.js": 5920,
Expand Down Expand Up @@ -2663,7 +2663,7 @@
"packages/steedos_autoform-modals.js": 20485,
"packages/steedos_slipjs.js": 15081,
"packages/steedos_workflow.js": [
717754,
717770,
{
"node_modules": {
"meteor": {
Expand Down Expand Up @@ -2706,7 +2706,7 @@
"uuflow_api.js": 14112,
"workflow_manager.js": 13054,
"node_manager.js": 5745,
"instance_readonly_template.coffee": 36908,
"instance_readonly_template.coffee": 36924,
"template_manager.coffee": 5628,
"office_online.js": 5753,
"instance_number_rules.coffee": 455,
Expand Down
18 changes: 9 additions & 9 deletions server/bundle/programs/web.browser.legacy/program.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
"format": "web-program-pre1",
"manifest": [
{
"path": "f068a61a40c0c679ba8a696ddd539e55357f53de.js",
"path": "a49ab12571e71793224d8b37b7b721e34ca5f36d.js",
"where": "client",
"type": "js",
"cacheable": true,
"url": "/f068a61a40c0c679ba8a696ddd539e55357f53de.js?meteor_js_resource=true",
"size": 4307095,
"hash": "f068a61a40c0c679ba8a696ddd539e55357f53de",
"sri": "BHqrjWg7PoRGsCqj3I0KpeoMkBoddYn/NZeJ15u9mfuJSxmVNvMdk0HHkPumZxuBBOwpP4yp6AMd5me/pgFd0g=="
"url": "/a49ab12571e71793224d8b37b7b721e34ca5f36d.js?meteor_js_resource=true",
"size": 4306724,
"hash": "a49ab12571e71793224d8b37b7b721e34ca5f36d",
"sri": "1RXX0QyEqaBVBR6daLZQcE1wVwz+1pvtpM0zYT1icFkKzA+B7B5mePWUdQWtlHlxTzYvRd/j7GsZ56QTCH4TXA=="
},
{
"path": "f068a61a40c0c679ba8a696ddd539e55357f53de.stats.json",
"path": "a49ab12571e71793224d8b37b7b721e34ca5f36d.stats.json",
"where": "client",
"type": "json",
"cacheable": true,
"url": "/f068a61a40c0c679ba8a696ddd539e55357f53de.stats.json?meteor_js_resource=true",
"url": "/a49ab12571e71793224d8b37b7b721e34ca5f36d.stats.json?meteor_js_resource=true",
"size": 92684,
"hash": "76f2b38b50f31c5ceb3eb13e098903bb6c7035e9",
"sri": "A/mQYbdORkzK4S0RCQIvyx6vbEgdiSFyj1ZkecjxXMPDRJ79cOYhQdZUVLkYDz1KY76NfltT9FMmrl87bYES5Q=="
"hash": "8d9ce830ba5cec3b7a47efe50d22346a44e38cc1",
"sri": "RFTNV/xt9C8+v6WtcZEmZ7oKV+UUPwH1DFJDbglcgmJni03ht6rJIWezhna8JWuUwrDt8r6CjEVjAd4NGSlxuQ=="
},
{
"path": "dynamic/node_modules/@steedos/form-builder/dist/form-builder.min.js",
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"name": "standard-minifier-js",
"version": "2.6.0"
},
"totalMinifiedBytes": 4307095,
"totalMinifiedGzipBytes": 1085160,
"totalMinifiedBytes": 4306724,
"totalMinifiedGzipBytes": 1085076,
"minifiedBytesByPackage": {
"packages/meteor.js": 9504,
"packages/coffeescript.js": 32,
Expand Down Expand Up @@ -2533,7 +2533,7 @@
}
],
"packages/steedos_creator.js": [
103470,
103083,
{
"node_modules": {
"meteor": {
Expand Down Expand Up @@ -2586,7 +2586,7 @@
"core.coffee": 18669,
"colors.coffee": 1485,
"temp_navs.coffee": 3922,
"router.coffee": 6603,
"router.coffee": 6216,
"tenant.coffee": 283,
"animate.js": 405,
"colResizable-1.6.js": 5920,
Expand Down Expand Up @@ -2663,7 +2663,7 @@
"packages/steedos_autoform-modals.js": 20485,
"packages/steedos_slipjs.js": 15081,
"packages/steedos_workflow.js": [
717754,
717770,
{
"node_modules": {
"meteor": {
Expand Down Expand Up @@ -2706,7 +2706,7 @@
"uuflow_api.js": 14112,
"workflow_manager.js": 13054,
"node_manager.js": 5745,
"instance_readonly_template.coffee": 36908,
"instance_readonly_template.coffee": 36924,
"template_manager.coffee": 5628,
"office_online.js": 5753,
"instance_number_rules.coffee": 455,
Expand Down
18 changes: 9 additions & 9 deletions server/bundle/programs/web.browser/program.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
"format": "web-program-pre1",
"manifest": [
{
"path": "f068a61a40c0c679ba8a696ddd539e55357f53de.js",
"path": "a49ab12571e71793224d8b37b7b721e34ca5f36d.js",
"where": "client",
"type": "js",
"cacheable": true,
"url": "/f068a61a40c0c679ba8a696ddd539e55357f53de.js?meteor_js_resource=true",
"size": 4307095,
"hash": "f068a61a40c0c679ba8a696ddd539e55357f53de",
"sri": "BHqrjWg7PoRGsCqj3I0KpeoMkBoddYn/NZeJ15u9mfuJSxmVNvMdk0HHkPumZxuBBOwpP4yp6AMd5me/pgFd0g=="
"url": "/a49ab12571e71793224d8b37b7b721e34ca5f36d.js?meteor_js_resource=true",
"size": 4306724,
"hash": "a49ab12571e71793224d8b37b7b721e34ca5f36d",
"sri": "1RXX0QyEqaBVBR6daLZQcE1wVwz+1pvtpM0zYT1icFkKzA+B7B5mePWUdQWtlHlxTzYvRd/j7GsZ56QTCH4TXA=="
},
{
"path": "f068a61a40c0c679ba8a696ddd539e55357f53de.stats.json",
"path": "a49ab12571e71793224d8b37b7b721e34ca5f36d.stats.json",
"where": "client",
"type": "json",
"cacheable": true,
"url": "/f068a61a40c0c679ba8a696ddd539e55357f53de.stats.json?meteor_js_resource=true",
"url": "/a49ab12571e71793224d8b37b7b721e34ca5f36d.stats.json?meteor_js_resource=true",
"size": 92684,
"hash": "76f2b38b50f31c5ceb3eb13e098903bb6c7035e9",
"sri": "A/mQYbdORkzK4S0RCQIvyx6vbEgdiSFyj1ZkecjxXMPDRJ79cOYhQdZUVLkYDz1KY76NfltT9FMmrl87bYES5Q=="
"hash": "8d9ce830ba5cec3b7a47efe50d22346a44e38cc1",
"sri": "RFTNV/xt9C8+v6WtcZEmZ7oKV+UUPwH1DFJDbglcgmJni03ht6rJIWezhna8JWuUwrDt8r6CjEVjAd4NGSlxuQ=="
},
{
"path": "dynamic/node_modules/@steedos/form-builder/dist/form-builder.min.js",
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"name": "standard-minifier-js",
"version": "2.6.0"
},
"totalMinifiedBytes": 4483322,
"totalMinifiedGzipBytes": 1144449,
"totalMinifiedBytes": 4482951,
"totalMinifiedGzipBytes": 1144374,
"minifiedBytesByPackage": {
"packages/meteor.js": 9639,
"packages/coffeescript.js": 32,
Expand Down Expand Up @@ -2266,7 +2266,7 @@
}
],
"packages/steedos_creator.js": [
103695,
103308,
{
"node_modules": {
"meteor": {
Expand Down Expand Up @@ -2319,7 +2319,7 @@
"core.coffee": 18669,
"colors.coffee": 1485,
"temp_navs.coffee": 3922,
"router.coffee": 6603,
"router.coffee": 6216,
"tenant.coffee": 283,
"animate.js": 445,
"colResizable-1.6.js": 5960,
Expand Down Expand Up @@ -2396,7 +2396,7 @@
"packages/steedos_autoform-modals.js": 20485,
"packages/steedos_slipjs.js": 15081,
"packages/steedos_workflow.js": [
719569,
719585,
{
"node_modules": {
"meteor": {
Expand Down Expand Up @@ -2439,7 +2439,7 @@
"uuflow_api.js": 14112,
"workflow_manager.js": 13054,
"node_manager.js": 5745,
"instance_readonly_template.coffee": 36908,
"instance_readonly_template.coffee": 36924,
"template_manager.coffee": 5628,
"office_online.js": 5753,
"instance_number_rules.coffee": 455,
Expand Down
18 changes: 9 additions & 9 deletions server/bundle/programs/web.cordova/program.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
"format": "web-program-pre1",
"manifest": [
{
"path": "bc44fd7ef2120fa57a75da87e4f98388fa3e907f.js",
"path": "e69a498af1c19446aa0fc3945d17f70ef18ef2fa.js",
"where": "client",
"type": "js",
"cacheable": true,
"url": "/__cordova/bc44fd7ef2120fa57a75da87e4f98388fa3e907f.js?meteor_js_resource=true",
"size": 4483322,
"hash": "bc44fd7ef2120fa57a75da87e4f98388fa3e907f",
"sri": "WESeZ0Mc+JZoNua9ifGFUADs8C5VDhlEYjoMmspW1R2oW2MpI0tkIZ2ydh2R0tWTlO0LELfPjBZLIksE8sS0Pw=="
"url": "/__cordova/e69a498af1c19446aa0fc3945d17f70ef18ef2fa.js?meteor_js_resource=true",
"size": 4482951,
"hash": "e69a498af1c19446aa0fc3945d17f70ef18ef2fa",
"sri": "jN0Y/2EI2hRzCjTdShko0YXrEc96RMwXWKFhdEuhJzeHTKDt2/VEPNYi/X/9lAI1o5OyAy4xF2DD2CJdLbslAw=="
},
{
"path": "bc44fd7ef2120fa57a75da87e4f98388fa3e907f.stats.json",
"path": "e69a498af1c19446aa0fc3945d17f70ef18ef2fa.stats.json",
"where": "client",
"type": "json",
"cacheable": true,
"url": "/__cordova/bc44fd7ef2120fa57a75da87e4f98388fa3e907f.stats.json?meteor_js_resource=true",
"url": "/__cordova/e69a498af1c19446aa0fc3945d17f70ef18ef2fa.stats.json?meteor_js_resource=true",
"size": 82586,
"hash": "0b4aa3a527ed903c876f4f0b4074d3cef5fb47b4",
"sri": "WSDeDQR7HWvVvIU3or0F9mwD9YOugD3eEKyM8Bl9w2pAGvJPc0nR7o/5mFBcgkmeUkZ64fZBWqINlYdF95dZAg=="
"hash": "a822380082617e46ef0c12011dc78c53fd012297",
"sri": "4wUVNpZXVAY+X8ANFOLMj3WNSxQzlyYMUisOjEZD//4lXdmecDAQH6PEQaBiCVcUJHyHyNOlr2wFuKXjmMPXOA=="
},
{
"path": "106b9e345091b56401f90f1c9096385cd0758cb4.css",
Expand Down
2 changes: 1 addition & 1 deletion server/bundle/star.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@
"meteorRelease": "[email protected]",
"nodeVersion": "12.16.1",
"npmVersion": "6.13.4",
"gitCommitHash": "81f1dc98639679629104faded433467a982516a3"
"gitCommitHash": "33fbdaa91ff97988dedfb15709e4d4ece015aafa"
}

0 comments on commit fa95029

Please sign in to comment.