Browse Source

回显图片问题

ops-management-platform-frontend-dev
wbc 3 weeks ago
parent
commit
26a4d03d65
  1. 1
      src/views/IO/delayPatrol/waitAudit/faultModal.vue
  2. 21
      src/views/IO/workOrder/delayAudit/detailDrawer.vue
  3. 42
      src/views/IO/workOrder/orderAudit/detailDrawer.vue
  4. 42
      src/views/IO/workOrder/orderHandle/detailDrawer.vue
  5. 42
      src/views/IO/workOrder/orderSearch/detailDrawer.vue
  6. 42
      src/views/IO/workOrder/orderSend/detailDrawer.vue
  7. 4
      src/views/property/point/pointModal.vue

1
src/views/IO/delayPatrol/waitAudit/faultModal.vue

@ -138,6 +138,7 @@
:headers="headers" :headers="headers"
accept='.jpg,.jpeg,.png,.gif,.webp' accept='.jpg,.jpeg,.png,.gif,.webp'
@change="handleChange" @change="handleChange"
list-type="picture"
> >
<a-button type="primary"> 上传图片 </a-button> <a-button type="primary"> 上传图片 </a-button>
</a-upload> </a-upload>

21
src/views/IO/workOrder/delayAudit/detailDrawer.vue

@ -80,9 +80,12 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">故障图片</span> ><span class="titleLabel">故障图片</span>
<div v-for="(item, index) in detail.attachments" :key="index"> <a-upload
<img alt="" :src="item.url" /> v-model:file-list="fileLists"
</div> list-type="picture"
disabled
>
</a-upload>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -189,6 +192,7 @@
value: 6, value: 6,
}, },
]; ];
const fileLists = ref([])
const progress = ref([]); const progress = ref([]);
const statusText = (val) => { const statusText = (val) => {
return statusOptions.find((i) => { return statusOptions.find((i) => {
@ -199,10 +203,20 @@
const visible = ref(false); const visible = ref(false);
const showDrawer = async (id) => { const showDrawer = async (id) => {
visible.value = true; visible.value = true;
fileLists.value= []
const data = await getInfo(id); const data = await getInfo(id);
for (let i in detail) { for (let i in detail) {
detail[i] = data[i]; detail[i] = data[i];
} }
if (detail.attachments && detail.attachments.length > 0) {
detail.attachments.forEach((i) => {
fileLists.value.push({
url: i.url,
name: i.name,
status: 'done',
});
});
}
const progressLine = await queryProcess(id); const progressLine = await queryProcess(id);
progress.value = progressLine; progress.value = progressLine;
console.log(progress.value); console.log(progress.value);
@ -254,6 +268,7 @@
detail, detail,
statusText, statusText,
progress, progress,
fileLists
}; };
}, },
}); });

42
src/views/IO/workOrder/orderAudit/detailDrawer.vue

@ -80,9 +80,12 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">故障图片</span> ><span class="titleLabel">故障图片</span>
<div v-for="(item, index) in detail.attachments" :key="index"> <a-upload
<img alt="" :src="item.url" /> v-model:file-list="fileLists"
</div> list-type="picture"
disabled
>
</a-upload>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -120,9 +123,12 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">处理图片</span> ><span class="titleLabel">处理图片</span>
<div v-for="(item, index) in dealDetail.attachments" :key="index"> <a-upload
<img alt="" :src="item.url" /> v-model:file-list="fileLists1"
</div> list-type="picture"
disabled
>
</a-upload>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -199,6 +205,8 @@
cost: '', cost: '',
attachments: '', attachments: '',
}); });
const fileLists = ref([])
const fileLists1 = ref([])
const progress = ref([]); const progress = ref([]);
const statusOptions = [ const statusOptions = [
{ {
@ -293,6 +301,8 @@
const visible = ref(false); const visible = ref(false);
const showDrawer = async (id) => { const showDrawer = async (id) => {
visible.value = true; visible.value = true;
fileLists.value= []
fileLists1.value= []
const data = await getInfo(id); const data = await getInfo(id);
for (let i in detail) { for (let i in detail) {
detail[i] = data[i]; detail[i] = data[i];
@ -306,6 +316,24 @@
dealDetail[i] = data1[i]; dealDetail[i] = data1[i];
} }
} }
if (detail.attachments && detail.attachments.length > 0) {
detail.attachments.forEach((i) => {
fileLists.value.push({
url: i.url,
name: i.name,
status: 'done',
});
});
}
if (dealDetail.attachments && dealDetail.attachments.length > 0) {
dealDetail.attachments.forEach((i) => {
fileLists1.value.push({
url: i.url,
name: i.name,
status: 'done',
});
});
}
const data2 = await getOrderDelayHistory(id); const data2 = await getOrderDelayHistory(id);
if (data2) { if (data2) {
delayInfo.value = data2; delayInfo.value = data2;
@ -362,6 +390,8 @@
dealDetail, dealDetail,
statusText, statusText,
progress, progress,
fileLists,
fileLists1
}; };
}, },
}); });

42
src/views/IO/workOrder/orderHandle/detailDrawer.vue

@ -80,9 +80,12 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">故障图片</span> ><span class="titleLabel">故障图片</span>
<div v-for="(item, index) in detail.attachments" :key="index"> <a-upload
<img alt="" :src="item.url" /> v-model:file-list="fileLists"
</div> list-type="picture"
disabled
>
</a-upload>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -120,9 +123,12 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">处理图片</span> ><span class="titleLabel">处理图片</span>
<div v-for="(item, index) in dealDetail.attachments" :key="index"> <a-upload
<img alt="" :src="item.url" /> v-model:file-list="fileLists1"
</div> list-type="picture"
disabled
>
</a-upload>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -201,6 +207,8 @@
cost: '', cost: '',
attachments: '', attachments: '',
}); });
const fileLists = ref([])
const fileLists1 = ref([])
const progress = ref([]); const progress = ref([]);
const statusOptions = [ const statusOptions = [
{ {
@ -295,10 +303,21 @@
const visible = ref(false); const visible = ref(false);
const showDrawer = async (id) => { const showDrawer = async (id) => {
visible.value = true; visible.value = true;
fileLists.value= []
fileLists1.value= []
const data = await getInfo(id); const data = await getInfo(id);
for (let i in detail) { for (let i in detail) {
detail[i] = data[i]; detail[i] = data[i];
} }
if (detail.attachments && detail.attachments.length > 0) {
detail.attachments.forEach((i) => {
fileLists.value.push({
url: i.url,
name: i.name,
status: 'done',
});
});
}
const progressLine = await queryProcess(id); const progressLine = await queryProcess(id);
progress.value = progressLine; progress.value = progressLine;
console.log(progress.value); console.log(progress.value);
@ -308,6 +327,15 @@
dealDetail[i] = data1[i]; dealDetail[i] = data1[i];
} }
} }
if (dealDetail.attachments && dealDetail.attachments.length > 0) {
dealDetail.attachments.forEach((i) => {
fileLists1.value.push({
url: i.url,
name: i.name,
status: 'done',
});
});
}
const data2 = await getOrderDelayHistory(id); const data2 = await getOrderDelayHistory(id);
if (data2) { if (data2) {
delayInfo.value = data2; delayInfo.value = data2;
@ -365,6 +393,8 @@
dealDetail, dealDetail,
statusText, statusText,
progress, progress,
fileLists,
fileLists1
}; };
}, },
}); });

42
src/views/IO/workOrder/orderSearch/detailDrawer.vue

@ -80,9 +80,12 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">故障图片</span> ><span class="titleLabel">故障图片</span>
<div v-for="(item, index) in detail.attachments" :key="index"> <a-upload
<img alt="" :src="item.url" /> v-model:file-list="fileLists"
</div> list-type="picture"
disabled
>
</a-upload>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -120,9 +123,12 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">处理图片</span> ><span class="titleLabel">处理图片</span>
<div v-for="(item, index) in dealDetail.attachments" :key="index"> <a-upload
<img alt="" :src="item.url" /> v-model:file-list="fileLists1"
</div> list-type="picture"
disabled
>
</a-upload>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -201,6 +207,8 @@
cost: '', cost: '',
attachments: '', attachments: '',
}); });
const fileLists = ref([])
const fileLists1 = ref([])
const progress = ref([]); const progress = ref([]);
const statusOptions = [ const statusOptions = [
{ {
@ -295,10 +303,21 @@
const visible = ref(false); const visible = ref(false);
const showDrawer = async (id) => { const showDrawer = async (id) => {
visible.value = true; visible.value = true;
fileLists.value= []
fileLists1.value= []
const data = await getInfo(id); const data = await getInfo(id);
for (let i in detail) { for (let i in detail) {
detail[i] = data[i]; detail[i] = data[i];
} }
if (detail.attachments && detail.attachments.length > 0) {
detail.attachments.forEach((i) => {
fileLists.value.push({
url: i.url,
name: i.name,
status: 'done',
});
});
}
const progressLine = await queryProcess(id); const progressLine = await queryProcess(id);
progress.value = progressLine; progress.value = progressLine;
console.log(progress.value); console.log(progress.value);
@ -308,6 +327,15 @@
dealDetail[i] = data1[i]; dealDetail[i] = data1[i];
} }
} }
if (dealDetail.attachments && dealDetail.attachments.length > 0) {
dealDetail.attachments.forEach((i) => {
fileLists1.value.push({
url: i.url,
name: i.name,
status: 'done',
});
});
}
const data2 = await getOrderDelayHistory(id); const data2 = await getOrderDelayHistory(id);
if (data2) { if (data2) {
delayInfo.value = data2; delayInfo.value = data2;
@ -365,6 +393,8 @@
dealDetail, dealDetail,
statusText, statusText,
progress, progress,
fileLists,
fileLists1
}; };
}, },
}); });

42
src/views/IO/workOrder/orderSend/detailDrawer.vue

@ -80,9 +80,12 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">故障图片</span> ><span class="titleLabel">故障图片</span>
<div v-for="(item, index) in detail.attachments" :key="index"> <a-upload
<img alt="" :src="item.url" /> v-model:file-list="fileLists"
</div> list-type="picture"
disabled
>
</a-upload>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -120,9 +123,12 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">处理图片</span> ><span class="titleLabel">处理图片</span>
<div v-for="(item, index) in dealDetail.attachments" :key="index"> <a-upload
<img alt="" :src="item.url" /> v-model:file-list="fileLists1"
</div> list-type="picture"
disabled
>
</a-upload>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -199,6 +205,8 @@
cost: '', cost: '',
attachments: '', attachments: '',
}); });
const fileLists = ref([])
const fileLists1 = ref([])
const progress = ref([]); const progress = ref([]);
const statusOptions = [ const statusOptions = [
{ {
@ -293,6 +301,8 @@
const visible = ref(false); const visible = ref(false);
const showDrawer = async (id) => { const showDrawer = async (id) => {
visible.value = true; visible.value = true;
fileLists.value= []
fileLists1.value= []
const data = await getInfo(id); const data = await getInfo(id);
for (let i in detail) { for (let i in detail) {
detail[i] = data[i]; detail[i] = data[i];
@ -306,6 +316,24 @@
dealDetail[i] = data1[i]; dealDetail[i] = data1[i];
} }
} }
if (detail.attachments && detail.attachments.length > 0) {
detail.attachments.forEach((i) => {
fileLists.value.push({
url: i.url,
name: i.name,
status: 'done',
});
});
}
if (dealDetail.attachments && dealDetail.attachments.length > 0) {
dealDetail.attachments.forEach((i) => {
fileLists1.value.push({
url: i.url,
name: i.name,
status: 'done',
});
});
}
const data2 = await getOrderDelayHistory(id); const data2 = await getOrderDelayHistory(id);
if (data2) { if (data2) {
delayInfo.value = data2; delayInfo.value = data2;
@ -363,6 +391,8 @@
dealDetail, dealDetail,
statusText, statusText,
progress, progress,
fileLists,
fileLists1
}; };
}, },
}); });

4
src/views/property/point/pointModal.vue

@ -121,8 +121,8 @@
<a-col :span="12"> <a-col :span="12">
<a-form-item label="是否派遣" name="isDispatched"> <a-form-item label="是否派遣" name="isDispatched">
<a-radio-group v-model:value="form.isDispatched"> <a-radio-group v-model:value="form.isDispatched">
<a-radio :value="1"></a-radio> <a-radio value="是"></a-radio>
<a-radio :value="0"></a-radio> <a-radio value="否"></a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
</a-col> </a-col>

Loading…
Cancel
Save