修改所属泵站和权限
This commit is contained in:
@ -23,35 +23,25 @@
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
}
|
||||
function getProcessSectionFun() {
|
||||
var selectType = $("#processsectionCode").select2({minimumResultsForSearch: 10})
|
||||
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId: "JSBZ"}, function (data) {
|
||||
$("#processsectionCode").empty();
|
||||
var selelct_ = $("#processsectionCode").select2({
|
||||
data: data,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过10个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
var $processSection = $("#processsectionCode");
|
||||
// 弹窗内该字段使用原生select,规避select2在部分环境下无法点选的问题
|
||||
if ($processSection.hasClass("select2-hidden-accessible")) {
|
||||
$processSection.select2("destroy");
|
||||
}
|
||||
$processSection.removeClass("select2-hidden-accessible").removeAttr("data-select2-id").show();
|
||||
$processSection.next(".select2").remove();
|
||||
$.post(ext.contextPath + "/sparepart/sewage/getProcessSectionId4Select.do", {companyId: "JSBZ"}, function (data) {
|
||||
$processSection.empty();
|
||||
if (typeof data === "string") {
|
||||
try { data = JSON.parse(data); } catch (e) { data = []; }
|
||||
}
|
||||
$processSection.append('<option value="">请选择</option>');
|
||||
$.each(data || [], function (idx, item) {
|
||||
$processSection.append('<option value="' + item.id + '">' + item.text + '</option>');
|
||||
});
|
||||
selelct_.val('').trigger("change");
|
||||
selelct_.on('change', function (e) {
|
||||
$('#processSectionId').val(e.target.value);
|
||||
//给设备编码(工艺段部分)赋值
|
||||
// var name = $("#processsectionCode").find("option:selected").text();
|
||||
// $('#processsectionCodeAuto').val(getParenthesesStr(name));
|
||||
})
|
||||
$processSection.val('');
|
||||
}, 'json');
|
||||
}
|
||||
//输入框验证
|
||||
@ -165,10 +155,8 @@
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">所属泵站</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2" id="processsectionCode" name="processsectionCode"
|
||||
<select class="form-control" id="processsectionCode" name="processSectionId"
|
||||
style="width: 170px;"></select>
|
||||
<input type="hidden" class="form-control" id="processSectionId" name="processSectionId"
|
||||
value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -33,35 +33,26 @@
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
}
|
||||
function getProcessSectionFun() {
|
||||
var selectType = $("#processsectionCode").select2({minimumResultsForSearch: 10})
|
||||
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId: "JSBZ"}, function (data) {
|
||||
$("#processsectionCode").empty();
|
||||
var selelct_ = $("#processsectionCode").select2({
|
||||
data: data,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过10个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
var $processSection = $("#processsectionCode");
|
||||
var selectedProcessSectionId = "${not empty sewage.processSection ? sewage.processSection.id : sewage.processSectionId}";
|
||||
// 弹窗内该字段使用原生select,规避select2在部分环境下无法点选的问题
|
||||
if ($processSection.hasClass("select2-hidden-accessible")) {
|
||||
$processSection.select2("destroy");
|
||||
}
|
||||
$processSection.removeClass("select2-hidden-accessible").removeAttr("data-select2-id").show();
|
||||
$processSection.next(".select2").remove();
|
||||
$.post(ext.contextPath + "/sparepart/sewage/getProcessSectionId4Select.do", {companyId: "JSBZ"}, function (data) {
|
||||
$processSection.empty();
|
||||
if (typeof data === "string") {
|
||||
try { data = JSON.parse(data); } catch (e) { data = []; }
|
||||
}
|
||||
$processSection.append('<option value="">请选择</option>');
|
||||
$.each(data || [], function (idx, item) {
|
||||
$processSection.append('<option value="' + item.id + '">' + item.text + '</option>');
|
||||
});
|
||||
selelct_.val("${sewage.processSectionId}").trigger("change");
|
||||
selelct_.on('change', function (e) {
|
||||
$('#processSectionId').val(e.target.value);
|
||||
//给设备编码(工艺段部分)赋值
|
||||
// var name = $("#processsectionCode").find("option:selected").text();
|
||||
// $('#processsectionCodeAuto').val(getParenthesesStr(name));
|
||||
})
|
||||
$processSection.val(selectedProcessSectionId);
|
||||
}, 'json');
|
||||
}
|
||||
//输入框验证
|
||||
@ -171,9 +162,8 @@
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">所属泵站</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2" id="processsectionCode" name="processsectionCode"
|
||||
<select class="form-control" id="processsectionCode" name="processSectionId"
|
||||
style="width: 170px;"></select>
|
||||
<input type="hidden" class="form-control" id="processSectionId" name="processSectionId" value="${sewage.processSectionId}"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -174,24 +174,26 @@
|
||||
// dosearch();
|
||||
// });
|
||||
|
||||
//选择工艺段
|
||||
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId:"JSBZ"}, function(data) {
|
||||
$("#processSection").empty();
|
||||
var selelct_ =$("#processSection").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct_.val("").trigger("change");
|
||||
selelct_.on("change",function(e){
|
||||
//选择工艺段,使用原生select并直接返回process_section.id,避免select2/编码值导致无法选择或查询失效
|
||||
$.post(ext.contextPath + "/sparepart/sewage/getProcessSectionId4Select.do", {companyId:"JSBZ"}, function(data) {
|
||||
var $processSection = $("#processSection");
|
||||
if ($processSection.hasClass("select2-hidden-accessible")) {
|
||||
$processSection.select2("destroy");
|
||||
}
|
||||
$processSection.removeClass("select2-hidden-accessible").removeAttr("data-select2-id").show();
|
||||
$processSection.next(".select2").remove();
|
||||
$processSection.empty();
|
||||
if (typeof data === "string") {
|
||||
try { data = JSON.parse(data); } catch (e) { data = []; }
|
||||
}
|
||||
$processSection.append('<option value="">请选择</option>');
|
||||
$.each(data || [], function (idx, item) {
|
||||
$processSection.append('<option value="' + item.id + '">' + item.text + '</option>');
|
||||
});
|
||||
$processSection.val("");
|
||||
$processSection.off("change.sewageSearch").on("change.sewageSearch", function(){
|
||||
dosearch();
|
||||
});
|
||||
});
|
||||
},'json');
|
||||
//选择工艺段
|
||||
$.post(ext.contextPath + "/sparepart/sewage/getSewageCity4Select.do", {unitId: unitId}, function(data) {
|
||||
@ -432,9 +434,9 @@
|
||||
<select class="form-control select2" id="type_name1" name ="type_name1" style="width: 160px;">
|
||||
</select>
|
||||
</div> -->
|
||||
<div class="input-group input-group-sm pull-left">
|
||||
<label class="form-label " >所属泵站:</label>
|
||||
<select id ="processSection" class="form-control select2 " style="width: 180px;">
|
||||
<div class="form-group pull-left" style="margin-right: 10px;">
|
||||
<label class="form-label " style="margin-right: 6px;">所属泵站:</label>
|
||||
<select id ="processSection" class="form-control" style="width: 180px; display: inline-block; float: none; vertical-align: middle;">
|
||||
</select>
|
||||
</div>
|
||||
<!-- <div class="input-group input-group-sm" style="width: 250px;">
|
||||
@ -486,4 +488,4 @@
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@ -3,21 +3,12 @@
|
||||
function doSaveMainRole() {
|
||||
var checkedtree = $('#menu_func_tree').treeview('getChecked');
|
||||
var datas = "";
|
||||
var lis = $('[data-nodeid]');
|
||||
for (var i = 0; i < lis.length; i++) {
|
||||
if (lis[i].dataset.nodeid.split('.').length == 4) {
|
||||
var lis_element = $('#' + lis[i].id);
|
||||
if (lis_element.hasClass('node-checked')) {
|
||||
var span = lis_element.children('.check-icon');
|
||||
if (span.hasClass('glyphicon-check')) {
|
||||
datas += lis[i].id + ",";
|
||||
}
|
||||
}
|
||||
$.each(checkedtree, function (index, item) {
|
||||
// 只保存最终菜单节点,避免依赖固定树层级导致勾选后无法落库
|
||||
if (!item.nodes || item.nodes.length === 0) {
|
||||
datas += item.id + ",";
|
||||
}
|
||||
}
|
||||
/*$.each(checkedtree,function(index,item){
|
||||
datas+=item.id+",";
|
||||
});*/
|
||||
});
|
||||
$.post(ext.contextPath + "/user/updateRoleMenu.do", {menustr: datas, roleid: "${roleid}"}, function (result) {
|
||||
if (result >= 0) {
|
||||
closeModal('menuFuncModal');
|
||||
|
||||
Reference in New Issue
Block a user