| | |
| | | > |
| | | <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> |
| | |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "图片裁剪", |
| | | "enablePullDownRefresh" : false |
| | | "enablePullDownRefresh" : false, |
| | | "navigationStyle": "custom" |
| | | } |
| | | } |
| | | ], |
| | |
| | | :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> |
| | | |
| | |
| | | computed: {}, |
| | | onLoad(option) { |
| | | // 选择照片信息 |
| | | let data = JSON.parse(decodeURIComponent(option.item)); |
| | | let data = JSON.parse(option.item); |
| | | console.log(data) |
| | | this.$nextTick(() => { |
| | | const query = uni.createSelectorQuery(); |
| | | query.select('.settingHeadImage').boundingClientRect(); |
| | | query.exec(res => { |
| | |
| | | this.xToTop = this.screenHeight / 2 - this.maxH / 2; |
| | | this.setImageSize(data); |
| | | }); |
| | | }) |
| | | }, |
| | | methods: { |
| | | // 宽高处理 |
| | |
| | | left: 0; |
| | | z-index: 20; |
| | | font-size: 14px; |
| | | width: 100%; |
| | | color: #ffffff; |
| | | } |
| | | } |
| | |
| | | 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({ |