Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
YunaiV committed Dec 29, 2023
2 parents 7c8d340 + 2c2fa95 commit 53b8d8a
Show file tree
Hide file tree
Showing 20 changed files with 64 additions and 71 deletions.
5 changes: 2 additions & 3 deletions src/views/infra/demo/demo01/Demo01ContactForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</template>

<script>
import * as Demo01ContactApi from '@/api/infra/demo01'
import * as Demo01ContactApi from '@/api/infra/demo01';
import ImageUpload from '@/components/ImageUpload';
import Editor from '@/components/Editor';
export default {
Expand Down Expand Up @@ -104,8 +104,7 @@ export default {
this.$modal.msgSuccess("新增成功");
this.dialogVisible = false;
this.$emit('success');
// TODO @puhui999:少了一个空格
}finally {
} finally {
this.formLoading = false;
}
},
Expand Down
3 changes: 1 addition & 2 deletions src/views/infra/demo/demo01/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<template>
<div class="app-container">

<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="名字" prop="name">
Expand Down Expand Up @@ -149,7 +148,7 @@ export default {
await this.$modal.confirm('是否确认删除示例联系人编号为"' + id + '"的数据项?')
try {
await Demo01ContactApi.deleteDemo01Contact(id);
this.getList();
await this.getList();
this.$modal.msgSuccess("删除成功");
} catch {}
},
Expand Down
16 changes: 7 additions & 9 deletions src/views/infra/demo/demo02/Demo02CategoryForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
<el-input v-model="formData.name" placeholder="请输入名字" />
</el-form-item>
<el-form-item label="父级编号" prop="parentId">
<!-- TODO puhui999:这里下面应该是 2 个空格 -->
<TreeSelect
v-model="formData.parentId"
:options="demo02CategoryTree"
:normalizer="normalizer"
placeholder="请选择父级编号"
v-model="formData.parentId"
:options="demo02CategoryTree"
:normalizer="normalizer"
placeholder="请选择父级编号"
/>
</el-form-item>
</el-form>
Expand All @@ -25,7 +24,7 @@
</template>

<script>
import * as Demo02CategoryApi from '@/api/infra/demo02'
import * as Demo02CategoryApi from '@/api/infra/demo02';
import TreeSelect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
Expand Down Expand Up @@ -72,8 +71,7 @@ export default {
}
}
this.title = "新增示例分类";
// TODO @puhui999:这里少了一个 await
this.getDemo02CategoryTree();
await this.getDemo02CategoryTree();
},
/** 提交按钮 */
async submitForm() {
Expand All @@ -95,7 +93,7 @@ export default {
this.$modal.msgSuccess("新增成功");
this.dialogVisible = false;
this.$emit('success');
}finally {
} finally {
this.formLoading = false;
}
},
Expand Down
4 changes: 1 addition & 3 deletions src/views/infra/demo/demo02/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<template>
<div class="app-container">

<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="名字" prop="name">
Expand Down Expand Up @@ -37,7 +36,6 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>

<!-- TODO puhui999:这里下面应该是 2 个空格 -->
<el-table
v-loading="loading"
:data="list"
Expand Down Expand Up @@ -136,7 +134,7 @@ export default {
await this.$modal.confirm('是否确认删除示例分类编号为"' + id + '"的数据项?')
try {
await Demo02CategoryApi.deleteDemo02Category(id);
this.getList();
await this.getList();
this.$modal.msgSuccess("删除成功");
} catch {}
},
Expand Down
4 changes: 2 additions & 2 deletions src/views/infra/demo/demo03/erp/Demo03StudentForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</template>

