diff --git a/base-server/src/main/resources/template/js/operate/writeOperate.js b/base-server/src/main/resources/template/js/operate/writeOperate.js index 0dbee6a6988638f9b79cbb630a651297c4ead831..2659cfc6e94b588760ecac49bacd01e90850f8b4 100644 --- a/base-server/src/main/resources/template/js/operate/writeOperate.js +++ b/base-server/src/main/resources/template/js/operate/writeOperate.js @@ -105,7 +105,11 @@ layui.config({ initTableChooseUtil.resetData('pageParams', params); }); } - + dsFormColumnUtil.init({ + id: 'attrSymbolsDesignBox', + title: '按钮显示条件', + className: parent.objectId + }, isNull(json.bean.showConditionList) ? [] : json.bean.showConditionList); }, async: false}); } else { dsFormColumnUtil.init({ @@ -182,6 +186,7 @@ layui.config({ authPointNum: $("#authPointNum").val(), eventType: $("#eventType").val(), orderBy: $("#orderBy").val(), + showConditionList: JSON.stringify(dsFormColumnUtil.tableDataList), id: isNull(parent.rowId) ? '' : parent.rowId }; diff --git a/boss/src/main/resources/template/js/bossInterviewee/bossIntervieweeAdd.js b/boss/src/main/resources/template/js/bossInterviewee/bossIntervieweeAdd.js deleted file mode 100644 index 3453e78e28279c75fd08df5282f3167169eee836..0000000000000000000000000000000000000000 --- a/boss/src/main/resources/template/js/bossInterviewee/bossIntervieweeAdd.js +++ /dev/null @@ -1,74 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui', 'textool', 'tagEditor', 'form'], function (exports) { - winui.renderColor(); - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$, - textool = layui.textool, - form = layui.form; - - textool.init({eleId: 'basicResume', maxlength: 1000}); - - skyeyeEnclosure.init('enclosureUpload'); - matchingLanguage(); - form.render(); - form.on('submit(formAddBean)', function (data) { - if (winui.verifyForm(data.elem)) { - var params = { - name: $("#name").val(), - sex: $("input[name='userSex']:checked").val(), - idcard: $("#idcard").val(), - phone: $("#phone").val(), - fromId: bossUtil.bossIntervieweeFromChooseMation.id, - favoriteJob: $("#favoriteJob").val(), - basicResume: $("#basicResume").val(), - workYears: $("#workYears").val(), - chargePersonId: chargePerson[0].id, - enclosureResume: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload') - }; - AjaxPostUtil.request({url: flowableBasePath + "bossInterviewee002", params: params, type: 'json', method: "POST", callback: function(json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - } - return false; - }); - - var chargePerson = []; - $('#chargePersonId').tagEditor({ - initialTags: [], - placeholder: '请选择负责人', - editorTag: false, - beforeTagDelete: function(field, editor, tags, val) { - chargePerson = [].concat(arrayUtil.removeArrayPointName(chargePerson, val)); - } - }); - - // 人员选择 - $("body").on("click", "#toHandsPersonSelPeople", function (e) { - systemCommonUtil.userReturnList = [].concat(chargePerson); - systemCommonUtil.chooseOrNotMy = "1"; // 人员列表中是否包含自己--1.包含;其他参数不包含 - systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要 - systemCommonUtil.checkType = "2"; // 人员选择类型,1.多选;其他。单选 - systemCommonUtil.openSysUserStaffChoosePage(function (userReturnList){ - // 重置数据 - chargePerson = [].concat(systemCommonUtil.tagEditorResetData('chargePersonId', userReturnList)); - }); - }); - - // 选择来源 - $("body").on("click", "#toChooseFromId", function (e) { - var _this = $(this); - bossUtil.openBossIntervieweeFromChoosePage(function (bossIntervieweeFromMation){ - _this.parent().find("input").val(bossIntervieweeFromMation.title); - }); - }); - - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); -}); \ No newline at end of file diff --git a/boss/src/main/resources/template/js/bossInterviewee/bossIntervieweeDetails.js b/boss/src/main/resources/template/js/bossInterviewee/bossIntervieweeDetails.js deleted file mode 100644 index 54739a864e5b430aa2a66399daf8d9134d46a91c..0000000000000000000000000000000000000000 --- a/boss/src/main/resources/template/js/bossInterviewee/bossIntervieweeDetails.js +++ /dev/null @@ -1,34 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui', 'form'], function (exports) { - winui.renderColor(); - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$, - form = layui.form; - - showGrid({ - id: "showForm", - url: flowableBasePath + "bossInterviewee004", - params: {id: parent.rowId}, - pagination: false, - method: "GET", - template: $("#beanTemplate").html(), - ajaxSendLoadBefore: function(hdb, json){ - json.bean.basicResume = stringManipulation.textAreaShow(json.bean.basicResume); - }, - ajaxSendAfter: function (json) { - $("#chargePerson").html(json.bean.chargePerson[0].name); - skyeyeEnclosure.showDetails({"enclosureUpload": json.bean.enclosureInfo}); - matchingLanguage(); - form.render(); - } - }); - - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); -}); \ No newline at end of file diff --git a/boss/src/main/resources/template/js/bossInterviewee/bossIntervieweeEdit.js b/boss/src/main/resources/template/js/bossInterviewee/bossIntervieweeEdit.js deleted file mode 100644 index b4d46add17f344511ebabca206c163293d93d72f..0000000000000000000000000000000000000000 --- a/boss/src/main/resources/template/js/bossInterviewee/bossIntervieweeEdit.js +++ /dev/null @@ -1,97 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui', 'textool', 'tagEditor', 'form'], function (exports) { - winui.renderColor(); - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$, - textool = layui.textool, - form = layui.form; - var chargePerson = []; - - showGrid({ - id: "showForm", - url: flowableBasePath + "bossInterviewee004", - params: {id: parent.rowId}, - pagination: false, - method: "GET", - template: $("#beanTemplate").html(), - ajaxSendAfter: function (json) { - $("input:radio[name=userSex][value=" + json.bean.sex + "]").attr("checked", true); - - bossUtil.bossIntervieweeFromChooseMation = { - id: json.bean.fromId, - title: json.bean.fromName - }; - - var userNames = []; - chargePerson = [].concat(json.bean.chargePerson); - $.each(chargePerson, function(i, item) { - userNames.push(item.name); - }); - $('#chargePersonId').tagEditor({ - initialTags: userNames, - placeholder: '请选择负责人', - editorTag: false, - beforeTagDelete: function(field, editor, tags, val) { - chargePerson = [].concat(arrayUtil.removeArrayPointName(chargePerson, val)); - } - }); - - textool.init({eleId: 'basicResume', maxlength: 1000}); - - skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo}); - matchingLanguage(); - form.render(); - form.on('submit(formEditBean)', function (data) { - if (winui.verifyForm(data.elem)) { - var params = { - name: $("#name").val(), - sex: $("input[name='userSex']:checked").val(), - idcard: $("#idcard").val(), - phone: $("#phone").val(), - fromId: bossUtil.bossIntervieweeFromChooseMation.id, - favoriteJob: $("#favoriteJob").val(), - basicResume: $("#basicResume").val(), - workYears: $("#workYears").val(), - chargePersonId: chargePerson[0].id, - enclosureResume: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload'), - id: parent.rowId - }; - AjaxPostUtil.request({url: flowableBasePath + "bossInterviewee005", params: params, type: 'json', method: "PUT", callback: function (json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - } - return false; - }); - } - }); - - // 人员选择 - $("body").on("click", "#toHandsPersonSelPeople", function (e) { - systemCommonUtil.userReturnList = [].concat(chargePerson); - systemCommonUtil.chooseOrNotMy = "1"; // 人员列表中是否包含自己--1.包含;其他参数不包含 - systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要 - systemCommonUtil.checkType = "2"; // 人员选择类型,1.多选;其他。单选 - systemCommonUtil.openSysUserStaffChoosePage(function (userReturnList){ - // 重置数据 - chargePerson = [].concat(systemCommonUtil.tagEditorResetData('chargePersonId', userReturnList)); - }); - }); - - // 选择来源 - $("body").on("click", "#toChooseFromId", function (e) { - var _this = $(this); - bossUtil.openBossIntervieweeFromChoosePage(function (bossIntervieweeFromMation){ - _this.parent().find("input").val(bossIntervieweeFromMation.title); - }); - }); - - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); -}); \ No newline at end of file diff --git a/boss/src/main/resources/template/js/bossInterviewee/myChargeBossIntervieweeList.js b/boss/src/main/resources/template/js/bossInterviewee/myChargeBossIntervieweeList.js deleted file mode 100644 index 902aae41ca549e7d00d59d822cb4535508b8e075..0000000000000000000000000000000000000000 --- a/boss/src/main/resources/template/js/bossInterviewee/myChargeBossIntervieweeList.js +++ /dev/null @@ -1,122 +0,0 @@ - -var rowId = ""; -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { - winui.renderColor(); - var $ = layui.$, - form = layui.form, - table = layui.table; - - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: flowableBasePath + 'bossInterviewee001', - where: getTableParams(), - even: true, - page: true, - limits: getLimits(), - limit: getLimit(), - cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'name', title: '姓名', align: 'left', width: 100, templet: function (d) { - return '' + d.name + ''; - }}, - { field: 'phone', title: '联系方式', align: 'left', width: 120 }, - { field: 'fromName', title: '来源', align: 'left', width: 120 }, - { field: 'workYears', title: '工作年限', align: 'left', width: 100 }, - { field: 'favoriteJob', title: '心仪岗位', align: 'left', width: 130 }, - { field: 'stateName', title: '状态', align: 'left', width: 80 }, - { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 }, - { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }, - { field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 }, - { field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 }, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 150, toolbar: '#tableBar'} - ]], - done: function(json) { - matchingLanguage(); - } - }); - - table.on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'edit') { //编辑 - edit(data); - } else if (layEvent === 'delet') { //删除 - delet(data); - } else if (layEvent === 'details') { //详情 - details(data); - } - }); - - // 删除 - function delet(data) { - layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) { - layer.close(index); - AjaxPostUtil.request({url: flowableBasePath + "bossInterviewee003", params: {id: data.id}, type: 'json', method: "DELETE", callback: function (json) { - winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - }); - } - - // 编辑 - function edit(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/bossInterviewee/bossIntervieweeEdit.html", - title: systemLanguage["com.skyeye.editPageTitle"][languageType], - pageId: "bossIntervieweeEdit", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - } - }); - } - - // 详情 - function details(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/bossInterviewee/bossIntervieweeDetails.html", - title: systemLanguage["com.skyeye.editPageTitle"][languageType], - pageId: "bossIntervieweeDetails", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - } - }); - } - - form.render(); - form.on('submit(formSearch)', function (data) { - if (winui.verifyForm(data.elem)) { - table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); - } - return false; - }); - - // 刷新数据 - $("body").on("click", "#reloadTable", function() { - loadTable(); - }); - - function loadTable() { - table.reloadData("messageTable", {where: getTableParams()}); - } - - function getTableParams() { - return { - name: $("#name").val(), - phone: $("#phone").val(), - type: 2 - }; - } - - exports('myChargeBossIntervieweeList', {}); -}); diff --git a/boss/src/main/resources/template/js/bossInterviewee/myEnterBossIntervieweeList.js b/boss/src/main/resources/template/js/bossInterviewee/myEnterBossIntervieweeList.js deleted file mode 100644 index 7c20b78c1e1e4ec9a66f49c51965b489fd5c67ac..0000000000000000000000000000000000000000 --- a/boss/src/main/resources/template/js/bossInterviewee/myEnterBossIntervieweeList.js +++ /dev/null @@ -1,137 +0,0 @@ - -var rowId = ""; -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { - winui.renderColor(); - var $ = layui.$, - form = layui.form, - table = layui.table; - - authBtn('1637677810338'); - - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: flowableBasePath + 'bossInterviewee001', - where: getTableParams(), - even: true, - page: true, - limits: getLimits(), - limit: getLimit(), - cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'name', title: '姓名', align: 'left', width: 100, templet: function (d) { - return '' + d.name + ''; - }}, - { field: 'phone', title: '联系方式', align: 'left', width: 120 }, - { field: 'fromName', title: '来源', align: 'left', width: 120 }, - { field: 'workYears', title: '工作年限', align: 'left', width: 100 }, - { field: 'favoriteJob', title: '心仪岗位', align: 'left', width: 130 }, - { field: 'stateName', title: '状态', align: 'left', width: 80 }, - { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 }, - { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }, - { field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 }, - { field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 }, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 150, toolbar: '#tableBar'} - ]], - done: function(json) { - matchingLanguage(); - } - }); - - table.on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'edit') { //编辑 - edit(data); - } else if (layEvent === 'delet') { //删除 - delet(data); - } else if (layEvent === 'details') { //详情 - details(data); - } - }); - - // 添加 - $("body").on("click", "#addBean", function() { - _openNewWindows({ - url: "../../tpl/bossInterviewee/bossIntervieweeAdd.html", - title: systemLanguage["com.skyeye.addPageTitle"][languageType], - pageId: "bossIntervieweeAdd", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - }); - - // 删除 - function delet(data) { - layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) { - layer.close(index); - AjaxPostUtil.request({url: flowableBasePath + "bossInterviewee003", params: {id: data.id}, type: 'json', method: "DELETE", callback: function (json) { - winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - }); - } - - // 编辑 - function edit(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/bossInterviewee/bossIntervieweeEdit.html", - title: systemLanguage["com.skyeye.editPageTitle"][languageType], - pageId: "bossIntervieweeEdit", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - } - }); - } - - // 详情 - function details(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/bossInterviewee/bossIntervieweeDetails.html", - title: systemLanguage["com.skyeye.editPageTitle"][languageType], - pageId: "bossIntervieweeDetails", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - } - }); - } - - form.render(); - form.on('submit(formSearch)', function (data) { - if (winui.verifyForm(data.elem)) { - table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); - } - return false; - }); - - // 刷新数据 - $("body").on("click", "#reloadTable", function() { - loadTable(); - }); - - function loadTable() { - table.reloadData("messageTable", {where: getTableParams()}); - } - - function getTableParams() { - return { - name: $("#name").val(), - phone: $("#phone").val(), - type: 1 - }; - } - - exports('myEnterBossIntervieweeList', {}); -}); diff --git a/boss/src/main/resources/template/tpl/bossInterviewee/bossIntervieweeAdd.html b/boss/src/main/resources/template/tpl/bossInterviewee/bossIntervieweeAdd.html deleted file mode 100644 index eebdb803e8c2ba439fefea1ea5f90ed2f84c44ca..0000000000000000000000000000000000000000 --- a/boss/src/main/resources/template/tpl/bossInterviewee/bossIntervieweeAdd.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - -
-
-
- -
- -
-
-
- -
- - - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- - -
-
-
- -
- -
-
-
- -
- - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
-
-
-
- - -
-
-
-
- - - - - \ No newline at end of file diff --git a/boss/src/main/resources/template/tpl/bossInterviewee/bossIntervieweeDetails.html b/boss/src/main/resources/template/tpl/bossInterviewee/bossIntervieweeDetails.html deleted file mode 100644 index 56527bb81bf7c6f6ff00c6de4a310a4e043e801d..0000000000000000000000000000000000000000 --- a/boss/src/main/resources/template/tpl/bossInterviewee/bossIntervieweeDetails.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - -
-
- -
-
- - - - - - - - \ No newline at end of file diff --git a/boss/src/main/resources/template/tpl/bossInterviewee/bossIntervieweeEdit.html b/boss/src/main/resources/template/tpl/bossInterviewee/bossIntervieweeEdit.html deleted file mode 100644 index bd9455aa867704a6e88f50fd99e258426a1d8344..0000000000000000000000000000000000000000 --- a/boss/src/main/resources/template/tpl/bossInterviewee/bossIntervieweeEdit.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - -
-
- -
-
- - - - - - - - \ No newline at end of file diff --git a/boss/src/main/resources/template/tpl/bossInterviewee/myChargeBossIntervieweeList.html b/boss/src/main/resources/template/tpl/bossInterviewee/myChargeBossIntervieweeList.html deleted file mode 100644 index 3ef9adb46d37d4af54f54a305c44bf39de578602..0000000000000000000000000000000000000000 --- a/boss/src/main/resources/template/tpl/bossInterviewee/myChargeBossIntervieweeList.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - -
-
-
-
- -
- -
- -
- -
- - -
-
-
-
-
-
- -
-
-
-
- -
- - - - - \ No newline at end of file diff --git a/boss/src/main/resources/template/tpl/bossInterviewee/myEnterBossIntervieweeList.html b/boss/src/main/resources/template/tpl/bossInterviewee/myEnterBossIntervieweeList.html deleted file mode 100644 index 63c1de5cd349614474def0a08dde76cc2af3ca37..0000000000000000000000000000000000000000 --- a/boss/src/main/resources/template/tpl/bossInterviewee/myEnterBossIntervieweeList.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - -
-
-
-
- -
- -
- -
- -
- - -
-
-
-
-
-
- - -
-
-
-
- -
- - - - - \ No newline at end of file diff --git a/web/src/main/resources/template/assets/lib/layui/customer/bossUtil.js b/web/src/main/resources/template/assets/lib/layui/customer/bossUtil.js index 2563d475c18c886f5614a3a4e134a4943acc36fb..c897ff37da7b3ab52e9f3743e0e504ced3b5afba 100644 --- a/web/src/main/resources/template/assets/lib/layui/customer/bossUtil.js +++ b/web/src/main/resources/template/assets/lib/layui/customer/bossUtil.js @@ -2,25 +2,6 @@ // 招聘模块工具函数 var bossUtil = { - /** - * 打开面试者来源选择页面 - * - * @param callback 回调函数 - */ - bossIntervieweeFromChooseMation: {}, // 已经选择的面试者来源信息 - openBossIntervieweeFromChoosePage: function (callback) { - _openNewWindows({ - url: "../../tpl/bossIntervieweeFrom/bossIntervieweeFromListChoose.html", - title: "面试者来源", - pageId: "bossIntervieweeFromListChoosePage", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - if(typeof(callback) == "function") { - callback(bossUtil.bossIntervieweeFromChooseMation); - } - }}); - }, - /** * 面试安排的状态 * diff --git a/web/src/main/resources/template/assets/lib/layui/customer/skyeye/dsFormUtil.js b/web/src/main/resources/template/assets/lib/layui/customer/skyeye/dsFormUtil.js index 72287ac65b3b6949168f9d26f48222fb2d840fda..a40fd25405b81868bd449db04f143f3c94f496d8 100644 --- a/web/src/main/resources/template/assets/lib/layui/customer/skyeye/dsFormUtil.js +++ b/web/src/main/resources/template/assets/lib/layui/customer/skyeye/dsFormUtil.js @@ -798,7 +798,7 @@ var dsFormTableUtil = { $(`#${item.position}`).append(``); } else if (item.position == 'actionBar') { // 操作栏 - $(`#${item.position}`).append(`${item.name}`); + $(`#${item.position}`).append(dsFormTableUtil.initActionBarOperate(item)); } else if (item.position == 'rightMenuBar') { // 右键菜单栏 @@ -807,6 +807,20 @@ var dsFormTableUtil = { }); }, + initActionBarOperate: function (item) { + if (isNull(item.showConditionList) || item.showConditionList.length == 0) { + // 没有设置按钮显示的条件 + return `${item.name}`; + } + var condition = []; + $.each(item.showConditionList, function (i, bean) { + condition.push(`d.${bean.attrKey} ${bean.symbolsMark} ${bean.value}`); + }); + var conditionStr = condition.join('&&'); + // 没有设置按钮显示的条件 + return `{{# if (${conditionStr}) { }}${item.name}{{# } }}`; + }, + getTableHead: function (column, tableColumnList) { var header = []; if (!isNull(column.serialNumColumn) && column.serialNumColumn) { @@ -962,12 +976,16 @@ var dsFormColumnUtil = { // layui的表格对象 table: null, - init: function (config) { + init: function (config, tableDataList) { // 设置配置信息 dsFormColumnUtil.config = config; + dsFormColumnUtil.tableDataList = isNull(tableDataList) ? [] : tableDataList; + $.each(dsFormColumnUtil.tableDataList, function (i, item) { + item.id = dsFormColumnUtil.rowNum; + dsFormColumnUtil.rowNum++; + }); // 获取属性列表/属性与值的对比符号信息 dsFormColumnUtil.getDataList(); - console.log(dsFormColumnUtil.config.attrList) // 加载盒子 dsFormColumnUtil.initHtml(); // 加载表格 @@ -1060,7 +1078,7 @@ var dsFormColumnUtil = { _html += ``; return _html; }}, - { field: 'symbols', title: '比较符号*', align: 'left', width: 120, templet: function (d) { + { field: 'symbols', title: '比较符号*', align: 'left', width: 140, templet: function (d) { var _html = ``; return _html; }}, - { field: 'value', title: '值*', align: 'left', width: 150, templet: function (d) { + { field: 'value', title: '值*', align: 'left', width: 160, templet: function (d) { return `
` + dsFormColumnUtil.getDomHtml(d) + `
`; }}, ]], @@ -1104,9 +1122,10 @@ var dsFormColumnUtil = { } // 获取属性信息 var attrKey = $(`#attrKey${d.id}`).val(); - if (isNull(attrKey)) { + if (isNull(attrKey) && isNull(d.attrKey)) { return ''; } + attrKey = isNull(attrKey) ? d.attrKey : attrKey; var displayValue = d.displayValue; var value = d.value; // 获取属性对应的组件编码---todo 后续根据编号加载对应的dom