diff --git a/.env.development b/.env.development
index fe92452..2623e82 100644
--- a/.env.development
+++ b/.env.development
@@ -5,7 +5,7 @@ ENV = 'development'
VUE_APP_BASE_API = '/test-api'
# VUE_APP_BASE_TARGET = 'http://www.keyitest.cn/test-api'
-VUE_APP_BASE_TARGET = 'http://192.168.0.129:9999'
+VUE_APP_BASE_TARGET = 'http://192.168.0.229:9999'
# VUE_APP_BASE_TARGET = 'http://172.16.36.180:9999'
# 路由懒加载
diff --git a/src/views/trainService/school.vue b/src/views/trainService/school.vue
index 85fb478..4dc16d9 100644
--- a/src/views/trainService/school.vue
+++ b/src/views/trainService/school.vue
@@ -16,7 +16,7 @@
重置
-->
-
+
新增
diff --git a/src/views/trainService/signlist.vue b/src/views/trainService/signlist.vue
index 7477312..ebbf544 100644
--- a/src/views/trainService/signlist.vue
+++ b/src/views/trainService/signlist.vue
@@ -1,5 +1,6 @@
+
重置
-
- 新增
-
+
+ 新增
+
@@ -58,24 +59,25 @@
可靠性人才培训班
+
- {{ scope.row.registrationStartTime.slice(0, 10) || '未录入' }}
+ {{ (scope.row.registrationStartTime && scope.row.registrationStartTime.slice(0, 10)) || '未录入' }}
- {{ scope.row.registrationEndTime.slice(0, 10) || '未录入' }}
+ {{ (scope.row.registrationEndTime && scope.row.registrationEndTime.slice(0, 10)) || '未录入' }}
- {{ scope.row.trainStartTime.slice(0, 10) || '未录入' }}
+ {{ (scope.row.trainStartTime && scope.row.trainStartTime.slice(0, 10)) || '未录入' }}
- {{ scope.row.trainEndTime.slice(0, 10) || '未录入' }}
+ {{ (scope.row.trainEndTime && scope.row.trainEndTime.slice(0, 10)) || '未录入' }}
@@ -114,7 +116,7 @@
:title="title"
:visible.sync="visibleopen"
:close-on-click-modal="false"
- width="700px"
+ width="800px"
append-to-body
@close="colsedia"
>
@@ -127,6 +129,16 @@
+
+
+
+
+
diff --git a/src/views/trainService/talentPool.vue b/src/views/trainService/talentPool.vue
index 3168809..ecf4914 100644
--- a/src/views/trainService/talentPool.vue
+++ b/src/views/trainService/talentPool.vue
@@ -16,7 +16,7 @@
重置
-->
-
+
新增
导入
@@ -28,6 +28,10 @@
+
+
+
+
@@ -52,39 +56,43 @@
append-to-body
@close="colsedia"
>
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
- 确认
- 取消
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -143,7 +151,18 @@ export default {
title: '新增人才',
visibleopen: false,
form: {},
- rules: {},
+ rules: {
+ name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
+ phone: [{ required: true, message: '请输入手机号', trigger: 'blur' }],
+ certificateNo: [{ required: true, message: '请输入证书编号', trigger: 'blur' }],
+ university: [{ required: true, message: '请输入学校', trigger: 'blur' }],
+ college: [{ required: true, message: '请输入二级学院', trigger: 'blur' }],
+
+ name: [{ required: true, message: '请输入年级', trigger: 'blur' }],
+ name: [{ required: true, message: '请输入专业', trigger: 'blur' }],
+ name: [{ required: true, message: '请输入水平', trigger: 'blur' }],
+ name: [{ required: true, message: '请输入是否雇用', trigger: 'blur' }],
+ },
upload: {
// 是否显示弹出层(用户导入)
open: false,
@@ -195,21 +214,30 @@ export default {
})
},
// 提交
- async submitto() {
- if (this.form.talentId) {
- // 修改
- await updateTalent(this.form)
- this.$message.success('修改成功')
- } else {
- // console.log(this.form);
- await addTalent(this.form)
- this.$message.success('新增成功')
- }
- this.colsedia()
- this.getList()
+ submitto() {
+ this.$refs['form'].validate((valid) => {
+ if (valid) {
+ if (this.form.talentId) {
+ // 修改
+ updateTalent(this.form).then((res) => {
+ this.$message.success('修改成功')
+ this.colsedia()
+ this.getList()
+ })
+ } else {
+ // console.log(this.form);
+ addTalent(this.form).then((res) => {
+ this.$message.success('新增成功')
+ this.colsedia()
+ this.getList()
+ })
+ }
+ }
+ })
},
// 关闭
colsedia() {
+ this.$refs['form'].resetFields()
this.visibleopen = false
},
handleQuery() {
@@ -257,4 +285,7 @@ export default {
diff --git a/src/views/trainService/trainTeacher.vue b/src/views/trainService/trainTeacher.vue
index 60fbd4a..0f64f63 100644
--- a/src/views/trainService/trainTeacher.vue
+++ b/src/views/trainService/trainTeacher.vue
@@ -16,7 +16,7 @@
重置
-->
-
+
新增
@@ -26,7 +26,9 @@
+
+
修改
@@ -46,26 +48,31 @@
:title="title"
:visible.sync="visibleopen"
:close-on-click-modal="false"
- width="700px"
+ width="720px"
append-to-body
@close="colsedia"
>
-
+
-
+
-
+
-
+
-
+
-
-
+
+
+
+
+
+
+
-
-
- 确认
- 取消
+
+
+
@@ -114,7 +114,14 @@ export default {
title: '新增教师',
visibleopen: false,
form: {},
- rules: {},
+ rules: {
+ name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
+ phone: [{ required: true, message: '请输入手机号', trigger: 'blur' }],
+ teaching: [{ required: true, message: '请输入教学方向', trigger: 'blur' }],
+ title: [{ required: true, message: '请输入职称', trigger: 'blur' }],
+ isEmploy: [{ required: true, message: '请输入是否对外显示', trigger: 'blur' }],
+ avatar: [{ required: true, message: '请上传头像', trigger: 'change' }],
+ },
}
},
@@ -154,25 +161,34 @@ export default {
})
},
// 提交
- async submitto() {
- if (this.form.talentId) {
- // 修改
- const url = this.form.avatar
- const index = url.indexOf('/profile')
- this.form.avatar = url.substring(index)
- console.log(this.form)
- await updateTeacher(this.form)
- this.$message.success('修改成功')
- } else {
- await addTeacher(this.form)
- this.$message.success('新增成功')
- }
- this.colsedia()
- this.getList()
+ submitto() {
+ this.$refs['form'].validate((valid) => {
+ if (valid) {
+ if (this.form.talentId) {
+ // 修改
+ const url = this.form.avatar
+ const index = url.indexOf('/profile')
+ this.form.avatar = url.substring(index)
+ console.log(this.form)
+ updateTeacher(this.form).then((res) => {
+ this.$message.success('修改成功')
+ this.colsedia()
+ this.getList()
+ })
+ } else {
+ addTeacher(this.form).then((res) => {
+ this.$message.success('新增成功')
+ this.colsedia()
+ this.getList()
+ })
+ }
+ }
+ })
},
// 关闭
colsedia() {
this.visibleopen = false
+ this.$refs['form'].resetFields()
},
handleQuery() {
this.getList()
@@ -189,4 +205,7 @@ export default {