Commit f4492849 by 杨明

fixed

1 parent 64b26969
......@@ -335,7 +335,6 @@ export default {
line-height: 24px;
font-size: 14px;
color: #666;
max-width: 200px;
// text-overflow: ellipsis;
// overflow: hidden;
// white-space: nowrap;
......
......@@ -23,7 +23,7 @@
</el-form-item>
</el-form>
<div class="table-content">
<GLTable v-loading="loading" ref="crowdTable" :tableData="tableData" @refreshTable="search" :tableTotal="tableTotal" :layout="layout" :tableParams="crowdTableParams" :hasNum="true" :pageConf="pageConf" :noDataImg="url" @selectionTable="handleSelectionTable" @row-click="rowClick"></GLTable>
<GLTable v-loading="loading" ref="crowdTable" :tableData="tableData" @refreshTable="getCrowdList" :tableTotal="tableTotal" :layout="layout" :tableParams="crowdTableParams" :hasNum="true" :pageConf="pageConf" :noDataImg="url" @selectionTable="handleSelectionTable" @row-click="rowClick"></GLTable>
</div>
</div>
</div>
......@@ -109,15 +109,16 @@ export default {
})
},
// this.$refs.crowdTable.tableHeightValues = '250'
getCrowdList() {
getCrowdList(page = { pageNum: 1, pageSize: 10 }) {
this.$refs.crowdTable.page = page
var params = {
req: {
keyword: this.searchForm.keyword,
merchantId: this.$globalState.session.merchantId,
crowdType: 3,
filterType: 2,
pageSize: this.$refs.crowdTable.page.pageSize,
pageNum: this.$refs.crowdTable.page.pageNum
pageSize: page.pageSize,
pageNum: page.pageNum
}
}
......@@ -214,7 +215,7 @@ export default {
this.$refs.crowdTable.$refs.crowdlistMutiTable.toggleRowSelection(row)
},
search() {
this.getCrowdList()
this.getCrowdList({ pageNum: 1, pageSize: 10 })
},
handleConfirm() {
// console.log(this.innerTags)
......
......@@ -17,7 +17,7 @@ export const fetchConfig = function(isEnv = true) {
Object.assign(request, { timeout })
return Promise.resolve(cfg)
}
return new Http({ request: { timeout: 100000 } }).get('https://oss-config.dev.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config')
return new Http({ request: { timeout: 100000 } }).get('https://oss-config.test.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config')
// return new Http({ request: { timeout: 100000 } }).get('https://oss-config.dev.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config')
}
export const config = {
......
......@@ -121,13 +121,13 @@ export default {
{
label: '今日新增客户数',
prop: 'yesterdayNum',
width: '120px',
width: '130px',
addHtml: 'yesterdayNum'
},
{
label: '总新增客户数',
prop: 'totalNum',
width: '150px',
width: '120px',
addHtml: 'totalNum'
},
{
......@@ -151,12 +151,12 @@ export default {
{
label: '创建时间',
prop: 'createdTime',
width: '160px'
width: '180px'
},
{
label: '操作',
prop: 'optionBtns',
width: '140px',
width: '220px',
addHtml: 'optionBtns',
fixed: 'right'
}
......
......@@ -280,6 +280,14 @@ const validateTime = (rule, value, callback) => {
callback()
}
}
const validateContent = (rule, value, callback) => {
console.log(value)
if (value == `【${Vue.prototype.$globalState.session.merchantName}】`) {
callback(new Error('请选择短信模板'))
} else {
callback()
}
}
export default {
name: 'config',
components: {
......@@ -312,7 +320,7 @@ export default {
footerWidth: 0,
addForm: {
desc: '',
content: '',
content: `【${this.$globalState.session.merchantName}】`,
time: ['9:00:00', '18:00:00']
},
content: [],
......@@ -333,7 +341,10 @@ export default {
{ required: true, message: '请选择营销时间', trigger: 'change' },
{ validator: validateTime, trigger: 'change' }
],
content: [{ required: true, message: '请选择短信模板', trigger: 'change' }]
content: [
{ required: true, message: '请选择短信模板', trigger: 'change' },
{ validator: validateContent, trigger: 'blur' }
]
}
}
},
......@@ -386,12 +397,18 @@ export default {
},
crowding: {
handler() {
console.log(this.crowding)
if (this.crowding.length == 0) {
this.contactNum = 0
return
}
this.handleSaveImport()
},
deep: true
},
labeling: {
handler: function() {
handler() {
console.log(this.labeling.length)
if (this.labeling.length == 0) {
this.contactNum = 0
this.filterTagging = []
......@@ -417,7 +434,7 @@ export default {
deep: true
},
selectType(newVal, oldVal) {
if ((oldVal == 2 && this.labeling.length > 0) || (oldVal == 3 && this.crowding.length > 0)) {
if ((oldVal == 1 && this.labeling.length > 0) || (oldVal == 3 && this.crowding.length > 0)) {
this.$confirm('更换指定方式将重置客户列表', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
......@@ -463,7 +480,7 @@ export default {
},
handleCancel() {
console.log(this.saveStatus)
if (this.saveStatus || (this.$refs.welcome.previewList.length > 0 && this.editStatus)) {
if (this.saveStatus || (this.$refs.welcome && this.$refs.welcome.previewList.length > 0 && this.editStatus)) {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
......@@ -542,7 +559,6 @@ export default {
},
handleSaveImport() {
const groupIds = this.crowding.map(item => item.crowdId)
if (groupIds.length == 0) return
this.loading = true
let params = {
exportUrl: this.exportUrl,
......@@ -550,6 +566,12 @@ export default {
filterTagging: JSON.stringify(this.filterTagging),
groupIds
}
if (params.filterTagging && params.filterTagging == '[]') {
delete params.filterTagging
}
if (params.groupIds && params.groupIds.length == 0) {
delete params.groupIds
}
this.$apis.marketing.exportAdd(params).then(res => {
if (res) {
if (this.selectType == 1) {
......@@ -560,6 +582,8 @@ export default {
this.ExportDracImResponse = res
this.importStatus = true
}
} else {
this.contactNum = 0
}
this.loading = false
})
......@@ -630,6 +654,12 @@ export default {
content
}
}
if (params.filterTagging && params.filterTagging == '[]') {
delete params.filterTagging
}
if (params.groupIds && params.groupIds.length == 0) {
delete params.groupIds
}
const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList
const attachmentList = previewList.map(item => {
if (item.attType == 1) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!