46b6767c
刘淇
init 提交到库
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
<template>
<view class="fs-p30">
<tui-form ref="form" :showMessage="false">
<tui-textarea :radius="20" placeholder="请输入巡检描述" isCounter :size="28" :maxlength="100" v-model="formData.remark"></tui-textarea>
<tui-white-space></tui-white-space>
<tui-upload background="#fff" :width="210" :radius="10" :height="210" delColor="#333" custom :serverUrl="serverURL" :header="{'Authorization': userToken}" :limit="3" @complete="complete">
<text class="fs-size__28 fs-color__subtitle fs-weight__400">上传图片</text>
</tui-upload>
</tui-form>
<view class="fs-mt60 fs-flex__center">
<tui-button shape="circle" width="600rpx" height="80rpx" shadow :loading="isLoading" :disabled="isLoading" @click="onSubmit">提 交</tui-button>
</view>
</view>
</template>
<script>
import { uploadURL } from '@/config/app'
import { apiInspectionAdd } from '@/api/work'
const rules = [
{
name: "remark",
rule: ["required"],
msg: ["请输入描述"]
}
]
export default {
data() {
return {
formData: {
type: 1,
remark: '',
imgs: [],
planNo: ''
},
isLoading: false,
serverURL: uploadURL,
id: 0
}
},
onLoad(options) {
this.id = options.id
this.formData.planNo = options.planno
},
methods: {
// 上传完成
complete(e) {
if (e.status == 1) this.formData.imgs = e.imgArr
},
// 提交记录
onSubmit() {
|
20f33942
刘淇
反正多次提交
|
65
66
67
68
69
70
71
72
73
74
75
76
77
|
uni.navigateBack()
// const pages = getCurrentPages()
// const beforePage = pages[pages.length - 2]
// const id = this.id
// setTimeout(() => {
// uni.navigateBack({
// success () {
// // 刷新页面数据
// beforePage.$vm.getInspectionInfo(id)
// }
// })
// }, 1500)
|