去掉微信上传图片组件

This commit is contained in:
曹磊 2024-04-07 10:32:54 +08:00
parent b40700bbd2
commit 0d73440d89
15 changed files with 616 additions and 555 deletions

View File

@ -8,19 +8,19 @@ Page({
onLoad: function (options) {
//...
},
uploadPhoto() {
var that = this;
wx.chooseImage({
count: 1, // 9
sizeType: ['compressed'], //
sourceType: ['album', 'camera'], //
success: function (res) {
// tempFilePathimgsrc
var tempFilePaths = res.tempFilePaths;
upload(that, tempFilePaths);
}
})
}
<!-- uploadPhoto() {-->
<!-- var that = this;-->
<!-- wx.chooseImage({-->
<!-- count: 1, // 9-->
<!-- sizeType: ['compressed'], // -->
<!-- sourceType: ['album', 'camera'], // -->
<!-- success: function (res) {-->
<!--// tempFilePathimgsrc-->
<!-- var tempFilePaths = res.tempFilePaths;-->
<!-- upload(that, tempFilePaths);-->
<!-- }-->
<!-- })-->
<!-- }-->
})
function upload(page, path) {

View File

@ -23,17 +23,17 @@ export default {
uploadImg(){
console.log('aaaaaaaaa');
let that = this;
wx.chooseImage({
count: that.max || 3,//
sizeType: ['original', 'compressed'],//
sourceType: ['album', 'camera'],//
success: function (res) {
res.tempFilePaths.forEach(v=>{
that.urls.push(v);
});
that.$emit("choosed",{all:that.urls,currentUpload:res.tempFilePaths});//allcurrentUpload
}
})
// wx.chooseImage({
// count: that.max || 3,//
// sizeType: ['original', 'compressed'],//
// sourceType: ['album', 'camera'],//
// success: function (res) {
// res.tempFilePaths.forEach(v=>{
// that.urls.push(v);
// });
// that.$emit("choosed",{all:that.urls,currentUpload:res.tempFilePaths});//allcurrentUpload
// }
// })
},
//
previewImg(index){

View File

@ -174,7 +174,7 @@
</div>
</td>
<td v-if="userId == '1' || userId == '10'" class="trTd" style="width: 10%;text-align: center">
{{ item.outPayee ? item.outPayee : '暂无' }}
{{ item.outPayeeStr ? item.outPayeeStr : '暂无' }}
</td>
<!-- <td class="trTd" style="width: 14%;text-align: center">-->
<!-- {{ item.outPayeeAddress ? item.outPayeeAddress : "暂无" }}-->
@ -197,12 +197,12 @@
<view class="paging" style="display: flex;justify-content: space-between;align-items: center">
<view class="page_btn">
<!-- <view class="up_page" v-if="frontPage" @click="clickFront">上一页</view>-->
<button v-if="frontPage" type="button" size="mini" style="width: 100%;height: 100%;background-color: #FF00FF;color: white;font-size: 12px;padding-top:2px;" @click="clickFront">上一页</button>
<button v-if="frontPage" type="button" size="mini" style="width: 100%;height: 100%;background-color: #FF00FF;color: white;font-size: 10px;padding-top:2px;" @click="clickFront">上一页</button>
</view>
<view class="page_num">{{thisPages}} {{pages}}</view>
<view class="page_btn">
<!-- <view class="down_page" v-if="nextPage" @click="clickNext">下一页</view>-->
<button v-if="nextPage" type="button" size="mini" style="width: 100%;height: 100%;background-color: #FF00FF;color: white;font-size: 12px;padding-top:2px;" @click="clickNext">下一页</button>
<button v-if="nextPage" type="button" size="mini" style="width: 100%;height: 100%;background-color: #FF00FF;color: white;font-size: 10px;padding-top:2px;" @click="clickNext">下一页</button>
</view>
</view>
@ -842,17 +842,20 @@ export default {
this.dataFormZCCX.nowYear = e.mp.detail.value;
this.dataFormZCCX.startTime = "";
this.dataFormZCCX.endTime = "";
this.thisPages = 1;
this.searchZCCXList();
} else if (num == 2) {
this.dataFormZCCX.nowYear = "";
this.dataFormZCCX.startTime = e.mp.detail.value;
if (this.dataFormZCCX.startTime !== undefined && this.dataFormZCCX.endTime !== undefined) {
this.thisPages = 1;
this.searchZCCXList();
}
} else if (num == 3) {
this.dataFormZCCX.nowYear = "";
this.dataFormZCCX.endTime = e.mp.detail.value;
if (this.dataFormZCCX.startTime !== undefined && this.dataFormZCCX.endTime !== undefined) {
this.thisPages = 1;
this.searchZCCXList();
}
} else if (num == 11) {
@ -1021,6 +1024,7 @@ export default {
//-
this.dataFormZCCX.jsdw = e.label;
this.dataFormZCCX.jsdwId = e.value[0];
this.thisPages = 1;
this.searchZCCXList();
} else if (this.flag == 2) {
//-
@ -1031,6 +1035,7 @@ export default {
this.dataFormZCCX.gclbId = this.dataFormZCCX.gclbId + "," + e.value[0];
this.dataFormZCCX.gclb = this.dataFormZCCX.gclb + "," + e.label;
}
this.thisPages = 1;
this.searchZCCXList();
} else if (this.flag == 3) {
//
@ -1050,6 +1055,7 @@ export default {
this.dataFormZCCX.writeUserStr = e.label;
this.dataFormZCCX.writeUserId = e.value[0];
// console.log(""+this.dataFormZCCX.writeUserId)
this.thisPages = 1;
this.searchZCCXList();
}
if (this.flag == 6) {
@ -1443,6 +1449,7 @@ export default {
};
this.dataListZCCX = [];
this.dataTJList = [];
this.thisPages = 1;
this.searchZCCXList();
this.$forceUpdate();
},

View File

@ -1,20 +1,7 @@
<template>
<div @click="clickHandle">
<div class="userinfo" @click="bindViewTap">
<img class="userinfo-avatar" v-if="userInfo.avatarUrl" :src="userInfo.avatarUrl" background-size="cover" />
<img class="userinfo-avatar" src="/static/images/user.png" background-size="cover" />
<div class="userinfo-nickname">
<card :text="userInfo.nickName"></card>
</div>
</div>
<div class="usermotto">
<div class="user-motto">
<card :text="motto"></card>
</div>
</div>
<form class="form-container">
<input type="text" class="form-control" :value="motto" placeholder="v-model" />
@ -85,9 +72,9 @@ export default {
border-radius: 50%;
}
.userinfo-nickname {
color: #aaa;
}
/*.userinfo-nickname {*/
/* color: #aaa;*/
/*}*/
.usermotto {
margin-top: 150px;

View File

@ -795,66 +795,66 @@ export default {
/***************************** 弹框选择部分 ********************************/
/***************************** 发票照片部分 ********************************/
chooseImage(num) {
var that = this;
let tempFilePaths;
let photoName;
let flag;
wx.chooseImage({
count: 1, // 9
sizeType: ['original', 'compressed'], //
sourceType: ['album', 'camera'], //
success: function (res) {
if (num === 1) {
// tempFilePathimgsrc
that.files = []//
that.files = that.files.concat(res.tempFilePaths)
photoName = "auth_pics";
flag = 1;
tempFilePaths = that.files[0]
//console.log(res.tempFiles[0].size / 1024);
wx.showToast({
icon: "loading",
title: "正在上传"
});
}
if (flag === 1) {
wx.uploadFile({
url: that.$http.adornUrl("/sys/oss/upload"),
filePath: tempFilePaths,
name: "file",
header: {"Content-Type": "multipart/form-data", "token": wx.getStorageSync('token')},
formData:
{
categoryType: 'invoice',
},
success: function (res) {
if (res.statusCode !== 200) {
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
return;
} else {
that.dataForm.contractJxfpPhoto = JSON.parse(res.data).data;
}
},
fail: function (e) {
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
},
complete: function () {
wx.hideToast(); //Toast
}
})
}
}
})
},
// chooseImage(num) {
// var that = this;
// let tempFilePaths;
// let photoName;
// let flag;
// wx.chooseImage({
// count: 1, // 9
// sizeType: ['original', 'compressed'], //
// sourceType: ['album', 'camera'], //
// success: function (res) {
// if (num === 1) {
// // tempFilePathimgsrc
// that.files = []//
// that.files = that.files.concat(res.tempFilePaths)
// photoName = "auth_pics";
// flag = 1;
// tempFilePaths = that.files[0]
// //console.log(res.tempFiles[0].size / 1024);
// wx.showToast({
// icon: "loading",
// title: ""
// });
// }
// if (flag === 1) {
// wx.uploadFile({
// url: that.$http.adornUrl("/sys/oss/upload"),
// filePath: tempFilePaths,
// name: "file",
// header: {"Content-Type": "multipart/form-data", "token": wx.getStorageSync('token')},
// formData:
// {
// categoryType: 'invoice',
// },
// success: function (res) {
// if (res.statusCode !== 200) {
// wx.showModal({
// title: '',
// content: '',
// showCancel: false
// })
// return;
// } else {
// that.dataForm.contractJxfpPhoto = JSON.parse(res.data).data;
// }
// },
// fail: function (e) {
// wx.showModal({
// title: '',
// content: '',
// showCancel: false
// })
// },
// complete: function () {
// wx.hideToast(); //Toast
// }
// })
// }
// }
// })
// },
//
predivImage(e, num) {
let urlsImg;

View File

@ -427,11 +427,11 @@ export default {
this.recipientList.forEach((item) => {
if (!this.dataOForm.outPayee) {
// this.pickerValueArray.push({value: item.dictId, label: item.name})
if(item.name == "侯德生" || item.name == "侯吉庆" || item.name == "李现举") {
if(item.name == "侯德生" || item.name == "侯吉庆" || item.name == "李现举" || item.name == "肖爽") {
this.pickerValueArray.push({value: item.dictId, label: item.name})
}
} else if (item.dictId !== this.dataOForm.outPayee) {
if(item.name == "侯德生" || item.name == "侯吉庆" || item.name == "李现举") {
if(item.name == "侯德生" || item.name == "侯吉庆" || item.name == "李现举" || item.name == "肖爽") {
this.pickerValueArray.push({value: item.dictId, label: item.name})
}
}
@ -627,7 +627,19 @@ export default {
}
})
}*/
console.log("*-*-*-*-*-*-*-*-",this.dataOIForm)
if (this.dataOIForm.outinTdayIncome !== null && this.dataOIForm.outinTdayIncome !== undefined && this.dataOIForm.outinTdayIncome !== 0 ) {
if(this.dataOIForm.outType==null || this.dataOIForm.outType == undefined || this.dataOIForm.outType == '' ){
wx.showToast({
title: '请选择收入类别',
icon: 'none',
duration: 4000//
})
return;
}
}
//console.log("*-*-*-*-*-*-*-*-",this.dataOIForm)
if(this.dataOIForm.outinDate){
this.$http.request({
url: this.$http.adornUrl('/business/businessoutlayincome/save'),

View File

@ -219,7 +219,7 @@
<span v-else>{{ itemCh.project }}</span>
</div>
</td>
<td v-if="authenticName == '侯吉光' || authenticName == '管理员'" class="trTd" style="width: 6%;"><span>{{ item.outPayee ? item.outPayee:' ' }}</span></td>
<td v-if="authenticName == '侯吉光' || authenticName == '管理员'" class="trTd" style="width: 6%;"><span>{{ item.outPayeeStr ? item.outPayeeStr:' ' }}</span></td>
<!-- <td class="trTd" style="width: 15%;">{{ item.outPayeeAddress !== null ? item.outPayeeAddress : '' }}</td>-->
<!-- <td class="trTd" style="width: 8%;">{{ item.outPayeePhone !== null ? item.outPayeePhone : '' }}</td>-->
<!-- <td class="trTd" style="width: 15%;">{{ item.outRemark !== null ? item.outRemark : '' }}</td>-->
@ -252,7 +252,7 @@
<span v-else>{{ itemCh.project }}</span>
</div>
</td>
<td v-if="authenticName == '侯吉光' || authenticName == '管理员'" class="trTd" style="width: 6%;"><span>{{ item.outPayee ? item.outPayee:' ' }}</span></td>
<td v-if="authenticName == '侯吉光' || authenticName == '管理员'" class="trTd" style="width: 6%;"><span>{{ item.outPayeeStr ? item.outPayeeStr:' ' }}</span></td>
<!-- <td class="trTd" style="width: 15%;">{{ item.outPayeeAddress !== null ? item.outPayeeAddress : '' }}</td>-->
<!-- <td class="trTd" style="width: 8%;">{{ item.outPayeePhone !== null ? item.outPayeePhone : '' }}</td>-->
<!-- <td class="trTd" style="width: 15%;">{{ item.outRemark !== null ? item.outRemark : '' }}</td>-->

View File

@ -3,6 +3,15 @@
<div style="padding: 0 0 10% 4%;width: 92%">
<div style="background-color: white;border-radius: 10px;padding: 5% 5% 5% 5%;min-height: 78vh">
<!-- 自动生成属性信息-->
<div class="bt" style="display: flex;min-height: 10px;">
<div style="text-align: left;padding: 2% 0 1% 4%;width: 40%">施工时间:</div>
<div style="width: 50%">
<input disabled placeholder=" " style="text-align: left"
v-model="dataForm.planTime"></input>
</div>
</div>
<div style="font-size: 12px">
<div v-if="!approvalShow" style="text-align: left;padding: 6% 0 1% 1%;font: bold 14px 新宋体">自动生成属性信息</div>
<div v-else style="text-align: left;padding: 6% 0 1% 1%;font: bold 14px 新宋体">自动生成属性信息</div>
@ -98,7 +107,7 @@
<!-- 施工人员-->
<div style="margin-top: 10%">
<div style="padding: 1% 0">
4.施工人员: {{seletPersion}}
4.施工人员: <div v-html="seletPersion"></div>
</div>
</div>
@ -106,12 +115,12 @@
</div>
<!-- 施工内容-->
<div style="font-size: 14px">
<div v-if="!approvalShow" style="text-align: left;padding: 8% 0 0 2%;font: bold 14px 新宋体">施工内容</div>
<div v-else style="text-align: left;padding: 8% 0 0 2%;font: bold 14px 新宋体">施工内容</div>
<div v-if="!approvalShow" style="text-align: left;padding: 8% 0 0 2%;font: bold 14px 新宋体">{{ secondTitle }}</div>
<div v-else style="text-align: left;padding: 8% 0 0 2%;font: bold 14px 新宋体">{{ secondTitle }}</div>
<div class="showDivDo" style="padding: 1%"></div>
<div>
<div style="padding: 1% 0">
<div>1内容</div>
<div>1{{ secondSonTitle }}</div>
<div style="font-size: 11px">每日完成的工程量(用数字表达)进度百分比及待完成的工程内容</div>
</div>
<div>
@ -176,6 +185,8 @@ export default {
pickerValueDefault: [0],
pickerValueArray: [],
flag: 0,
secondTitle: '计划内容',
secondSonTitle: '预计完成内容',
ryList: [],//
sgrList: [],//list
oneDay: "",//
@ -225,6 +236,13 @@ export default {
methods: {
//
htmlDecode (text){
let str = text.replaceAll(",,,,,,,,,","'");
str = str.replaceAll(".........","=");
return str
},
/********************************* 页面跳转 ***********************************/
goToo(url) {
wx.navigateTo({
@ -312,8 +330,18 @@ export default {
wx.setNavigationBarTitle({
title: params.title
})
this.flag = params.flag;
this.oneDay = params.oneDay;
this.seletPersion = params.selectPersion;
this.seletPersion = this.htmlDecode(params.selectPersion);
if(this.flag == 1){
this.secondTitle = '计划内容';
this.secondSonTitle = '预计完成内容';
}else{
this.secondTitle = '今日施工内容总结';
this.secondSonTitle = '完成内容';
}
this.gzForm = {} // form
this.id = "";
@ -344,8 +372,6 @@ export default {
this.dataContractList = [];
this.tj = false;
this.flag = 0;
this.approvalShow = false;
//
this.$http.request({
@ -405,6 +431,7 @@ export default {
this.dataForm.planFzgz = data.businessPlan.fzgz;
this.dataForm.selectPersion = data.businessPlan.selectPer;
this.dataForm.isOne = data.businessPlan.oneDay;
this.dataForm.planTime = data.businessPlan.planTime;
this.getProjectContent();
} else {
this.closePage();
@ -453,7 +480,9 @@ export default {
},
onUnload() {
this.isShow = false;
}
},
}
</script>
@ -520,4 +549,16 @@ export default {
text-align: center;
display: flex;
}
.bt {
text-align: center;
background-color: #DAE3F3;
width: 50%;
font-size: 12px;
border-radius: 8px;
padding: 1%;
margin-bottom: 2%;
margin-left: 25%;
}
</style>

View File

@ -15,7 +15,7 @@
<button v-else disabled style="color: #d9d9d9" type="button" class="btn" size="mini">2周计划</button>
</div>
<div class="bt" style="display: flex;min-height: 10px;">
<div style="text-align: left;padding: 1% 0 1% 4%;width: 30%">施工时间:</div>
<div style="text-align: left;padding: 2% 0 1% 4%;width: 30%">施工时间:</div>
<div style="width: 40%">
<picker mode="date" :value="planTime" fields="day" @change="bindYearChange">
<view class="picker">
@ -137,16 +137,16 @@
<div v-if="item.show==1" style="display: flex;min-height: 20px;"
@click="selectWorker('/pages/pageplan/businessplan/addEdit/importWorker/main?title=明日计划-施工人员选取&planId='+dataForm.planId+'&planTime='+planTime+'&isOneDay='+dataForm.isOneDay+'&&projectId='+dataForm.projectId+'&workerDay='+JSON.stringify(workerDay))">
<div style="text-align: left;padding: 1% 0 1% 4%;width: 38%">4.施工人员:</div>
<div style="width: 50%;text-align: left;">
<div style="width: 50%;text-align: left;" v-html="item.selectPersion==null?'':item.selectPersion">
<!-- <textarea disabled style="text-align: left;max-height:50px;width: 100%">{{item.selectPersion==null?"":item.selectPersion}}</textarea>-->
{{item.selectPersion==null?"":item.selectPersion}}
<!-- {{item.selectPersion==null?"":item.selectPersion}}-->
</div>
<div class="arrowOpen"></div>
</div>
<div v-else style="display: flex;min-height: 20px;">
<div style="text-align: left;padding: 1% 0 1% 4%;width: 38%">4.施工人员:</div>
<div style="width: 50%;text-align: left;">
{{item.selectPersion==null?"":item.selectPersion}}
<div style="width: 70%;text-align: left;" v-html="item.selectPersion==null?'':item.selectPersion">
<!-- {{item.selectPersion==null?"":item.selectPersion}}-->
</div>
</div>
<div class="showDiv"></div>
@ -165,8 +165,8 @@
<div v-if="addShow" style="font-size: 14px" @click="deleteOne(index,item.planId)">删除</div>
</div>
<div v-else>
<div v-if=" addShow && (dataList.length!=0 && dataList[0].type==0)" style="padding-top: 30%; padding-bottom: 30%; font-size: 14px" @click="addEdit('/pages/pageplan/businessplan/addEdit/addEditInfo/main?title=明日计划-施工内容添加&&id='+item.planId+'&&isLink=0&&selectPersion='+item.selectPersion+'&&oneDay='+item.isOne)">施工内容添加</div>
<div v-else-if="dataList.length!=0 && dataList[0].type==1" style="padding-top: 30%; padding-bottom: 30%; font-size: 14px" @click="addEdit('/pages/pageplan/businessplan/addEdit/addEditInfo/main?title=明日计划-施工内容-'+item.projectNewName+'-详情&&id='+item.planId +'&&isLink=1&&selectPersion='+item.selectPersion+'&&oneDay='+item.isOne)">施工内容详情</div>
<div v-if=" addShow && (dataList.length!=0 && dataList[0].type==0)" style="padding-top: 30%; padding-bottom: 30%; font-size: 14px" @click="addEdit('/pages/pageplan/businessplan/addEdit/addEditInfo/main?title=明日计划-施工内容添加&&id='+item.planId+'&&isLink=0&&selectPersion='+htmlEncode(item.selectPersion)+'&&oneDay='+item.isOne+'&&flag=1')">施工内容添加</div>
<div v-else-if="dataList.length!=0 && dataList[0].type==1" style="padding-top: 30%; padding-bottom: 30%; font-size: 14px" @click="addEdit('/pages/pageplan/businessplan/addEdit/addEditInfo/main?title=明日计划-施工内容-'+item.projectNewName+'-详情&&id='+item.planId +'&&isLink=1&&selectPersion='+htmlEncode(item.selectPersion)+'&&oneDay='+item.isOne+'&&flag=1')">施工内容详情</div>
</div>
</td>
@ -328,6 +328,14 @@ export default {
components: {mpvuePicker},
methods: {
//
htmlEncode (text){
let str = text.replaceAll("'",",,,,,,,,,");
str = str.replaceAll("=",".........");
return str;
},
addEdit(url) {
//console.log(url);
wx.navigateTo({
@ -385,13 +393,10 @@ export default {
this.dataForm = row //
}
this.$forceUpdate();
},
//
add() {
console.log(this.dataForm)
//
if(this.dataForm.projectId!="" && this.dataForm.projectId!=undefined){
this.dataForm.commit=1
@ -788,6 +793,7 @@ export default {
onUnload() {
this.isShow = false;
}
}
</script>

View File

@ -550,152 +550,152 @@ export default {
let tempFilePaths;
let photoName;
let flag;
wx.chooseImage({
count: 1, // 9
sizeType: ['original', 'compressed'], //
sourceType: ['album', 'camera'], //
success: function (res) {
if(num === 1){
// tempFilePathimgsrc
that.files1 = []//
that.files1 = that.files1.concat(res.tempFilePaths)
photoName = "auth_pics";
flag = 1;
tempFilePaths = that.files1[0]
//console.log(res.tempFiles[0].size / 1024);
wx.showToast({
icon: "loading",
title: "正在上传"
});
} else if(num === 2){
// tempFilePathimgsrc
that.files2 = []//
that.files2 = that.files2.concat(res.tempFilePaths)
photoName = "auth_pics";
flag = 2;
tempFilePaths = that.files2[0]
//console.log(res.tempFiles[0].size / 1024);
wx.showToast({
icon: "loading",
title: "正在上传"
});
} else if(num === 3){
// tempFilePathimgsrc
that.files3 = []//
that.files3 = that.files3.concat(res.tempFilePaths)
photoName = "auth_pics";
flag = 3;
tempFilePaths = that.files3[0]
//console.log(res.tempFiles[0].size / 1024);
wx.showToast({
icon: "loading",
title: "正在上传"
});
}
if (flag === 1) {
wx.uploadFile({
url: that.$http.adornUrl("/sys/oss/upload"),
filePath: tempFilePaths,
name: "file",
header: {"Content-Type": "multipart/form-data", "token": wx.getStorageSync('token')},
formData:
{
categoryType: 'scenePhoto',
},
success: function (res) {
if (res.statusCode !== 200) {
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
return;
} else {
that.dataForm.projectPhoto1 = JSON.parse(res.data).data;
}
},
fail: function (e) {
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
},
complete: function () {
wx.hideToast(); //Toast
}
})
}else if (flag === 2) {
wx.uploadFile({
url: that.$http.adornUrl("/sys/oss/upload"),
filePath: tempFilePaths,
name: "file",
header: {"Content-Type": "multipart/form-data", "token": wx.getStorageSync('token')},
formData:
{
categoryType: 'scenePhoto',
},
success: function (res) {
if (res.statusCode !== 200) {
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
return;
} else {
that.dataForm.projectPhoto2 = JSON.parse(res.data).data;
}
},
fail: function (e) {
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
},
complete: function () {
wx.hideToast(); //Toast
}
})
}else if (flag === 3) {
wx.uploadFile({
url: that.$http.adornUrl("/sys/oss/upload"),
filePath: tempFilePaths,
name: "file",
header: {"Content-Type": "multipart/form-data", "token": wx.getStorageSync('token')},
formData:
{
categoryType: 'scenePhoto',
},
success: function (res) {
if (res.statusCode !== 200) {
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
return;
} else {
that.dataForm.projectPhoto3 = JSON.parse(res.data).data;
}
},
fail: function (e) {
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
},
complete: function () {
wx.hideToast(); //Toast
}
})
}
}
})
// wx.chooseImage({
// count: 1, // 9
// sizeType: ['original', 'compressed'], //
// sourceType: ['album', 'camera'], //
// success: function (res) {
// if(num === 1){
// // tempFilePathimgsrc
// that.files1 = []//
// that.files1 = that.files1.concat(res.tempFilePaths)
// photoName = "auth_pics";
// flag = 1;
// tempFilePaths = that.files1[0]
// //console.log(res.tempFiles[0].size / 1024);
// wx.showToast({
// icon: "loading",
// title: ""
// });
// } else if(num === 2){
// // tempFilePathimgsrc
// that.files2 = []//
// that.files2 = that.files2.concat(res.tempFilePaths)
// photoName = "auth_pics";
// flag = 2;
// tempFilePaths = that.files2[0]
// //console.log(res.tempFiles[0].size / 1024);
// wx.showToast({
// icon: "loading",
// title: ""
// });
// } else if(num === 3){
// // tempFilePathimgsrc
// that.files3 = []//
// that.files3 = that.files3.concat(res.tempFilePaths)
// photoName = "auth_pics";
// flag = 3;
// tempFilePaths = that.files3[0]
// //console.log(res.tempFiles[0].size / 1024);
// wx.showToast({
// icon: "loading",
// title: ""
// });
// }
//
// if (flag === 1) {
// wx.uploadFile({
// url: that.$http.adornUrl("/sys/oss/upload"),
// filePath: tempFilePaths,
// name: "file",
// header: {"Content-Type": "multipart/form-data", "token": wx.getStorageSync('token')},
// formData:
// {
// categoryType: 'scenePhoto',
// },
// success: function (res) {
// if (res.statusCode !== 200) {
// wx.showModal({
// title: '',
// content: '',
// showCancel: false
// })
// return;
// } else {
// that.dataForm.projectPhoto1 = JSON.parse(res.data).data;
// }
// },
// fail: function (e) {
// wx.showModal({
// title: '',
// content: '',
// showCancel: false
// })
// },
// complete: function () {
// wx.hideToast(); //Toast
// }
// })
// }else if (flag === 2) {
// wx.uploadFile({
// url: that.$http.adornUrl("/sys/oss/upload"),
// filePath: tempFilePaths,
// name: "file",
// header: {"Content-Type": "multipart/form-data", "token": wx.getStorageSync('token')},
// formData:
// {
// categoryType: 'scenePhoto',
// },
// success: function (res) {
// if (res.statusCode !== 200) {
// wx.showModal({
// title: '',
// content: '',
// showCancel: false
// })
// return;
// } else {
// that.dataForm.projectPhoto2 = JSON.parse(res.data).data;
// }
// },
// fail: function (e) {
// wx.showModal({
// title: '',
// content: '',
// showCancel: false
// })
// },
// complete: function () {
// wx.hideToast(); //Toast
// }
// })
// }else if (flag === 3) {
// wx.uploadFile({
// url: that.$http.adornUrl("/sys/oss/upload"),
// filePath: tempFilePaths,
// name: "file",
// header: {"Content-Type": "multipart/form-data", "token": wx.getStorageSync('token')},
// formData:
// {
// categoryType: 'scenePhoto',
// },
// success: function (res) {
// if (res.statusCode !== 200) {
// wx.showModal({
// title: '',
// content: '',
// showCancel: false
// })
// return;
// } else {
// that.dataForm.projectPhoto3 = JSON.parse(res.data).data;
// }
// },
// fail: function (e) {
// wx.showModal({
// title: '',
// content: '',
// showCancel: false
// })
// },
// complete: function () {
// wx.hideToast(); //Toast
// }
// })
// }
// }
//
// })
},
//
predivImage(e, num) {

View File

@ -125,8 +125,8 @@
<div style="border-bottom: 2px solid #FDE866;"></div>
</td>
<td class="trTd" style="width: 20%;display: flex; flex-direction:column;">
<div v-if="addShow && status==0" style="padding-top: 30%; padding-bottom: 30%; font-size: 14px" @click="goToo('/pages/pageplan/businessplan/addEdit/addEditInfo/main?title=今日总结-施工内容修改&&id='+item.planId+'&&isLink=0&&selectPersion='+item.selectPersion+'&&oneDay='+item.isOne)">施工内容修改</div>
<div v-if="status==1" style="padding-top: 30%; padding-bottom: 30%; font-size: 14px" @click="goToo('/pages/pageplan/businessplan/addEdit/addEditInfo/main?title=明日计划-施工内容-'+item.project+'-详情&&id='+item.planId +'&&isLink=1&&selectPersion='+item.selectPersion+'&&oneDay='+item.isOne)">施工内容详情</div>
<div v-if="addShow && status==0" style="padding-top: 30%; padding-bottom: 30%; font-size: 14px" @click="goToo('/pages/pageplan/businessplan/addEdit/addEditInfo/main?title=今日总结-施工内容修改&&id='+item.planId+'&&isLink=0&&selectPersion='+item.selectPersion+'&&oneDay='+item.isOne+'&&flag=2')">施工内容修改</div>
<div v-if="status==1" style="padding-top: 30%; padding-bottom: 30%; font-size: 14px" @click="goToo('/pages/pageplan/businessplan/addEdit/addEditInfo/main?title=今日总结-施工内容-'+item.project+'-详情&&id='+item.planId +'&&isLink=1&&selectPersion='+item.selectPersion+'&&oneDay='+item.isOne+'&&flag=2')">施工内容详情</div>
</td>
</tr>
<div style="border-bottom: 2px solid #FDE866;padding-top: 1%"></div>

View File

@ -9,7 +9,7 @@
<button type="button" class="btn" size="mini" @click="goToo('/pages/pagetotal/businesstotal/totalLyb/main')">留言板</button>
</div>
<div class="bt" style="display: flex;min-height: 10px;">
<div style="text-align: left;padding: 1% 0 1% 4%;width: 30%">施工时间:</div>
<div style="text-align: left;padding: 2% 0 1% 4%;width: 30%">施工时间:</div>
<div style="width: 40%">
<picker mode="date" :value="planTime" fields="day" @change="bindYearChange">
<view class="picker">
@ -116,9 +116,9 @@
<div class="showDiv"></div>
<div style="display: flex;min-height: 20px;">
<div style="text-align: left;padding: 1% 0 1% 4%;width: 38%">4.施工人员:</div>
<div style="width: 50%">
<div style="width: 70%;text-align: left;" v-html="item.selectPersion==null?'':item.selectPersion">
<!-- <textarea disabled style="text-align: left; height: 100%;width: 100%">{{item.selectPersion==null?"":item.selectPersion}}</textarea>-->
{{item.selectPersion==null?"":item.selectPersion}}
<!-- {{item.selectPersion==null?"":item.selectPersion}}-->
</div>
</div>
<div class="showDiv"></div>
@ -127,8 +127,8 @@
<div style="border-bottom: 2px solid #FDE866;"></div>
</td>
<td class="trTd" style="width: 20%;display: flex; flex-direction:column;">
<div v-if="addShow && status==0" style="padding-top: 30%; padding-bottom: 30%; font-size: 14px" @click="goToo('/pages/pageplan/businessplan/addEdit/addEditInfo/main?title=今日总结-施工内容修改&&id='+item.planId+'&&isLink=0&&selectPersion='+item.selectPersion+'&&oneDay='+item.isOne)">施工内容修改</div>
<div v-if="status==1" style="padding-top: 30%; padding-bottom: 30%; font-size: 14px" @click="goToo('/pages/pageplan/businessplan/addEdit/addEditInfo/main?title=明日计划-施工内容-'+item.project+'-详情&&id='+item.planId +'&&isLink=1&&selectPersion='+item.selectPersion+'&&oneDay='+item.isOne)">施工内容详情</div>
<div v-if="addShow && status==0" style="padding-top: 30%; padding-bottom: 30%; font-size: 14px" @click="goToo('/pages/pageplan/businessplan/addEdit/addEditInfo/main?title=今日总结-施工内容修改&&id='+item.planId+'&&isLink=0&&selectPersion='+htmlEncode(item.selectPersion)+'&&oneDay='+item.isOne+'&&flag=2')">施工内容修改</div>
<div v-if="status==1" style="padding-top: 30%; padding-bottom: 30%; font-size: 14px" @click="goToo('/pages/pageplan/businessplan/addEdit/addEditInfo/main?title=今日总结-施工内容-'+item.project+'-详情&&id='+item.planId +'&&isLink=1&&selectPersion='+htmlEncode(item.selectPersion)+'&&oneDay='+item.isOne+'&&flag=2')">施工内容详情</div>
</td>
</tr>
<div style="border-bottom: 2px solid #FDE866;padding-top: 1%"></div>
@ -228,6 +228,14 @@ export default {
components: {mpvuePicker},
methods: {
//
htmlEncode (text){
let str = text.replaceAll("'",",,,,,,,,,");
str = str.replaceAll("=",".........");
return str;
},
// 退 2024-3-8
approval(){
// isfinised 2

View File

@ -607,49 +607,49 @@ export default {
//
fjUpload() {
let that = this;
wx.chooseMessageFile({
count: 1,
type: 'file',
success: function (res) {
//console.log(res);
// tempFilePath img src
const tempFilePaths = res.tempFiles[0].path;
//console.log(tempFilePaths);
wx.uploadFile({
url: that.$http.adornUrl('/sys/oss/upload'),
filePath: tempFilePaths,
name: 'file',
header: {"Content-Type": "multipart/form-data", "token": wx.getStorageSync('token')},
formData:
{
categoryType: 'message',
},
success: function (res) {
if (res.statusCode !== 200) {
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
return;
} else {
that.dataForm.commentsFj = JSON.parse(res.data).data;
//console.log(that.dataForm.commentsFj);
}
},
fail: function (e) {
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
},
complete: function () {
wx.hideToast(); //Toast
}
})
}
})
// wx.chooseMessageFile({
// count: 1,
// type: 'file',
// success: function (res) {
// //console.log(res);
// // tempFilePath img src
// const tempFilePaths = res.tempFiles[0].path;
// //console.log(tempFilePaths);
// wx.uploadFile({
// url: that.$http.adornUrl('/sys/oss/upload'),
// filePath: tempFilePaths,
// name: 'file',
// header: {"Content-Type": "multipart/form-data", "token": wx.getStorageSync('token')},
// formData:
// {
// categoryType: 'message',
// },
// success: function (res) {
// if (res.statusCode !== 200) {
// wx.showModal({
// title: '',
// content: '',
// showCancel: false
// })
// return;
// } else {
// that.dataForm.commentsFj = JSON.parse(res.data).data;
// //console.log(that.dataForm.commentsFj);
// }
// },
// fail: function (e) {
// wx.showModal({
// title: '',
// content: '',
// showCancel: false
// })
// },
// complete: function () {
// wx.hideToast(); //Toast
// }
// })
// }
// })
},
//

View File

@ -714,179 +714,179 @@ export default {
let tempFilePaths;
let photoName;
let flag;
wx.chooseImage({
count: 1, // 9
sizeType: ['original', 'compressed'], //
sourceType: ['album', 'camera'], //
success: function (res) {
// tempFilePathimgsrc
if (num === 1) {//
that.files = []//
that.files = that.files.concat(res.tempFilePaths)
photoName = "auth_pics";
flag = 0;
tempFilePaths = that.files[0]
//console.log(res.tempFiles[0].size / 1024);
} else if (num === 2) {//
that.filesPositive = []
that.filesPositive = that.filesPositive.concat(res.tempFilePaths)
photoName = "auth_picsjson1";
tempFilePaths = that.filesPositive[0];
flag = 1;
} else if (num === 3) {//
that.filesBack = []
that.filesBack = that.filesBack.concat(res.tempFilePaths)
photoName = "auth_picsjson2";
tempFilePaths = that.filesBack[0]
flag = 2;
} else if (num === 4) {//
that.bankImage = []
that.bankImage = that.bankImage.concat(res.tempFilePaths)
photoName = "auth_picsjson2";
tempFilePaths = that.bankImage[0]
flag = 3;
}
wx.showToast({
icon: "loading",
title: "正在上传"
});
//console.log(tempFilePaths);
if (flag === 0) {
wx.uploadFile({
url: that.$http.adornUrl("/sys/oss/upload"),
filePath: tempFilePaths,
name: "file",
header: {"Content-Type": "multipart/form-data", "token": wx.getStorageSync('token')},
formData:
{
categoryType: 'photo',
},
success: function (res) {
if (res.statusCode !== 200) {
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
return;
} else {
that.dataForm.image = JSON.parse(res.data).data;
}
},
fail: function (e) {
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
},
complete: function () {
wx.hideToast(); //Toast
}
})
} else if (flag === 1) {
wx.uploadFile({
url: that.$http.adornUrl("/sys/oss/upload"),
filePath: tempFilePaths,
name: "file",
header: {"Content-Type": "multipart/form-data", "token": wx.getStorageSync('token')},
formData:
{
categoryType: 'card',
},
success: function (res) {
if (res.statusCode !== 200) {
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
return;
} else {
that.dataForm.imageFront = JSON.parse(res.data).data;
}
},
fail: function (e) {
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
},
complete: function () {
wx.hideToast(); //Toast
}
})
} else if (flag === 2) {
wx.uploadFile({
url: that.$http.adornUrl("/sys/oss/upload"),
filePath: tempFilePaths,
name: "file",
header: {"Content-Type": "multipart/form-data", "token": wx.getStorageSync('token')},
formData:
{
categoryType: 'card',
},
success: function (res) {
if (res.statusCode !== 200) {
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
return;
} else {
that.dataForm.imageBack = JSON.parse(res.data).data;
}
},
fail: function (e) {
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
},
complete: function () {
wx.hideToast(); //Toast
}
})
} else if (flag === 3) {
wx.uploadFile({
url: that.$http.adornUrl("/sys/oss/upload"),
filePath: tempFilePaths,
name: "file",
header: {"Content-Type": "multipart/form-data", "token": wx.getStorageSync('token')},
formData:
{
categoryType: 'BankCard',
},
success: function (res) {
if (res.statusCode !== 200) {
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
return;
} else {
that.dataForm.bankImage = JSON.parse(res.data).data;
}
},
fail: function (e) {
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
},
complete: function () {
wx.hideToast(); //Toast
}
})
}
}
})
// wx.chooseImage({
// count: 1, // 9
// sizeType: ['original', 'compressed'], //
// sourceType: ['album', 'camera'], //
// success: function (res) {
// // tempFilePathimgsrc
// if (num === 1) {//
// that.files = []//
// that.files = that.files.concat(res.tempFilePaths)
// photoName = "auth_pics";
// flag = 0;
// tempFilePaths = that.files[0]
// //console.log(res.tempFiles[0].size / 1024);
// } else if (num === 2) {//
// that.filesPositive = []
// that.filesPositive = that.filesPositive.concat(res.tempFilePaths)
// photoName = "auth_picsjson1";
// tempFilePaths = that.filesPositive[0];
// flag = 1;
// } else if (num === 3) {//
// that.filesBack = []
// that.filesBack = that.filesBack.concat(res.tempFilePaths)
// photoName = "auth_picsjson2";
// tempFilePaths = that.filesBack[0]
// flag = 2;
// } else if (num === 4) {//
// that.bankImage = []
// that.bankImage = that.bankImage.concat(res.tempFilePaths)
// photoName = "auth_picsjson2";
// tempFilePaths = that.bankImage[0]
// flag = 3;
// }
// wx.showToast({
// icon: "loading",
// title: ""
// });
// //console.log(tempFilePaths);
// if (flag === 0) {
// wx.uploadFile({
// url: that.$http.adornUrl("/sys/oss/upload"),
// filePath: tempFilePaths,
// name: "file",
// header: {"Content-Type": "multipart/form-data", "token": wx.getStorageSync('token')},
// formData:
// {
// categoryType: 'photo',
// },
// success: function (res) {
// if (res.statusCode !== 200) {
// wx.showModal({
// title: '',
// content: '',
// showCancel: false
// })
// return;
// } else {
// that.dataForm.image = JSON.parse(res.data).data;
// }
// },
// fail: function (e) {
// wx.showModal({
// title: '',
// content: '',
// showCancel: false
// })
// },
// complete: function () {
// wx.hideToast(); //Toast
// }
// })
// } else if (flag === 1) {
// wx.uploadFile({
// url: that.$http.adornUrl("/sys/oss/upload"),
// filePath: tempFilePaths,
// name: "file",
// header: {"Content-Type": "multipart/form-data", "token": wx.getStorageSync('token')},
// formData:
// {
// categoryType: 'card',
// },
// success: function (res) {
// if (res.statusCode !== 200) {
// wx.showModal({
// title: '',
// content: '',
// showCancel: false
// })
// return;
// } else {
// that.dataForm.imageFront = JSON.parse(res.data).data;
// }
// },
// fail: function (e) {
// wx.showModal({
// title: '',
// content: '',
// showCancel: false
// })
// },
// complete: function () {
// wx.hideToast(); //Toast
// }
// })
// } else if (flag === 2) {
// wx.uploadFile({
// url: that.$http.adornUrl("/sys/oss/upload"),
// filePath: tempFilePaths,
// name: "file",
// header: {"Content-Type": "multipart/form-data", "token": wx.getStorageSync('token')},
// formData:
// {
// categoryType: 'card',
// },
// success: function (res) {
// if (res.statusCode !== 200) {
// wx.showModal({
// title: '',
// content: '',
// showCancel: false
// })
// return;
// } else {
// that.dataForm.imageBack = JSON.parse(res.data).data;
// }
// },
// fail: function (e) {
// wx.showModal({
// title: '',
// content: '',
// showCancel: false
// })
// },
// complete: function () {
// wx.hideToast(); //Toast
// }
// })
// } else if (flag === 3) {
// wx.uploadFile({
// url: that.$http.adornUrl("/sys/oss/upload"),
// filePath: tempFilePaths,
// name: "file",
// header: {"Content-Type": "multipart/form-data", "token": wx.getStorageSync('token')},
// formData:
// {
// categoryType: 'BankCard',
// },
// success: function (res) {
// if (res.statusCode !== 200) {
// wx.showModal({
// title: '',
// content: '',
// showCancel: false
// })
// return;
// } else {
// that.dataForm.bankImage = JSON.parse(res.data).data;
// }
// },
// fail: function (e) {
// wx.showModal({
// title: '',
// content: '',
// showCancel: false
// })
// },
// complete: function () {
// wx.hideToast(); //Toast
// }
// })
// }
// }
//
// })
},
//
predivImage(e, num) {

View File

@ -115,66 +115,66 @@ export default {
let tempFilePaths;
let photoName;
let flag;
wx.chooseImage({
count: 1, // 9
sizeType: ['original', 'compressed'], //
sourceType: ['album', 'camera'], //
success: function (res) {
// tempFilePathimgsrc
if (num === 1) {//
that.files = []//
that.files = that.files.concat(res.tempFilePaths)
photoName = "auth_pics";
flag = num;
tempFilePaths = that.files[0]
//console.log(res.tempFiles[0].size / 1024);
}
wx.showToast({
icon: "loading",
title: "正在上传"
});
if (flag === 1) {
wx.uploadFile({
url: that.$http.adornUrl("/sys/oss/upload"),
filePath: tempFilePaths,
name: "file",
header: {"Content-Type": "multipart/form-data", "token": wx.getStorageSync('token')},
formData:
{
categoryType: 'file',
},
success: function (res) {
if (res.statusCode !== 200) {
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
return;
} else {
that.dataForm.url = JSON.parse(res.data).data;
if (that.dataForm.id === undefined) {//
that.url = "/business/businessworker/orgSave";
} else {
that.url = "/business/businessworker/orgUpdate";
}
that.tranPhoto(that.url);
}
},
fail: function (e) {
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
},
complete: function () {
wx.hideToast(); //Toast
}
})
}
}
})
// wx.chooseImage({
// count: 1, // 9
// sizeType: ['original', 'compressed'], //
// sourceType: ['album', 'camera'], //
// success: function (res) {
// // tempFilePathimgsrc
// if (num === 1) {//
// that.files = []//
// that.files = that.files.concat(res.tempFilePaths)
// photoName = "auth_pics";
// flag = num;
// tempFilePaths = that.files[0]
// //console.log(res.tempFiles[0].size / 1024);
// }
// wx.showToast({
// icon: "loading",
// title: ""
// });
// if (flag === 1) {
// wx.uploadFile({
// url: that.$http.adornUrl("/sys/oss/upload"),
// filePath: tempFilePaths,
// name: "file",
// header: {"Content-Type": "multipart/form-data", "token": wx.getStorageSync('token')},
// formData:
// {
// categoryType: 'file',
// },
// success: function (res) {
// if (res.statusCode !== 200) {
// wx.showModal({
// title: '',
// content: '',
// showCancel: false
// })
// return;
// } else {
// that.dataForm.url = JSON.parse(res.data).data;
// if (that.dataForm.id === undefined) {//
// that.url = "/business/businessworker/orgSave";
// } else {
// that.url = "/business/businessworker/orgUpdate";
// }
// that.tranPhoto(that.url);
// }
// },
// fail: function (e) {
// wx.showModal({
// title: '',
// content: '',
// showCancel: false
// })
// },
// complete: function () {
// wx.hideToast(); //Toast
// }
// })
// }
// }
// })
},
//
tranPhoto(url){