|
|
|
|
@ -210,6 +210,13 @@
|
|
|
|
|
@click="editRowEvent(row)"
|
|
|
|
|
>编辑</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
v-if="isHasAuth('create')"
|
|
|
|
|
size="small"
|
|
|
|
|
type="success"
|
|
|
|
|
@click="copyRowEvent(row)"
|
|
|
|
|
>复制</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
v-if="isHasAuth('delete')"
|
|
|
|
|
size="small"
|
|
|
|
|
@ -537,6 +544,23 @@ export default {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
copyRowEvent(row) {
|
|
|
|
|
// 复制数据到新增表单,排除 id 等不需要的字段
|
|
|
|
|
const copyData = {
|
|
|
|
|
name: row.name || '',
|
|
|
|
|
year: this.$moment().format('YYYY'), // 年份设置为当前年份
|
|
|
|
|
school_way: row.school_way || '',
|
|
|
|
|
chong_max: row.chong_max || '',
|
|
|
|
|
chong_min: row.chong_min || '',
|
|
|
|
|
bao_max: row.bao_max || '',
|
|
|
|
|
bao_min: row.bao_min || '',
|
|
|
|
|
wen_max: row.wen_max || '',
|
|
|
|
|
wen_min: row.wen_min || '',
|
|
|
|
|
}
|
|
|
|
|
// 打开新增抽屉并填充数据
|
|
|
|
|
this.$refs['AddRecommend'].fillForm(copyData)
|
|
|
|
|
this.isShowAdd = true
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|