diff --git a/src/views/training/index.vue b/src/views/training/index.vue
index 1cf20ae..e31170c 100644
--- a/src/views/training/index.vue
+++ b/src/views/training/index.vue
@@ -7,8 +7,8 @@
-
-
+
@@ -53,20 +53,21 @@
-
+
+ placeholder="请输入内容" :trigger-on-focus="true" @select="handleSelectRatify">
+ placeholder="请输入内容" :trigger-on-focus="true" @select="handleSelectAudit">
@@ -81,7 +82,7 @@
-
+
@@ -101,22 +102,23 @@
-
+
-
+
-
+
-
-
+
+
@@ -125,7 +127,7 @@
-
+
@@ -205,22 +207,22 @@
year: [{
required: true,
message: '请选择年份',
- trigger: 'blur'
+ trigger: 'change'
}],
audit_admin: [{
required: true,
message: '请选择审核人',
- trigger: 'blur'
+ trigger: 'change'
}],
ratify_admin: [{
required: true,
message: '请选择批准人',
- trigger: 'blur'
+ trigger: 'change'
}]
},
tableHeight: 900,
searchFields: {
- KeyWord: ""
+ year: ""
},
columns: [{
field: "year",
@@ -252,6 +254,15 @@
},
methods: {
+ handleChangeSYear() {
+ if (this.searchFields.year)
+ this.searchFields.year = this.$moment(this.searchFields.year).format("yyyy");
+ else
+ this.searchFields.year = ""
+ },
+ handleChangeYear() {
+ this.form.year = this.$moment(this.form.year).format("yyyy");
+ },
addRow() {
var len = this.form.train_plan_people_list.length;
this.form.train_plan_people_list.push({
@@ -308,7 +319,8 @@
load() {
listtrain({
page: this.paginations.page,
- page_size: this.paginations.page_size
+ page_size: this.paginations.page_size,
+ year: this.searchFields.year
}).then(res => {
this.tableData = res.data;
this.paginations.total = res.total
@@ -346,8 +358,13 @@
get(obj.id).then(res => {
let result = Object.assign(that.form, res);
that.form = result;
- that.form.type = parseInt(result.type);
+ that.form.train_plan_people_list = res.people;
+ that.form.audit_admin = res.audit_admin.name;
+ that.form.audit_admin_id = res.audit_admin.id;
+ that.form.ratify_admin = res.ratify_admin.name;
+ that.form.ratify_admin_id = res.ratify_admin.id;
+ that.form.year = res.year + "-01-01";
}).catch(error => {
//reject(error)
})
@@ -365,6 +382,9 @@
var that = this;
this.$refs[formName].validate((valid) => {
if (valid) {
+ if (that.form.year.indexOf("-") > -1) {
+ that.form.year = that.form.year.split("-")[0]
+ }
if (that.form.id) {
save(that.form).then(response => {
//console.log(response)
diff --git a/src/views/training/record.vue b/src/views/training/record.vue
index 48d48ea..00504e0 100644
--- a/src/views/training/record.vue
+++ b/src/views/training/record.vue
@@ -1,8 +1,517 @@
-
-
-
-
-
-