|
|
|
|
@ -35,10 +35,9 @@
|
|
|
|
|
</template> |
|
|
|
|
<script lang="ts" setup> |
|
|
|
|
import { ref, defineProps } from 'vue' |
|
|
|
|
import { watch } from 'vue' |
|
|
|
|
import { watch, onMounted } from 'vue' |
|
|
|
|
import { labelLists } from '@/api/org/label' |
|
|
|
|
import { labelAdd } from '@/api/org/label' |
|
|
|
|
import { labelInsert } from '@/api/org/label' |
|
|
|
|
import { labelInsert, labelDetail, labelAdd } from '@/api/org/label' |
|
|
|
|
import { ElMessage } from 'element-plus' |
|
|
|
|
const emit = defineEmits(['update']) |
|
|
|
|
const props = defineProps({ |
|
|
|
|
@ -48,7 +47,7 @@ const props = defineProps({
|
|
|
|
|
}, |
|
|
|
|
mailId: { |
|
|
|
|
type: String, |
|
|
|
|
default: '' |
|
|
|
|
default: '2233' |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
const visible = ref(props.show) |
|
|
|
|
@ -58,6 +57,20 @@ watch(
|
|
|
|
|
visible.value = val; |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
const handleDetail = () => { |
|
|
|
|
labelDetail(props.mailId).then((res: any) => { |
|
|
|
|
console.log(res) |
|
|
|
|
form.mainLabels.value = res.data.map((item: any) => { |
|
|
|
|
return { labelName: item.labelName } |
|
|
|
|
}) |
|
|
|
|
}).catch((err: any) => { |
|
|
|
|
console.log(err) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// onMounted(() => { |
|
|
|
|
// handleDetail() |
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
interface MailLabel { |
|
|
|
|
id: number, |
|
|
|
|
@ -104,6 +117,7 @@ const handleSubmit = () => {
|
|
|
|
|
}) |
|
|
|
|
console.log(form.value.mainLabels) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
|