提交 df4bff11 编写于 作者: W weizhiqiang

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

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