diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index 6243ffa..4409d9a 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -729,7 +729,19 @@ var table = { } }); return selects; - } + }, + // 获取选中单选框项 + radioCheckeds: function(name) { + var radios = ""; + $('input:radio[name="' + name + '"]:checked').each(function(i) { + if (0 == i) { + radios = $(this).val(); + } else { + radios += ("," + $(this).val()); + } + }); + return radios; + }, }, // 弹出层封装处理 modal: { diff --git a/ruoyi-admin/src/main/resources/templates/main.html b/ruoyi-admin/src/main/resources/templates/main.html index 4c6aafc..7724caa 100644 --- a/ruoyi-admin/src/main/resources/templates/main.html +++ b/ruoyi-admin/src/main/resources/templates/main.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!--360浏览器优先以webkit内核解析--> - <title>若依介绍</title> + <title>保密业务综合管理系统</title> <link rel="shortcut icon" href="favicon.ico"> <link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/> <link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/> diff --git a/ruoyi-admin/src/main/resources/templates/system/elExam/userExam/view.html b/ruoyi-admin/src/main/resources/templates/system/elExam/userExam/view.html index 7b7fbe6..b5e8a20 100644 --- a/ruoyi-admin/src/main/resources/templates/system/elExam/userExam/view.html +++ b/ruoyi-admin/src/main/resources/templates/system/elExam/userExam/view.html @@ -26,7 +26,7 @@ </el-col> <el-col :span="12"> - 考试状态:{{ item.userTime}} + 考试状态:{{ item.stateName}} </el-col> </el-row> @@ -47,25 +47,26 @@ }, mounted(){ this.paperList = this.updatedPaperList - this.getCityList() }, computed: { updatedPaperList() { - return this.paperList.map(paper => { - const match = this.examStateList.find(function (item){ - item.dictValue == paper.state + return this.paperList.map(function(paper) { + var match = this.examStateList.find(function(item) { + return item.dictValue == paper.state; }); if (match) { var newPaper = {}; for (var key in paper) { - newPaper[key] = paper[key]; + if (paper.hasOwnProperty(key)) { + newPaper[key] = paper[key]; + } } newPaper.stateName = match.dictLabel; return newPaper; } else { return paper; } - }); + }.bind(this)); } }, methods:{ @@ -79,16 +80,6 @@ const seconds = ('0' + date.getSeconds()).slice(-2); return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; }, - getCityList(){ - $.ajax({ - url: ctx + "system/area/getSysAreaList", - type: 'GET', - data:this.params , - success:((res)=>{ - this.CityList = res.data.filter(obj => obj.id === '36625'); - }) , - }); - }, } }) </script> diff --git a/ruoyi-admin/src/main/resources/templates/system/user/add.html b/ruoyi-admin/src/main/resources/templates/system/user/add.html index da00331..63e373d 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/add.html @@ -92,7 +92,7 @@ <label class="col-sm-4 control-label is-required">角色:</label> <div class="col-sm-8"> <label th:each="role:${roles}" class="check-box"> - <input name="role" type="checkbox" th:value="${role.roleId}" th:text="${role.roleName}" th:disabled="${role.status == '1'}" > + <input name="role" type="radio" th:value="${role.roleId}" th:text="${role.roleName}" th:disabled="${role.status == '1'}"> </label> </div> </div> @@ -363,7 +363,7 @@ if ($.validate.form() && checkpwd(chrtype, password)) { var data = $("#form-user-add").serializeArray(); var status = $("input[id='status']").is(':checked') == true ? 0 : 1; - var roleIds = $.form.selectCheckeds("role"); + var roleIds = $.form.radioCheckeds("role"); var postIds = $.form.selectSelects("post"); data.push({"name": "status", "value": status}); data.push({"name": "roleIds", "value": roleIds}); diff --git a/ruoyi-admin/src/main/resources/templates/system/user/authRole.html b/ruoyi-admin/src/main/resources/templates/system/user/authRole.html index 1cc11fd..4c81d43 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/authRole.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/authRole.html @@ -61,7 +61,7 @@ clickToSelect: true, maintainSelected: true, columns: [{ - checkbox: true, + radio: true, formatter:function (value, row, index) { if($.common.isEmpty(value)) { return { checked: row.flag }; diff --git a/ruoyi-admin/src/main/resources/templates/system/user/edit.html b/ruoyi-admin/src/main/resources/templates/system/user/edit.html index a59b08b..b2ff197 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/edit.html @@ -81,8 +81,8 @@ <label class="col-sm-4 control-label is-required">角色:</label> <div class="col-sm-8"> <label th:each="role:${roles}" required class="check-box"> - <input name="role" type="checkbox" th:value="${role.roleId}" th:text="${role.roleName}" th:checked="${role.flag}" th:disabled="${role.status == '1'}"> - </label> + <input name="role" type="radio" th:value="${role.roleId}" th:text="${role.roleName}" th:checked="${role.flag}" th:disabled="${role.status == '1'}"> + </label> </div> </div> </div> @@ -308,7 +308,7 @@ if ($.validate.form()) { var data = $("#form-user-edit").serializeArray(); /*var status = $("input[id='status']").is(':checked') == true ? 0 : 1;*/ - var roleIds = $.form.selectCheckeds("role"); + var roleIds = $.form.radioCheckeds("role"); var postIds = $.form.selectSelects("post"); /*data.push({"name": "status", "value": status});*/ data.push({"name": "roleIds", "value": roleIds});