@{
    string guid = Html.Guid(); //编辑页从信息数据中读取
    string table = ViewBag.Table;
    CurrentUser currentUser = ViewBag.CurrentUser;
    string action = ViewContext.RouteData.Values["action"].ToString();
    IEnumerable<dynamic> fieldData = Html.GetFieldList((string)ViewBag.Table, action, currentUser);
    int xuhao = StringHelper.Format<int>(Request.QueryString["xuhao"]);
    xuhao++;
}
<script src="~/Incs/UEditor/ueditor.forAdmin.config.js" type="text/javascript"></script>
<script src="~/Incs/UEditor/ueditor.all.min.js" type="text/javascript"></script>
<div class="main" id="main" v-cloak>
    <el-form ref="form" label-width="150px" label-position="left">
        @{
            string beforeSubmitJs = "";
            var data = new ViewDataDictionary();
            data.Add("from", PageAdmin.Common.FromEnum.Admin);
            data.Add("currentUser", currentUser);  //当前用户
            data.Add("fieldPrefix", "formData");
            data.Add("guid", guid);
            data.Add("i", 0);
            int i = 0;
            foreach (var item in fieldData)
            {
                data["i"] = i;
                beforeSubmitJs += item.BeforeSubmitJs;
                Html.RenderPartial("~/Areas/E/Views/CustomForm/FormPartial.cshtml", (object)item, data);
                i++;
            }
        }
        <el-form-item label="节点类型">
            <el-radio-group v-model="formData.IsFinal" :disabled="formData.Id>0">
                <el-radio :label="1" :disabled="formData.Id>0">最终节点</el-radio>
                <el-radio :label="0" :disabled="formData.Id>0">分类节点</el-radio>
            </el-radio-group>
            <span class="help-block">分类节点可以继续添加子节点</span>
        </el-form-item>
        <el-form-item label="是否启用">
            <el-radio-group v-model="formData.State">
                <el-radio :label="1">是</el-radio>
                <el-radio :label="0">否</el-radio>
            </el-radio-group>
            <span class="help-block">设置为最终分类后当前分类不能添加子类</span>
        </el-form-item>
        <el-form-item label="序号">
            <el-input-number controls-position="right" v-model="formData.Xuhao" :min="0" :max="999999999" v-validate="{data:formData.Xuhao,dataType:'numeric',nullMsg:'请填写序号！'}"></el-input-number>
            <span class="help-block validate-tips-box"></span>
        </el-form-item>
    </el-form>
    <div class="footer-submit-bar" style="padding-left:170px">
        <el-button type="primary" v-on:click="postSubmit">提交保存</el-button>
        <el-button onclick="closeSelf()">关闭</el-button>
        <el-button onclick="closeSelf(parent.loadData)">返回</el-button>
    </div>
</div>
<script type="text/javascript">
    //绑定数据
    var id = request("id");
    var formData = @Html.RawModel((string)Model);
    formData.ParentId =@(StringHelper.Format<int>(Request.QueryString["parentId"]));
    if (isNullOrEmpty(id) || id == "0")
    {
        formData.Id = 0;
        formData.Level = 1;
        formData.IsFinal = 1;
        formData.State = 1;
        formData.Xuhao = @xuhao;
    }
    formData.Guid="@guid";
    var vue = new Vue({
        el: "#main",
        data: {
            formData: formData,
        },
        methods: {
            postSubmit: function () {
                var validated = this.validateForm({ tipsStyle: 1, beforeSubmit: function () { return BeforeSubmit() } });//jquery表单验证
                if (validated) {
                    this.submit({ url: "@Url.ActionUrl()", data: formData, success: "postBack()"});
                }
            }
        },
    });
    function BeforeSubmit() {
        @Html.Raw(beforeSubmitJs)
        return true;
    }
    function postBack() {
        if (isNullOrEmpty(id)) {
            location.href = replaceParamVal("xuhao", formData.Xuhao);
        }
    }
    function replaceParamVal(paramName, replaceWith) {
        var oUrl = location.href.toString();
        var re = eval('/(' + paramName + '=)([^&]*)/gi');
        var nUrl = oUrl.replace(re, paramName + '=' + replaceWith);
        return nUrl;
    }
</script>