let vue_sjcx1 = new Vue({
    el: '#symrcxjk',
    data: {
        data_sjdj: [],
    },
    methods: {
        edit: function (item) {
            vue_sjdj.arr_cllx=item;
            $("#myModal2").modal("show");
        },
        query: function () {
            $.ajax({
                url: "/code/list",
                dataType: "json",
                type: "GET",
                data: {
                    page: 1,
                    limit: 100,
                },
                success: function (result) {
                    vue_sjcx1.data_sjdj = [];
                    if (result.code == 0) {
                        if (result.data.length > 0) {
                            result.data.forEach((item, index)=> {
                                vue_sjcx1.data_sjdj.push(item);
                            });
                        }
                    }
                }
            });
        },
    },
    mounted(){
        this.query();
    }
});
//endregion
let vue_sjdj = new Vue({
    el: '#myModal2',
    data: {
        arr_cllx: [],
        title:'',
    },
    methods: {
        define: function () {
            let arr = [{key:vue_sjdj.arr_cllx.key,manualchecktime:vue_sjdj.arr_cllx.manualchecktime,pushchecktime:vue_sjdj.arr_cllx.pushchecktime,rectifytime:vue_sjdj.arr_cllx.rectifytime}];
            $.ajax({
                url: "/code/updatetime",
                dateType: 'json',
                type: "POST",
                contentType: 'application/json',
                data: JSON.stringify(arr),
                success: function (result) {
                    if (result.code == 0) {
                        vue_sjcx1.query();
                        info_new("时间修改成功");
                        window.setTimeout("$('#info-warning-new').modal('hide')", 2000);
                        $("#myModal2").modal("hide");
                    }
                }
            });
        }
    },
    mounted(){
    }
});
