평면도 상세 화면 추가
This commit is contained in:
@@ -95,6 +95,7 @@ $routes->group('article', ['namespace' => 'App\Controllers\Article'], function (
|
|||||||
|
|
||||||
// 아파트 평면도
|
// 아파트 평면도
|
||||||
$routes->get('apt/lists2', 'Ground::lists');
|
$routes->get('apt/lists2', 'Ground::lists');
|
||||||
|
$routes->get('apt/ground/detail/(:num)/(:num)', 'Ground::detail/$1/$2');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 아파트 평면도 - API
|
* 아파트 평면도 - API
|
||||||
|
|||||||
@@ -209,6 +209,25 @@ class Ground extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 상세화면
|
||||||
|
public function detail($rcpt_no, $hscp_no): string
|
||||||
|
{
|
||||||
|
|
||||||
|
if ($rcpt_no == null || $hscp_no == null) {
|
||||||
|
throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상세정보
|
||||||
|
$apt = $this->model->getDetail($rcpt_no, $hscp_no);
|
||||||
|
|
||||||
|
|
||||||
|
return view("pages/article/detail2", [
|
||||||
|
'apt' => $apt,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 파일업로드(평면도)
|
// 파일업로드(평면도)
|
||||||
public function uploadFile()
|
public function uploadFile()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -625,6 +625,35 @@ class GroundModel extends Model
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 상세정보
|
||||||
|
public function getDetail($rcpt_no, $hscp_no)
|
||||||
|
{
|
||||||
|
$sql = "SELECT
|
||||||
|
a.rcpt_no, a.hscp_no, a.part_no, a.addr, a.addr2, a.rcpt_hscp_nm, a.move_ym, a.households_cnt, a.dong_cnt, a.pyeong_cnt, a.apt_cate_nm, a.region_cd, a.rcpt_x, a.rcpt_y
|
||||||
|
,a.vdo_up_tm, DATE_FORMAT(a.vdo_up_tm, '%Y-%m-%d') as rdate_dt_vdo ,DATE_FORMAT(a.vdo_up_tm, '%H:%i:%s') as rdate_tm_vdo
|
||||||
|
,a.check_tm, DATE_FORMAT(a.check_tm, '%Y-%m-%d') as rdate_dt_chk ,DATE_FORMAT(a.check_tm, '%H:%i:%s') as rdate_tm_chk
|
||||||
|
,a.memo, a.note, a.video_target, a.vdo_up_ynx, a.not_vdo_reson, a.apt_step, a.check_yn, a.resend_yn, a.write_complete_yn, a.all_no_pho
|
||||||
|
,a.write_complete_tm, DATE_FORMAT(a.write_complete_tm, '%Y-%m-%d') as rdate_dt_cmpl ,DATE_FORMAT(a.write_complete_tm, '%H:%i:%s') as rdate_tm_cmpl
|
||||||
|
,a.charger, a.dept_sq ,(SELECT pdept_sq FROM departments WHERE dept_sq = a.dept_sq) bonbu
|
||||||
|
,a.send_end_tm, a.supply_no_tm
|
||||||
|
,d.pho_cate2, d.pho_explain, d.pho_up_nu
|
||||||
|
,gp.filenm_up, gp.file_path, gp.insert_tm
|
||||||
|
FROM
|
||||||
|
apt_ground a
|
||||||
|
LEFT JOIN apt_category d ON a.rcpt_no = d.rcpt_no
|
||||||
|
LEFT JOIN apt_ground_photo gp ON gp.pho_no = (SELECT p.pho_no
|
||||||
|
FROM apt_ground_photo p
|
||||||
|
WHERE p.rcpt_no = a.rcpt_no
|
||||||
|
ORDER BY p.pho_no DESC
|
||||||
|
LIMIT 1)
|
||||||
|
|
||||||
|
WHERE a.rcpt_no = {$rcpt_no} AND a.hscp_no = {$hscp_no} ";
|
||||||
|
|
||||||
|
$query = $this->db->query($sql, [$rcpt_no]);
|
||||||
|
|
||||||
|
return $query->getRowArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 평면도 정보 저장
|
// 평면도 정보 저장
|
||||||
public function saveImg($data)
|
public function saveImg($data)
|
||||||
@@ -648,4 +677,5 @@ class GroundModel extends Model
|
|||||||
'success' => true,
|
'success' => true,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
128
app/Views/pages/article/detail2.php
Normal file
128
app/Views/pages/article/detail2.php
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
<?= $this->extend('layouts/main') ?>
|
||||||
|
|
||||||
|
<?= $this->section('content') ?>
|
||||||
|
<style>
|
||||||
|
.tbl_basic2 th {
|
||||||
|
padding: 0 10px;
|
||||||
|
height: 27px;
|
||||||
|
border: solid 1px #d8d9de;
|
||||||
|
background-color: #eff0f4;
|
||||||
|
letter-spacing: -1px;
|
||||||
|
font-weight: normal;
|
||||||
|
color: #5a5f69;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blockUI {
|
||||||
|
z-index: 1500 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ellipsis {
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
max-width: 180px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
display: flex !important;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header-tab {
|
||||||
|
justify-content: flex-start !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-scroll {
|
||||||
|
max-height: 300px;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swal2-cancel {
|
||||||
|
background-color: #ff0000 !important;
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropzone {
|
||||||
|
min-height: 260px;
|
||||||
|
background-color: #fafbfc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropzone:hover {
|
||||||
|
background-color: #f4f6f8;
|
||||||
|
}
|
||||||
|
|
||||||
|
#myDropzone {
|
||||||
|
position: relative;
|
||||||
|
padding-top: 110px;
|
||||||
|
/* 메시지 영역 높이만큼 */
|
||||||
|
}
|
||||||
|
|
||||||
|
#uploadModal .modal-dialog {
|
||||||
|
max-width: 1140px;
|
||||||
|
/* modal-xl */
|
||||||
|
}
|
||||||
|
|
||||||
|
#uploadModal .modal-content {
|
||||||
|
height: 450px;
|
||||||
|
max-height: 450px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="col-md-12 col-xl-12">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
|
||||||
|
<div class="main-card mb-3 card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">단지 정보</h5>
|
||||||
|
<table class="table table-bordered table-sm tbl_basic2 apt-info-table">
|
||||||
|
<colgroup>
|
||||||
|
<col width="100" />
|
||||||
|
<col width="300" />
|
||||||
|
<col width="100" />
|
||||||
|
<col width="300" />
|
||||||
|
</colgroup>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>단지코드</th>
|
||||||
|
<td><?= esc($apt['hscp_no'] ?? '') ?></td>
|
||||||
|
<th>주소</th>
|
||||||
|
<td><?= esc($apt['addr'] ?? '') ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>단지명</th>
|
||||||
|
<td><?= esc($apt['rcpt_hscp_nm'] ?? '') ?></td>
|
||||||
|
<th>상세주소</th>
|
||||||
|
<td><?= esc($apt['addr2'] ?? '') ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>입주년월</th>
|
||||||
|
<td></td>
|
||||||
|
<th>총세대수</th>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>총동수</th>
|
||||||
|
<td></td>
|
||||||
|
<th>메모</th>
|
||||||
|
<td>
|
||||||
|
<div class="row g-2 align-items-center">
|
||||||
|
<div class="col-md-9">
|
||||||
|
<input class="form-control" type="text" id="memo"
|
||||||
|
value="<?= esc($apt['memo'] ?? '') ?>" />
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3 text-end">
|
||||||
|
<button type="button" class="btn btn-outline-focus"
|
||||||
|
onclick="saveMemo('<?= esc($apt['rcpt_no'] ?? '') ?>')">저장</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?= $this->endSection() ?>
|
||||||
@@ -673,8 +673,9 @@
|
|||||||
const rowData = table.row(this).data();
|
const rowData = table.row(this).data();
|
||||||
if (!rowData) return;
|
if (!rowData) return;
|
||||||
|
|
||||||
// const id = rowData.rcpt_no;
|
const rcpt_no = rowData.rcpt_no;
|
||||||
// location.href = "<?= site_url('article/apt/detail') ?>/" + id;
|
const hscp_no = rowData.hscp_no;
|
||||||
|
location.href = "<?= site_url('article/apt/ground/detail') ?>/" + rcpt_no + "/" + hscp_no;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#btnSearch').on('click', function () {
|
$('#btnSearch').on('click', function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user