저장팝업 수정

This commit is contained in:
2023-05-23 14:46:59 +09:00
parent 9adafe9604
commit d4058a04ab
2 changed files with 40 additions and 17 deletions

View File

@@ -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,6 +118,7 @@ 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>

View File

@@ -28,6 +28,14 @@ app.props:
header: Authorization
prefix: "Bearer "
# file
hubeasy_file_info:
send-message-location: /efs/home/sendMessage
rsv-message-location: /efs/home/rsvMessage
caller-id-location: /efs/home/callidDoc
consult-location: /efs/home/consult
work-location: /efs/admin/workState/workStatefile.txt
logging:
config: classpath:logback-spring.xml