|
@@ -7037,9 +7037,7 @@ export default {
|
|
|
this.ajax
|
|
|
.get(this.$store.state.api + "getCourseTemplateTs", params)
|
|
|
.then((res) => {
|
|
|
- this.templateArray = res.data[0].filter(el => {
|
|
|
- return el.oid
|
|
|
- });
|
|
|
+ this.templateArray = res.data[0];
|
|
|
this.getTemplateOrg();
|
|
|
this.$forceUpdate();
|
|
|
})
|
|
@@ -7054,10 +7052,12 @@ export default {
|
|
|
.then((res) => {
|
|
|
if (res.data[0].length) {
|
|
|
let ta = res.data[0].filter(el => {
|
|
|
- return el.oid
|
|
|
- });
|
|
|
- let newArr2 = this.templateArray.filter(x => !ta.some(y => y.id === x.id));
|
|
|
- this.templateArray = [...newArr2, ...this.templateArray];
|
|
|
+ return el.oid
|
|
|
+ });
|
|
|
+ this.templateArray = [...ta, ...this.templateArray];
|
|
|
+ this.templateArray = this.templateArray.sort(function(a, b) {
|
|
|
+ return b.create_at < a.create_at? -1 : 1
|
|
|
+ })
|
|
|
}
|
|
|
this.$forceUpdate();
|
|
|
})
|