""" @author: yy @desc： 查看密钥 @date: 2025-07-21 21:47:17 """
<template>
  <MOSTY.Modal v-model:visible="visible" :show-ok-button="false" title="查看密钥">
    <div>
      <label>密钥</label>
      <el-input v-model="djmy" placeholder="请输入密钥" :disabled="true" />
    </div>
  </MOSTY.Modal>
</template>
<script setup>
import { ref, watch } from "vue"
import * as MOSTY from "@/components/MyComponents/index"
import { getApi2 } from "@/api/tobAcco_api.js"

const props = defineProps({
  id: {
    type: String,
    default: ""
  }
})

const visible = defineModel("visible", {
  type: Boolean,
  default: false
})

const djmy = ref("")

const getDetail = async () => {
  try {
    const res = await getApi2({ id: props.id }, "/mosty-wljc/djcs/detail")
    djmy.value = res.djmy
  } catch (e) {
    console.log(e)
  }
}
watch(
  () => props.id,
  () => {
    if (props.id && visible.value) {
      getDetail()
    }
  }
)
</script>
<style lang="scss" scoped></style>
