|
@@ -15,12 +15,14 @@
|
|
|
@size-change="dataList"
|
|
|
@current-change="dataList"
|
|
|
@selection-change="selectionChange"
|
|
|
+ :before-open="onCrudBeforOpen"
|
|
|
>
|
|
|
<template #photoLists-form>
|
|
|
- <MultiUpload v-model="form.photoLists" />
|
|
|
+ <MultiUpload ref="multiuploadRef" v-model="form.photoLists" />
|
|
|
</template>
|
|
|
<template #fileLists-form>
|
|
|
<FilesUpload
|
|
|
+ ref="filesUploadRef"
|
|
|
v-model:file-name-list="photoNameList"
|
|
|
v-model:src-list="photoUrlList"
|
|
|
:limit="1"
|
|
@@ -30,9 +32,14 @@
|
|
|
/>
|
|
|
</template>
|
|
|
<template #menu="{ row }">
|
|
|
- <el-button v-if="row.state == '0'" style="color: dodgerblue" link @click="sendMsg(row)">
|
|
|
+ <el-button
|
|
|
+ v-if="row.state == '0'"
|
|
|
+ style="color: dodgerblue"
|
|
|
+ link
|
|
|
+ @click="sendMsg(row)"
|
|
|
+ >
|
|
|
<el-icon>
|
|
|
- <Promotion/>
|
|
|
+ <Promotion />
|
|
|
</el-icon>
|
|
|
发送
|
|
|
</el-button>
|
|
@@ -326,4 +333,18 @@ onMounted(() => {
|
|
|
getDeptList();
|
|
|
getMessageOrgsList();
|
|
|
});
|
|
|
+
|
|
|
+const filesUploadRef = ref();
|
|
|
+const multiuploadRef = ref();
|
|
|
+const onCrudBeforOpen = (done, type) => {
|
|
|
+ done();
|
|
|
+ if (type === "edit") {
|
|
|
+ nextTick(() => {
|
|
|
+ multiuploadRef.value &&
|
|
|
+ multiuploadRef.value.initList(form.value.photoLists);
|
|
|
+ filesUploadRef.value &&
|
|
|
+ filesUploadRef.value.setFileList(form.value.fileLists);
|
|
|
+ });
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|