...
|
...
|
@@ -508,19 +508,41 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', |
|
|
function openEditHtml(id) {
|
|
|
var url = 'baseconfig/shutdownplan/add';
|
|
|
var params = {};
|
|
|
//lsq 新增时弹框显示新增,编辑时显示编辑 2022-08-04
|
|
|
let titleName='新增';
|
|
|
if (id) {
|
|
|
params['cutoverId'] = id
|
|
|
params['cutoverId'] = id;
|
|
|
titleName='编辑';
|
|
|
}
|
|
|
view('commonViewModel').render(url).then(function (res) {
|
|
|
layer.open({
|
|
|
id: 'shutdownplanEditHtml',
|
|
|
content: laytpl(res.body).render(JSON.stringify(params)),
|
|
|
btn: ['保存', '取消'],
|
|
|
title: `<a class="layui-icon layui-icon-edit win_title_icon"></a>停机计划编辑`,
|
|
|
title: `<a class="layui-icon layui-icon-edit win_title_icon"></a>停机计划`+titleName,
|
|
|
type: '1',
|
|
|
resize: false,
|
|
|
area: ['80%', '90%'],
|
|
|
success: function (indexm, layero) {
|
|
|
//start 停机模式从数据字典中获取 2022-05-24
|
|
|
admin.req({
|
|
|
url: common.domainName + '/api-web/manage/ddic/findSucDdics/shutdown_plan_mode'
|
|
|
, method: 'POST'
|
|
|
, async: false
|
|
|
}).done(function (res) {
|
|
|
let radioData=res.data;
|
|
|
let htmlRadio='';
|
|
|
if(radioData && radioData.length>0){
|
|
|
radioData.map(item=>{
|
|
|
htmlRadio+=`<input type="radio" data-sort="`+item.ddicSort+`" name="cutoverMode" lay-filter="shutdownplanMode" value="`+item.ddicSort+`" title="`+item.ddicName+`">`
|
|
|
})
|
|
|
}
|
|
|
$('#shutdownDdic').html(htmlRadio);
|
|
|
$('#shutdownDdic [data-sort]:first-child').attr("checked",true)
|
|
|
}).error(function (error) {
|
|
|
console.error(error);
|
|
|
});
|
|
|
//end lsq 2022-05-24
|
|
|
},
|
|
|
yes: function (index, layero) {
|
|
|
$("#saveshutdownplanBtn").trigger("click");
|
...
|
...
|
|