Browse Source

上传图片icon样式

wyx
fp 1 month ago
parent
commit
6a0b0520a7
  1. 2
      pages.json
  2. 26
      pages/tabBar/sdPage/dfReport.vue
  3. 36
      pages/tabBar/sdPage/sfReport.vue
  4. 6
      pages/tabBar/work/index.vue
  5. 89
      pages/tabBar/xjPage/xj.vue
  6. BIN
      static/img/camera-icon.png

2
pages.json

@ -46,7 +46,7 @@
{
"path": "pages/tabBar/xjPage/xj",
"style": {
"navigationBarTitleText": "巡检",
"navigationBarTitleText": "巡检上报",
"disableScroll": true
}
},

26
pages/tabBar/sdPage/dfReport.vue

@ -39,7 +39,6 @@
<view class="section-card">
<view class="meter-row">
<text class="meter-label">水表号</text>
<!-- <text>20072620</text> -->
<u-input v-model="form.waterMeter" type="digit" placeholder="请输入水表号" border="none" />
</view>
<view class="meter-row">
@ -66,7 +65,9 @@
@delete="onDelete"
>
<view class="custom-upload-btn">
<u-icon name="plus" size="40"></u-icon>
<view class="icon-box">
<image class="camera-icon" src="/static/img/camera-icon.png" mode="aspectFill"></image>
</view>
<view class="upload-tips">点击上传</view>
</view>
</u-upload>
@ -104,10 +105,6 @@ export default {
} else if(type == '房屋'){
this.form.pickerValue2 = this.items[e.detail.value]
}
},
onDeviceChange(idx, val) {
this.deviceList[idx].status = val
},
afterRead(event) {
let files = Array.isArray(event) ? event : [event]
@ -264,6 +261,19 @@ display: flex;
justify-content: center;
margin: 20rpx 16rpx 0 0;
}
.icon-box{
width: 60rpx;
height: 60rpx;
background: #ceeced;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.camera-icon{
width: 36rpx;
height: 36rpx;
}
.upload-tips {
color: #bbb;
font-size: 24rpx;
@ -293,13 +303,13 @@ display: flex;
font-size: 36rpx;
border-radius: 48rpx !important;
border: none;
width: 80vw;
width: 80%;
height: 88rpx;
}
</style>
<style>
.dfReport .u-input{
.dfReport .u-input__content__field-wrapper__field{
text-align: right !important;
}
</style>

36
pages/tabBar/sdPage/sfReport.vue

@ -66,7 +66,9 @@
@delete="onDelete"
>
<view class="custom-upload-btn">
<u-icon name="plus" size="40"></u-icon>
<view class="icon-box">
<image class="camera-icon" src="/static/img/camera-icon.png" mode="aspectFill"></image>
</view>
<view class="upload-tips">点击上传</view>
</view>
</u-upload>
@ -74,8 +76,9 @@
</view>
<!-- 提交按钮 -->
<view class="submit-btn-wrap">
<u-button class="u-button--primary" type="primary" shape="circle" @click="onSubmit">提交</u-button>
<view class="u-button--primary" @click="onSubmit">提交
<!-- <u-button class="u-button--primary" type="primary" shape="circle" @click="onSubmit">提交</u-button> -->
</view>
</view>
</template>
@ -104,10 +107,6 @@ export default {
} else if(type == '房屋'){
this.form.pickerValue2 = this.items[e.detail.value]
}
},
onDeviceChange(idx, val) {
this.deviceList[idx].status = val
},
afterRead(event) {
let files = Array.isArray(event) ? event : [event]
@ -264,6 +263,19 @@ display: flex;
justify-content: center;
margin: 20rpx 16rpx 0 0;
}
.icon-box{
width: 60rpx;
height: 60rpx;
background: #ceeced;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.camera-icon{
width: 36rpx;
height: 36rpx;
}
.upload-tips {
color: #bbb;
font-size: 24rpx;
@ -290,17 +302,23 @@ display: flex;
}
.u-button--primary {
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(90deg, #0DC6C6 0%, #13C2C2 100%) !important;
font-size: 36rpx;
border-radius: 48rpx !important;
border: none;
width: 80vw;
margin: auto;
margin-top: 40rpx;
width: 80%;
height: 88rpx;
color: rgba(255, 255, 255, 1);
}
</style>
<style>
.sfReport .u-input{
.sfReport .u-input__content__field-wrapper__field{
text-align: right !important;
}
</style>

6
pages/tabBar/work/index.vue

@ -67,8 +67,8 @@ export default {
{ image: '/static/img/强制清退.png', text: '强制清退' },
],
xjList: [
{ image: '/static/img/巡查.png', text: '巡检' },
{ image: '/static/img/记录.png', text: '记录' },
{ image: '/static/img/巡查.png', text: '巡检上报' },
{ image: '/static/img/记录.png', text: '巡检记录' },
],
sdList: [
{ image: '/static/img/水费.png', text: '水费上报' },
@ -118,7 +118,7 @@ export default {
}
},
handelXjClick (item) {
if (item.text === '巡检') {
if (item.text === '巡检上报') {
//
uni.navigateTo({
url: '/pages/tabBar/xjPage/xj'

89
pages/tabBar/xjPage/xj.vue

@ -5,9 +5,9 @@
<view class="xjTitle">填写信息</view>
<view class="xjTips">请您填写相关问题</view>
<view class="conItem">
<u--form labelPosition="left" :model="userInfo" ref="uForm">
<u-form labelPosition="left" :rules="rules" :model="userInfo" ref="uForm">
<u-form-item labelAlign="right" labelWidth="100px" label="乐业社区" prop="userInfo.sex" borderBottom
<u-form-item labelAlign="right" labelWidth="100px" label="乐业社区" prop="sex" borderBottom
@click="lysqShow = true; hideKeyboard()" ref="item1">
<u--input v-model="userInfo.sex" disabled disabledColor="#ffffff" placeholder="请选择" border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
@ -26,9 +26,31 @@
<u-form-item labelAlign="right" labelWidth="100px" label="问题描述" prop="userInfo.sex" borderBottom ref="item1">
<u--textarea v-model="userInfo.sex" placeholder="请输入内容" count maxlength="500"></u--textarea>
</u-form-item>
<u-form-item labelAlign="right" labelWidth="120px" label="上传图片/视频" prop="userInfo.sex" borderBottom ref="item1">
<u-upload
v-model="fileList"
:max-count="10"
:multiple="true"
:preview-full-image="true"
:deletable="true"
:show-upload-list="true"
:file-list="fileList"
accept="image"
@after-read="afterRead"
@delete="onDelete"
>
<view class="custom-upload-btn">
<view class="icon-box">
<image class="camera-icon" src="/static/img/camera-icon.png" mode="aspectFill"></image>
</view>
<view class="upload-tips">点击上传</view>
</view>
</u-upload>
</u-form-item>
</u--form>
</u-form>
</view>
<view class="conItem" style="margin-top: 40rpx;">
@ -72,16 +94,34 @@ export default {
name: '',
phone: '',
},
rules:{
sex:[
{ required: true, message: '请输入', trigger: 'blur' }
]
},
radio: '',
switchVal: false,
fileList: [],
}
},
onLoad () {
},
methods: {
afterRead(event) {
let files = Array.isArray(event) ? event : [event]
this.fileList = this.fileList.concat(files)
},
onDelete(event) {
this.fileList.splice(event.index, 1)
},
handleBtn () {
this.$refs['uForm'].validate((valid) => {
if (valid) {
console.log(this.userInfo);
}
})
},
sexSelect (e) {
this.model1.userInfo.sex = e.name
@ -148,4 +188,47 @@ export default {
margin: auto;
margin-top: 40rpx;
}
.custom-upload-btn {
width: 160rpx;
height: 160rpx;
background: #fafafa;
border: 2rpx solid #f0f0f0;
border-radius: 16rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: 20rpx 16rpx 0 0;
}
.icon-box{
width: 60rpx;
height: 60rpx;
background: #ceeced;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.camera-icon{
width: 36rpx;
height: 36rpx;
}
.upload-tips {
color: #bbb;
font-size: 24rpx;
margin-top: 8rpx;
}
.u-upload__wrap {
display: flex;
flex-wrap: wrap;
align-items: center;
margin-top: 20rpx;
}
.u-upload__preview {
border-radius: 16rpx;
overflow: hidden;
margin-right: 16rpx;
margin-bottom: 16rpx;
}
</style>

BIN
static/img/camera-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

Loading…
Cancel
Save