提交 df4bff11 编写于 作者: W weizhiqiang

【公共】tagEditor重置加载数据修改

上级 9c7e11e7
...@@ -70,16 +70,8 @@ layui.config({ ...@@ -70,16 +70,8 @@ layui.config({
systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要 systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要
systemCommonUtil.checkType = "2"; // 人员选择类型,1.多选;其他。单选 systemCommonUtil.checkType = "2"; // 人员选择类型,1.多选;其他。单选
systemCommonUtil.openSysUserStaffChoosePage(function (userReturnList){ systemCommonUtil.openSysUserStaffChoosePage(function (userReturnList){
// 移除所有tag // 重置数据
var tags = $('#interviewer').tagEditor('getTags')[0].tags; interviewer = [].concat(systemCommonUtil.tagEditorResetData('interviewer', userReturnList));
for (i = 0; i < tags.length; i++) {
$('#interviewer').tagEditor('removeTag', tags[i]);
}
interviewer = [].concat(userReturnList);
// 添加新的tag
$.each(interviewer, function(i, item){
$('#interviewer').tagEditor('addTag', item.name);
});
}); });
}); });
......
...@@ -63,16 +63,8 @@ layui.config({ ...@@ -63,16 +63,8 @@ layui.config({
systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要 systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要
systemCommonUtil.checkType = "2"; // 人员选择类型,1.多选;其他。单选 systemCommonUtil.checkType = "2"; // 人员选择类型,1.多选;其他。单选
systemCommonUtil.openSysUserStaffChoosePage(function (userReturnList){ systemCommonUtil.openSysUserStaffChoosePage(function (userReturnList){
// 移除所有tag // 重置数据
var tags = $('#chargePersonId').tagEditor('getTags')[0].tags; chargePerson = [].concat(systemCommonUtil.tagEditorResetData('chargePersonId', userReturnList));
for (i = 0; i < tags.length; i++) {
$('#chargePersonId').tagEditor('removeTag', tags[i]);
}
chargePerson = [].concat(userReturnList);
// 添加新的tag
$.each(chargePerson, function(i, item){
$('#chargePersonId').tagEditor('addTag', item.name);
});
}); });
}); });
......
...@@ -66,10 +66,10 @@ layui.config({ ...@@ -66,10 +66,10 @@ layui.config({
id: parent.rowId id: parent.rowId
}; };
AjaxPostUtil.request({url: flowableBasePath + "bossInterviewee005", params: params, type: 'json', method: "PUT", callback: function(json){ AjaxPostUtil.request({url: flowableBasePath + "bossInterviewee005", params: params, type: 'json', method: "PUT", callback: function(json){
if(json.returnCode == 0){ if (json.returnCode == 0) {
parent.layer.close(index); parent.layer.close(index);
parent.refreshCode = '0'; parent.refreshCode = '0';
}else{ } else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}}); }});
...@@ -86,16 +86,8 @@ layui.config({ ...@@ -86,16 +86,8 @@ layui.config({
systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要 systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要
systemCommonUtil.checkType = "2"; // 人员选择类型,1.多选;其他。单选 systemCommonUtil.checkType = "2"; // 人员选择类型,1.多选;其他。单选
systemCommonUtil.openSysUserStaffChoosePage(function (userReturnList){ systemCommonUtil.openSysUserStaffChoosePage(function (userReturnList){
// 移除所有tag // 重置数据
var tags = $('#chargePersonId').tagEditor('getTags')[0].tags; chargePerson = [].concat(systemCommonUtil.tagEditorResetData('chargePersonId', userReturnList));
for (i = 0; i < tags.length; i++) {
$('#chargePersonId').tagEditor('removeTag', tags[i]);
}
chargePerson = [].concat(userReturnList);
// 添加新的tag
$.each(chargePerson, function(i, item){
$('#chargePersonId').tagEditor('addTag', item.name);
});
}); });
}); });
......
...@@ -74,16 +74,8 @@ layui.config({ ...@@ -74,16 +74,8 @@ layui.config({
systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要 systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要
systemCommonUtil.checkType = "1"; // 人员选择类型,1.多选;其他。单选 systemCommonUtil.checkType = "1"; // 人员选择类型,1.多选;其他。单选
systemCommonUtil.openSysUserStaffChoosePage(function (userReturnList){ systemCommonUtil.openSysUserStaffChoosePage(function (userReturnList){
// 移除所有tag // 重置数据
var tags = $('#personLiable').tagEditor('getTags')[0].tags; personLiable = [].concat(systemCommonUtil.tagEditorResetData('personLiable', userReturnList));
for (i = 0; i < tags.length; i++) {
$('#personLiable').tagEditor('removeTag', tags[i]);
}
personLiable = [].concat(userReturnList);
// 添加新的tag
$.each(personLiable, function(i, item){
$('#personLiable').tagEditor('addTag', item.name);
});
}); });
}); });
......
...@@ -100,17 +100,17 @@ layui.config({ ...@@ -100,17 +100,17 @@ layui.config({
} }
params.content = encodeURIComponent(ue.getContent()); params.content = encodeURIComponent(ue.getContent());
if(isNull(params.content)){ if(isNull(params.content)){
winui.window.msg("请输入内容", {icon: 2,time: 2000}); winui.window.msg("请输入内容", {icon: 2, time: 2000});
return false; return false;
} }
params.textConent = encodeURIComponent(ue.getContentTxt()); params.textConent = encodeURIComponent(ue.getContentTxt());
AjaxPostUtil.request({url:reqBasePath + "forumcontent005", params:params, type: 'json', callback: function(json){ AjaxPostUtil.request({url:reqBasePath + "forumcontent005", params:params, type: 'json', callback: function(json){
if(json.returnCode == 0){ if (json.returnCode == 0) {
winui.window.msg("发布成功", {icon: 1, time: 2000}, function(){ winui.window.msg("发布成功", {icon: 1, time: 2000}, function() {
location.href = '../../tpl/forumshow/myposts.html'; location.href = '../../tpl/forumshow/myposts.html';
}); });
}else{ } else {
winui.window.msg(json.returnMessage, {icon: 2,time: 2000}); winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}}); }});
} }
...@@ -119,7 +119,7 @@ layui.config({ ...@@ -119,7 +119,7 @@ layui.config({
} }
}); });
$("body").on("click", "#chooseTag", function(e){ $("body").on("click", "#chooseTag", function(e) {
tagReturnList = [].concat(tagList); tagReturnList = [].concat(tagList);
_openNewWindows({ _openNewWindows({
url: "../../tpl/forumshow/choosetag.html", url: "../../tpl/forumshow/choosetag.html",
...@@ -128,16 +128,8 @@ layui.config({ ...@@ -128,16 +128,8 @@ layui.config({
area: ['600px', '500px'], area: ['600px', '500px'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if (refreshCode == '0') {
//移除所有tag // 重置数据
var tags = $('#tagId').tagEditor('getTags')[0].tags; tagList = [].concat(systemCommonUtil.tagEditorResetData('tagId', tagReturnList));
for (i = 0; i < tags.length; i++) {
$('#tagId').tagEditor('removeTag', tags[i]);
}
tagList = [].concat(tagReturnList);
//添加新的tag
$.each(tagList, function(i, item){
$('#tagId').tagEditor('addTag', item.name);
});
} else if (refreshCode == '-9999') { } else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
} }
......
...@@ -34,16 +34,8 @@ layui.config({ ...@@ -34,16 +34,8 @@ layui.config({
area: ['600px', '500px'], area: ['600px', '500px'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if (refreshCode == '0') {
//移除所有tag // 重置数据
var tags = $('#tagId').tagEditor('getTags')[0].tags; tagList = [].concat(systemCommonUtil.tagEditorResetData('tagId', tagReturnList));
for (i = 0; i < tags.length; i++) {
$('#tagId').tagEditor('removeTag', tags[i]);
}
tagList = [].concat(tagReturnList);
//添加新的tag
$.each(tagList, function(i, item){
$('#tagId').tagEditor('addTag', item.name);
});
} else if (refreshCode == '-9999') { } else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
} }
......
...@@ -128,16 +128,8 @@ layui.config({ ...@@ -128,16 +128,8 @@ layui.config({
systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要 systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要
systemCommonUtil.checkType = "2"; // 人员选择类型,1.多选;其他。单选 systemCommonUtil.checkType = "2"; // 人员选择类型,1.多选;其他。单选
systemCommonUtil.openSysUserStaffChoosePage(function (userReturnList) { systemCommonUtil.openSysUserStaffChoosePage(function (userReturnList) {
// 移除所有tag // 重置数据
var tags = $('#handsPersonId').tagEditor('getTags')[0].tags; handsPersonList = [].concat(systemCommonUtil.tagEditorResetData('handsPersonId', userReturnList));
for (i = 0; i < tags.length; i++) {
$('#handsPersonId').tagEditor('removeTag', tags[i]);
}
handsPersonList = [].concat(userReturnList);
// 添加新的tag
$.each(handsPersonList, function(i, item){
$('#handsPersonId').tagEditor('addTag', item.name);
});
}); });
}); });
......
...@@ -193,16 +193,8 @@ layui.config({ ...@@ -193,16 +193,8 @@ layui.config({
systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要 systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要
systemCommonUtil.checkType = "2"; // 人员选择类型,1.多选;其他。单选 systemCommonUtil.checkType = "2"; // 人员选择类型,1.多选;其他。单选
systemCommonUtil.openSysUserStaffChoosePage(function (userReturnList) { systemCommonUtil.openSysUserStaffChoosePage(function (userReturnList) {
// 移除所有tag // 重置数据
var tags = $('#handsPersonId').tagEditor('getTags')[0].tags; handsPersonList = [].concat(systemCommonUtil.tagEditorResetData('handsPersonId', userReturnList));
for (i = 0; i < tags.length; i++) {
$('#handsPersonId').tagEditor('removeTag', tags[i]);
}
handsPersonList = [].concat(userReturnList);
// 添加新的tag
$.each(handsPersonList, function(i, item){
$('#handsPersonId').tagEditor('addTag', item.name);
});
}); });
}); });
......
...@@ -129,15 +129,8 @@ layui.config({ ...@@ -129,15 +129,8 @@ layui.config({
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if (refreshCode == '0') {
var templateArray = [].concat(companyList); // 重置数据
var tags = $('#company').tagEditor('getTags')[0].tags; companyList = [].concat(systemCommonUtil.tagEditorResetData('company', companyList));
for (i = 0; i < tags.length; i++) {
$('#company').tagEditor('removeTag', tags[i]);
}
companyList = [].concat(templateArray);
$.each(companyList, function(i, item){
$('#company').tagEditor('addTag', item.name);
});
} else if (refreshCode == '-9999') { } else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
} }
...@@ -153,23 +146,16 @@ layui.config({ ...@@ -153,23 +146,16 @@ layui.config({
departmentList = [].concat(arrayUtil.removeArrayPointName(departmentList, val)); departmentList = [].concat(arrayUtil.removeArrayPointName(departmentList, val));
} }
}); });
$("body").on("click", "#departmentSel", function(){ $("body").on("click", "#departmentSel", function() {
_openNewWindows({ _openNewWindows({
url: "../../tpl/companydepartment/companyDepartmentChooseList.html", url: "../../tpl/companydepartment/companyDepartmentChooseList.html",
title: "选择部门", title: "选择部门",
pageId: "companyDepartmentChooseList", pageId: "companyDepartmentChooseList",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode) {
if (refreshCode == '0') { if (refreshCode == '0') {
var templateArray = [].concat(departmentList); // 重置数据
var tags = $('#department').tagEditor('getTags')[0].tags; departmentList = [].concat(systemCommonUtil.tagEditorResetData('department', departmentList));
for (i = 0; i < tags.length; i++) {
$('#department').tagEditor('removeTag', tags[i]);
}
departmentList = [].concat(templateArray);
$.each(departmentList, function(i, item){
$('#department').tagEditor('addTag', item.name);
});
} else if (refreshCode == '-9999') { } else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
} }
...@@ -189,14 +175,8 @@ layui.config({ ...@@ -189,14 +175,8 @@ layui.config({
systemCommonUtil.userStaffCheckType = true; // 选择类型,默认单选,true:多选,false:单选 systemCommonUtil.userStaffCheckType = true; // 选择类型,默认单选,true:多选,false:单选
systemCommonUtil.checkStaffMation = [].concat(checkStaffList); // 选择时返回的对象 systemCommonUtil.checkStaffMation = [].concat(checkStaffList); // 选择时返回的对象
systemCommonUtil.openSysAllUserStaffChoosePage(function (checkStaffMation){ systemCommonUtil.openSysAllUserStaffChoosePage(function (checkStaffMation){
var tags = $('#userStaff').tagEditor('getTags')[0].tags; // 重置数据
for (i = 0; i < tags.length; i++) { checkStaffList = [].concat(systemCommonUtil.tagEditorResetData('userStaff', checkStaffMation));
$('#userStaff').tagEditor('removeTag', tags[i]);
}
checkStaffList = [].concat(checkStaffMation);
$.each(checkStaffList, function(i, item){
$('#userStaff').tagEditor('addTag', item.name);
});
}); });
}); });
......
...@@ -193,15 +193,8 @@ layui.config({ ...@@ -193,15 +193,8 @@ layui.config({
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if (refreshCode == '0') {
var templateArray = [].concat(companyList); // 重置数据
var tags = $('#company').tagEditor('getTags')[0].tags; companyList = [].concat(systemCommonUtil.tagEditorResetData('company', companyList));
for (i = 0; i < tags.length; i++) {
$('#company').tagEditor('removeTag', tags[i]);
}
companyList = [].concat(templateArray);
$.each(companyList, function(i, item){
$('#company').tagEditor('addTag', item.name);
});
} else if (refreshCode == '-9999') { } else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
} }
...@@ -209,23 +202,16 @@ layui.config({ ...@@ -209,23 +202,16 @@ layui.config({
}); });
// 选择部门 // 选择部门
$("body").on("click", "#departmentSel", function(){ $("body").on("click", "#departmentSel", function() {
_openNewWindows({ _openNewWindows({
url: "../../tpl/companydepartment/companyDepartmentChooseList.html", url: "../../tpl/companydepartment/companyDepartmentChooseList.html",
title: "选择部门", title: "选择部门",
pageId: "companyDepartmentChooseList", pageId: "companyDepartmentChooseList",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode) {
if (refreshCode == '0') { if (refreshCode == '0') {
var templateArray = [].concat(departmentList); // 重置数据
var tags = $('#department').tagEditor('getTags')[0].tags; departmentList = [].concat(systemCommonUtil.tagEditorResetData('department', departmentList));
for (i = 0; i < tags.length; i++) {
$('#department').tagEditor('removeTag', tags[i]);
}
departmentList = [].concat(templateArray);
$.each(departmentList, function(i, item){
$('#department').tagEditor('addTag', item.name);
});
} else if (refreshCode == '-9999') { } else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
} }
...@@ -237,14 +223,8 @@ layui.config({ ...@@ -237,14 +223,8 @@ layui.config({
systemCommonUtil.userStaffCheckType = true; // 选择类型,默认单选,true:多选,false:单选 systemCommonUtil.userStaffCheckType = true; // 选择类型,默认单选,true:多选,false:单选
systemCommonUtil.checkStaffMation = [].concat(checkStaffList); // 选择时返回的对象 systemCommonUtil.checkStaffMation = [].concat(checkStaffList); // 选择时返回的对象
systemCommonUtil.openSysAllUserStaffChoosePage(function (checkStaffMation){ systemCommonUtil.openSysAllUserStaffChoosePage(function (checkStaffMation){
var tags = $('#userStaff').tagEditor('getTags')[0].tags; // 重置数据
for (i = 0; i < tags.length; i++) { checkStaffList = [].concat(systemCommonUtil.tagEditorResetData('userStaff', checkStaffMation));
$('#userStaff').tagEditor('removeTag', tags[i]);
}
checkStaffList = [].concat(checkStaffMation);
$.each(checkStaffList, function(i, item){
$('#userStaff').tagEditor('addTag', item.name);
});
}); });
}); });
......
...@@ -114,15 +114,8 @@ layui.config({ ...@@ -114,15 +114,8 @@ layui.config({
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if (refreshCode == '0') {
var templateArray = [].concat(companyList); // 重置数据
var tags = $('#company').tagEditor('getTags')[0].tags; companyList = [].concat(systemCommonUtil.tagEditorResetData('company', companyList));
for (i = 0; i < tags.length; i++) {
$('#company').tagEditor('removeTag', tags[i]);
}
companyList = [].concat(templateArray);
$.each(companyList, function(i, item){
$('#company').tagEditor('addTag', item.name);
});
} else if (refreshCode == '-9999') { } else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
} }
...@@ -146,15 +139,8 @@ layui.config({ ...@@ -146,15 +139,8 @@ layui.config({
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if (refreshCode == '0') {
var templateArray = [].concat(departmentList); // 重置数据
var tags = $('#department').tagEditor('getTags')[0].tags; departmentList = [].concat(systemCommonUtil.tagEditorResetData('department', departmentList));
for (i = 0; i < tags.length; i++) {
$('#department').tagEditor('removeTag', tags[i]);
}
departmentList = [].concat(templateArray);
$.each(departmentList, function(i, item){
$('#department').tagEditor('addTag', item.name);
});
} else if (refreshCode == '-9999') { } else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
} }
...@@ -170,18 +156,12 @@ layui.config({ ...@@ -170,18 +156,12 @@ layui.config({
checkStaffList = [].concat(arrayUtil.removeArrayPointName(checkStaffList, val)); checkStaffList = [].concat(arrayUtil.removeArrayPointName(checkStaffList, val));
} }
}); });
$("body").on("click", "#userStaffSel", function(){ $("body").on("click", "#userStaffSel", function() {
systemCommonUtil.userStaffCheckType = true; // 选择类型,默认单选,true:多选,false:单选 systemCommonUtil.userStaffCheckType = true; // 选择类型,默认单选,true:多选,false:单选
systemCommonUtil.checkStaffMation = [].concat(checkStaffList); // 选择时返回的对象 systemCommonUtil.checkStaffMation = [].concat(checkStaffList); // 选择时返回的对象
systemCommonUtil.openSysAllUserStaffChoosePage(function (checkStaffMation){ systemCommonUtil.openSysAllUserStaffChoosePage(function (checkStaffMation) {
var tags = $('#userStaff').tagEditor('getTags')[0].tags; // 重置数据
for (i = 0; i < tags.length; i++) { checkStaffList = [].concat(systemCommonUtil.tagEditorResetData('userStaff', checkStaffMation));
$('#userStaff').tagEditor('removeTag', tags[i]);
}
checkStaffList = [].concat(checkStaffMation);
$.each(checkStaffList, function(i, item){
$('#userStaff').tagEditor('addTag', item.name);
});
}); });
}); });
......
...@@ -167,15 +167,8 @@ layui.config({ ...@@ -167,15 +167,8 @@ layui.config({
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if (refreshCode == '0') {
var templateArray = [].concat(companyList); // 重置数据
var tags = $('#company').tagEditor('getTags')[0].tags; companyList = [].concat(systemCommonUtil.tagEditorResetData('company', companyList));
for (i = 0; i < tags.length; i++) {
$('#company').tagEditor('removeTag', tags[i]);
}
companyList = [].concat(templateArray);
$.each(companyList, function(i, item){
$('#company').tagEditor('addTag', item.name);
});
} else if (refreshCode == '-9999') { } else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
} }
...@@ -191,15 +184,8 @@ layui.config({ ...@@ -191,15 +184,8 @@ layui.config({
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if (refreshCode == '0') {
var templateArray = [].concat(departmentList); // 重置数据
var tags = $('#department').tagEditor('getTags')[0].tags; departmentList = [].concat(systemCommonUtil.tagEditorResetData('department', departmentList));
for (i = 0; i < tags.length; i++) {
$('#department').tagEditor('removeTag', tags[i]);
}
departmentList = [].concat(templateArray);
$.each(departmentList, function(i, item){
$('#department').tagEditor('addTag', item.name);
});
} else if (refreshCode == '-9999') { } else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
} }
...@@ -211,14 +197,8 @@ layui.config({ ...@@ -211,14 +197,8 @@ layui.config({
systemCommonUtil.userStaffCheckType = true; // 选择类型,默认单选,true:多选,false:单选 systemCommonUtil.userStaffCheckType = true; // 选择类型,默认单选,true:多选,false:单选
systemCommonUtil.checkStaffMation = [].concat(checkStaffList); // 选择时返回的对象 systemCommonUtil.checkStaffMation = [].concat(checkStaffList); // 选择时返回的对象
systemCommonUtil.openSysAllUserStaffChoosePage(function (checkStaffMation){ systemCommonUtil.openSysAllUserStaffChoosePage(function (checkStaffMation){
var tags = $('#userStaff').tagEditor('getTags')[0].tags; // 重置数据
for (i = 0; i < tags.length; i++) { checkStaffList = [].concat(systemCommonUtil.tagEditorResetData('userStaff', checkStaffMation));
$('#userStaff').tagEditor('removeTag', tags[i]);
}
checkStaffList = [].concat(checkStaffMation);
$.each(checkStaffList, function(i, item){
$('#userStaff').tagEditor('addTag', item.name);
});
}); });
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册