function LayuiUtil(layui, viewer) {
    var $ = layui.$;
    var layer = layui.layer;
    var upload = layui.upload;
    var laydate = layui.laydate;
    var form = layui.form;
    var Viewer = viewer;
    var restAjax = layui.restajax;
    var viewerObj = {};

    /**
     * 上传图片
     * @param opt
     */
    this.initUploadImage = function (opt) {
        var maxCount = opt.maxCount ? parseInt(opt.maxCount) : 9
        maxCount = opt.maxCount < 0 ? 9 : opt.maxCount;
        var fieldName = opt.fieldName;
        var isShow = opt.isShow;
        var defaultAllowExts = ['jpg', 'png', 'gif', 'bmp', 'jpeg'];
        var allowExts = opt.allowExts;
        allowExts = allowExts && (allowExts instanceof Array) ? defaultAllowExts.concat(allowExts).join('\|') : defaultAllowExts.join('\|');
        var defaultAcceptMime = ['image/*'];
        var acceptMime = opt.acceptMime;
        acceptMime = acceptMime && (acceptMime instanceof Array) ? defaultAcceptMime.concat(acceptMime).join(',') : defaultAcceptMime.join(',');

        var id = '#' + fieldName;
        var fileBoxId = id + 'FileBox';
        var uploadBtnId = id + 'UploadBtn';
        var deleteBtnClass = '.delete-' + fieldName + '-btn';

        function init(callback) {
            var fileIds = $(id).val();
            var fileIdArray = fileIds ? fileIds.split(',') : [];

            var html = '';
            for (var i = 0, fileId; fileId = fileIdArray[i++];) {
                // 删除按钮
                var deleteBtn = '';
                if(!isShow) {
                    deleteBtn = [
                        '<a class="layui-btn layui-btn-xs layui-btn-danger delete-btn delete-' + fieldName + '-btn" href="javascript:void(0);" data-id="' + fileId + '" data-name="' + fieldName + '">',
                        '   <i class="fa fa-trash-o"></i>',
                        '</a>'
                    ].join('');
                }

                html += [
                    '<div class="form-upload-image">',
                    '   <img src="route/file/download/true/' + fileId + '" align="加载失败">',
                    deleteBtn,
                    '</div>',
                ].join('');
            }

            $(fileBoxId).empty();
            $(fileBoxId).append(html);

            if (fileIdArray.length < maxCount) {
                $(uploadBtnId).removeClass('layui-btn-disabled');
                $(uploadBtnId).attr('disabled', false);
            } else {
                $(uploadBtnId).addClass('layui-btn-disabled');
                $(uploadBtnId).attr('disabled', true);
            }

            callback ? callback() : '';
        }

        function addClick() {
            var layerLoadingIndex;
            upload.render({
                elem: uploadBtnId,
                url: 'api/file/v2/upload-image',
                accept: 'images',
                acceptMime: acceptMime,
                field: 'image',
                exts: allowExts,
                name: fieldName,
                before: function (obj) {
                    layerLoadingIndex = layer.msg('上传中...', {icon: 16, time: 0, shade: 0.3})
                },
                done: function (res, index, upload) {
                    layer.close(layerLoadingIndex);
                    var name = this.name;
                    var files = $('#' + this.name).val();
                    if (files.length > 0) {
                        files += ',';
                    }
                    files += res.data.fileId;
                    $('#' + name).val(files);
                    init(function () {
                        viewerObj[name].update();
                    });
                },
                error: function (index, upload) {
                    layer.close(layerLoadingIndex);
                    layer.msg('文件上传失败');
                },
                progress: function (n, elem, res, index) {
                }
            });
            $(document).on('click', deleteBtnClass, function () {
                var name = this.dataset.name;
                var id = this.dataset.id;
                var files = $('#' + name).val().replace(id, '');
                files = files.replace(/\,+/g, ',');
                if (files.charAt(0) == ',') {
                    files = files.substring(1);
                }
                if (files.charAt(files.length - 1) == ',') {
                    files = files.substring(0, files.length - 1);
                }
                $('#' + name).val(files);
                init(function () {
                    viewerObj[name].update();
                });
            });
        }

        init(function () {
            viewerObj[fieldName] = new Viewer(document.getElementById(fieldName + 'FileBox'), {navbar: false});
        });

        if (!isShow) {
            addClick();
        } else {
            $(uploadBtnId).hide();
        }
    }

    /**
     * 上传文件
     * @param opt
     */
    this.initUploadFile = function (opt) {
        var maxCount = opt.maxCount ? parseInt(opt.maxCount) : 3
        maxCount = opt.maxCount < 0 ? 3 : opt.maxCount;
        var fieldName = opt.fieldName;
        var isShow = opt.isShow;
        var onFileClick = opt.onFileClick;
        onFileClick = onFileClick && typeof(onFileClick) === 'function' ? onFileClick : null;
        var allowExts = opt.allowExts;
        var defaultAllowExts = ['pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'wps', 'txt', 'rar', 'zip'];
        allowExts = allowExts && (allowExts instanceof Array) ? defaultAllowExts.concat(allowExts).join('\|') : defaultAllowExts.join('\|');
        var defaultAcceptMime = [
            'application/pdf',
            'application/msword',
            'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
            'application/vnd.ms-excel',
            'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
            'application/vnd.ms-powerpoint',
            'application/vnd.openxmlformats-officedocument.presentationml.presentation',
            'application/vnd.ms-works',
            'text/plain',
            'application/x-rar',
            'application/x-zip-compressed'
        ];
        var acceptMime = opt.acceptMime;
        acceptMime = acceptMime && (acceptMime instanceof Array) ? defaultAcceptMime.concat(acceptMime).join(',') : defaultAcceptMime.join(',');

        var id = '#' + fieldName;
        var fileBoxId = id + 'FileBox';
        var uploadBtnId = id + 'UploadBtn';
        var deleteBtnClass = '.delete-' + fieldName + '-btn';

        function init() {
            var files = $(id).val();
            var fileArray = files ? files.split(',') : [];

            var html = '';
            if (fileArray.length > 0) {
                html += [
                    '<div class="form-upload-file">',
                    '   <table class="layui-table" lay-size="sm">',
                    '       <colgroup>',
                    '           <col>',
                    '           <col width="60">',
                    '       </colgroup>',
                    '       <thead>',
                    '       <tr>',
                    '           <th>文件名</th>',
                    '           <th class="operation">操作</th>',
                    '       </tr>',
                    '       </thead>',
                    '       <tbody>',
                ].join('');
                for (var i = 0, file; file = fileArray[i++];) {
                    var idNameArray = file.split(':');
                    var fileId = idNameArray[0];
                    var fileName = idNameArray[1];
                    html += [
                        '<tr>',
                        '   <td><a href="javascript:void(0);" class="file-item" data-file-id="' + fileId + '">' + fileName + '</a></td>',
                        '   <td class="operation">',
                        !isShow ? '<button type="button" class="layui-btn layui-btn-xs layui-btn-danger delete-btn delete-' + fieldName + '-btn" data-id="' + fileId + '" data-name="' + fileName + '" data-field-name="' + fieldName + '">删除</button>' : '',
                        '   </td>',
                        '</tr>',
                    ].join('');
                }
                html += [
                    '       </tbody>',
                    '   </table>',
                    '</div>'
                ].join('');
            }

            $(fileBoxId).empty();
            $(fileBoxId).append(html);

            if (fileArray.length < maxCount) {
                $(uploadBtnId).removeClass('layui-btn-disabled');
                $(uploadBtnId).attr('disabled', false);
            } else {
                $(uploadBtnId).addClass('layui-btn-disabled');
                $(uploadBtnId).attr('disabled', true);
            }
        }

        function addClick() {
            var layerLoadingIndex;
            var url = 'api/file/v2/upload-file';
            upload.render({
                elem: uploadBtnId,
                url: url,
                accept: 'file',
                acceptMime: acceptMime,
                field: 'file',
                exts: allowExts,
                name: fieldName,
                before: function (obj) {
                    layerLoadingIndex = layer.msg('上传中...', {icon: 16, time: 0, shade: 0.3})
                },
                done: function (res, index, upload) {
                    layer.close(layerLoadingIndex);
                    var name = this.name;
                    var files = $('#' + this.name).val();
                    if (files.length > 0) {
                        files += ',';
                    }
                    files += res.data.fileId + ':' + res.data.fileName.replace(/\,/g, '，');
                    $('#' + name).val(files);
                    init();
                },
                error: function (index, upload) {
                    layer.close(layerLoadingIndex);
                    layer.msg('文件上传失败');
                },
                progress: function (n, elem, res, index) {
                }
            });
            $(document).on('click', deleteBtnClass, function () {
                var id = this.dataset.id;
                var name = this.dataset.name;
                var fieldName = this.dataset.fieldName;
                var files = $('#' + fieldName).val().replace(id + ':' + name, '');
                files = files.replace(/\,+/g, ',');
                if (files.charAt(0) == ',') {
                    files = files.substring(1);
                }
                if (files.charAt(files.length - 1) == ',') {
                    files = files.substring(0, files.length - 1);
                }
                $('#' + fieldName).val(files);
                init();
            });
        }

        init();
        if (!isShow) {
            addClick();
        } else {
            $(uploadBtnId).hide();
        }

        $(document).on('click', '.form-upload-file .file-item', function() {
            var fileId = this.dataset.fileId;
            if(onFileClick) {
                onFileClick(fileId);
            } else {
                window.open('route/file/download/false/'+ fileId, '_blank');
            }
        })

    }

    /**
     * 初始化视频上传
     * @param opt
     */
    this.initUploadVideo = function (opt) {
        var maxCount = opt.maxCount ? parseInt(opt.maxCount) : 1
        maxCount = opt.maxCount < 0 ? 1 : opt.maxCount;
        var fieldName = opt.fieldName;
        var isShow = opt.isShow;

        var defaultAllowExts = ['mp4'];
        var allowExts = opt.allowExts;
        allowExts = allowExts && (allowExts instanceof Array) ? defaultAllowExts.concat(allowExts).join('\|') : defaultAllowExts.join('\|');

        var defaultAcceptMime = ['video/mp4'];
        var acceptMime = opt.acceptMime;
        acceptMime = acceptMime && (acceptMime instanceof Array) ? defaultAcceptMime.concat(acceptMime).join(',') : defaultAcceptMime.join(',');

        var id = '#' + fieldName;
        var fileBoxId = id + 'FileBox';
        var uploadBtnId = id + 'UploadBtn';
        var deleteBtnClass = '.delete-' + fieldName + '-btn';

        /**
         * 绑定视频事件
         */
        function bindVideoEvent() {
            // 暂停其他所有的视频
            function pauseOtherAllVideo(playVideo) {
                var videos = document.querySelectorAll('video');
                for(var i = 0, video; video = videos[i++];) {
                    if(playVideo === video) {
                        continue;
                    }
                    video.pause();
                }
            }
            // 绑定事件
            var videos = document.querySelectorAll('video');
            for(var i = 0, video; video = videos[i++];) {
                video.onplay = function() {
                    // 关闭其他
                    pauseOtherAllVideo(this);
                }
                video.onpause = function() {}
            }
        }

        function init() {
            var files = $(id).val();
            var fileArray = files ? files.split(',') : [];
            var html = '';
            for (var i = 0, file; file = fileArray[i++];) {
                var idNameArray = file.split(':');
                var fileId = idNameArray[0];
                var fileName = idNameArray[1];
                html += [
                    '<div class="form-upload-video">',
                    '   <video width="320" height="240" controls onplay="onPlay()" onpaste="onPause()">',
                    '       <source src="route/file/download/true/' + fileId + '" type="video/mp4">',
                    '       您的浏览器不支持 video 标签',
                    '   </video>',
                    '   <a class="layui-btn layui-btn-xs layui-btn-danger delete-btn delete-' + fieldName + '-btn" href="javascript:void(0);" data-id="' + fileId + '" data-name="' + fileName + '" data-field-name="' + fieldName + '">',
                    '       <i class="fa fa-trash-o"></i>',
                    '   </a>',
                    '</div>',
                ].join('');
            }

            $(fileBoxId).empty();
            $(fileBoxId).append(html);

            if (fileArray.length < maxCount) {
                $(uploadBtnId).removeClass('layui-btn-disabled');
                $(uploadBtnId).attr('disabled', false);
            } else {
                $(uploadBtnId).addClass('layui-btn-disabled');
                $(uploadBtnId).attr('disabled', true);
            }
            bindVideoEvent();
        }

        function addClick() {
            var layerLoadingIndex;
            upload.render({
                elem: uploadBtnId,
                url: 'api/file/v2/upload-video',
                accept: 'video',
                acceptMime: acceptMime,
                exts: allowExts,
                field: 'video',
                name: fieldName,
                before: function (obj) {
                    layerLoadingIndex = layer.msg('上传中...', {icon: 16, time: 0, shade: 0.3})
                },
                done: function (res, index, upload) {
                    layer.close(layerLoadingIndex);
                    var name = this.name;
                    var files = $('#' + this.name).val();
                    if (files.length > 0) {
                        files += ',';
                    }
                    files += res.data.fileId + ':' + res.data.fileName.replace(/\,/g, '，');
                    $('#' + name).val(files);
                    init();
                },
                error: function (index, upload) {
                    layer.close(layerLoadingIndex);
                    layer.msg('文件上传失败');
                },
                progress: function (n, elem, res, index) {
                }
            });
            // 删除按钮事件
            $(document).on('click', deleteBtnClass, function () {
                var name = this.dataset.name;
                var id = this.dataset.id;
                var fieldName = this.dataset.fieldName;
                // 停止视频播放
                var videos = $('.form-upload-video video');
                $.each(videos, function(index, video) {
                    video.pause();
                });

                var files = $('#' + fieldName).val().replace(id + ':' + name, '');
                files = files.replace(/\,+/g, ',');
                if (files.charAt(0) == ',') {
                    files = files.substring(1);
                }
                if (files.charAt(files.length - 1) == ',') {
                    files = files.substring(0, files.length - 1);
                }
                $('#' + fieldName).val(files);
                init();
            });
        }

        init();

        if (!isShow) {
            addClick();
        } else {
            $(uploadBtnId).hide();
        }
    }

    /**
     * 上传音频
     */
    this.initUploadAudio = function (opt) {
        var maxCount = opt.maxCount ? parseInt(opt.maxCount) : 1
        maxCount = opt.maxCount < 0 ? 1 : opt.maxCount;
        var fieldName = opt.fieldName;
        var isShow = opt.isShow;

        var defaultAllowExts = ['wav', 'mp3'];
        var allowExts = opt.allowExts;
        allowExts = allowExts && (allowExts instanceof Array) ? defaultAllowExts.concat(allowExts).join('\|') : defaultAllowExts.join('\|');

        var defaultAcceptMime = ['audio/wav', 'audio/mp3'];
        var acceptMime = opt.acceptMime;
        acceptMime = acceptMime && (acceptMime instanceof Array) ? defaultAcceptMime.concat(acceptMime).join(',') : defaultAcceptMime.join(',');

        var id = '#' + fieldName;
        var fileBoxId = id + 'FileBox';
        var uploadBtnId = id + 'UploadBtn';
        var deleteBtnClass = '.delete-' + fieldName + '-btn';

        /**
         * 绑定视频事件
         */
        function bindAudioEvent() {
            // 暂停其他所有的视频
            function pauseOtherAllAudio(playAudio) {
                var audios = document.querySelectorAll('audio');
                for(var i = 0, audio; audio = audios[i++];) {
                    if(playAudio === audio) {
                        continue;
                    }
                    audio.pause();
                }
            }
            // 绑定事件
            var audios = document.querySelectorAll('audio');
            for(var i = 0, audio; audio = audios[i++];) {
                audio.onplay = function() {
                    // 关闭其他
                    pauseOtherAllAudio(this);
                }
                audio.onpause = function() {}
            }
        }

        function init() {
            var files = $(id).val();
            var fileArray = files ? files.split(',') : [];
            var html = '';
            for (var i = 0, file; file = fileArray[i++];) {
                var idNameArray = file.split(':');
                var fileId = idNameArray[0];
                var fileName = idNameArray[1];
                html += [
                    '<div class="form-upload-video">',
                    '   <audio src="route/file/download/true/' + fileId + '" controls>',
                    '       您的浏览器不支持 audio 标签。',
                    '   </audio>',
                    '   <a class="layui-btn layui-btn-xs layui-btn-danger delete-btn delete-' + fieldName + '-btn" href="javascript:void(0);" data-id="' + fileId + '" data-name="' + fileName + '" data-field-name="' + fieldName + '">',
                    '       <i class="fa fa-trash-o"></i>',
                    '   </a>',
                    '</div>',
                ].join('');
            }

            $(fileBoxId).empty();
            $(fileBoxId).append(html);

            if (fileArray.length < maxCount) {
                $(uploadBtnId).removeClass('layui-btn-disabled');
                $(uploadBtnId).attr('disabled', false);
            } else {
                $(uploadBtnId).addClass('layui-btn-disabled');
                $(uploadBtnId).attr('disabled', true);
            }

            bindAudioEvent();
        }

        function addClick() {
            var layerLoadingIndex;
            var url = 'api/file/v2/upload-audio';
            upload.render({
                elem: uploadBtnId,
                url: url,
                accept: 'audio',
                acceptMime: acceptMime,
                exts: allowExts,
                field: 'audio',
                name: fieldName,
                headers: headers,
                before: function (obj) {
                    layerLoadingIndex = layer.msg('上传中...', {icon: 16, time: 0, shade: 0.3})
                },
                done: function (res, index, upload) {
                    layer.close(layerLoadingIndex);
                    var name = this.name;
                    var files = $('#' + this.name).val();
                    if (files.length > 0) {
                        files += ',';
                    }
                    files += res.data.fileId + ':' + res.data.fileName.replace(/\,/g, '，');
                    $('#' + name).val(files);
                    init();
                },
                error: function (index, upload) {
                    layer.close(layerLoadingIndex);
                    layer.msg('文件上传失败');
                },
                progress: function (n, elem, res, index) {
                }
            });
            $(document).on('click', deleteBtnClass, function () {
                var name = this.dataset.name;
                var id = this.dataset.id;
                var fieldName = this.dataset.fieldName;
                var files = $('#' + fieldName).val().replace(id + ':' + name, '');
                files = files.replace(/\,+/g, ',');
                if (files.charAt(0) == ',') {
                    files = files.substring(1);
                }
                if (files.charAt(files.length - 1) == ',') {
                    files = files.substring(0, files.length - 1);
                }
                $('#' + fieldName).val(files);
                init();
            });
        }

        init();

        if (!isShow) {
            addClick();
        } else {
            $(uploadBtnId).hide();
        }
    }

    /**
     * 下拉选择
     */
    this.select = function (opt) {
        var self = this;
        var url = opt.url;
        var domId = opt.domId;
        var name = opt.name;
        var valueKey = opt.valueKey;
        var nameKey = opt.nameKey;
        var dataForm = opt.dataForm;
        var selectedValue = opt.selectedValue;
        var onInit = opt.onInit;
        var onSelect = opt.onSelect;

        $('#'+ domId).empty();
        $('#'+ domId).append('<select id="' + name + '" name="' + name + '" lay-filter="' + name + 'Filter"></select>');

        /**
         * 初始化选项
         */
        function initOption() {
            $('#' + name).empty();
            top.restAjax.get(url, {}, null, function (code, data) {
                var options = '<option value="">请选择</option>';
                for (var i = 0, item; item = data[i++];) {
                    options += '<option value="' + item[valueKey] + '" ' + ((selectedValue && selectedValue == item[valueKey]) ? 'selected' : '') + '>' + item[nameKey] + '</option>'
                }
                $('#' + name).append(options)
                form.render(null, dataForm);

                // 监听初始化
                onInit ? onInit(selectedValue) : null;
            }, function (code, data) {
                top.dialog.msg(data.msg);
            });
        }

        /**
         * 初始化选择
         */
        function initSelectEvent() {
            form.on('select(' + name + 'Filter)', function (data) {
                var option = self.selectedOption('#' + name, data.value);
                onSelect ? onSelect(data, option) : null;
                // 联动
                if (data.value) {
                    onInit ? onInit(data.value) : null;
                }
            });
        }

        initOption();
        initSelectEvent();

    }

    /**
     * 下拉数据字典
     * @param opt
     */
    this.selectData = function(opt) {
        this.select({
            url: top.restAjax.path('api/data/listbyparentid/{parentId}', [opt.parentId]),
            domId: opt.domId,
            name: opt.name,
            dataForm: opt.dataForm,
            valueKey: 'dataId',
            nameKey: 'dataName',
            selectedValue: opt.selectedValue,
            onInit: opt.onInit,
            onSelect: opt.onSelect
        })
    }

    /**
     * 获取选择的option
     *
     * @param selectId 下拉框ID
     * @param selectedValue 选择的值
     * @return {DOMStringMap|null}
     */
    this.selectedOption = function (selectId, selectedValue) {
        var options = $(selectId).children();
        for (var i = 0, option; option = options[i++];) {
            if (selectedValue === option.value) {
                return option;
            }
        }
        return null;
    }

    /**
     * 级联下拉
     * @param opt
     */
    this.selectLinkage = function(opt) {
        var self = this;
        // 级联url
        var url = opt.url;
        // option key
        var valueKey = opt.valueKey;
        // option text key
        var nameKey = opt.nameKey;
        var optionDataKeyArray = opt.optionDataKeyArray && (opt.optionDataKeyArray instanceof Array) ? opt.optionDataKeyArray : [];
        // 级联数量
        var linkageSize = opt.linkageSize ? opt.linkageSize : 1;
        // 选择ID
        var selectId = opt.selectId;
        var baseRootId = opt.baseRootId;
        var onSelect = opt.onSelect && typeof(opt.onSelect) === 'function' ? opt.onSelect : null;

        /**
         * 初始化
         * @param parentId 上级ID
         * @param selectIndex 选择下标
         */
        function initSelect(parentId, selectIndex) {
            if(parentId === '') {
                return;
            }
            var refreshSelectId =  (selectId + parseInt(selectIndex));
            top.restAjax.get(top.restAjax.path(url, [parentId]), {}, null, function(code, data) {
                $('#'+ refreshSelectId).append('<option value="">请选择</option>');
                $.each(data, function (index, item) {
                    // option携带的值
                    var optionDatas = '';
                    for(var i = 0, optionDataKey; optionDataKey = optionDataKeyArray[i++];) {
                        var optionDataValue = item[optionDataKey];
                        if(!optionDataValue) {
                            continue;
                        }
                        optionDatas += ' data-data'+ i +'="'+ item[optionDataKey] +'"';
                    }
                    $('#'+ refreshSelectId).append('<option value="'+ item[valueKey] +'"'+ optionDatas +'>'+ item[nameKey] +'</option>');
                });
                // 渲染表单下拉框
                form.render('select');
            }, function(code, data) {
                top.dialog.msg(data.msg);
            })
        }
        /**
         * 初始化级联事件
         * @param selectId 选择ID
         * @param size 级联长度
         */
        function addLinkageEvent() {
            for(var i = 0; i < linkageSize; i++) {
                form.on('select('+ (selectId + i) +'Select)', function(data) {
                    var index = parseInt(data.elem.id.replace(selectId, ''));
                    var nextIndex = index + 1;
                    // 级联清空
                    for(var j = nextIndex; j < linkageSize; j++) {
                        $('#'+ (selectId + j)).empty();
                    }
                    form.render('select');
                    // 最后一个不触发初始化事件
                    if(index < (linkageSize - 1)) {
                        initSelect(data.value, nextIndex);
                    }

                    if(onSelect) {
                        var option = self.selectedOption('#'+ data.elem.id, data.value);
                        onSelect(data, option, index);
                    }
                })
            }
        }

        initSelect(baseRootId, 0);
        addLinkageEvent();
    }

    /**
     * 地区级联下拉
     * @param opt
     */
    this.selectLinkageArea = function(opt) {
        this.selectLinkage({
            url: 'api/area/listbyparentid/{parentId}',
            valueKey: 'areaId',
            nameKey: 'areaName',
            linkageSize: opt.linkageSize ? opt.linkageSize : 5,
            baseRootId: opt.baseRootId,
            selectId: opt.selectId,
            optionDataKeyArray: opt.optionDataKeyArray,
            onSelect: opt.onSelect && typeof(opt.onSelect) === 'function' ? opt.onSelect : null
        })
    }

    /**
     * 禁用表单全部字段
     */
    this.disableFormAllFields = function () {
        var doms = $('form').find('input,button,textarea,select');
        doms.attr('disabled', 'disabled');
        doms.attr('lay-verify', '');
    }

    /**
     * 禁用字段转div
     */
    this.disabledField2Div = function() {
        var doms = $('form').find('input,textarea,select');
        $.each(doms, function(index, item) {
            if(!item.disabled) {
                return;
            }

            var value = item.value;
            var parent = $(item).parent();
            parent.empty();
            if(item.nodeName === 'INPUT' || item.nodeName === 'SELECT') {
                parent.append('<div style="line-height: 36px;">'+ value +'</div>')
            } else if(item.nodeName === 'TEXTAREA') {
                parent.append('<div style="line-height: 36px; text-align: left;">'+ value +'</div>')

            }
        });
    }

}