You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ry_zhky/ruoyi-admin/src/main/resources/templates/system/user/resetUeky.html

99 lines
3.1 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('UKey绑定')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-user-ukey">
<input name="userId" type="hidden" th:value="${user.userId}" />
<div class="form-group">
<label class="col-sm-3 control-label is-required">请选择证书:</label>
<div class="col-sm-8">
<select class="form-control" id="id_cert_list" required onchange="select_cert(this.value)">
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">选择设备序列号:</label>
<div class="col-sm-8">
<select class="form-control" id="id_device_list" required onchange="select_device(this.value)">
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">设备序列号:</label>
<div class="col-sm-8">
<input class="form-control" type="text" required readonly id="id_selected_device_sn">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">选择的证书ID</label>
<div class="col-sm-8">
<input class="form-control" type="text" required readonly id="id_selected_cert_id" name="ukeyId" th:value="${user.ukeyId}">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:src="@{/ruoyi/xtxasyn.js}"></script>
<script type="text/javascript">
function customFireEvent(objId, eventName) {
var obj = document.getElementById(objId);
if (obj == undefined) {
return;
}
if (obj.fireEvent) {
obj.fireEvent("on" + eventName);
} else if (obj.dispatchEvent) {
var e = document.createEvent('HTMLEvents');
e.initEvent(eventName, false, false);
obj.dispatchEvent(e);
}
}
function FillDeviceList() {
GetAllDeviceSN(function (retObj) {
var obj = document.getElementById("id_device_list");
if (obj == undefined) {
return;
}
var i, n = obj.length;
for (i = 0; i < n; i++) {
obj.remove(0);
}
var strDeviceList = retObj.retVal;
while (true) {
var pos = strDeviceList.indexOf(";");
if (pos <= 0) {
break;
}
var strOneDevice = strDeviceList.substring(0, pos);
var objItem = new Option(strOneDevice, strOneDevice);
obj.options.add(objItem);
var len = strDeviceList.length;
strDeviceList = strDeviceList.substring(pos + 1, len);
}
customFireEvent('id_cert_list', 'change');
customFireEvent('id_device_list', 'change');
});
}
function select_cert(value) {
$("#id_selected_cert_id").val(value);
}
function select_device(value) {
$("#id_selected_device_sn").val(value);
}
SetUserCertList("id_cert_list");
FillDeviceList();
SetOnUsbKeyChangeCallBack(FillDeviceList);
function submitHandler() {
if ($.validate.form()) {
$.operate.saveTab(ctx + "system/user/resetUekySave", $('#form-user-ukey').serialize());
}
}
</script>
</body>
</html>