|
|
@@ -19,11 +19,6 @@
|
|
|
<text class="upload-card-title">拍照上传</text>
|
|
|
<text class="upload-card-desc">拍摄纸质报告或舌象</text>
|
|
|
</view>
|
|
|
- <view class="upload-card card-folder" @click="pickFromFolder">
|
|
|
- <view class="upload-card-icon">📁</view>
|
|
|
- <text class="upload-card-title">从文件夹选取</text>
|
|
|
- <text class="upload-card-desc">手机本地文件</text>
|
|
|
- </view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 采集中面板 -->
|
|
|
@@ -172,8 +167,7 @@ export default {
|
|
|
this.ensureAgreed(function() {
|
|
|
uni.chooseMessageFile({
|
|
|
count: 1,
|
|
|
- type: 'file',
|
|
|
- extension: ['pdf'],
|
|
|
+ type: 'all',
|
|
|
success: function(res) {
|
|
|
var files = res.tempFiles
|
|
|
if (files && files.length > 0) {
|
|
|
@@ -200,33 +194,6 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- pickFromFolder: function() {
|
|
|
- var self = this
|
|
|
- this.ensureAgreed(function() {
|
|
|
- uni.chooseMessageFile({
|
|
|
- count: 1,
|
|
|
- type: 'file',
|
|
|
- success: function(res) {
|
|
|
- var files = res.tempFiles
|
|
|
- if (files && files.length > 0) {
|
|
|
- self.uploadReport(files[0].path, files[0].name || '本地文件')
|
|
|
- }
|
|
|
- },
|
|
|
- fail: function() {
|
|
|
- // 降级到相册
|
|
|
- uni.chooseImage({
|
|
|
- count: 1,
|
|
|
- sourceType: ['album'],
|
|
|
- success: function(res) {
|
|
|
- if (res.tempFilePaths && res.tempFilePaths.length > 0) {
|
|
|
- self.uploadReport(res.tempFilePaths[0], '相册文件')
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
uploadReport: function(filePath, fileName) {
|
|
|
if (!filePath) return
|
|
|
var self = this
|
|
|
@@ -429,15 +396,6 @@ export default {
|
|
|
color: #fff;
|
|
|
}
|
|
|
|
|
|
-.card-folder {
|
|
|
- background: #F0FDF4;
|
|
|
- border: 2rpx dashed #86EFAC;
|
|
|
-}
|
|
|
-.card-folder .upload-card-icon {
|
|
|
- background: linear-gradient(135deg, #22C55E, #16A34A);
|
|
|
- color: #fff;
|
|
|
-}
|
|
|
-
|
|
|
/* 采集中面板 */
|
|
|
.collecting-panel {
|
|
|
margin-bottom: 20rpx;
|