提交已修改修试相关代码bug

This commit is contained in:
zhouxain01 2023-12-19 16:38:35 +08:00
parent 2a00a61069
commit ed81f60582
10 changed files with 149 additions and 66 deletions

View File

@ -17,7 +17,6 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="单位名称" prop="backUnit"> <el-form-item label="单位名称" prop="backUnit">
<el-select <el-select
v-model="queryParams.backUnit" v-model="queryParams.backUnit"
@ -193,7 +192,6 @@
prop="createTime" prop="createTime"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column <el-table-column
label="报废单号" label="报废单号"
align="center" align="center"
@ -501,10 +499,7 @@ export default {
dicts: ['sys_normal_disable'], dicts: ['sys_normal_disable'],
data() { data() {
return { return {
defaultData: { defaultData: null,
id: '',
label: ''
},
selectionList: [], selectionList: [],
unitInfoSelectList: [], unitInfoSelectList: [],
projectSelectList: [], projectSelectList: [],
@ -576,6 +571,10 @@ export default {
}) })
this.getTree() this.getTree()
}, },
updated() {
this.$refs.mychild.clearSelect();
this.defaultData = null
},
methods: { methods: {
/** 查询字典类型列表 */ /** 查询字典类型列表 */
getList() { getList() {
@ -648,12 +647,12 @@ export default {
getTree() { getTree() {
listPartTypeApi().then(response => { listPartTypeApi().then(response => {
this.deptList = response.data this.deptList = response.data
// this.deptList = this.handleTree(response.data, "id");
}); });
getMaTypeSelectApi().then(response => { getMaTypeSelectApi().then(response => {
this.deptTypeList = response.data this.deptTypeList = response.data
}); });
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
@ -663,6 +662,7 @@ export default {
resetQuery() { resetQuery() {
this.dateRange = []; this.dateRange = [];
this.resetForm("queryForm"); this.resetForm("queryForm");
this.$refs.mychild.clearSelect();
this.handleQuery(); this.handleQuery();
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */

View File

@ -27,7 +27,6 @@
:prop="'premiumList.' + index + '.partId'" :prop="'premiumList.' + index + '.partId'"
label="选择配件:" label="选择配件:"
> >
<!---->
<treeselect <treeselect
v-model="domain.partId" v-model="domain.partId"
style="width: 250px" style="width: 250px"
@ -503,6 +502,7 @@ export default {
this.fullscreenLoading = false this.fullscreenLoading = false
this.dialogShowFlag = false this.dialogShowFlag = false
this.index = null this.index = null
this.$message.success('操作成功!')
this.$emit('domainChange', res.code) this.$emit('domainChange', res.code)
} }
}).catch(() => { }).catch(() => {
@ -534,6 +534,7 @@ export default {
this.fullscreenLoading = false this.fullscreenLoading = false
this.dialogShowFlag = false this.dialogShowFlag = false
this.index = null this.index = null
this.$message.success('操作成功!')
this.$emit('domainChange', res.code) this.$emit('domainChange', res.code)
} }
}).catch(() => { }).catch(() => {

View File

@ -200,7 +200,7 @@ export default {
}, },
data() { data() {
return { return {
actionUrl: process.env.VUE_APP_BASE_API + '/system/sys/file/upload', actionUrl: process.env.VUE_APP_BASE_API + '/sgzb-system/sys/file/upload',
// uploadTip: 'jpg/png500kb', // uploadTip: 'jpg/png500kb',
fileIds: [], fileIds: [],
fileList: [], fileList: [],
@ -285,12 +285,14 @@ export default {
fileIds: this.fileIds.length > 0 ? this.fileIds : "", fileIds: this.fileIds.length > 0 ? this.fileIds : "",
scrapNum: 1, scrapNum: 1,
} }
this.fullscreenLoading = true this.fullscreenLoading = true
submitRepairApplyApi(params).then(res => { submitRepairApplyApi(params).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.fileList = [] this.fileList = []
this.fileIds = [] this.fileIds = []
this.getList() this.getList()
this.$message.success('操作成功!')
this.fullscreenLoading = false this.fullscreenLoading = false
this.dialogShowFlag = false this.dialogShowFlag = false
this.$emit('domainChange', res.code) this.$emit('domainChange', res.code)
@ -326,6 +328,7 @@ export default {
this.fileList = [] this.fileList = []
this.fileIds = [] this.fileIds = []
this.getList() this.getList()
this.$message.success('操作成功!')
this.fullscreenLoading = false this.fullscreenLoading = false
this.dialogShowFlag = false this.dialogShowFlag = false
this.$emit('domainChange', res.code) this.$emit('domainChange', res.code)
@ -364,8 +367,6 @@ export default {
cancel() { cancel() {
this.dialogShowFlag = false; this.dialogShowFlag = false;
this.fileList = [] this.fileList = []
// this.$refs["form"].resetFields();
// this.dynamicValidateForm.premiumList = [];
}, },
addDomainOne() { addDomainOne() {
this.dynamicValidateForm.premiumList.push({ this.dynamicValidateForm.premiumList.push({

View File

@ -116,18 +116,6 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
</div> </div>
<!-- <el-button @click.prevent="removeDomain(domain, index)"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- <div class="add_box">
<el-button
icon="el-icon-plus"
size="mini"
type="success"
@click="addDomainOne"
>添加配件
</el-button>
</div> -->
</div> </div>
</el-form> </el-form>
<div <div
@ -514,6 +502,7 @@ export default {
this.getList() this.getList()
this.fullscreenLoading = false this.fullscreenLoading = false
this.dialogShowFlag = false this.dialogShowFlag = false
this.$message.success('操作成功!')
this.$emit('domainChange', res.code) this.$emit('domainChange', res.code)
} }
}).catch(() => { }).catch(() => {
@ -545,6 +534,7 @@ export default {
this.getList() this.getList()
this.fullscreenLoading = false this.fullscreenLoading = false
this.dialogShowFlag = false this.dialogShowFlag = false
this.$message.success('操作成功!')
this.$emit('domainChange', res.code) this.$emit('domainChange', res.code)
} }
}).catch(() => { }).catch(() => {

View File

@ -49,7 +49,7 @@
</el-form-item> </el-form-item>
<el-form-item label="工机具类型" prop="type"> <el-form-item label="工机具类型" prop="type">
<selectTree <selectTree
ref="mychild" ref="mychildSon"
style="width: 240px" style="width: 240px"
:treeList="deptList" :treeList="deptList"
:treeProps="{ :treeProps="{
@ -59,12 +59,11 @@
nodeKey="id" nodeKey="id"
:defaultSelect="true" :defaultSelect="true"
:defaultData="defaultData" :defaultData="defaultData"
:clearable="false" :clearable="true"
:placeholder="'请选择'" :placeholder="'请选择'"
@handleNodeClick="selectDrop" @handleNodeClick="selectDrop"
></selectTree> ></selectTree>
</el-form-item> </el-form-item>
<el-form-item label="退料单号" prop="backCode"> <el-form-item label="退料单号" prop="backCode">
<el-input <el-input
v-model="queryParams.backCode" v-model="queryParams.backCode"
@ -184,7 +183,7 @@
sortable sortable
label="任务创建人" label="任务创建人"
align="center" align="center"
prop="createUser" prop="createName"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column <el-table-column
@ -295,8 +294,8 @@
nodeKey="id" nodeKey="id"
:defaultSelect="true" :defaultSelect="true"
:defaultData="defaultData" :defaultData="defaultData"
:clearable="false" :clearable="true"
:placeholder="'请选择'" :placeholder="'请选择类型名称'"
@handleNodeClick="selectDropDialog" @handleNodeClick="selectDropDialog"
></selectTree> ></selectTree>
</el-form-item> </el-form-item>
@ -325,8 +324,8 @@
nodeKey="id" nodeKey="id"
:defaultSelect="true" :defaultSelect="true"
:defaultData="defaultData" :defaultData="defaultData"
:clearable="false" :clearable="true"
:placeholder="'请选择'" :placeholder="'请选择规格型号'"
@handleNodeClick="selectDropDialogTwo" @handleNodeClick="selectDropDialogTwo"
></selectTree> ></selectTree>
</el-form-item> </el-form-item>
@ -622,7 +621,7 @@ export default {
form: {}, form: {},
// //
rules: {}, rules: {},
defaultData: null, defaultData: {},
}; };
}, },
created() { created() {
@ -638,9 +637,12 @@ export default {
}, },
mounted() { mounted() {
this.getTree(); this.getTree();
// this.$refs.mychild.clearSelect();
this.getList(); this.getList();
}, },
updated() {
this.$refs.mychildSon.clearSelect();
this.defaultData = null
},
methods: { methods: {
onClose() { onClose() {
this.open = false this.open = false
@ -650,6 +652,7 @@ export default {
}, },
selectDrop(value) { selectDrop(value) {
this.queryParams.type = value this.queryParams.type = value
this.defaultData = null
}, },
selectDropDialog(value) { selectDropDialog(value) {
this.dialogQueryParams.typeName = value this.dialogQueryParams.typeName = value
@ -720,37 +723,32 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.queryParams.pageSize = 10;
this.getList(); this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.queryParams.dictName = '' this.queryParams.type = ''
this.dateRange = []; this.dateRange = [];
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
// this.$refs.mychild.clearFun(); this.$refs.mychildSon.clearSelect();
this.$refs.mychild.clearSelect();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQueryDialog() { resetQueryDialog() {
this.dialogQueryParams = {}; // this.dialogQueryParams = {};
this.dialogQueryParams.keyword = ''
this.dialogQueryParams.type = ''
this.dialogQueryParams.typeName = ''
this.resetForm("dialogQueryParams"); this.resetForm("dialogQueryParams");
this.getDialogList(); this.getDialogList();
this.$refs.mychildDialog.clearSelect(); this.$refs.mychildDialog.clearSelect();
this.$refs.mychildDialogTwo.clearSelect(); this.$refs.mychildDialogTwo.clearSelect();
}, },
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "计划借调";
},
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
console.log('selection', selection);
this.selectionList = selection this.selectionList = selection
this.checkResultOne = selection.every(item => item.repairStatusCode == '43'); this.checkResultOne = selection.every(item => item.repairStatusCode == '43');
console.log('this.checkResultOne ', this.checkResultOne);
this.ids = selection.map((item) => item.dictId); this.ids = selection.map((item) => item.dictId);
this.single = selection.length != 1; this.single = selection.length != 1;
this.multiple = !selection.length; this.multiple = !selection.length;
@ -778,9 +776,6 @@ export default {
this.dialogQueryParams = {} this.dialogQueryParams = {}
this.resetForm("dialogQueryParams"); this.resetForm("dialogQueryParams");
}, },
showClose() {
console.log('11111111111111');
},
getDialogList() { getDialogList() {
let params = { let params = {
taskId: this.taskId, taskId: this.taskId,
@ -799,7 +794,6 @@ export default {
} }
}) })
}, },
handleReturn() { handleReturn() {
this.title = '确认操作' this.title = '确认操作'
this.openOne = true; this.openOne = true;

View File

@ -46,7 +46,6 @@
</el-option> </el-option>
</el-select> </el-select>
</template> </template>
<script> <script>
export default { export default {
name: 'index', name: 'index',

View File

@ -0,0 +1,105 @@
<template>
<div>
<div v-clickoutside="closeTree">
<div @click="inputFocus">
<el-input
v-model="inputValue"
:style="'width:' + width + 'px'"
placeholder="请选择工机具类型"
></el-input>
</div>
<div class="treeModule">
<el-tree
class="ORGTree"
v-show="ishowTree"
ref="tree"
:data="dataList"
key="id"
node-key="id"
highlight-current
@node-click="handleNodeClick"
:props="defaultProps"
>
</el-tree>
</div>
</div>
</div>
</template>
<script>
import Clickoutside from "element-ui/src/utils/clickoutside";
export default {
directives: { Clickoutside },
props: {
dataList: {
type: Array,
default: () => {
return []
}
},
// name: {
// type: String,
// default: ''
// },
width: {
type: Number,
default: 300
}
},
watch: {
},
data() {
return {
mineStatusValue: [],
inputValue: '',
dataLists: [],
defaultProps: {
children: 'children',
label: 'label',
},
ishowTree: false,
}
},
mounted() {
},
// watch: {
// name: function () {
// this.inputValue = this.name
// }
// },
methods: {
inputFocus() {
if (this.ishowTree == true) {
this.ishowTree = false
} else {
this.ishowTree = true
}
},
//
closeTree() {
this.ishowTree = false
},
handleNodeClick(e) {
this.inputValue = e.label
this.$emit('changeId', e.id)
this.ishowTree = false
}
}
}
</script>
<style scoped>
.treeModule {
position: absolute; /*这里一定要设置*/
z-index: 999999; /*这里是该元素与显示屏的距离,据说越大越好,但是我也没有看到效果,因为没有它也是可以的*/
}
.ORGTree {
width: 240px;
height: 200px;
overflow: auto;
border: 1px solid #ccc7c7;
}
</style>

View File

@ -74,6 +74,7 @@ export default {
} }
} }
}; };
</script> </script>
<style scoped> <style scoped>

View File

@ -19,8 +19,6 @@
> >
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</el-upload> </el-upload>
<!-- 上传提示 -->
<div class="el-upload__tip" slot="tip" v-if="showTip"> <div class="el-upload__tip" slot="tip" v-if="showTip">
请上传 请上传
<template v-if="fileSize"> <template v-if="fileSize">

View File

@ -59,7 +59,7 @@
nodeKey="id" nodeKey="id"
:defaultSelect="true" :defaultSelect="true"
:defaultData="defaultData" :defaultData="defaultData"
:clearable="false" :clearable="true"
:placeholder="'请选择'" :placeholder="'请选择'"
@handleNodeClick="selectDrop" @handleNodeClick="selectDrop"
></selectTree> ></selectTree>
@ -299,13 +299,6 @@
></selectTree> ></selectTree>
</el-form-item> </el-form-item>
<el-form-item label="规格型号" prop="type"> <el-form-item label="规格型号" prop="type">
<!-- <treeselect
style="width: 250px"
v-model="dialogQueryParams.type"
:options="deptTypeList"
:normalizer="normalizerType"
placeholder="请选择类型名称"
/> -->
<selectTree <selectTree
ref="mychildDialogTwo" ref="mychildDialogTwo"
style="width: 240px" style="width: 240px"
@ -500,10 +493,7 @@ export default {
dicts: ['sys_normal_disable'], dicts: ['sys_normal_disable'],
data() { data() {
return { return {
defaultData: { defaultData: null,
id: '',
label: ''
},
selectionList: [], selectionList: [],
unitInfoSelectList: [], unitInfoSelectList: [],
projectSelectList: [], projectSelectList: [],
@ -576,8 +566,12 @@ export default {
}) })
this.getTree() this.getTree()
}, },
methods: { updated() {
this.$refs.mychild.clearSelect();
this.defaultData = null
},
methods: {
/** 查询字典类型列表 */ /** 查询字典类型列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -665,6 +659,7 @@ export default {
this.dateRange = []; this.dateRange = [];
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
this.$refs.mychild.clearSelect();
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
@ -679,7 +674,6 @@ export default {
this.single = selection.length != 1 this.single = selection.length != 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
handleSee(row, type) { handleSee(row, type) {
this.dialogTitle = '查看' this.dialogTitle = '查看'
this.rowObj = row this.rowObj = row