Commit c57ac995 by 匡雅琴

提交

1 parent 5539d9c9
...@@ -66,7 +66,8 @@ const materialDelete = params => { ...@@ -66,7 +66,8 @@ const materialDelete = params => {
url: 'rop-scrm-marketing/router', url: 'rop-scrm-marketing/router',
method: 'post', method: 'post',
data: params, data: params,
sign: true sign: true,
returnAll: true
}) })
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<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">
<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>
</el-radio-group> </el-radio-group>
<!-- 选择PDF --> <!-- 选择PDF -->
...@@ -29,18 +29,19 @@ ...@@ -29,18 +29,19 @@
<input type="file" style="opacity: 0" accept=".pdf" @change="e => handlePdfChange(e)" /> <input type="file" style="opacity: 0" accept=".pdf" @change="e => handlePdfChange(e)" />
<el-button icon="el-icon-plus" :size="size">选择文件</el-button> <el-button icon="el-icon-plus" :size="size">选择文件</el-button>
</div> </div>
<div v-if="materialAddForm.materialUrl">{{ materialAddForm.materialUrl }}</div>
</div> </div>
<!-- 选择自定义链接 --> <!-- 选择自定义链接 -->
<div v-show="materialAddForm.materialType == 2"> <!-- <div v-show="materialAddForm.materialType == 2">
<el-form :model="linkForm" :rules="linkRules" ref="linkForm" label-width="100px"> <el-form :model="linkForm" :rules="linkRules" ref="linkForm" label-width="100px">
<el-form-item label="链接地址" prop="link"> <el-form-item label="链接地址" prop="link">
<el-input v-model="linkForm.link" placeholder="请填写跳转链接" maxlength="150" show-word-limit></el-input> <el-input v-model="linkForm.link" placeholder="请填写跳转链接" maxlength="150" show-word-limit></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div> -->
<!-- 选择图文 --> <!-- 选择图文 -->
<div v-show="materialAddForm.materialType == 3"> <div v-show="materialAddForm.materialType == 3">
<textBox @change="writeChange"></textBox> <textBox @change="writeChange" ref="textBox"></textBox>
</div> </div>
<div class="space"></div> <div class="space"></div>
</el-form-item> </el-form-item>
...@@ -59,7 +60,7 @@ ...@@ -59,7 +60,7 @@
</span> </span>
</span> </span>
<el-checkbox-group v-model="materialAddForm.businessType"> <el-checkbox-group v-model="materialAddForm.businessType">
<el-checkbox v-for="value in businessTypes" :key="value.id" :label="value.dictLabel"></el-checkbox> <el-checkbox v-for="value in businessTypes" :key="value.dictValue" :label="value.dictValue">{{ value.dictLabel }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item prop="isNotifySender"> <el-form-item prop="isNotifySender">
...@@ -89,16 +90,16 @@ ...@@ -89,16 +90,16 @@
<span class="track-tips track-info">(最多支持3个标签)</span> <span class="track-tips track-info">(最多支持3个标签)</span>
<!-- 选择标签展示 --> <!-- 选择标签展示 -->
<div> <div>
<span v-show="tagging.length != 0">
<span v-for="(tag, idx) in tagging" :key="idx">
<el-tag class="tag-show" v-for="(tagItem, idx1) in tag.labelList" :key="idx1" :size="size" type="info" closable :disable-transitions="false" @close="removeTag(tag, idx1, idx)">{{ tagItem.name }}</el-tag>
</span>
</span>
<el-button :size="size" @click="openLabel"> <el-button :size="size" @click="openLabel">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
选择标签 选择标签
</el-button> </el-button>
</div> </div>
<div v-show="tagging.length != 0" :key="key" class="el-input-tag input-tag-wrapper">
<span v-for="(tag, idx) in tagging" :key="idx">
<el-tag v-for="(tagItem, idx1) in tag.labelList" :key="idx1" :size="size" type="info" closable :disable-transitions="false" @close="removeTag(tag, idx1, idx)">{{ tagItem.name }}</el-tag>
</span>
</div>
<div class="space"></div> <div class="space"></div>
</el-form-item> </el-form-item>
</div> </div>
...@@ -130,9 +131,9 @@ ...@@ -130,9 +131,9 @@
</el-form-item> </el-form-item>
<el-form-item label="封面:"> <el-form-item label="封面:">
<div class="img-div"> <div class="img-div">
<div class="put-img"> <div class="put-img" v-show="materialAddForm.titleUrl">
<!-- <img :src="titleUrl" @click="deleteImg" class="img-css" /> --> <img :src="materialAddForm.titleUrl" alt="" />
<div class="mask"> <div class="mask" v-if="materialAddForm.titleUrl">
<h3> <h3>
<img src="@/assets/material/view.png" alt="" /> <img src="@/assets/material/view.png" alt="" />
<img src="@/assets/material/dele.png" alt="" @click="deleteImg" /> <img src="@/assets/material/dele.png" alt="" @click="deleteImg" />
...@@ -156,7 +157,7 @@ ...@@ -156,7 +157,7 @@
<div class="content-title">{{ materialAddForm.materialTitle }}</div> <div class="content-title">{{ materialAddForm.materialTitle }}</div>
<div class="content-word">{{ materialAddForm.description }}</div> <div class="content-word">{{ materialAddForm.description }}</div>
</div> </div>
<div class="content-show-img"> <div class="content-show-img" v-show="materialAddForm.titleUrl">
<img :src="materialAddForm.titleUrl" alt="" /> <img :src="materialAddForm.titleUrl" alt="" />
</div> </div>
</div> </div>
...@@ -194,8 +195,6 @@ export default { ...@@ -194,8 +195,6 @@ export default {
dialogVisible: false, dialogVisible: false,
tagging: [], tagging: [],
urlSrc: '', urlSrc: '',
uploadPdfAction: '',
uploadImgAction: '',
materialAddForm: { materialAddForm: {
groupId: '', groupId: '',
groupName: '', groupName: '',
...@@ -210,11 +209,6 @@ export default { ...@@ -210,11 +209,6 @@ export default {
titleUrl: '' titleUrl: ''
}, },
groupCounter: [], groupCounter: [],
// 素材类型--链接
linkForm: {
link: ''
},
fileList: [],
// 分享设置显示 // 分享设置显示
descVisible: false, descVisible: false,
// 手机显示 // 手机显示
...@@ -224,7 +218,7 @@ export default { ...@@ -224,7 +218,7 @@ export default {
selectMaterialGroup: [{ required: true, message: '请选择素材组', trigger: 'change' }], selectMaterialGroup: [{ required: true, message: '请选择素材组', trigger: 'change' }],
materialName: [ materialName: [
{ required: true, message: '请输入素材名称', trigger: 'change' }, { required: true, message: '请输入素材名称', trigger: 'change' },
{ max: 5, message: '素材名称长度不能超过30', trigger: 'blur' } { max: 30, message: '素材名称长度不能超过30', trigger: 'blur' }
], ],
materialType: [{ required: true, message: '请选择素材类型', trigger: 'change' }], materialType: [{ required: true, message: '请选择素材类型', trigger: 'change' }],
businessType: [{ required: true, message: '请选择业务类型', trigger: 'change' }] businessType: [{ required: true, message: '请选择业务类型', trigger: 'change' }]
...@@ -257,17 +251,39 @@ export default { ...@@ -257,17 +251,39 @@ export default {
var params = {} var params = {}
params.id = this.routeInfo.id params.id = this.routeInfo.id
this.$apis.material.materialDetail(params).then(res => { this.$apis.material.materialDetail(params).then(res => {
// console.log(res,'1212121212'); console.log(res, '1212121212')
this.materialAddForm = res this.materialAddForm = res
if (res.businessType) { if (this.materialAddForm.businessType) {
this.materialAddForm.businessType = this.materialGroupAddForm.businessType.split(',') const businessTypeArr = this.materialAddForm.businessType.split(',')
this.materialAddForm.businessType = businessTypeArr.map(item => parseInt(item))
} else { } else {
this.materialGroupAddForm.businessType = [] this.materialAddForm.businessType = []
}
this.$refs.textBox.setEdit(this.materialAddForm.materialUrl)
if (this.materialAddForm.tagJson) {
this.taggingList = eval(this.materialAddForm.tagJson)
this.tagging = this.taggingList.map(item => {
return {
labelGroup: {
id: item.groupId,
name: item.groupName
},
labelList: [
{
id: item.labelId,
name: item.labelName
}
],
labelType: item.groupType
}
})
} }
if (res.isNotifySender == 0) { if (res.isNotifySender == 0) {
this.materialGroupAddForm.isNotifySender = true this.materialAddForm.isNotifySender = true
} else { } else {
this.materialGroupAddForm.isNotifySender = false this.materialAddForm.isNotifySender = false
} }
}) })
}, },
...@@ -331,7 +347,7 @@ export default { ...@@ -331,7 +347,7 @@ export default {
this.$apis.common.pictureUpload({ file: base64 }).then(res => { this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) { if (res) {
// console.log(res) // console.log(res)
this.materialAddForm.materialUrl = res.data this.materialAddForm.materialUrl = res
} }
}) })
} }
...@@ -354,7 +370,7 @@ export default { ...@@ -354,7 +370,7 @@ export default {
this.$apis.common.pictureUpload({ file: base64 }).then(res => { this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) { if (res) {
// console.log(res) // console.log(res)
this.materialAddForm.titleUrl = res.data this.materialAddForm.titleUrl = res
} }
}) })
} }
...@@ -393,11 +409,18 @@ export default { ...@@ -393,11 +409,18 @@ export default {
var params = this.getParams() var params = this.getParams()
params.status = 0 params.status = 0
params.isNotifySender = -1 params.isNotifySender = -1
params.tagJson = JSON.stringify(this.taggingList)
if (this.materialAddForm.isNotifySender) { if (this.materialAddForm.isNotifySender) {
params.isNotifySender = 0 params.isNotifySender = 0
} }
let material
if (params.id) {
material = 'materialEdit'
} else {
material = 'materialInsert'
}
console.log(params, 'paramsw2wwww') console.log(params, 'paramsw2wwww')
this.$apis.material.materialInsert(params).then(res => { this.$apis.material[material](params).then(res => {
if (res) { if (res) {
this.$message({ this.$message({
message: '创建成功', message: '创建成功',
...@@ -478,13 +501,56 @@ export default { ...@@ -478,13 +501,56 @@ export default {
}, },
// 删除上传图片 // 删除上传图片
deleteImg() { deleteImg() {
this.materialAddForm.imageUrl = '' this.materialAddForm.titleUrl = ''
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.input-tag-wrapper {
max-height: 75px;
overflow: auto;
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
padding: 5px 5px 0px 5px;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 450px;
display: flex;
align-items: center;
margin-top: 6px;
font-size: 14px;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
.el-tag {
margin-right: 4px;
height: 26px;
line-height: 24px;
margin-bottom: 5px;
// background: #fff !important;
}
.tag-input {
background: transparent;
border: none !important;
font-size: 14px;
height: 32px;
outline: none;
padding-left: 0;
width: 100px;
}
.creat-material, .creat-material,
.track, .track,
.share, .share,
...@@ -573,6 +639,11 @@ export default { ...@@ -573,6 +639,11 @@ export default {
.view-phone { .view-phone {
float: left; float: left;
margin-right: 8px; margin-right: 8px;
.task {
width: 104px;
height: 104px;
border-radius: 10px;
}
} }
.put-img { .put-img {
width: 104px; width: 104px;
...@@ -580,12 +651,9 @@ export default { ...@@ -580,12 +651,9 @@ export default {
border-radius: 10px; border-radius: 10px;
display: inline-block; display: inline-block;
position: relative; position: relative;
.img-css { img {
height: 100%; width: 104px;
width: 100%; height: 104px;
border-radius: 10px;
display: inline-block;
cursor: pointer;
} }
.mask { .mask {
position: absolute; position: absolute;
...@@ -601,6 +669,10 @@ export default { ...@@ -601,6 +669,10 @@ export default {
text-align: center; text-align: center;
margin-top: 30%; margin-top: 30%;
margin-left: 2px; margin-left: 2px;
img {
width: 16px;
height: 16px;
}
:last-child { :last-child {
padding-left: 12px; padding-left: 12px;
} }
...@@ -655,7 +727,7 @@ export default { ...@@ -655,7 +727,7 @@ export default {
} }
.view-phone { .view-phone {
margin-top: 75px; margin-top: 75px;
color: #5850ff color: #5850ff;
} }
.avatar { .avatar {
width: 178px; width: 178px;
...@@ -688,15 +760,21 @@ export default { ...@@ -688,15 +760,21 @@ export default {
&-img { &-img {
width: 30px; width: 30px;
height: 30px; height: 30px;
background-color: #5850ff; img {
width: 30px;
height: 30px;
}
} }
.content-title { .content-title {
width: 100px; max-width: 100px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
font-size: 10px; font-size: 10px;
margin-bottom: 4px; margin-bottom: 4px;
} }
.content-word { .content-word {
width: 100px; max-width: 100px;
font-size: 8px; font-size: 8px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<el-input v-model="materialGroupAddForm.materialGroupName" maxlength="8" show-word-limit :size="size" placeholder="客户跟进" style="width: 567px"></el-input> <el-input v-model="materialGroupAddForm.materialGroupName" maxlength="8" show-word-limit :size="size" placeholder="客户跟进" style="width: 567px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="业务类型:" prop="businessType"> <el-form-item label="业务类型:" prop="businessType">
<el-checkbox-group class="checkbox-group" v-model="materialGroupAddForm.businessType"> <el-checkbox-group class="checkbox-group" :max="3" v-model="materialGroupAddForm.businessType">
<el-checkbox v-for="item in businessTypes" :key="item.id" :label="item.dictLabel"></el-checkbox> <el-checkbox v-for="item in businessTypes" :key="item.id" :label="item.dictLabel"></el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
......
...@@ -18,7 +18,7 @@ export default { ...@@ -18,7 +18,7 @@ export default {
return { return {
url, url,
searchForm: { searchForm: {
materialId: this.materialId, materialId: this.$route.query.id,
employeeName: '' employeeName: ''
}, },
staffSendFormData: [ staffSendFormData: [
...@@ -70,7 +70,7 @@ export default { ...@@ -70,7 +70,7 @@ export default {
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
staffName: '', staffName: '',
materialId: this.materialId materialId: this.$route.query.id,
} }
this.handleSearch() this.handleSearch()
} }
......
...@@ -10,8 +10,9 @@ export default { ...@@ -10,8 +10,9 @@ export default {
name: 'textBox', name: 'textBox',
data() { data() {
return { return {
editor: '',
content: '', content: '',
editorOption: {}, editorOption: {}
} }
}, },
mounted() { mounted() {
...@@ -19,21 +20,26 @@ export default { ...@@ -19,21 +20,26 @@ export default {
}, },
methods: { methods: {
getEdit() { getEdit() {
var editor = new E('#div-demo') this.editor = new E('#div-demo')
editor.config.uploadImgShowBase64 = true this.editor.config.uploadImgShowBase64 = true
editor.config.showMenuTooltips = true this.editor.config.showMenuTooltips = true
editor.config.menuTooltipPosition = 'down' this.editor.config.menuTooltipPosition = 'down'
editor.config.height = 400 this.editor.config.height = 400
editor.config.width = 500 this.editor.config.width = 500
editor.config.uploadVideoServer = '/api/upload-video' this.editor.config.uploadVideoServer = '/api/upload-video'
editor.config.excludeMenus = ['code'] this.editor.config.excludeMenus = ['code']
editor.config.onchange = (html) => { this.editor.config.onchange = html => {
// console.log(html); // console.log(html);
this.content = html // 绑定当前逐渐地值 this.content = html // 绑定当前逐渐地值
this.$emit('change', this.content) // 将内容同步到父组件中 this.$emit('change', this.content) // 将内容同步到父组件中
} }
editor.config.onchangeTimeout = 5000; this.editor.config.onchangeTimeout = 5000
editor.create() this.editor.create()
},
setEdit(html) {
this.$nextTick(() => {
this.editor.txt.html(html)
})
} }
} }
} }
...@@ -43,7 +49,7 @@ export default { ...@@ -43,7 +49,7 @@ export default {
#div-demo { #div-demo {
margin: 16px 300px 0 0; margin: 16px 300px 0 0;
} }
.el-form .editor{ .el-form .editor {
margin-top: 20px; margin-top: 20px;
} }
.myQuillEditor { .myQuillEditor {
...@@ -51,3 +57,8 @@ export default { ...@@ -51,3 +57,8 @@ export default {
height: 200px; height: 200px;
} }
</style> </style>
<style>
.w-e-text-container {
z-index: 1!important;
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<glsx-combi-form ref="materialFormRef1" :isEdit="isEdit" :formObj="searchForm" :formData="materialFormData1" :inline="true"></glsx-combi-form> <glsx-combi-form ref="materialFormRef1" :isEdit="isEdit" :formObj="searchForm" :formData="materialFormData1" :inline="true"></glsx-combi-form>
<glsx-combi-form ref="materialFormRef2" :isEdit="isEdit" :formObj="searchForm" :formData="materialFormData2" :inline="true"> <glsx-combi-form ref="materialFormRef2" :isEdit="isEdit" :formObj="searchForm" :formData="materialFormData2" :inline="true">
<span slot="footer" slot-scope="scope" class="select-pro"> <span slot="footer" slot-scope="scope" class="select-pro">
<el-button type="primary" :size="size" @click="handleSearch(scope)">查询</el-button> <el-button type="primary" :size="size" @click="getListApi">查询</el-button>
<el-button type="default" :size="size" @click="handleReset(scope)">重置</el-button> <el-button type="default" :size="size" @click="handleReset(scope)">重置</el-button>
</span> </span>
</glsx-combi-form> </glsx-combi-form>
...@@ -30,19 +30,23 @@ ...@@ -30,19 +30,23 @@
<el-col :span="19"> <el-col :span="19">
<div class="right" :style="{ height: boxHeight }"> <div class="right" :style="{ height: boxHeight }">
<div class="groupTitle">{{ materialGroupName ? materialGroupName : '新车素材组' }}(共{{ materialTableData.length }}条数据)</div> <div class="groupTitle">{{ materialGroupName ? materialGroupName : '新车素材组' }}(共{{ materialTableData.length }}条数据)</div>
<GLTable ref="materialRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :tableData="materialTableData" :pageConf="pageConf" :tableTotal="tableTotal" @sortChange="sortChange" :isCustomHead="true" :customHeadShowList="customHeadShowList"> <GLTable ref="materialRef" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :tableData="materialTableData" :pageConf="pageConf" :tableTotal="tableTotal" @sortChange="sortChange" :isCustomHead="true" :customHeadShowList="customHeadShowList">
<!-- 素材内容 --> <!-- 素材内容 -->
<div slot="materialContentRpcResponse" slot-scope="scope"> <div slot="materialContentRpcResponse" slot-scope="scope" style="text-align: center">
<!-- 素材为PDF --> <!-- 素材为PDF -->
<span v-if="scope.scope.materialType == 1"> <span v-if="scope.scope.materialType == 1" class="material-content">
<span>{{ scope.scope.materialContentRpcResponse.materialName }}</span> <el-tooltip effect="dark" placement="top" :content="scope.scope.materialContentRpcResponse.materialName" :disabled="scope.scope.materialContentRpcResponse.materialName < 16">
<span class="hide-content">{{ scope.scope.materialContentRpcResponse.materialName }}</span>
</el-tooltip>
<img src="@/assets/material/pdf.png" alt=""> <img src="@/assets/material/pdf.png" alt="">
</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"> <span v-if="scope.scope.materialType == 3" class="material-content">
<el-tooltip effect="dark" placement="top" :content="scope.scope.materialContentRpcResponse.materialName" :disabled="scope.scope.materialContentRpcResponse.materialName < 16">
<span>{{ scope.scope.materialContentRpcResponse.materialName }}</span> <span>{{ scope.scope.materialContentRpcResponse.materialName }}</span>
</el-tooltip>
<img src="@/assets/material/car.png" alt=""> <img src="@/assets/material/car.png" alt="">
</span> </span>
</div> </div>
...@@ -111,7 +115,6 @@ export default { ...@@ -111,7 +115,6 @@ export default {
introductionDialog: false, introductionDialog: false,
boxHeight: '', boxHeight: '',
businessTypes: [], businessTypes: [],
getListApi: this.$apis.material.materialList,
materialGroupName: '', materialGroupName: '',
materialFormData1: [ materialFormData1: [
{ {
...@@ -305,7 +308,8 @@ export default { ...@@ -305,7 +308,8 @@ export default {
this.boxHeight = clientHeight - offTop + 'px' this.boxHeight = clientHeight - offTop + 'px'
this.findAllDictData('business_type') this.findAllDictData('business_type')
this.firstCome() this.firstCome()
this.getListApi()
console.log(this.$refs.materialRef, '12312');
}, },
methods: { methods: {
// 判断是否第一次进入 // 判断是否第一次进入
...@@ -316,9 +320,9 @@ export default { ...@@ -316,9 +320,9 @@ export default {
} }
}, },
// 搜索 // 搜索
handleSearch() { // handleSearch() {
this.$refs.materialRef.refreshTable() // this.$refs.materialRef.refreshTable()
}, // },
// 重置 // 重置
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
...@@ -327,7 +331,7 @@ export default { ...@@ -327,7 +331,7 @@ export default {
status: '', status: '',
materialName: '' materialName: ''
} }
this.handleSearch() this.getListApi()
}, },
// 获取所有业务类型 // 获取所有业务类型
findAllDictData(dictType) { findAllDictData(dictType) {
...@@ -404,6 +408,18 @@ export default { ...@@ -404,6 +408,18 @@ export default {
this.materialTableData = this.materialTableData.sort((a, b) => a[fieldName] - b[fieldName]) this.materialTableData = this.materialTableData.sort((a, b) => a[fieldName] - b[fieldName])
} }
}, },
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
return params
},
getListApi() {
var params = this.getParams()
params.pageSize = 10,
params.pageNum = 1
this.$apis.material.materialList(params).then(res => {
this.materialTableData = res.data
})
},
// 点击素材组获取素材组素材 // 点击素材组获取素材组素材
getList(params, item) { getList(params, item) {
console.log(item, '7758') console.log(item, '7758')
...@@ -412,7 +428,7 @@ export default { ...@@ -412,7 +428,7 @@ export default {
this.$apis.material.materialList(params).then(res => { this.$apis.material.materialList(params).then(res => {
this.materialTableData = res.data this.materialTableData = res.data
}) })
this.handleSearch() // this.handleSearch()
}, },
// 功能介绍弹框 // 功能介绍弹框
showIntroductionDialog() { showIntroductionDialog() {
...@@ -436,7 +452,7 @@ export default { ...@@ -436,7 +452,7 @@ export default {
}) })
if (res.code == '0') { if (res.code == '0') {
fn && fn() fn && fn()
this.handleSearch() this.getListApi()
} }
}) })
} }
...@@ -492,4 +508,19 @@ export default { ...@@ -492,4 +508,19 @@ export default {
.btn-more { .btn-more {
margin-left: 10px; margin-left: 10px;
} }
.material-content {
display: flex;
justify-content: space-between;
.hide-content {
display: inline-block;
max-width: 200px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
img {
width: 36px;
height: 36px;
}
}
</style>> </style>>
\ No newline at end of file \ No newline at end of file
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
<div class="content-item-desc" v-if="detailInfo.materialType == 3" v-html="detailInfo.materialUrl"></div> <div class="content-item-desc" v-if="detailInfo.materialType == 3" v-html="detailInfo.materialUrl"></div>
</div> </div>
<div class="content-item-image"> <div class="content-item-image">
<img src="@/assets/material/car.png" alt="" v-if="detailInfo.materialType == 3"> <img src="@/assets/material/car.png" alt="" v-if="detailInfo.materialType == 3" />
<img src="@/assets/material/pdf.png" alt="" v-if="detailInfo.materialType == 1"> <img src="@/assets/material/pdf.png" alt="" v-if="detailInfo.materialType == 1" />
</div> </div>
</div> </div>
</div> </div>
...@@ -139,7 +139,16 @@ ...@@ -139,7 +139,16 @@
</div> </div>
</div> </div>
<el-dialog :visible.sync="visibleImg" width="50%" :before-close="handleClose"> <el-dialog :visible.sync="visibleImg" width="50%" :before-close="handleClose">
<div slot="title" style="height: 18px"></div> <div slot="title" class="phone-view">
<img class="img-phone" src="@/assets/phone.png" alt="" />
<div class="phone-content">
<div>{{ detailInfo.materialName }}</div>
<div v-if="detailInfo.materialType == 3" v-html="detailInfo.materialUrl"></div>
<div>
<img src="@/assets/material/car.png" alt="" />
</div>
</div>
</div>
</el-dialog> </el-dialog>
<GLFooter> <GLFooter>
<el-button @click="goback" type="primary">返回</el-button> <el-button @click="goback" type="primary">返回</el-button>
...@@ -161,7 +170,7 @@ export default { ...@@ -161,7 +170,7 @@ export default {
return { return {
activeName: 'staffSendDetail', activeName: 'staffSendDetail',
detailVisible: true, detailVisible: true,
visibleImg: true, visibleImg: false,
selectTime: [], selectTime: [],
routerInfo: '', routerInfo: '',
detailInfo: {}, detailInfo: {},
...@@ -179,7 +188,7 @@ export default { ...@@ -179,7 +188,7 @@ export default {
var params = {} var params = {}
params.id = this.routerInfo.id params.id = this.routerInfo.id
this.$apis.material.materialDetail(params).then(res => { this.$apis.material.materialDetail(params).then(res => {
console.log(res, 'dhakfh'); console.log(res, 'dhakfh')
this.detailInfo = res this.detailInfo = res
}) })
}, },
...@@ -204,9 +213,7 @@ export default { ...@@ -204,9 +213,7 @@ export default {
this.overviewInfo = res this.overviewInfo = res
}) })
}, },
handleClick() { handleClick() {},
},
detailShowVisible() { detailShowVisible() {
this.detailVisible = !this.detailVisible this.detailVisible = !this.detailVisible
}, },
...@@ -220,7 +227,11 @@ export default { ...@@ -220,7 +227,11 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.materialDetail, .materialDetail,
.summarization-containner { .summarization-containner {
background-color: #fff;
background-color: #fff;
&:nth-child(2) {
margin-bottom: 80px;
}
} }
.matrial-detail-unfold { .matrial-detail-unfold {
cursor: pointer; cursor: pointer;
...@@ -346,12 +357,13 @@ export default { ...@@ -346,12 +357,13 @@ export default {
color: #333333; color: #333333;
line-height: 21px; line-height: 21px;
} }
h4 { h2 {
height: 26px; height: 26px;
font-size: 26px; font-size: 26px;
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
line-height: 31px; line-height: 30px;
margin: 10px 0px;
} }
&-num { &-num {
font-size: 16px; font-size: 16px;
...@@ -393,4 +405,20 @@ export default { ...@@ -393,4 +405,20 @@ export default {
color: #999999; color: #999999;
line-height: 20px; line-height: 20px;
} }
.phone-view {
height: 600px;
position: relative;
.img-phone {
height: 80%;
width: 40%;
position: absolute;
top: 10%;
left: 25%;
}
.phone-content {
position: absolute;
top: 20%;
left: 30%;
}
}
</style> </style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!