{"id":7895,"date":"2025-11-16T07:37:15","date_gmt":"2025-11-16T07:37:15","guid":{"rendered":"https:\/\/aiggroup.com.vn\/?page_id=7895"},"modified":"2025-11-16T07:37:38","modified_gmt":"2025-11-16T07:37:38","slug":"ai-phap-ly-da-nganh","status":"publish","type":"page","link":"https:\/\/aiggroup.com.vn\/en\/ai-phap-ly-da-nganh\/","title":{"rendered":"AI Ph\u00e1p L\u00fd \u0110a Ng\u00e0nh"},"content":{"rendered":"<section data-bb-version=\"5.2.6\" id=\"bt_bb_section69d49c4d69f58\" class=\"bt_bb_section bt_bb_layout_boxed_1200 bt_bb_vertical_align_top bt_bb_top_spacing_large bt_bb_bottom_spacing_none\"  data-bt-override-class=\"{&quot;bt_bb_top_spacing_&quot;:{&quot;current_class&quot;:&quot;bt_bb_top_spacing_large&quot;,&quot;xxl&quot;:&quot;large&quot;},&quot;bt_bb_bottom_spacing_&quot;:{&quot;current_class&quot;:&quot;bt_bb_bottom_spacing_none&quot;,&quot;xxl&quot;:&quot;none&quot;},&quot;bt_bb_animation_&quot;:{&quot;current_class&quot;:&quot;bt_bb_animation_no_animation&quot;,&quot;xxl&quot;:&quot;no_animation&quot;}}\"><div class=\"bt_bb_port\"><div class=\"bt_bb_cell\"><div class=\"bt_bb_cell_inner\"><div class=\"bt_bb_row\"  data-bt-override-class=\"{}\"><div class=\"bt_bb_row_holder\" ><div data-bb-version=\"5.2.6\"  class=\"bt_bb_column col-xxl-12 col-xl-12 col-xs-12 col-sm-12 col-md-12 col-lg-12 bt_bb_vertical_align_top bt_bb_align_left bt_bb_padding_normal\" style=\"; --column-width:12;\" data-width=\"12\" data-bt-override-class=\"{}\"><div class=\"bt_bb_column_content\"><div class=\"bt_bb_column_content_inner\"><div class=\"bt_bb_shortcode\">    <style>\r\n      .edbb-legal-wrap{\r\n        max-width: 1100px;\r\n        margin: 2rem auto;\r\n        font-family: system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\r\n        color:#111827;\r\n      }\r\n      .edbb-legal-title{\r\n        font-size: 24px;\r\n        font-weight: 700;\r\n        margin-bottom: 4px;\r\n      }\r\n      .edbb-legal-sub{\r\n        font-size: 14px;\r\n        color:#6b7280;\r\n        margin-bottom: 18px;\r\n      }\r\n      .edbb-legal-layout{\r\n        display:flex;\r\n        gap:20px;\r\n        align-items:flex-start;\r\n      }\r\n      .edbb-legal-left,\r\n      .edbb-legal-right{\r\n        background:#ffffff;\r\n        border-radius:16px;\r\n        border:1px solid #e5e7eb;\r\n        box-shadow:0 10px 30px rgba(15,23,42,.08);\r\n      }\r\n      .edbb-legal-left{\r\n        flex:1.1;\r\n        padding:20px 20px 24px;\r\n      }\r\n      .edbb-legal-right{\r\n        flex:1;\r\n        padding:20px 20px 24px;\r\n      }\r\n      .edbb-legal-section-title{\r\n        font-size:16px;\r\n        font-weight:700;\r\n        margin-bottom:16px;\r\n        text-transform:uppercase;\r\n        letter-spacing:0.03em;\r\n      }\r\n      .edbb-legal-grid{\r\n        display:grid;\r\n        grid-template-columns: repeat(2,minmax(0,1fr));\r\n        gap:12px;\r\n      }\r\n      .edbb-legal-field{\r\n        display:flex;\r\n        flex-direction:column;\r\n        gap:4px;\r\n        font-size:13px;\r\n      }\r\n      .edbb-legal-label{\r\n        font-weight:600;\r\n        color:#374151;\r\n      }\r\n      .edbb-legal-input,\r\n      .edbb-legal-textarea{\r\n        border-radius:10px;\r\n        border:1px solid #d1d5db;\r\n        padding:8px 10px;\r\n        font-size:13px;\r\n        outline:none;\r\n        transition:border-color .15s, box-shadow .15s;\r\n      }\r\n      .edbb-legal-input:focus,\r\n      .edbb-legal-textarea:focus{\r\n        border-color:#4f46e5;\r\n        box-shadow:0 0 0 1px rgba(79,70,229,.3);\r\n      }\r\n      .edbb-legal-textarea{\r\n        min-height:72px;\r\n        resize:vertical;\r\n      }\r\n      .edbb-legal-full{\r\n        grid-column:span 2\/span 2;\r\n      }\r\n      .edbb-legal-btn-bar{\r\n        margin-top:16px;\r\n        display:flex;\r\n        justify-content:flex-end;\r\n      }\r\n      .edbb-legal-btn{\r\n        border:0;\r\n        border-radius:999px;\r\n        padding:10px 18px;\r\n        font-size:14px;\r\n        font-weight:600;\r\n        background:#4f46e5;\r\n        color:#fff;\r\n        display:inline-flex;\r\n        align-items:center;\r\n        gap:8px;\r\n        cursor:pointer;\r\n        box-shadow:0 10px 25px rgba(79,70,229,.35);\r\n      }\r\n      .edbb-legal-btn:disabled{\r\n        opacity:.6;\r\n        cursor:not-allowed;\r\n        box-shadow:none;\r\n      }\r\n      .edbb-legal-result-title{\r\n        font-size:16px;\r\n        font-weight:700;\r\n        margin-bottom:8px;\r\n      }\r\n      .edbb-legal-result-sub{\r\n        font-size:13px;\r\n        color:#6b7280;\r\n        margin-bottom:12px;\r\n      }\r\n      .edbb-legal-result-box{\r\n        border-radius:12px;\r\n        border:1px dashed #d1d5db;\r\n        background:#f9fafb;\r\n        padding:12px 12px;\r\n        min-height:260px;\r\n        font-size:13px;\r\n        color:#111827;\r\n        white-space:pre-wrap;\r\n        overflow-y:auto;\r\n        max-height:530px;\r\n      }\r\n        .edbb-legal-result-box h2{\r\n        font-size:16px;\r\n        font-weight:700;\r\n        margin:8px 0 4px;\r\n      }\r\n      .edbb-legal-result-box h3{\r\n        font-size:14px;\r\n        font-weight:700;\r\n        margin:6px 0 3px;\r\n      }\r\n      .edbb-legal-result-box h4{\r\n        font-size:13px;\r\n        font-weight:700;\r\n        margin:4px 0 2px;\r\n      }\r\n      .edbb-legal-result-box p{\r\n        margin:2px 0 4px;\r\n      }\r\n      .edbb-legal-result-box ul{\r\n        margin:4px 0 6px 1.2rem;\r\n        padding-left:0;\r\n      }\r\n      .edbb-legal-result-box li{\r\n        margin-bottom:2px;\r\n      }\r\n\r\n      .edbb-legal-result-empty{\r\n        display:flex;\r\n        flex-direction:column;\r\n        align-items:center;\r\n        justify-content:center;\r\n        height:100%;\r\n        color:#6b7280;\r\n        text-align:center;\r\n      }\r\n      @media (max-width: 960px){\r\n        .edbb-legal-layout{\r\n          flex-direction:column;\r\n        }\r\n      }\r\n    <\/style>\r\n\r\n    <div class=\"edbb-legal-wrap\">\r\n      <div class=\"edbb-legal-title\">AI Ph\u00e1p L\u00fd \u0110a Ng\u00e0nh<\/div>\r\n      <div class=\"edbb-legal-sub\">Tr\u1ee3 l\u00fd ph\u00e2n t\u00edch ph\u00e1p l\u00fd d\u1ef1 \u00e1n an to\u00e0n, to\u00e0n di\u1ec7n.<\/div>\r\n\r\n      <div class=\"edbb-legal-layout\">\r\n\r\n        <!-- C\u1ed9t tr\u00e1i: Form nh\u1eadp th\u00f4ng tin -->\r\n        <div class=\"edbb-legal-left\">\r\n          <div class=\"edbb-legal-section-title\">E - \u0110i\u1ec7n B\u00e0n B\u1eafc th\u1ea9m \u0111\u1ecbnh - Nh\u1eadp th\u00f4ng tin d\u1ef1 \u00e1n c\u1ee7a b\u1ea1n<\/div>\r\n\r\n          <div class=\"edbb-legal-grid\">\r\n            <div class=\"edbb-legal-field\">\r\n              <label class=\"edbb-legal-label\">T\u00ean d\u1ef1 \u00e1n<\/label>\r\n              <input id=\"edbb-legal-ten\" class=\"edbb-legal-input\" placeholder=\"VD: Khu \u0111\u00f4 th\u1ecb The Harmony\" \/>\r\n            <\/div>\r\n            <div class=\"edbb-legal-field\">\r\n              <label class=\"edbb-legal-label\">Lo\u1ea1i h\u00ecnh<\/label>\r\n              <input id=\"edbb-legal-loai\" class=\"edbb-legal-input\" placeholder=\"VD: Khu \u0111\u00f4 th\u1ecb, Nh\u00e0 \u1edf x\u00e3 h\u1ed9i, Ngh\u1ec9 d\u01b0\u1ee1ng...\" \/>\r\n            <\/div>\r\n\r\n            <div class=\"edbb-legal-field\">\r\n              <label class=\"edbb-legal-label\">Di\u1ec7n t\u00edch (ha)<\/label>\r\n              <input id=\"edbb-legal-dien\" class=\"edbb-legal-input\" placeholder=\"VD: 15.0\" \/>\r\n            <\/div>\r\n            <div class=\"edbb-legal-field\">\r\n              <label class=\"edbb-legal-label\">V\u1ecb tr\u00ed<\/label>\r\n              <input id=\"edbb-legal-vi-tri\" class=\"edbb-legal-input\" placeholder=\"VD: Ph\u01b0\u1eddng ABC, Qu\u1eadn XYZ\" \/>\r\n            <\/div>\r\n\r\n            <div class=\"edbb-legal-field\">\r\n              <label class=\"edbb-legal-label\">\u0110\u1ecba ph\u01b0\u01a1ng<\/label>\r\n              <input id=\"edbb-legal-dia-phuong\" class=\"edbb-legal-input\" placeholder=\"VD: H\u00e0 N\u1ed9i\" \/>\r\n            <\/div>\r\n            <div class=\"edbb-legal-field\">\r\n              <label class=\"edbb-legal-label\">Qu\u1ef9 \u0111\u1ea5t<\/label>\r\n              <input id=\"edbb-legal-quy-dat\" class=\"edbb-legal-input\" placeholder=\"VD: \u0110\u1ea5t n\u00f4ng nghi\u1ec7p, \u0111\u1ea5t \u0111\u00f4 th\u1ecb...\" \/>\r\n            <\/div>\r\n\r\n            <div class=\"edbb-legal-field edbb-legal-full\">\r\n              <label class=\"edbb-legal-label\">M\u1ee5c ti\u00eau d\u1ef1 \u00e1n<\/label>\r\n              <textarea id=\"edbb-legal-muc-tieu\" class=\"edbb-legal-textarea\" placeholder=\"VD: X\u00e2y d\u1ef1ng khu \u0111\u00f4 th\u1ecb hi\u1ec7n \u0111\u1ea1i, \u0111\u1ed3ng b\u1ed9 h\u1ea1 t\u1ea7ng, \u0111\u00e1p \u1ee9ng nhu c\u1ea7u \u1edf...\"><\/textarea>\r\n            <\/div>\r\n\r\n            <div class=\"edbb-legal-field edbb-legal-full\">\r\n              <label class=\"edbb-legal-label\">Hi\u1ec7n tr\u1ea1ng ph\u00e1p l\u00fd<\/label>\r\n              <textarea id=\"edbb-legal-hien-trang\" class=\"edbb-legal-textarea\" placeholder=\"VD: \u0110\u00e3 c\u00f3 quy ho\u1ea1ch 1\/2000, ch\u01b0a GPMB, \u0111ang xin ch\u1ea5p thu\u1eadn ch\u1ee7 tr\u01b0\u01a1ng \u0111\u1ea7u t\u01b0...\"><\/textarea>\r\n            <\/div>\r\n\r\n            <div class=\"edbb-legal-field edbb-legal-full\">\r\n              <label class=\"edbb-legal-label\">C\u00e1c y\u1ebfu t\u1ed1 nh\u1ea1y c\u1ea3m<\/label>\r\n              <textarea id=\"edbb-legal-yeu-to\" class=\"edbb-legal-textarea\" placeholder=\"VD: G\u1ea7n khu di t\u00edch, c\u00f3 s\u00f4ng ch\u1ea3y qua, g\u1ea7n khu d\u00e2n c\u01b0 hi\u1ec7n h\u1eefu...\"><\/textarea>\r\n            <\/div>\r\n\r\n            <div class=\"edbb-legal-field edbb-legal-full\">\r\n              <label class=\"edbb-legal-label\">B\u1ea3n \u0111\u1ed3 ho\u1eb7c to\u1ea1 \u0111\u1ed9<\/label>\r\n              <textarea id=\"edbb-legal-ban-do\" class=\"edbb-legal-textarea\" placeholder=\"Nh\u1eadp \u0111\u1ecba ch\u1ec9 ho\u1eb7c to\u1ea1 \u0111\u1ed9 (VD: 21.0285, 105.8542)\"><\/textarea>\r\n            <\/div>\r\n          <\/div>\r\n\r\n          <div class=\"edbb-legal-btn-bar\">\r\n            <button id=\"edbb-legal-submit\" class=\"edbb-legal-btn\">\r\n              <span>\u2696 Ph\u00e2n T\u00edch Ph\u00e1p L\u00fd<\/span>\r\n            <\/button>\r\n          <\/div>\r\n        <\/div>\r\n\r\n        <!-- C\u1ed9t ph\u1ea3i: K\u1ebft qu\u1ea3 -->\r\n        <div class=\"edbb-legal-right\">\r\n          <div class=\"edbb-legal-result-title\">Tr\u1ee3 L\u00fd K\u1ebft Qu\u1ea3 Ph\u00e2n T\u00edch 24\/7<\/div>\r\n          <div class=\"edbb-legal-result-sub\">\u0110i\u1ec1n th\u00f4ng tin d\u1ef1 \u00e1n v\u00e0o bi\u1ec3u m\u1eabu b\u00ean tr\u00e1i v\u00e0 nh\u1ea5n \"Ph\u00e2n T\u00edch\" \u0111\u1ec3 nh\u1eadn b\u00e1o c\u00e1o chi ti\u1ebft.<\/div>\r\n\r\n          <div class=\"edbb-legal-result-box\" id=\"edbb-legal-result\">\r\n            <div class=\"edbb-legal-result-empty\" id=\"edbb-legal-empty\">\r\n              <div style=\"font-size:32px;margin-bottom:8px;\">\ud83d\udcc4<\/div>\r\n              <div><strong>AI Ph\u00e2n T\u00edch Ph\u00e1p L\u00fd D\u1ef1 \u00c1n<\/strong><\/div>\r\n              <div style=\"margin-top:4px;\">B\u00e1o c\u00e1o s\u1ebd hi\u1ec3n th\u1ecb t\u1ea1i \u0111\u00e2y.<\/div>\r\n            <\/div>\r\n          <\/div>\r\n        <\/div>\r\n\r\n      <\/div>\r\n    <\/div>\r\n\r\n    <script>\r\n    (function(){\r\n      const API_URL = 'https:\/\/aiggroup.com.vn\/en\/wp-json\/edbb-legal\/v1\/analyze';\r\n      const NONCE   = '5ebdbdf49f';\r\n\r\n      const $ = (id) => document.getElementById(id);\r\n\r\n      const tenEl       = $('edbb-legal-ten');\r\n      const loaiEl      = $('edbb-legal-loai');\r\n      const dienEl      = $('edbb-legal-dien');\r\n      const viTriEl     = $('edbb-legal-vi-tri');\r\n      const diaPhuongEl = $('edbb-legal-dia-phuong');\r\n      const quyDatEl    = $('edbb-legal-quy-dat');\r\n      const mucTieuEl   = $('edbb-legal-muc-tieu');\r\n      const hienTrangEl = $('edbb-legal-hien-trang');\r\n      const yeuToEl     = $('edbb-legal-yeu-to');\r\n      const banDoEl     = $('edbb-legal-ban-do');\r\n\r\n      const submitBtn   = $('edbb-legal-submit');\r\n      const resultBox   = $('edbb-legal-result');\r\n      const emptyBox    = $('edbb-legal-empty');\r\n\r\n      function setLoading(isLoading){\r\n        if (isLoading) {\r\n          submitBtn.disabled = true;\r\n          submitBtn.innerHTML = '<span>\u23f3 \u0110ang ph\u00e2n t\u00edch...<\/span>';\r\n        } else {\r\n          submitBtn.disabled = false;\r\n          submitBtn.innerHTML = '<span>\u2696 Ph\u00e2n T\u00edch Ph\u00e1p L\u00fd<\/span>';\r\n        }\r\n      }\r\n\r\n            \/\/ Chuy\u1ec3n markdown \u0111\u01a1n gi\u1ea3n (#, ##, **, - ) th\u00e0nh HTML\r\n      function renderMarkdown(text){\r\n        if (!text) return '';\r\n\r\n        \/\/ escape HTML \u0111\u1ec3 tr\u00e1nh ch\u00e8n script\r\n        let safe = text\r\n          .replace(\/&\/g, '&amp;')\r\n          .replace(\/<\/g, '&lt;')\r\n          .replace(\/>\/g, '&gt;');\r\n\r\n        const lines = safe.split(\/\\r?\\n\/);\r\n        let html = '';\r\n        let inList = false;\r\n\r\n        lines.forEach(line => {\r\n          const raw = line; \/\/ gi\u1eef l\u1ea1i \u0111\u1ec3 check r\u1ed7ng\r\n          line = line.trimEnd();\r\n\r\n          \/\/ D\u00f2ng danh s\u00e1ch: - ... ho\u1eb7c * ...\r\n          if (\/^\\s*[-*]\\s+\/.test(line)){\r\n            if (!inList){\r\n              html += '<ul>';\r\n              inList = true;\r\n            }\r\n            let item = line.replace(\/^\\s*[-*]\\s+\/, '');\r\n            item = item.replace(\/\\*\\*(.+?)\\*\\*\/g, '<strong>$1<\/strong>');\r\n            html += '<li>' + item + '<\/li>';\r\n            return;\r\n          }\r\n\r\n          \/\/ K\u1ebft th\u00fac danh s\u00e1ch n\u1ebfu c\u00f3\r\n          if (inList){\r\n            html += '<\/ul>';\r\n            inList = false;\r\n          }\r\n\r\n          \/\/ D\u00f2ng tr\u1ed1ng \u2192 xu\u1ed1ng d\u00f2ng nh\u1eb9\r\n          if (raw.trim() === ''){\r\n            html += '<br>';\r\n            return;\r\n          }\r\n\r\n          let tag = 'p';\r\n          let content = line.trim();\r\n\r\n          if (\/^###\\s+\/.test(content)){\r\n            tag = 'h4';\r\n            content = content.replace(\/^###\\s+\/, '');\r\n          } else if (\/^##\\s+\/.test(content)){\r\n            tag = 'h3';\r\n            content = content.replace(\/^##\\s+\/, '');\r\n          } else if (\/^#\\s+\/.test(content)){\r\n            tag = 'h2';\r\n            content = content.replace(\/^#\\s+\/, '');\r\n          }\r\n\r\n          \/\/ Bold v\u1edbi ** ... **\r\n          content = content.replace(\/\\*\\*(.+?)\\*\\*\/g, '<strong>$1<\/strong>');\r\n\r\n          html += '<' + tag + '>' + content + '<\/' + tag + '>';\r\n        });\r\n\r\n        if (inList){\r\n          html += '<\/ul>';\r\n        }\r\n\r\n        return html;\r\n      }\r\n\r\n      function showResult(text){\r\n        if (emptyBox) emptyBox.style.display = 'none';\r\n        resultBox.innerHTML = renderMarkdown(text);\r\n      }\r\n\r\n\r\n      async function callAnalyzeAPI(payload){\r\n        const url = API_URL + '?_wpnonce=' + encodeURIComponent(NONCE);\r\n        const res = await fetch(url, {\r\n          method:'POST',\r\n          headers:{'Content-Type':'application\/json'},\r\n          body: JSON.stringify(payload)\r\n        });\r\n        if (!res.ok) {\r\n          const t = await res.text();\r\n          throw new Error('HTTP ' + res.status + ': ' + t);\r\n        }\r\n        return res.json();\r\n      }\r\n\r\n      async function onSubmit(){\r\n        const payload = {\r\n          ten_du_an:       tenEl.value.trim(),\r\n          loai_hinh:       loaiEl.value.trim(),\r\n          dien_tich:       dienEl.value.trim(),\r\n          vi_tri:          viTriEl.value.trim(),\r\n          dia_phuong:      diaPhuongEl.value.trim(),\r\n          quy_dat:         quyDatEl.value.trim(),\r\n          muc_tieu:        mucTieuEl.value.trim(),\r\n          hien_trang:      hienTrangEl.value.trim(),\r\n          yeu_to_nhay_cam: yeuToEl.value.trim(),\r\n          ban_do:          banDoEl.value.trim(),\r\n        };\r\n\r\n        if (!payload.ten_du_an || !payload.dia_phuong) {\r\n          alert('Vui l\u00f2ng nh\u1eadp \u00edt nh\u1ea5t T\u00caN D\u1ef0 \u00c1N v\u00e0 \u0110\u1ecaA PH\u01af\u01a0NG.');\r\n          return;\r\n        }\r\n\r\n        setLoading(true);\r\n        showResult('\u0110ang ph\u00e2n t\u00edch d\u1ef1 \u00e1n, vui l\u00f2ng \u0111\u1ee3i...');\r\n\r\n        try {\r\n          const data = await callAnalyzeAPI(payload);\r\n          let text = '';\r\n          const cand = data && data.candidates && data.candidates[0];\r\n          if (cand && cand.content && Array.isArray(cand.content.parts)) {\r\n            text = cand.content.parts.map(p => p.text || '').join('\\\\n');\r\n          }\r\n          if (!text) text = 'Kh\u00f4ng nh\u1eadn \u0111\u01b0\u1ee3c ph\u1ea3n h\u1ed3i t\u1eeb m\u00f4 h\u00ecnh AI.';\r\n          showResult(text);\r\n        } catch (err) {\r\n          showResult('L\u1ed7i: ' + err.message);\r\n        } finally {\r\n          setLoading(false);\r\n        }\r\n      }\r\n\r\n      submitBtn.addEventListener('click', function(e){\r\n        e.preventDefault();\r\n        onSubmit();\r\n      });\r\n    })();\r\n    <\/script>\r\n    <\/div><\/div><\/div><\/div><\/div><\/div><\/div><!-- cell_inner --><\/div><!-- cell --><\/div><!-- port --><\/section>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-7895","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/aiggroup.com.vn\/en\/wp-json\/wp\/v2\/pages\/7895","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aiggroup.com.vn\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/aiggroup.com.vn\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/aiggroup.com.vn\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aiggroup.com.vn\/en\/wp-json\/wp\/v2\/comments?post=7895"}],"version-history":[{"count":2,"href":"https:\/\/aiggroup.com.vn\/en\/wp-json\/wp\/v2\/pages\/7895\/revisions"}],"predecessor-version":[{"id":7897,"href":"https:\/\/aiggroup.com.vn\/en\/wp-json\/wp\/v2\/pages\/7895\/revisions\/7897"}],"wp:attachment":[{"href":"https:\/\/aiggroup.com.vn\/en\/wp-json\/wp\/v2\/media?parent=7895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}