import dayjs from 'dayjs'; export const useIpListDetail = () => { const intelligenceLabels = ref([]) as any const topDetailList = ref([]) as any const riskLevel = ref(2) const confidenceLevel = ref(2) const detailTitle = ref('185.7.214.104') const tabs = ref([ { title: '情报聚合' }, { title: '异常行为', disabled: true }, { title: 'IP WHOIS' }, { title: 'IP 反查' }, { title: '开放端口' }, { title: '数字证书', disabled: true }, { title: 'Graph', disabled: true } ]) const currentName = ref('情报聚合') // 情报聚合 const openSourceTableData = ref([]) as any const openSourceTableColumn = reactive([ { prop: "name", label: "情报源", minWidth: '150px', }, { prop: "tags", label: "情报标签", minWidth: '500px', slotName: 'tags' }, { prop: "time", label: "时间", }, ]) // 相关样本 const relatedSampleTableData = ref([]) as any const relatedSampleTableColumn = reactive([ { prop: "name", label: "情报源", minWidth: '300px', }, { prop: "maliciousTypes", label: "恶意类型", minWidth: '150px', }, { prop: "home", label: "家族/团伙", minWidth: '300px', }, { prop: "tags", label: "情报标签", width: '400px', slotName: 'tags' }, { prop: "time", label: "发现", minWidth: '180px' }, ]) // 相关事件 const relatedEventsTableData = ref([]) as any const relatedEventsTableColumn = reactive([ { prop: "name", label: "情报源", minWidth: '150px', }, { prop: "tags", label: "情报标签", minWidth: '500px', slotName: 'tags' }, { prop: "author", label: "发布者", minWidth: '150px', }, { prop: "time", label: "时间", }, ]) function init() { getPageData() } async function getPageData() { openSourceTableData.value = [ { name: '开源情报', tags: [{ name: 'automatic-collection', type: 'default' }], time: dayjs().format('YYYY-MM-DD') }, { name: '开源情报', tags: [{ name: 'port scan', type: 'default' }], time: dayjs().format('YYYY-MM-DD') }, { name: '开源情报', tags: [{ name: '可疑', type: 'waring' }], time: dayjs().format('YYYY-MM-DD') }, ] intelligenceLabels.value = [ { name: '黑客工具', type: 'error' }, { name: 'HACKING', type: 'error' }, { name: '其他远控', type: 'error' }, { name: '出站', type: 'default' }, { name: '入站', type: 'default' }, ] topDetailList.value = [ { icon: 'icon-diliweizhi', title: '地理位置', desc: '俄罗斯 莫斯科' }, { icon: 'icon-ASN', title: 'ASN', desc: 'AS 57523 changway-as' }, { icon: 'icon-wangluoleixing', title: '网络类型', desc: 'AS 57523 changway-as' }, { icon: 'icon-IPzhucejigou', title: 'IP注册机构', desc: "Chang Way Technolo-gies Co. Limited" }, { icon: 'icon-IDCfuwuqi', title: 'IDC服务器', desc: '否' }, { icon: 'icon-nizongfuwu', title: '匿踪服务', desc: '否' }, ] relatedEventsTableData.value = [ { name: 'https://t.co/eczu2eh', tags: [{ name: '可疑', type: 'waring' }], author: 'tc_special', time: dayjs().format('YYYY-MM-DD') }, ] relatedSampleTableData.value = [ { name: 'f01ed0c8080a7acf32e5aeaf8ae3ff65', maliciousTypes: 'HackTool,木马', home: 'Win64/HackTool.CobaltStr', tags: [{ name: 'HackTool', type: 'error' }, { name: '木马', type: 'error' }], time: dayjs().format('YYYY-MM-DD') }, ] } const tabChange = (name) => { console.log('tabChange', name) } const tabClick = (name) => { console.log('tabClick', name) } onMounted(() => { init() }) return { detailTitle, currentName, intelligenceLabels, topDetailList, tabs, riskLevel, confidenceLevel, openSourceTableData, openSourceTableColumn, relatedSampleTableData, relatedSampleTableColumn, relatedEventsTableData, relatedEventsTableColumn, tabChange, tabClick, } }