mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 02:02:58 +09:00
저장팝업 수정
This commit is contained in:
@@ -59,6 +59,8 @@
|
||||
:addCls="grid.addCls"
|
||||
></custom-grid>
|
||||
</div>
|
||||
<!-- <common-modal ref="commonModal" /> -->
|
||||
<common-modal ref="commonModal"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -69,6 +71,8 @@ import moment from 'moment';
|
||||
import VueTimepicker from 'vue2-timepicker';
|
||||
import 'vue2-timepicker/dist/VueTimepicker.css'
|
||||
import sysMgtApi from '../service/sysMgtApi'
|
||||
// import CommonModal from '../components/modal/commonModal';
|
||||
import CommonModal from '../components/commonModal.vue';
|
||||
|
||||
export default {
|
||||
name: 'workState',
|
||||
@@ -114,7 +118,8 @@ export default {
|
||||
customGrid: customGrid,
|
||||
vuejsDatepicker,
|
||||
VueTimepicker,
|
||||
|
||||
CommonModal,
|
||||
|
||||
},
|
||||
created() {
|
||||
},
|
||||
@@ -143,6 +148,11 @@ export default {
|
||||
|
||||
methods: {
|
||||
fnSaveTxt(){
|
||||
if (this.state == 'NOTUSE') {
|
||||
this.row.title = '서비스 점검 설정';
|
||||
this.row.msg1 = '저장 하시겠습니까?';
|
||||
this.$refs.commonModal.confirmModalOpen(this.row);
|
||||
}
|
||||
let params = {
|
||||
startDate : moment(this.startDate).format('YYYY-MM-DD'),
|
||||
startTimeT : '',
|
||||
@@ -151,25 +161,27 @@ export default {
|
||||
endTimeM : '',
|
||||
state : this.state,
|
||||
}
|
||||
|
||||
if (this.startTime) {
|
||||
params.startTimeT = moment(this.startTime, 'HH:mm').format('HH');
|
||||
params.startTimeM = moment(this.startTime, 'HH:mm').format('mm');
|
||||
}
|
||||
|
||||
if (this.endTime) {
|
||||
params.endTimeT = moment(this.endTime, 'HH:mm').format('HH');
|
||||
params.endTimeM = moment(this.endTime, 'HH:mm').format('mm');
|
||||
}
|
||||
|
||||
sysMgtApi.setWorkState(params).then(() => {
|
||||
// 저장이 완료된 후에 테이블 다시 로드
|
||||
this.$nextTick(() => {
|
||||
this.$refs.table.reloadData();
|
||||
});
|
||||
sysMgtApi.setWorkState(params).then((respose) => {
|
||||
var result = respose.data;
|
||||
if (result != null && result.retCode == "0000"){
|
||||
// 저장이 완료된 후에 테이블 다시 로드
|
||||
this.toComplete();
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
toComplete(){
|
||||
this.$refs.table.reloadData();
|
||||
// this.confirmCalbackFnc();
|
||||
},
|
||||
search: function (isKeep) {
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
const getP = this.$refs.table.getPagination();
|
||||
@@ -208,14 +220,17 @@ export default {
|
||||
}
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
const getP = this.$refs.table.getPagination();
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
params: this.grid.params,
|
||||
});
|
||||
// 라우트 하기전 실행
|
||||
next();
|
||||
},
|
||||
|
||||
const getP = this.$refs.table.getPagination();
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
params: this.grid.params,
|
||||
});
|
||||
// 라우트 하기전 실행
|
||||
next();
|
||||
},
|
||||
confirmCalbackFnc(props) {
|
||||
// if (props.result) {
|
||||
// }
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user