|
@@ -77,7 +77,12 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { getMarketReportList, updateVisible, deleteMarketReport } from '@/api/user/customer/customer'
|
|
|
|
|
|
+import {
|
|
|
|
+ getMarketReportList,
|
|
|
|
+ updateVisible,
|
|
|
|
+ deleteMarketReport,
|
|
|
|
+ getMarketPreviewCode
|
|
|
|
+} from '@/api/user/customer/customer'
|
|
import ShareDialog from './components/share-dialog'
|
|
import ShareDialog from './components/share-dialog'
|
|
import { downloadWithUrl } from '@/utils'
|
|
import { downloadWithUrl } from '@/utils'
|
|
export default {
|
|
export default {
|
|
@@ -170,11 +175,21 @@ export default {
|
|
},
|
|
},
|
|
// 跳转预览
|
|
// 跳转预览
|
|
handlePreview(row) {
|
|
handlePreview(row) {
|
|
- const urls = `${process.env.VUE_APP_CAIMEI_URL}/charts-preview.html?type=1&shopId=${row.shopId}&marketReportId=${row.id}`
|
|
|
|
- this.shareCode = 4567
|
|
|
|
- this.shareLink = urls
|
|
|
|
- this.shareInfo = row
|
|
|
|
- this.dialogVisible = true
|
|
|
|
|
|
+ this.getMarketPreviewCode(row, { id: row.id })
|
|
|
|
+ },
|
|
|
|
+ // 调用生成预览码
|
|
|
|
+ async getMarketPreviewCode(row, params) {
|
|
|
|
+ try {
|
|
|
|
+ const res = await getMarketPreviewCode(params)
|
|
|
|
+ const data = res.data
|
|
|
|
+ this.shareCode = data.code
|
|
|
|
+ this.shareLink = `${process.env.VUE_APP_CAIMEI_URL}/charts-preview.html?type=1&shareType=share&shopId=${row.shopId}&marketReportId=${row.id}`
|
|
|
|
+ this.shareDirectLink = `${process.env.VUE_APP_CAIMEI_URL}/charts-preview.html?type=3&shopId=${row.shopId}&marketReportId=${row.id}`
|
|
|
|
+ this.shareInfo = row
|
|
|
|
+ this.dialogVisible = true
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log(error)
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 取消预览
|
|
// 取消预览
|
|
handleCancel() {
|
|
handleCancel() {
|