chroe: adjust ins page
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
|
||||
|
||||
import { CONSTANT } from '@/constant'
|
||||
|
||||
class CommonUtils {
|
||||
|
||||
static formatInsConfigDisplay = (scope) => {
|
||||
@@ -15,6 +17,10 @@ class CommonUtils {
|
||||
}
|
||||
}
|
||||
|
||||
static formatWayName = (type) => {
|
||||
return CONSTANT.WAYS_DATA_MAP[type].label;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export { CommonUtils };
|
||||
|
||||
@@ -59,14 +59,14 @@
|
||||
<el-table :data="insTableData" empty-text="发信实例为空" style="width: 100%" max-height="300"
|
||||
:row-style="insRowStyle()">
|
||||
<el-table-column prop="way_name" label="渠道名" />
|
||||
<el-table-column prop="way_type" label="渠道+内容类型">
|
||||
<el-table-column prop="way_type" label="渠道+内容类型" width="140px">
|
||||
<template #default="scope">
|
||||
{{ scope.row.way_type }}+{{ scope.row.content_type }}
|
||||
{{ CommonUtils.formatWayName(scope.row.way_type) }}+{{ scope.row.content_type }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="way_type" label="额外信息">
|
||||
<template #default="scope">
|
||||
{{ formatExtraInfo(scope) }}
|
||||
{{ CommonUtils.formatInsConfigDisplay(scope) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作" width="60px">
|
||||
@@ -201,13 +201,13 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
const formatExtraInfo = (scope) => {
|
||||
return CommonUtils.formatInsConfigDisplay(scope);
|
||||
}
|
||||
// const formatExtraInfo = (scope) => {
|
||||
// return CommonUtils.formatInsConfigDisplay(scope);
|
||||
// }
|
||||
|
||||
return {
|
||||
...toRefs(state), handleCancer, handleSubmit,
|
||||
searchID, formatExtraInfo, CONSTANT,
|
||||
searchID, CONSTANT, CommonUtils,
|
||||
clickStore, insRowStyle
|
||||
};
|
||||
},
|
||||
|
||||
@@ -61,14 +61,14 @@
|
||||
<el-table :data="insTableData" empty-text="发信实例为空" style="width: 100%" max-height="300"
|
||||
:row-style="insRowStyle()">
|
||||
<el-table-column prop="way_name" label="渠道名" />
|
||||
<el-table-column prop="way_type" label="渠道+内容类型" width="120px">
|
||||
<el-table-column prop="way_type" label="渠道+内容类型" width="140px">
|
||||
<template #default="scope">
|
||||
{{ scope.row.way_type }}+{{ scope.row.content_type }}
|
||||
{{ CommonUtils.formatWayName(scope.row.way_type) }}+{{ scope.row.content_type }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="way_type" label="额外信息">
|
||||
<template #default="scope">
|
||||
{{ formatExtraInfo(scope) }}
|
||||
{{ CommonUtils.formatInsConfigDisplay(scope) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="status" width="60px">
|
||||
@@ -188,9 +188,9 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
const formatExtraInfo = (scope) => {
|
||||
return CommonUtils.formatInsConfigDisplay(scope);
|
||||
}
|
||||
// const formatExtraInfo = (scope) => {
|
||||
// return CommonUtils.formatInsConfigDisplay(scope);
|
||||
// }
|
||||
|
||||
const searchID = async () => {
|
||||
const rsp = await request.get('/sendways/get', { params: { id: state.searchWayID } });
|
||||
@@ -242,8 +242,8 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state), handleCancer, handleAddSubmit, handleEditTask, CONSTANT,
|
||||
searchID, handleDelete, insRowStyle, formatExtraInfo, updateInsEnableStatus
|
||||
...toRefs(state), handleCancer, handleAddSubmit, handleEditTask, CONSTANT, CommonUtils,
|
||||
searchID, handleDelete, insRowStyle, updateInsEnableStatus
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<hr />
|
||||
<div ref="refContainer">
|
||||
<el-table :data="tableData" stripe empty-text="发信渠道为空" :row-style="rowStyle()">
|
||||
<el-table-column label="ID" >
|
||||
<el-table-column label="ID">
|
||||
<template #default="scope">
|
||||
{{ scope.row.id }}
|
||||
<el-icon>
|
||||
@@ -28,7 +28,11 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="渠道名" prop="name" />
|
||||
<el-table-column label="发信渠道" prop="type" />
|
||||
<el-table-column label="发信渠道" prop="type">
|
||||
<template #default="scope">
|
||||
{{ CommonUtils.formatWayName(scope.row.type) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="created_on" />
|
||||
<el-table-column fixed="right" label="操作" width="100px">
|
||||
<template #default="scope">
|
||||
@@ -63,6 +67,7 @@ import { CopyDocument } from '@element-plus/icons-vue'
|
||||
import { copyToClipboard } from '@/util/clipboard.js';
|
||||
import tableDeleteButton from '@/views/common/tableDeleteButton.vue'
|
||||
import { CONSTANT } from '@/constant'
|
||||
import { CommonUtils } from "@/util/commonUtils.js";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -145,7 +150,7 @@ export default {
|
||||
|
||||
return {
|
||||
...toRefs(state), handleEdit, handleDelete,
|
||||
clickAdd, rowStyle, handPageChange, filterFunc, copyToClipboard
|
||||
clickAdd, rowStyle, handPageChange, filterFunc, copyToClipboard, CommonUtils
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user