| 1 |
- {"remainingRequest":"C:\\Users\\Administrator\\Desktop\\crmeb5.0\\template\\admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\Administrator\\Desktop\\crmeb5.0\\template\\admin\\src\\pages\\marketing\\live\\index.vue?vue&type=style&index=0&id=282bd7fc&lang=scss&scoped=true","dependencies":[{"path":"C:\\Users\\Administrator\\Desktop\\crmeb5.0\\template\\admin\\src\\pages\\marketing\\live\\index.vue","mtime":1761185180116},{"path":"C:\\Users\\Administrator\\Desktop\\crmeb5.0\\template\\admin\\node_modules\\css-loader\\index.js","mtime":499162500000},{"path":"C:\\Users\\Administrator\\Desktop\\crmeb5.0\\template\\admin\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":499162500000},{"path":"C:\\Users\\Administrator\\Desktop\\crmeb5.0\\template\\admin\\node_modules\\postcss-loader\\src\\index.js","mtime":499162500000},{"path":"C:\\Users\\Administrator\\Desktop\\crmeb5.0\\template\\admin\\node_modules\\sass-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\Administrator\\Desktop\\crmeb5.0\\template\\admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\Administrator\\Desktop\\crmeb5.0\\template\\admin\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:DQo6OnYtZGVlcCAuZ29vZExpc3QgLml2dS1pbnB1dC1ncm91cCB7DQogIHdpZHRoOiAyMDAlICFpbXBvcnRhbnQ7DQp9DQo="},{"version":3,"sources":["index.vue"],"names":[],"mappings":";AAgVA;AACA;AACA","file":"index.vue","sourceRoot":"src/pages/marketing/live","sourcesContent":["<template>\r\n <div>\r\n <el-card :bordered=\"false\" shadow=\"never\" class=\"ivu-mt\" :body-style=\"{ padding: 0 }\">\r\n <div class=\"padding-add\">\r\n <el-form\r\n ref=\"formValidate\"\r\n :model=\"formValidate\"\r\n :label-width=\"labelWidth\"\r\n label-position=\"right\"\r\n inline\r\n @submit.native.prevent\r\n class=\"tabform\"\r\n >\r\n <el-form-item label=\"直播状态:\">\r\n <el-select v-model=\"formValidate.status\" clearable @change=\"selChange\" class=\"form_content_width\">\r\n <el-option\r\n v-for=\"(item, index) in treeData.withdrawal\"\r\n :value=\"item.value\"\r\n :key=\"index\"\r\n :label=\"item.title\"\r\n ></el-option>\r\n </el-select>\r\n </el-form-item>\r\n <el-form-item label=\"搜索:\">\r\n <el-input\r\n clearable\r\n placeholder=\"请输入直播间名称/ID/主播昵称/微信号\"\r\n v-model=\"formValidate.kerword\"\r\n class=\"form_content_width\"\r\n />\r\n </el-form-item>\r\n <el-form-item>\r\n <el-button type=\"primary\" v-db-click @click=\"selChange\">查询</el-button>\r\n </el-form-item>\r\n </el-form>\r\n </div>\r\n </el-card>\r\n <el-card :bordered=\"false\" shadow=\"never\" class=\"ivu-mt mt16\">\r\n <el-button v-auth=\"['setting-system_menus-add']\" type=\"primary\" v-db-click @click=\"menusAdd('添加直播间')\"\r\n >添加直播间</el-button\r\n >\r\n <el-button v-auth=\"['setting-system_menus-add']\" v-db-click @click=\"syncRoom\" style=\"margin-left: 20px\"\r\n >同步直播间</el-button\r\n >\r\n <el-table\r\n :data=\"tabList\"\r\n ref=\"table\"\r\n class=\"mt14\"\r\n v-loading=\"loading\"\r\n highlight-current-row\r\n no-userFrom-text=\"暂无数据\"\r\n no-filtered-userFrom-text=\"暂无筛选结果\"\r\n >\r\n <el-table-column label=\"直播间ID\" width=\"80\">\r\n <template slot-scope=\"scope\">\r\n <span>{{ scope.row.id }}</span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"直播间名称\" min-width=\"35\">\r\n <template slot-scope=\"scope\">\r\n <span>{{ scope.row.name }}</span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"主播昵称\" min-width=\"35\">\r\n <template slot-scope=\"scope\">\r\n <span>{{ scope.row.anchor_name }}</span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"主播微信号\" min-width=\"35\">\r\n <template slot-scope=\"scope\">\r\n <span>{{ scope.row.anchor_wechat }}</span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"直播开始时间\" min-width=\"35\">\r\n <template slot-scope=\"scope\">\r\n <span>{{ scope.row.start_time }}</span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"计划结束时间\" min-width=\"35\">\r\n <template slot-scope=\"scope\">\r\n <span>{{ scope.row.end_time }}</span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"创建时间\" min-width=\"35\">\r\n <template slot-scope=\"scope\">\r\n <span>{{ scope.row.add_time }}</span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"显示状态\" min-width=\"35\">\r\n <template slot-scope=\"scope\">\r\n <el-switch\r\n class=\"defineSwitch\"\r\n :active-value=\"1\"\r\n :inactive-value=\"0\"\r\n v-model=\"scope.row.is_show\"\r\n :value=\"scope.row.is_show\"\r\n @change=\"onchangeIsShow(scope.row)\"\r\n size=\"large\"\r\n active-text=\"开启\"\r\n inactive-text=\"关闭\"\r\n >\r\n </el-switch>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"直播状态\" min-width=\"35\">\r\n <template slot-scope=\"scope\">\r\n <div>{{ scope.row.live_status | liveReviewStatusFilter }}</div>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"排序\" min-width=\"35\">\r\n <template slot-scope=\"scope\">\r\n <div>{{ scope.row.sort }}</div>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"操作\" fixed=\"right\" width=\"170\">\r\n <template slot-scope=\"scope\">\r\n <a v-db-click @click=\"detail(scope.row, '详情')\">详情</a>\r\n <el-divider direction=\"vertical\"></el-divider>\r\n <a v-db-click @click=\"del(scope.row, '删除这条信息', scope.$index)\">删除</a>\r\n <el-divider direction=\"vertical\" v-if=\"scope.row.live_status == 102\" />\r\n <a v-if=\"scope.row.live_status == 102\" v-db-click @click=\"addGoods(scope.row)\">添加商品</a>\r\n </template>\r\n </el-table-column>\r\n </el-table>\r\n <div class=\"acea-row row-right page\">\r\n <pagination\r\n v-if=\"total\"\r\n :total=\"total\"\r\n :page.sync=\"formValidate.page\"\r\n :limit.sync=\"formValidate.limit\"\r\n @pagination=\"getList\"\r\n />\r\n </div>\r\n </el-card>\r\n <!--详情-->\r\n <el-dialog :visible.sync=\"modals\" title=\"直播间详情\" class=\"paymentFooter\" width=\"720px\">\r\n <details-from ref=\"studioDetail\" />\r\n </el-dialog>\r\n <!-- 添加商品 -->\r\n <el-dialog :visible.sync=\"isShowBox\" title=\"添加商品\" class=\"paymentFooter\" width=\"720px\">\r\n <!-- <addGoods :datas=\"activeItem\" @getData=\"getData\" ref=\"liveAdd\"></addGoods>-->\r\n <goods-list\r\n ref=\"goodslist\"\r\n @getProductId=\"getProductId\"\r\n v-if=\"isShowBox\"\r\n :selectIds=\"selectIds\"\r\n :ischeckbox=\"true\"\r\n :liveStatus=\"true\"\r\n ></goods-list>\r\n </el-dialog>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { mapState } from 'vuex';\r\nimport { liveList, liveShow, liveRoomGoodsAdd, liveSyncRoom } from '@/api/live';\r\nimport detailsFrom from './components/live_detail';\r\nimport addGoods from './components/add_goods';\r\nimport goodsList from '@/components/goodsList';\r\nexport default {\r\n name: 'live',\r\n components: {\r\n detailsFrom,\r\n addGoods,\r\n goodsList,\r\n },\r\n data() {\r\n return {\r\n isShowBox: false,\r\n modals: false,\r\n total: 0,\r\n grid: {\r\n xl: 7,\r\n lg: 7,\r\n md: 12,\r\n sm: 24,\r\n xs: 24,\r\n },\r\n formValidate: {\r\n status: '',\r\n kerword: '',\r\n page: 1,\r\n limit: 20,\r\n },\r\n treeData: {\r\n withdrawal: [\r\n {\r\n title: '全部',\r\n value: '',\r\n },\r\n {\r\n title: '直播中',\r\n value: 1,\r\n },\r\n {\r\n title: '未开始',\r\n value: 2,\r\n },\r\n {\r\n title: '已结束',\r\n value: 3,\r\n },\r\n ],\r\n },\r\n columns1: [\r\n { key: 'id', title: '直播间ID', minWidth: 35 },\r\n { key: 'name', minWidth: 35, title: '直播间名称' },\r\n { key: 'anchor_name', minWidth: 35, title: '主播昵称' },\r\n { key: 'anchor_wechat', minWidth: 35, title: '主播微信号' },\r\n { key: 'start_time', minWidth: 35, title: '直播开始时间' },\r\n { key: 'end_time', minWidth: 35, title: '计划结束时间' },\r\n { key: 'add_time', minWidth: 35, title: '创建时间' },\r\n { slot: 'is_mer_show', title: '显示状态', minWidth: 80 },\r\n { slot: 'status', minWidth: 35, title: '直播状态' },\r\n { key: 'sort', minWidth: 35, title: '排序' },\r\n { slot: 'action', fixed: 'right', title: '操作', minWidth: 120 },\r\n ],\r\n tabList: [],\r\n loading: false,\r\n activeItem: {},\r\n selectIds: [],\r\n };\r\n },\r\n computed: {\r\n ...mapState('media', ['isMobile']),\r\n labelWidth() {\r\n return this.isMobile ? undefined : '80px';\r\n },\r\n labelPosition() {\r\n return this.isMobile ? 'top' : 'right';\r\n },\r\n },\r\n created() {\r\n this.getList();\r\n },\r\n methods: {\r\n // 获取直播列表\r\n getList() {\r\n this.loading = true;\r\n liveList(this.formValidate).then((res) => {\r\n this.total = res.data.count;\r\n this.tabList = res.data.list;\r\n this.loading = false;\r\n });\r\n },\r\n // 选择\r\n selChange() {\r\n this.formValidate.page = 1;\r\n this.getList();\r\n },\r\n // 添加直播间\r\n menusAdd() {\r\n this.$router.push({\r\n path: this.$routeProStr + '/marketing/live/add_live_room',\r\n });\r\n },\r\n // 直播间显示隐藏\r\n onchangeIsShow({ id, is_show }) {\r\n liveShow(id, is_show)\r\n .then((res) => {\r\n this.$message.success(res.msg);\r\n })\r\n .catch((error) => {\r\n this.$message.error(error.msg);\r\n });\r\n },\r\n // 详情\r\n detail(row) {\r\n this.modals = true;\r\n this.$refs.studioDetail.getData(row.id);\r\n },\r\n // 直播间添加商品\r\n addGoods(row) {\r\n this.selectIds = row.product_ids;\r\n this.activeItem = row;\r\n this.isShowBox = true;\r\n },\r\n getData(data) {\r\n liveRoomGoodsAdd({\r\n room_id: this.activeItem.id,\r\n goods_ids: data,\r\n })\r\n .then((res) => {\r\n this.$message.success(res.msg);\r\n this.isShowBox = false;\r\n this.$refs.liveAdd.goodsList = [];\r\n })\r\n .catch((error) => {\r\n this.$message.error(error.msg);\r\n this.isShowBox = false;\r\n this.$refs.liveAdd.goodsList = [];\r\n });\r\n },\r\n // 同步直播间\r\n syncRoom() {\r\n liveSyncRoom()\r\n .then((res) => {\r\n this.$message.success(res.msg);\r\n this.getList();\r\n })\r\n .catch((error) => {\r\n this.$message.error(error.msg);\r\n });\r\n },\r\n // 删除\r\n del(row, tit, num) {\r\n let delfromData = {\r\n title: tit,\r\n num: num,\r\n url: `live/room/del/${row.id}`,\r\n method: 'DELETE',\r\n ids: '',\r\n };\r\n this.$modalSure(delfromData)\r\n .then((res) => {\r\n this.$message.success(res.msg);\r\n this.tabList.splice(num, 1);\r\n\r\n this.getList();\r\n })\r\n .catch((res) => {\r\n this.$message.error(res.msg);\r\n });\r\n },\r\n getProductId(data) {\r\n let arr = [];\r\n data.map((el) => {\r\n arr.push(el.product_id);\r\n });\r\n this.getData(arr);\r\n },\r\n },\r\n};\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n::v-deep .goodList .ivu-input-group {\r\n width: 200% !important;\r\n}\r\n</style>\r\n"]}]}
|