feat: 部门管理加状态查询和政策法规重置和取消按钮
This commit is contained in:
parent
78048c98ef
commit
f6657e0c6b
@ -5,7 +5,7 @@
|
||||
height: 36px;
|
||||
}
|
||||
.el-table :deep(.el-table__inner-wrapper) {
|
||||
min-height: 140px;
|
||||
min-height: 120px;
|
||||
}
|
||||
|
||||
.list {
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
height: 36px;
|
||||
}
|
||||
.el-table :deep(.el-table__inner-wrapper) {
|
||||
min-height: 140px;
|
||||
min-height: 120px;
|
||||
}
|
||||
|
||||
.list {
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
height: 36px;
|
||||
}
|
||||
.el-table :deep(.el-table__inner-wrapper) {
|
||||
min-height: 140px;
|
||||
min-height: 120px;
|
||||
}
|
||||
|
||||
.list {
|
||||
|
||||
@ -43,7 +43,8 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@ -59,6 +60,7 @@ import { getDicList } from "@/api/modules/jxjview";
|
||||
import Editor from "@/components/Editor/index.vue";
|
||||
import { formData, onReset, rules, annexFileList } from "./index";
|
||||
import { formDataType } from "./index";
|
||||
import router from "@/routers";
|
||||
|
||||
const store = GlobalStore();
|
||||
const headers = ref({ Authorization: "Bearer " + store.token });
|
||||
@ -101,6 +103,10 @@ const onRemove: UploadProps["onRemove"] = (file, uploadFiles) => {
|
||||
annexFileList.value = reactive([]);
|
||||
};
|
||||
|
||||
const onCancel = () => {
|
||||
router.go(-1);
|
||||
};
|
||||
|
||||
// 标记表单文件上传校验
|
||||
const confirm = async (formEl: FormInstance | undefined, params: any) => {
|
||||
if (!formEl) return;
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@ -148,12 +148,10 @@ const initParam = reactive({
|
||||
|
||||
// 树形筛选切换
|
||||
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;
|
||||
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 res1 = await getTreeList({ deptId: "" });
|
||||
const res1 = await getTreeList({ deptId: "", status: 1 });
|
||||
formConfig.formItemConfig[7].data = res1.result.map(i => {
|
||||
return {
|
||||
label: i.deptName,
|
||||
@ -426,7 +424,7 @@ const handleEditItem = async (index: number, row: any) => {
|
||||
//新增部门的弹窗
|
||||
const onAddDept = async () => {
|
||||
// 获取最新的部门列表信息
|
||||
const res1 = await getTreeList({ deptId: "" });
|
||||
const res1 = await getTreeList({ deptId: "", status: 1 });
|
||||
formConfigDept.formItemConfig[0].data = res1.result.map(i => {
|
||||
return {
|
||||
label: i.deptName,
|
||||
@ -468,7 +466,7 @@ const handleSubmit = async form => {
|
||||
const res = await getTreeDeptList();
|
||||
proTree.value.treeAllData = res.result;
|
||||
// 新增成功后刷新基本信息的上级部门的下拉框数据
|
||||
const res1 = await getTreeList({ deptId: "" });
|
||||
const res1 = await getTreeList({ deptId: "", status: 1 });
|
||||
treeDeptList.value = res1.result;
|
||||
};
|
||||
|
||||
@ -490,7 +488,7 @@ watch(
|
||||
);
|
||||
|
||||
onMounted(async () => {
|
||||
const res1 = await getTreeList({ deptId: "" });
|
||||
const res1 = await getTreeList({ deptId: "", status: 1 });
|
||||
treeDeptList.value = res1.result;
|
||||
const res = await getRoleNamelist({ state: 1 });
|
||||
formConfig.formItemConfig[7].data = res1.result.map(i => {
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
height: 36px;
|
||||
}
|
||||
.el-table :deep(.el-table__inner-wrapper) {
|
||||
min-height: 140px;
|
||||
min-height: 120px;
|
||||
}
|
||||
|
||||
.list {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user