提交已修改修试相关代码

This commit is contained in:
zhouxain01 2023-12-19 17:05:40 +08:00
parent ed81f60582
commit 89e89ba3e0
3 changed files with 62 additions and 58 deletions

View File

@ -48,21 +48,22 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工机具类型" prop="type"> <el-form-item label="工机具类型" prop="type">
<selectTree <!-- <selectTree-->
ref="mychild" <!-- ref="mychild"-->
style="width: 240px" <!-- style="width: 240px"-->
:treeList="deptList" <!-- :treeList="deptList"-->
:treeProps="{ <!-- :treeProps="{-->
children: 'children', <!-- children: 'children',-->
label: 'label', <!-- label: 'label',-->
}" <!-- }"-->
nodeKey="id" <!-- nodeKey="id"-->
:defaultSelect="true" <!-- :defaultSelect="true"-->
:defaultData="defaultData" <!-- :defaultData="defaultData"-->
:clearable="false" <!-- :clearable="false"-->
:placeholder="'请选择'" <!-- :placeholder="'请选择'"-->
@handleNodeClick="selectDrop" <!-- @handleNodeClick="selectDrop"-->
></selectTree> <!-- ></selectTree>-->
<Tree ref="mychildSon" :width="240" :dataList="deptList" @changeId="selectDrop"></Tree>
</el-form-item> </el-form-item>
<el-form-item label="报废单号" prop="backCode"> <el-form-item label="报废单号" prop="backCode">
<el-input <el-input
@ -493,9 +494,10 @@ import {
getUnitInfoSelectApi, getProjectSelectApi, getDicSelectApi, listPartTypeApi, getMaTypeSelectApi getUnitInfoSelectApi, getProjectSelectApi, getDicSelectApi, listPartTypeApi, getMaTypeSelectApi
} from "@/api/repairTest/repair"; } from "@/api/repairTest/repair";
import selectTree from '../repair/selectTree.vue' import selectTree from '../repair/selectTree.vue'
import Tree from '@/views/repairTest/repair/tree.vue'
export default { export default {
name: "Dict", name: "Dict",
components: { selectTree }, components: { selectTree,Tree },
dicts: ['sys_normal_disable'], dicts: ['sys_normal_disable'],
data() { data() {
return { return {
@ -662,7 +664,9 @@ export default {
resetQuery() { resetQuery() {
this.dateRange = []; this.dateRange = [];
this.resetForm("queryForm"); this.resetForm("queryForm");
this.$refs.mychild.clearSelect(); // this.$refs.mychild.clearSelect();
this.queryParams.type = ''
this.$refs.mychildSon.inputValue='';
this.handleQuery(); this.handleQuery();
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */

View File

@ -48,21 +48,22 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工机具类型" prop="type"> <el-form-item label="工机具类型" prop="type">
<selectTree <!-- <selectTree-->
ref="mychildSon" <!-- ref="mychildSon"-->
style="width: 240px" <!-- style="width: 240px"-->
:treeList="deptList" <!-- :treeList="deptList"-->
:treeProps="{ <!-- :treeProps="{-->
children: 'children', <!-- children: 'children',-->
label: 'label', <!-- label: 'label',-->
}" <!-- }"-->
nodeKey="id" <!-- nodeKey="id"-->
:defaultSelect="true" <!-- :defaultSelect="true"-->
:defaultData="defaultData" <!-- :defaultData="defaultData"-->
:clearable="true" <!-- :clearable="true"-->
:placeholder="'请选择'" <!-- :placeholder="'请选择'"-->
@handleNodeClick="selectDrop" <!-- @handleNodeClick="selectDrop"-->
></selectTree> <!-- ></selectTree>-->
<Tree ref="mychildSon" :width="240" :dataList="deptList" @changeId="selectDrop"></Tree>
</el-form-item> </el-form-item>
<el-form-item label="退料单号" prop="backCode"> <el-form-item label="退料单号" prop="backCode">
<el-input <el-input
@ -554,11 +555,11 @@ import dialogThreeForm from "./dialogThreeForm.vue";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import selectTree from './selectTree.vue' import selectTree from './selectTree.vue'
import Tree from './tree.vue'
export default { export default {
name: "Dict", name: "Dict",
dicts: ["sys_normal_disable"], dicts: ["sys_normal_disable"],
components: { dialogOneForm, dialogTwoForm, dialogThreeForm, Treeselect, selectTree }, components: { dialogOneForm, dialogTwoForm, dialogThreeForm, Treeselect, selectTree,Tree },
data() { data() {
return { return {
deptList: [], deptList: [],
@ -639,10 +640,6 @@ export default {
this.getTree(); this.getTree();
this.getList(); this.getList();
}, },
updated() {
this.$refs.mychildSon.clearSelect();
this.defaultData = null
},
methods: { methods: {
onClose() { onClose() {
this.open = false this.open = false
@ -651,8 +648,8 @@ export default {
this.getList() this.getList()
}, },
selectDrop(value) { selectDrop(value) {
console.log('33333333333',value)
this.queryParams.type = value this.queryParams.type = value
this.defaultData = null
}, },
selectDropDialog(value) { selectDropDialog(value) {
this.dialogQueryParams.typeName = value this.dialogQueryParams.typeName = value
@ -731,8 +728,8 @@ export default {
this.queryParams.type = '' this.queryParams.type = ''
this.dateRange = []; this.dateRange = [];
this.resetForm("queryForm"); this.resetForm("queryForm");
this.$refs.mychildSon.inputValue='';
this.handleQuery(); this.handleQuery();
this.$refs.mychildSon.clearSelect();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQueryDialog() { resetQueryDialog() {

View File

@ -1,3 +1,4 @@
<script src="../../../../vue.config.js"></script>
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form <el-form
@ -48,21 +49,22 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工机具类型" prop="type"> <el-form-item label="工机具类型" prop="type">
<selectTree <!-- <selectTree-->
ref="mychild" <!-- ref="mychild"-->
style="width: 240px" <!-- style="width: 240px"-->
:treeList="deptList" <!-- :treeList="deptList"-->
:treeProps="{ <!-- :treeProps="{-->
children: 'children', <!-- children: 'children',-->
label: 'label', <!-- label: 'label',-->
}" <!-- }"-->
nodeKey="id" <!-- nodeKey="id"-->
:defaultSelect="true" <!-- :defaultSelect="true"-->
:defaultData="defaultData" <!-- :defaultData="defaultData"-->
:clearable="true" <!-- :clearable="true"-->
:placeholder="'请选择'" <!-- :placeholder="'请选择'"-->
@handleNodeClick="selectDrop" <!-- @handleNodeClick="selectDrop"-->
></selectTree> <!-- ></selectTree>-->
<Tree ref="mychildSon" :width="240" :dataList="deptList" @changeId="selectDrop"></Tree>
</el-form-item> </el-form-item>
<el-form-item label="维修单号" prop="backCode"> <el-form-item label="维修单号" prop="backCode">
<el-input <el-input
@ -487,9 +489,10 @@ import {
getUnitInfoSelectApi, getProjectSelectApi, getDicSelectApi, listPartTypeApi, getMaTypeSelectApi getUnitInfoSelectApi, getProjectSelectApi, getDicSelectApi, listPartTypeApi, getMaTypeSelectApi
} from "@/api/repairTest/repair"; } from "@/api/repairTest/repair";
import selectTree from '../repair/selectTree.vue' import selectTree from '../repair/selectTree.vue'
import Tree from '@/views/repairTest/repair/tree.vue'
export default { export default {
name: "Dict", name: "Dict",
components: { selectTree }, components: { Tree, selectTree, },
dicts: ['sys_normal_disable'], dicts: ['sys_normal_disable'],
data() { data() {
return { return {
@ -510,7 +513,6 @@ export default {
openTextOne: '', openTextOne: '',
openTextTwo: '', openTextTwo: '',
openTextThree: '', openTextThree: '',
openTextThree: '',
type: '', type: '',
// //
loading: false, loading: false,
@ -658,8 +660,9 @@ export default {
resetQuery() { resetQuery() {
this.dateRange = []; this.dateRange = [];
this.resetForm("queryForm"); this.resetForm("queryForm");
this.$refs.mychildSon.inputValue='';
this.queryParams.type = ''
this.handleQuery(); this.handleQuery();
this.$refs.mychild.clearSelect();
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {