Compare commits
6 Commits
Author | SHA1 | Date |
---|---|---|
|
a3e5b6d0ee | |
|
42a5c0b9d0 | |
|
b94c697888 | |
|
ab3b8792fe | |
|
4566d4c04a | |
|
db328bda40 |
|
@ -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/
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<link rel="icon" type="image/svg+xml" href="/qggf.ico" />
|
<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" />
|
<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" />
|
<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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<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 |
|
@ -12,7 +12,7 @@ export function conversionNavMeta(navList) {
|
||||||
for (let i = 0; i < navList.length; i++) {
|
for (let i = 0; i < navList.length; i++) {
|
||||||
const item = {
|
const item = {
|
||||||
title: navList[i].name,
|
title: navList[i].name,
|
||||||
model: navList[i].bianma,
|
model: navList[i].code,
|
||||||
};
|
};
|
||||||
navTempList.push(item);
|
navTempList.push(item);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
<template>
|
||||||
|
<div></div>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
</script>
|
|
@ -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>
|
|
@ -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>
|
|
@ -2,7 +2,5 @@
|
||||||
<div>1</div>
|
<div>1</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup></script>
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
|
|
@ -69,14 +69,12 @@ import { ref } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import Verification from "@/components/verification/index";
|
import Verification from "@/components/verification/index";
|
||||||
import { useUserStore } from "@/pinia/user";
|
import { useUserStore } from "@/pinia/user";
|
||||||
import { getAppPath, getUserInfo, Login } from "@/request/api";
|
import { getUserInfo, Login } from "@/request/api";
|
||||||
import { debounce } from "throttle-debounce";
|
import { debounce } from "throttle-debounce";
|
||||||
import useForm from "@/hooks/useForm.js";
|
import useForm from "@/hooks/useForm.js";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { encrypt } from "@/assets/js/aes_secret.js";
|
import { encrypt } from "@/assets/js/aes_secret.js";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { useQRCode } from "@vueuse/integrations/useQRCode";
|
|
||||||
import { getFileUrl } from "@/assets/js/utils.js";
|
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
@ -93,16 +91,6 @@ const rules = {
|
||||||
password: [{ required: true, message: "请输入密码", trigger: "blur" }],
|
password: [{ required: true, message: "请输入密码", trigger: "blur" }],
|
||||||
code: [{ 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(
|
const fnLogin = debounce(
|
||||||
1000,
|
1000,
|
||||||
() => {
|
() => {
|
||||||
|
|
|
@ -11,19 +11,19 @@
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
<el-input v-model="form.name" placeholder="请输入名称" />
|
<el-input v-model="form.name" placeholder="请输入名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="编码" prop="bianma">
|
<el-form-item label="编码" prop="code">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.bianma"
|
v-model="form.code"
|
||||||
:disabled="type === 'edit'"
|
:disabled="type === 'edit'"
|
||||||
placeholder="请输入编码"
|
placeholder="请输入编码"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排序" prop="orderBy">
|
<el-form-item label="排序" prop="sort">
|
||||||
<el-input v-model.number="form.orderBy" placeholder="请输入排序" />
|
<el-input v-model.number="form.sort" placeholder="请输入排序" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="descr">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.descr"
|
v-model="form.remark"
|
||||||
:autosize="{ minRows: 1 }"
|
:autosize="{ minRows: 1 }"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
placeholder="请输入备注"
|
placeholder="请输入备注"
|
||||||
|
@ -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")
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
path: '/system_management/data_dictionary',
|
path: '/system_management/data_dictionary',
|
||||||
query: {
|
query: {
|
||||||
parentName: row.name,
|
parentName: row.name,
|
||||||
parentId: row.dictionariesId,
|
parentId: row.dictionaryId,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
"
|
"
|
||||||
|
@ -21,16 +21,16 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="bianma" label="编码" />
|
<el-table-column prop="code" label="编码" />
|
||||||
<el-table-column prop="dictionariesId" label="ID" width="300" />
|
<el-table-column prop="dictionaryId" label="ID" width="300" />
|
||||||
<el-table-column prop="orderBy" label="排序" width="50" />
|
<el-table-column prop="sort" label="排序" width="50" />
|
||||||
<el-table-column label="操作" width="100">
|
<el-table-column label="操作" width="100">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
text
|
text
|
||||||
link
|
link
|
||||||
@click="fnAddOrEdit(row.dictionariesId, 'edit')"
|
@click="fnAddOrEdit(row.dictionaryId, 'edit')"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
type="danger"
|
type="danger"
|
||||||
text
|
text
|
||||||
link
|
link
|
||||||
@click="fnDelete(row.dictionariesId)"
|
@click="fnDelete(row.dictionaryId)"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -107,7 +107,7 @@ const addOrEditDialog = ref({
|
||||||
rootId: "",
|
rootId: "",
|
||||||
},
|
},
|
||||||
parent: {
|
parent: {
|
||||||
dictionariesId: parentIdDefault,
|
dictionaryId: parentIdDefault,
|
||||||
name: parentNameDefault,
|
name: parentNameDefault,
|
||||||
bianma: "",
|
bianma: "",
|
||||||
orderBy: "",
|
orderBy: "",
|
||||||
|
@ -123,24 +123,24 @@ onBeforeRouteUpdate((to) => {
|
||||||
parentName.value = to.query.parentName || parentNameDefault;
|
parentName.value = to.query.parentName || parentNameDefault;
|
||||||
resetPagination();
|
resetPagination();
|
||||||
});
|
});
|
||||||
const fnDelete = async (dictionariesId) => {
|
const fnDelete = async (dictionaryId) => {
|
||||||
await ElMessageBox.confirm(`确定要删除吗?`, { type: "warning" });
|
await ElMessageBox.confirm(`确定要删除吗?`, { type: "warning" });
|
||||||
await setDataDictionaryDelete({ dictionariesId });
|
await setDataDictionaryDelete({ dictionaryId });
|
||||||
ElMessage.success("删除成功");
|
ElMessage.success("删除成功");
|
||||||
resetPagination();
|
resetPagination();
|
||||||
};
|
};
|
||||||
const fnAddOrEdit = async (dictionariesId, type) => {
|
const fnAddOrEdit = async (dictionaryId, type) => {
|
||||||
addOrEditDialog.value.visible = true;
|
addOrEditDialog.value.visible = true;
|
||||||
addOrEditDialog.value.type = type;
|
addOrEditDialog.value.type = type;
|
||||||
if (type === "add" && parentId.value !== "0") {
|
if (type === "add" && parentId.value !== "0") {
|
||||||
const resData = await getDataDictionaryInfo({
|
const resData = await getDataDictionaryInfo({
|
||||||
dictionariesId: parentId.value,
|
dictionaryId: parentId.value,
|
||||||
});
|
});
|
||||||
addOrEditDialog.value.parent = resData.dictionaries;
|
addOrEditDialog.value.parent = resData.dictionaries;
|
||||||
}
|
}
|
||||||
await nextTick();
|
await nextTick();
|
||||||
if (type === "edit") {
|
if (type === "edit") {
|
||||||
const resData = await getDataDictionaryInfo({ dictionariesId });
|
const resData = await getDataDictionaryInfo({ dictionaryId });
|
||||||
addOrEditDialog.value.form = resData.dictionaries;
|
addOrEditDialog.value.form = resData.dictionaries;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -53,9 +53,9 @@
|
||||||
<el-select v-model="form.model" clearable>
|
<el-select v-model="form.model" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in navList"
|
v-for="item in navList"
|
||||||
:key="item.dictionariesId"
|
:key="item.dictionaryId"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.bianma"
|
:value="item.code"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
Loading…
Reference in New Issue