更新
This commit is contained in:
parent
9ca68e5a8d
commit
c9d9c78028
@ -14,12 +14,12 @@ export const columns = [
|
||||
{
|
||||
label: '消息标题',
|
||||
prop: 'title',
|
||||
width: 250,
|
||||
minWidth: 250,
|
||||
},
|
||||
{
|
||||
label: '消息状态',
|
||||
prop: 'status',
|
||||
width: 100,
|
||||
minWidth: 100,
|
||||
render(record) {
|
||||
return h('span', record.row.status === 1 ? '已读' : '未读');
|
||||
},
|
||||
@ -27,7 +27,7 @@ export const columns = [
|
||||
{
|
||||
label: '创建人',
|
||||
prop: 'createUser',
|
||||
width: 100,
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
label: '创建时间',
|
||||
|
@ -6,10 +6,12 @@
|
||||
:close-on-click-modal="false"
|
||||
:before-close="dialogClose"
|
||||
>
|
||||
<el-descriptions column="2">
|
||||
<el-descriptions-item label="消息标题:">{{ formData.title }}</el-descriptions-item>
|
||||
<el-descriptions-item label="消息类型:">{{
|
||||
getTyepText(formData.type)
|
||||
<el-descriptions column="2" border>
|
||||
<el-descriptions-item label="消息标题:" label-class-name="des-width">{{
|
||||
formData.title
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="消息类型:" label-class-name="des-width">{{
|
||||
getTypeText(formData.type)
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="业务类型:">{{
|
||||
formData.bizType == 1 ? '订单' : '其他'
|
||||
@ -17,7 +19,11 @@
|
||||
<el-descriptions-item label="消息状态:">{{
|
||||
formData.status == 1 ? '已读' : '未读'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="消息内容:">{{ formData.content }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions class="margin-top" :column="1" border>
|
||||
<el-descriptions-item label="消息内容" label-class-name="des-width">
|
||||
{{ formData.content }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
@ -84,7 +90,7 @@
|
||||
* 获取类型文本描述
|
||||
* @param type 类型
|
||||
*/
|
||||
const getTyepText = (type) => {
|
||||
const getTypeText = (type) => {
|
||||
let typeText = '';
|
||||
switch (type) {
|
||||
case 1:
|
||||
@ -111,3 +117,11 @@
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.des-width) {
|
||||
width: 120px;
|
||||
}
|
||||
:deep(.el-descriptions__body .el-descriptions__table .el-descriptions__cell) {
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
|
@ -105,7 +105,7 @@
|
||||
{
|
||||
label: '确认',
|
||||
icon: 'Check',
|
||||
type: 'warning',
|
||||
type: 'primary',
|
||||
onClick: handleSetRead.bind(null, record),
|
||||
},
|
||||
{
|
||||
|
@ -8,37 +8,37 @@ export const columns = [
|
||||
{
|
||||
label: '数据表名称',
|
||||
prop: 'tableName',
|
||||
width: 150,
|
||||
minWidth: 150,
|
||||
},
|
||||
{
|
||||
label: '数据表描述',
|
||||
prop: 'tableComment',
|
||||
width: 150,
|
||||
minWidth: 150,
|
||||
},
|
||||
{
|
||||
label: '数据表引擎',
|
||||
prop: 'engine',
|
||||
width: 100,
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
label: '数据表行数',
|
||||
prop: 'tableRows',
|
||||
width: 100,
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
label: '数据表长度',
|
||||
prop: 'dataLength',
|
||||
width: 100,
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
label: '数据表自增索引',
|
||||
prop: 'autoIncrement',
|
||||
width: 150,
|
||||
minWidth: 150,
|
||||
},
|
||||
{
|
||||
label: '数据表编码',
|
||||
prop: 'tableCollation',
|
||||
width: 150,
|
||||
minWidth: 150,
|
||||
},
|
||||
{
|
||||
label: '创建时间',
|
||||
|
@ -151,11 +151,13 @@
|
||||
async function handleBatchGenerator(record: Recordable) {
|
||||
let names = [];
|
||||
if (!record) {
|
||||
names = selectionData.value.map(({ tableName }) => tableName);
|
||||
names = selectionData.value.map(
|
||||
({ tableName, tableComment }) => tableName + '|' + tableComment,
|
||||
);
|
||||
}
|
||||
await confirm('确定要批量一键生成吗?');
|
||||
record
|
||||
? await batchGenerator({ tableNames: record.row.tableName })
|
||||
? await batchGenerator({ tableNames: [record.row.tableName + '|' + record.row.tableComment] })
|
||||
: await batchGenerator({ tableNames: names });
|
||||
message('批量生成成功');
|
||||
reloadTable();
|
||||
@ -166,7 +168,7 @@
|
||||
* @param recored 数据记录
|
||||
*/
|
||||
const handleGenerator = async (record: Recordable) => {
|
||||
await generator({ tableNames: [record.row.tableName] });
|
||||
await generator({ tableNames: [record.row.tableName + '|' + record.row.tableComment] });
|
||||
message('一键生成成功');
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user