diff --git a/src/views/project/ProjectList.vue b/src/views/project/ProjectList.vue index 239cf85..5b4fa5f 100644 --- a/src/views/project/ProjectList.vue +++ b/src/views/project/ProjectList.vue @@ -1,5 +1,5 @@ - - + diff --git a/src/views/project/ProjectStepForm.vue b/src/views/project/ProjectStepForm.vue index 812d0cd..a673210 100644 --- a/src/views/project/ProjectStepForm.vue +++ b/src/views/project/ProjectStepForm.vue @@ -1,32 +1,21 @@ diff --git a/src/views/project/classAdd/ClassForm.vue b/src/views/project/classAdd/ClassForm.vue index 5778689..e095bd8 100644 --- a/src/views/project/classAdd/ClassForm.vue +++ b/src/views/project/classAdd/ClassForm.vue @@ -73,26 +73,22 @@ export default { this.visible = true }, handleOk(e) { - this.$refs.ClassForm.validate((valid) => { - if (valid) { - this.confirmLoading = true - classAdd(this.form).then((res) => { - if (res.code == 200) { - this.$message.success('新增成功') - this.confirmLoading = false - this.handleCancel() - } else { - this.$message.error('新增失败:' + res.msg) - } - }) + this.confirmLoading = true + classAdd(this.form).then((res) => { + if (res.code == 200) { + this.$message.success('新增成功') + this.confirmLoading = false + this.handleCancel() } else { - return false + this.$message.error('新增失败:' + res.msg) + this.handleCancel() } }) }, handleCancel(e) { // console.log('Clicked cancel button') - this.$refs.table.refresh() + // this.$refs.table.refresh() + this.$parent.handleRefresh(false) this.visible = false }, }, diff --git a/src/views/project/classAdd/ClassList.vue b/src/views/project/classAdd/ClassList.vue index 494ea1b..2062c3f 100644 --- a/src/views/project/classAdd/ClassList.vue +++ b/src/views/project/classAdd/ClassList.vue @@ -50,15 +50,19 @@ export default { }, methods: { handledDel(record) { - console.log("delete-id",record) - classDel({ids:record.id}).then((res) => { + console.log('delete-id', record) + classDel({ ids: record.id }).then((res) => { if (res.code == 200) { this.$message.success('删除成功') - this.$refs.table.refresh(true) + this.handleRefresh(false) } }) }, getData() {}, + // 搜索按钮 + handleRefresh(bool) { + this.$refs.table.refresh(bool) + }, }, created: {}, } diff --git a/src/views/project/form/ProjectCourseSelect.vue b/src/views/project/form/ProjectCourseSelect.vue index 5d53107..722b686 100644 --- a/src/views/project/form/ProjectCourseSelect.vue +++ b/src/views/project/form/ProjectCourseSelect.vue @@ -1,24 +1,41 @@ @@ -26,6 +43,10 @@ //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等) //例如:import 《组件名称》 from '《组件路径》' +/**------------------------------------------------------------ */ + +/**----------------------------------------------------------------- */ + export default { //import引入的组件需要注入到对象中才能使用 components: {}, @@ -36,6 +57,11 @@ export default { visible: false, confirmLoading: false, current: ['mail'], + + expandedKeys: [], + searchValue: '', + autoExpandParent: true, + gData, } }, //计算属性 类似于data概念 @@ -61,6 +87,27 @@ export default { this.visible = false this.formLoading = false }, + onExpand(expandedKeys) { + this.expandedKeys = expandedKeys + this.autoExpandParent = false + }, + onChange(e) { + console.log(this.gData) + const value = e.target.value + const expandedKeys = dataList + .map((item) => { + if (item.title.indexOf(value) > -1) { + return getParentKey(item.key, gData) + } + return null + }) + .filter((item, i, self) => item && self.indexOf(item) === i) + Object.assign(this, { + expandedKeys, + searchValue: value, + autoExpandParent: true, + }) + }, }, created() {}, //生命周期 - 创建完成(可以访问当前this实例) mounted() {}, //生命周期 - 挂载完成(可以访问DOM元素) @@ -74,24 +121,4 @@ export default { } \ No newline at end of file diff --git a/src/views/project/form/ProjectForm.vue b/src/views/project/form/ProjectForm.vue index 106ac5d..9dc747e 100644 --- a/src/views/project/form/ProjectForm.vue +++ b/src/views/project/form/ProjectForm.vue @@ -5,7 +5,7 @@ - + @@ -129,7 +129,7 @@ export default { labelCol: { span: 4 }, wrapperCol: { span: 14 }, personType: [], - form: this.$form.createForm(this, { name: 'project' }), + form: {}, modalTitle: '新增项目', visible: false, confirmLoading: false, diff --git a/src/views/project/terminalTrain/TerminalTrainList.vue b/src/views/project/terminalTrain/TerminalTrainList.vue new file mode 100644 index 0000000..99edf29 --- /dev/null +++ b/src/views/project/terminalTrain/TerminalTrainList.vue @@ -0,0 +1,135 @@ + + + + \ No newline at end of file