Selaa lähdekoodia

转专业页面添加提交功能

新疆警官学校中职
libo 1 vuosi sitten
vanhempi
commit
c3cf3f302c
2 muutettua tiedostoa jossa 28 lisäystä ja 27 poistoa
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.cshtml
  2. +27
    -26
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.js

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.cshtml Näytä tiedosto

@@ -116,7 +116,7 @@
</div> </div>
</div> </div>


<div style="margin:0 auto;cursor:pointer;margin-bottom:10px; position:relative; width:80px; height:28px;line-height:28px;border-radius:4px; background:#039cfd;color:#FFF;text-align:center;">
<div id="subbtn" style="margin:0 auto;cursor:pointer;margin-bottom:10px; position:relative; width:80px; height:28px;line-height:28px;border-radius:4px; background:#039cfd;color:#FFF;text-align:center;">
提交 提交
</div> </div>
</div> </div>


+ 27
- 26
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.js Näytä tiedosto

@@ -411,7 +411,9 @@ var bootstrap = function ($, learun) {
], ],
mainId: 'AAIId', mainId: 'AAIId',
}); });

$('#subbtn').on('click', function () {
console.log('123')
})
}, },
// 初始化列表 // 初始化列表
initGird: function () { initGird: function () {
@@ -805,29 +807,31 @@ var bootstrap = function ($, learun) {
isPage: true, isPage: true,
rows: 100, rows: 100,
isMultiselect: true, isMultiselect: true,
onSelectRow: function (rowdata) {
var selectedRow = $('#gridtable').jfGridGet('rowdata');
if (list.length < 1) {
list = selectedRow
} else {
// 合并两个数组
list = list.concat(selectedRow)
// 去重
let temp = {}
list = list.reduce((prev, curv) => {
// 若临时对象中有一模一样的item,则什么都不做
if (temp[curv.StuNo]) { }
else {
temp[curv.StuNo] = true
prev.push(curv)
}
return prev
}, [])
//console.log('resources', list)
onSelectRow: function (rowdata,type) {
console.log(rowdata)
console.log(type)

if (type) {
var selectedRow = $('#gridtable').jfGridGet('rowdata');
if (list.length < 1) {
list = selectedRow
} else {
list = list.concat(selectedRow)
let temp = {}
list = list.reduce((prev, curv) => {
if (temp[curv.StuNo]) { }
else {
temp[curv.StuNo] = true
prev.push(curv)
}
return prev
}, [])
}
tempdatra = list
$('#selgridtab').jfGridSet('refreshdata', tempdatra);
} }
console.log(list)
tempdatra = list
$('#selgridtab').jfGridSet('refreshdata', tempdatra);

} }


}); });
@@ -842,7 +846,4 @@ var bootstrap = function ($, learun) {
page.search(); page.search();
}; };
page.init(); page.init();
}
function delbtn() {
console.log('111111')
} }

Ladataan…
Peruuta
Tallenna