admin/src/views/business/deviceEvent.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
h5/pages.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
h5/pages/cropping/cropping.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
h5/pages/userinfo/userinfo.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
admin/src/views/business/deviceEvent.vue
@@ -54,9 +54,9 @@ > <el-table-column prop="userType" label="人员类型" min-width="100px"> <template slot-scope="{row}"> <span v-if="row.personType === 0">劳务访客</span> <span v-if="row.personType === 1">普通访客</span> <span v-if="row.personType === 2">内部人员</span> <span v-if="row.personType == 0">劳务访客</span> <span v-if="row.personType == 1">普通访客</span> <span v-if="row.personType == 2">内部人员</span> <span v-if="row.personType == null">外来访客</span> </template> </el-table-column> h5/pages.json
@@ -117,7 +117,8 @@ "style" : { "navigationBarTitleText" : "图片裁剪", "enablePullDownRefresh" : false "enablePullDownRefresh" : false, "navigationStyle": "custom" } } ], h5/pages/cropping/cropping.vue
@@ -8,7 +8,10 @@ :style="{ width: preImgW + 'px', height: preImgH + 'px', transform: `translate(${x}px,${y}px)` }"></canvas> </view> <!-- 工具 --> <view class="setting-btns"><text @click="onCrop">确定</text></view> <view class="setting-btns"> <!-- <text @click="onCrop">确定</text> --> <u-button text="确定" @click="onCrop"></u-button> </view> </view> </template> @@ -39,20 +42,23 @@ computed: {}, onLoad(option) { // 选择照片信息 let data = JSON.parse(decodeURIComponent(option.item)); const query = uni.createSelectorQuery(); query.select('.settingHeadImage').boundingClientRect(); query.exec(res => { // 设置屏幕大小 this.screenWidth = res[0].width; this.screenHeight = res[0].height; // 设置图像基准值,图像基准值按屏幕宽度设置,两边留白各40 this.maxH = res[0].width - 80; this.maxW = res[0].width - 80; // 设置X轴值,算式:屏幕高度的一半减去基准框高度的一半 this.xToTop = this.screenHeight / 2 - this.maxH / 2; this.setImageSize(data); }); let data = JSON.parse(option.item); console.log(data) this.$nextTick(() => { const query = uni.createSelectorQuery(); query.select('.settingHeadImage').boundingClientRect(); query.exec(res => { // 设置屏幕大小 this.screenWidth = res[0].width; this.screenHeight = res[0].height; // 设置图像基准值,图像基准值按屏幕宽度设置,两边留白各40 this.maxH = res[0].width - 80; this.maxW = res[0].width - 80; // 设置X轴值,算式:屏幕高度的一半减去基准框高度的一半 this.xToTop = this.screenHeight / 2 - this.maxH / 2; this.setImageSize(data); }); }) }, methods: { // 宽高处理 @@ -274,6 +280,7 @@ left: 0; z-index: 20; font-size: 14px; width: 100%; color: #ffffff; } } h5/pages/userinfo/userinfo.vue
@@ -153,6 +153,11 @@ upload(type) { uni.chooseImage({ success: (chooseImageRes) => { // console.log(chooseImageRes.tempFilePaths[0]) uni.navigateTo({ url: `/pages/cropping/cropping?item=${JSON.stringify({ tempFilePath: chooseImageRes.tempFilePaths[0] })}` }) return uni.showLoading({ title: '上传中', mask: true }); for (let i = 0; i < chooseImageRes.tempFilePaths.length; i++) { uni.uploadFile({