Commit cf8cffa8 by 匡雅琴

营销素材Bug修复

1 parent c2a14404
...@@ -244,7 +244,6 @@ export default { ...@@ -244,7 +244,6 @@ export default {
}, },
mounted() { mounted() {
this.routeInfo = this.$route.query this.routeInfo = this.$route.query
console.log(this.routeInfo, '1111')
this.routeInfo.addOrEdit != 1 ? this.getMaterialInfo() : '' this.routeInfo.addOrEdit != 1 ? this.getMaterialInfo() : ''
this.title = this.titleObj[this.routeInfo.addOrEdit] this.title = this.titleObj[this.routeInfo.addOrEdit]
this.materialInsert() this.materialInsert()
...@@ -293,7 +292,6 @@ export default { ...@@ -293,7 +292,6 @@ export default {
labelType: item.labelType labelType: item.labelType
} }
}) })
console.log(this.tagging)
} }
if (res.isNotifySender == 0) { if (res.isNotifySender == 0) {
this.materialAddForm.isNotifySender = true this.materialAddForm.isNotifySender = true
...@@ -305,7 +303,6 @@ export default { ...@@ -305,7 +303,6 @@ export default {
// 获取全部素材组 // 获取全部素材组
getMaterialList() { getMaterialList() {
this.$apis.material.getMaterialList({}).then(res => { this.$apis.material.getMaterialList({}).then(res => {
console.log(res, 'datadata')
this.groupCounter = res this.groupCounter = res
}) })
}, },
...@@ -334,7 +331,6 @@ export default { ...@@ -334,7 +331,6 @@ export default {
}, },
// 素材类型切换 // 素材类型切换
radioChange(value) { radioChange(value) {
console.log(value)
this.materialAddForm.materialType = value this.materialAddForm.materialType = value
}, },
// 是否通知 // 是否通知
...@@ -343,7 +339,6 @@ export default { ...@@ -343,7 +339,6 @@ export default {
}, },
// 上传PDF // 上传PDF
handlePdfChange(e) { handlePdfChange(e) {
console.log(e)
var file = e.srcElement.files[0] var file = e.srcElement.files[0]
var reader = new FileReader() var reader = new FileReader()
// 默认10MB // 默认10MB
...@@ -444,7 +439,6 @@ export default { ...@@ -444,7 +439,6 @@ export default {
// 提交 // 提交
handleSubmit() { handleSubmit() {
this.$refs.materialAddForm.validate(valid => { this.$refs.materialAddForm.validate(valid => {
console.log(this.textBoxContent, 'text')
if (valid) { if (valid) {
let tagging = this.tagging.map(item => { let tagging = this.tagging.map(item => {
let tagIds = item.labelList.map(tag => { let tagIds = item.labelList.map(tag => {
...@@ -515,7 +509,6 @@ export default { ...@@ -515,7 +509,6 @@ export default {
handleSelect(val) { handleSelect(val) {
this.isUpdate = true this.isUpdate = true
this.tagging = val this.tagging = val
console.log(val, '23')
let arr = [] let arr = []
this.tagging.forEach(item => { this.tagging.forEach(item => {
item.labelList.forEach(tag => { item.labelList.forEach(tag => {
...@@ -529,13 +522,9 @@ export default { ...@@ -529,13 +522,9 @@ export default {
}) })
}) })
this.taggingList = arr this.taggingList = arr
console.log(this.taggingList)
console.log(val, '1')
console.log(this.tagging, '2')
}, },
// 删除标签 // 删除标签
removeTag(tag, idx1, idx) { removeTag(tag, idx1, idx) {
console.log(tag, 'tag')
tag.labelList.splice(idx1, 1) tag.labelList.splice(idx1, 1)
if (tag.labelList.length == 0) { if (tag.labelList.length == 0) {
this.tagging.splice(idx, 1) this.tagging.splice(idx, 1)
......
...@@ -50,7 +50,6 @@ export default { ...@@ -50,7 +50,6 @@ export default {
methods: { methods: {
init(addOrEdit, value, group) { init(addOrEdit, value, group) {
// this.findAllDictData('business_type') // this.findAllDictData('business_type')
console.log(value, '123')
this.dialogVisible = true this.dialogVisible = true
this.materialGroupAddForm = { this.materialGroupAddForm = {
materialGroupName: '' materialGroupName: ''
...@@ -66,7 +65,6 @@ export default { ...@@ -66,7 +65,6 @@ export default {
var params = {} var params = {}
params.id = value.id params.id = value.id
this.$apis.material.materialGroupDetail(params).then(res => { this.$apis.material.materialGroupDetail(params).then(res => {
console.log(res, '---')
this.materialGroupAddForm = res this.materialGroupAddForm = res
// if (res.businessType) { // if (res.businessType) {
// this.materialGroupAddForm.businessType = this.materialGroupAddForm.businessType.split(',') // this.materialGroupAddForm.businessType = this.materialGroupAddForm.businessType.split(',')
...@@ -96,7 +94,6 @@ export default { ...@@ -96,7 +94,6 @@ export default {
}, },
// 创建 // 创建
submitForm() { submitForm() {
console.log(this.materialGroupAddForm)
this.$refs.materialGroupAddForm.validate(valid => { this.$refs.materialGroupAddForm.validate(valid => {
if (valid) { if (valid) {
var params = this.getParams() var params = this.getParams()
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</li> </li>
<!-- <li @click="handleDeleteGroup(item.id)" v-if="item.isDefault == -1">删除</li> --> <!-- <li @click="handleDeleteGroup(item.id)" v-if="item.isDefault == -1">删除</li> -->
<li> <li>
<GLButton :size="size" type="text" fn="删除" @click="handleDeleteGroup(item.id)">删除</GLButton> <GLButton :size="size" type="text" fn="删除" v-if="item.isDefault == -1" @click="handleDeleteGroup(item.id)">删除</GLButton>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -85,7 +85,6 @@ export default { ...@@ -85,7 +85,6 @@ export default {
// 获取全部素材组 // 获取全部素材组
getMaterialList() { getMaterialList() {
this.$apis.material.getMaterialList({}).then(res => { this.$apis.material.getMaterialList({}).then(res => {
console.log(res)
this.groupCounter = res this.groupCounter = res
}) })
}, },
...@@ -104,7 +103,6 @@ export default { ...@@ -104,7 +103,6 @@ export default {
}, },
// 素材组置顶 // 素材组置顶
handleStick(row) { handleStick(row) {
console.log(row, 'orderFlagorderFlag')
var params = {} var params = {}
params.id = row.id params.id = row.id
// 置顶 // 置顶
...@@ -123,7 +121,22 @@ export default { ...@@ -123,7 +121,22 @@ export default {
}, },
// 素材组删除 // 素材组删除
handleDeleteGroup(rowId) { handleDeleteGroup(rowId) {
this.secondConfirm('提示', '删除素材组,该素材组下的所有素材均会被删除,请谨慎操作', 'material', 'deleteMaterialList', { id: rowId }) this.$confirm('删除素材组,该素材组下的所有素材均会被删除,请谨慎操作', '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
type: 'warning'
}).then(() => {
this.$apis.material.deleteMaterialList({ id: rowId }).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.getMaterialList()
this.$emit('getListApi')
}
})
})
}, },
// 二次确认 // 二次确认
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) { secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
...@@ -190,8 +203,10 @@ ul { ...@@ -190,8 +203,10 @@ ul {
margin-block-end: 0; margin-block-end: 0;
li { li {
list-style: none; list-style: none;
padding: 5px;
position: relative; position: relative;
&:nth-child(-n + 2) {
padding-bottom: 10px;
}
&:hover { &:hover {
color: #5850ff; color: #5850ff;
} }
......
...@@ -6,7 +6,14 @@ ...@@ -6,7 +6,14 @@
<el-button type="primary" :size="size" @click="handleSearch(scope)">查询</el-button> <el-button type="primary" :size="size" @click="handleSearch(scope)">查询</el-button>
</span> </span>
</glsx-combi-form> </glsx-combi-form>
<GLTable ref="readPerDetailRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf"></GLTable> <GLTable ref="readPerDetailRef" @setTableFinishFun="setTableFinishFun" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf">
<div slot="departName" slot-scope="scope">
<el-tag type="info" v-for="item in scope.scope.departName" effect="plain" :key="item">
<i class="el-icon-user-solid" style="color: #75acff"></i>
{{ item }}
</el-tag>
</div>
</GLTable>
</div> </div>
</template> </template>
...@@ -66,7 +73,8 @@ export default { ...@@ -66,7 +73,8 @@ export default {
}, },
{ {
label: '所属企微成员', label: '所属企微成员',
prop: 'departName' prop: 'departName',
addHtml: 'departName'
}, },
{ {
label: '阅读次数', label: '阅读次数',
...@@ -98,6 +106,10 @@ export default { ...@@ -98,6 +106,10 @@ export default {
materialId: this.materialId materialId: this.materialId
} }
this.handleSearch() this.handleSearch()
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.readPerDetailRef.data.length ? (this.$refs.readPerDetailRef.tableHeightValues = '') : this.$refs.readPerDetailRef.setTableHeightFun()
} }
} }
} }
......
...@@ -60,32 +60,7 @@ export default { ...@@ -60,32 +60,7 @@ export default {
labelGroupName: '', labelGroupName: '',
selectNum: 0, selectNum: 0,
searchStatus: false, searchStatus: false,
labelTreeRets: [ labelTreeRets: []
{
labelGroup: { id: '109', name: '湖口123' },
labelList: [
{ id: '372', name: '12345678' },
{ id: '371', name: '7654321' },
{ id: '370', name: '1234567' }
],
checked: false,
tagChecked: [],
isIndeterminate: false,
checkAll: false
},
{
labelGroup: { id: '65', name: '自店标签111' },
labelList: [
{ id: '179', name: '标签44' },
{ id: '178', name: '标签33' },
{ id: '176', name: '标签1112' }
],
checked: false,
tagChecked: [],
isIndeterminate: false,
checkAll: false
}
]
} }
}, },
watch: { watch: {
...@@ -117,7 +92,6 @@ export default { ...@@ -117,7 +92,6 @@ export default {
this.querylabeltree() this.querylabeltree()
}, },
querylabeltree(selectItem) { querylabeltree(selectItem) {
console.log(selectItem, '-----')
this.$apis.customerTransform this.$apis.customerTransform
.querylabeltree({ .querylabeltree({
labelTreeReq: { labelTreeReq: {
...@@ -130,7 +104,6 @@ export default { ...@@ -130,7 +104,6 @@ export default {
}) })
.then(res => { .then(res => {
if (selectItem && selectItem.length > 0) { if (selectItem && selectItem.length > 0) {
console.log(res.labelTreeRets)
this.labelTreeRets = res.labelTreeRets.map(item => { this.labelTreeRets = res.labelTreeRets.map(item => {
return { return {
labelType: item.labelType, labelType: item.labelType,
...@@ -148,13 +121,11 @@ export default { ...@@ -148,13 +121,11 @@ export default {
if (item.labelGroup.id == tag.labelGroup.id) { if (item.labelGroup.id == tag.labelGroup.id) {
let labelId = item.labelList[0].id let labelId = item.labelList[0].id
let index = tag.labelList.findIndex(iem => iem.id == labelId) let index = tag.labelList.findIndex(iem => iem.id == labelId)
console.log(index)
// tag.tagChecked = item.tagChecked // tag.tagChecked = item.tagChecked
tag.tagChecked = tag.labelList[index] tag.tagChecked = tag.labelList[index]
} }
}) })
}) })
console.log(this.labelTreeRets)
} else { } else {
this.labelTreeRets = res.labelTreeRets.map(item => { this.labelTreeRets = res.labelTreeRets.map(item => {
return { return {
...@@ -194,7 +165,6 @@ export default { ...@@ -194,7 +165,6 @@ export default {
} }
}) })
.filter(item => item) .filter(item => item)
console.log(labelTreeRets)
this.$emit('tagSelected', labelTreeRets) this.$emit('tagSelected', labelTreeRets)
}, },
handleReset() { handleReset() {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<el-button type="primary" :size="size" @click="handleSearch(scope)">查询</el-button> <el-button type="primary" :size="size" @click="handleSearch(scope)">查询</el-button>
</span> </span>
</glsx-combi-form> </glsx-combi-form>
<GLTable ref="staffSendDetailRef" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams"></GLTable> <GLTable ref="staffSendDetailRef" @setTableFinishFun="setTableFinishFun" @sortChange="sortChange" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams"></GLTable>
</div> </div>
</template> </template>
...@@ -74,6 +74,16 @@ export default { ...@@ -74,6 +74,16 @@ export default {
materialId: this.$route.query.id materialId: this.$route.query.id
} }
this.handleSearch() this.handleSearch()
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.staffSendDetailRef.data.length ? (this.$refs.staffSendDetailRef.tableHeightValues = '') : this.$refs.staffSendDetailRef.setTableHeightFun()
},
sortChange({ column, prop, order }) {
// 添加-排序相关参数
this.searchForm.order = order
this.searchForm.sortAttr = order ? prop : null
this.handleSearch()
} }
} }
} }
......
...@@ -35,7 +35,6 @@ export default { ...@@ -35,7 +35,6 @@ export default {
this.$emit('change', this.content) // 将内容同步到父组件中 this.$emit('change', this.content) // 将内容同步到父组件中
} }
this.editor.config.customUploadImg = function(resultFiles, insertImgFn) { this.editor.config.customUploadImg = function(resultFiles, insertImgFn) {
console.log(resultFiles)
var file = resultFiles[0] var file = resultFiles[0]
var reader = new FileReader() var reader = new FileReader()
// 默认1MB // 默认1MB
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<el-row :style="{ height: boxHeight }"> <el-row :style="{ height: boxHeight }">
<el-col :span="5"> <el-col :span="5">
<div class="left" :style="{ height: boxHeight }"> <div class="left" :style="{ height: boxHeight }">
<MaterialGroup @openAddDialog="addDialogShow" :eventBus="eventBus" @getList="getList"></MaterialGroup> <MaterialGroup @openAddDialog="addDialogShow" :eventBus="eventBus" @getList="getList" @getListApi="getListApi"></MaterialGroup>
</div> </div>
</el-col> </el-col>
<el-col :span="19"> <el-col :span="19">
...@@ -77,12 +77,12 @@ ...@@ -77,12 +77,12 @@
<el-popover placement="right" trigger="click"> <el-popover placement="right" trigger="click">
<ul> <ul>
<li> <li>
<!-- <el-button :size="size" type="text" @click="handleForbid(scope.scope)">{{ scope.scope.status == 0 ? '禁用' : '启用' }}</el-button> --> <el-button :size="size" type="text" @click="handleForbid(scope.scope)">{{ scope.scope.status == 0 ? '禁用' : '启用' }}</el-button>
<GLButton :size="size" type="text" fn="禁用" @click="handleForbid(scope.scope)">{{ scope.scope.status == 0 ? '禁用' : '启用' }}</GLButton> <!-- <GLButton :size="size" type="text" fn="禁用" @click="handleForbid(scope.scope)">{{ scope.scope.status == 0 ? '禁用' : '启用' }}</GLButton> -->
</li> </li>
<li> <li>
<!-- <el-button :size="size" type="text" @click="handleDelete(scope.scope)">删除</el-button> --> <el-button :size="size" type="text" @click="handleDelete(scope.scope)">删除</el-button>
<GLButton :size="size" type="text" fn="删除营销素材" @click="handleDelete(scope.scope)">删除</GLButton> <!-- <GLButton :size="size" type="text" fn="删除营销素材" @click="handleDelete(scope.scope)">删除</GLButton> -->
</li> </li>
</ul> </ul>
<el-button type="text" slot="reference" class="btn-more">更多</el-button> <el-button type="text" slot="reference" class="btn-more">更多</el-button>
...@@ -256,7 +256,8 @@ export default { ...@@ -256,7 +256,8 @@ export default {
style: { style: {
width: '14px', width: '14px',
height: '14px', height: '14px',
'margin-left': '4px' 'margin-left': '4px',
'vertical-align': 'middle'
}, },
attrs: { attrs: {
src: iconUrl src: iconUrl
...@@ -274,6 +275,9 @@ export default { ...@@ -274,6 +275,9 @@ export default {
prop: 'readNum', prop: 'readNum',
width: 150, width: 150,
sortable: true, sortable: true,
formatter: cellVal => {
return cellVal.readNum
},
renderHeader: (h, { column, $index }) => { renderHeader: (h, { column, $index }) => {
return h( return h(
'div', 'div',
...@@ -300,7 +304,8 @@ export default { ...@@ -300,7 +304,8 @@ export default {
style: { style: {
width: '14px', width: '14px',
height: '14px', height: '14px',
'margin-left': '4px' 'margin-left': '4px',
'vertical-align': 'middle'
}, },
attrs: { attrs: {
src: iconUrl src: iconUrl
...@@ -317,7 +322,10 @@ export default { ...@@ -317,7 +322,10 @@ export default {
label: '更新时间', label: '更新时间',
prop: 'updatedTime', prop: 'updatedTime',
width: 180, width: 180,
sortable: true sortable: true,
formatter: cellVal => {
return cellVal.updatedTime
}
} }
] ]
}, },
...@@ -327,24 +335,10 @@ export default { ...@@ -327,24 +335,10 @@ export default {
mounted() { mounted() {
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
let offTop = document.querySelector('.tabelList').offsetTop let offTop = document.querySelector('.tabelList').offsetTop
this.boxHeight = clientHeight - offTop + 'px' this.boxHeight = clientHeight - offTop - 80 + 'px'
this.findAllDictData('business_type')
this.firstCome()
this.getListApi()
// 没数据的时候算表格高度
setTimeout(() => {
if (!this.$refs.materialRef.data.length) {
this.loading = true
this.$refs.materialRef.setTableHeightFun()
this.loading = false
}
}, 200)
console.log(clientHeight, offTop)
this.boxHeight = clientHeight - offTop + 'px'
this.findAllDictData('business_type') this.findAllDictData('business_type')
this.firstCome() this.firstCome()
this.getListApi() this.getListApi()
console.log(this.$refs.materialRef, '12312')
}, },
methods: { methods: {
// 判断是否第一次进入 // 判断是否第一次进入
...@@ -354,10 +348,6 @@ export default { ...@@ -354,10 +348,6 @@ export default {
window.sessionStorage.setItem('firstLogin', 'true') window.sessionStorage.setItem('firstLogin', 'true')
} }
}, },
// 搜索
// handleSearch() {
// this.$refs.materialRef.refreshTable()
// },
// 重置 // 重置
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
...@@ -387,7 +377,6 @@ export default { ...@@ -387,7 +377,6 @@ export default {
}, },
// 素材详情 // 素材详情
handleDetail(scope) { handleDetail(scope) {
console.log(scope.id)
this.$router.push({ this.$router.push({
path: '/material/materialDetail', path: '/material/materialDetail',
query: { query: {
...@@ -397,7 +386,6 @@ export default { ...@@ -397,7 +386,6 @@ export default {
}, },
// 素材禁用&启用 // 素材禁用&启用
handleForbid(scope) { handleForbid(scope) {
console.log(scope)
var params = {} var params = {}
params.id = scope.id params.id = scope.id
if (scope.status == 0) { if (scope.status == 0) {
...@@ -414,7 +402,6 @@ export default { ...@@ -414,7 +402,6 @@ export default {
}, },
// 1-新增素材,2-编辑素材 // 1-新增素材,2-编辑素材
addMaterial(addOrEdit, scope) { addMaterial(addOrEdit, scope) {
console.log(addOrEdit, scope)
var params = { var params = {
addOrEdit: addOrEdit, addOrEdit: addOrEdit,
$title: encodeURI(addOrEdit == 1 ? '创建营销素材' : '编辑营销素材') $title: encodeURI(addOrEdit == 1 ? '创建营销素材' : '编辑营销素材')
...@@ -426,35 +413,31 @@ export default { ...@@ -426,35 +413,31 @@ export default {
}) })
}, },
// 排序 // 排序
sortChange(sort) { // sortChange(sort) {
console.log(sort) // // 获取字段名称和排序类型
// 获取字段名称和排序类型 // var fieldName = sort.prop
var fieldName = sort.prop // var sortingType = sort.order
var sortingType = sort.order // //如果字段名称为“创建时间”,将“创建时间”转换为时间戳,才能进行大小比较
//如果字段名称为“创建时间”,将“创建时间”转换为时间戳,才能进行大小比较 // if (fieldName == 'updatedTime') {
if (fieldName == 'updatedTime') { // this.materialTableData.map(item => {
this.materialTableData.map(item => { // item.updatedTime = this.$moment(item.updatedTime).valueOf()
item.updatedTime = this.$moment(item.updatedTime).valueOf() // })
}) // }
} // //按照降序排序
//按照降序排序 // if (sortingType == 'descending') {
if (sortingType == 'descending') { // this.materialTableData = this.materialTableData.sort((a, b) => b[fieldName] - a[fieldName])
this.materialTableData = this.materialTableData.sort((a, b) => b[fieldName] - a[fieldName]) // }
} // //按照升序排序
//按照升序排序 // else {
else { // this.materialTableData = this.materialTableData.sort((a, b) => a[fieldName] - b[fieldName])
this.materialTableData = this.materialTableData.sort((a, b) => a[fieldName] - b[fieldName]) // }
} // },
},
getParams() { getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) var params = JSON.parse(JSON.stringify(this.searchForm))
return params return params
}, },
getListApi() { // 获取素材列表
var params = this.getParams() getTableList(params) {
params.pageSize = this.$refs.materialRef.page.pageSize
params.pageNum = this.$refs.materialRef.page.pageNum
params.groupId = ''
this.$apis.material.materialList(params).then(res => { this.$apis.material.materialList(params).then(res => {
let data = res.data let data = res.data
let tableData = [] let tableData = []
...@@ -474,41 +457,25 @@ export default { ...@@ -474,41 +457,25 @@ export default {
} }
tableData.push(item) tableData.push(item)
}) })
console.log(tableData, '1234444');
this.materialTableData = tableData this.materialTableData = tableData
// console.log(this.materialTableData, '1234444');
this.tableTotal = res.count this.tableTotal = res.count
this.materialGroupName = '全部素材' res.count ? (this.$refs.materialRef.tableHeightValues = '') : this.$refs.materialRef.setTableHeightFun()
}) })
}, },
getListApi() {
var params = this.getParams()
params.pageSize = this.$refs.materialRef.page.pageSize
params.pageNum = this.$refs.materialRef.page.pageNum
params.groupId = ''
this.getTableList(params)
this.materialGroupName = '全部素材'
// })
},
// 点击素材组获取素材组素材 // 点击素材组获取素材组素材
getList(params, item) { getList(params, item) {
this.materialGroupName = item.materialGroupName this.materialGroupName = item.materialGroupName
this.searchForm.groupId = item.id this.searchForm.groupId = item.id
this.$apis.material.materialList(params).then(res => { this.getTableList(params)
let data = res.data
let tableData = []
data.forEach(item => {
if (item.materialType != 3) {
item.materialContentRpcResponse.materialUrl = ''
}
if (item.materialType == 3) {
let html = decodeURIComponent(item.materialContentRpcResponse.materialUrl)
let imgHtml = html.match(/<img.*?(?:>|\/>)/g)
if (imgHtml) {
let imgSrc = imgHtml[0].match('<img[^<>]*? src="([^<>]*?)"')
item.materialContentRpcResponse.materialUrl = imgSrc[1]
} else {
item.materialContentRpcResponse.materialUrl = ''
}
}
tableData.push(item)
})
console.log(tableData, '1234444');
this.materialTableData = tableData
this.materialTableData = res.data
this.tableTotal = res.count
})
}, },
// 功能介绍弹框 // 功能介绍弹框
showIntroductionDialog() { showIntroductionDialog() {
...@@ -567,6 +534,9 @@ ul { ...@@ -567,6 +534,9 @@ ul {
text-align: center; text-align: center;
li { li {
list-style: none; list-style: none;
&:first-child {
padding-bottom: 10px;
}
} }
} }
.container { .container {
...@@ -628,4 +598,13 @@ ul { ...@@ -628,4 +598,13 @@ ul {
.pdf-title { .pdf-title {
text-align: right !important; text-align: right !important;
} }
// /deep/ .el-table .ascending .sort-caret.ascending {
// border-bottom-color: #5850ff;
// }
// /deep/ .el-table .ascending .sort-caret.descending {
// border-top-color: #5850ff;
// }
// /deep/ .el-table .descending .sort-caret.descending {
// border-top-color: #5850ff;
// }
</style> </style>
...@@ -216,15 +216,12 @@ export default { ...@@ -216,15 +216,12 @@ export default {
} }
if (this.detailInfo.materialType == 3) { if (this.detailInfo.materialType == 3) {
this.detailInfo.materialUrl = decodeURIComponent(this.detailInfo.materialUrl) this.detailInfo.materialUrl = decodeURIComponent(this.detailInfo.materialUrl)
console.log(this.detailInfo.materialUrl, 'dhakfh')
let html = this.detailInfo.materialUrl let html = this.detailInfo.materialUrl
let imgHtml = html.match(/<img.*?(?:>|\/>)/g) let imgHtml = html.match(/<img.*?(?:>|\/>)/g)
console.log(imgHtml, 'imgHtml')
this.htmlContent = html.replace(imgHtml[0], '') this.htmlContent = html.replace(imgHtml[0], '')
if (imgHtml) { if (imgHtml) {
this.imgSrc = imgHtml[0].match('<img[^<>]*? src="([^<>]*?)"') this.imgSrc = imgHtml[0].match('<img[^<>]*? src="([^<>]*?)"')
} }
console.log(this.imgSrc[1], 'imgimg')
} }
}) })
}, },
...@@ -233,7 +230,6 @@ export default { ...@@ -233,7 +230,6 @@ export default {
var params = {} var params = {}
params.materialId = this.routerInfo.id params.materialId = this.routerInfo.id
this.$apis.material.dataOverview(params).then(res => { this.$apis.material.dataOverview(params).then(res => {
// console.log(res);
this.overviewInfo = res this.overviewInfo = res
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!