优化邮箱详情表格
This commit is contained in:
@@ -66,7 +66,7 @@
|
||||
<el-button :size="size" type="info" icon="el-icon-RefreshRight" @click="reset">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table class="scTable" :header-cell-class-name="setClassName" :data="emailData.rows" ref="table" :row-key="rowKey" :key="toggleIndex" :header-cell-style="{'background': '#F5F7FA','color':'#606266'}" @selection-change="selectionChange" stripe :size="size">
|
||||
<el-table class="scTable" :header-cell-class-name="setClassName" :data="emailData.rows" ref="table" :row-key="rowKey" :key="toggleIndex" :header-cell-style="{'background': '#F5F7FA','color':'#606266'}" @selection-change="selectionChange" :size="config.size" :border="config.config.border" :stripe="config.config.stripe">
|
||||
<el-table-column type="selection" align="center" width="45" :selectable="selectable"></el-table-column>
|
||||
<el-table-column label="序号" align="center" type="index" :index="customIndexMethod"></el-table-column>
|
||||
<template v-for="(item, index) in userColumn" :key="index">
|
||||
@@ -96,7 +96,7 @@
|
||||
<span v-if="item.prop == 'is_confirm'" :class="{'success':scope.row[item.prop],'danger':!scope.row[item.prop]}">
|
||||
{{scope.row[item.prop]?'已确认':'未确认'}}
|
||||
</span>
|
||||
<span v-else>scope.row[item.prop]</span>
|
||||
<span v-else>{{ scope.row[item.prop] }}</span>
|
||||
</slot>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -312,7 +312,7 @@ export default {
|
||||
const emailHeight = this.$refs.emailMain;
|
||||
const remainingDistance = scrollbar.$el.scrollHeight + event.scrollTop + 100;
|
||||
if (remainingDistance > emailHeight.clientHeight) {
|
||||
this.loadMore();
|
||||
this.loadMore();
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -327,7 +327,9 @@ export default {
|
||||
emailChange(item,isChange) {
|
||||
this.emailId = isChange?item.id:this.emailId>0?this.emailId:item.id;
|
||||
this.searchData = {};
|
||||
this.$refs.scSearch.reload();
|
||||
if(this.$refs.scSearch){
|
||||
this.$refs.scSearch.reload();
|
||||
}
|
||||
this.getEmailData();
|
||||
},
|
||||
async getEmailData() {
|
||||
@@ -345,6 +347,10 @@ export default {
|
||||
this.userColumn = res.data.columnConfig;
|
||||
res.data.mail_info[0].text = this.stripHtmlTags(res.data.mail_info[0].summary)
|
||||
this.emailParams = res.data.mail_info[0];
|
||||
|
||||
if(res.data.tableConfig && res.data.tableConfig.size){
|
||||
this.config = res.data.tableConfig;
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
},
|
||||
@@ -490,7 +496,8 @@ export default {
|
||||
async columnSettingSave(userColumn){
|
||||
this.$refs.columnSetting.isSave = true
|
||||
try {
|
||||
await config.columnSettingSave(this.tableName, userColumn,this.apiObj);
|
||||
let apiObj = this.$API.orders.order.mail.detail;
|
||||
await config.columnSettingSave('', userColumn, apiObj, {mail_data_id:this.emailId});
|
||||
this.$message.success('保存成功')
|
||||
}catch(error){
|
||||
this.$message.error('保存失败')
|
||||
@@ -502,7 +509,8 @@ export default {
|
||||
async columnSettingBack(userColumn){
|
||||
this.$refs.columnSetting.isSave = true
|
||||
try {
|
||||
const column = await config.columnSettingReset(this.tableName, userColumn,this.apiObj)
|
||||
let apiObj = this.$API.orders.order.mail.detail;
|
||||
const column = await config.columnSettingReset('', userColumn, apiObj, {mail_data_id:this.emailId})
|
||||
if(column){
|
||||
this.userColumn = column
|
||||
this.$refs.columnSetting.usercolumn = JSON.parse(JSON.stringify(this.userColumn||[]))
|
||||
@@ -515,7 +523,8 @@ export default {
|
||||
},
|
||||
async configSizeChange() {
|
||||
try {
|
||||
await config.columnSettingConfigSave(this.tableName, this.config, this.apiObj);
|
||||
let apiObj = this.$API.orders.order.mail.detail;
|
||||
await config.columnSettingConfigSave('', this.config, apiObj, {mail_data_id:this.emailId});
|
||||
this.$message.success('保存成功')
|
||||
} catch (error) {
|
||||
this.$message.error('保存失败')
|
||||
|
||||
Reference in New Issue
Block a user