去掉微信上传图片组件
This commit is contained in:
parent
b40700bbd2
commit
0d73440d89
|
@ -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) {
|
||||
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||
var tempFilePaths = res.tempFilePaths;
|
||||
upload(that, tempFilePaths);
|
||||
}
|
||||
})
|
||||
}
|
||||
<!-- uploadPhoto() {-->
|
||||
<!-- var that = this;-->
|
||||
<!-- wx.chooseImage({-->
|
||||
<!-- count: 1, // 默认9-->
|
||||
<!-- sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有-->
|
||||
<!-- sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有-->
|
||||
<!-- success: function (res) {-->
|
||||
<!--// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片-->
|
||||
<!-- var tempFilePaths = res.tempFilePaths;-->
|
||||
<!-- upload(that, tempFilePaths);-->
|
||||
<!-- }-->
|
||||
<!-- })-->
|
||||
<!-- }-->
|
||||
})
|
||||
|
||||
function upload(page, path) {
|
||||
|
|
|
@ -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});//返回一个对象,all代表选取的所有图片,currentUpload代表目前选取的图片
|
||||
}
|
||||
})
|
||||
// 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});//返回一个对象,all代表选取的所有图片,currentUpload代表目前选取的图片
|
||||
// }
|
||||
// })
|
||||
},
|
||||
//预览方法
|
||||
previewImg(index){
|
||||
|
|
|
@ -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();
|
||||
},
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||
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) {
|
||||
// // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||
// 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;
|
||||
|
|
|
@ -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'),
|
||||
|
|
|
@ -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>-->
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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){
|
||||
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||
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){
|
||||
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||
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){
|
||||
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||
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){
|
||||
// // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||
// 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){
|
||||
// // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||
// 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){
|
||||
// // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||
// 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) {
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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代表审批中
|
||||
|
|
|
@ -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
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
},
|
||||
|
||||
//下载附件
|
||||
|
|
|
@ -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) {
|
||||
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||
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) {
|
||||
// // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||
// 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) {
|
||||
|
|
|
@ -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) {
|
||||
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||
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) {
|
||||
// // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||
// 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){
|
||||
|
|
Loading…
Reference in New Issue