feat(corp): 新增企业信息相关功能
- 新增 BusCorpForm 相关的 Controller、Service、Dao 及实体类 - 实现企业信息的分页查询功能 - 新增企业信息添加和编辑功能 - 优化数据字典组件,支持新功能- 更新 API 调用路径,适配新功能dev
parent
42a5c0b9d0
commit
a3e5b6d0ee
|
@ -1,2 +1,2 @@
|
||||||
VITE_BASE=/
|
VITE_BASE=/
|
||||||
VITE_BASE_URL=http://192.168.0.16:8471/qhd-regulatoryV2/
|
VITE_BASE_URL=http://192.168.0.18:8059/docking/
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
:show-all-levels="false"
|
:show-all-levels="false"
|
||||||
:level="level"
|
:level="level"
|
||||||
:join-separator="joinSeparator"
|
:join-separator="joinSeparator"
|
||||||
value="bianma"
|
value="code"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -52,13 +52,13 @@ const administrativeDivisionProps = {
|
||||||
lazy: true,
|
lazy: true,
|
||||||
lazyLoad: async (node, resolve) => {
|
lazyLoad: async (node, resolve) => {
|
||||||
const resData = await appFnGetDataDictionary({
|
const resData = await appFnGetDataDictionary({
|
||||||
parentId: node.data.dictionariesId || props.id,
|
parentId: node.data.dictionaryId || props.id,
|
||||||
});
|
});
|
||||||
resolve(
|
resolve(
|
||||||
resData.map((item) => {
|
resData.map((item) => {
|
||||||
return {
|
return {
|
||||||
dictionariesId: item.dictionariesId,
|
dictionaryId: item.dictionaryId,
|
||||||
bianma: item.bianma,
|
code: item.code,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
leaf: props.controlLevel
|
leaf: props.controlLevel
|
||||||
? node.level >= props.level
|
? node.level >= props.level
|
||||||
|
@ -68,7 +68,7 @@ const administrativeDivisionProps = {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
value: props.value,
|
value: props.value,
|
||||||
id: "dictionariesId",
|
id: "dictionaryId",
|
||||||
label: "name",
|
label: "name",
|
||||||
children: "children",
|
children: "children",
|
||||||
checkStrictly: props.checkStrictly,
|
checkStrictly: props.checkStrictly,
|
||||||
|
|
|
@ -1,4 +1,98 @@
|
||||||
<template>
|
<template>
|
||||||
<div></div>
|
<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>
|
</template>
|
||||||
<script setup></script>
|
</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>
|
||||||
|
|
|
@ -17,8 +17,15 @@
|
||||||
<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="操作" />
|
<el-table-column prop="name" label="操作" />
|
||||||
|
<template #button>
|
||||||
|
<el-button type="primary" @click="fnAddOrEdit()"> 新增 </el-button>
|
||||||
|
</template>
|
||||||
</app-table>
|
</app-table>
|
||||||
<app-add @get-data="resetPagination" />
|
<app-add
|
||||||
|
v-model:name="addOrEditDialog.name"
|
||||||
|
v-model:visible="addOrEditDialog.visible"
|
||||||
|
@get-data="resetPagination"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
|
@ -27,8 +34,16 @@ import useListData from "@/hooks/useListData.js";
|
||||||
import { getDataDictionaryList } from "@/request/system_management.js";
|
import { getDataDictionaryList } from "@/request/system_management.js";
|
||||||
import AppAdd from "./components/app-add.vue";
|
import AppAdd from "./components/app-add.vue";
|
||||||
import AppSearch from "@/components/search/index.vue";
|
import AppSearch from "@/components/search/index.vue";
|
||||||
|
import { ref } from "vue";
|
||||||
|
|
||||||
const { list, pagination, searchForm, resetPagination, getData } = useListData(
|
const { list, pagination, searchForm, resetPagination, getData } = useListData(
|
||||||
getDataDictionaryList
|
getDataDictionaryList
|
||||||
);
|
);
|
||||||
|
const addOrEditDialog = ref({
|
||||||
|
visible: false,
|
||||||
|
name: "123",
|
||||||
|
});
|
||||||
|
const fnAddOrEdit = async () => {
|
||||||
|
addOrEditDialog.value.visible = true;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -56,7 +56,7 @@ const props = defineProps({
|
||||||
type: Object,
|
type: Object,
|
||||||
required: false,
|
required: false,
|
||||||
default: () => ({
|
default: () => ({
|
||||||
dictionariesId: "0",
|
dictionaryId: "0",
|
||||||
name: "(无)此项为顶级菜单",
|
name: "(无)此项为顶级菜单",
|
||||||
bianma: "",
|
bianma: "",
|
||||||
parentIds: "",
|
parentIds: "",
|
||||||
|
@ -106,25 +106,25 @@ const fnSubmit = debounce(
|
||||||
}
|
}
|
||||||
await setDataDictionaryAdd({
|
await setDataDictionaryAdd({
|
||||||
...form.value,
|
...form.value,
|
||||||
parentId: props.parent.dictionariesId,
|
parentId: props.parent.dictionaryId,
|
||||||
parentIds:
|
parentIds:
|
||||||
props.parent.dictionariesId === "0"
|
props.parent.dictionaryId === "0"
|
||||||
? ""
|
? ""
|
||||||
: (props.parent.parentIds ? props.parent.parentIds + "," : "") +
|
: (props.parent.parentIds ? props.parent.parentIds + "," : "") +
|
||||||
props.parent.dictionariesId,
|
props.parent.dictionaryId,
|
||||||
parentBianmas:
|
parentBianmas:
|
||||||
props.parent.dictionariesId === "0"
|
props.parent.dictionaryId === "0"
|
||||||
? ""
|
? ""
|
||||||
: (props.parent.parentBianmas
|
: (props.parent.parentBianmas
|
||||||
? props.parent.parentBianmas + ","
|
? props.parent.parentBianmas + ","
|
||||||
: "") + props.parent.bianma,
|
: "") + props.parent.bianma,
|
||||||
parentNames:
|
parentNames:
|
||||||
props.parent.dictionariesId === "0"
|
props.parent.dictionaryId === "0"
|
||||||
? ""
|
? ""
|
||||||
: (props.parent.parentNames ? props.parent.parentNames + "," : "") +
|
: (props.parent.parentNames ? props.parent.parentNames + "," : "") +
|
||||||
props.parent.name,
|
props.parent.name,
|
||||||
rootId: props.parent.dictionariesId === "0" ? "" : props.parent.rootId,
|
rootId: props.parent.dictionaryId === "0" ? "" : props.parent.rootId,
|
||||||
dictionariesId: undefined,
|
dictionaryId: undefined,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (props.type === "edit")
|
if (props.type === "edit")
|
||||||
|
|
Loading…
Reference in New Issue