|
|
|
|
@ -34,8 +34,7 @@
|
|
|
|
|
</el-dialog> |
|
|
|
|
</template> |
|
|
|
|
<script lang="ts" setup> |
|
|
|
|
import { ref, defineProps } from 'vue' |
|
|
|
|
import { watch, onMounted } from 'vue' |
|
|
|
|
import { ref, defineProps, watch, onMounted, defineEmits } from 'vue' |
|
|
|
|
import { labelLists } from '@/api/org/label' |
|
|
|
|
import { labelInsert, labelDetail, labelAdd } from '@/api/org/label' |
|
|
|
|
import { ElMessage } from 'element-plus' |
|
|
|
|
@ -47,7 +46,7 @@ const props = defineProps({
|
|
|
|
|
}, |
|
|
|
|
mailId: { |
|
|
|
|
type: String, |
|
|
|
|
default: '2233' |
|
|
|
|
default: '' |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
const visible = ref(props.show) |
|
|
|
|
@ -57,21 +56,20 @@ watch(
|
|
|
|
|
visible.value = val; |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
|
handleDetail() |
|
|
|
|
}) |
|
|
|
|
const handleDetail = () => { |
|
|
|
|
labelDetail(props.mailId).then((res: any) => { |
|
|
|
|
const mailId = JSON.stringify({ mailId: props.mailId }) |
|
|
|
|
labelDetail(JSON.parse(mailId)).then((res: any) => { |
|
|
|
|
console.log(res) |
|
|
|
|
form.mainLabels.value = res.data.map((item: any) => { |
|
|
|
|
return { labelName: item.labelName } |
|
|
|
|
}) |
|
|
|
|
form.value.mainLabels = res |
|
|
|
|
}).catch((err: any) => { |
|
|
|
|
console.log(err) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// onMounted(() => { |
|
|
|
|
// handleDetail() |
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
interface MailLabel { |
|
|
|
|
id: number, |
|
|
|
|
labelName: string |
|
|
|
|
|