From c2cb12bcd295512de34023fd3b0943fc8ab75f34 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期二, 19 八月 2025 09:31:41 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
h5/pages/report_dca/report_dca.vue | 103 ++++++++++++++++++++-------------------------------
1 files changed, 41 insertions(+), 62 deletions(-)
diff --git a/h5/pages/report_dca/report_dca.vue b/h5/pages/report_dca/report_dca.vue
index 0c857ff..3b9aeff 100644
--- a/h5/pages/report_dca/report_dca.vue
+++ b/h5/pages/report_dca/report_dca.vue
@@ -33,17 +33,17 @@
</view>
</u-form-item>
<u-form-item label="DCA鍥剧墖" labelWidth="120" prop="multifileList" labelPosition="top" borderBottom>
- <u-upload
- :fileList="model.multifileList"
- @afterRead="afterRead"
- @delete="deletePic"
- multiple
- name="1"
- style="margin-top: 15rpx;" />
+ <UploadImage
+ :fileList="model.multifileList"
+ folder="WORKORDER_FILE_PATH"
+ @dele="deletePic"
+ @getFileList="afterRead"
+ style="margin-top: 15rpx;"
+ />
</u-form-item>
<u-form-item label="閫氱煡浜�" labelWidth="120" prop="notifier" borderBottom required>
- <u--input v-model="model.notifier" border="none" placeholder="璇疯緭鍏ラ�氱煡浜�" disabledColor="#ffffff"
- disabled></u--input>
+ <u--textarea v-model="model.notifier" border="none" placeholder="璇疯緭鍏ラ�氱煡浜�" disabledColor="#ffffff"
+ disabled></u--textarea>
</u-form-item>
</u--form>
<u-button type="primary" text="鎻愪氦" @click="submit" style="margin-top: 60rpx;"></u-button>
@@ -91,9 +91,10 @@
<script>
import { mapState } from 'vuex'
+ import UploadImage from '@/components/uploadImage/uploadImage.vue'
import pengTree from '@/uni_modules/peng-tree/peng-tree/peng-tree.vue'
export default {
- components: { pengTree },
+ components: { pengTree, UploadImage },
computed: {
...mapState(['userInfo'])
},
@@ -164,10 +165,13 @@
time1: new Date().getTime(),
address: [],
theme: [],
- total: 0
+ total: 0,
+ list: []
};
},
onLoad() {
+ this.model.submitDate = uni.$u.timeFormat(new Date().getTime(), 'yyyy-mm-dd hh:MM:ss')
+ this.model.happenTime = uni.$u.timeFormat(new Date().getTime(), 'yyyy-mm-dd hh:MM:ss')
this.model.companyName = this.userInfo.companyName
this.getNotifier()
this.getLocation()
@@ -178,10 +182,17 @@
this.model.dcaYesNum = data.dcaYesNum
this.model.dcaNoNum = data.dcaNoNum
this.model.dcaNoProblemDTOList = data.dcaNoProblemDTOList
+ this.list = data.list
})
},
methods: {
openG() {
+ // this.theme = []
+ this.total = 0
+ this.list = []
+ this.model.dcaYesNum = ''
+ this.model.dcaNoNum = ''
+ this.model.dcaNoProblemDTOList = []
this.stopScroll()
this.show2 = true
},
@@ -190,21 +201,21 @@
this.show2 = false
},
next() {
+ this.canScroll()
+ this.show6 = false
+ },
+ next1() {
this.model.submitDate = ''
this.model.happenTime = ''
- this.model.companyName = ''
this.model.localtionName = ''
this.model.localtionId = ''
this.model.typeId = ''
this.model.typeName = ''
- this.model.notifier = ''
this.model.dcaYesNum = 0
this.model.dcaNoNum = 0
this.model.dcaNoProblemDTOList = []
this.model.multifileList = []
this.model.type = 1
- this.canScroll()
- this.show6 = false
},
toDesc() {
this.canScroll()
@@ -217,6 +228,7 @@
async report() {
let res = await this.$u.api.workOrderCreate(this.model)
if (res.code === 200) {
+ this.next1()
this.show4 = false
this.id = res.data
this.show6 = true
@@ -264,57 +276,24 @@
})
return
}
- uni.navigateTo({
- url: `/pages/type_dca/type_dca?theme=${this.model.typeId}&themeName=${this.model.typeName}`
- })
+ if (this.list.length > 0) {
+ uni.setStorageSync('list', this.list);
+ uni.navigateTo({
+ url: `/pages/type_dca/type_dca?theme=${this.model.typeId}&themeName=${this.model.typeName}&disable=1`
+ })
+ } else {
+ uni.navigateTo({
+ url: `/pages/type_dca/type_dca?theme=${this.model.typeId}&themeName=${this.model.typeName}`
+ })
+ }
},
// 鍒犻櫎鍥剧墖
- deletePic(event) {
- this.model.multifileList.forEach((item, index) => {
- if (item.imgaddr === event.file.imgaddr) {
- this.model.multifileList.splice(index, 1)
- }
- })
+ deletePic(index) {
+ this.model.multifileList.splice(index, 1)
},
// 鏂板鍥剧墖
- async afterRead(event) {
- var that = this
- uni.showLoading({ title: '涓婁紶涓�...', mask: true })
- uni.uploadFile({
- url: this.$baseUrl + '/web/public/uploadBatch',
- files: event.file.map(e => {
- return { name: 'files', uri: e.url }
- }),
- formData: {
- folder: "WORKORDER_FILE_PATH",
- },
- success(res) {
- uni.hideLoading();
- let obj = JSON.parse(res.data)
- if (obj.code === 200) {
- console.log(obj.data)
- obj.data.forEach(item => {
- item.fileurl = item.imgaddr
- })
- that.model.multifileList = [...that.model.multifileList, ...obj.data]
- }
- }
- })
- // uni.uploadFile({
- // url: this.$baseUrl + '/web/public/upload',
- // filePath: event.file.url,
- // name: "file",
- // formData: {
- // folder: "WORKORDER_FILE_PATH"
- // },
- // success: (res) => {
- // let obj = JSON.parse(res.data)
- // if (obj.code === 200) {
- // obj.data.fileurl = obj.data.imgaddr
- // this.model.multifileList.push(obj.data)
- // }
- // }
- // });
+ afterRead(arr) {
+ this.model.multifileList = [...this.model.multifileList, ...arr]
},
submit() {
this.$refs.uForm.validate().then(res => {
--
Gitblit v1.9.3