|
@@ -5,7 +5,7 @@
|
|
|
<!-- 瓦斯上报列表 -->
|
|
|
<view v-if="statusShow != 'edit'">
|
|
|
<view class="top-gas-list">
|
|
|
- <u-button type="primary" icon="camera-fill" size="small" @click="GalleryFile"
|
|
|
+ <u-button type="primary" icon="camera-fill" size="small" @click="chooseImage"
|
|
|
style="margin: 2px 0px;">图片选取</u-button>
|
|
|
<!-- 图片预览 -->
|
|
|
<view class="imgView">
|
|
@@ -269,7 +269,6 @@ import api from "@/api/api";
|
|
|
import moment from 'moment'
|
|
|
import configService from '@/common/service/config.service.js'
|
|
|
// import stringSimilarity from 'string-similarity'
|
|
|
-import { RHFselcet } from '../../../uni_modules/fz-media-selcet';
|
|
|
export default {
|
|
|
name: 'gasFill',
|
|
|
props: {
|
|
@@ -392,7 +391,9 @@ export default {
|
|
|
username: function () {
|
|
|
return uni.getStorageSync('login_user_info')['realname']
|
|
|
},
|
|
|
-
|
|
|
+ searchTime: function () {
|
|
|
+ return uni.getStorageSync('searchTime')
|
|
|
+ }
|
|
|
},
|
|
|
watch: {
|
|
|
checkState: {
|
|
@@ -413,51 +414,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- console.log(RHFselcet,'RHFselcet')
|
|
|
// this.getSelectList()
|
|
|
-
|
|
|
},
|
|
|
methods: {
|
|
|
- //打开选择器选择
|
|
|
- GalleryFile() {
|
|
|
- let parameter = {
|
|
|
- MediaType:2,//设置选择类型 0: ALL(全部) 1: IMAGE(图片) 2: VIDEO(视频) 3: AUDIO(音频) 不传默认为1图片
|
|
|
- Single:2,//设置单选或多选, 1为单选,2为多选,不传默认为多选
|
|
|
- maxNum:6,//设置最大选中数,不传默认为9 仅多选时生效
|
|
|
- minNum:0,//最少选中数,不传为默认为0 仅多选时生效
|
|
|
- isOriginal:false, //是否开启原图功能,不传默认为false
|
|
|
- isDisplayCamera:true,//是否显示拍摄按钮,不传默认为true
|
|
|
- //语言设置, 0:简体中文,1:繁体,2:英语,3:韩语,4:德语,5:法语,6:日语,7:越语,8:西班牙语,9:葡萄牙语,10:阿拉伯语,11:俄语,12:捷克,13:哈萨克斯坦,不传默认为0
|
|
|
- Language:2,
|
|
|
- //主题界面样式设置,不传为默认样式
|
|
|
- theme:{
|
|
|
- titleBarStyle:{
|
|
|
- TitleBackgroundColor:'#20a0ff'
|
|
|
- },
|
|
|
- bottomNavBarStyle:{
|
|
|
- PreviewNormalTextColor:'#20a0ff',
|
|
|
- PreviewSelectTextColor:'#20a0ff',
|
|
|
- BarBackgroundColor:'#FFFFFF',
|
|
|
- EditorTextColor:'#20a0ff',
|
|
|
- OriginalTextColor:'#20a0ff',
|
|
|
- },
|
|
|
- selectMainStyle:{
|
|
|
- NumberStyle:true, //选中样式是否为数字,不传默认显示勾选样式
|
|
|
- isbtn:true, //完成按钮是否为显示背景,不传为默认不显示按钮背景
|
|
|
- SelectTextColor:'#ffffff',//选择结果文字颜色
|
|
|
- // SelectText:'%1$d/%2$d 完成',
|
|
|
- SelectText:'使用(%1$d)',//选择结果要显示的文字,不传默认显示:已完成
|
|
|
- StatusBarColor:'#20a0ff',
|
|
|
- OriginalTextColor:'#20a0ff',
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- RHFselcet.getPicture( parameter, (data) => {
|
|
|
- let arrData = data.mediaArray
|
|
|
- let jsonData = JSON.stringify(arrData)
|
|
|
- console.log(jsonData)
|
|
|
- });
|
|
|
- },
|
|
|
// hasPermission(param) {
|
|
|
// let permission = uni.getStorageSync('btnPermission')
|
|
|
// return permission.filter(v => v.action == param).length != 0 ? true : false
|
|
@@ -480,72 +439,6 @@ export default {
|
|
|
handlerToggle() {
|
|
|
this.$emit('getBackAddress')
|
|
|
},
|
|
|
- // touchEvent(e) {
|
|
|
- // let that = this
|
|
|
- // // 双指缩放
|
|
|
- // if (e.touches.length === 2) {
|
|
|
- // that.fingers = true
|
|
|
- // // 需要动画可以自行设置时间,个人觉得不需要动画更丝滑,所以设置为0
|
|
|
- // that.animationTime = 0
|
|
|
- // let touch1 = e.touches[0]
|
|
|
- // let touch2 = e.touches[1]
|
|
|
- // let distance = Math.floor(Math.sqrt(Math.pow(touch1.clientX - touch2.clientX, 2) + Math.pow(touch1.clientY - touch2.clientY, 2)))
|
|
|
- // if (that.isFirst) {
|
|
|
- // // 首次缩放 给予初始值
|
|
|
- // that.lastDistance = distance
|
|
|
- // that.isFirst = false
|
|
|
- // } else {
|
|
|
- // // 非首次缩放 计算缩放比例
|
|
|
- // let scale = distance / that.lastDistance
|
|
|
- // if (scale > 1) {
|
|
|
- // if (that.scaleImg < 3) that.scaleImg = that.scaleImg + 0.05
|
|
|
- // } else {
|
|
|
- // if (that.scaleImg > 0.5) that.scaleImg = that.scaleImg - 0.05
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // // 单指移动 fingers(解决双指缩放,手指松开时会导致图片乱移动问题)
|
|
|
- // if (e.touches.length === 1 && that.fingers === false) {
|
|
|
- // that.animationTime = 0
|
|
|
- // const touch = e.touches[0]
|
|
|
- // if (that.isFirst) {
|
|
|
- // // 记录初始位置
|
|
|
- // that.move.x = touch.clientX
|
|
|
- // that.move.y = touch.clientY
|
|
|
- // that.isFirst = false
|
|
|
- // } else {
|
|
|
- // //计算偏移量 (当前位置 - 上一次位置)
|
|
|
- // that.offset.x = touch.clientX - that.move.x
|
|
|
- // that.offset.y = touch.clientY - that.move.y
|
|
|
- // that.move.x = touch.clientX
|
|
|
- // that.move.y = touch.clientY
|
|
|
- // // 通过偏移量设置图片位置
|
|
|
- // that.imgLocation.x = that.imgLocation.x + that.offset.x
|
|
|
- // that.imgLocation.y = that.imgLocation.y + that.offset.y
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- // touchEnd(e) {
|
|
|
- // let that = this
|
|
|
- // // 手指离开时重置
|
|
|
- // if (e.touches.length == 0) {
|
|
|
- // that.isFirst = true
|
|
|
- // that.fingers = false
|
|
|
- // }
|
|
|
- // },
|
|
|
- // dblclickEvent() {
|
|
|
- // let that = this
|
|
|
- // that.animationTime = 1
|
|
|
- // if (that.scaleImg > 1) {
|
|
|
- // that.scaleImg = 1
|
|
|
- // that.imgLocation.x = 0
|
|
|
- // that.imgLocation.y = 0
|
|
|
- // } else {
|
|
|
- // that.scaleImg = 2
|
|
|
- // that.imgLocation.x = 0
|
|
|
- // that.imgLocation.y = 0
|
|
|
- // }
|
|
|
- // },
|
|
|
//图片点击预览
|
|
|
getPreview() {
|
|
|
// this.imgPreShow = true
|
|
@@ -571,6 +464,7 @@ export default {
|
|
|
formData: {
|
|
|
'user': that.username,
|
|
|
'order': that.classType,
|
|
|
+ 'reportdate':that.searchTime,
|
|
|
'checkorder': Number(that.checkNum)
|
|
|
},
|
|
|
success: (res) => {
|