forked from HANYANG/HANYANG_MES
docs: table id값 변경
This commit is contained in:
parent
c0a293622d
commit
d30f753cd1
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
|
||||
<div class="height-93">
|
||||
<div class="hy-table" id="isDef"></div>
|
||||
<div class="hy-table" id="isDef_table"></div>
|
||||
</div>
|
||||
<div class="table-title">
|
||||
<div class="button-box flexend">
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
|
||||
<div class="height-93">
|
||||
<div class="hy-table" id="isDefHst"></div>
|
||||
<div class="hy-table" id="isDefHst_table"></div>
|
||||
</div>
|
||||
<div class="table-title">
|
||||
<div class="button-box flexend">
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
|
||||
<div class="height-93">
|
||||
<div class="hy-table" id="isFacility"></div>
|
||||
<div class="hy-table" id="isFacility_table"></div>
|
||||
</div>
|
||||
<div class="table-title">
|
||||
<div class="button-box flexend">
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
|
||||
<div class="height-half">
|
||||
<div class="hy-table" id="isFacility"></div>
|
||||
<div class="hy-table" id="isFacility_table"></div>
|
||||
</div>
|
||||
|
||||
<!-- 폼 헤더 -->
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<div v-if="isInspVal" class="table-box flexcol flexbetween" style="height:calc(100% - 43px);">
|
||||
|
||||
<div style="height:calc(100% - 112px);">
|
||||
<div class="hy-table group-table groupby" id="isInsp"></div>
|
||||
<div class="hy-table group-table groupby" id="isInsp_table"></div>
|
||||
</div>
|
||||
|
||||
<!-- 폼 헤더 -->
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="table-box height-full flexcol flexbetween">
|
||||
|
||||
<div style="height:calc(100% - 148px);">
|
||||
<div class="hy-table" id="isRun"></div>
|
||||
<div class="hy-table" id="isNoRun_table"></div>
|
||||
</div>
|
||||
|
||||
<!-- 폼 헤더 -->
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
|
||||
<div class="height-93">
|
||||
<div class="hy-table" id="isProd"></div>
|
||||
<div class="hy-table" id="isProd_table"></div>
|
||||
</div>
|
||||
<div class="table-title">
|
||||
<div class="button-box flexend">
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
|
||||
<div style="height:calc(100% - 112px);">
|
||||
<div class="hy-table" id="isRun"></div>
|
||||
<div class="hy-table" id="isRun_table"></div>
|
||||
</div>
|
||||
|
||||
<!-- 폼 헤더 -->
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
<div style="height:calc(100% - 80px);">
|
||||
<div class="hy-table groupby" id="isWorker"></div>
|
||||
<div class="hy-table groupby" id="isWorker_table"></div>
|
||||
</div>
|
||||
<!-- <div class="table-title">
|
||||
<div class="button-box flexend">
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ class SimpleTable {
|
|||
this.container = document.querySelector(".detail-contents");
|
||||
this.table = this.container?.querySelector(".hy-table");
|
||||
this.addBtn = this.container?.querySelector(".add-btn");
|
||||
|
||||
// // btn disabled
|
||||
// this.disabled = [false, false, false, true];
|
||||
}
|
||||
|
||||
getMainList(){
|
||||
|
|
@ -44,6 +47,8 @@ class SimpleTable {
|
|||
// this.tbList.addRow({...data})
|
||||
// }
|
||||
putData(addData, updateData){
|
||||
// let retunVal = [];
|
||||
|
||||
const postData = {
|
||||
mode : this.putMode,
|
||||
reqdata : JSON.stringify([{...this.formData, ...addData}])
|
||||
|
|
@ -63,13 +68,75 @@ class SimpleTable {
|
|||
error: (request, status, error)=>{
|
||||
kuls_alert(error.message);
|
||||
},
|
||||
complete: function(){
|
||||
console.log(this)
|
||||
complete: () => {
|
||||
// this.disabled = this.turnDisabled();
|
||||
// returnVal = this.disabled;
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
init(addData, updateData){
|
||||
|
||||
// turnDisabled(){
|
||||
// if(this.disabled[2]){
|
||||
// this.disabled[2] = false;
|
||||
// this.disabled[3] = true;
|
||||
// }else{
|
||||
// this.disabled[2] = true;
|
||||
// this.disabled[3] = false;
|
||||
// }
|
||||
|
||||
// return this.disabled;
|
||||
// }
|
||||
|
||||
|
||||
// init(addData, updateData) {
|
||||
// return new Promise((resolve, reject) => {
|
||||
// const commonFieldData = {
|
||||
// headerSort: false,
|
||||
// vertAlign: "middle",
|
||||
// hozAlign: "center",
|
||||
// resizable: "header", // 헤더에서만 리사이즈 가능
|
||||
// headerHozAlign: "center", // 헤더 정렬
|
||||
// headerSortTristate: true, // 데이터 정렬 => 정/역/초기화
|
||||
// };
|
||||
|
||||
// this.tbList = new Tabulator(this.table, {
|
||||
// layout: 'fitColumns',
|
||||
// data: [],
|
||||
// columns: this.field,
|
||||
// columnDefaults: commonFieldData,
|
||||
// selectableRows: 1,
|
||||
// });
|
||||
|
||||
// this.tbList.on("tableBuilt", () => {
|
||||
// this.getMainList().then(() => {
|
||||
// const tasks = [];
|
||||
// if (addData) {
|
||||
// tasks.push(this.tbList.addRow({...addData}));
|
||||
// }
|
||||
// if (updateData) {
|
||||
// tasks.push(this.tbList.update(updateData));
|
||||
// }
|
||||
// Promise.all(tasks)
|
||||
// .then(() => resolve())
|
||||
// .catch((error) => reject(error));
|
||||
// }).catch((error) => reject(error));
|
||||
// });
|
||||
|
||||
// this.addBtn?.addEventListener('click', () => {
|
||||
// this.putData(addData, false).catch((error) => console.error('Error adding data:', error));
|
||||
// });
|
||||
|
||||
// // 행선택
|
||||
// // 행선택 반영 및 저장
|
||||
// // 행추가 및 저장
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
init(addData, updateData, btn){
|
||||
|
||||
const commonFieldData = {
|
||||
headerSort: false,
|
||||
vertAlign: "middle",
|
||||
|
|
@ -100,6 +167,10 @@ class SimpleTable {
|
|||
|
||||
this.addBtn?.addEventListener('click', ()=>{
|
||||
this.putData(addData,false);
|
||||
if(btn=='run'){
|
||||
document.querySelector("#isNoRun").disabled = false;
|
||||
document.querySelector("#isRun").disabled = true;
|
||||
}
|
||||
})
|
||||
|
||||
// 행선택
|
||||
|
|
@ -303,7 +374,7 @@ class FieldPop {
|
|||
modal.delete();
|
||||
},
|
||||
|
||||
callTable(com, addData=false, updateData=false ){
|
||||
callTable(com, addData=false, updateData=false, btn=false ){
|
||||
|
||||
this.$nextTick(()=>{
|
||||
|
||||
|
|
@ -311,7 +382,14 @@ class FieldPop {
|
|||
|
||||
const table = new SimpleTable(this.tableField[com], this.getMode, this.putMode, this.formData);
|
||||
|
||||
table.init(addData, updateData);
|
||||
table.init(addData, updateData, btn);
|
||||
// this.isDisabled = table.turnDisabled();
|
||||
// console.log(this.isDisabled);
|
||||
// table.init(addData, updateData).then(()=>{
|
||||
// this.isDisabled = table.turnDisabled();
|
||||
// console.log(this.isDisabled);
|
||||
// })
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
|
@ -353,7 +431,7 @@ class FieldPop {
|
|||
RUNSTOP_GB: 'R',
|
||||
OPER_ST_TM : this.dateTime,
|
||||
_STATUS_ : 'I'
|
||||
});
|
||||
},false,'isRun');
|
||||
|
||||
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ include_once "{$_SERVER['DOCUMENT_ROOT']}/common.inc.php";
|
|||
<button type="button" v-for="(tab, idx) in tabs1" :key="idx" :class="{ on : activeTab === tab}" @click="popDrawSTD(`${tab}`)" >{{ tab }}</button>
|
||||
</div>
|
||||
<div class="form-button-box flexrow gap06 flex-5 flexend">
|
||||
<button type="button" v-for="(tab, idx) in tabs2" :key="idx" :disabled="isDisabled[idx]" :class="{ on : activeTab === tab.name }" @click="showComponent(tab.id, tab.name)" >{{ tab.name }}</button>
|
||||
<button type="button" v-for="(tab, idx) in tabs2" :key="idx" :disabled="isDisabled[idx]" :id="tab.id" :class="{ on : activeTab === tab.name }" @click="showComponent(tab.id, tab.name)" >{{ tab.name }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue