Commit 993f515f by 匡雅琴

第四轮bug修复

1 parent 4d9b1334
......@@ -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 => {
params.method = `${defaultPath}detail`
......@@ -173,5 +184,6 @@ export default {
readDetailPage,
dataOverview,
sendDetailPage,
findAllDictData
findAllDictData,
getListEntBusinessType
}
......@@ -63,7 +63,7 @@
</span>
</span>
<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-form-item>
<el-form-item prop="isNotifySender">
......@@ -248,7 +248,8 @@ export default {
this.title = this.titleObj[this.routeInfo.addOrEdit]
this.materialInsert()
this.getMaterialList()
this.findAllDictData('business_type')
// this.findAllDictData('business_type')
this.getListEntBusinessType()
},
methods: {
getParams() {
......@@ -345,15 +346,22 @@ export default {
})
},
// 获取所有业务类型
findAllDictData(dictType) {
var params = {
dictType
}
this.$apis.material.findAllDictData(params).then(res => {
// findAllDictData(dictType) {
// var params = {
// dictType
// }
// 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 (dictType == 'business_type') {
this.businessTypes = res
}
this.businessTypes = res
}
})
},
......
......@@ -149,9 +149,9 @@ export default {
type: 'select',
placeholder: '全部',
optionList: [],
optionId: 'dictValue',
optionLabel: 'dictLabel',
optionsName: 'dictValue'
optionId: 'id',
optionLabel: 'businessName',
optionsName: 'businessName'
},
{
label: '素材类型:',
......@@ -361,7 +361,8 @@ export default {
let offTop = document.querySelector('.tabelList').offsetTop
this.boxHeight = clientHeight - offTop - 80 + 'px'
this.tableHeight = clientHeight - offTop - 132 + 'px'
this.findAllDictData('business_type')
// this.findAllDictData('business_type')
this.getListEntBusinessType()
this.firstCome()
this.getListApi()
},
......@@ -387,17 +388,30 @@ export default {
this.$refs.materialGroup.currentIndex = null
},
// 获取所有业务类型
findAllDictData(dictType) {
var params = {
dictType
}
this.$apis.material.findAllDictData(params).then(res => {
// findAllDictData(dictType) {
// var params = {
// dictType
// }
// 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) {
this.businessTypes = res
let idx = this.materialFormData.findIndex(item => item.name == 'businessType')
res.unshift({
dictValue: '',
dictLabel: '全部'
id: '',
businessName: '全部'
})
this.materialFormData[idx].optionList = res
}
......
......@@ -255,7 +255,6 @@ export default {
this.startTime = startTime
this.endTime = endTime
}
console.log(this.endTime)
this.$apis.material.dataOverview(params).then(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!