@ -9,13 +9,19 @@
< el -form :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 = "系统名称" required >
< el -form -item label = "系统名称" required prop = "xtmc" >
< 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 ="12" >
< el -form -item label = "单位名称" required >
< el -input v-model ="ruleForm.dwmc" placeholder="请输入单位名称" > < / el -input >
< el -form -item label = "单位名称" required prop = "dwmc" >
<!-- < el -input v-model ="ruleForm.dwmc" placeholder="请输入单位名称" > < / el -input > -- >
< el -autocomplete
v - model = "ruleForm.dwmc"
: fetch - suggestions = "querySearchAsync"
placeholder = "请输入单位名称"
> < / e l - a u t o c o m p l e t e >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
@ -58,13 +64,13 @@
< el -form -item label = "IpPort" required class = "IpPort" >
< el -row >
< el -col :span ="19" >
< el -form -item prop = "name" >
< el -form -item >
< el -input v-model ="ruleForm.ipAddress" style="width: 100%;" placeholder="请输入IP地址" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col class = "line" :span ="1" > : < / e l - c o l >
< el -col :span ="4" >
< el -form -item prop = "name" >
< el -form -item >
< el -input v-model ="ruleForm.ipPort" style="width: 100%;" placeholder="端口号" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
@ -101,7 +107,7 @@
< el -form -item label = "到期提醒人" class = "daoqitixingren" >
< el -row >
< el -col :span ="6" >
< el -form -item prop = "Ip" >
< el -form -item >
< el -input v-model ="ruleForm.ymtxrXm" style="width: 100%;" placeholder="请输入姓名" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
@ -656,7 +662,7 @@
< el -form -item label = "分管责任人" required class = "daoqitixingren" >
< el -row >
< el -col :span ="8" >
< el -form -item prop = "name" >
< el -form -item >
< 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 >
@ -695,7 +701,7 @@
< el -form -item label = "部门负责人" required class = "daoqitixingren" >
< el -row >
< el -col :span ="8" >
< el -form -item prop = "name" >
< el -form -item >
< el -input v-model ="ruleForm.bmfzrxm" style="width: 100%;" placeholder="请输入联系人" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
@ -734,7 +740,7 @@
< el -form -item label = "第一联系人" required class = "daoqitixingren" >
< el -row >
< el -col :span ="8" >
< el -form -item prop = "name" >
< el -form -item >
< el -input v-model ="ruleForm.dylxrxm" style="width: 100%;" placeholder="请输入联系人" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
@ -773,7 +779,7 @@
< el -form -item : label = "'其他联系人' + (index == 0 ? '' : index)" v-for ="(domain, index) in ruleForm.otherConcat" :key="domain.key" :prop="'otherConcat.' + index + '.value'" >
< el -row style = "display: flex;" >
< el -col :span ="8" >
< el -form -item prop = "name" >
< el -form -item >
< el -input v-model ="domain.qtlxrxm" style="width: 100%;" placeholder="请输入联系人" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - c o l >
@ -812,7 +818,7 @@
< / e l - r o w >
< el -row v-if ="$route.query.pageType !== 'look'" >
< el -col :span ="24" >
< el -form -item prop = "btn" >
< el -form -item >
< el -button @click ="addOtherConcat('otherConcat')" > 添 加 其 他 联 系 人 < / el -button >
< / e l - f o r m - i t e m >
< / e l - c o l >
@ -1507,16 +1513,18 @@
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="12" style = "margin-left: 10px;" >
< el -form -item class = "daoqitixingren" required : prop = "'xtjsUnit.' + index + '.tyshxydm'" : label = "'统一社会信用代码' + (index == 0 ? '' : index)"
: rules = " [
{
pattern : /^[a-zA-Z0-9]{18}$/ ,
message : '请输入正确格式的18位统一社会信用代码' ,
trigger : 'blur'
}
] "
>
< el -input v-model ="domain.tyshxydm" placeholder="请输入统一信用代码" > < / el -input >
< el -form -item class = "daoqitixingren" required : label = "'统一社会信用代码' + (index == 0 ? '' : index)" >
< el -form -item class = "daoqitixingren" : prop = "'xtjsUnit.' + index + '.tyshxydm'"
: rules = " [
{
pattern : /^[a-zA-Z0-9]{18}$/ ,
message : '请输入正确格式的18位统一社会信用代码' ,
trigger : 'blur'
}
] "
>
< el -input v-model ="domain.tyshxydm" placeholder="请输入统一信用代码" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
@ -1527,16 +1535,18 @@
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="12" style = "margin-left: 10px;" >
< el -form -item class = "daoqitixingren" required : label = "'联系电话' + (index == 0 ? '' : index)" : prop = "'xtjsUnit.' + index + '.lxdh'"
: rules = " [
{
pattern : /^1[3|4|5|6|7|8|9][0-9]\d{8}$/ ,
message : '请输入正确的手机号码' ,
trigger : 'blur'
}
] "
>
< el -input v-model ="domain.lxdh" placeholder="请输入联系电话" > < / el -input >
< el -form -item class = "daoqitixingren" required : label = "'联系电话' + (index == 0 ? '' : index)" >
< el -form -item class = "daoqitixingren" : prop = "'xtjsUnit.' + index + '.lxdh'"
: rules = " [
{
pattern : /^1[3|4|5|6|7|8|9][0-9]\d{8}$/ ,
message : '请输入正确的手机号码' ,
trigger : 'blur'
}
] "
>
< el -input v-model ="domain.lxdh" placeholder="请输入联系电话" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
@ -1572,16 +1582,18 @@
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="12" style = "margin-left: 10px;" >
< el -form -item class = "daoqitixingren" : prop = "'xtyyUnit.' + index + '.tyshxydm'" required : label = "'统一社会信用代码' + (index == 0 ? '' : index)"
: rules = " [
{
pattern : /^[a-zA-Z0-9]{18}$/ ,
message : '请输入正确格式的18位统一社会信用代码' ,
trigger : 'blur'
}
] "
>
< el -input v-model ="domain.tyshxydm" placeholder="请输入统一信用代码" > < / el -input >
< el -form -item class = "daoqitixingren" required : label = "'统一社会信用代码' + (index == 0 ? '' : index)" >
< el -form -item class = "daoqitixingren" : prop = "'xtyyUnit.' + index + '.tyshxydm'"
: rules = " [
{
pattern : /^[a-zA-Z0-9]{18}$/ ,
message : '请输入正确格式的18位统一社会信用代码' ,
trigger : 'blur'
}
] "
>
< el -input v-model ="domain.tyshxydm" placeholder="请输入统一信用代码" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
@ -1592,16 +1604,18 @@
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="12" style = "margin-left: 10px;" >
< el -form -item class = "daoqitixingren" required : label = "'联系电话' + (index == 0 ? '' : index)" : prop = "'xtyyUnit.' + index + '.lxdh'"
: rules = " [
{
pattern : /^1[3|4|5|6|7|8|9][0-9]\d{8}$/ ,
message : '请输入正确的手机号码' ,
trigger : 'blur'
}
] "
>
< el -input v-model ="domain.lxdh" placeholder="请输入联系电话" > < / el -input >
< el -form -item class = "daoqitixingren" required : label = "'联系电话' + (index == 0 ? '' : index)" >
< el -form -item class = "daoqitixingren" : prop = "'xtyyUnit.' + index + '.lxdh'"
: rules = " [
{
pattern : /^1[3|4|5|6|7|8|9][0-9]\d{8}$/ ,
message : '请输入正确的手机号码' ,
trigger : 'blur'
}
] "
>
< el -input v-model ="domain.lxdh" placeholder="请输入联系电话" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
@ -2777,7 +2791,7 @@
< script >
import pcas from "@/utils/pca-code.json"
import myUpload from "@/views/components/myUpload/index.vue" ;
import { assetUnitData , assetInfo } from "@/api/auditPagesApi/index" ;
import { assetUnitData , assetInfo , unitAllList } from "@/api/auditPagesApi/index" ;
export default {
name : "AssetsAuth" ,
dicts : [
@ -2959,7 +2973,14 @@ export default {
type : 3 ,
}
] ,
rules : { } ,
rules : {
xtmc : [
{ required : true , message : '请输入系统名称' , trigger : 'blur' } ,
] ,
dwmc : [
{ required : true , message : '请输入单位名称' , trigger : 'blur' } ,
] ,
} ,
disabled : false ,
loading : false ,
}
@ -3043,6 +3064,20 @@ export default {
}
} )
} ,
/ / 单 位 名 称 模 糊 查 询
querySearchAsync ( queryString , cb ) {
let results = [ ] ;
unitAllList ( { nickName : queryString } ) . then ( res => {
res . data . forEach ( item => {
results . push ( {
value : item . nickName ,
id : item . id ,
} )
} )
} )
cb ( results ) ;
} ,
/ / 新 监 管 业 务 形 态 切 换
changeRadio ( id ) {
this . ruleForm . xjgywxt = {
remark : id ,
@ -3163,37 +3198,41 @@ export default {
} ,
/ / 新 增 资 产 确 认 按 钮
newAssets ( ) {
this . ruleForm . xttz = this . xttz . join ( ',' ) ;
this . ruleForm . xtfhqkFcg = this . xtfhqkFcg . join ( ',' ) ;
this . ruleForm . xtfhqkFxl = this . xtfhqkFxl . join ( ',' ) ;
this . ruleForm . xtfhqkFzd = this . xtfhqkFzd . join ( ',' ) ;
this . ruleForm . xtfhqkFls = this . xtfhqkFls . join ( ',' ) ;
this . ruleForm . gylxxList = [ ... this . ruleForm . chepingUnit , ... this . ruleForm . yjgysUnit , ... this . ruleForm . jfywUnit , ... this . ruleForm . xtsjUnit , ... this . ruleForm . xtjsUnit , ... this . ruleForm . xtyyUnit , ... this . ruleForm . aqfwUnit ]
this . ruleForm . jcwlList = [ ... this . fwqxx , ... this . wlsb , ... this . aqsb ]
if ( this . dlwz . length > 0 ) {
this . ruleForm . sheng = this . dlwz [ 0 ]
this . ruleForm . shi = this . dlwz [ 1 ]
this . ruleForm . qu = this . dlwz [ 2 ]
}
if ( this . ruleForm . fwwz ) {
this . ruleForm . fwwz = this . select + "-" + this . ruleForm . fwwz
}
this . loading = true ;
if ( this . $route . query . pageType == 'change' ) {
assetUnitData ( 'put' , this . ruleForm ) . then ( res => {
/ / c o n s o l e . l o g ( r e s , " r e s " ) ;
this . loading = false ;
this . $modal . msgSuccess ( "修改成功" ) ;
this . $router . go ( - 1 ) ;
} )
} else {
assetUnitData ( 'post' , this . ruleForm ) . then ( res => {
/ / c o n s o l e . l o g ( r e s , " r e s " ) ;
this . loading = false ;
this . $modal . msgSuccess ( "新增成功" ) ;
this . $router . go ( - 1 ) ;
} )
}
this . $refs [ 'ruleForm' ] . validate ( ( valid ) => {
if ( valid ) {
this . ruleForm . xttz = this . xttz . join ( ',' ) ;
this . ruleForm . xtfhqkFcg = this . xtfhqkFcg . join ( ',' ) ;
this . ruleForm . xtfhqkFxl = this . xtfhqkFxl . join ( ',' ) ;
this . ruleForm . xtfhqkFzd = this . xtfhqkFzd . join ( ',' ) ;
this . ruleForm . xtfhqkFls = this . xtfhqkFls . join ( ',' ) ;
this . ruleForm . gylxxList = [ ... this . ruleForm . chepingUnit , ... this . ruleForm . yjgysUnit , ... this . ruleForm . jfywUnit , ... this . ruleForm . xtsjUnit , ... this . ruleForm . xtjsUnit , ... this . ruleForm . xtyyUnit , ... this . ruleForm . aqfwUnit ]
this . ruleForm . jcwlList = [ ... this . fwqxx , ... this . wlsb , ... this . aqsb ]
if ( this . dlwz . length > 0 ) {
this . ruleForm . sheng = this . dlwz [ 0 ]
this . ruleForm . shi = this . dlwz [ 1 ]
this . ruleForm . qu = this . dlwz [ 2 ]
}
if ( this . ruleForm . fwwz ) {
this . ruleForm . fwwz = this . select + "-" + this . ruleForm . fwwz
}
this . loading = true ;
if ( this . $route . query . pageType == 'change' ) {
assetUnitData ( 'put' , this . ruleForm ) . then ( res => {
/ / c o n s o l e . l o g ( r e s , " r e s " ) ;
this . loading = false ;
this . $modal . msgSuccess ( "修改成功" ) ;
this . $router . go ( - 1 ) ;
} )
} else {
assetUnitData ( 'post' , this . ruleForm ) . then ( res => {
/ / c o n s o l e . l o g ( r e s , " r e s " ) ;
this . loading = false ;
this . $modal . msgSuccess ( "新增成功" ) ;
this . $router . go ( - 1 ) ;
} )
}
}
} )
} ,
sendBack ( ) {
this . $router . go ( - 1 ) ;