From 640ff18d2d7f4be02ddb7f8f75e899f05545eb98 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期一, 05 二月 2024 11:56:52 +0800 Subject: [PATCH] 更新bug修改 --- cloud-server-management/src/main/webapp/WEB-INF/view/system/tSite/TSite_edit.html | 291 ++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 252 insertions(+), 39 deletions(-) diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tSite/TSite_edit.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tSite/TSite_edit.html index a608a3d..b8c7926 100644 --- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tSite/TSite_edit.html +++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tSite/TSite_edit.html @@ -1,41 +1,65 @@ -@layout("/common/_container.html"){ + @layout("/common/_container.html"){ <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> +<style> + .avatar-uploader .el-upload { + border: 1px dashed #d9d9d9; + border-radius: 6px; + cursor: pointer; + position: relative; + height: 100px; + width: 100px; + overflow: hidden; + } + + .avatar-uploader .el-upload:hover { + border-color: #409EFF; + } + .avatar-uploader-icon { + font-size: 28px; + color: #8c939d; + width: 100px; + height: 100px; + line-height: 100px; + margin-top: 32px; + text-align: center; + } + .avatar { + width: 100px; + height: 100px; + display: block; + } + + .col-sm-12 { + margin-top: 20px; + } + + .col-sm-12 select { + height: 33px; + } + #app1{ + margin-left: 255px; + } + + +</style> <div class="ibox float-e-margins"> <div class="ibox-content"> <div class="form-horizontal" id="carInfoForm"> + <input id="type_" value="${list.ishalf}" hidden> + <input id="objectType" value="${objectType}" hidden> + @if(objectType == 1){ - <div class="form-group" id="provinceCode"> - <label class="col-sm-3 control-label">*所在省:</label> - <div class="col-sm-9"> - <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TSiteInfo.oneChange(this)"> -<!-- <option style="width: 300px" value="${list.province}">${list.province}</option>--> - @for(obj in province){ - <option value="${obj}" ${obj == list.province ? 'selected=selected' : ''}>${obj}</option> -<!-- <option style="width: 300px" value="${obj}">${obj}</option>--> - @} - </select> - </div> - </div> - <div class="form-group" id="cityCode"> - <label class="col-sm-3 control-label">*所在市:</label> - <div class="col-sm-9"> - <select style="width: 300px" class="form-control" id="cCode" name="cCode" onchange="TSiteInfo.oneChangeNext(this)"> - @for(obj in city1){ - <option value="${obj.city}" ${obj.city == list.city ? 'selected=selected' : ''}>${obj.city}</option> -<!-- <option style="width: 300px" value="${obj.city}">${obj.city}</option>--> - @} - </select> - </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="account" name="account"> - @for(obj in accounts){ - <option style="width: 300px" value="${obj.id}">${obj.name}</option> + <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="TSiteInfo.oneChangeYys(this)"> + <option style="width: 300px" value="">选择运营商</option> + @for(obj in yysList){ + <option value="${obj.id}" ${obj.id == list.operatorId ? 'selected=selected' : ''}>${obj.name}</option> @} </select> + <input type="checkbox" value="0" name="pt" id="pt" onchange="TSiteInfo.oneChangeYys(this)">平台</input> </div> </div> @} @@ -50,12 +74,23 @@ </select> </div> </div> - <div class="form-group" id="siteType"> + + <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" onchange="updateTime1()"> + @for(obj in typeNames){ + <option value="${obj}" ${obj == list.typeName ? 'selected=selected' : ''}>${obj}</option> + @} + </select> + </div> + </div> + <div class="form-group" id="siteType"> + <label class="col-sm-3 control-label">*场地分类:</label> <div class="col-sm-9"> <select style="width: 300px" class="form-control" id="siteTypeId" name = "typeId"> @for(obj in siteType){ - <option value="${obj.id}">${obj.name}</option> + <option value="${obj.id}" ${obj.id == list.siteTypeId ? 'selected=selected' : ''}>${obj.name}</option> @} </select> </div> @@ -80,7 +115,7 @@ <label class="col-sm-3 control-label">*现金价格:</label> <div class="col-sm-9" style="display: flex;"> <input style="width: 300px" class="form-control" id="cashPrice" name="playPaiCoin" type="text" value="${list.cashPrice}"> - <span style="margin-left: 5px;margin-top: 5px">元/半小时</span> + <span style="margin-left: 5px;margin-top: 5px" id="priceLabel">元/半小时</span> </div> </div> @@ -88,9 +123,67 @@ <label class="col-sm-3 control-label">*玩湃币价格:</label> <div class="col-sm-9" style="display: flex;"> <input style="width: 300px" class="form-control" id="playPaiCoin" name="playPaiCoin" type="text" value="${list.playPaiCoin}"> - <span style="margin-left: 5px;margin-top: 5px">币/半小时</span> + <span style="margin-left: 5px;margin-top: 5px" id="priceLabel1">币/半小时</span> </div> </div> + + <div class="form-group" id="siteMore" style=" margin-left: 255px;"> + <div class="form-group">多场地配置:<i class="fa fa-plus" onclick="addBox()"></i></div> + @for(n in nextNames!){ + <div class="col-sm-8 control-label" id="far"> + <label class="col-sm-2 control-label">*单个场地名</label> + <div class="col-sm-3"> + <input type="text" name="name1" class="form-control newWidth" value="${n}"/> + </div> + <div class="col-sm-1"> + <i class="col-sm-1 fa fa-remove" onclick="delBox(this)" style="margin-top:10px"></i> + </div> + </div> + @} + </div> + + + <div class="form-group"> + <label class="col-sm-3 control-label">是否可预定半场:</label> + <div class="col-sm-9"> + <input type="radio" name="ishalf" value="2" checked onclick="updateHalf(1)"> 否 + <input type="radio" name="ishalf" value="1" onclick="updateHalf(2)"> 是 + </div> + </div> + <div id="halfCode" hidden> + <div class="form-group" style="margin-left: 100px;" > + <label class="col-sm-3 control-label">*现金价格:</label> + <div class="col-sm-9" style="display: flex;"> + <input style="width: 300px" class="form-control" id="cashPriceOne" name="playPaiCoin" placeholder="请输入价格" type="text" value="${list.cashPriceOne}"> + <span style="margin-left: 5px;margin-top: 5px" id="priceLabel3">元/半小时</span> + </div> + </div> + + <div class="form-group" style="margin-left: 100px;"> + <label class="col-sm-3 control-label">*玩湃币价格:</label> + <div class="col-sm-9" style="display: flex;"> + <input style="width: 300px" class="form-control" id="playPaiCoinOne" name="playPaiCoin" placeholder="请输入价格" type="text" value="${list.playPaiCoinOne}"> + <span style="margin-left: 5px;margin-top: 5px" id="priceLabel4">币/半小时</span> + </div> + </div> + + + <div class="form-group" id="halfName" > + <label class="col-sm-3 control-label">*半场名称:</label> + <div class="col-sm-8" style="display: flex;"> + <input style="width: 240px" class="form-control" name="name2" type="text" value="${halfName}"><i class="fa fa-plus" onclick="addBox1()" style="margin-left: 32px;margin-top: 10px;"></i> + </div> + </div> + @for(h in halfNames){ + <div class="form-group" > + <label class="col-sm-3 control-label">*半场名称:</label> + <div class="col-sm-8" style="display: flex;"> + <input style="width: 240px" class="form-control" name="name2" type="text" value="${h}"> <i class="col-sm-1 fa fa-remove" onclick="delBox(this)" style="margin-top:10px"></i> + </div> + </div> + @} + </div> + <div class="form-group"> <label class="col-sm-3 control-label">*场地责任险有效期:</label> @@ -110,7 +203,6 @@ <button class="btn btn-outline btn-success" type="file" onclick="UploadFileFn()"><i class="fa fa-upload"></i>上传文件</button> </div> </div> - @if(objectType ==1){ <div class="row" id="app1"> <div class="form-group"> <label class="col-sm-3 control-label head-scu-label">*实景图片(请上传不超过五张图片): </label> @@ -121,20 +213,31 @@ action="/tCouponManage/uploadPic" list-type="picture-card" accept="." + :file-list="imageUrl2" :on-success="handleAvatarSuccess" :on-remove="handleRemove"> <i class="el-icon-plus"></i> </el-upload> <el-dialog :visible.sync="dialogVisible"> - <img width="100%" :src="imageUrl1" alt=""> + <img width="100%" :src="imageUrl2" alt=""> </el-dialog> </div> </div> </div> - @} + </div> + <div class="form-group" style="margin-left: 205px;"> + <label class="col-sm-1 control-label">*添加闸机:</label> + <div class="col-sm-9"> + <input class="form-control" id="ids" name="ids" value="${list.ids}" type="text" style="width: 300px" placeholder="请输入闸机ID"> + </div> </div> @if(objectType==1){ - <#input style="width: 300px" id="name" name="*添加闸机:" placeholder="请输入闸机ID" type="text"/> + <div class="form-group" style="margin-left: 13%;display: inline-flex;margin-top: 16px;" > + <label class="col-sm-2 control-label">场地说明:</label> + <div class="col-sm-5" style="margin-left: -35px;"> + <textarea type="text/plain" id="editor" style="height: 300px;width: 800px;">${list.introduce}</textarea> + </div> + </div> @} <div class="row btn-group-m-t"> <div class="col-sm-10 col-sm-offset-5" > @@ -156,6 +259,39 @@ <script src="${ctxPath}/js/elementui/index.js"></script> <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> <script> + + function updateTime1() { + var selectedValue = document.getElementById("siteTypeOne").value; + var priceLabel = document.getElementById("priceLabel"); + var priceLabel1 = document.getElementById("priceLabel1"); + var priceLabel3 = document.getElementById("priceLabel3"); + var priceLabel4 = document.getElementById("priceLabel4"); + + if (selectedValue === "智慧场地") { + console.log("=============智慧场地=") + priceLabel.innerText = "元/15分钟"; + priceLabel1.innerText = "元/15分钟"; + priceLabel3.innerText = "元/15分钟"; + priceLabel4.innerText = "元/15分钟"; + } else { + priceLabel.innerText = "元/半小时"; + priceLabel1.innerText = "元/半小时"; + priceLabel3.innerText = "元/半小时"; + priceLabel4.innerText = "元/半小时"; + } + + + + // $("#end-time").val(''); + // $("#start-time").val(''); + } + + + + let id = "${list.imgs}" + let obj = [] + console.log("看看") + console.log(id) var vue2 = new Vue({ el: '#app1', props: { @@ -168,11 +304,26 @@ data: { autoUpload: true,//自动上传 imageUrl1: '',//模型数据,用于上传图片完成后图片预览 + imageUrl2: [], dialogVisible: false }, methods: { handleAvatarSuccess(res, file) { - TCarInfoDlg.goodsPicArray.push(file); + file.url =file.response + TSiteInfo.goodsPicArray.push(file); + }, + changeImg(){ + var i = id.split(",") + for (let j = 0; j <i.length; j++) { + let obj={ + fileName:i[j], + uuid:i[j], + url:i[j], + response:i[j], + } + this.imageUrl2.push(obj) + + } }, beforeAvatarUpload(file) { const isLt2M = file.size / 1024 / 1024 < 10; @@ -182,14 +333,17 @@ return isLt2M; }, handleRemove(file, fileList) { - TCarInfoDlg.goodsPicArray = TCarInfoDlg.goodsPicArray.filter(item => { + TSiteInfo.goodsPicArray = TSiteInfo.goodsPicArray.filter(item => { return item.uid != file.uid; }); }, }, created() { + this.changeImg() + TSiteInfo.goodsPicArray = this.imageUrl2 }, }); + var selectElement = document.getElementById('store'); var startTime = document.getElementById('start-time'); var endTime = document.getElementById('end-time'); @@ -203,5 +357,64 @@ endTime.disabled = true; } }); + + + window.onload = function(){ + var siteTypeOne = document.getElementById('siteTypeOne'); + siteTypeOne.onchange(); // Trigger the onchange event + + + console.log("${list.operatorId}") + if("${list.operatorId}"==0){ + console.log(233232) + $("#pt").attr('checked', true) + } + + + var OBJradio=document.getElementsByName("ishalf") + if($("#type_").val()==1){ + $("#halfCode").show() + } + for(i=0;i<OBJradio.length;i++){//循环查找这个radio + if($("#type_").val()==OBJradio[i].value){//判断是否与radio的值相同 + OBJradio[i].checked=true//修改选中状态 + } + } + + + } + + function addBox1() { + var a=" <div class=\"col-sm-8 control-label\" id=\"far\" style=\"margin-left: 210px;\">\n" + + " <label class=\"col-sm-2 control-label\">*半场名称:</label>\n" + + " <div class=\"col-sm-3\">\n" + + " <input type=\"text\" name=\"name2\" class=\"form-control newWidth\" style=\"margin-left: 8px;width: 240px;\"/> \n" + + " </div> \n" + + " <div class=\"col-sm-1\">\n" + + " <i class=\"col-sm-1 fa fa-remove\" onclick=\"delBox(this)\" style=\"margin-top:10px\"></i>\n" + + " </div> \n" + + " </div> " + + + $("#halfName").append($(a)) + } + function addBox() { + var a=" <div class=\"col-sm-8 control-label\" id=\"far\">\n" + + " <label class=\"col-sm-2 control-label\">*单个场地名</label>\n" + + " <div class=\"col-sm-3\">\n" + + " <input type=\"text\" name=\"name1\" class=\"form-control newWidth\" /> \n" + + " </div> \n" + + " <div class=\"col-sm-1\">\n" + + " <i class=\"col-sm-1 fa fa-remove\" onclick=\"delBox(this)\" style=\"margin-top:10px\"></i>\n" + + " </div> \n" + + " </div> " + + + $("#siteMore").append($(a)) + } + + function delBox(o) { + $(o).parent("div").parent("div").remove() + } </script> @} -- Gitblit v1.7.1