|
@@ -9,34 +9,20 @@
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="list">
|
|
|
- <data-table :fields="fields" :data="list" :total="total" :opera="opera" :usePage="false"></data-table>
|
|
|
+ <data-table :fields="fields" :data="list" :opera="opera" :usePage="false"></data-table>
|
|
|
</el-col>
|
|
|
- <!-- <el-col :span="24" ref="print">
|
|
|
- <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
|
|
|
- <p>
|
|
|
- <span>学校(院):</span>
|
|
|
- <span>{{ item.school_name }}</span>
|
|
|
- <span>,</span>
|
|
|
- <span>{{ item.entry_year }}</span>
|
|
|
- <span>级</span>
|
|
|
- <span>{{ item.major }}</span>
|
|
|
- <span>专业</span>
|
|
|
- <span>学生:</span>
|
|
|
- <span>{{ item.name }}</span>
|
|
|
- <span>于</span>
|
|
|
- <span>2020年11月参加吉林省大学生就业能力扩展训练</span>
|
|
|
- <span>第</span>
|
|
|
- <span>{{ item.termname }}</span>
|
|
|
- <span>期培训班。培训合格,特发此证</span>
|
|
|
- </p>
|
|
|
- <p>
|
|
|
- <span>证书编号:2020{{ item.termname }}{{ item.classname }}</span>
|
|
|
- <span>2020年11月22日</span>
|
|
|
- </p>
|
|
|
- </el-col>
|
|
|
- </el-col> -->
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+ <el-dialog title="毕业日期" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-date-picker v-model="endDate" type="date" format="yyyy 年 MM 月 dd 日" value-format="yyyy 年 MM 月 dd 日" placeholder="选择日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-col>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submit">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -49,7 +35,7 @@ export default {
|
|
|
name: 'certCard',
|
|
|
props: {
|
|
|
list: { type: Array, default: () => [] },
|
|
|
- total: null,
|
|
|
+ startdate: null,
|
|
|
},
|
|
|
components: {
|
|
|
dataTable,
|
|
@@ -68,6 +54,8 @@ export default {
|
|
|
{ label: '职务', prop: 'job' },
|
|
|
{ label: '是否优秀', prop: 'is_fine', format: i => (i === '0' ? '否' : i === '1' ? '是' : '无资格') },
|
|
|
],
|
|
|
+ dialogVisible: false,
|
|
|
+ endDate: '',
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -80,14 +68,29 @@ export default {
|
|
|
name: 'expressDelivery1',
|
|
|
unit: 'px',
|
|
|
size: [1046.93, 714.02],
|
|
|
- fixed: [{ type: 'image', x: 0, y: 0, default: this.zhengshu, width: 1046.93, height: 714.02 }],
|
|
|
+ fixed: [
|
|
|
+ { type: 'image', x: 0, y: 0, default: this.zhengshu, width: 1046.93, height: 714.02 },
|
|
|
+ { type: 'text', x: 138, y: 356, default: '学校(院):', fontSize: 18, fontFamily: '华文中宋' },
|
|
|
+ { type: 'text', x: 607, y: 356, default: '级', fontSize: 18, fontFamily: '华文中宋' },
|
|
|
+ { type: 'text', x: 857, y: 356, default: '专业', fontSize: 18, fontFamily: '华文中宋' },
|
|
|
+ { type: 'text', x: 138, y: 426, default: '学生:', fontSize: 18, fontFamily: '华文中宋' },
|
|
|
+ { type: 'text', x: 365, y: 426, default: '于', fontSize: 18, fontFamily: '华文中宋' },
|
|
|
+ { type: 'text', x: 480, y: 426, default: '年', fontSize: 18, fontFamily: '华文中宋' },
|
|
|
+ { type: 'text', x: 560, y: 426, default: '月参加吉林省大学生创新创业培训', fontSize: 18, fontFamily: '华文中宋' },
|
|
|
+ { type: 'text', x: 138, y: 500, default: '第', fontSize: 18, fontFamily: '华文中宋' },
|
|
|
+ { type: 'text', x: 238, y: 500, default: '期培训班。培训合格,特发此证。', fontSize: 18, fontFamily: '华文中宋' },
|
|
|
+ { type: 'text', x: 155, y: 580, default: '证书编号:', fontSize: 18, fontFamily: '华文中宋' },
|
|
|
+ ],
|
|
|
data: {
|
|
|
- school_name: { type: 'text', x: 15, y: 15, fontSize: 16 },
|
|
|
- entry_year: { type: 'text', x: 56, y: 55, fontSize: 16 },
|
|
|
- major: { type: 'text', x: 107, y: 105, fontSize: 16 },
|
|
|
- name: { type: 'text', x: 158, y: 155, fontSize: 16 },
|
|
|
- termname: { type: 'text', x: 15, y: 255, fontSize: 16 },
|
|
|
- cernum: { type: 'text', x: 100, y: 250, fontSize: 16 },
|
|
|
+ school_name: { type: 'text', x: 268, y: 356, fontSize: 20, fontFamily: '华文中宋' },
|
|
|
+ entry_year: { type: 'text', x: 555, y: 356, fontSize: 20, fontFamily: '华文中宋' },
|
|
|
+ major: { type: 'text', x: 635, y: 356, fontSize: 20, fontFamily: '华文中宋' },
|
|
|
+ name: { type: 'text', x: 206, y: 426, fontSize: 20, fontFamily: '华文中宋' },
|
|
|
+ year: { type: 'text', x: 417, y: 426, fontSize: 20, fontFamily: '华文中宋' },
|
|
|
+ month: { type: 'text', x: 507, y: 426, fontSize: 20, fontFamily: '华文中宋' },
|
|
|
+ termnames: { type: 'text', x: 190, y: 500, fontSize: 20, fontFamily: '华文中宋' },
|
|
|
+ cernum: { type: 'text', x: 270, y: 580, fontSize: 20, fontFamily: '华文中宋' },
|
|
|
+ end_date: { type: 'text', x: 655, y: 580, fontSize: 20, fontFamily: '华文中宋' },
|
|
|
},
|
|
|
});
|
|
|
},
|
|
@@ -98,12 +101,28 @@ export default {
|
|
|
link.click();
|
|
|
},
|
|
|
print() {
|
|
|
+ this.dialogVisible = true;
|
|
|
+ },
|
|
|
+ submit() {
|
|
|
+ console.log(this.endDate);
|
|
|
+ this.dialogVisible = false;
|
|
|
+ let end_date = { end_date: this.endDate };
|
|
|
+ let year = { year: this.startdate.substring(0, 4) };
|
|
|
+ let month = { month: this.startdate.substring(5, 7) };
|
|
|
+ var enticeNew = this.list.map(item => ({ ...item, ...end_date, ...year, ...month }));
|
|
|
let data = [];
|
|
|
this.url = null;
|
|
|
- let duplicate = _.cloneDeep(this.list);
|
|
|
+ let duplicate = _.cloneDeep(enticeNew);
|
|
|
duplicate = duplicate.map(i => {
|
|
|
- i.cernum = `2020${i.termname}${i.classname}`;
|
|
|
- i.entry_year = `nihao${i.termname}${i.classname}`;
|
|
|
+ i.school_name = `${i.school_name}`;
|
|
|
+ i.entry_year = `${i.entry_year}`;
|
|
|
+ i.major = `${i.major}`;
|
|
|
+ i.name = `${i.name}`;
|
|
|
+ i.year = `${i.year}`;
|
|
|
+ i.month = `${i.month}`;
|
|
|
+ i.termnames = `${i.termname}`;
|
|
|
+ i.cernum = `${i.year}${i.termname}${i.classname}01`;
|
|
|
+ i.end_date = `${i.end_date}`;
|
|
|
return i;
|
|
|
});
|
|
|
// this.template.print('expressDelivery1', [duplicate[0]]).then(pdf => {
|
|
@@ -116,6 +135,9 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ handleClose(done) {
|
|
|
+ done();
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|