1
This commit is contained in:
@@ -258,9 +258,10 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<el-table-column label="操作" align="center" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-info" @click.stop="showChildDetail(scope.row)">详情</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-s-promotion" @click.stop="openPublishFromXb(scope.row)">发品</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -271,15 +272,20 @@
|
||||
<el-button @click="messageDetailVisible = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 公共发品对话框组件复用 -->
|
||||
<PublishDialog :visible.sync="publishDialogVisible" :initial-data="publishInitialData" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listXbmessage, delXbmessage, getGroupNameOptions } from "@/api/system/xbmessage";
|
||||
import { parseTime } from "@/utils/ruoyi";
|
||||
import PublishDialog from '@/components/PublishDialog.vue'
|
||||
|
||||
export default {
|
||||
name: "Xbmessage",
|
||||
components: { PublishDialog },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
@@ -311,7 +317,9 @@ export default {
|
||||
// 统计数据
|
||||
statistics: null,
|
||||
// 群名称选项
|
||||
groupNameOptions: []
|
||||
groupNameOptions: [],
|
||||
publishDialogVisible: false,
|
||||
publishInitialData: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -319,6 +327,18 @@ export default {
|
||||
this.getGroupNameOptions();
|
||||
},
|
||||
methods: {
|
||||
openPublishFromXb(child) {
|
||||
const parsedQuery = this.safeJsonParse(child.jsonQueryResult);
|
||||
const images = (parsedQuery && parsedQuery.images && Array.isArray(parsedQuery.images)) ? parsedQuery.images : [];
|
||||
this.publishInitialData = {
|
||||
title: this.decodeUnicode(child.skuName) || '',
|
||||
content: '',
|
||||
images: images,
|
||||
originalPrice: parsedQuery && parsedQuery.priceInfo ? Number(parsedQuery.priceInfo.price || parsedQuery.priceInfo.lowestCouponPrice || 0) : null,
|
||||
wenanOptions: []
|
||||
};
|
||||
this.publishDialogVisible = true;
|
||||
},
|
||||
/** 查询消息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
||||
Reference in New Issue
Block a user