Commit 9d2f2513 by huaying

fix: 欢迎语附件

parent 4a48086c
......@@ -230,7 +230,7 @@ export default {
{
text: '编辑',
visible: row => {
if (row.hmType == 1 && row.statusFlag != 2) {
if (row.hmType == 2 || row.statusFlag != 2) {
return true;
} else {
return false;
......
......@@ -83,7 +83,9 @@ export default {
clerkIdList: [],
hmUserNum: null //多人活码人数
};
this.$router.go(-1);
setTimeout(() => {
this.$router.go(-1);
}, 1000);
} else {
return this.$message.error(res.data.message);
}
......
......@@ -88,6 +88,10 @@ export default {
this.data = this.detailCode.clerkList;
if (this.form.hmType == 1) {
this.clerkDisabled = true;
this.multiple = false;
} else if (this.form.hmType == 2) {
this.multiple = true;
this.clerkDisabled = false;
}
that.loading = false;
});
......@@ -112,7 +116,9 @@ export default {
clerkIdList: [],
hmUserNum: null //多人活码人数
};
this.$router.go(-1);
setTimeout(() => {
this.$router.go(-1);
}, 1000);
} else {
return this.$message.error(res.data.message);
}
......@@ -127,7 +133,9 @@ export default {
clerkIdList: [],
hmUserNum: null //多人活码人数
};
this.$router.go(-1);
setTimeout(() => {
this.$router.go(-1);
}, 1000);
} else {
return this.$message.error(res.data.message);
}
......
......@@ -40,6 +40,19 @@
<el-table-column prop="welcomeContent" label="内容" show-overflow-tooltip></el-table-column>
<el-table-column label="附件" width="212px" show-overflow-tooltip>
<template slot-scope="{ row }">
<el-popover placement="top-start" trigger="hover" v-if="row.welcomeMediaList && row.welcomeMediaList.length">
<div class="flexBox" v-for="item in row.welcomeMediaList" :key="item.welcomeMediaId">
<svg-icon :iconname="iconType[item.mediaType]" size="16" style="margin-right: 13px;"> </svg-icon>
<span class="popverText">{{ item.mediaTitle }}</span>
</div>
<div slot="reference" class="flexBox" v-if="row.welcomeMediaList && row.welcomeMediaList.length">
<svg-icon :iconname="iconType[row.welcomeMediaList[0].mediaType]" size="40" style="margin-right: 10px;"> </svg-icon>
<span class="wrapText"> {{ row.welcomeMediaList[0].mediaTitle }}</span>
</div>
</el-popover>
<div v-else>--</div>
</template>
<!-- <template slot-scope="{ row }">
<div class="enclosureBox" v-for="item in row.welcomeMediaList" :key="item.welcomeId">
<el-image class="img" :src="item.mediaUrl">
<div slot="error" class="image-slot img">
......@@ -48,7 +61,7 @@
</el-image>
<p>{{ item.mediaTitle ? item.mediaTitle : '--' }}</p>
</div>
</template>
</template> -->
</el-table-column>
</el-table>
<el-pagination class="paginationBox" background @current-change="handleCurrentChange" :current-page="welcomePage.pageNum" layout=" prev, pager, next " :page-size="welcomePage.pageSize" :total="totalNum"></el-pagination>
......@@ -82,6 +95,15 @@ export default {
},
data() {
return {
iconType: {
1: 'iconwenjianleixingtupian',
2: 'iconwenjianleixingshipin',
3: 'iconwenjianleixing-wenjian',
4: 'iconwenjianleixing-lianjie',
5: 'iconwenjianleixing-xiaochengxu', // 小程序
6: 'iconwenjianleixing-xiaochengxu', // 带参小程序
7: 'icongongzhonghao1' // 带参公众号
},
welcomTypeFlag: true,
welcomesType: 1,
welcomeTableData: [],
......@@ -93,7 +115,7 @@ export default {
title: '',
type: 2,
pageNum: 1,
pageSize: 4
pageSize: 20
},
totalNum: 1,
welcomeId: '',
......@@ -169,8 +191,8 @@ export default {
// 获取选中数据 row表示选中这一行的数据,可以从里面提取所需要的值
this.templateSelection = row;
this.welcomeContent = row.welcomeContent;
this.welcomeId = row.welcomeId;
this.$emit('getWelcomeId', this.welcomeId);
// this.welcomeId = row.welcomeId;
// this.$emit('getWelcomeId', this.welcomeId);
},
// 单选框点击事件
radioChange(e) {
......@@ -181,8 +203,10 @@ export default {
}
},
submit() {
if (this.welcomesType == 2) return true;
if (!this.welcomeId) {
if (this.welcomesType == 2) this.welcomeId = '';
// if (this.welcomeType == 2) ;
this.$emit('getWelcomeId', this.welcomeId);
if (this.welcomesType == 1 && !this.welcomeId) {
this.$message.error('请选择欢迎语');
return false;
} else {
......@@ -208,6 +232,16 @@ export default {
},
immediate: true,
deep: true
},
welcomesType: {
handler: function(val) {
console.log(val, '909090hjhj');
if (val == 2) {
this.welcomeId = '';
}
},
immediate: true,
deep: true
}
}
};
......@@ -286,5 +320,27 @@ export default {
text-overflow: ellipsis;
}
}
.flexBox {
display: flex;
justify-content: flex-start;
align-items: center;
.popverText {
font-size: 12px;
width: 90%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.flexBox + .flexBox {
margin-top: 10px;
}
.popoverBox {
max-height: 300px;
overflow-y: auto;
max-width: 500px;
line-height: 28px;
}
}
</style>
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