去掉微信上传图片组件

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

View File

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

View File

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

View File

@ -1,20 +1,7 @@
<template> <template>
<div @click="clickHandle"> <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"> <form class="form-container">
<input type="text" class="form-control" :value="motto" placeholder="v-model" /> <input type="text" class="form-control" :value="motto" placeholder="v-model" />
@ -85,9 +72,9 @@ export default {
border-radius: 50%; border-radius: 50%;
} }
.userinfo-nickname { /*.userinfo-nickname {*/
color: #aaa; /* color: #aaa;*/
} /*}*/
.usermotto { .usermotto {
margin-top: 150px; margin-top: 150px;

View File

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

View File

@ -427,11 +427,11 @@ export default {
this.recipientList.forEach((item) => { this.recipientList.forEach((item) => {
if (!this.dataOForm.outPayee) { if (!this.dataOForm.outPayee) {
// this.pickerValueArray.push({value: item.dictId, label: item.name}) // 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}) this.pickerValueArray.push({value: item.dictId, label: item.name})
} }
} else if (item.dictId !== this.dataOForm.outPayee) { } 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}) 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){ if(this.dataOIForm.outinDate){
this.$http.request({ this.$http.request({
url: this.$http.adornUrl('/business/businessoutlayincome/save'), url: this.$http.adornUrl('/business/businessoutlayincome/save'),

View File

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

View File

@ -15,7 +15,7 @@
<button v-else disabled style="color: #d9d9d9" type="button" class="btn" size="mini">2周计划</button> <button v-else disabled style="color: #d9d9d9" type="button" class="btn" size="mini">2周计划</button>
</div> </div>
<div class="bt" style="display: flex;min-height: 10px;"> <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%"> <div style="width: 40%">
<picker mode="date" :value="planTime" fields="day" @change="bindYearChange"> <picker mode="date" :value="planTime" fields="day" @change="bindYearChange">
<view class="picker"> <view class="picker">
@ -137,16 +137,16 @@
<div v-if="item.show==1" style="display: flex;min-height: 20px;" <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))"> @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="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>--> <!-- <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>
<div class="arrowOpen"></div> <div class="arrowOpen"></div>
</div> </div>
<div v-else style="display: flex;min-height: 20px;"> <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="text-align: left;padding: 1% 0 1% 4%;width: 38%">4.施工人员:</div>
<div style="width: 50%;text-align: left;"> <div style="width: 70%;text-align: left;" v-html="item.selectPersion==null?'':item.selectPersion">
{{item.selectPersion==null?"":item.selectPersion}} <!-- {{item.selectPersion==null?"":item.selectPersion}}-->
</div> </div>
</div> </div>
<div class="showDiv"></div> <div class="showDiv"></div>
@ -165,8 +165,8 @@
<div v-if="addShow" style="font-size: 14px" @click="deleteOne(index,item.planId)">删除</div> <div v-if="addShow" style="font-size: 14px" @click="deleteOne(index,item.planId)">删除</div>
</div> </div>
<div v-else> <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-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='+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='+htmlEncode(item.selectPersion)+'&&oneDay='+item.isOne+'&&flag=1')">施工内容详情</div>
</div> </div>
</td> </td>
@ -328,6 +328,14 @@ export default {
components: {mpvuePicker}, components: {mpvuePicker},
methods: { methods: {
//
htmlEncode (text){
let str = text.replaceAll("'",",,,,,,,,,");
str = str.replaceAll("=",".........");
return str;
},
addEdit(url) { addEdit(url) {
//console.log(url); //console.log(url);
wx.navigateTo({ wx.navigateTo({
@ -385,13 +393,10 @@ export default {
this.dataForm = row // this.dataForm = row //
} }
this.$forceUpdate(); this.$forceUpdate();
}, },
// //
add() { add() {
console.log(this.dataForm)
// //
if(this.dataForm.projectId!="" && this.dataForm.projectId!=undefined){ if(this.dataForm.projectId!="" && this.dataForm.projectId!=undefined){
this.dataForm.commit=1 this.dataForm.commit=1
@ -788,6 +793,7 @@ export default {
onUnload() { onUnload() {
this.isShow = false; this.isShow = false;
} }
} }
</script> </script>

View File

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

View File

@ -125,8 +125,8 @@
<div style="border-bottom: 2px solid #FDE866;"></div> <div style="border-bottom: 2px solid #FDE866;"></div>
</td> </td>
<td class="trTd" style="width: 20%;display: flex; flex-direction:column;"> <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="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)">施工内容详情</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> </td>
</tr> </tr>
<div style="border-bottom: 2px solid #FDE866;padding-top: 1%"></div> <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> <button type="button" class="btn" size="mini" @click="goToo('/pages/pagetotal/businesstotal/totalLyb/main')">留言板</button>
</div> </div>
<div class="bt" style="display: flex;min-height: 10px;"> <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%"> <div style="width: 40%">
<picker mode="date" :value="planTime" fields="day" @change="bindYearChange"> <picker mode="date" :value="planTime" fields="day" @change="bindYearChange">
<view class="picker"> <view class="picker">
@ -116,9 +116,9 @@
<div class="showDiv"></div> <div class="showDiv"></div>
<div style="display: flex;min-height: 20px;"> <div style="display: flex;min-height: 20px;">
<div style="text-align: left;padding: 1% 0 1% 4%;width: 38%">4.施工人员:</div> <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>--> <!-- <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> </div>
<div class="showDiv"></div> <div class="showDiv"></div>
@ -127,8 +127,8 @@
<div style="border-bottom: 2px solid #FDE866;"></div> <div style="border-bottom: 2px solid #FDE866;"></div>
</td> </td>
<td class="trTd" style="width: 20%;display: flex; flex-direction:column;"> <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="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='+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='+htmlEncode(item.selectPersion)+'&&oneDay='+item.isOne+'&&flag=2')">施工内容详情</div>
</td> </td>
</tr> </tr>
<div style="border-bottom: 2px solid #FDE866;padding-top: 1%"></div> <div style="border-bottom: 2px solid #FDE866;padding-top: 1%"></div>
@ -228,6 +228,14 @@ export default {
components: {mpvuePicker}, components: {mpvuePicker},
methods: { methods: {
//
htmlEncode (text){
let str = text.replaceAll("'",",,,,,,,,,");
str = str.replaceAll("=",".........");
return str;
},
// 退 2024-3-8 // 退 2024-3-8
approval(){ approval(){
// isfinised 2 // isfinised 2

View File

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

View File

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

View File

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