This commit is contained in:
oneao committed 2026-03-23 21:12:09 +08:00
1 parent 3e172a1d53
commit 401a6719f6
12 files changed
+487 -277

No files matched your search

@@ -344,6 +344,8 @@ async function handleTreeLoad(node, resolve) {
}
async function handleTreeNodeClick(nodeData) {
console.log("===node===")
console.log(nodeData)
if (!nodeData || nodeData.b_id === "root" || !nodeData.b_moduleid) return;
currentNode.value = nodeData;
@@ -17,6 +17,8 @@ const loading = reactive({
const emits = defineEmits(["change", "closed"]);
const showFile = ref(false);
const showVisible = defineModel(false);
const form = ref({
@@ -136,18 +138,41 @@ function onClosed() {
<div class="form-item">
<div class="label">发布</div>
<el-switch v-model="form.b_visible" active-value="1" inactive-value="0" />
<el-switch
v-model="form.b_visible"
active-value="1"
inactive-value="0"
/>
</div>
<div class="form-item">
<div class="label">公告内容</div>
<WangEditor v-model="form.b_info" :father="form.b_id" module-id="oa_notices" />
<WangEditor
v-model="form.b_info"
:father="form.b_id"
module-id="oa_notices"
/>
</div>
</div>
<template #footer>
<el-button @click="showVisible = false">取消</el-button>
<el-button type="primary" :loading="loading.save" @click="handleSave">确认</el-button>
<div class="g3-footer">
<el-button type="primary" @click="showFile = true">
<el-icon class="el-icon--left">
<G3Icon icon="lucide:paperclip" />
</el-icon>
上传附件
</el-button>
<div>
<el-button @click="showVisible = false">取消</el-button>
<el-button type="primary" :loading="loading.save" @click="handleSave"
>确认</el-button
>
</div>
</div>
</template>
<G3File v-model="showFile" :father="form.b_id" module-id="oa_notices" />
</el-dialog>
</template>
@@ -171,4 +196,10 @@ function onClosed() {
min-width: 70px;
white-space: nowrap;
}
.g3-footer {
display: flex;
align-items: center;
justify-content: space-between;
}
</style>
@@ -191,7 +191,12 @@ async function deleteRows(rows = []) {
<template>
<div class="g3-flex-container">
<div class="g3-header">
<el-button type="primary" @click="showCategory = true"> 分类 </el-button>
<el-button type="primary" @click="showCategory = true">
<el-icon class="el-icon--left">
<G3Icon icon="lucide:settings" />
</el-icon>
分类设置
</el-button>
</div>
<div class="g3-container">
<el-splitter>
@@ -218,8 +223,18 @@ async function deleteRows(rows = []) {
<div class="g3-container-right">
<div style="width: 100%">
<div style="display: flex; height: 32px; margin-bottom: 8px">
<el-button type="primary" @click="handleAdd"> 新增 </el-button>
<el-button type="danger" @click="handleDeleteRows"> 批量删除 </el-button>
<el-button type="primary" @click="handleAdd">
<el-icon class="el-icon--left">
<G3Icon icon="lucide:plus" />
</el-icon>
新增
</el-button>
<el-button type="danger" @click="handleDeleteRows">
<el-icon class="el-icon--left">
<G3Icon icon="lucide:trash-2" />
</el-icon>
批量删除
</el-button>
</div>
</div>
<div class="g3-table">
@@ -279,11 +294,20 @@ async function deleteRows(rows = []) {
</template>
</vxe-column>
<vxe-column width="200" align="center" fixed="right" title="操作">
<vxe-column
width="200"
align="center"
fixed="right"
title="操作"
>
<template #default="{ row }">
<el-button type="primary" link @click="handleEditRow(row)"> 编辑 </el-button>
<el-button type="primary" link @click="handleEditRow(row)">
编辑
</el-button>
<el-button type="danger" link @click="handleDeleteRow(row)"> 删除 </el-button>
<el-button type="danger" link @click="handleDeleteRow(row)">
删除
</el-button>
</template>
</vxe-column>
</vxe-table>
@@ -18,7 +18,14 @@ const loading = reactive({
let oldRowData = {};
const textareaFields = ["b_sql", "b_resultsql", "b_polyline", "b_polyline2", "b_graph_x", "b_img"];
const textareaFields = [
"b_sql",
"b_resultsql",
"b_polyline",
"b_polyline2",
"b_graph_x",
"b_img",
];
const validRules = ref({
b_id: [
@@ -149,7 +156,9 @@ async function deleteRows(rows = []) {
return;
}
const delectedIds = rows.filter((row) => !$table.isInsertByRow(row)).map((row) => row.b_id);
const delectedIds = rows
.filter((row) => !$table.isInsertByRow(row))
.map((row) => row.b_id);
const tipMessage = `确定要删除选中的用户提醒吗?`;
@@ -248,7 +257,12 @@ async function saveRow(row) {
];
} else {
// 更新
const { isChanged, result } = diffObject(row, oldRowData, ["b_id"], ["_X_ROW_KEY"]);
const { isChanged, result } = diffObject(
row,
oldRowData,
["b_id"],
["_X_ROW_KEY"],
);
if (!isChanged) {
ElMessage.info("没有数据变更");
@@ -297,7 +311,7 @@ onMounted(async () => {
await getsubtable(tableData, tableDataoriginal, ``);
});
async function handleRefresh(){
async function handleRefresh() {
await getsubtable(tableData, tableDataoriginal, ``);
}
</script>
@@ -306,11 +320,25 @@ async function handleRefresh(){
<div class="g3-flex-container">
<div class="g3-header">
<div class="g3-header-left">
<el-button type="primary" @click="handleAdd"> 新建 </el-button>
<el-button type="danger" @click="handleDeleteRows"> 删除 </el-button>
<el-button type="primary" @click="handleAdd">
<el-icon class="el-icon--left">
<G3Icon icon="lucide:plus" />
</el-icon>
新建
</el-button>
<el-button type="danger" @click="handleDeleteRows">
<el-icon class="el-icon--left">
<G3Icon icon="lucide:trash-2" />
</el-icon>
批量删除
</el-button>
</div>
<div class="g3-header-right">
<div class="g3-svg-query" style="margin-right: 10px" @click="handleRefresh">
<div
class="g3-svg-query"
style="margin-right: 10px"
@click="handleRefresh"
>
<G3Icon icon="lucide:refresh-ccw" />
</div>
<el-dropdown>
@@ -398,7 +426,9 @@ async function handleRefresh(){
>
保存
</el-button>
<el-button link @click="cancelEditRow(row)" @click.stop> 取消 </el-button>
<el-button link @click="cancelEditRow(row)" @click.stop>
取消
</el-button>
</template>
<template v-else>
<el-button
@@ -411,7 +441,12 @@ async function handleRefresh(){
编辑
</el-button>
<el-button :disabled="loading.save" type="danger" link @click="handleDeleteRow(row)">
<el-button
:disabled="loading.save"
type="danger"
link
@click="handleDeleteRow(row)"
>
删除
</el-button>
</template>
@@ -425,17 +425,26 @@ function handleShowBatchCopyDialog() {
</el-icon>
批量删除
</el-button>
<el-button type="primary" @click="showPasswordRow = !showPasswordRow"
>查看密码</el-button
>
<el-button type="primary" @click="handleShowBatchCopyDialog"
>批量复制权限</el-button
>
<el-button type="primary" @click="showPasswordRow = !showPasswordRow">
<el-icon class="el-icon--left">
<G3Icon icon="lucide:eye" />
</el-icon>
查看密码
</el-button>
<el-button type="primary" @click="handleShowBatchCopyDialog">
<el-icon class="el-icon--left">
<G3Icon icon="lucide:copy" />
</el-icon>
批量复制权限
</el-button>
<el-button
type="primary"
@click="handleShowCopyDialog"
:disabled="!isSelectedRow"
>
<el-icon class="el-icon--left">
<G3Icon icon="lucide:copy" />
</el-icon>
复制权限
</el-button>
<el-button
@@ -443,6 +452,9 @@ function handleShowBatchCopyDialog() {
:disabled="!isSelectedRow"
@click="showEmployee = true"
>
<el-icon class="el-icon--left">
<G3Icon icon="lucide:book-user" />
</el-icon>
员工资料
</el-button>
</div>