20260724173425
This commit is contained in:
1 parent
4f40ad9f11
commit
b33c743236
27 files changed
+1310
-437
No files matched your search
@@ -64,7 +64,14 @@ function createActionsCell() {
|
||||
children.push(
|
||||
h(
|
||||
Button,
|
||||
{ type: "link", size: "small", onClick: (e) => { e.stopPropagation(); openEdit(row); } },
|
||||
{
|
||||
type: "link",
|
||||
size: "small",
|
||||
onClick: (e) => {
|
||||
e.stopPropagation();
|
||||
openEdit(row);
|
||||
},
|
||||
},
|
||||
"编辑",
|
||||
),
|
||||
);
|
||||
@@ -97,10 +104,28 @@ function createActionsCell() {
|
||||
const columns = [
|
||||
{ dataIndex: "b_code", title: "简称 / 编码", width: 150 },
|
||||
{ dataIndex: "b_name", title: "名称", width: 160 },
|
||||
{ dataIndex: "b_default", title: "默认", width: 80, align: "center", customCell: createDefaultCell() },
|
||||
{ dataIndex: "b_canuse", title: "是否启用", width: 100, align: "center", customCell: createCanuseCell() },
|
||||
{
|
||||
dataIndex: "b_default",
|
||||
title: "默认",
|
||||
width: 80,
|
||||
align: "center",
|
||||
customCell: createDefaultCell(),
|
||||
},
|
||||
{
|
||||
dataIndex: "b_canuse",
|
||||
title: "是否启用",
|
||||
width: 100,
|
||||
align: "center",
|
||||
customCell: createCanuseCell(),
|
||||
},
|
||||
{ dataIndex: "b_xh", title: "排序", width: 80, align: "center" },
|
||||
{ dataIndex: "actions", title: "操作", width: 130, align: "center", customCell: createActionsCell() },
|
||||
{
|
||||
dataIndex: "actions",
|
||||
title: "操作",
|
||||
width: 130,
|
||||
align: "center",
|
||||
customCell: createActionsCell(),
|
||||
},
|
||||
];
|
||||
|
||||
/* ---------- 行内开关即时保存 ---------- */
|
||||
@@ -157,10 +182,10 @@ function openEdit(row) {
|
||||
modalMode.value = "edit";
|
||||
editingId.value = row.b_id;
|
||||
editingDefault.value = row.b_default === 1;
|
||||
form.value = {
|
||||
b_code: row.b_code,
|
||||
b_name: row.b_name,
|
||||
b_xh: row.b_xh ?? 0,
|
||||
form.value = {
|
||||
b_code: row.b_code,
|
||||
b_name: row.b_name,
|
||||
b_xh: row.b_xh ?? 0,
|
||||
defaultOn: row.b_default === 1,
|
||||
canuseOn: row.b_canuse === 1,
|
||||
};
|
||||
@@ -240,10 +265,7 @@ async function saveForm() {
|
||||
>
|
||||
<a-form layout="vertical">
|
||||
<a-form-item label="语言编码(简称)" required>
|
||||
<a-input
|
||||
v-model:value="form.b_code"
|
||||
:disabled="editingDefault"
|
||||
/>
|
||||
<a-input v-model:value="form.b_code" :disabled="editingDefault" />
|
||||
</a-form-item>
|
||||
<a-form-item label="语言名称" required>
|
||||
<a-input v-model:value="form.b_name" />
|
||||
|
||||
Reference in new issue
Block a user