|
@@ -1,6 +1,13 @@
|
|
|
<template>
|
|
|
- <hc-new-card>
|
|
|
- 11111
|
|
|
+ <hc-new-card :title="rowItem.id ? '编辑证书' : '新增证书'">
|
|
|
+ 22213
|
|
|
+
|
|
|
+ <template #action>
|
|
|
+ <div class="hc-flex-center">
|
|
|
+ <el-button hc-btn class="mr-4" @click="cancelClick">取消</el-button>
|
|
|
+ <el-button hc-btn type="primary">提交</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</hc-new-card>
|
|
|
</template>
|
|
|
|
|
@@ -11,15 +18,16 @@ import adminApi from '~api/certificate/admin'
|
|
|
import mainApi from '~api/certificate/list'
|
|
|
|
|
|
const props = defineProps({
|
|
|
- cid: {
|
|
|
- type: [String, Number],
|
|
|
- default: '',
|
|
|
+ info: {
|
|
|
+ type: Object,
|
|
|
+ default: () => ({}),
|
|
|
},
|
|
|
})
|
|
|
|
|
|
+const emit = defineEmits(['close'])
|
|
|
+
|
|
|
//监听内容
|
|
|
-const contractId = ref(props.cid)
|
|
|
-const currentId = ref(props.cid)
|
|
|
+const rowItem = ref(props.info)
|
|
|
|
|
|
//渲染完成
|
|
|
onMounted(() => {
|
|
@@ -28,7 +36,11 @@ onMounted(() => {
|
|
|
|
|
|
//获取数据
|
|
|
const getDataApi = () => {
|
|
|
- if (isNullES(contractId.value)) return
|
|
|
- console.log('contractId', contractId.value)
|
|
|
+ console.log('rowItem:', rowItem.value)
|
|
|
+}
|
|
|
+
|
|
|
+//取消关闭
|
|
|
+const cancelClick = () => {
|
|
|
+ emit('close')
|
|
|
}
|
|
|
</script>
|