|
@@ -508,19 +508,41 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', |
|
@@ -508,19 +508,41 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', |
508
|
function openEditHtml(id) {
|
508
|
function openEditHtml(id) {
|
509
|
var url = 'baseconfig/shutdownplan/add';
|
509
|
var url = 'baseconfig/shutdownplan/add';
|
510
|
var params = {};
|
510
|
var params = {};
|
|
|
511
|
+ //lsq 新增时弹框显示新增,编辑时显示编辑 2022-08-04
|
|
|
512
|
+ let titleName='新增';
|
511
|
if (id) {
|
513
|
if (id) {
|
512
|
- params['cutoverId'] = id
|
514
|
+ params['cutoverId'] = id;
|
|
|
515
|
+ titleName='编辑';
|
513
|
}
|
516
|
}
|
514
|
view('commonViewModel').render(url).then(function (res) {
|
517
|
view('commonViewModel').render(url).then(function (res) {
|
515
|
layer.open({
|
518
|
layer.open({
|
516
|
id: 'shutdownplanEditHtml',
|
519
|
id: 'shutdownplanEditHtml',
|
517
|
content: laytpl(res.body).render(JSON.stringify(params)),
|
520
|
content: laytpl(res.body).render(JSON.stringify(params)),
|
518
|
btn: ['保存', '取消'],
|
521
|
btn: ['保存', '取消'],
|
519
|
- title: `<a class="layui-icon layui-icon-edit win_title_icon"></a>停机计划编辑`,
|
522
|
+ title: `<a class="layui-icon layui-icon-edit win_title_icon"></a>停机计划`+titleName,
|
520
|
type: '1',
|
523
|
type: '1',
|
521
|
resize: false,
|
524
|
resize: false,
|
522
|
area: ['80%', '90%'],
|
525
|
area: ['80%', '90%'],
|
523
|
success: function (indexm, layero) {
|
526
|
success: function (indexm, layero) {
|
|
|
527
|
+ //start 停机模式从数据字典中获取 2022-05-24
|
|
|
528
|
+ admin.req({
|
|
|
529
|
+ url: common.domainName + '/api-web/manage/ddic/findSucDdics/shutdown_plan_mode'
|
|
|
530
|
+ , method: 'POST'
|
|
|
531
|
+ , async: false
|
|
|
532
|
+ }).done(function (res) {
|
|
|
533
|
+ let radioData=res.data;
|
|
|
534
|
+ let htmlRadio='';
|
|
|
535
|
+ if(radioData && radioData.length>0){
|
|
|
536
|
+ radioData.map(item=>{
|
|
|
537
|
+ htmlRadio+=`<input type="radio" data-sort="`+item.ddicSort+`" name="cutoverMode" lay-filter="shutdownplanMode" value="`+item.ddicSort+`" title="`+item.ddicName+`">`
|
|
|
538
|
+ })
|
|
|
539
|
+ }
|
|
|
540
|
+ $('#shutdownDdic').html(htmlRadio);
|
|
|
541
|
+ $('#shutdownDdic [data-sort]:first-child').attr("checked",true)
|
|
|
542
|
+ }).error(function (error) {
|
|
|
543
|
+ console.error(error);
|
|
|
544
|
+ });
|
|
|
545
|
+ //end lsq 2022-05-24
|
524
|
},
|
546
|
},
|
525
|
yes: function (index, layero) {
|
547
|
yes: function (index, layero) {
|
526
|
$("#saveshutdownplanBtn").trigger("click");
|
548
|
$("#saveshutdownplanBtn").trigger("click");
|