feat: 部门管理加状态查询和政策法规重置和取消按钮

This commit is contained in:
于晏彭 2023-05-22 17:09:00 +08:00
parent 78048c98ef
commit f6657e0c6b
6 changed files with 18 additions and 14 deletions

View File

@ -5,7 +5,7 @@
height: 36px; height: 36px;
} }
.el-table :deep(.el-table__inner-wrapper) { .el-table :deep(.el-table__inner-wrapper) {
min-height: 140px; min-height: 120px;
} }
.list { .list {

View File

@ -5,7 +5,7 @@
height: 36px; height: 36px;
} }
.el-table :deep(.el-table__inner-wrapper) { .el-table :deep(.el-table__inner-wrapper) {
min-height: 140px; min-height: 120px;
} }
.list { .list {

View File

@ -5,7 +5,7 @@
height: 36px; height: 36px;
} }
.el-table :deep(.el-table__inner-wrapper) { .el-table :deep(.el-table__inner-wrapper) {
min-height: 140px; min-height: 120px;
} }
.list { .list {

View File

@ -43,7 +43,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="footer flx-center"> <div class="footer flx-center">
<el-button class="cancel" @click="onReset">重置</el-button> <el-button class="cancel" v-if="!store.Message" @click="onReset">重置</el-button>
<el-button class="cancel" v-else @click="onCancel">取消</el-button>
<el-button type="primary" @click="confirm(ReleaseLowsFormRef, formData)"> 发布 </el-button> <el-button type="primary" @click="confirm(ReleaseLowsFormRef, formData)"> 发布 </el-button>
</div> </div>
</div> </div>
@ -59,6 +60,7 @@ import { getDicList } from "@/api/modules/jxjview";
import Editor from "@/components/Editor/index.vue"; import Editor from "@/components/Editor/index.vue";
import { formData, onReset, rules, annexFileList } from "./index"; import { formData, onReset, rules, annexFileList } from "./index";
import { formDataType } from "./index"; import { formDataType } from "./index";
import router from "@/routers";
const store = GlobalStore(); const store = GlobalStore();
const headers = ref({ Authorization: "Bearer " + store.token }); const headers = ref({ Authorization: "Bearer " + store.token });
@ -101,6 +103,10 @@ const onRemove: UploadProps["onRemove"] = (file, uploadFiles) => {
annexFileList.value = reactive([]); annexFileList.value = reactive([]);
}; };
const onCancel = () => {
router.go(-1);
};
// //
const confirm = async (formEl: FormInstance | undefined, params: any) => { const confirm = async (formEl: FormInstance | undefined, params: any) => {
if (!formEl) return; if (!formEl) return;

View File

@ -43,7 +43,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="form-btn"> <div class="form-btn">
<el-button style="margin-right: 60px" @click="onReset" class="cancelButtonStyle">重置</el-button> <!-- <el-button style="margin-right: 60px" @click="onReset" class="cancelButtonStyle">重置</el-button> -->
<el-button type="primary" @click="onSubmit">保存</el-button> <el-button type="primary" @click="onSubmit">保存</el-button>
</div> </div>
</div> </div>
@ -148,12 +148,10 @@ const initParam = reactive({
// //
const changeTreeFilter = async (val: string) => { const changeTreeFilter = async (val: string) => {
// const { result } = await getTableList({ deptId: val.data.deptId });
// proTable.value.tableData = result.records;
// proTable.value.pageable.total = +result.total;
initParam.deptId = val.data.deptId; initParam.deptId = val.data.deptId;
baseFrom.value = { ...val.data }; baseFrom.value = { ...val.data };
console.log(baseFrom.value); baseFrom.value.parentId = val.parent.data.deptName;
console.log(val);
}; };
// //
@ -406,7 +404,7 @@ const onSubmit = async () => {
// //
const handleEditItem = async (index: number, row: any) => { const handleEditItem = async (index: number, row: any) => {
const res1 = await getTreeList({ deptId: "" }); const res1 = await getTreeList({ deptId: "", status: 1 });
formConfig.formItemConfig[7].data = res1.result.map(i => { formConfig.formItemConfig[7].data = res1.result.map(i => {
return { return {
label: i.deptName, label: i.deptName,
@ -426,7 +424,7 @@ const handleEditItem = async (index: number, row: any) => {
// //
const onAddDept = async () => { const onAddDept = async () => {
// //
const res1 = await getTreeList({ deptId: "" }); const res1 = await getTreeList({ deptId: "", status: 1 });
formConfigDept.formItemConfig[0].data = res1.result.map(i => { formConfigDept.formItemConfig[0].data = res1.result.map(i => {
return { return {
label: i.deptName, label: i.deptName,
@ -468,7 +466,7 @@ const handleSubmit = async form => {
const res = await getTreeDeptList(); const res = await getTreeDeptList();
proTree.value.treeAllData = res.result; proTree.value.treeAllData = res.result;
// //
const res1 = await getTreeList({ deptId: "" }); const res1 = await getTreeList({ deptId: "", status: 1 });
treeDeptList.value = res1.result; treeDeptList.value = res1.result;
}; };
@ -490,7 +488,7 @@ watch(
); );
onMounted(async () => { onMounted(async () => {
const res1 = await getTreeList({ deptId: "" }); const res1 = await getTreeList({ deptId: "", status: 1 });
treeDeptList.value = res1.result; treeDeptList.value = res1.result;
const res = await getRoleNamelist({ state: 1 }); const res = await getRoleNamelist({ state: 1 });
formConfig.formItemConfig[7].data = res1.result.map(i => { formConfig.formItemConfig[7].data = res1.result.map(i => {

View File

@ -5,7 +5,7 @@
height: 36px; height: 36px;
} }
.el-table :deep(.el-table__inner-wrapper) { .el-table :deep(.el-table__inner-wrapper) {
min-height: 140px; min-height: 120px;
} }
.list { .list {