| | |
| | | }, |
| | | //简约模式右侧属性 |
| | | baseEditor: { |
| | | tag_mytext: ['title', 'alias', 'description', 'chooseForm', 'chooseSubform', 'mytextSel', 'layoutsetting', 'svalue'], |
| | | tag_mytext: ['title', 'alias', 'description','widthAndHeight', 'chooseForm', 'chooseSubform', 'mytextSel', 'layoutsetting', 'svalue'], |
| | | //表单样式 |
| | | tag_form: ['title', 'alias', 'description'], |
| | | tag_form: ['title', 'alias', 'description','widthAndHeight'], |
| | | //单行文本 |
| | | tag_text: ['title', 'alias', 'description', 'format', 'masterData', 'operatingauthority', 'mustcheck', 'maxlength', 'defaultvalue', 'layoutsetting',], |
| | | tag_text: ['title', 'alias', 'description','widthAndHeight', 'format', 'masterData', 'operatingauthority', 'mustcheck', 'maxlength', 'defaultvalue', 'layoutsetting',], |
| | | //生成编号 |
| | | tag_auto: ['title', 'alias', 'description', 'prefix', 'masterData', 'layoutsetting',], |
| | | tag_auto: ['title', 'alias', 'widthAndHeight', 'description', 'prefix', 'masterData', 'layoutsetting',], |
| | | //多行文本 |
| | | tag_textarea: ['title', 'alias', 'description', 'masterData', 'operatingauthority', 'mustcheck', 'maxlength', 'defaultvalueHtml', 'layoutsetting',], |
| | | tag_textarea: ['title', 'alias', 'widthAndHeight', 'description', 'masterData', 'operatingauthority', 'mustcheck', 'maxlength', 'defaultvalueHtml', 'layoutsetting',], |
| | | //数字 |
| | | tag_number: ['title', 'alias', 'description', 'masterData', 'numbertype', 'decimalplace', 'operatingauthority', 'mustcheck', 'numberMaxlength', 'defaultvalue', 'layoutsetting',], |
| | | tag_number: ['title', 'alias', 'widthAndHeight', 'description', 'masterData', 'numbertype', 'decimalplace', 'operatingauthority', 'mustcheck', 'numberMaxlength', 'defaultvalue', 'layoutsetting',], |
| | | //日历 |
| | | // tag_calendar: ['title', 'alias', 'description', 'datatype', 'masterData', 'operatingauthority', 'mustcheck', 'layoutsetting'], |
| | | tag_calendar: ['title', 'alias', 'description', 'datatype', 'masterData', 'operatingauthority', 'mustcheck', 'layoutsetting', 'datatypeDefault', 'currentDate'], |
| | | tag_calendar: ['title', 'alias', 'description','widthAndHeight', 'datatype', 'masterData', 'operatingauthority', 'mustcheck', 'layoutsetting', 'datatypeDefault', 'currentDate'], |
| | | |
| | | //单选按钮组 |
| | | tag_radio: ['title', 'alias', 'description', 'datasourcetype', 'operatingauthority', 'layoutsetting',], |
| | | tag_radio: ['title', 'alias', 'description','widthAndHeight', 'datasourcetype', 'operatingauthority', 'layoutsetting',], |
| | | //复选框组 |
| | | tag_checkbox: ['title', 'alias', 'description', 'datasourcetype', 'operatingauthority', 'mustcheck', 'layoutsetting'], |
| | | tag_checkbox: ['title', 'alias', 'description','widthAndHeight', 'datasourcetype', 'operatingauthority', 'mustcheck', 'layoutsetting'], |
| | | //下拉框 'userDefiendArr', |
| | | tag_dropdownlist: ['title', 'alias', 'description', 'dropdowntype', 'datasourcetype', 'operatingauthority', 'mustcheck', 'layoutsetting'], |
| | | tag_dropdownlist: ['title', 'alias', 'description','widthAndHeight', 'dropdowntype', 'datasourcetype', 'operatingauthority', 'mustcheck', 'layoutsetting'], |
| | | //按钮 |
| | | tag_button: ['title', 'alias', 'description', 'text', 'operatingauthority', 'layoutsetting',], |
| | | tag_button: ['title', 'alias', 'description', 'text','widthAndHeight', 'operatingauthority', 'layoutsetting',], |
| | | //图片 |
| | | tag_image: ['title', 'alias', 'description', 'imagetype', 'operatingauthority', 'defaultvalueUrl', 'layoutsetting',], |
| | | tag_image: ['title', 'alias', 'description', 'imagetype','widthAndHeight', 'operatingauthority', 'defaultvalueUrl', 'layoutsetting',], |
| | | //HTML内容 |
| | | tag_htmlediter: ['title', 'alias', 'description', 'visible', 'mustcheck', 'maxlength', 'defaultvalueHtml', 'layoutsetting',], |
| | | tag_htmlediter: ['title', 'alias', 'description','widthAndHeight', 'visible', 'mustcheck', 'maxlength', 'defaultvalueHtml', 'layoutsetting',], |
| | | //标签文字 |
| | | tag_link: ['title', 'alias', 'description', 'linkurl', 'text', 'operatingauthority', 'layoutsetting',], |
| | | tag_link: ['title', 'alias', 'description', 'linkurl','widthAndHeight', 'text', 'operatingauthority', 'layoutsetting',], |
| | | //二维码 |
| | | tag_qrcode: ['title', 'alias', 'description', 'qrcodeurl', 'autoType', 'operatingauthority', 'layoutsetting',], |
| | | tag_qrcode: ['title', 'alias', 'description','widthAndHeight', 'qrcodeurl', 'autoType', 'operatingauthority', 'layoutsetting',], |
| | | //条码 |
| | | tag_barcode: ['title', 'alias', 'description', 'operatingauthority', 'autoType', 'barcodeText', 'size', 'layoutsetting',], |
| | | tag_barcode: ['title', 'alias', 'description','widthAndHeight', 'operatingauthority', 'autoType', 'barcodeText', 'size', 'layoutsetting',], |
| | | //文件上传 |
| | | tag_fileupload: ['title', 'alias', 'description', 'operatingauthority', 'defaultvalueUrl', 'layoutsetting', 'mustcheck'],//修改 文件上传校验 |
| | | tag_fileupload: ['title', 'alias', 'description','widthAndHeight', 'operatingauthority', 'defaultvalueUrl', 'layoutsetting', 'mustcheck'],//修改 文件上传校验 |
| | | //子表单'total', |
| | | tag_subform: ['title', 'alias', 'description', 'visible', 'allcopy', 'addBtn','importFile'],//sorttype 隐藏 安全隐藏 , 'importFile' |
| | | tag_subform: ['title', 'alias', 'description','widthAndHeight', 'visible', 'allcopy', 'addBtn','importFile'],//sorttype 隐藏 安全隐藏 , 'importFile' |
| | | //树型 |
| | | tag_tree: ['title', 'alias', 'description', 'treetype', 'datasourcetypeTree', 'operatingauthority', 'mustcheck', 'layoutsetting', 'defaultvalueTree', 'disableParentNode'], |
| | | tag_tree: ['title', 'alias', 'description','widthAndHeight', 'treetype', 'datasourcetypeTree', 'operatingauthority', 'mustcheck', 'layoutsetting', 'defaultvalueTree', 'disableParentNode'], |
| | | //分割线 |
| | | tag_splitline: ['title', 'alias', 'description',], |
| | | tag_splitline: ['title', 'alias','widthAndHeight', 'description',], |
| | | //金额控件 |
| | | tag_amount: ['title', 'alias', 'masterData', 'description', 'operatingauthority', 'defaultvalue', 'layoutsetting'], |
| | | tag_amount: ['title', 'alias','widthAndHeight', 'masterData', 'description', 'operatingauthority', 'defaultvalue', 'layoutsetting'], |
| | | //选项卡 |
| | | tag_tag: ['title', 'alias', 'description'], |
| | | tag_tag: ['title', 'alias','widthAndHeight', 'description'], |
| | | //选项卡标签 |
| | | tag_tab: ['title', 'alias', 'description'], |
| | | tag_tab: ['title', 'alias','widthAndHeight', 'description'], |
| | | } |
| | | |
| | | } |
| | |
| | | var item = customShow.options.customItemShow.item[customItem.id]; |
| | | |
| | | //数据清空 |
| | | if (type == 'dropdownlist') { |
| | | $($('.customViewUEditorCss #' + customItem.id)[0]).empty(); |
| | | $($($('.customViewUEditorCss #' + customItem.id)[0]).parentNode).find(".select2").remove(); |
| | | var visibleTemp = customShow.options.customItemShow.item[customItem.id].tag_Attribute.visible; |
| | | if (!visibleTemp) { |
| | | $($($('.customViewUEditorCss #' + customItem.id)[0]).parentNode).remove(); |
| | | return; |
| | | } else { |
| | | $('.customViewUEditorCss #' + customItem.id).select2({ theme: "classic", width: '240' }); |
| | | } |
| | | } else if (type == 'radio' || type == 'checkbox') { |
| | | // var item = $('.customViewUEditorCss #'+customItem.id +" .line"); |
| | | $($($('.customViewUEditorCss #' + customItem.id + " .line"))[0]).empty(); |
| | | } |
| | | // if (type == 'dropdownlist') { |
| | | // $($('.customViewUEditorCss #' + customItem.id)[1]).empty(); |
| | | // $($($('.customViewUEditorCss #' + customItem.id)[1]).parentNode).find(".select2").remove(); |
| | | // var visibleTemp = customShow.options.customItemShow.item[customItem.id].tag_Attribute.visible; |
| | | // // if (!visibleTemp) { |
| | | // // $($($('.customViewUEditorCss #' + customItem.id)[0]).parentNode).remove(); |
| | | // // return; |
| | | // // } else { |
| | | // $('.customViewUEditorCss #' + customItem.id).select2({ theme: "classic", width: '240' }); |
| | | // // } |
| | | // } else if (type == 'radio' || type == 'checkbox') { |
| | | // // var item = $('.customViewUEditorCss #'+customItem.id +" .line"); |
| | | // $($($('.customViewUEditorCss #' + customItem.id + " .line"))[0]).empty(); |
| | | // } |
| | | |
| | | var datasourcetype = item.tag_Attribute.datasourcetype; |
| | | |
| | |
| | | } |
| | | }); |
| | | } |
| | | var heightShow = customShow.options.customItemShow.item[itemId].tag_Attribute.height; |
| | | var widthShow = customShow.options.customItemShow.item[itemId].tag_Attribute.width; |
| | | if (widthShow == undefined || heightShow == undefined||widthShow==0) { |
| | | $(".customViewUEditorCss #" + itemId).css('width',"100%"); |
| | | }else{ |
| | | $(".customViewUEditorCss #" + itemId).css('width',widthShow+"px"); |
| | | $(".customViewUEditorCss #" + itemId).css('height',heightShow+"px"); |
| | | } |
| | | } else if (customItems[item].type == 'dropdownlist' || customItems[item].type == 'radio' || |
| | | customItems[item].type == 'checkbox' || customItems[item].type == 'tree') { |
| | | if ('customShow' != showClass) { |
| | |
| | | linkurl = 'javascript:void(0)'; |
| | | } |
| | | if (customShow.costType[customItems[item].id].tag_Attribute.editable) {//不可编辑控制 |
| | | $('#' + customItems[item].id).attr('href', linkurl) |
| | | $('#' + customItems[item].id).attr('href', linkurl); |
| | | $('.customShow .'+customItems[item].id+'value').attr('href', linkurl); |
| | | } |
| | | } |
| | | } |
| | |
| | | }) |
| | | |
| | | _.each(unvisibleArr, function (opt) { |
| | | // $("[id='" + opt.id + "']").parent().parent().addClass("cfg_contentNone"); |
| | | if(customShow.options.customInit.designMode != 1){ |
| | | $("[id='" + opt.id + "']").parent().parent().addClass("cfg_contentNone"); |
| | | } |
| | | $(".customViewUEditorCss [id='" + opt.id + "']").parent().addClass("cfg_contentNone"); |
| | | $($(".customShow #itemId_" + opt.parentsubFormNum + " .tdTitleClass")[$("[id='" + opt.id + "']").parent().parent().index()]).addClass("cfg_contentNone"); |
| | | $($(".customViewUEditorCss #itemId_" + opt.parentsubFormNum + " .tdTitleClass")[$("[id='" + opt.id + "']").parent().parent().index()]).addClass("cfg_contentNone"); |
| | |
| | | widthShow = 200; |
| | | heightShow = 200; |
| | | } |
| | | var oNode = '<div style="word-break:break-all;width:' + widthShow + 'px;height:' + |
| | | heightShow + 'px;" class="customShowItemClass edui-default customShowItemClassTemp">'; |
| | | // var oNode ='<div style="word-break:break-all;border-width: 1px;border-style: solid;border-color: rgb(204, 204, 204);class="customShowItemClass edui-default">'; |
| | | oNode += value; |
| | | oNode += "</div>"; |
| | | if(customShow.options.customInit.designMode == 1){ |
| | | var oNode = '<span style="word-break:break-all;width:' + widthShow + 'px;height:' + |
| | | heightShow + 'px;" class="customShowItemClass edui-default customShowItemClassTemp">'; |
| | | oNode += value; |
| | | oNode += "</span>"; |
| | | }else{ |
| | | var oNode = '<div style="word-break:break-all;width:' + widthShow + 'px;height:' + |
| | | heightShow + 'px;" class="customShowItemClass edui-default customShowItemClassTemp">'; |
| | | oNode += value; |
| | | oNode += "</div>"; |
| | | } |
| | | $($(".customShow #" + id + "Item")[0]).after(oNode); |
| | | $($(".customShow #" + id + "Item")[0]).remove(); |
| | | //标签数据设定 |
| | | } else if (customItems[item].type == 'textarea') { |
| | | }else if(customItems[item].type == 'text'){ |
| | | if(customShow.options.customInit.designMode == 1){ |
| | | var position = $(".customShow #" + id).parent().attr('align'); |
| | | } |
| | | $(".customShow ." + id + "value").css('text-align',position); |
| | | }else if(customItems[item].type == "calendar"){ |
| | | if(customShow.options.customInit.designMode == 1){ |
| | | var position = $(".customShow #" + id).parent().attr('align'); |
| | | } |
| | | $(".customShow ." + id + "value").css('text-align',position); |
| | | }else if (customItems[item].type == 'textarea') { |
| | | var htmlediterShow = $(".customShow #" + id)[0]; |
| | | var heightShow = customShow.options.customItemShow.item[id].tag_Attribute.height; |
| | | var widthShow = customShow.options.customItemShow.item[id].tag_Attribute.width; |
| | |
| | | widthShow = 300; |
| | | heightShow = 80; |
| | | } |
| | | var oNode = '<div style="word-break:break-all;border-width: 0px;border-style: solid;border-color: rgb(204, 204, 204);width:' + widthShow + 'px;height:' + |
| | | if(customShow.options.customInit.designMode == 1){ |
| | | var oNode = '<span style="word-break:break-all;border-width: 0px;border-style: solid;border-color: rgb(204, 204, 204);width:' + widthShow + 'px;height:' + |
| | | heightShow + 'px;" class="customShowItemClass edui-default customShowItemClassTemp">'; |
| | | oNode += value; |
| | | oNode += "</span>"; |
| | | }else{ |
| | | var oNode = '<div style="word-break:break-all;border-width: 0px;border-style: solid;border-color: rgb(204, 204, 204);width:' + widthShow + 'px;height:' + |
| | | heightShow + 'px;" class="customShowItemClass edui-default customShowItemClassTemp">'; |
| | | // var oNode ='<div style="word-break:break-all;border-width: 1px;border-style: solid;border-color: rgb(204, 204, 204);class="customShowItemClass edui-default">'; |
| | | oNode += value; |
| | | oNode += "</div>"; |
| | | oNode += value; |
| | | oNode += "</div>"; |
| | | } |
| | | $($(".customShow #" + id)[0]).after(oNode); |
| | | $($(".customShow #" + id)[0]).remove(); |
| | | //标签数据设定 |
| | | } else if (customItems[item].type == 'number') { |
| | | if(customShow.options.customInit.designMode == 1){ |
| | | var position = $(".customShow #" + id).parent().attr('align'); |
| | | } |
| | | $(".customShow ." + id + "value").css('text-align',position); |
| | | var numberShowItems = $(".customShow #" + id); |
| | | for (var i = 0; i < numberShowItems.length; i++) { |
| | | numberShowItems[i].setAttribute("type", "text"); |
| | |
| | | } |
| | | else if (customItems[item].type == 'tree') { |
| | | //普通模式树形回显 |
| | | var oNode = '<div treeitemid=' + id + ' style="word-break:break-all;border-width: 0px;border-style: solid;border-color: rgb(204, 204, 204);width:200px;" class="customShowItemClass edui-default customShowItemClassTemp">'; |
| | | |
| | | "</div>"; |
| | | if(customShow.options.customInit.designMode == 1){ |
| | | var oNode = '<span treeitemid=' + id + ' style="word-break:break-all;border-width: 0px;border-style: solid;border-color: rgb(204, 204, 204);width:200px;" class="customShowItemClass edui-default customShowItemClassTemp">'; |
| | | "</span>"; |
| | | }else{ |
| | | var oNode = '<div treeitemid=' + id + ' style="word-break:break-all;border-width: 0px;border-style: solid;border-color: rgb(204, 204, 204);width:200px;" class="customShowItemClass edui-default customShowItemClassTemp">'; |
| | | "</div>"; |
| | | } |
| | | $($(".customShow").find("#" + id)[0]).after(oNode); |
| | | $($(".customShow").find("#" + id)[0]).remove(); |
| | | // customShow.setShowItem(id, type, value, true); |
| | |
| | | } |
| | | //公式联动追加 |
| | | if (results[i].doEvent != undefined && results[i].resultJsText.indexOf("setValue") != -1) { |
| | | var itemLength = $("." + results[i].targetid + "value").length-1; |
| | | var itemLength = $(".customViewUEditorCss" + results[i].targetid + "value").length-1; |
| | | strFunction += '$(".' + results[i].targetid + 'value").eq('+itemLength+').trigger("' + results[i].doEvent + '.value");'; |
| | | } |
| | | //公式联动追加结束 |
| | |
| | | //解决主数据重复 |
| | | var options_xh = _.cloneDeep(xhSelect.options); |
| | | options_xh.listData = []; |
| | | var xhSelectHeight = customShow.options.customItemShow.item[options.selectId].tag_Attribute.height; |
| | | //解决主数据重复END |
| | | options = $.extend(true, options_xh, options); |
| | | var optionArr = ""; |
| | |
| | | '</div>' + |
| | | '<div class="selectItme" style="display:none;" value=""></div>' + |
| | | '<div class="select3-element" style="width:100%;max-width: ' + options.width + 'px">' + |
| | | ' <div class="select-container select-container_box" gccolname="ex_c11"> ' + |
| | | ' <div style = "height:'+xhSelectHeight+'px;" class="select-container select-container_box" gccolname="ex_c11"> ' + |
| | | ' <div class="suffix">' + |
| | | ' <i class="fa fa-angle-down" aria-hidden="true"></i>' + |
| | | ' </div>' + |
| | |
| | | $(function () { |
| | | console.log('asd'); |
| | | Flatpickr.localize(Flatpickr.l10ns.zh); // 设置为中文 |
| | | toastr.options = { |
| | | closeButton: false, |
| | |
| | | // flag = JSON.parse(flag); |
| | | // } |
| | | // dataObj.flag = flag; |
| | | |
| | | var customShowItems; |
| | | var requestRight = window.commonAjax("/datamanagement/getFormFieldListService", dataObj, "GET", true); |
| | | //var requestTableData = window.commonAjax("/datamanagement/getFormDataListService", dataObj, "GET", true); |
| | | var thead=""; |
| | |
| | | var dataSourceArray = []; |
| | | var newBtnEnable = true; |
| | | requestRight.done(function (rs) { |
| | | |
| | | var request = window.commonAjax("/formbase/getFormInfoService", {"formID":globalFormID}, "GET", true); |
| | | request.done(function (res) { |
| | | |
| | | customShowItems =JSON.parse(res.data.fieldset); |
| | | var mytextObj = {}; |
| | | var mytextArr = []; |
| | | |
| | |
| | | var searchCounts = 0; |
| | | $.each(rs.data, function (index, item) { |
| | | |
| | | |
| | | if (item.parentsubFormNum == 0 && showListObject[item.fieldtype]) { |
| | | for(items in customShowItems){ |
| | | if(item.fieldKey==customShowItems[items].tag_Attribute.alias){ |
| | | var visible = customShowItems[items].tag_Attribute.visible; |
| | | } |
| | | } |
| | | if (item.parentsubFormNum == 0 && showListObject[item.fieldtype]&&visible) { |
| | | appendText += thText.replace("replaceTextHead", item.fieldKey); |
| | | |
| | | |
| | |
| | | // toastr.error("服务器通信失败,请重试!"); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | requestRight.error(function (rs) { |
| | | toastr.error(rs.responseJSON.rspDesc); |
| | |
| | | $("#ulConditionTemplate").empty(); |
| | | var dataIndex = 1; |
| | | $.each(rs.data, function (index, item) { |
| | | if (item.fieldtype != 'subform' && item.parentsubFormNum == 0 && searchObject[item.fieldtype]) { |
| | | for(items in customShowItems){ |
| | | if(item.fieldKey==customShowItems[items].tag_Attribute.alias){ |
| | | var visible = customShowItems[items].tag_Attribute.visible; |
| | | } |
| | | } |
| | | if (item.fieldtype != 'subform' && item.parentsubFormNum == 0 && searchObject[item.fieldtype]&&visible) { |
| | | var newCopyObj = $("#condtionTemplate").clone(true, true); |
| | | newCopyObj.css("display", "block"); |
| | | newCopyObj.removeAttr("id"); |
| | |
| | | $("#ulTemplate").empty(); |
| | | var dataIndex = 1; |
| | | $.each(rs.data, function (index, item) { |
| | | if (item.parentsubFormNum == 0 && showListObject[item.fieldtype]) { |
| | | for(items in customShowItems){ |
| | | if(item.fieldKey==customShowItems[items].tag_Attribute.alias){ |
| | | var visible = customShowItems[items].tag_Attribute.visible; |
| | | } |
| | | } |
| | | if (item.parentsubFormNum == 0 && showListObject[item.fieldtype]&&visible) { |
| | | var newCopyObj = $("#liTemplate").clone(true, true); |
| | | newCopyObj.css("display", "block"); |
| | | newCopyObj.removeAttr("id"); |