<script>
import * as Demo03StudentApi from '@/api/infra/demo03-erp'
import * as Demo03StudentApi from '@/api/infra/demo03-erp';
import Editor from '@/components/Editor';
export default {
name: "Demo03StudentForm",
Expand Down Expand Up @@ -99,7 +99,7 @@ export default {
this.$modal.msgSuccess("新增成功");
this.dialogVisible = false;
this.$emit('success');
}finally {
} finally {
this.formLoading = false;
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</template>

<script>
import * as Demo03StudentApi from '@/api/infra/demo03-erp'
import * as Demo03StudentApi from '@/api/infra/demo03-erp';
export default {
name: "Demo03CourseForm",
components: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
</template>

<script>
import * as Demo03StudentApi from '@/api/infra/demo03-erp'
import Demo03CourseForm from './Demo03CourseForm.vue'
import * as Demo03StudentApi from '@/api/infra/demo03-erp';
import Demo03CourseForm from './Demo03CourseForm.vue';
export default {
name: "Demo03CourseList",
components: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</template>

<script>
import * as Demo03StudentApi from '@/api/infra/demo03-erp'
import * as Demo03StudentApi from '@/api/infra/demo03-erp';
export default {
name: "Demo03GradeForm",
components: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
</template>

<script>
import * as Demo03StudentApi from '@/api/infra/demo03-erp'
import Demo03GradeForm from './Demo03GradeForm.vue'
import * as Demo03StudentApi from '@/api/infra/demo03-erp';
import Demo03GradeForm from './Demo03GradeForm.vue';
export default {
name: "Demo03GradeList",
components: {
Expand Down
7 changes: 3 additions & 4 deletions src/views/infra/demo/demo03/erp/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<template>
<div class="app-container">

<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="名字" prop="name">
Expand Down Expand Up @@ -93,8 +92,8 @@
<script>
import * as Demo03StudentApi from '@/api/infra/demo03-erp';
import Demo03StudentForm from './Demo03StudentForm.vue';
import Demo03CourseList from './components/Demo03CourseList.vue'
import Demo03GradeList from './components/Demo03GradeList.vue'
import Demo03CourseList from './components/Demo03CourseList.vue';
import Demo03GradeList from './components/Demo03GradeList.vue';
export default {
name: "Demo03Student",
components: {
Expand Down Expand Up @@ -169,7 +168,7 @@ export default {
await this.$modal.confirm('是否确认删除学生编号为"' + id + '"的数据项?')
try {
await Demo03StudentApi.deleteDemo03Student(id);
this.getList();
await this.getList();
this.$modal.msgSuccess("删除成功");
} catch {}
},
Expand Down
8 changes: 4 additions & 4 deletions src/views/infra/demo/demo03/inner/Demo03StudentForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
</template>

<script>
import * as Demo03StudentApi from '@/api/infra/demo03-inner'
import * as Demo03StudentApi from '@/api/infra/demo03-inner';
import Editor from '@/components/Editor';
import Demo03CourseForm from './components/Demo03CourseForm.vue'
import Demo03GradeForm from './components/Demo03GradeForm.vue'
import Demo03CourseForm from './components/Demo03CourseForm.vue';
import Demo03GradeForm from './components/Demo03GradeForm.vue';
export default {
name: "Demo03StudentForm",
components: {
Expand Down Expand Up @@ -130,7 +130,7 @@ export default {
this.$modal.msgSuccess("新增成功");
this.dialogVisible = false;
this.$emit('success');
}finally {
} finally {
this.formLoading = false;
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<template>
<div class="app-container">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
v-loading="formLoading"
label-width="0px"
:inline-message="true"
ref="formRef"
:model="formData"
:rules="formRules"
v-loading="formLoading"
label-width="0px"
:inline-message="true"
>
<el-table :data="formData" class="-mt-10px">
<el-table-column label="序号" type="index" width="100" />
Expand Down Expand Up @@ -38,7 +38,7 @@
</template>

<script>
import * as Demo03StudentApi from '@/api/infra/demo03-inner'
import * as Demo03StudentApi from '@/api/infra/demo03-inner';
export default {
name: "Demo03CourseForm",
components: {
Expand Down Expand Up @@ -71,6 +71,7 @@ export default {
}
try {
this.formLoading = true;
// 这里还是需要获取一下 this 的不然取不到 formData
const that = this;
Demo03StudentApi.getDemo03CourseListByStudentId(val).then(function (res){
that.formData = res.data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</template>

<script>
import * as Demo03StudentApi from '@/api/infra/demo03-inner'
import * as Demo03StudentApi from '@/api/infra/demo03-inner';
export default {
name: "Demo03CourseList",
props:[
Expand Down
13 changes: 7 additions & 6 deletions src/views/infra/demo/demo03/inner/components/Demo03GradeForm.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<div class="app-container">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
>
<el-form-item label="名字" prop="name">
<el-input v-model="formData.name" placeholder="请输入名字" />
Expand All @@ -18,7 +18,7 @@
</template>

<script>
import * as Demo03StudentApi from '@/api/infra/demo03-inner'
import * as Demo03StudentApi from '@/api/infra/demo03-inner';
export default {
name: "Demo03GradeForm",
components: {
Expand Down Expand Up @@ -56,6 +56,7 @@ export default {
}
try {
this.formLoading = true;
// 这里还是需要获取一下 this 的不然取不到 formData
const that = this;
Demo03StudentApi.getDemo03GradeByStudentId(val).then(function (res){
const data = res.data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</template>

<script>
import * as Demo03StudentApi from '@/api/infra/demo03-inner'
import * as Demo03StudentApi from '@/api/infra/demo03-inner';
export default {
name: "Demo03GradeList",
props:[
Expand Down
7 changes: 3 additions & 4 deletions src/views/infra/demo/demo03/inner/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<template>
<div class="app-container">

<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="名字" prop="name">
Expand Down Expand Up @@ -90,8 +89,8 @@
<script>
import * as Demo03StudentApi from '@/api/infra/demo03-inner';
import Demo03StudentForm from './Demo03StudentForm.vue';
import Demo03CourseList from './components/Demo03CourseList.vue'
import Demo03GradeList from './components/Demo03GradeList.vue'
import Demo03CourseList from './components/Demo03CourseList.vue';
import Demo03GradeList from './components/Demo03GradeList.vue';
export default {
name: "Demo03Student",
components: {
Expand Down Expand Up @@ -164,7 +163,7 @@ export default {
await this.$modal.confirm('是否确认删除学生编号为"' + id + '"的数据项?')
try {
await Demo03StudentApi.deleteDemo03Student(id);
this.getList();
await this.getList();
this.$modal.msgSuccess("删除成功");
} catch {}
},
Expand Down
8 changes: 4 additions & 4 deletions src/views/infra/demo/demo03/normal/Demo03StudentForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
</template>

<script>
import * as Demo03StudentApi from '@/api/infra/demo03-normal'
import * as Demo03StudentApi from '@/api/infra/demo03-normal';
import Editor from '@/components/Editor';
import Demo03CourseForm from './components/Demo03CourseForm.vue'
import Demo03GradeForm from './components/Demo03GradeForm.vue'
import Demo03CourseForm from './components/Demo03CourseForm.vue';
import Demo03GradeForm from './components/Demo03GradeForm.vue';
export default {
name: "Demo03StudentForm",
components: {
Expand Down Expand Up @@ -130,7 +130,7 @@ export default {
this.$modal.msgSuccess("新增成功");
this.dialogVisible = false;
this.$emit('success');
}finally {
} finally {
this.formLoading = false;
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<template>
<div class="app-container">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
v-loading="formLoading"
label-width="0px"
:inline-message="true"
ref="formRef"
:model="formData"
:rules="formRules"
v-loading="formLoading"
label-width="0px"
:inline-message="true"
>
<el-table :data="formData" class="-mt-10px">
<el-table-column label="序号" type="index" width="100" />
Expand Down Expand Up @@ -38,7 +38,7 @@
</template>

<script>
import * as Demo03StudentApi from '@/api/infra/demo03-normal'
import * as Demo03StudentApi from '@/api/infra/demo03-normal';
export default {
name: "Demo03CourseForm",
components: {
Expand Down
Loading

0 comments on commit 53b8d8a

Please sign in to comment.