点检方案树demo功能更新

This commit is contained in:
zhangjunwen 2024-10-25 15:13:13 +08:00
parent e005d1c06d
commit 1cea7aae79
4 changed files with 20 additions and 15 deletions

View File

@ -70,6 +70,7 @@
"vue-count-to": "1.0.13", "vue-count-to": "1.0.13",
"vue-cropper": "0.5.8", "vue-cropper": "0.5.8",
"vue-meta": "^2.4.0", "vue-meta": "^2.4.0",
"vue-okr-tree": "^1.0.17",
"vue-quill-editor": "^3.0.6", "vue-quill-editor": "^3.0.6",
"vue-router": "3.4.9", "vue-router": "3.4.9",
"vue-video-player": "^5.0.2", "vue-video-player": "^5.0.2",
@ -95,7 +96,7 @@
"eslint-plugin-prettier": "^3.1.0", "eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-vue": "9.0.0", "eslint-plugin-vue": "9.0.0",
"fs-extra": "^8.1.0", "fs-extra": "^8.1.0",
"html-webpack-plugin": "^5.6.0", "html-webpack-plugin": "^4.5.2",
"lint-staged": "12.5.0", "lint-staged": "12.5.0",
"runjs": "4.4.2", "runjs": "4.4.2",
"sass": "1.32.13", "sass": "1.32.13",

View File

@ -279,12 +279,13 @@ export default {
try { try {
const res = await GatewayInfoApi.getGatewayInfo(id); const res = await GatewayInfoApi.getGatewayInfo(id);
this.formData = res.data; this.formData = res.data;
this.title = "修改机床网关信息"; this.dialogTitle = "修改机床网关信息";
} finally { } finally {
this.formLoading = false; this.formLoading = false;
} }
} else {
this.dialogTitle = "新增机床网关信息";
} }
this.title = "新增机床网关信息";
}, },
/** 提交按钮 */ /** 提交按钮 */
async submitForm() { async submitForm() {

View File

@ -4,7 +4,7 @@
<el-dialog <el-dialog
:title="dialogTitle" :title="dialogTitle"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="45%" width="55%"
v-dialogDrag v-dialogDrag
append-to-body append-to-body
> >
@ -13,12 +13,11 @@
:model="formData" :model="formData"
:rules="formRules" :rules="formRules"
v-loading="formLoading" v-loading="formLoading"
label-width="100px" label-width="110px"
> >
<el-col :span="24"> <el-col :span="24">
<el-form-item <el-form-item
v-if="this.formData.parentInspectionId != 0" label="点检方案父节点"
label="父节点点检方案"
prop="parentInspectionId" prop="parentInspectionId"
> >
<!-- <el-input <!-- <el-input
@ -156,7 +155,10 @@ export default {
"inspectionPlanId", "inspectionPlanId",
"parentInspectionId" "parentInspectionId"
); );
console.log("inspectionOptions:", this.inspectionOptions); this.inspectionOptions.push({
inspectionPlanId: 0,
inspectionName: "无",
});
}); });
}, },
/** 转换菜单数据结构 */ /** 转换菜单数据结构 */
@ -186,12 +188,13 @@ export default {
} finally { } finally {
this.formLoading = false; this.formLoading = false;
} }
} else {
this.dialogTitle = "新增点检方案";
this.$nextTick(() => {
this.formData.status = CommonStatusEnum.ENABLE;
this.formData.parentInspectionId = this.pid;
});
} }
this.dialogTitle = "新增点检方案";
this.$nextTick(() => {
this.formData.status = CommonStatusEnum.ENABLE;
this.formData.parentInspectionId = this.pid;
});
}, },
/** 提交按钮 */ /** 提交按钮 */
async submitForm() { async submitForm() {

View File

@ -94,7 +94,6 @@
> >
<el-table-column <el-table-column
label="基础点检名" label="基础点检名"
align="center"
prop="inspectionName" prop="inspectionName"
/> />
<el-table-column <el-table-column
@ -170,6 +169,7 @@
import * as InspectionPlanApi from "@/api/system/inspection/plan"; import * as InspectionPlanApi from "@/api/system/inspection/plan";
import InspectionPlanForm from "./InspectionPlanForm.vue"; import InspectionPlanForm from "./InspectionPlanForm.vue";
import { getDictDatas, DICT_TYPE } from "@/utils/dict"; import { getDictDatas, DICT_TYPE } from "@/utils/dict";
export default { export default {
name: "InspectionPlan", name: "InspectionPlan",
components: { components: {
@ -188,7 +188,7 @@ export default {
// //
list: [], list: [],
// //
isExpandAll: true, isExpandAll: false,
// //
refreshTable: true, refreshTable: true,
// //