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.' const defaultPath = 'marketing.api.material.'
...@@ -170,9 +170,9 @@ const findAllDictData = params => { ...@@ -170,9 +170,9 @@ const findAllDictData = params => {
}) })
} }
const getStoreList = params => { const getStoreList = params => {
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.create.merchant' params.method = 'merchants.api.open.findMerchantListByPage'
return http({ return http3({
url:'rop-scrm-entmicro/router', url:'rop-merchants/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true 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() ...@@ -21,4 +21,5 @@ start()
export { bootstrap, mount, unmount } from '@/setup' export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params) export const http = params => Vue.prototype.$http(params)
export const http2 = params => Vue.prototype.$http2(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) export const http_common = params => Vue.prototype.$http_common(params)
...@@ -20,7 +20,7 @@ let instance = null ...@@ -20,7 +20,7 @@ let instance = null
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState }) { 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.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
...@@ -29,6 +29,7 @@ export async function bootstrap({ history, common, messenger, globalState }) { ...@@ -29,6 +29,7 @@ export async function bootstrap({ history, common, messenger, globalState }) {
Vue.prototype.$messageBox = messageBox Vue.prototype.$messageBox = messageBox
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) 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.$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.$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.prototype.$setGlobalState = globalState.actions.setGlobalState
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
......
...@@ -7,10 +7,12 @@ ...@@ -7,10 +7,12 @@
<el-divider></el-divider> <el-divider></el-divider>
<div class="m-l-20"> <div class="m-l-20">
<el-form-item label="选择门店:" prop="targetMerchantId"> <el-form-item label="选择门店:" prop="targetMerchantId">
<el-select v-model="materialAddForm.targetMerchantId" :disabled="notDisplayProperties" ref="selectLabel" clearable filterable :size="size" <el-select remote :remote-method="remoteMethod" v-el-select-loadmore="loadmore"
placeholder="请选择门店"> v-model="materialAddForm.targetMerchantId" :disabled="notDisplayProperties" ref="selectLabel"
<el-option v-for="(item, i) in dataItems" :key="i" :label="item.msgMerchantName" clearable filterable :size="size"
:value="item.msgMerchantId + ''"></el-option> 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-select>
</el-form-item> </el-form-item>
<el-form-item v-if="!notDisplayProperties" label="选择素材组:" prop="groupId"> <el-form-item v-if="!notDisplayProperties" label="选择素材组:" prop="groupId">
...@@ -32,7 +34,7 @@ ...@@ -32,7 +34,7 @@
</el-form-item> </el-form-item>
<el-form-item label="素材类型:" prop="materialType"> <el-form-item label="素材类型:" prop="materialType">
<el-radio-group v-model="materialAddForm.materialType" @change="radioChange" <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="1">PDF文件</el-radio>
<!-- <el-radio :label="2">自定义链接</el-radio> --> <!-- <el-radio :label="2">自定义链接</el-radio> -->
<el-radio :label="3">图文</el-radio> <el-radio :label="3">图文</el-radio>
...@@ -46,7 +48,6 @@ ...@@ -46,7 +48,6 @@
:disabled="notDisplayProperties">选择文件 :disabled="notDisplayProperties">选择文件
</el-button> </el-button>
</div> </div>
<!-- <div v-if="pdfUrl">{{ pdfUrl }}</div> -->
<ul v-if="pdfName || materialAddForm.materialUrl"> <ul v-if="pdfName || materialAddForm.materialUrl">
<li class="pdf-show"> <li class="pdf-show">
<span class="pdf-name" @click="openPdfDia">{{ pdfName || materialAddForm.materialUrl }}</span> <span class="pdf-name" @click="openPdfDia">{{ pdfName || materialAddForm.materialUrl }}</span>
...@@ -54,14 +55,6 @@ ...@@ -54,14 +55,6 @@
</li> </li>
</ul> </ul>
</div> </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"> <div v-show="materialAddForm.materialType == 3">
<textBox @change="writeChange" ref="textBox" @forbid="forbidEdit"></textBox> <textBox @change="writeChange" ref="textBox" @forbid="forbidEdit"></textBox>
...@@ -96,8 +89,8 @@ ...@@ -96,8 +89,8 @@
<el-form-item label="视频:" class="photoWrap"> <el-form-item label="视频:" class="photoWrap">
<div class="img-div"> <div class="img-div">
<div class="put-img" v-if="materialAddForm.videoUrl"> <div class="put-img" v-if="materialAddForm.videoUrl">
<video id="video" width="100%" height="100%" preload loop muted> <video :src="materialAddForm.videoUrl" id="video" width="100%" height="100%" preload loop muted>
<source :src="materialAddForm.videoUrl" type="video/mp4"/> <!-- <source type="video/mp4"/>-->
</video> </video>
<div class="mask"> <div class="mask">
<h3> <h3>
...@@ -227,14 +220,13 @@ ...@@ -227,14 +220,13 @@
<GLFooter class="gl-footer"> <GLFooter class="gl-footer">
<el-button @click="onSave" v-if="this.routeInfo.addOrEdit == 1">存草稿</el-button> <el-button @click="onSave" v-if="this.routeInfo.addOrEdit == 1">存草稿</el-button>
<el-button @click="handleCancel" class="btn-cancle">取消</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> </GLFooter>
<el-dialog class="image-dialog" :visible.sync="dialogVisibleImg" width="30%"> <el-dialog class="image-dialog" :visible.sync="dialogVisibleImg" width="30%">
<big-view ref="viewForm" v-if="dialogVisibleImg" :dialogSrc="dialogSrc" :dialogType="dialogType"></big-view> <big-view ref="viewForm" v-if="dialogVisibleImg" :dialogSrc="dialogSrc" :dialogType="dialogType"></big-view>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import textBox from '@/views/material/components/textBox' import textBox from '@/views/material/components/textBox'
import SelectLabel from '@/views/material/components/selectLable' import SelectLabel from '@/views/material/components/selectLable'
...@@ -272,6 +264,12 @@ export default { ...@@ -272,6 +264,12 @@ export default {
pdfName: '', pdfName: '',
dialogPdfVisible: false, dialogPdfVisible: false,
textBoxContent: '', textBoxContent: '',
pageData: {
pageSize: 40,
pageNum: 1,
channelType: 1,
merchantAccountLevel: [4]
},
materialAddForm: { materialAddForm: {
groupId: '', // 素材组id groupId: '', // 素材组id
groupName: '', groupName: '',
...@@ -319,19 +317,88 @@ export default { ...@@ -319,19 +317,88 @@ export default {
this.title = this.titleObj[this.routeInfo.addOrEdit] this.title = this.titleObj[this.routeInfo.addOrEdit]
this.notDisplayProperties = this.routeInfo.addOrEdit == 3 this.notDisplayProperties = this.routeInfo.addOrEdit == 3
this.materialInsert() this.materialInsert()
this.getMaterialList()
this.getListEntBusinessType() 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: { 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, 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 => { 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() { viewVideo() {
this.dialogVisibleImg = true this.dialogVisibleImg = true
...@@ -359,7 +426,7 @@ export default { ...@@ -359,7 +426,7 @@ export default {
} }
}, },
getParams() { getParams() {
var params = JSON.parse(JSON.stringify(this.materialAddForm)) let params = JSON.parse(JSON.stringify(this.materialAddForm))
let tagging = this.tagging.map(item => { let tagging = this.tagging.map(item => {
let tagIds = item.labelList.map(tag => { let tagIds = item.labelList.map(tag => {
return tag.id return tag.id
...@@ -400,6 +467,8 @@ export default { ...@@ -400,6 +467,8 @@ export default {
if (videoHtml && videoHtml.length && !imgHtml && !html.length) params.materialType = 4 if (videoHtml && videoHtml.length && !imgHtml && !html.length) params.materialType = 4
if (!imgHtml && !videoHtml) params.materialType = 5 if (!imgHtml && !videoHtml) params.materialType = 5
if (imgHtml && imgHtml.length && !videoHtml && !html.length) params.materialType = 6 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) this.textBoxContent = encodeURIComponent(this.textBoxContent)
params.materialUrl = this.textBoxContent params.materialUrl = this.textBoxContent
} }
...@@ -416,6 +485,7 @@ export default { ...@@ -416,6 +485,7 @@ export default {
await this.$apis.material.materialDetail(params).then(res => { await this.$apis.material.materialDetail(params).then(res => {
this.materialAddForm = res this.materialAddForm = res
this.materialAddForm.targetMerchantId = res.merchantId + '' || '' this.materialAddForm.targetMerchantId = res.merchantId + '' || ''
this.getMaterialList({merchant:res.merchantId})
if (res.businessType) { if (res.businessType) {
const businessTypeArr = this.materialAddForm.businessType.split(',') const businessTypeArr = this.materialAddForm.businessType.split(',')
this.materialAddForm.businessType = businessTypeArr.map(item => parseInt(item)) this.materialAddForm.businessType = businessTypeArr.map(item => parseInt(item))
...@@ -455,12 +525,6 @@ export default { ...@@ -455,12 +525,6 @@ export default {
} }
}) })
}, },
// 获取全部素材组
getMaterialList() {
this.$apis.material.getMaterialList({}).then(res => {
this.groupCounter = res
})
},
// 创建素材组 // 创建素材组
materialInsert() { materialInsert() {
var params = {} var params = {}
...@@ -554,8 +618,7 @@ export default { ...@@ -554,8 +618,7 @@ export default {
}) })
} }
}, },
handleUploadChange(e, params, typeName, limitSize) {
handleUploadChange(e, params,typeName,limitSize) {
var file = e.srcElement.files[0] var file = e.srcElement.files[0]
var reader = new FileReader() var reader = new FileReader()
const isLt = file.size / 1024 / 1024 < limitSize const isLt = file.size / 1024 / 1024 < limitSize
...@@ -677,7 +740,6 @@ export default { ...@@ -677,7 +740,6 @@ export default {
forbidEdit() { forbidEdit() {
this.$refs.textBox.forbidEdit() this.$refs.textBox.forbidEdit()
}, },
handleSelect(val) { handleSelect(val) {
this.isUpdate = true this.isUpdate = true
this.tagging = val this.tagging = val
...@@ -715,7 +777,6 @@ export default { ...@@ -715,7 +777,6 @@ export default {
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.disableUpload { .disableUpload {
cursor: not-allowed; cursor: not-allowed;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
创建营销素材 创建营销素材
</el-button> </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> </div>
<span @click="showIntroductionDialog" class="introduc-word"> <span @click="showIntroductionDialog" class="introduc-word">
功能介绍 功能介绍
...@@ -13,41 +13,42 @@ ...@@ -13,41 +13,42 @@
</span> </span>
<div class="container"> <div class="container">
<div class="search-form"> <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>
<div class="tabelList"> <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="right" :style="{ height: boxHeight + 'px' }">
<div class="groupTitle">{{ materialGroupName }}(共{{ tableTotal }}条数据)</div> <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"> <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"> <div slot="materialContentRpcResponse" slot-scope="scope" style="text-align: center">
<!-- 素材为PDF --> <!-- 素材为PDF -->
<span v-if="scope.scope.materialType == 1" class="material-content"> <span v-if="scope.scope.materialType == 1" class="material-content">
<img src="@/assets/material/pdf.png" style="margin-right:8px" alt="" /> <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"> <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> <span class="hide-content">{{ scope.scope.materialContentRpcResponse.materialName }}</span>
</el-tooltip> </el-tooltip>
</span> </span>
<!-- 素材为自定义链接 --> <!-- 素材为自定义链接 -->
<span v-if="scope.scope.materialType == 2"></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 == 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'"> <el-popover placement="top" trigger="hover" v-if="scope.scope.urlType == 'img'">
<div> <div>
<img class="img-plus" :src="scope.scope.materialContentRpcResponse.materialUrl" alt="" /> <img class="img-plus" :src="scope.scope.materialContentRpcResponse.materialUrl" alt=""/>
</div> </div>
<div slot="reference" class="urlContent"> <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"> <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> <span>{{ scope.scope.imgCount }}</span>
</div> </div>
</div> </div>
...@@ -55,13 +56,15 @@ ...@@ -55,13 +56,15 @@
<!-- 视频 --> <!-- 视频 -->
<div class="urlContent" v-if="scope.scope.urlType == 'video'" @click="videoOpen(scope.scope)"> <div class="urlContent" v-if="scope.scope.urlType == 'video'" @click="videoOpen(scope.scope)">
<video preload loop muted width="36" height="36"> <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> </video>
<div class="videoMask"> <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>
</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> <span class="hide-content">{{ scope.scope.materialContentRpcResponse.materialName }}</span>
</el-tooltip> </el-tooltip>
</span> </span>
...@@ -87,12 +90,12 @@ ...@@ -87,12 +90,12 @@
</span> </span>
</GLTable> </GLTable>
</div> </div>
</el-col>
</el-row>
</div> </div>
</div> </div>
<AddMaterialGroupDia :businessTypes="businessTypes" ref="addMaterialGroup" :dialogVisible="materialGroupDialog" :eventBus="eventBus"></AddMaterialGroupDia> <AddMaterialGroupDia :businessTypes="businessTypes" ref="addMaterialGroup" :dialogVisible="materialGroupDialog"
<FunctionIntroduc :introductionDialog="introductionDialog" @closeIntroductDia="closeIntroductDia"></FunctionIntroduc> :eventBus="eventBus"></AddMaterialGroupDia>
<FunctionIntroduc :introductionDialog="introductionDialog"
@closeIntroductDia="closeIntroductDia"></FunctionIntroduc>
<VideoShowDia ref="VideoShowDia" :dialogVisible="dialogVisibleImg"></VideoShowDia> <VideoShowDia ref="VideoShowDia" :dialogVisible="dialogVisibleImg"></VideoShowDia>
</div> </div>
</template> </template>
...@@ -105,16 +108,14 @@ const materialStatus = { ...@@ -105,16 +108,14 @@ const materialStatus = {
} }
import Vue from 'vue' import Vue from 'vue'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import iconUrl from '@/assets/icon-circle-question.png'
import AddMaterialGroupDia from '@/views/material/components/addMaterialGroupDia' import AddMaterialGroupDia from '@/views/material/components/addMaterialGroupDia'
import MaterialGroup from '@/views/material/components/materialGroup'
import FunctionIntroduc from '@/views/material/components/functionIntroduc' import FunctionIntroduc from '@/views/material/components/functionIntroduc'
import VideoShowDia from './components/videoDia.vue' import VideoShowDia from './components/videoDia.vue'
export default { export default {
name: 'materialList', name: 'materialList',
components: { components: {
AddMaterialGroupDia, AddMaterialGroupDia,
MaterialGroup,
FunctionIntroduc, FunctionIntroduc,
VideoShowDia VideoShowDia
}, },
...@@ -130,9 +131,9 @@ export default { ...@@ -130,9 +131,9 @@ export default {
businessType: '', // 业务类型 businessType: '', // 业务类型
status: '', // 状态 status: '', // 状态
materialName: '', // 素材名称 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', layout: 'sizes, prev, pager, next, jumper, ->, total',
// 表格数据 // 表格数据
materialTableData: [], materialTableData: [],
...@@ -300,114 +301,18 @@ export default { ...@@ -300,114 +301,18 @@ export default {
label: '状态', label: '状态',
prop: 'status', prop: 'status',
addHtml: 'status', addHtml: 'status',
width: 170 // width: 170
}, },
{ {
label: '类型', label: '类型',
prop: 'materialType', prop: 'materialType',
addHtml: '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: '更新时间', label: '更新时间',
prop: 'updatedTime', prop: 'updatedTime',
width: 210, // width: 210,
sortable: true, sortable: true,
formatter: cellVal => { formatter: cellVal => {
return cellVal.updatedTime return cellVal.updatedTime
...@@ -518,7 +423,7 @@ export default { ...@@ -518,7 +423,7 @@ export default {
}, },
// 素材删除 // 素材删除
handleDelete(scope) { handleDelete(scope) {
this.secondConfirm('提示', '删除素材,该素材将不再可以使用,是否继续删除?', 'material', 'materialDelete', { id: scope.id }) this.secondConfirm('提示', '删除素材,该素材将不再可以使用,是否继续删除?', 'material', 'materialDelete', {id: scope.id})
}, },
// 1-新增素材,2-编辑素材 // 1-新增素材,2-编辑素材
addMaterial(addOrEdit, scope) { addMaterial(addOrEdit, scope) {
...@@ -628,35 +533,43 @@ export default { ...@@ -628,35 +533,43 @@ export default {
right: 0; right: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
img { img {
position: relative; position: relative;
align-self: center; align-self: center;
margin: auto; margin: auto;
} }
span { span {
position: absolute; position: absolute;
top: 12px; top: 12px;
right: 15px; right: 15px;
} }
} }
.urlContent { .urlContent {
margin-right: 8px; margin-right: 8px;
position: relative; position: relative;
width: 36px; width: 36px;
height: 36px; height: 36px;
} }
.search-form, .search-form,
.left, .left,
.right { .right {
background-color: #fff; background-color: #fff;
} }
.el-popover { .el-popover {
min-width: 100px; min-width: 100px;
} }
.main-container { .main-container {
height: 100%; height: 100%;
.top { .top {
display: inline-flex; display: inline-flex;
span { span {
margin-left: 16px; margin-left: 16px;
font-size: 16px; font-size: 16px;
...@@ -664,44 +577,55 @@ export default { ...@@ -664,44 +577,55 @@ export default {
} }
} }
} }
ul { ul {
text-align: center; text-align: center;
li { li {
list-style: none; list-style: none;
&:first-child { &:first-child {
padding-bottom: 10px; padding-bottom: 10px;
} }
} }
} }
.container { .container {
margin-top: 10px; margin-top: 10px;
height: 100%; height: 100%;
.search-form { .search-form {
padding: 20px 0 0 20px; padding: 20px 0 0 20px;
} }
.tabelList { .tabelList {
margin-top: 10px; margin-top: 10px;
height: 100%; height: 100%;
.left { .left {
height: 100%; height: 100%;
position: relative; position: relative;
border-right: 1px solid #e8e8ea; border-right: 1px solid #e8e8ea;
} }
.right { .right {
// overflow: auto; // overflow: auto;
.groupTitle { .groupTitle {
padding: 20px 0 16px 19px; padding: 20px 0 16px 19px;
font-weight: 600; font-weight: 600;
} }
.glsx-table { .glsx-table {
margin: 0 20px; margin: 0 20px;
} }
} }
} }
} }
.btn-more { .btn-more {
margin-left: 10px; margin-left: 10px;
} }
.material-content { .material-content {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -715,39 +639,49 @@ ul { ...@@ -715,39 +639,49 @@ ul {
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
} }
img { img {
width: 36px; width: 36px;
height: 36px; height: 36px;
} }
} }
.img-plus { .img-plus {
width: 200px; width: 200px;
height: 200px; height: 200px;
} }
.introduc-word { .introduc-word {
font-size: 14px; font-size: 14px;
margin-left: 16px; margin-left: 16px;
color: #5850ff; color: #5850ff;
} }
.pdf-title { .pdf-title {
text-align: right !important; text-align: right !important;
} }
/deep/ .el-table .ascending .sort-caret.ascending { /deep/ .el-table .ascending .sort-caret.ascending {
border-bottom-color: #5850ff; border-bottom-color: #5850ff;
} }
/deep/ .el-table .descending .sort-caret.descending { /deep/ .el-table .descending .sort-caret.descending {
border-top-color: #5850ff; border-top-color: #5850ff;
} }
.select-pro { .select-pro {
display: inline-block; display: inline-block;
padding-bottom: 20px; padding-bottom: 20px;
} }
/deep/ .el-switch__core { /deep/ .el-switch__core {
width: 32px !important; width: 32px !important;
} }
/deep/ .el-table::before { /deep/ .el-table::before {
background-color: transparent; background-color: transparent;
} }
/deep/ .el-table__fixed-right::before { /deep/ .el-table__fixed-right::before {
background-color: transparent; background-color: transparent;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!