9.17提交

This commit is contained in:
zoujiandong
2025-09-17 09:24:02 +08:00
parent 7799c04883
commit 8883dded38
14 changed files with 152 additions and 62 deletions
+37 -18
View File
@@ -1,5 +1,5 @@
// case/pages/createCase/createCase.js
import {addCase,caseDetail,editCase,getOssSign,ocrImg} from "../../../api/api"
import {addCase,caseDetail,editCase,getOssSign,ocrImg,getMobileModel} from "../../../api/api"
const dayjs = require("../../../utils/dayjs");
import {throttle} from "../../../utils/util"
import { FileUtil } from '../../../utils/fileutil'
@@ -56,7 +56,7 @@ Page({
fileList_bio:[],
fileList_coa:[],
fileList_inf:[],
dpmas_list:[{fileList:[],treatTime:''}],
dpmas_list:[{fileList:[],treatTime:'',temp_list:[]}],
disable_ziliao:false,
disable_record:false,
disable_check:false,
@@ -912,11 +912,14 @@ Page({
let imgList=item.dpmasImg.split(',');
let objFile="dpmas_list["+index+"].fileList";
let tempFile="dpmas_list["+index+"].temp_list"
let objTime="dpmas_list["+index+"].treatTime"
this.setData({
[objFile]:imgList.map(item1=>{
let newArr=imgList.map(item1=>{
return {url:item1,type:'image',isImage: true}
}),
});
this.setData({
[objFile]:newArr,
[tempFile]:newArr,
[objTime]:item.treatTime?dayjs(item.treatTime).format('YYYY-MM-DD'):''
})
}
@@ -1245,7 +1248,7 @@ Page({
if(dpmas.length<=1){
this.setData({
'case.dpmas':dpmas.concat([obj]),
'dpmas_list':dpmas_list.concat([{fileList:[],treatTime:''}])
'dpmas_list':dpmas_list.concat([{fileList:[],treatTime:'',temp_list:[]}])
})
}
@@ -1459,8 +1462,7 @@ Page({
icon:'none'
})
return false;
}
}
};
if(caseType.length==1 && caseType[0]==1){
if(dpmas.length<=1){
@@ -2216,15 +2218,20 @@ Page({
fileList_inf.push({ url: url,type:'image',isImage: true });
THIS.setData({ fileList_inf});
}else if(name.indexOf("record")!=-1){
let {dpmas_list}=THIS.data;
let recordIndex=Number(name.split("record")[1]);
console.log("recordIndex:"+recordIndex);
let objArr="dpmas_list[" +recordIndex +"]"
let obj="dpmas_list[" +recordIndex +"].fileList"
if(!(THIS.data.dpmas_list[recordIndex])){
console.log(333)
THIS.setData({
[objArr]:{fileList:[],treatTime:''}
})
let obj="dpmas_list[" +recordIndex +"].fileList";
let tempObj="dpmas_list[" +recordIndex +"].temp_list"
try {
if(!(dpmas_list[recordIndex])){
THIS.setData({
[objArr]:{fileList:[],treatTime:'',temp_list:[]}
})
}
} catch (error) {
}
THIS.setData({
[obj]:THIS.data.dpmas_list[recordIndex].fileList.concat([{ url: url,type:'image',isImage: true}])
@@ -2271,13 +2278,14 @@ Page({
showPaint:true
})
console.log(file)
// let fileArr=[file]
// wx.showLoading({
// title: '图片上传中',
// mask: true
// })
// var promiseFun = [];
// for (let i = 0; i < file.length; i++) {
// var cur_file = file[i].url;
// for (let i = 0; i < fileArr.length; i++) {
// var cur_file = fileArr[i].url;
// promiseFun.push(
// this.uploadImg(cur_file,name)
// )
@@ -2299,6 +2307,17 @@ Page({
// wx.hideLoading();
// });
},
getModal(){
const deviceInfo = wx.getDeviceInfo();
const accountInfo = wx.getAccountInfoSync();
console.log(accountInfo); // 输出当前小程序的版本号
console.log(deviceInfo);
getMobileModel({
mod:'型号:'+deviceInfo.brand +' 设备型号:'+deviceInfo.model+' 操作系统:'+deviceInfo.system +' 线上小程序版本号:' +accountInfo.miniProgram.version
}).then(res=>{
})
},
/**
* 生命周期函数--监听页面加载
*/
@@ -2335,7 +2354,7 @@ Page({
})
}
}
// console.log(this.data.case)
},
@@ -2350,7 +2369,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
this.getModal();
},
/**
+6 -2
View File
@@ -497,10 +497,14 @@
<view class="red rederror">
上传照片请进行隐私信息脱敏
</view>
<view class="uploadbox">
<van-uploader file-list="{{ dpmas_list[index].fileList}}" bind:delete="deleteImg"
<view class="uploadbox" >
<van-uploader file-list="{{dpmas_list[index].fileList}}" bind:delete="deleteImg"
readonly="{{dpmas_list[index].fileList.length>=3}}" max-count="3" name="{{'record'+index}}" show-upload="{{showSaveBtn}}" deletable="{{showSaveBtn}}" bind:after-read="afterRead" upload-text="上传" upload-icon="{{img_host+'/upload.png'}}" />
</view>
<!-- <view class="uploadbox" wx:else>
<van-uploader file-list="{{dpmas_list[index].temp_list}}" bind:delete="deleteImg"
readonly="{{dpmas_list[index].temp_list.length>=3}}" max-count="3" name="{{'record'+index}}" show-upload="{{showSaveBtn}}" deletable="{{showSaveBtn}}" bind:after-read="afterRead" upload-text="上传" upload-icon="{{img_host+'/upload.png'}}" />
</view> -->
</view>
</view>
<view class="addrecord" bind:tap="addRecord" wx:if="{{showSaveBtn}}">