Commit 0b65589c by 前端

Merge branch 'xuyl_dev_v3.3.0' into 'v3.3.0'

修复bug

See merge request !6
2 parents f06a0b0a a8ba06c7
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-11-24 16:20:21
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-11-29 10:23:34
* @FilePath: \live\src\api\modules\console.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { http } from '@/main'
//基本信息
const consoleBasic = params => {
params.method = `scrm.api.shopmall.livebroadcast.console.basic`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//流量数据-详情列表导出
const detailexport = params => {
params.method = `scrm.api.shopmall.livebroadcast.console.detailexport`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//流量数据-详情列表导出
const consoleExport = params => {
params.method = `scrm.api.shopmall.livebroadcast.console.export`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//流量数据-详情列表查询(分页)
const detailpage = params => {
params.method = `scrm.api.shopmall.livebroadcast.console.detailpage`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//直播间信息
const consoleInfo = params => {
params.method = `scrm.api.shopmall.livebroadcast.console.info`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//分页查询流量数据列表
const consolePage = params => {
params.method = `scrm.api.shopmall.livebroadcast.console.page`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
consoleBasic,
consolePage,
consoleInfo,
detailpage,
detailexport,
consoleExport
}
import { http } from '@/main'
const defaultPath = 'scrm.api.shopmall.livebroadcast.'
const getListApi = params => {
params.method = `${defaultPath}page`
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
/**新增或编辑直播间 */
const addOrUpdataLiveRoomApi = params => {
params.method = `${defaultPath}add.or.update`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
/** 直播间详情 */
const LiveRoomDetailApi = params => {
params.method = `${defaultPath}detail`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
})
}
// 删除直播间
const deleteLiveRoomApi = params => {
params.method = `${defaultPath}delete`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getListApi, addOrUpdataLiveRoomApi, LiveRoomDetailApi,deleteLiveRoomApi }
import { http, http_merchant } from '@/main'
import { http, http_merchant,http3 } from '@/main'
const defaultPath = 'marketing.api.material.'
......@@ -170,9 +170,9 @@ const findAllDictData = params => {
})
}
const getStoreList = params => {
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.create.merchant'
return http({
url:'rop-scrm-entmicro/router',
params.method = 'merchants.api.open.findMerchantListByPage'
return http3({
url:'rop-merchants/router',
method: 'POST',
data: params,
sign: true
......
import { http } from '@/main'
//分页查询媒体文件列表
const dropdownList = params => {
params.method = `scrm.api.shopmall.tencentcloudmedia.dropdown.list`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//删除媒体文件
const tencentcloudmediaDelete = params => {
params.method = `scrm.api.shopmall.tencentcloudmedia.delete`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//新增或编辑媒体文件
const tencentcloudmediaUpdate = params => {
params.method = `scrm.api.shopmall.tencentcloudmedia.add.or.update`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//媒体文件详情
const tencentcloudmediaDetail = params => {
params.method = `scrm.api.shopmall.tencentcloudmedia.detail`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//分页查询媒体文件列表
const tencentcloudmediaPage = params => {
params.method = `scrm.api.shopmall.tencentcloudmedia.page`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
dropdownList,
tencentcloudmediaPage,
tencentcloudmediaDetail,
tencentcloudmediaUpdate,
tencentcloudmediaDelete
}
......@@ -21,4 +21,5 @@ start()
export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params)
export const http2 = params => Vue.prototype.$http2(params)
export const http3 = params => Vue.prototype.$http3(params)
export const http_common = params => Vue.prototype.$http_common(params)
......@@ -20,7 +20,7 @@ let instance = null
Vue.use(ElementUI)
Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState }) {
const { response, request,request2, sign, secret, sign_common, request_common } = await fetchConfig()
const { response, request,request2,request3,sign, secret, sign_common, request_common } = await fetchConfig()
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
......@@ -29,6 +29,7 @@ export async function bootstrap({ history, common, messenger, globalState }) {
Vue.prototype.$messageBox = messageBox
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http3 = new common.Http({ response, request: request3, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
......
......@@ -7,10 +7,12 @@
<el-divider></el-divider>
<div class="m-l-20">
<el-form-item label="选择门店:" prop="targetMerchantId">
<el-select v-model="materialAddForm.targetMerchantId" :disabled="notDisplayProperties" ref="selectLabel" clearable filterable :size="size"
placeholder="请选择门店">
<el-option v-for="(item, i) in dataItems" :key="i" :label="item.msgMerchantName"
:value="item.msgMerchantId + ''"></el-option>
<el-select remote :remote-method="remoteMethod" v-el-select-loadmore="loadmore"
v-model="materialAddForm.targetMerchantId" :disabled="notDisplayProperties" ref="selectLabel"
clearable filterable :size="size"
placeholder="请选择门店" @change="selectChange" @clear="clearDrop">
<el-option v-for="(item, i) in dataItems" :key="i" :label="item.merchantName"
:value="item.merchantNo + ''"></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="!notDisplayProperties" label="选择素材组:" prop="groupId">
......@@ -32,7 +34,7 @@
</el-form-item>
<el-form-item label="素材类型:" prop="materialType">
<el-radio-group v-model="materialAddForm.materialType" @change="radioChange"
:disabled="notDisplayProperties">
:disabled="routeInfo.addOrEdit != 1">
<el-radio :label="1">PDF文件</el-radio>
<!-- <el-radio :label="2">自定义链接</el-radio> -->
<el-radio :label="3">图文</el-radio>
......@@ -46,7 +48,6 @@
:disabled="notDisplayProperties">选择文件
</el-button>
</div>
<!-- <div v-if="pdfUrl">{{ pdfUrl }}</div> -->
<ul v-if="pdfName || materialAddForm.materialUrl">
<li class="pdf-show">
<span class="pdf-name" @click="openPdfDia">{{ pdfName || materialAddForm.materialUrl }}</span>
......@@ -54,14 +55,6 @@
</li>
</ul>
</div>
<!-- 选择自定义链接 -->
<!-- <div v-show="materialAddForm.materialType == 2">
<el-form :model="linkForm" :rules="linkRules" ref="linkForm" label-width="100px">
<el-form-item label="链接地址" prop="link">
<el-input v-model="linkForm.link" placeholder="请填写跳转链接" maxlength="150" show-word-limit></el-input>
</el-form-item>
</el-form>
</div> -->
<!-- 选择图文 -->
<div v-show="materialAddForm.materialType == 3">
<textBox @change="writeChange" ref="textBox" @forbid="forbidEdit"></textBox>
......@@ -96,8 +89,8 @@
<el-form-item label="视频:" class="photoWrap">
<div class="img-div">
<div class="put-img" v-if="materialAddForm.videoUrl">
<video id="video" width="100%" height="100%" preload loop muted>
<source :src="materialAddForm.videoUrl" type="video/mp4"/>
<video :src="materialAddForm.videoUrl" id="video" width="100%" height="100%" preload loop muted>
<!-- <source type="video/mp4"/>-->
</video>
<div class="mask">
<h3>
......@@ -227,14 +220,13 @@
<GLFooter class="gl-footer">
<el-button @click="onSave" v-if="this.routeInfo.addOrEdit == 1">存草稿</el-button>
<el-button @click="handleCancel" class="btn-cancle">取消</el-button>
<el-button @click="handleSubmit" type="primary">确定</el-button>
<el-button @click="handleSubmit" v-if="this.routeInfo.addOrEdit !== 3" type="primary">确定</el-button>
</GLFooter>
<el-dialog class="image-dialog" :visible.sync="dialogVisibleImg" width="30%">
<big-view ref="viewForm" v-if="dialogVisibleImg" :dialogSrc="dialogSrc" :dialogType="dialogType"></big-view>
</el-dialog>
</div>
</template>
<script>
import textBox from '@/views/material/components/textBox'
import SelectLabel from '@/views/material/components/selectLable'
......@@ -272,6 +264,12 @@ export default {
pdfName: '',
dialogPdfVisible: false,
textBoxContent: '',
pageData: {
pageSize: 40,
pageNum: 1,
channelType: 1,
merchantAccountLevel: [4]
},
materialAddForm: {
groupId: '', // 素材组id
groupName: '',
......@@ -319,19 +317,88 @@ export default {
this.title = this.titleObj[this.routeInfo.addOrEdit]
this.notDisplayProperties = this.routeInfo.addOrEdit == 3
this.materialInsert()
this.getMaterialList()
this.getListEntBusinessType()
this.loadUpData()
this.loadUpData(this.pageData, '')
},
directives: {
/** 下拉框懒加载 */
'el-select-loadmore': {
bind(el, binding) {
const SELECTWRAP_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap')
SELECTWRAP_DOM.addEventListener('scroll', function () {
const condition = this.scrollHeight - this.scrollTop <= this.clientHeight
if (condition) {
binding.value()
}
})
}
}
},
methods: {
async loadUpData() {
const params = {
// 获取全部素材组
getMaterialList(params) {
this.$apis.material.getMaterialList(params).then(res => {
this.groupCounter = res
})
},
selectChange(val) {
let params = {merchant: val}
this.materialAddForm.groupId = ''
this.getMaterialList(params)
},
clearDrop() {
this.pageData = {
pageNum: 1,
pageSize: 10000
pageSize: 40
}
this.searchContentStorage = ''
this.dataItems = []
this.loadUpData(this.pageData, '')
},
loadmore() {
this.pageData.pageNum++
let acquireCount = this.pageData.pageNum * this.pageData.pageSize
if (acquireCount - this.totalNum >= this.pageData.pageSize) {
return
}
if (this.searchContentStorage) {
this.loadUpData(this.pageData, this.searchContentStorage)
} else {
this.loadUpData(this.pageData, '') //类似于分页查询
}
},
async loadUpData(pageData, searchVal) {
let params = {
...pageData,
merchantName: searchVal
}
await this.$apis.material.getStoreList(params).then(res => {
this.dataItems = res || []
this.totalNum = res.count
this.arrBack = res.data
})
this.dataItems = [...this.dataItems, ...this.arrBack]
},
async remoteMethod(searchValue) {
if (searchValue !== '') {
this.searchContentStorage = searchValue
;(this.pageData = {
pageNum: 1,
pageSize: 40
}),
(this.dataItems = [])
this.timer = setTimeout(() => {
this.loadUpData(this.pageData, searchValue)
}, 300)
} else {
this.dataItems = []
this.loadUpData(
{
pageNum: 1,
pageSize: 40
},
''
)
}
},
viewVideo() {
this.dialogVisibleImg = true
......@@ -359,7 +426,7 @@ export default {
}
},
getParams() {
var params = JSON.parse(JSON.stringify(this.materialAddForm))
let params = JSON.parse(JSON.stringify(this.materialAddForm))
let tagging = this.tagging.map(item => {
let tagIds = item.labelList.map(tag => {
return tag.id
......@@ -400,6 +467,8 @@ export default {
if (videoHtml && videoHtml.length && !imgHtml && !html.length) params.materialType = 4
if (!imgHtml && !videoHtml) params.materialType = 5
if (imgHtml && imgHtml.length && !videoHtml && !html.length) params.materialType = 6
if (this.materialAddForm.vedioUrl && !this.materialAddForm.imageUrlList.length) params.materialType = 4
if (this.materialAddForm.imageUrlList.length) params.materialType = 3
this.textBoxContent = encodeURIComponent(this.textBoxContent)
params.materialUrl = this.textBoxContent
}
......@@ -416,6 +485,7 @@ export default {
await this.$apis.material.materialDetail(params).then(res => {
this.materialAddForm = res
this.materialAddForm.targetMerchantId = res.merchantId + '' || ''
this.getMaterialList({merchant:res.merchantId})
if (res.businessType) {
const businessTypeArr = this.materialAddForm.businessType.split(',')
this.materialAddForm.businessType = businessTypeArr.map(item => parseInt(item))
......@@ -455,12 +525,6 @@ export default {
}
})
},
// 获取全部素材组
getMaterialList() {
this.$apis.material.getMaterialList({}).then(res => {
this.groupCounter = res
})
},
// 创建素材组
materialInsert() {
var params = {}
......@@ -554,8 +618,7 @@ export default {
})
}
},
handleUploadChange(e, params,typeName,limitSize) {
handleUploadChange(e, params, typeName, limitSize) {
var file = e.srcElement.files[0]
var reader = new FileReader()
const isLt = file.size / 1024 / 1024 < limitSize
......@@ -677,7 +740,6 @@ export default {
forbidEdit() {
this.$refs.textBox.forbidEdit()
},
handleSelect(val) {
this.isUpdate = true
this.tagging = val
......@@ -715,7 +777,6 @@ export default {
}
}
</script>
<style lang="scss" scoped>
.disableUpload {
cursor: not-allowed;
......
<template>
<div class="main-container">
<div class="top">
<el-button type="primary" @click="addMaterial(1)" :size="size">
<el-button type="primary" @click="addMaterial(1)" :size="size">
<i class="el-icon-plus"></i>
创建营销素材
</el-button>
<!-- <GLButton :size="size" type="primary" fn="新增营销素材" class="el-icon-plus" @click="addMaterial(1)">创建营销素材</GLButton>-->
<!-- <GLButton :size="size" type="primary" fn="新增营销素材" class="el-icon-plus" @click="addMaterial(1)">创建营销素材</GLButton>-->
</div>
<span @click="showIntroductionDialog" class="introduc-word">
功能介绍
......@@ -13,86 +13,89 @@
</span>
<div class="container">
<div class="search-form">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="materialFormData" @handleOk="getListApi" @handleRest="handleReset"></GLCombiForm>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="materialFormData"
@handleOk="getListApi" @handleRest="handleReset"></GLCombiForm>
</div>
<div class="tabelList">
<el-row>
<el-col :span="5">
<div class="left">
<MaterialGroup ref="materialGroup" @openAddDialog="addDialogShow" :groupHeight="boxHeight" :eventBus="eventBus" @getList="getList" @getListApi="getListApi"></MaterialGroup>
</div>
</el-col>
<el-col :span="19">
<div class="right" :style="{ height: boxHeight + 'px' }">
<div class="groupTitle">{{ materialGroupName }}(共{{ tableTotal }}条数据)</div>
<GLTable ref="materialRef" :hasPage="false" :noDataImg="url" @refreshTable="getListApi" :layout="layout" :searchForm="searchForm" :tableParams="tableParams" :tableData="materialTableData" :pageConf="pageConf" :tableTotal="tableTotal" @sortChange="sortChange" :isCustomHead="true" :customHeadShowList="customHeadShowList">
<!-- 素材内容 -->
<div slot="materialContentRpcResponse" slot-scope="scope" style="text-align: center">
<!-- 素材为PDF -->
<span v-if="scope.scope.materialType == 1" class="material-content">
<img src="@/assets/material/pdf.png" style="margin-right:8px" alt="" />
<el-tooltip effect="dark" placement="top" :content="scope.scope.materialContentRpcResponse.materialName" :disabled="scope.scope.materialContentRpcResponse.materialName.length < 12">
<div class="right" :style="{ height: boxHeight + 'px' }">
<div class="groupTitle">{{ materialGroupName }}(共{{ tableTotal }}条数据)</div>
<GLTable ref="materialRef" :hasPage="false" :noDataImg="url" @refreshTable="getListApi" :layout="layout"
:searchForm="searchForm" :tableParams="tableParams" :tableData="materialTableData"
:pageConf="pageConf" :tableTotal="tableTotal" @sortChange="sortChange" :isCustomHead="true"
:customHeadShowList="customHeadShowList">
<!-- 素材内容 -->
<div slot="materialContentRpcResponse" slot-scope="scope" style="text-align: center">
<!-- 素材为PDF -->
<span v-if="scope.scope.materialType == 1" class="material-content">
<img src="@/assets/material/pdf.png" style="margin-right:8px" alt=""/>
<el-tooltip effect="dark" placement="top"
:content="scope.scope.materialContentRpcResponse.materialName"
:disabled="scope.scope.materialContentRpcResponse.materialName.length < 12">
<span class="hide-content">{{ scope.scope.materialContentRpcResponse.materialName }}</span>
</el-tooltip>
</span>
<!-- 素材为自定义链接 -->
<span v-if="scope.scope.materialType == 2"></span>
<!-- 素材为图文 -->
<span v-if="scope.scope.materialType == 3 || scope.scope.materialType == 4 || scope.scope.materialType == 5 || scope.scope.materialType == 6" class="material-content">
<!-- 素材为自定义链接 -->
<span v-if="scope.scope.materialType == 2"></span>
<!-- 素材为图文 -->
<span
v-if="scope.scope.materialType == 3 || scope.scope.materialType == 4 || scope.scope.materialType == 5 || scope.scope.materialType == 6"
class="material-content">
<!-- 图片 -->
<el-popover placement="top" trigger="hover" v-if="scope.scope.urlType == 'img'">
<div>
<img class="img-plus" :src="scope.scope.materialContentRpcResponse.materialUrl" alt="" />
<img class="img-plus" :src="scope.scope.materialContentRpcResponse.materialUrl" alt=""/>
</div>
<div slot="reference" class="urlContent">
<img style="margin-right:8px" :src="scope.scope.materialContentRpcResponse.materialUrl" alt="" />
<img style="margin-right:8px" :src="scope.scope.materialContentRpcResponse.materialUrl" alt=""/>
<div class="videoMask" v-if="scope.scope.imgCount > 1">
<img src="@/assets/material/multi.png" alt="" />
<img src="@/assets/material/multi.png" alt=""/>
<span>{{ scope.scope.imgCount }}</span>
</div>
</div>
</el-popover>
<!-- 视频 -->
<!-- 视频 -->
<div class="urlContent" v-if="scope.scope.urlType == 'video'" @click="videoOpen(scope.scope)">
<video preload loop muted width="36" height="36">
<source :src="scope.scope.materialContentRpcResponse.materialUrl" type="video/mp4" />
<source :src="scope.scope.materialContentRpcResponse.materialUrl" type="video/mp4"/>
</video>
<div class="videoMask">
<img src="@/assets/material/videoIcon.png" style="width: 22px;height: 22px;" alt="" />
<img src="@/assets/material/videoIcon.png" style="width: 22px;height: 22px;" alt=""/>
</div>
</div>
<el-tooltip effect="dark" placement="top" :content="scope.scope.materialContentRpcResponse.materialName" :disabled="scope.scope.materialContentRpcResponse.materialName.length < 14">
<el-tooltip effect="dark" placement="top"
:content="scope.scope.materialContentRpcResponse.materialName"
:disabled="scope.scope.materialContentRpcResponse.materialName.length < 14">
<span class="hide-content">{{ scope.scope.materialContentRpcResponse.materialName }}</span>
</el-tooltip>
</span>
</div>
<!-- 状态 -->
<div slot="status" class="dot" slot-scope="scope">
<div :class="materialStatus[scope.scope.status]"></div>
<span v-if="scope.scope.status == 0">启用</span>
<span v-if="scope.scope.status == -1">停用</span>
<span v-if="scope.scope.status == 1">草稿</span>
</div>
<!-- 类型 -->
<div slot="materialType" slot-scope="scope">
<span v-if="scope.scope.materialType == 1">pdf文件</span>
<span v-if="scope.scope.materialType == 2">自定义链接</span>
<span v-if="scope.scope.materialType == 3">图文</span>
<span v-if="scope.scope.materialType == 4">视频</span>
<span v-if="scope.scope.materialType == 5">纯文字</span>
<span v-if="scope.scope.materialType == 6">纯图片</span>
</div>
<span slot="auth-button" slot-scope="scope">
</div>
<!-- 状态 -->
<div slot="status" class="dot" slot-scope="scope">
<div :class="materialStatus[scope.scope.status]"></div>
<span v-if="scope.scope.status == 0">启用</span>
<span v-if="scope.scope.status == -1">停用</span>
<span v-if="scope.scope.status == 1">草稿</span>
</div>
<!-- 类型 -->
<div slot="materialType" slot-scope="scope">
<span v-if="scope.scope.materialType == 1">pdf文件</span>
<span v-if="scope.scope.materialType == 2">自定义链接</span>
<span v-if="scope.scope.materialType == 3">图文</span>
<span v-if="scope.scope.materialType == 4">视频</span>
<span v-if="scope.scope.materialType == 5">纯文字</span>
<span v-if="scope.scope.materialType == 6">纯图片</span>
</div>
<span slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</span>
</GLTable>
</div>
</el-col>
</el-row>
</GLTable>
</div>
</div>
</div>
<AddMaterialGroupDia :businessTypes="businessTypes" ref="addMaterialGroup" :dialogVisible="materialGroupDialog" :eventBus="eventBus"></AddMaterialGroupDia>
<FunctionIntroduc :introductionDialog="introductionDialog" @closeIntroductDia="closeIntroductDia"></FunctionIntroduc>
<AddMaterialGroupDia :businessTypes="businessTypes" ref="addMaterialGroup" :dialogVisible="materialGroupDialog"
:eventBus="eventBus"></AddMaterialGroupDia>
<FunctionIntroduc :introductionDialog="introductionDialog"
@closeIntroductDia="closeIntroductDia"></FunctionIntroduc>
<VideoShowDia ref="VideoShowDia" :dialogVisible="dialogVisibleImg"></VideoShowDia>
</div>
</template>
......@@ -105,16 +108,14 @@ const materialStatus = {
}
import Vue from 'vue'
import url from '@/assets/empty.png'
import iconUrl from '@/assets/icon-circle-question.png'
import AddMaterialGroupDia from '@/views/material/components/addMaterialGroupDia'
import MaterialGroup from '@/views/material/components/materialGroup'
import FunctionIntroduc from '@/views/material/components/functionIntroduc'
import VideoShowDia from './components/videoDia.vue'
export default {
name: 'materialList',
components: {
AddMaterialGroupDia,
MaterialGroup,
FunctionIntroduc,
VideoShowDia
},
......@@ -130,9 +131,9 @@ export default {
businessType: '', // 业务类型
status: '', // 状态
materialName: '', // 素材名称
createdType:'1'
createdType: '1'
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'},
layout: 'sizes, prev, pager, next, jumper, ->, total',
// 表格数据
materialTableData: [],
......@@ -249,15 +250,15 @@ export default {
// type: 'GLButton',
type: 'el-button',
name: row => {
return row.createdType == 2 ? '查看' : '编辑'
return row.createdType == 2 ? '查看' : '编辑'
},
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => row.createdType == 2 ? this.addMaterial(3, row) : this.addMaterial(2, row)
}
click: row => row.createdType == 2 ? this.addMaterial(3, row) : this.addMaterial(2, row)
}
},
{
// type: 'GLButton',
......@@ -300,114 +301,18 @@ export default {
label: '状态',
prop: 'status',
addHtml: 'status',
width: 170
// width: 170
},
{
label: '类型',
prop: 'materialType',
addHtml: 'materialType',
width: 170
// width: 170
},
// {
// label: '发送次数',
// prop: 'sendNum',
// sortable: true,
// width: 130,
// formatter: cellVal => {
// return cellVal.sendNum
// },
// renderHeader: (h, { column, $index }) => {
// return h(
// 'div',
// {
// style: {
// display: 'inline-flex',
// 'align-items': 'center',
// padding: 0
// }
// },
// [
// '发送次数',
// h(
// 'el-popover',
// {
// attrs: {
// placement: 'top-start',
// width: '240',
// trigger: 'hover',
// content: '统计该素材的发送次数(不包含在系统外部的转发次数)'
// }
// },
// [
// h('img', {
// style: {
// width: '17px',
// height: '17px',
// 'vertical-align': 'middle'
// },
// attrs: {
// src: iconUrl
// },
// slot: 'reference'
// })
// ]
// )
// ]
// )
// }
// },
// {
// label: '阅读人数',
// prop: 'readNum',
// width: 130,
// sortable: true,
// formatter: cellVal => {
// return cellVal.readNum
// },
// renderHeader: (h, { column, $index }) => {
// return h(
// 'div',
// {
// style: {
// display: 'inline-flex',
// 'align-items': 'center',
// padding: 0
// }
// },
// [
// '阅读人数',
// h(
// 'el-popover',
// {
// attrs: {
// placement: 'top-start',
// width: '240',
// trigger: 'hover',
// content: '阅读该素材的人数,内部员工除外。'
// }
// },
// [
// h('img', {
// style: {
// width: '17px',
// height: '17px',
// 'vertical-align': 'middle'
// },
// attrs: {
// src: iconUrl
// },
// slot: 'reference'
// })
// ]
// )
// ]
// )
// }
// },
{
label: '更新时间',
prop: 'updatedTime',
width: 210,
// width: 210,
sortable: true,
formatter: cellVal => {
return cellVal.updatedTime
......@@ -518,7 +423,7 @@ export default {
},
// 素材删除
handleDelete(scope) {
this.secondConfirm('提示', '删除素材,该素材将不再可以使用,是否继续删除?', 'material', 'materialDelete', { id: scope.id })
this.secondConfirm('提示', '删除素材,该素材将不再可以使用,是否继续删除?', 'material', 'materialDelete', {id: scope.id})
},
// 1-新增素材,2-编辑素材
addMaterial(addOrEdit, scope) {
......@@ -628,35 +533,43 @@ export default {
right: 0;
width: 100%;
height: 100%;
img {
position: relative;
align-self: center;
margin: auto;
}
span {
position: absolute;
top: 12px;
right: 15px;
}
}
.urlContent {
margin-right: 8px;
position: relative;
width: 36px;
height: 36px;
}
.search-form,
.left,
.right {
background-color: #fff;
}
.el-popover {
min-width: 100px;
}
.main-container {
height: 100%;
.top {
display: inline-flex;
span {
margin-left: 16px;
font-size: 16px;
......@@ -664,44 +577,55 @@ export default {
}
}
}
ul {
text-align: center;
li {
list-style: none;
&:first-child {
padding-bottom: 10px;
}
}
}
.container {
margin-top: 10px;
height: 100%;
.search-form {
padding: 20px 0 0 20px;
}
.tabelList {
margin-top: 10px;
height: 100%;
.left {
height: 100%;
position: relative;
border-right: 1px solid #e8e8ea;
}
.right {
// overflow: auto;
.groupTitle {
padding: 20px 0 16px 19px;
font-weight: 600;
}
.glsx-table {
margin: 0 20px;
}
}
}
}
.btn-more {
margin-left: 10px;
}
.material-content {
display: flex;
align-items: center;
......@@ -715,39 +639,49 @@ ul {
overflow: hidden;
white-space: nowrap;
}
img {
width: 36px;
height: 36px;
}
}
.img-plus {
width: 200px;
height: 200px;
}
.introduc-word {
font-size: 14px;
margin-left: 16px;
color: #5850ff;
}
.pdf-title {
text-align: right !important;
}
/deep/ .el-table .ascending .sort-caret.ascending {
border-bottom-color: #5850ff;
}
/deep/ .el-table .descending .sort-caret.descending {
border-top-color: #5850ff;
}
.select-pro {
display: inline-block;
padding-bottom: 20px;
}
/deep/ .el-switch__core {
width: 32px !important;
}
/deep/ .el-table::before {
background-color: transparent;
}
/deep/ .el-table__fixed-right::before {
background-color: transparent;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!