| | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*所属运营商:</label> |
| | | <div class="col-sm-8"> |
| | | <select style="width: 300px" class="form-control" id="yys" name="yys" onchange="TSite.oneChangeYys(2)"> |
| | | <select style="width: 300px" class="form-control" id="yys" name="yys" onchange="TSite.oneChangeYys(this)"> |
| | | <option style="width: 300px" value="">选择运营商</option> |
| | | @for(obj in yysList){ |
| | | <option style="width: 300px" value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | <input type="checkbox" value="0" name="pt">平台</input> |
| | | <input type="checkbox" value="0" name="pt" onchange="TSite.oneChangeYys(this)">平台</input> |
| | | </div> |
| | | </div> |
| | | @} |
| | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*场地类型:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="siteTypeOne" name = "typeId"> |
| | | <select style="width: 300px" class="form-control" id="siteTypeOne" name = "typeId" onchange="updateTime1()"> |
| | | <option value="普通场地">普通场地</option> |
| | | <option value="智慧场地">智慧场地</option> |
| | | </select> |
| | |
| | | <label class="col-sm-3 control-label">*可预约时间段:</label> |
| | | <!-- <input style="width: 300px" class="form-control" type="time">--> |
| | | <div class="col-sm-9" style="display: flex"> |
| | | <input style="width: 136px;" value="开始时间" id="start-time" class="form-control" type="time"> |
| | | <input style="width: 136px;" value="开始时间" id="start-time" class="form-control" type="time" onchange="updateTime(1)"> |
| | | <span style="margin-top: 7px"> 至 </span> |
| | | <input style="width: 136px;" value="结束时间" id="end-time" class="form-control" type="time"> |
| | | <input style="width: 136px;" value="结束时间" id="end-time" class="form-control" type="time" onchange="updateTime(2)"> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | </div> |
| | | @} |
| | | @if(objectType==1){ |
| | | <#input style="width: 300px" id="name" name="*添加闸机:" placeholder="请输入闸机ID" type="text"/> |
| | | <#input style="width: 300px" id="ids" name="*添加闸机:" placeholder="请输入闸机ID" type="text"/> |
| | | @} |
| | | <div class="form-group" style=" margin-left: 17%;" > |
| | | <label class="col-sm-1 control-label">场地说明:</label> |
| | |
| | | <script src="${ctxPath}/js/elementui/index.js"></script> |
| | | <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> |
| | | <script> |
| | | var vue2 = new Vue({ |
| | | el: '#app1', |
| | | props: { |
| | | // 数量限制 |
| | | limit: { |
| | | type: Number, |
| | | default: 2 |
| | | }, |
| | | }, |
| | | data: { |
| | | autoUpload: true,//自动上传 |
| | | imageUrl1: '',//模型数据,用于上传图片完成后图片预览 |
| | | dialogVisible: false |
| | | }, |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | TSite.goodsPicArray.push(file); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
| | | if (!isLt2M) { |
| | | this.$message.error('上传图片大小不能超过 10MB!'); |
| | | } |
| | | return isLt2M; |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | TSite.goodsPicArray = TSite.goodsPicArray.filter(item => { |
| | | return item.uid != file.uid; |
| | | }); |
| | | }, |
| | | }, |
| | | created() { |
| | | }, |
| | | }); |
| | | laydate.render({ |
| | | elem: '#start-time', type: "time", format: "HH:mm", ready: formatminutes |
| | | }); |
| | | laydate.render({ |
| | | elem: '#end-time' |
| | | , type: "time", format: "HH:mm", ready: formatminutes |
| | | }); |
| | | |
| | | function addBox() { |
| | | var a=" <div class=\"col-sm-8 control-label\" id=\"far\">\n" + |
| | |
| | | endTime.disabled = true; |
| | | } |
| | | }); |
| | | function updateTime1() { |
| | | $("#end-time").val(''); |
| | | $("#start-time").val(''); |
| | | } |
| | | |
| | | function updateTime(e) { |
| | | let one = $("#siteTypeOne").val() |
| | | var timeInputs = document.querySelectorAll('input[type="time"]'); |
| | | console.log(timeInputs) |
| | | var selectedTime=''; |
| | | if(e==1){ |
| | | var selectedTime = $("#start-time").val(); |
| | | }else { |
| | | var selectedTime = $("#end-time").val(); |
| | | } |
| | | |
| | | |
| | | var hour = selectedTime.split(':')[0]; |
| | | var minute = selectedTime.split(':')[1]; |
| | | if(one=="普通场地"){ |
| | | console.log( |
| | | one |
| | | ) |
| | | if (minute < 30 &&minute>0) { |
| | | minute = '30'; |
| | | } else if (minute >30) { |
| | | hour++; |
| | | minute = '00'; |
| | | if (hour<10){ |
| | | hour = '0'+hour; |
| | | } |
| | | } |
| | | }else { |
| | | console.log( |
| | | one,minute |
| | | ) |
| | | if (minute <= 15 && minute>0) { |
| | | console.log(1) |
| | | minute = '15'; |
| | | }else if(minute<=30){ |
| | | console.log(2) |
| | | minute = '30'; |
| | | }else if(minute<=45){ |
| | | console.log(3) |
| | | minute = '45'; |
| | | }else if (minute >45) { |
| | | console.log(4) |
| | | hour++; |
| | | minute = '00'; |
| | | if (hour<10){ |
| | | hour = '0'+hour; |
| | | } |
| | | } |
| | | } |
| | | if(e==1){ |
| | | $("#start-time").val(hour + ':' + minute) |
| | | }else { |
| | | $("#end-time").val(hour + ':' + minute) |
| | | } |
| | | } |
| | | </script> |
| | | @} |