网页需求更改

lijinlongNew
严飞永 4 days ago
parent ee8669f678
commit 98c3b5651e

File diff suppressed because it is too large Load Diff

@ -47,37 +47,51 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="访问网址" class="fangwenwangzhi"> <el-form-item label="访问网址" class="fangwenwangzhi">
<el-row> <div
<el-col :span="23"> v-if="pageType === 'look'"
style="
width: 100%;
height: 36px;
border: 1px solid #dfe4ed;
padding-left: 18px;
border-radius: 4px;
height: 36px;
background-color: #f5f7fa;
color: #c2c5cc;
"
>
<!-- 查看模式显示为可点击的超链接 -->
<a
:href="generateFullUrl(ruleForm.fwwz)"
target="_blank"
rel="noopener noreferrer"
class="website-link"
>
{{ ruleForm.fwwz }}
</a>
</div>
<div v-else>
<!-- 编辑模式显示为输入框 -->
<el-input <el-input
placeholder="请输入内容"
v-model="ruleForm.fwwz" v-model="ruleForm.fwwz"
placeholder="请输入访问网址"
class="input-with-select" class="input-with-select"
> :rules="[
<template slot="prepend"> {
<el-select v-model="select"> required: true,
<el-option label="http" value="http"></el-option> message: '访问网址不能为空',
<el-option label="https" value="https"></el-option> trigger: 'blur',
</el-select> },
<span class="wangzhispan">://</span> {
</template> pattern:
</el-input> /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([/\w \.-]*)*\/?$/,
</el-col> message: '请输入有效的网址',
<el-col :span="1"> trigger: 'blur',
<el-popover placement="top" width="250" trigger="hover"> },
<div>说明请仔细填写访问地址确保网站地址能被访问</div> ]"
<i />
slot="reference" </div>
class="el-icon-document-copy"
style="
margin-left: 5px;
font-size: 16px;
cursor: pointer;
"
></i>
</el-popover>
</el-col>
</el-row>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -4798,8 +4812,17 @@ export default {
} }
}, },
methods: { methods: {
//
generateFullUrl(url) {
if (!url) return "";
// http(s):// https://
if (!/^https?:\/\//i.test(url)) {
return "https://" + url;
}
return url;
},
changeSfsjgrxx(index) { changeSfsjgrxx(index) {
this.ruleForm.sjzcList[index].grxxsjl = "" this.ruleForm.sjzcList[index].grxxsjl = "";
}, },
addSjzcList() { addSjzcList() {
this.ruleForm.sjzcList.push({ this.ruleForm.sjzcList.push({

@ -1,4 +1,5 @@
<template> <template>
<!-- 资产填报记录和我的资产 -->
<div class="L-assets-info"> <div class="L-assets-info">
<el-backtop target=".L-assets-info" /> <el-backtop target=".L-assets-info" />
<div class="assets-info-top"> <div class="assets-info-top">
@ -57,37 +58,49 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="访问网址" class="fangwenwangzhi"> <el-form-item label="访问网址" class="fangwenwangzhi">
<el-row> <div
<el-col :span="23"> v-if="pageType === 'look'"
style="
width: 100%;
height: 36px;
border: 1px solid #dfe4ed;
padding-left: 18px;
border-radius: 4px;
background-color: #f5f7fa;
color: #c2c5cc;
"
>
<!-- 查看模式显示为可点击的超链接 -->
<a
:href="generateFullUrl(ruleForm.fwwz)"
target="_blank"
rel="noopener noreferrer"
class="website-link"
>
{{ ruleForm.fwwz }}
</a>
</div>
<div v-else>
<!-- 编辑模式显示为输入框 -->
<el-input <el-input
placeholder="请输入内容"
v-model="ruleForm.fwwz" v-model="ruleForm.fwwz"
placeholder="请输入访问网址"
class="input-with-select" class="input-with-select"
> :rules="[
<template slot="prepend"> {
<el-select v-model="select"> required: true,
<el-option label="http" value="http"></el-option> message: '访问网址不能为空',
<el-option label="https" value="https"></el-option> trigger: 'blur',
</el-select> },
<span class="wangzhispan">://</span> {
</template> pattern:
</el-input> /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([/\w \.-]*)*\/?$/,
</el-col> message: '请输入有效的网址',
<el-col :span="1"> trigger: 'blur',
<el-popover placement="top" width="250" trigger="hover"> },
<div>说明请仔细填写访问地址确保网站地址能被访问</div> ]"
<i />
slot="reference" </div>
class="el-icon-document-copy"
style="
margin-left: 5px;
font-size: 16px;
cursor: pointer;
"
></i>
</el-popover>
</el-col>
</el-row>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -4583,8 +4596,10 @@
> >
<el-row style="display: flex"> <el-row style="display: flex">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="数据库名称" <el-form-item
:prop="`sjzcList[${dataIndex}].sjzcSjkmc`" :rules="rules.bwk" label="数据库名称"
:prop="`sjzcList[${dataIndex}].sjzcSjkmc`"
:rules="rules.bwk"
> >
<el-input <el-input
v-model="dataItem.sjzcSjkmc" v-model="dataItem.sjzcSjkmc"
@ -4593,7 +4608,11 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" style="margin-left: 10px"> <el-col :span="12" style="margin-left: 10px">
<el-form-item label="数据库类型" :prop="`sjzcList[${dataIndex}].sjzcSjklx`" :rules="rules.bwk"> <el-form-item
label="数据库类型"
:prop="`sjzcList[${dataIndex}].sjzcSjklx`"
:rules="rules.bwk"
>
<!-- <el-input v-model="ruleForm.sjzcSjklx" placeholder="请输入数据库类型"></el-input> --> <!-- <el-input v-model="ruleForm.sjzcSjklx" placeholder="请输入数据库类型"></el-input> -->
<el-select <el-select
v-model="dataItem.sjzcSjklx" v-model="dataItem.sjzcSjklx"
@ -4611,7 +4630,11 @@
</el-row> </el-row>
<el-row style="display: flex"> <el-row style="display: flex">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="端口" :prop="`sjzcList[${dataIndex}].sjzcDk`" :rules="rules.bwk"> <el-form-item
label="端口"
:prop="`sjzcList[${dataIndex}].sjzcDk`"
:rules="rules.bwk"
>
<el-input <el-input
v-model="dataItem.sjzcDk" v-model="dataItem.sjzcDk"
:placeholder="'请输入端口' + (dataIndex + 1)" :placeholder="'请输入端口' + (dataIndex + 1)"
@ -4619,7 +4642,11 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" style="margin-left: 10px"> <el-col :span="12" style="margin-left: 10px">
<el-form-item label="数据库版本" :prop="`sjzcList[${dataIndex}].sjzcSjkbb`" :rules="rules.bwk"> <el-form-item
label="数据库版本"
:prop="`sjzcList[${dataIndex}].sjzcSjkbb`"
:rules="rules.bwk"
>
<el-input <el-input
v-model="dataItem.sjzcSjkbb" v-model="dataItem.sjzcSjkbb"
:placeholder="'请输入数据库版本' + (dataIndex + 1)" :placeholder="'请输入数据库版本' + (dataIndex + 1)"
@ -4629,7 +4656,11 @@
</el-row> </el-row>
<el-row style="display: flex"> <el-row style="display: flex">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="数据库所在IP" :prop="`sjzcList[${dataIndex}].sjzcSjkIp`" :rules="rules.bwk"> <el-form-item
label="数据库所在IP"
:prop="`sjzcList[${dataIndex}].sjzcSjkIp`"
:rules="rules.bwk"
>
<el-input <el-input
v-model="dataItem.sjzcSjkIp" v-model="dataItem.sjzcSjkIp"
:placeholder="'请输入数据库所在IP' + (dataIndex + 1)" :placeholder="'请输入数据库所在IP' + (dataIndex + 1)"
@ -4637,7 +4668,11 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" style="margin-left: 10px"> <el-col :span="12" style="margin-left: 10px">
<el-form-item label="共享属性" :prop="`sjzcList[${dataIndex}].sjzcGxsx`" :rules="rules.bwk"> <el-form-item
label="共享属性"
:prop="`sjzcList[${dataIndex}].sjzcGxsx`"
:rules="rules.bwk"
>
<el-select <el-select
v-model="dataItem.sjzcGxsx" v-model="dataItem.sjzcGxsx"
:placeholder="'请选择共享属性' + (dataIndex + 1)" :placeholder="'请选择共享属性' + (dataIndex + 1)"
@ -4654,7 +4689,11 @@
</el-row> </el-row>
<el-row style="display: flex"> <el-row style="display: flex">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="开放属性" :prop="`sjzcList[${dataIndex}].sjzcKfsx`" :rules="rules.bwk"> <el-form-item
label="开放属性"
:prop="`sjzcList[${dataIndex}].sjzcKfsx`"
:rules="rules.bwk"
>
<el-select <el-select
v-model="dataItem.sjzcKfsx" v-model="dataItem.sjzcKfsx"
:placeholder="'请选择开放属性' + (dataIndex + 1)" :placeholder="'请选择开放属性' + (dataIndex + 1)"
@ -4669,7 +4708,11 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" style="margin-left: 10px"> <el-col :span="12" style="margin-left: 10px">
<el-form-item label="数据领域" :prop="`sjzcList[${dataIndex}].sjzcSjly`" :rules="rules.bwk"> <el-form-item
label="数据领域"
:prop="`sjzcList[${dataIndex}].sjzcSjly`"
:rules="rules.bwk"
>
<el-select <el-select
v-model="dataItem.sjzcSjly" v-model="dataItem.sjzcSjly"
:placeholder="'请选择数据领域' + (dataIndex + 1)" :placeholder="'请选择数据领域' + (dataIndex + 1)"
@ -4686,7 +4729,11 @@
</el-row> </el-row>
<el-row style="display: flex"> <el-row style="display: flex">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="更新周期" :prop="`sjzcList[${dataIndex}].sjzcGxzq`" :rules="rules.bwk"> <el-form-item
label="更新周期"
:prop="`sjzcList[${dataIndex}].sjzcGxzq`"
:rules="rules.bwk"
>
<el-select <el-select
v-model="dataItem.sjzcGxzq" v-model="dataItem.sjzcGxzq"
:placeholder="'请选择数据领域' + (dataIndex + 1)" :placeholder="'请选择数据领域' + (dataIndex + 1)"
@ -4701,7 +4748,11 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" style="margin-left: 10px"> <el-col :span="12" style="margin-left: 10px">
<el-form-item label="数据类型" :prop="`sjzcList[${dataIndex}].sjzcSjlx`" :rules="rules.bwk"> <el-form-item
label="数据类型"
:prop="`sjzcList[${dataIndex}].sjzcSjlx`"
:rules="rules.bwk"
>
<!-- <el-select v-model="ruleForm.region" placeholder="请选择数据类型"> <!-- <el-select v-model="ruleForm.region" placeholder="请选择数据类型">
<el-option <el-option
v-for="dict in dict.type.sjzc_gxzq" v-for="dict in dict.type.sjzc_gxzq"
@ -4719,7 +4770,11 @@
</el-row> </el-row>
<el-row style="display: flex"> <el-row style="display: flex">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="数据量" :prop="`sjzcList[${dataIndex}].sjzcSjl`" :rules="rules.bwk"> <el-form-item
label="数据量"
:prop="`sjzcList[${dataIndex}].sjzcSjl`"
:rules="rules.bwk"
>
<el-input <el-input
type="number" type="number"
v-model="dataItem.sjzcSjl" v-model="dataItem.sjzcSjl"
@ -4728,7 +4783,11 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" style="margin-left: 10px"> <el-col :span="12" style="margin-left: 10px">
<el-form-item label="数据量单位" :prop="`sjzcList[${dataIndex}].sjzcSjldw`" :rules="rules.bwk"> <el-form-item
label="数据量单位"
:prop="`sjzcList[${dataIndex}].sjzcSjldw`"
:rules="rules.bwk"
>
<el-select <el-select
v-model="dataItem.sjzcSjldw" v-model="dataItem.sjzcSjldw"
:placeholder="'请选择数据量单位' + (dataIndex + 1)" :placeholder="'请选择数据量单位' + (dataIndex + 1)"
@ -4745,7 +4804,11 @@
</el-row> </el-row>
<el-row style="display: flex"> <el-row style="display: flex">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="数据是否出境" :prop="`sjzcList[${dataIndex}].sjzcCj`" :rules="rules.bwk"> <el-form-item
label="数据是否出境"
:prop="`sjzcList[${dataIndex}].sjzcCj`"
:rules="rules.bwk"
>
<el-select <el-select
v-model="dataItem.sjzcCj" v-model="dataItem.sjzcCj"
:placeholder="'请选择数据是否出境' + (dataIndex + 1)" :placeholder="'请选择数据是否出境' + (dataIndex + 1)"
@ -4760,7 +4823,11 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" style="margin-left: 10px"> <el-col :span="12" style="margin-left: 10px">
<el-form-item label="数据分级分类" :prop="`sjzcList[${dataIndex}].sjzcSjfjfl`" :rules="rules.bwk"> <el-form-item
label="数据分级分类"
:prop="`sjzcList[${dataIndex}].sjzcSjfjfl`"
:rules="rules.bwk"
>
<el-select <el-select
v-model="dataItem.sjzcSjfjfl" v-model="dataItem.sjzcSjfjfl"
:placeholder="'请选择数据分级分类' + (dataIndex + 1)" :placeholder="'请选择数据分级分类' + (dataIndex + 1)"
@ -4777,7 +4844,11 @@
</el-row> </el-row>
<el-row style="display: flex"> <el-row style="display: flex">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="数据重要程度" :prop="`sjzcList[${dataIndex}].sjzcSjzycd`" :rules="rules.bwk"> <el-form-item
label="数据重要程度"
:prop="`sjzcList[${dataIndex}].sjzcSjzycd`"
:rules="rules.bwk"
>
<el-select <el-select
v-model="dataItem.sjzcSjzycd" v-model="dataItem.sjzcSjzycd"
:placeholder="'请选择数据重要程度' + (dataIndex + 1)" :placeholder="'请选择数据重要程度' + (dataIndex + 1)"
@ -4792,7 +4863,11 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" style="margin-left: 10px"> <el-col :span="12" style="margin-left: 10px">
<el-form-item label="是否涉密数据" :prop="`sjzcList[${dataIndex}].sjzcSmsj`" :rules="rules.bwk"> <el-form-item
label="是否涉密数据"
:prop="`sjzcList[${dataIndex}].sjzcSmsj`"
:rules="rules.bwk"
>
<el-select <el-select
v-model="dataItem.sjzcSmsj" v-model="dataItem.sjzcSmsj"
:placeholder="'请选择是否涉密数据' + (dataIndex + 1)" :placeholder="'请选择是否涉密数据' + (dataIndex + 1)"
@ -4809,7 +4884,11 @@
</el-row> </el-row>
<el-row style="display: flex"> <el-row style="display: flex">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="数据描述" :prop="`sjzcList[${dataIndex}].sjzcSjms`" :rules="rules.bwk"> <el-form-item
label="数据描述"
:prop="`sjzcList[${dataIndex}].sjzcSjms`"
:rules="rules.bwk"
>
<el-input <el-input
type="textarea" type="textarea"
resize="none" resize="none"
@ -4822,7 +4901,11 @@
</el-row> </el-row>
<el-row style="display: flex"> <el-row style="display: flex">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否涉及个人信息" :prop="`sjzcList[${dataIndex}].sfsjgrxx`" :rules="rules.bwk"> <el-form-item
label="是否涉及个人信息"
:prop="`sjzcList[${dataIndex}].sfsjgrxx`"
:rules="rules.bwk"
>
<el-select <el-select
@change="changeSfsjgrxx(dataIndex)" @change="changeSfsjgrxx(dataIndex)"
v-model="dataItem.sfsjgrxx" v-model="dataItem.sfsjgrxx"
@ -4838,7 +4921,11 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" style="margin-left: 10px"> <el-col :span="12" style="margin-left: 10px">
<el-form-item label="个人信息数据量" :prop="`sjzcList[${dataIndex}].grxxsjl`" :rules="rules.bwk"> <el-form-item
label="个人信息数据量"
:prop="`sjzcList[${dataIndex}].grxxsjl`"
:rules="rules.bwk"
>
<el-input <el-input
:placeholder="'请填写个人信息数据量' + (dataIndex + 1)" :placeholder="'请填写个人信息数据量' + (dataIndex + 1)"
type="number" type="number"
@ -5042,6 +5129,9 @@ export default {
}, },
computed: { computed: {
...mapGetters(["nickName"]), ...mapGetters(["nickName"]),
pageType() {
return this.$route.query.pageType;
},
}, },
data() { data() {
const arrayLenght = (rule, value, callback) => { const arrayLenght = (rule, value, callback) => {
@ -5400,19 +5490,27 @@ export default {
} }
}, },
methods: { methods: {
//
generateFullUrl(url) {
if (!url) return "";
// http(s):// https://
if (!/^https?:\/\//i.test(url)) {
return "https://" + url;
}
return url;
},
changeSfsjgrxx(index) { changeSfsjgrxx(index) {
if (this.ruleForm.sjzcList[index].sfsjgrxx != 1) { if (this.ruleForm.sjzcList[index].sfsjgrxx != 1) {
this.ruleForm.sjzcList[index].grxxsjl = 0 this.ruleForm.sjzcList[index].grxxsjl = 0;
} else { } else {
this.ruleForm.sjzcList[index].grxxsjl = "" this.ruleForm.sjzcList[index].grxxsjl = "";
} }
}, },
addSjzcList() { addSjzcList() {
this.ruleForm.sjzcList.push({ this.ruleForm.sjzcList.push({
sjzcSjkmc: "", sjzcSjkmc: "",
sjzcSjklx: "", sjzcSjklx: "",
grxxsjl:0 grxxsjl: 0,
}); });
}, },
removeSjzcList(index) { removeSjzcList(index) {

File diff suppressed because it is too large Load Diff

@ -1,5 +1,5 @@
<template> <template>
<!-- 任务管理资产详情 --> <!-- 任务管理资产详情资产核查-web资产 -->
<div class="L-assets-info"> <div class="L-assets-info">
<el-backtop target=".L-assets-info" /> <el-backtop target=".L-assets-info" />
<div class="assets-info-top"> <div class="assets-info-top">
@ -59,37 +59,49 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="访问网址" class="fangwenwangzhi"> <el-form-item label="访问网址" class="fangwenwangzhi">
<el-row> <div
<el-col :span="23"> v-if="pageType === 'look'"
style="
width: 100%;
height: 36px;
border: 1px solid #dfe4ed;
padding-left: 18px;
border-radius: 4px;
background-color: #f5f7fa;
color: #c2c5cc;
"
>
<!-- 查看模式显示为可点击的超链接 -->
<a
:href="generateFullUrl(ruleForm.fwwz)"
target="_blank"
rel="noopener noreferrer"
class="website-link"
>
{{ ruleForm.fwwz }}
</a>
</div>
<div v-else>
<!-- 编辑模式显示为输入框 -->
<el-input <el-input
placeholder="请输入内容"
v-model="ruleForm.fwwz" v-model="ruleForm.fwwz"
placeholder="请输入访问网址"
class="input-with-select" class="input-with-select"
> :rules="[
<template slot="prepend"> {
<el-select v-model="select"> required: true,
<el-option label="http" value="http"></el-option> message: '访问网址不能为空',
<el-option label="https" value="https"></el-option> trigger: 'blur',
</el-select> },
<span class="wangzhispan">://</span> {
</template> pattern:
</el-input> /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([/\w \.-]*)*\/?$/,
</el-col> message: '请输入有效的网址',
<el-col :span="1"> trigger: 'blur',
<el-popover placement="top" width="250" trigger="hover"> },
<div>说明请仔细填写访问地址确保网站地址能被访问</div> ]"
<i />
slot="reference" </div>
class="el-icon-document-copy"
style="
margin-left: 5px;
font-size: 16px;
cursor: pointer;
"
></i>
</el-popover>
</el-col>
</el-row>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -3057,7 +3069,6 @@
<el-col :span="8" style="margin-left: 10px"> <el-col :span="8" style="margin-left: 10px">
<el-form-item <el-form-item
class="daoqitixingren" class="daoqitixingren"
:label="'硬件序列号' + (index == 0 ? '' : index)" :label="'硬件序列号' + (index == 0 ? '' : index)"
> >
<el-input <el-input
@ -3069,7 +3080,6 @@
<el-col :span="8" style="margin-left: 10px"> <el-col :span="8" style="margin-left: 10px">
<el-form-item <el-form-item
class="daoqitixingren" class="daoqitixingren"
:label="'硬件版本信息' + (index == 0 ? '' : index)" :label="'硬件版本信息' + (index == 0 ? '' : index)"
> >
<el-input <el-input
@ -3101,8 +3111,6 @@
<el-col :span="8" style="margin-left: 10px"> <el-col :span="8" style="margin-left: 10px">
<el-form-item <el-form-item
class="daoqitixingren" class="daoqitixingren"
:label="'硬件部署位置' + (index == 0 ? '' : index)" :label="'硬件部署位置' + (index == 0 ? '' : index)"
> >
<el-input <el-input
@ -3242,8 +3250,6 @@
<el-col :span="8" style="margin-left: 10px"> <el-col :span="8" style="margin-left: 10px">
<el-form-item <el-form-item
class="daoqitixingren" class="daoqitixingren"
:label="'硬件序列号' + (index == 0 ? '' : index)" :label="'硬件序列号' + (index == 0 ? '' : index)"
> >
<el-input <el-input
@ -3255,7 +3261,6 @@
<el-col :span="8" style="margin-left: 10px"> <el-col :span="8" style="margin-left: 10px">
<el-form-item <el-form-item
class="daoqitixingren" class="daoqitixingren"
:label="'硬件版本信息' + (index == 0 ? '' : index)" :label="'硬件版本信息' + (index == 0 ? '' : index)"
> >
<el-input <el-input
@ -5133,6 +5138,11 @@ export default {
loading: false, loading: false,
}; };
}, },
computed: {
pageType() {
return this.$route.query.pageType;
},
},
mounted() { mounted() {
let obj = { let obj = {
taskId: this.$route.query.taskId, taskId: this.$route.query.taskId,
@ -5162,6 +5172,15 @@ export default {
} }
}, },
methods: { methods: {
//
generateFullUrl(url) {
if (!url) return "";
// http(s):// https://
if (!/^https?:\/\//i.test(url)) {
return "https://" + url;
}
return url;
},
addSjzcList() { addSjzcList() {
this.ruleForm.sjzcList.push({ this.ruleForm.sjzcList.push({
sjzcSjkmc: "", sjzcSjkmc: "",

@ -1,5 +1,5 @@
<template> <template>
<!-- 任务管理资产详情 --> <!-- 单位端-我的任务-核查web资产 -->
<div class="L-assets-info"> <div class="L-assets-info">
<el-backtop target=".L-assets-info" /> <el-backtop target=".L-assets-info" />
<div class="assets-info-top"> <div class="assets-info-top">
@ -58,37 +58,49 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="访问网址" class="fangwenwangzhi"> <el-form-item label="访问网址" class="fangwenwangzhi">
<el-row> <div
<el-col :span="23"> v-if="pageType === 'look'"
style="
width: 100%;
height: 36px;
border: 1px solid #dfe4ed;
padding-left: 18px;
border-radius: 4px;
background-color: #f5f7fa;
color: #c2c5cc;
"
>
<!-- 查看模式显示为可点击的超链接 -->
<a
:href="generateFullUrl(ruleForm.fwwz)"
target="_blank"
rel="noopener noreferrer"
class="website-link"
>
{{ ruleForm.fwwz }}
</a>
</div>
<div v-else>
<!-- 编辑模式显示为输入框 -->
<el-input <el-input
placeholder="请输入内容"
v-model="ruleForm.fwwz" v-model="ruleForm.fwwz"
placeholder="请输入访问网址"
class="input-with-select" class="input-with-select"
> :rules="[
<template slot="prepend"> {
<el-select v-model="select"> required: true,
<el-option label="http" value="http"></el-option> message: '访问网址不能为空',
<el-option label="https" value="https"></el-option> trigger: 'blur',
</el-select> },
<span class="wangzhispan">://</span> {
</template> pattern:
</el-input> /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([/\w \.-]*)*\/?$/,
</el-col> message: '请输入有效的网址',
<el-col :span="1"> trigger: 'blur',
<el-popover placement="top" width="250" trigger="hover"> },
<div>说明请仔细填写访问地址确保网站地址能被访问</div> ]"
<i />
slot="reference" </div>
class="el-icon-document-copy"
style="
margin-left: 5px;
font-size: 16px;
cursor: pointer;
"
></i>
</el-popover>
</el-col>
</el-row>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -3148,7 +3160,6 @@
class="daoqitixingren" class="daoqitixingren"
required required
:prop="`fwqxx[${index}].yjxh`" :prop="`fwqxx[${index}].yjxh`"
:label="'硬件型号' + (index == 0 ? '' : index)" :label="'硬件型号' + (index == 0 ? '' : index)"
> >
<el-input <el-input
@ -3161,7 +3172,6 @@
<el-form-item <el-form-item
class="daoqitixingren" class="daoqitixingren"
:prop="`fwqxx[${index}].yjxlh`" :prop="`fwqxx[${index}].yjxlh`"
:label="'硬件序列号' + (index == 0 ? '' : index)" :label="'硬件序列号' + (index == 0 ? '' : index)"
> >
<el-input <el-input
@ -3174,7 +3184,6 @@
<el-form-item <el-form-item
class="daoqitixingren" class="daoqitixingren"
:prop="`fwqxx[${index}].yjbbxx`" :prop="`fwqxx[${index}].yjbbxx`"
:label="'硬件版本信息' + (index == 0 ? '' : index)" :label="'硬件版本信息' + (index == 0 ? '' : index)"
> >
<el-input <el-input
@ -3353,7 +3362,6 @@
<el-form-item <el-form-item
class="daoqitixingren" class="daoqitixingren"
:prop="`wlsb[${index}].yjxlh`" :prop="`wlsb[${index}].yjxlh`"
:label="'硬件序列号' + (index == 0 ? '' : index)" :label="'硬件序列号' + (index == 0 ? '' : index)"
> >
<el-input <el-input
@ -3366,7 +3374,6 @@
<el-form-item <el-form-item
class="daoqitixingren" class="daoqitixingren"
:prop="`wlsb[${index}].yjbbxx`" :prop="`wlsb[${index}].yjbbxx`"
:label="'硬件版本信息' + (index == 0 ? '' : index)" :label="'硬件版本信息' + (index == 0 ? '' : index)"
> >
<el-input <el-input
@ -5256,6 +5263,11 @@ export default {
loading: false, loading: false,
}; };
}, },
computed: {
pageType() {
return this.$route.query.pageType;
},
},
mounted() { mounted() {
let obj = { let obj = {
taskId: this.$route.query.taskId, taskId: this.$route.query.taskId,
@ -5284,6 +5296,15 @@ export default {
} }
}, },
methods: { methods: {
//
generateFullUrl(url) {
if (!url) return "";
// http(s):// https://
if (!/^https?:\/\//i.test(url)) {
return "https://" + url;
}
return url;
},
addSjzcList() { addSjzcList() {
this.ruleForm.sjzcList.push({ this.ruleForm.sjzcList.push({
sjzcSjkmc: "", sjzcSjkmc: "",

Loading…
Cancel
Save