Compare commits

...

6 Commits
main ... dev

Author SHA1 Message Date
liujun a3e5b6d0ee feat(corp): 新增企业信息相关功能
- 新增 BusCorpForm 相关的 Controller、Service、Dao 及实体类
- 实现企业信息的分页查询功能
- 新增企业信息添加和编辑功能
- 优化数据字典组件,支持新功能- 更新 API 调用路径,适配新功能
2025-07-02 09:11:37 +08:00
liujun 42a5c0b9d0 错误代码更正 2025-06-30 17:55:21 +08:00
liujun b94c697888 代码还原 2025-06-30 17:26:03 +08:00
shangliming ab3b8792fe 登录页 2025-06-30 14:27:29 +08:00
liujun 4566d4c04a Merge remote-tracking branch 'origin/main' into dev 2025-06-27 14:13:30 +08:00
liujun db328bda40 架构更新 2025-06-27 14:01:42 +08:00
15 changed files with 190 additions and 52 deletions

View File

@ -1,2 +1,2 @@
VITE_BASE=/
VITE_BASE_URL=http://192.168.0.16:8471/qhd-regulatoryV2/
VITE_BASE_URL=http://192.168.0.18:8059/docking/

View File

@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/qggf.ico" />
<link rel="stylesheet" href="https://g.alicdn.com/apsara-media-box/imp-web-player/2.16.3/skins/default/aliplayer-min.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<title>秦港安全监管平台-监管端</title>
<title>危化企业安全数据流转平台</title>
</head>
<body>
<div id="app"></div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -12,7 +12,7 @@ export function conversionNavMeta(navList) {
for (let i = 0; i < navList.length; i++) {
const item = {
title: navList[i].name,
model: navList[i].bianma,
model: navList[i].code,
};
navTempList.push(item);
}

View File

@ -8,7 +8,7 @@
:show-all-levels="false"
:level="level"
:join-separator="joinSeparator"
value="bianma"
value="code"
/>
</template>

View File

@ -52,13 +52,13 @@ const administrativeDivisionProps = {
lazy: true,
lazyLoad: async (node, resolve) => {
const resData = await appFnGetDataDictionary({
parentId: node.data.dictionariesId || props.id,
parentId: node.data.dictionaryId || props.id,
});
resolve(
resData.map((item) => {
return {
dictionariesId: item.dictionariesId,
bianma: item.bianma,
dictionaryId: item.dictionaryId,
code: item.code,
name: item.name,
leaf: props.controlLevel
? node.level >= props.level
@ -68,7 +68,7 @@ const administrativeDivisionProps = {
);
},
value: props.value,
id: "dictionariesId",
id: "dictionaryId",
label: "name",
children: "children",
checkStrictly: props.checkStrictly,

View File

@ -0,0 +1,5 @@
<template>
<div></div>
</template>
<script setup>
</script>

View File

@ -0,0 +1,98 @@
<template>
<el-dialog
v-model="visible"
:title="name"
:before-close="fnClose"
width="80%"
>
<el-form
ref="formRef"
:model="formInfo.form"
:rules="formInfo.rules"
label-width="150px"
>
<el-row :gutter="12" style="margin-right: 50px">
<el-col :span="12">
<el-form-item label="企业名称" prop="name">
<el-input v-model="formInfo.form.name" placeholder="请输入名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="社会统一编码" prop="code">
<el-input v-model="formInfo.form.code" placeholder="请输入名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="企业归属地" prop="addressInfo">
<app-area-cascader
:model-value="formInfo.form.addressInfo"
:level="2"
></app-area-cascader>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="企业激活时间" prop="addressInfo">
<app-area-cascader
:model-value="formInfo.form.addressInfo"
:level="2"
></app-area-cascader>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="企业开通上报接口" prop="addressInfo">
<app-area-cascader
:model-value="formInfo.form.addressInfo"
:level="2"
></app-area-cascader>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否是自系统" prop="addressInfo">
<app-area-cascader
:model-value="formInfo.form.addressInfo"
:level="2"
></app-area-cascader>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<el-button @click="fnClose"> </el-button>
<el-button type="primary" @click="fnSubmit"> </el-button>
</template>
</el-dialog>
</template>
<script setup>
import useForm from "@/hooks/useForm.js";
import { debounce } from "throttle-debounce";
import { ref } from "vue";
import AppAreaCascader from "@/components/area_cascader/index.vue";
const visible = defineModel("visible", { type: Boolean, required: true });
const name = defineModel("name", { type: String, required: true });
const { formRef, validate, reset } = useForm();
const formInfo = ref({
form: {
name: "",
code: "",
addressInfo: [],
},
rules: {
name: [
{ required: true, message: "字典名称不能为空", trigger: "change" },
{ min: 2, max: 100, message: "长度在2到100个字符", trigger: "blur" },
],
code: [
{ required: true, message: "字典编码名称不能为空", trigger: "change" },
{ min: 2, max: 100, message: "长度在2到100个字符", trigger: "blur" },
],
},
});
const fnClose = () => {
reset();
visible.value = false;
};
const fnSubmit = debounce(1000, async () => {
await validate();
});
</script>

View File

@ -0,0 +1,49 @@
<template>
<div>
<app-search
v-model="searchForm"
label-width="150px"
@submit="resetPagination"
>
<el-col :span="6">
<el-form-item label="企业名称" prop="roleName">
<el-input v-model="searchForm.name" placeholder="请输入名称" />
</el-form-item>
</el-col>
</app-search>
<app-table v-model:pagination="pagination" :data="list" @get-data="getData">
<el-table-column prop="name" label="企业名称" />
<el-table-column prop="name" label="入住时间" />
<el-table-column prop="name" label="状态" />
<el-table-column prop="name" label="运维人" />
<el-table-column prop="name" label="操作" />
<template #button>
<el-button type="primary" @click="fnAddOrEdit()"> </el-button>
</template>
</app-table>
<app-add
v-model:name="addOrEditDialog.name"
v-model:visible="addOrEditDialog.visible"
@get-data="resetPagination"
/>
</div>
</template>
<script setup>
import AppTable from "@/components/table/index.vue";
import useListData from "@/hooks/useListData.js";
import { getDataDictionaryList } from "@/request/system_management.js";
import AppAdd from "./components/app-add.vue";
import AppSearch from "@/components/search/index.vue";
import { ref } from "vue";
const { list, pagination, searchForm, resetPagination, getData } = useListData(
getDataDictionaryList
);
const addOrEditDialog = ref({
visible: false,
name: "123",
});
const fnAddOrEdit = async () => {
addOrEditDialog.value.visible = true;
};
</script>

View File

@ -2,7 +2,5 @@
<div>1</div>
</template>
<script setup>
</script>
<script setup></script>
<style lang="scss" scoped></style>

View File

@ -69,14 +69,12 @@ import { ref } from "vue";
import { useRouter } from "vue-router";
import Verification from "@/components/verification/index";
import { useUserStore } from "@/pinia/user";
import { getAppPath, getUserInfo, Login } from "@/request/api";
import { getUserInfo, Login } from "@/request/api";
import { debounce } from "throttle-debounce";
import useForm from "@/hooks/useForm.js";
import dayjs from "dayjs";
import { encrypt } from "@/assets/js/aes_secret.js";
import { ElMessage } from "element-plus";
import { useQRCode } from "@vueuse/integrations/useQRCode";
import { getFileUrl } from "@/assets/js/utils.js";
const userStore = useUserStore();
const router = useRouter();
@ -93,16 +91,6 @@ const rules = {
password: [{ required: true, message: "请输入密码", trigger: "blur" }],
code: [{ required: true, message: "请输入验证码", trigger: "blur" }],
};
const fnGetAppDownloadPath = async () => {
const { versionmanager } = await getAppPath();
appPath.value = useQRCode(() => getFileUrl() + versionmanager.fileUrl, {
width: 100,
height: 100,
margin: 1,
correctLevel: "H",
});
};
fnGetAppDownloadPath();
const fnLogin = debounce(
1000,
() => {

View File

@ -11,19 +11,19 @@
<el-form-item label="名称" prop="name">
<el-input v-model="form.name" placeholder="请输入名称" />
</el-form-item>
<el-form-item label="编码" prop="bianma">
<el-form-item label="编码" prop="code">
<el-input
v-model="form.bianma"
v-model="form.code"
:disabled="type === 'edit'"
placeholder="请输入编码"
/>
</el-form-item>
<el-form-item label="排序" prop="orderBy">
<el-input v-model.number="form.orderBy" placeholder="请输入排序" />
<el-form-item label="排序" prop="sort">
<el-input v-model.number="form.sort" placeholder="请输入排序" />
</el-form-item>
<el-form-item label="备注" prop="descr">
<el-form-item label="备注" prop="remark">
<el-input
v-model="form.descr"
v-model="form.remark"
:autosize="{ minRows: 1 }"
type="textarea"
placeholder="请输入备注"
@ -56,7 +56,7 @@ const props = defineProps({
type: Object,
required: false,
default: () => ({
dictionariesId: "0",
dictionaryId: "0",
name: "(无)此项为顶级菜单",
bianma: "",
parentIds: "",
@ -106,25 +106,25 @@ const fnSubmit = debounce(
}
await setDataDictionaryAdd({
...form.value,
parentId: props.parent.dictionariesId,
parentId: props.parent.dictionaryId,
parentIds:
props.parent.dictionariesId === "0"
props.parent.dictionaryId === "0"
? ""
: (props.parent.parentIds ? props.parent.parentIds + "," : "") +
props.parent.dictionariesId,
props.parent.dictionaryId,
parentBianmas:
props.parent.dictionariesId === "0"
props.parent.dictionaryId === "0"
? ""
: (props.parent.parentBianmas
? props.parent.parentBianmas + ","
: "") + props.parent.bianma,
parentNames:
props.parent.dictionariesId === "0"
props.parent.dictionaryId === "0"
? ""
: (props.parent.parentNames ? props.parent.parentNames + "," : "") +
props.parent.name,
rootId: props.parent.dictionariesId === "0" ? "" : props.parent.rootId,
dictionariesId: undefined,
rootId: props.parent.dictionaryId === "0" ? "" : props.parent.rootId,
dictionaryId: undefined,
});
}
if (props.type === "edit")

View File

@ -12,7 +12,7 @@
path: '/system_management/data_dictionary',
query: {
parentName: row.name,
parentId: row.dictionariesId,
parentId: row.dictionaryId,
},
})
"
@ -21,16 +21,16 @@
</el-button>
</template>
</el-table-column>
<el-table-column prop="bianma" label="编码" />
<el-table-column prop="dictionariesId" label="ID" width="300" />
<el-table-column prop="orderBy" label="排序" width="50" />
<el-table-column prop="code" label="编码" />
<el-table-column prop="dictionaryId" label="ID" width="300" />
<el-table-column prop="sort" label="排序" width="50" />
<el-table-column label="操作" width="100">
<template #default="{ row }">
<el-button
type="primary"
text
link
@click="fnAddOrEdit(row.dictionariesId, 'edit')"
@click="fnAddOrEdit(row.dictionaryId, 'edit')"
>
编辑
</el-button>
@ -38,7 +38,7 @@
type="danger"
text
link
@click="fnDelete(row.dictionariesId)"
@click="fnDelete(row.dictionaryId)"
>
删除
</el-button>
@ -107,7 +107,7 @@ const addOrEditDialog = ref({
rootId: "",
},
parent: {
dictionariesId: parentIdDefault,
dictionaryId: parentIdDefault,
name: parentNameDefault,
bianma: "",
orderBy: "",
@ -123,24 +123,24 @@ onBeforeRouteUpdate((to) => {
parentName.value = to.query.parentName || parentNameDefault;
resetPagination();
});
const fnDelete = async (dictionariesId) => {
const fnDelete = async (dictionaryId) => {
await ElMessageBox.confirm(`确定要删除吗?`, { type: "warning" });
await setDataDictionaryDelete({ dictionariesId });
await setDataDictionaryDelete({ dictionaryId });
ElMessage.success("删除成功");
resetPagination();
};
const fnAddOrEdit = async (dictionariesId, type) => {
const fnAddOrEdit = async (dictionaryId, type) => {
addOrEditDialog.value.visible = true;
addOrEditDialog.value.type = type;
if (type === "add" && parentId.value !== "0") {
const resData = await getDataDictionaryInfo({
dictionariesId: parentId.value,
dictionaryId: parentId.value,
});
addOrEditDialog.value.parent = resData.dictionaries;
}
await nextTick();
if (type === "edit") {
const resData = await getDataDictionaryInfo({ dictionariesId });
const resData = await getDataDictionaryInfo({ dictionaryId });
addOrEditDialog.value.form = resData.dictionaries;
}
};

View File

@ -53,9 +53,9 @@
<el-select v-model="form.model" clearable>
<el-option
v-for="item in navList"
:key="item.dictionariesId"
:key="item.dictionaryId"
:label="item.name"
:value="item.bianma"
:value="item.code"
/>
</el-select>
</el-form-item>