|
@@ -1,12 +1,12 @@
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import { useDataDictStore } from '@/store/modules/dataDict';
|
|
import { useDataDictStore } from '@/store/modules/dataDict';
|
|
|
- import { onMounted, reactive, ref, computed, getCurrentInstance, watch } from 'vue';
|
|
|
|
|
|
|
+import { onMounted, reactive, ref, computed, getCurrentInstance, watch } from 'vue';
|
|
|
|
|
|
|
|
import tpfTimeRange from '@/components/tpf-time-range/tpf-time-range.vue';
|
|
import tpfTimeRange from '@/components/tpf-time-range/tpf-time-range.vue';
|
|
|
- import deviceTransfer from '@/components/device-transfer/index.vue';
|
|
|
|
|
|
|
+import deviceTransfer from '@/components/device-transfer/index.vue';
|
|
|
|
|
|
|
|
import { updateRuiDuReportBatch, getRuiDuReportAttrs } from '@/api/ruiDu.js';
|
|
import { updateRuiDuReportBatch, getRuiDuReportAttrs } from '@/api/ruiDu.js';
|
|
|
- import config from '@/utils/config';
|
|
|
|
|
|
|
+import config from '@/utils/config';
|
|
|
|
|
|
|
|
import { getTenantId, getAccessToken } from '@/utils/auth.js';
|
|
import { getTenantId, getAccessToken } from '@/utils/auth.js';
|
|
|
|
|
|
|
@@ -180,6 +180,8 @@
|
|
|
responseData.push(data);
|
|
responseData.push(data);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ console.log('responseData :>> ', responseData);
|
|
|
|
|
+
|
|
|
// 提交表单
|
|
// 提交表单
|
|
|
updateRuiDuReportBatch(responseData).then(res => {
|
|
updateRuiDuReportBatch(responseData).then(res => {
|
|
|
// 提交成功
|
|
// 提交成功
|
|
@@ -232,11 +234,13 @@
|
|
|
|
|
|
|
|
console.log('props.reportData :>> ', props.reportData);
|
|
console.log('props.reportData :>> ', props.reportData);
|
|
|
|
|
|
|
|
- if (props.formDisable) {
|
|
|
|
|
- form.platformIds = props.reportData.platforms?.map(v => v.reportId) ?? [];
|
|
|
|
|
- } else {
|
|
|
|
|
- form.platformIds = [props.reportData.id];
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ form.platformIds = props.reportData.platforms?.map(v => v.reportId) ?? [];
|
|
|
|
|
+
|
|
|
|
|
+ // if (props.formDisable) {
|
|
|
|
|
+
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // form.platformIds = [props.reportData.id];
|
|
|
|
|
+ // }
|
|
|
|
|
|
|
|
if (props.reportData.platformWell === 1) {
|
|
if (props.reportData.platformWell === 1) {
|
|
|
props.reportData.platforms.forEach(p => {
|
|
props.reportData.platforms.forEach(p => {
|
|
@@ -263,12 +267,12 @@
|
|
|
// 附件
|
|
// 附件
|
|
|
form.attachments = props.reportData.attachments || [];
|
|
form.attachments = props.reportData.attachments || [];
|
|
|
// 展示用的文件列表
|
|
// 展示用的文件列表
|
|
|
- attachmentsFileList.value =
|
|
|
|
|
- props.reportData?.attachments?.map(item => ({
|
|
|
|
|
- ...item,
|
|
|
|
|
- name: item.filename,
|
|
|
|
|
- url: item.filePath,
|
|
|
|
|
- })) || [];
|
|
|
|
|
|
|
+ // attachmentsFileList.value =
|
|
|
|
|
+ // props.reportData?.attachments?.map(item => ({
|
|
|
|
|
+ // ...item,
|
|
|
|
|
+ // name: item.filename,
|
|
|
|
|
+ // url: item.filePath,
|
|
|
|
|
+ // })) || [];
|
|
|
};
|
|
};
|
|
|
// 初始化时间范围
|
|
// 初始化时间范围
|
|
|
const timeRangeFormat = () => {
|
|
const timeRangeFormat = () => {
|
|
@@ -350,8 +354,6 @@
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- console.log('11 :>> ', 11);
|
|
|
|
|
-
|
|
|
|
|
form.attachments.push({
|
|
form.attachments.push({
|
|
|
bizId: props.reportId,
|
|
bizId: props.reportId,
|
|
|
category: 'daily_report',
|
|
category: 'daily_report',
|
|
@@ -362,8 +364,6 @@
|
|
|
remark: '',
|
|
remark: '',
|
|
|
type: 'attachment',
|
|
type: 'attachment',
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
- console.log('form.attachments :>> ', form.attachments);
|
|
|
|
|
},
|
|
},
|
|
|
fail: e => {
|
|
fail: e => {
|
|
|
file.status = 'fail';
|
|
file.status = 'fail';
|
|
@@ -762,7 +762,7 @@
|
|
|
<view class="file-list item-col" v-else>
|
|
<view class="file-list item-col" v-else>
|
|
|
<view v-for="(file, index) in form.attachments" :key="index">
|
|
<view v-for="(file, index) in form.attachments" :key="index">
|
|
|
{{ file.filename }}
|
|
{{ file.filename }}
|
|
|
- <button @click="downloadFile(file)" type="primary" size="mini" class="file-picker-btn">下载文件</button>
|
|
|
|
|
|
|
+ <!-- <button @click="downloadFile(file)" type="primary" size="mini" class="file-picker-btn">下载文件</button> -->
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
@@ -972,7 +972,7 @@
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
align-items: end;
|
|
align-items: end;
|
|
|
justify-content: end;
|
|
justify-content: end;
|
|
|
- width: 300px;
|
|
|
|
|
|
|
+ max-width: 300px;
|
|
|
|
|
|
|
|
& > view {
|
|
& > view {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
@@ -1030,7 +1030,7 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.item-col {
|
|
.item-col {
|
|
|
- float: right;
|
|
|
|
|
|
|
+ justify-content: end;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.time-range-item {
|
|
.time-range-item {
|