Commit 993f515f by 匡雅琴

第四轮bug修复

1 parent 4d9b1334
...@@ -71,6 +71,17 @@ const materialDelete = params => { ...@@ -71,6 +71,17 @@ const materialDelete = params => {
}) })
} }
// 获取业务类型
const getListEntBusinessType = (params = {}) => {
params.method = 'entmicro.api.staff.listEntBusinessType'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//素材详情 //素材详情
const materialDetail = params => { const materialDetail = params => {
params.method = `${defaultPath}detail` params.method = `${defaultPath}detail`
...@@ -173,5 +184,6 @@ export default { ...@@ -173,5 +184,6 @@ export default {
readDetailPage, readDetailPage,
dataOverview, dataOverview,
sendDetailPage, sendDetailPage,
findAllDictData findAllDictData,
getListEntBusinessType
} }
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,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.dictValue" :label="value.dictValue">{{ value.dictLabel }}</el-checkbox> <el-checkbox v-for="value in businessTypes" :key="value.businessName" :label="value.id">{{ value.businessName }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item prop="isNotifySender"> <el-form-item prop="isNotifySender">
...@@ -248,7 +248,8 @@ export default { ...@@ -248,7 +248,8 @@ export default {
this.title = this.titleObj[this.routeInfo.addOrEdit] this.title = this.titleObj[this.routeInfo.addOrEdit]
this.materialInsert() this.materialInsert()
this.getMaterialList() this.getMaterialList()
this.findAllDictData('business_type') // this.findAllDictData('business_type')
this.getListEntBusinessType()
}, },
methods: { methods: {
getParams() { getParams() {
...@@ -345,16 +346,23 @@ export default { ...@@ -345,16 +346,23 @@ export default {
}) })
}, },
// 获取所有业务类型 // 获取所有业务类型
findAllDictData(dictType) { // findAllDictData(dictType) {
var params = { // var params = {
dictType // dictType
} // }
this.$apis.material.findAllDictData(params).then(res => { // this.$apis.material.findAllDictData(params).then(res => {
// if (res) {
// if (dictType == 'business_type') {
// this.businessTypes = res
// }
// }
// })
// },
getListEntBusinessType() {
this.$apis.material.getListEntBusinessType({}).then(res => {
if (res) { if (res) {
if (dictType == 'business_type') {
this.businessTypes = res this.businessTypes = res
} }
}
}) })
}, },
// 素材类型切换 // 素材类型切换
......
...@@ -149,9 +149,9 @@ export default { ...@@ -149,9 +149,9 @@ export default {
type: 'select', type: 'select',
placeholder: '全部', placeholder: '全部',
optionList: [], optionList: [],
optionId: 'dictValue', optionId: 'id',
optionLabel: 'dictLabel', optionLabel: 'businessName',
optionsName: 'dictValue' optionsName: 'businessName'
}, },
{ {
label: '素材类型:', label: '素材类型:',
...@@ -361,7 +361,8 @@ export default { ...@@ -361,7 +361,8 @@ export default {
let offTop = document.querySelector('.tabelList').offsetTop let offTop = document.querySelector('.tabelList').offsetTop
this.boxHeight = clientHeight - offTop - 80 + 'px' this.boxHeight = clientHeight - offTop - 80 + 'px'
this.tableHeight = clientHeight - offTop - 132 + 'px' this.tableHeight = clientHeight - offTop - 132 + 'px'
this.findAllDictData('business_type') // this.findAllDictData('business_type')
this.getListEntBusinessType()
this.firstCome() this.firstCome()
this.getListApi() this.getListApi()
}, },
...@@ -387,17 +388,30 @@ export default { ...@@ -387,17 +388,30 @@ export default {
this.$refs.materialGroup.currentIndex = null this.$refs.materialGroup.currentIndex = null
}, },
// 获取所有业务类型 // 获取所有业务类型
findAllDictData(dictType) { // findAllDictData(dictType) {
var params = { // var params = {
dictType // dictType
} // }
this.$apis.material.findAllDictData(params).then(res => { // this.$apis.material.findAllDictData(params).then(res => {
// if (res) {
// this.businessTypes = res
// let idx = this.materialFormData.findIndex(item => item.name == 'businessType')
// res.unshift({
// dictValue: '',
// dictLabel: '全部'
// })
// this.materialFormData[idx].optionList = res
// }
// })
// },
getListEntBusinessType() {
this.$apis.material.getListEntBusinessType({}).then(res => {
if (res) { if (res) {
this.businessTypes = res this.businessTypes = res
let idx = this.materialFormData.findIndex(item => item.name == 'businessType') let idx = this.materialFormData.findIndex(item => item.name == 'businessType')
res.unshift({ res.unshift({
dictValue: '', id: '',
dictLabel: '全部' businessName: '全部'
}) })
this.materialFormData[idx].optionList = res this.materialFormData[idx].optionList = res
} }
......
...@@ -255,7 +255,6 @@ export default { ...@@ -255,7 +255,6 @@ export default {
this.startTime = startTime this.startTime = startTime
this.endTime = endTime this.endTime = endTime
} }
console.log(this.endTime)
this.$apis.material.dataOverview(params).then(res => { this.$apis.material.dataOverview(params).then(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!