|
|
|
@ -949,12 +949,17 @@
|
|
|
|
|
url: "/QingLong/zbdc/getSchoolCgzb",
|
|
|
|
|
success: function (res) {
|
|
|
|
|
|
|
|
|
|
console.log(typeof res.cz_wllshshshu);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!typeof res.cz_wllshshshu === 'undefined') {
|
|
|
|
|
console.log(1111)
|
|
|
|
|
|
|
|
|
|
var arr = ["cz_ldjyqlhwsrshu", "cz_ldjyzyhwsrshu", "cz_ldjyprwywsrshu", "cz_ldjyjyqyqsyyh", "cz_ldjynyscld", "cz_ldjyccgyz", "cz_ldjygyscld", "cz_ldjyxjstyyyy", "cz_ldjyxdfwyld"];
|
|
|
|
|
var ljRes = arr.filter(function (key) {
|
|
|
|
|
return res[key] !== 0 && res[key] !== null;
|
|
|
|
|
});
|
|
|
|
|
console.log(ljRes);
|
|
|
|
|
if (ljRes.length > 0) {
|
|
|
|
|
ljRes.forEach(function (item, index) {
|
|
|
|
|
if (index == 0) {
|
|
|
|
@ -1047,11 +1052,13 @@
|
|
|
|
|
var selectedValue = $(this).val();
|
|
|
|
|
selectValues.push(selectedValue);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('input[temp="ljCount"]').each(function () {
|
|
|
|
|
var inputValue = $(this).val();
|
|
|
|
|
inputValues.push(inputValue);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (hasDuplicates(selectValues)) {
|
|
|
|
|
layer.msg('劳技中的教室分类重复!', {
|
|
|
|
@ -1062,10 +1069,9 @@
|
|
|
|
|
var ljResult = selectValues.reduce(function (obj, key, index) {
|
|
|
|
|
obj[key] = inputValues[index];
|
|
|
|
|
return obj;
|
|
|
|
|
}, {});
|
|
|
|
|
|
|
|
|
|
}, {});
|
|
|
|
|
|
|
|
|
|
var result = Object.assign({}, data.field, ljResult);
|
|
|
|
|
var result = Object.assign({}, data.field, ljResult);
|
|
|
|
|
|
|
|
|
|
result.stage_id = "5";
|
|
|
|
|
|
|
|
|
|