flx:提交潮州bug
This commit is contained in:
parent
66fa6561f4
commit
bc60890cf7
4
main.js
4
main.js
@ -125,9 +125,9 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
// Vue.prototype.url_config = 'http://101.43.164.214:11112/'// 新金湾
|
// Vue.prototype.url_config = 'http://101.43.164.214:11112/'// 新金湾
|
||||||
Vue.prototype.work_url = 'http://101.43.164.214:11137'// 新金湾地址 通用
|
Vue.prototype.work_url = 'http://101.43.164.214:11137'// 新金湾地址 通用
|
||||||
|
|
||||||
// Vue.prototype.url_config = 'http://jxj.zhgdyun.com:9500/'// 测试环境h5
|
Vue.prototype.url_config = 'http://jxj.zhgdyun.com:9500/'// 测试环境h5
|
||||||
// Vue.prototype.url_config = 'https://192.168.1.2/'// 青海中水北方
|
// Vue.prototype.url_config = 'https://192.168.1.2/'// 青海中水北方
|
||||||
Vue.prototype.url_config = 'http://jxj.zhgdyun.com:21000/'// 潮州项目h5
|
// Vue.prototype.url_config = 'http://jxj.zhgdyun.com:21000/'// 潮州项目h5
|
||||||
|
|
||||||
// Vue.prototype.url_config = 'http://222.80.185.228:6090/' // 木垒县新能源工程线上地址
|
// Vue.prototype.url_config = 'http://222.80.185.228:6090/' // 木垒县新能源工程线上地址
|
||||||
// Vue.prototype.url_config = 'http://10.168.1.105:11111/' // 线上地址
|
// Vue.prototype.url_config = 'http://10.168.1.105:11111/' // 线上地址
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
? item.displayFieldName
|
? item.displayFieldName
|
||||||
: item.originalFieldName}}:</view>
|
: item.originalFieldName}}:</view>
|
||||||
<picker @click="$refs.locationTree._show()" :disabled="true" class="picker">
|
<picker @click="$refs.locationTree._show()" :disabled="true" class="picker">
|
||||||
<view class="uni-input uni-select cl" v-if="checkPointName==''">
|
<view class="uni-input uni-select cl" v-if="!checkPointName">
|
||||||
请选择 <image class="icon-down" src="/static/icon-down-black.png"></image>
|
请选择 <image class="icon-down" src="/static/icon-down-black.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="uni-input uni-select flex2" v-else>
|
<view class="uni-input uni-select flex2" v-else>
|
||||||
@ -146,7 +146,7 @@
|
|||||||
? item.displayFieldName
|
? item.displayFieldName
|
||||||
: item.originalFieldName}}:</view>
|
: item.originalFieldName}}:</view>
|
||||||
<picker @click="$refs.subpackageTree._show()" :disabled="true" class="picker">
|
<picker @click="$refs.subpackageTree._show()" :disabled="true" class="picker">
|
||||||
<view class="uni-input uni-select cl" v-if="form.enterpriseNames==''">
|
<view class="uni-input uni-select cl" v-if="!form.enterpriseNames">
|
||||||
请选择 <image class="icon-down" src="/static/icon-down-black.png"></image>
|
请选择 <image class="icon-down" src="/static/icon-down-black.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="uni-input uni-select flex2" v-else>
|
<view class="uni-input uni-select flex2" v-else>
|
||||||
@ -173,7 +173,7 @@
|
|||||||
? item.displayFieldName
|
? item.displayFieldName
|
||||||
: item.originalFieldName}}:</view>
|
: item.originalFieldName}}:</view>
|
||||||
<picker @click="$refs.reviewIdTree._show()" :disabled="true" class="picker">
|
<picker @click="$refs.reviewIdTree._show()" :disabled="true" class="picker">
|
||||||
<view class="uni-input uni-select cl" v-if="form.reviewNames==''">
|
<view class="uni-input uni-select cl" v-if="!form.reviewNames">
|
||||||
请选择 <image class="icon-down" src="/static/icon-down-black.png"></image>
|
请选择 <image class="icon-down" src="/static/icon-down-black.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="uni-input uni-select flex2" v-else>
|
<view class="uni-input uni-select flex2" v-else>
|
||||||
@ -186,7 +186,7 @@
|
|||||||
? item.displayFieldName
|
? item.displayFieldName
|
||||||
: item.originalFieldName}}:</view>
|
: item.originalFieldName}}:</view>
|
||||||
<picker @click="$refs.verifyManIdTree._show()" :disabled="true" class="picker">
|
<picker @click="$refs.verifyManIdTree._show()" :disabled="true" class="picker">
|
||||||
<view class="uni-input uni-select cl" v-if="form.verifyManNames==''">
|
<view class="uni-input uni-select cl" v-if="!form.verifyManNames">
|
||||||
请选择 <image class="icon-down" src="/static/icon-down-black.png"></image>
|
请选择 <image class="icon-down" src="/static/icon-down-black.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="uni-input uni-select flex2" v-else>
|
<view class="uni-input uni-select flex2" v-else>
|
||||||
@ -1789,10 +1789,13 @@
|
|||||||
title: '保存成功'
|
title: '保存成功'
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.navigateBack({
|
// uni.navigateBack({
|
||||||
delta: 1
|
// delta: 1
|
||||||
|
// })
|
||||||
|
uni.navigateTo({
|
||||||
|
url: './hazardousWorkDistribution'
|
||||||
})
|
})
|
||||||
}, 1200)
|
}, 800)
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
|
|||||||
@ -67,12 +67,14 @@
|
|||||||
<view @click="onNavigateBack">取消</view>
|
<view @click="onNavigateBack">取消</view>
|
||||||
<view @click="addSaveBtn">确定</view>
|
<view @click="addSaveBtn">确定</view>
|
||||||
</view>
|
</view>
|
||||||
|
<canversCom v-if="openImg" :style="`position: absolute; left: -9999px;`" @imgUrl="imgUrl" :imgList="imgList">
|
||||||
|
</canversCom>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import tkiTree from "@/components/tki-tree/tki-tree.vue"
|
import tkiTree from "@/components/tki-tree/tki-tree.vue"
|
||||||
import canversCom from "@/pages/videoManage/component/canversCom.vue"
|
import canversCom from "@/pages/projectEnd/safeSame/hiddenTroubleComponents/canversCom/canversCom.vue"
|
||||||
import dateTimePiccker from '@/components/dateTimePicker/index.vue'
|
import dateTimePiccker from '@/components/dateTimePicker/index.vue'
|
||||||
import {
|
import {
|
||||||
dateformat
|
dateformat
|
||||||
@ -97,6 +99,13 @@
|
|||||||
imgFileList: [],
|
imgFileList: [],
|
||||||
rectifyAfterImageList: [],
|
rectifyAfterImageList: [],
|
||||||
imageUrl: "",
|
imageUrl: "",
|
||||||
|
openImg: false,
|
||||||
|
imgList: [],
|
||||||
|
width: 0,
|
||||||
|
height: 0,
|
||||||
|
weatherInfo: '',
|
||||||
|
locationInfo: '',
|
||||||
|
shooter: '张三' // 可根据实际情况修改或动态获取拍摄人信息
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(opts) {
|
onLoad(opts) {
|
||||||
@ -105,20 +114,7 @@
|
|||||||
this.form.inspectTime = this.$dayjs().format("YYYY-MM-DD HH:mm:ss");
|
this.form.inspectTime = this.$dayjs().format("YYYY-MM-DD HH:mm:ss");
|
||||||
console.log('1122', opts.imageUrl);
|
console.log('1122', opts.imageUrl);
|
||||||
if (opts.imageUrl) {
|
if (opts.imageUrl) {
|
||||||
let that = this;
|
this.uploadFileFn(opts.imageUrl);
|
||||||
uni.uploadFile({
|
|
||||||
url: that.url_config + 'upload/image', //仅为示例,非真实的接口地址
|
|
||||||
filePath: opts.imageUrl,
|
|
||||||
name: 'files',
|
|
||||||
success: (uploadFileRes) => {
|
|
||||||
console.log(uploadFileRes);
|
|
||||||
let data = {
|
|
||||||
name: JSON.parse(uploadFileRes.data).data[0].filename,
|
|
||||||
url: JSON.parse(uploadFileRes.data).data[0].imageUrl
|
|
||||||
};
|
|
||||||
that.imgFileList.push(data)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -211,18 +207,19 @@
|
|||||||
success(res) {
|
success(res) {
|
||||||
const tempFilePaths = res.tempFilePaths;
|
const tempFilePaths = res.tempFilePaths;
|
||||||
console.log(222, tempFilePaths[0])
|
console.log(222, tempFilePaths[0])
|
||||||
uni.uploadFile({
|
that.canversList(tempFilePaths[0]);
|
||||||
url: that.url_config + 'upload/image', //仅为示例,非真实的接口地址
|
// uni.uploadFile({
|
||||||
filePath: tempFilePaths[0],
|
// url: that.url_config + 'upload/image', //仅为示例,非真实的接口地址
|
||||||
name: 'files',
|
// filePath: tempFilePaths[0],
|
||||||
success: (uploadFileRes) => {
|
// name: 'files',
|
||||||
let data = {
|
// success: (uploadFileRes) => {
|
||||||
name: JSON.parse(uploadFileRes.data).data[0].filename,
|
// let data = {
|
||||||
url: JSON.parse(uploadFileRes.data).data[0].imageUrl
|
// name: JSON.parse(uploadFileRes.data).data[0].filename,
|
||||||
};
|
// url: JSON.parse(uploadFileRes.data).data[0].imageUrl
|
||||||
that.imgFileList.push(data)
|
// };
|
||||||
}
|
// that.imgFileList.push(data)
|
||||||
});
|
// }
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (type == 2) {
|
} else if (type == 2) {
|
||||||
@ -246,6 +243,94 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
canversList(tempFilePath) {
|
||||||
|
// 设置画布宽高为图片宽高
|
||||||
|
uni.getImageInfo({
|
||||||
|
src: tempFilePath,
|
||||||
|
success: (imageRes) => {
|
||||||
|
console.log(88888, imageRes)
|
||||||
|
const {
|
||||||
|
width,
|
||||||
|
height
|
||||||
|
} = imageRes;
|
||||||
|
this.imgList = {
|
||||||
|
imgUrl: tempFilePath,
|
||||||
|
imgWidth: width,
|
||||||
|
imgHeight: height,
|
||||||
|
shooter: this.userInfo.realName,
|
||||||
|
}
|
||||||
|
this.openImg = true
|
||||||
|
console.log('传过去啦', this.imgList)
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.error('获取图片信息失败:', err);
|
||||||
|
reject(err);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
imgUrl(val) {
|
||||||
|
console.log(val);
|
||||||
|
this.uploadFileFn(val.imgUrl);
|
||||||
|
// 保存图片到相册
|
||||||
|
this.saveBase64Img(val.imageBase64);
|
||||||
|
this.openImg = false;
|
||||||
|
},
|
||||||
|
uploadFileFn(filePath){
|
||||||
|
let that = this;
|
||||||
|
uni.uploadFile({
|
||||||
|
url: that.url_config + 'upload/image', //仅为示例,非真实的接口地址
|
||||||
|
filePath: filePath,
|
||||||
|
name: 'files',
|
||||||
|
success: (uploadFileRes) => {
|
||||||
|
console.log(uploadFileRes);
|
||||||
|
let data = {
|
||||||
|
name: JSON.parse(uploadFileRes.data).data[0].filename,
|
||||||
|
url: JSON.parse(uploadFileRes.data).data[0].imageUrl
|
||||||
|
};
|
||||||
|
that.imgFileList.push(data)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
saveBase64Img(base64) {
|
||||||
|
const bitmap = new plus.nativeObj.Bitmap('test');
|
||||||
|
bitmap.loadBase64Data(
|
||||||
|
base64,
|
||||||
|
function() {
|
||||||
|
const url = '_doc/' + new Date() + '.png'; // url建议用时间戳命名方式
|
||||||
|
console.log('url:', url);
|
||||||
|
bitmap.save(
|
||||||
|
url, {
|
||||||
|
overwrite: true // 是否覆盖
|
||||||
|
// quality: 'quality' // 图片清晰度
|
||||||
|
},
|
||||||
|
i => {
|
||||||
|
uni.saveImageToPhotosAlbum({
|
||||||
|
filePath: url,
|
||||||
|
success: function() {
|
||||||
|
uni.showToast({
|
||||||
|
title: '保存成功',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
bitmap.clear();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '保存失败',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
console.log(e);
|
||||||
|
bitmap.clear();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
e => {
|
||||||
|
console.log('保存失败', e);
|
||||||
|
bitmap.clear();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
//删除附件
|
//删除附件
|
||||||
deleteImg(val, type) {
|
deleteImg(val, type) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|||||||
@ -25,10 +25,10 @@
|
|||||||
{{item.createTime}}
|
{{item.createTime}}
|
||||||
</view>
|
</view>
|
||||||
<view class="main3_box-bottom">
|
<view class="main3_box-bottom">
|
||||||
<view v-if="item.isGenerate == 0" class="state-box"
|
<!-- <view v-if="item.isGenerate == 0" class="state-box"
|
||||||
:class="{'success-box':item.isGenerate == 1,'error-box':item.isGenerate != 1}">
|
:class="{'success-box':item.isGenerate == 1,'error-box':item.isGenerate != 1}">
|
||||||
{{item.isGenerate == 1 ? '已派发' : '未派发'}}
|
{{item.isGenerate == 1 ? '已派发' : '未派发'}}
|
||||||
</view>
|
</view> -->
|
||||||
<view class="box-item1">
|
<view class="box-item1">
|
||||||
<view>班组/部门:</view>
|
<view>班组/部门:</view>
|
||||||
<view>{{item.reportDepartmentTeamName ? item.reportDepartmentTeamName : '--'}}</view>
|
<view>{{item.reportDepartmentTeamName ? item.reportDepartmentTeamName : '--'}}</view>
|
||||||
@ -38,7 +38,7 @@
|
|||||||
<view>上报人:</view>
|
<view>上报人:</view>
|
||||||
<view>{{item.inspectManName ? item.inspectManName : '--'}}</view>
|
<view>{{item.inspectManName ? item.inspectManName : '--'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box-item">
|
<view class="box-item" style="width: 65%;">
|
||||||
<view>所属企业:</view>
|
<view>所属企业:</view>
|
||||||
<view>{{item.reportEnterpriseName ? item.reportEnterpriseName : '--'}}</view>
|
<view>{{item.reportEnterpriseName ? item.reportEnterpriseName : '--'}}</view>
|
||||||
</view>
|
</view>
|
||||||
@ -478,7 +478,8 @@
|
|||||||
detailPlace: this.projectTypeName,
|
detailPlace: this.projectTypeName,
|
||||||
projectSn: this.projectDetail.projectSn,
|
projectSn: this.projectDetail.projectSn,
|
||||||
reportEnterprise: this.searchInfo.regionIds.join(','),
|
reportEnterprise: this.searchInfo.regionIds.join(','),
|
||||||
isGenerate: this.policeCameraInfo.riskLevel,
|
// isGenerate: this.policeCameraInfo.riskLevel,
|
||||||
|
isGenerate: 0,
|
||||||
reportDepartmentTeamName: this.policeCameraInfo.reportDepartmentTeamName,
|
reportDepartmentTeamName: this.policeCameraInfo.reportDepartmentTeamName,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 5.1 KiB |
Loading…
x
Reference in New Issue
Block a user