培训计划调整

This commit is contained in:
Yjhon 2022-03-14 17:25:37 +08:00
parent 5bffd0f746
commit d0458c0499
2 changed files with 30 additions and 19 deletions

View File

@ -120,22 +120,32 @@ export default {
/** 提示框 START */
showConfirm() {
this.$confirm({
title: '提示',
content: h => <span style="color:red;font-size:15px;">关闭后当前未保存的数据将丢失! 确认关闭吗?</span>,
onOk() {
this.$router.push({
path: '/trainPlan/list/' + this.$route.query.t,
query: {
t: this.queryParam.type, //
trainPlanPageNum: this.$route.query.trainPlanPageNum, //
},
})
},
onCancel() { console.log('Cancel'); },
class: 'test',
});
let _this = this;
if (this.disabled) {
console.log('------1--------')
_this.$router.push({
path: '/trainPlan/list/' + _this.$route.query.t,
query: {
trainPlanPageNum: _this.$route.query.trainPlanPageNum, //
},
});
} else {
console.log('------2--------')
this.$confirm({
title: '提示',
content: h => <span style="color:red;font-size:15px;">关闭后当前未保存的数据将丢失! 确认关闭吗?</span>,
onOk() {
_this.$router.push({
path: '/trainPlan/list/' + _this.$route.query.t,
query: {
trainPlanPageNum: _this.$route.query.trainPlanPageNum, //
},
});
},
onCancel() { console.log('Cancel'); },
class: 'test',
});
}
},
/** 提示框 END */
@ -201,6 +211,9 @@ export default {
this.selectedRows = res.data.projects;
this.selectedRowKeys = res.data.projectIds;
this.disabled = this.$route.query.showDetail === 'true' ? true : false;
this.columns = this.columns.filter(item => { return item.key != 'createBy' })
this.columns = this.columns.filter(item => { return item.key != 'createDate' })
})
}
if (this.$route.query.t != 'year') {

View File

@ -17,7 +17,7 @@
<a-button type="primary" icon="plus" @click="handledCreate">新增培训计划</a-button>
</a-space>
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData" :pageNum="Number(this.$route.query.projectPageNum) || 1">
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData" :pageNum="Number(this.$route.query.trainPlanPageNum) || 1">
<span slot="serial" slot-scope="text, record, index">
{{ index + 1 }}
</span>
@ -27,8 +27,6 @@
<a v-if="year < record.year" href="javascript:;">删除</a>
</a-popconfirm>
<a-divider type="vertical" v-if="year < record.year" />
<a v-if="year < record.year" href="javascript:;" @click="handledCreate(record)">编辑</a>
<a-divider type="vertical" v-if="year < record.year" />
<a href="javascript:;" @click="handledCreate(record,true)">详情</a>
</template>
</span>