@ -6,35 +6,41 @@
< span class = "top-title-box" > 基本信息 < / span >
< / e l - r o w >
< div class = "assets-info-box" >
< el -form :model="ruleForm" :rules ="rules" ref = "ruleForm" label -width = " 170px " class = "demo-ruleForm" label -position = " right " >
< el -form v-loading="loading" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="170px" class="demo-ruleForm" label-position="right" :disabled ="disabled" >
< el -row >
< el -col :span ="12" >
< el -form -item label = "新增单位名称" >
< el -input v-model ="ruleForm. xtmc " placeholder="请输入单位名称"> < / el -input >
< el -form -item label = "新增单位名称" required >
< el -input v-model ="ruleForm. nickName " placeholder="请输入单位名称"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="12" >
< el -form -item label = "单位简称" >
< el -input v-model ="ruleForm.dw m c" placeholder="请输入单位简称"> < / el -input >
< el -input v-model ="ruleForm.dw j c" placeholder="请输入单位简称"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
< el -row >
< el -col :span ="12" >
< el -form -item label = "所属区域" >
< el -input v-model ="ruleForm.xtmc" > < / el -input >
< el -form -item label = "所属区域" required >
< el -cascader
size = "large"
: props = "props"
: options = "options"
v - model = "ruleForm.ssqy"
>
< / e l - c a s c a d e r >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="12" >
< el -form -item label = "单位详细地址" >
< el -input v-model ="ruleForm.dwmc" placeholder="请输入单位详细地址" > < / el -input >
< el -form -item label = "单位详细地址" required >
< el -input v-model ="ruleForm.dw xxdz " placeholder="请输入单位详细地址"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
< el -row >
< el -col :span ="12" >
< el -form -item label = "所属行业" >
< el -select v-model ="ruleForm. xtzyx " placeholder="请选择系统重要性">
< el -form -item label = "所属行业" required >
< el -select v-model ="ruleForm. sshy " placeholder="请选择系统重要性">
< el -option
v - for = "dict in dict.type.zc_xtzyx"
: key = "dict.value"
@ -45,10 +51,10 @@
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="12" >
< el -form -item label = "单位类型" >
< el -select v-model ="ruleForm. xtzy x" placeholder="请选择系统重要性">
< el -form -item label = "单位类型" required >
< el -select v-model ="ruleForm. dwl x" placeholder="请选择系统重要性">
< el -option
v - for = "dict in dict.type. zc_xtzy x"
v - for = "dict in dict.type. dwl x"
: key = "dict.value"
: label = "dict.label"
: value = "dict.value"
@ -60,7 +66,7 @@
< el -row >
< el -col :span ="12" >
< el -form -item label = "单位标签" >
< el -select v-model ="ruleForm. xtzyx " placeholder="请选择系统重要性">
< el -select v-model ="ruleForm. dwbq " placeholder="请选择系统重要性">
< el -option
v - for = "dict in dict.type.zc_xtzyx"
: key = "dict.value"
@ -72,16 +78,16 @@
< / e l - c o l >
< el -col :span ="12" >
< el -form -item label = "所属监管单位" >
< el -input v-model ="ruleForm. dwmc " placeholder="请输入监管单位"> < / el -input >
< el -input v-model ="ruleForm. ssjg dw" placeholder="请输入监管单位"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
< el -row >
< el -col :span ="12" >
< el -form -item label = "单位角色" >
< el -select v-model ="ruleForm. xtzyx " placeholder="请选择系统重要性">
< el -select v-model ="ruleForm. dwjs " placeholder="请选择系统重要性">
< el -option
v - for = "dict in dict.type. zc_xtzyx "
v - for = "dict in dict.type. dwjs "
: key = "dict.value"
: label = "dict.label"
: value = "dict.value"
@ -91,9 +97,9 @@
< / e l - c o l >
< el -col :span ="12" >
< el -form -item label = "单位直属性质" >
< el -select v-model ="ruleForm. xt zyx " placeholder="请选择系统重要性">
< el -select v-model ="ruleForm. dwzs xz" placeholder="请选择系统重要性">
< el -option
v - for = "dict in dict.type. zc_xtzyx "
v - for = "dict in dict.type. dwzsxz "
: key = "dict.value"
: label = "dict.label"
: value = "dict.value"
@ -104,15 +110,15 @@
< / e l - r o w >
< el -row >
< el -col :span ="12" >
< el -form -item label = "统一社会信用代码" >
< el -input v-model ="ruleForm. xtmc " placeholder="请输入统一社会信用代码"> < / el -input >
< el -form -item label = "统一社会信用代码" required >
< el -input v-model ="ruleForm. userName " placeholder="请输入统一社会信用代码"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="12" >
< el -form -item label = "是否关基单位" >
< el -select v-model ="ruleForm. xtzyx " placeholder="请选择系统重要性">
< el -select v-model ="ruleForm. gjdw " placeholder="请选择系统重要性">
< el -option
v - for = "dict in dict.type. zc_xtzyx "
v - for = "dict in dict.type. is_no "
: key = "dict.value"
: label = "dict.label"
: value = "dict.value"
@ -121,6 +127,13 @@
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
< el -row >
< el -col :span ="12" >
< el -form -item label = "日常运营负责部门" required >
< el -input v-model ="ruleForm.rcyyfzbm" placeholder="请输入日常运营负责部门" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
<!-- 联系人 -- >
< el -row style = "margin: 10px 0;" >
< span class = "top-title-box" > 联系人 < / span >
@ -129,23 +142,31 @@
< el -form -item label = "单位负责人" required class = "daoqitixingren" >
< el -row >
< el -col :span ="6" >
< el -form -item prop = " name ">
< el -input v-model ="ruleForm. fg fzrxm" style="width: 100%;" placeholder="请输入联系人"> < / el -input >
< el -form -item prop = " dwfzrxm ">
< el -input v-model ="ruleForm. dw fzrxm" style="width: 100%;" placeholder="请输入联系人"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="6" style = "margin-left: 10px;" >
< el -form -item prop = "phoneNumber" >
< el -input v-model ="ruleForm.fgfzrlxfs" style="width: 100%;" placeholder="请输入联系方式" > < / el -input >
< el -form -item
: rules = " [
{
pattern : /^1[3|4|5|6|7|8|9][0-9]\d{8}$/ ,
message : '请输入正确的手机号码' ,
trigger : 'blur'
}
] "
>
< el -input v-model ="ruleForm.dwfzrlxfs" style="width: 100%;" placeholder="请输入联系方式" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="6" style = "margin-left: 10px;" >
< el -form -item prop = "email" >
< el -input v-model ="ruleForm.fgfzryx" style="width: 100%;" placeholder="请输入邮箱" > < / el -input >
< el -form -item prop = " dwfzryx ">
< el -input v-model ="ruleForm. dw fzryx" style="width: 100%;" placeholder="请输入邮箱"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="6" style = "margin-left: 10px;" >
< el -form -item prop = " zhiwu ">
< el -input v-model ="ruleForm. fgfzryx " style="width: 100%;" placeholder="请输入职务职称"> < / el -input >
< el -form -item prop = " dwfzrzwzc ">
< el -input v-model ="ruleForm. dwfzrzwzc " style="width: 100%;" placeholder="请输入职务职称"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
@ -154,15 +175,15 @@
< / e l - r o w >
< el -row >
< el -col :span ="24" >
< el -form -item label = "分管负责人" required class= "daoqitixingren" >
< el -form -item label = "分管负责人" class= "daoqitixingren" >
< el -row >
< el -col :span ="6" >
< el -form -item prop = " name ">
< el -form -item prop = " fgfzrxm ">
< el -input v-model ="ruleForm.fgfzrxm" style="width: 100%;" placeholder="请输入联系人" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="6" style = "margin-left: 10px;" >
< el -form -item prop = "phone N umber">
< el -form -item prop = "phone n umber">
< el -input v-model ="ruleForm.fgfzrlxfs" style="width: 100%;" placeholder="请输入联系方式" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
@ -172,8 +193,8 @@
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="6" style = "margin-left: 10px;" >
< el -form -item prop = " zhiwu ">
< el -input v-model ="ruleForm.fgfzr yx " style="width: 100%;" placeholder="请输入职务职称"> < / el -input >
< el -form -item prop = " fgfzrzwzc ">
< el -input v-model ="ruleForm.fgfzr zwzc " style="width: 100%;" placeholder="请输入职务职称"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
@ -182,26 +203,26 @@
< / e l - r o w >
< el -row >
< el -col :span ="24" >
< el -form -item label = "部门负责人" required class= "daoqitixingren" >
< el -form -item label = "部门负责人" class= "daoqitixingren" >
< el -row >
< el -col :span ="6" >
< el -form -item prop = " name ">
< el -input v-model ="ruleForm. fg fzrxm" style="width: 100%;" placeholder="请输入联系人"> < / el -input >
< el -form -item prop = " bmfzrxm ">
< el -input v-model ="ruleForm. bm fzrxm" style="width: 100%;" placeholder="请输入联系人"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="6" style = "margin-left: 10px;" >
< el -form -item prop = "phone N umber">
< el -input v-model ="ruleForm. fg fzrlxfs" style="width: 100%;" placeholder="请输入联系方式"> < / el -input >
< el -form -item prop = "phone n umber">
< el -input v-model ="ruleForm. bm fzrlxfs" style="width: 100%;" placeholder="请输入联系方式"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="6" style = "margin-left: 10px;" >
< el -form -item prop = "email" >
< el -input v-model ="ruleForm. fg fzryx" style="width: 100%;" placeholder="请输入邮箱"> < / el -input >
< el -input v-model ="ruleForm. bm fzryx" style="width: 100%;" placeholder="请输入邮箱"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="6" style = "margin-left: 10px;" >
< el -form -item prop = " zhiwu ">
< el -input v-model ="ruleForm. fgfzryx " style="width: 100%;" placeholder="请输入职务职称"> < / el -input >
< el -form -item prop = " bmfzrzwzc ">
< el -input v-model ="ruleForm. bmfzrzwzc " style="width: 100%;" placeholder="请输入职务职称"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
@ -210,26 +231,26 @@
< / e l - r o w >
< el -row >
< el -col :span ="24" >
< el -form -item label = "第一联系人" required class= "daoqitixingren" >
< el -form -item label = "第一联系人" class= "daoqitixingren" >
< el -row >
< el -col :span ="6" >
< el -form -item prop = " name ">
< el -input v-model ="ruleForm. fgfz rxm" style="width: 100%;" placeholder="请输入联系人"> < / el -input >
< el -form -item prop = " dylxrxm ">
< el -input v-model ="ruleForm. dylx rxm" style="width: 100%;" placeholder="请输入联系人"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="6" style = "margin-left: 10px;" >
< el -form -item prop = "phone N umber">
< el -input v-model ="ruleForm. fgfz rlxfs" style="width: 100%;" placeholder="请输入联系方式"> < / el -input >
< el -form -item prop = "phone n umber">
< el -input v-model ="ruleForm. dylx rlxfs" style="width: 100%;" placeholder="请输入联系方式"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="6" style = "margin-left: 10px;" >
< el -form -item prop = "email" >
< el -input v-model ="ruleForm. fgfz ryx" style="width: 100%;" placeholder="请输入邮箱"> < / el -input >
< el -input v-model ="ruleForm. dylx ryx" style="width: 100%;" placeholder="请输入邮箱"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="6" style = "margin-left: 10px;" >
< el -form -item prop = " zhiwu ">
< el -input v-model ="ruleForm. fgfzryx " style="width: 100%;" placeholder="请输入职务职称"> < / el -input >
< el -form -item prop = " dylxrzwzc ">
< el -input v-model ="ruleForm. dylxrzwzc " style="width: 100%;" placeholder="请输入职务职称"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
@ -238,41 +259,30 @@
< / e l - r o w >
< el -row >
< el -col :span ="24" >
< el -form -item label = "其他联系人" required class = "daoqitixingren" >
< el -form -item label = "其他联系人" class= "daoqitixingren" v-for ="(domain, index) in ruleForm.otherConcat" :key="domain.key" :prop="'otherConcat.' + index + '.value'" >
< el -row >
< el -col :span ="6" >
< el -form -item prop = "name" >
< el -input v-model =" ruleForm.fgfz rxm" style="width: 100%;" placeholder="请输入联系人"> < / el -input >
< el -input v-model =" domain.qtlx rxm" style="width: 100%;" placeholder="请输入联系人"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="6" style = "margin-left: 10px;" >
< el -form -item prop = "phone N umber">
< el -input v-model =" ruleForm.fgfz rlxfs" style="width: 100%;" placeholder="请输入联系方式"> < / el -input >
< el -form -item prop = "phone n umber">
< el -input v-model =" domain.qtlx rlxfs" style="width: 100%;" placeholder="请输入联系方式"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="6" style = "margin-left: 10px;" >
< el -form -item prop = "email" >
< el -input v-model =" ruleForm.fgfz ryx" style="width: 100%;" placeholder="请输入邮箱"> < / el -input >
< el -input v-model =" domain.qtlx ryx" style="width: 100%;" placeholder="请输入邮箱"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="6" style = "margin-left: 10px;" >
< el -form -item prop = "zhiwu" >
< el -input v-model =" ruleForm.fgfzryx " style="width: 100%;" placeholder="请输入职务职称"> < / el -input >
< el -input v-model =" domain.qtlxrzwzc " style="width: 100%;" placeholder="请输入职务职称"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
< el -row >
< el -col :span ="24" >
< el -form -item : label = "'其他联系人' + (index + 1)" v-for ="(domain, index) in ruleForm.restContacts" :key="domain.key" :prop="'restContacts.' + index + '.value'" >
< el -row >
< el -col :span ="23" >
< el -input v-model ="domain.value" > < / el -input >
< / e l - c o l >
< el -col :span ="1" style = "text-align: center;" >
< i @click ="removeDomain(domain,' restContacts ')" class = "el-icon-remove-outline" style = "margin-left: 5px;font-size: 16px;cursor: pointer;" > < / i >
< i @click ="removeDomain(domain,'otherConcat')" class = "el-icon-remove-outline" style = "margin-left: 5px;font-size: 16px;cursor: pointer;" > < / i >
< / e l - c o l >
< / e l - r o w >
< / e l - f o r m - i t e m >
@ -281,7 +291,7 @@
< el -row >
< el -col :span ="24" >
< el -form -item prop = "btn" >
< el -button @click ="addForm(' restContacts ')"> 添 加 其 他 联 系 人 < / el -button >
< el -button @click ="addForm(' otherConcat ')"> 添 加 其 他 联 系 人 < / el -button >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
@ -290,12 +300,12 @@
< el -row style = "margin: 10px 0;" >
< span class = "top-title-box" > 检查信息 < / span >
< / e l - r o w >
< div v-for ="(domain, index) in ruleForm.jcxx Unit" :key="domain.key" :prop="'jcxxUni t.' + index + '.value'">
< div v-for ="(domain, index) in ruleForm.jcxx List" :key="domain.key" :prop="'jcxxLis t.' + index + '.value'">
< el -row style = "display: flex;" >
< el -col :span ="8" >
< el -form -item class = "daoqitixingren" required : label = "'时间' + (index == 0 ? '' : index)" >
< el -date -picker
v - model = " ruleForm.ymdq sj"
v - model = " domain. sj"
type = "date"
format = "yyyy-MM-dd"
value - format = "yyyy-MM-dd"
@ -303,67 +313,48 @@
< / e l - d a t e - p i c k e r >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="8" style = "margin-left: 10px;" >
< el -col :span ="8" >
< el -form -item class = "daoqitixingren" : label = "'系统域名' + (index == 0 ? '' : index)" >
< el -input v-model ="domain.tyshxydm" placeholder="请输入系统域名" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="7" style = "margin-left: 17px;" >
< el -col :span ="7" >
< el -form -item class = "daoqitixingren" : label = "'系统名称' + (index == 0 ? '' : index)" >
< el -input v-model ="domain.lxdh" placeholder="请输入系统名称" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="1" style = "margin-left: 10px;text-align: center;" >
< i @click ="addGongyinglian('jcxxUnit')" v-if ="index == 0" class="el-icon-circle-plus-outline" style="margin-top: 10px;font-size: 16px;cursor: pointer;" > < / i >
< i @click ="removeDomain(domain,'jcxxUnit')" v -else class = "el-icon-remove-outline" style = "margin-top: 10px;font-size: 16px;cursor: pointer;" > < / i >
< el -col :span ="1" style = "text-align: center;" >
< i @click ="addGongyinglian('jcxxList')" v-if ="index == 0" class="el-icon-circle-plus-outline" style="margin-top: 10px;font-size: 16px;cursor: pointer;" > < / i >
< i @click ="removeDomain(domain,'jcxxList')" v -else class = "el-icon-remove-outline" style = "margin-top: 10px;font-size: 16px;cursor: pointer;" > < / i >
< / e l - c o l >
< / e l - r o w >
< el -row >
< el -col :span ="8" >
< el -form -item : label = "'等保级别' + (index == 0 ? '' : index)" >
< el -select v-model ="domain.dbjb" placeholder="请选择等保级别" >
< el -option
v - for = "dict in dict.type.dbxx_dbdj"
: key = "dict.value"
: label = "dict.label"
: value = "dict.value"
/ >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="8" >
< el -form -item : label = "'单位名称' + (index == 0 ? '' : index)" >
< el -input v-model ="domain.dwmc" placeholder="请输入单位名称" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
< el -row >
< el -col :span ="24" >
< el -form -item : label = "'检查结果' + (index == 0 ? '' : index)" >
< el -input type = "textarea" resize = "none" placeholder = "请输入检查结果" :rows ="5" v-model ="domain.xgyw_ywms" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
< / div >
< el -row >
< el -col :span ="8" >
< el -form -item label = "等保级别" >
< el -select v-model ="ruleForm.xtzyx" placeholder="请选择等保级别" >
< el -option
v - for = "dict in dict.type.zc_xtzyx"
: key = "dict.value"
: label = "dict.label"
: value = "dict.value"
/ >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="8" >
< el -form -item label = "单位名称" >
< el -input v-model ="ruleForm.xtmc" placeholder="请输入单位名称" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
< el -row >
< el -col :span ="8" >
< el -form -item label = "统一社会信用代码" >
< el -input v-model ="ruleForm.xtmc" placeholder="请输入统一社会信用代码" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="8" >
< el -form -item label = "是否关基单位" >
< el -select v-model ="ruleForm.xtzyx" placeholder="请选择系统重要性" >
< el -option
v - for = "dict in dict.type.zc_xtzyx"
: key = "dict.value"
: label = "dict.label"
: value = "dict.value"
/ >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
< el -row >
< el -col :span ="24" >
< el -form -item label = "检查结果" >
< el -input type = "textarea" resize = "none" placeholder = "请输入检查结果" :rows ="5" v-model ="ruleForm.xgyw_ywms" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
<!-- 更多信息 -- >
< el -row style = "margin: 10px 0;" >
< span class = "top-title-box" > 更多信息 < / span >
@ -371,37 +362,37 @@
< el -row >
< el -col :span ="8" >
< el -form -item label = "官网" >
< el -input v-model ="ruleForm. xtmc " placeholder="请输入官网"> < / el -input >
< el -input v-model ="ruleForm. gw " placeholder="请输入官网"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="8" >
< el -form -item label = "地图经度" >
< el -input v-model ="ruleForm. xtmc " placeholder="请输入地图经度"> < / el -input >
< el -input v-model ="ruleForm. dtjd " placeholder="请输入地图经度"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="8" >
< el -form -item label = "地图纬度" >
< el -input v-model ="ruleForm. xtmc " placeholder="请输入地图纬度"> < / el -input >
< el -input v-model ="ruleForm. dtwd " placeholder="请输入地图纬度"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
< el -row >
< el -col :span ="8" >
< el -form -item label = "上级单位" >
< el -input v-model ="ruleForm. xtmc " placeholder="请输入上级单位"> < / el -input >
< el -form -item label = "上级单位" required >
< el -input v-model ="ruleForm. sjdw " placeholder="请输入上级单位"> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
< el -row >
< el -col :span ="24" >
< el -form -item label = "备注" >
< el -input type = "textarea" resize = "none" placeholder = "请输入备注" :rows ="5" v-model ="ruleForm. xgyw_ywms "> < / el -input >
< el -input type = "textarea" resize = "none" placeholder = "请输入备注" :rows ="5" v-model ="ruleForm. remark "> < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
< el -row style = "margin: 10px 0 ;padding-bottom: 50px; text-align: center;" >
< el -button type = "danger" > 取消 < / e l - b u t t o n >
< el -button type = "primary" > 确定 < / e l - b u t t o n >
< el -button type = "primary" @click ="newUnit" > 确 定 < / el -button >
< / e l - r o w >
< / e l - f o r m >
< / div >
@ -409,15 +400,32 @@
< / div >
< / template >
< script >
import pcas from "@/utils/pca-code.json"
import { lookUnit , postUnit } from "@/api/auditPagesApi/index" ;
export default {
dicts : [ 'zc_xtzyx' ] ,
dicts : [ 'zc_xtzyx' , 'is_no' , 'sshy' , 'dwlx' , 'dwjs' , 'dwzsxz' , 'dbxx_dbdj' ],
data ( ) {
return {
options : pcas ,
props : {
value : 'value' ,
label : "value" ,
checkStrictly : true ,
} ,
ruleForm : {
/ / 其 他 联 系 人
restContacts : [ ] ,
otherConcat : [
{
qtlxrxm : '' ,
qtlxrlxfs : '' ,
qtlxryx : '' ,
qtlxrzwzc : '' ,
}
] ,
/ / 所 属 区 域
ssqy : [ ] ,
/ / 检 查 信 息
jcxxUnit : [
jcxx Lis t: [
{
name : "" ,
tyshxydm : "" ,
@ -425,24 +433,69 @@ export default {
}
] ,
} ,
rules : { }
rules : {
email : [
{
type : "email" ,
message : "请输入正确的邮箱地址" ,
trigger : [ "blur" , "change" ]
}
] ,
phonenumber : [
{
pattern : /^1[3|4|5|6|7|8|9][0-9]\d{8}$/ ,
message : "请输入正确的手机号码" ,
trigger : "blur"
}
]
} ,
disabled : false ,
loading : false ,
}
} ,
mounted ( ) {
if ( this . $route . query . pageType == 'look' ) {
this . getInfo ( this . $route . query . id )
this . disabled = true ;
} else if ( this . $route . query . pageType == 'change' ) {
this . getInfo ( this . $route . query . id )
this . disabled = false ;
}
} ,
methods : {
getInfo ( id ) {
this . loading = true ;
lookUnit ( id ) . then ( res => {
this . ruleForm = res . data ;
if ( res . data . ssqyprovince && res . data . ssqycity && res . data . ssqycounty ) {
this . $set ( this . ruleForm , 'ssqy' , [ res . data . ssqyprovince , res . data . ssqycity , res . data . ssqycounty ] )
} else if ( res . data . ssqyprovince && res . data . ssqycity ) {
this . $set ( this . ruleForm , 'ssqy' , [ res . data . ssqyprovince , res . data . ssqycity ] )
} else if ( res . data . ssqyprovince ) {
this . $set ( this . ruleForm , 'ssqy' , [ res . data . ssqyprovince ] )
}
this . loading = false ;
} )
} ,
/ / 新 增 f o r m
addForm ( type ) {
this . ruleForm [ type ] . push ( {
value : '' ,
qtlxrxm : '' ,
qtlxrlxfs : '' ,
qtlxryx : '' ,
qtlxrzwzc : '' ,
key : Date . now ( )
} ) ;
} ,
/ / 供 应 链 F o r m 新 增
addGongyinglian ( type ) {
this . ruleForm [ type ] . push ( {
name : "" ,
tyshxydm : "" ,
lxr : "" ,
lxdh : "" ,
sj : "" ,
xtym : "" ,
xthc : "" ,
dbjb : "" ,
dwmc : "" ,
jcjg : "" ,
key : Date . now ( )
} ) ;
} ,
@ -453,6 +506,29 @@ export default {
this . ruleForm [ type ] . splice ( index , 1 )
}
} ,
newUnit ( ) {
if ( this . ruleForm . ssqy . length > 0 ) {
this . ruleForm . ssqyprovince = this . ruleForm . ssqy [ 0 ]
this . ruleForm . ssqycity = this . ruleForm . ssqy [ 1 ]
this . ruleForm . ssqycounty = this . ruleForm . ssqy [ 2 ]
}
this . loading = true ;
postUnit ( 'post' , this . ruleForm ) . then ( res => {
console . log ( res ) ;
this . loading = false ;
} )
} ,
} ,
beforeRouteEnter ( to , from , next ) {
if ( to . query . pageType == 'add' ) {
to . meta . title = '新增单位'
} else if ( to . query . pageType == 'change' ) {
to . meta . title = '修改单位'
} else if ( to . query . pageType == 'look' ) {
to . meta . title = '单位详情'
}
next ( ) ;
} ,
}
< / script >