错误代码更正
parent
b94c697888
commit
42a5c0b9d0
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
<script setup>
|
||||
</script>
|
|
@ -0,0 +1,4 @@
|
|||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
<script setup></script>
|
|
@ -0,0 +1,34 @@
|
|||
<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="操作" />
|
||||
</app-table>
|
||||
<app-add @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";
|
||||
|
||||
const { list, pagination, searchForm, resetPagination, getData } = useListData(
|
||||
getDataDictionaryList
|
||||
);
|
||||
</script>
|
|
@ -2,7 +2,5 @@
|
|||
<div>1</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
</script>
|
||||
|
||||
<script setup></script>
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
|
@ -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="请输入备注"
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue