Commit 06f5a3f5 authored by wcmoon's avatar wcmoon

fix: 空图片数组回显问题

parent d2cefc9c
...@@ -55,6 +55,9 @@ export default { ...@@ -55,6 +55,9 @@ export default {
CommonDialog, CommonDialog,
}, },
mounted() { mounted() {
if (Array.isArray(this.property.value)) {
this.property.value = this.property.value.filter(item => item.value !== '');
}
if (this.property.value.length > 0) { if (this.property.value.length > 0) {
let hashes = []; let hashes = [];
for (let index = 0; index < this.property.value.length; index++) { for (let index = 0; index < this.property.value.length; index++) {
......
...@@ -46,6 +46,9 @@ export default { ...@@ -46,6 +46,9 @@ export default {
// 初始化标题 // 初始化标题
this.label = this.property.label; this.label = this.property.label;
// 数据回显 // 数据回显
if (Array.isArray(this.property.value)) {
this.property.value = this.property.value.filter(item => item.value !== '');
}
if (this.property.value.length > 0) { if (this.property.value.length > 0) {
this.pdfSHOW = true; this.pdfSHOW = true;
let hashes = []; let hashes = [];
......
...@@ -78,6 +78,9 @@ export default { ...@@ -78,6 +78,9 @@ export default {
}, },
created() { created() {
// 数据回显 // 数据回显
if (Array.isArray(this.property.value)) {
this.property.value = this.property.value.filter(item => item.value !== '');
}
if (this.property.value.length > 0 && this.isFlag) { if (this.property.value.length > 0 && this.isFlag) {
this.isFlag = false; this.isFlag = false;
let hashes = []; let hashes = [];
......
const configModules = { const configModules = {
// 溯源>测试环境 // 溯源>测试环境
"sy_test": { "sy_test": {
CHAIN_BROWSER_URL_PREFIX: 'http://47.114.159.142:8995/', CHAIN_BROWSER_URL_PREFIX: 'http://121.40.18.70:8995/',
INERFACE_URL_PREFIX: 'http://172.16.101.87:46789', INERFACE_URL_PREFIX: 'http://172.16.101.87:46789',
/** /**
* 网站入口配置 * 网站入口配置
...@@ -21,7 +21,7 @@ const configModules = { ...@@ -21,7 +21,7 @@ const configModules = {
// INERFACE_URL_PREFIX: 'https://sy.chain33.pro/api', // INERFACE_URL_PREFIX: 'https://sy.chain33.pro/api',
// CHAIN_BROWSER_URL_PREFIX: 'http://172.16.101.87:8995/', // CHAIN_BROWSER_URL_PREFIX: 'http://172.16.101.87:8995/',
// INERFACE_URL_PREFIX: 'http://172.16.101.87:8994/', // INERFACE_URL_PREFIX: 'http://172.16.101.87:8994/',
CHAIN_BROWSER_URL_PREFIX: 'http://47.114.159.142:8995/', CHAIN_BROWSER_URL_PREFIX: 'http://121.40.18.70:8995/',
INERFACE_URL_PREFIX: 'http://172.16.101.87:46789', INERFACE_URL_PREFIX: 'http://172.16.101.87:46789',
INDEX: { INDEX: {
entry: './src/entry/sy/main.ts', entry: './src/entry/sy/main.ts',
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
v-for="(item3, index3) in item2.data" v-for="(item3, index3) in item2.data"
:key="index3" :key="index3"
> >
<img :src="item3.value" /> <img :src="item3.value"/>
<div class="ibox" @click="displayPicture(item3.value)"> <div class="ibox" @click="displayPicture(item3.value)">
<i class="iconfont iconfangda"></i> <i class="iconfont iconfangda"></i>
</div> </div>
...@@ -91,9 +91,10 @@ ...@@ -91,9 +91,10 @@
<!-- 图片链接 --> <!-- 图片链接 -->
<div class="info-content" v-if="item2.type === 13"> <div class="info-content" v-if="item2.type === 13">
<div <div
v-if="item2.data.value"
class="imgbox" class="imgbox"
> >
<img :src="item2.data.value" /> <img :src="item2.data.value" />
<div class="ibox" @click="displayPicture(item2.data.value)"> <div class="ibox" @click="displayPicture(item2.data.value)">
<i class="iconfont iconfangda"></i> <i class="iconfont iconfangda"></i>
</div> </div>
...@@ -207,6 +208,9 @@ export default { ...@@ -207,6 +208,9 @@ export default {
this.replacementData(element.data); this.replacementData(element.data);
} else if (element.type === 1) { } else if (element.type === 1) {
// 图片 // 图片
if (Array.isArray(element.data)) {
element.data = element.data.filter(item => item.value !== '');
}
for (let index2 = 0; index2 < element.data.length; index2++) { for (let index2 = 0; index2 < element.data.length; index2++) {
const img = element.data[index2].value; const img = element.data[index2].value;
element.data[index2].value = await this.requestPictures(img); element.data[index2].value = await this.requestPictures(img);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment