去掉微信上传图片组件
This commit is contained in:
parent
b40700bbd2
commit
0d73440d89
|
@ -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) {-->
|
||||||
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
<!--// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片-->
|
||||||
var tempFilePaths = res.tempFilePaths;
|
<!-- var tempFilePaths = res.tempFilePaths;-->
|
||||||
upload(that, tempFilePaths);
|
<!-- upload(that, tempFilePaths);-->
|
||||||
}
|
<!-- }-->
|
||||||
})
|
<!-- })-->
|
||||||
}
|
<!-- }-->
|
||||||
})
|
})
|
||||||
|
|
||||||
function upload(page, path) {
|
function upload(page, path) {
|
||||||
|
|
|
@ -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});//返回一个对象,all代表选取的所有图片,currentUpload代表目前选取的图片
|
// that.$emit("choosed",{all:that.urls,currentUpload:res.tempFilePaths});//返回一个对象,all代表选取的所有图片,currentUpload代表目前选取的图片
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
},
|
},
|
||||||
//预览方法
|
//预览方法
|
||||||
previewImg(index){
|
previewImg(index){
|
||||||
|
|
|
@ -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();
|
||||||
},
|
},
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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) {
|
||||||
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
// // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||||
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;
|
||||||
|
|
|
@ -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'),
|
||||||
|
|
|
@ -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>-->
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
||||||
|
|
|
@ -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){
|
||||||
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
// // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||||
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){
|
||||||
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
// // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||||
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){
|
||||||
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
// // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||||
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) {
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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代表审批中
|
||||||
|
|
|
@ -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
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
},
|
},
|
||||||
|
|
||||||
//下载附件
|
//下载附件
|
||||||
|
|
|
@ -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) {
|
||||||
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
// // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||||
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) {
|
||||||
|
|
|
@ -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) {
|
||||||
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
// // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||||
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){
|
||||||
|
|
Loading…
Reference in New Issue