|
@@ -106,10 +106,10 @@
|
|
|
>导出
|
|
>导出
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
- icon="el-icon-folder"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- type="text"
|
|
|
|
|
- @click="openFileDialog(scope.row)"
|
|
|
|
|
|
|
+ icon="el-icon-folder"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ @click="openFileDialog(scope.row)"
|
|
|
>附件
|
|
>附件
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
@@ -155,9 +155,9 @@
|
|
|
<el-form-item label="参加培训人员" prop="participants">
|
|
<el-form-item label="参加培训人员" prop="participants">
|
|
|
<el-input v-model="form.participants" placeholder="请输入参加培训人员"/>
|
|
<el-input v-model="form.participants" placeholder="请输入参加培训人员"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="培训日期" prop="trainDate">
|
|
|
|
|
|
|
+ <el-form-item label="培训日期" prop="trainDateTmpl">
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
- v-model="trainDate"
|
|
|
|
|
|
|
+ v-model="form.trainDateTmpl"
|
|
|
type="daterange"
|
|
type="daterange"
|
|
|
align="right"
|
|
align="right"
|
|
|
unlink-panels
|
|
unlink-panels
|
|
@@ -208,25 +208,25 @@
|
|
|
<el-row :gutter="10" class="mb8">
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
<el-button
|
|
|
- icon="el-icon-plus"
|
|
|
|
|
- plain
|
|
|
|
|
- size="mini"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- @click="handleFileAdd"
|
|
|
|
|
|
|
+ icon="el-icon-plus"
|
|
|
|
|
+ plain
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="handleFileAdd"
|
|
|
>新增
|
|
>新增
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
- <el-table :data="file.fileList" :height="clientHeight-100"
|
|
|
|
|
- border>
|
|
|
|
|
|
|
+ <el-table :data="file.fileList" :height="clientHeight-100"
|
|
|
|
|
+ border>
|
|
|
<el-table-column align="center" label="附件名称" prop="fileName">
|
|
<el-table-column align="center" label="附件名称" prop="fileName">
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <el-button
|
|
|
|
|
- size="mini"
|
|
|
|
|
- type="text"
|
|
|
|
|
- @click="previewFile(scope.row.fileUrl)"
|
|
|
|
|
- >{{ scope.row.fileName }}
|
|
|
|
|
- </el-button>
|
|
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ @click="previewFile(scope.row.fileUrl)"
|
|
|
|
|
+ >{{ scope.row.fileName }}
|
|
|
|
|
+ </el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="上传时间" prop="uploadDate" width="180">
|
|
<el-table-column align="center" label="上传时间" prop="uploadDate" width="180">
|
|
@@ -239,10 +239,10 @@
|
|
|
<el-table-column align="center" class-name="small-padding fixed-width" label="操作">
|
|
<el-table-column align="center" class-name="small-padding fixed-width" label="操作">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
<el-button
|
|
|
- icon="el-icon-delete"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- type="text"
|
|
|
|
|
- @click="handleFileRemove(scope.row)"
|
|
|
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ @click="handleFileRemove(scope.row)"
|
|
|
>删除
|
|
>删除
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</template>
|
|
</template>
|
|
@@ -250,24 +250,24 @@
|
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
|
|
|
<pagination
|
|
<pagination
|
|
|
- v-show="file.total>0"
|
|
|
|
|
- :limit.sync="file.queryParams.pageSize"
|
|
|
|
|
- :page.sync="file.queryParams.pageNum"
|
|
|
|
|
- :total="file.total"
|
|
|
|
|
- @pagination="getFileList"
|
|
|
|
|
|
|
+ v-show="file.total>0"
|
|
|
|
|
+ :limit.sync="file.queryParams.pageSize"
|
|
|
|
|
+ :page.sync="file.queryParams.pageNum"
|
|
|
|
|
+ :total="file.total"
|
|
|
|
|
+ @pagination="getFileList"
|
|
|
/>
|
|
/>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
<el-dialog :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="附件上传" width="400px">
|
|
<el-dialog :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="附件上传" width="400px">
|
|
|
<el-upload
|
|
<el-upload
|
|
|
- ref="doc"
|
|
|
|
|
- :action="doc.url"
|
|
|
|
|
- :auto-upload="false"
|
|
|
|
|
- :file-list="doc.fileList"
|
|
|
|
|
- :headers="doc.headers"
|
|
|
|
|
- :on-progress="handleFileDocProgress"
|
|
|
|
|
- :on-success="handleFileDocSuccess"
|
|
|
|
|
- drag
|
|
|
|
|
- multiple>
|
|
|
|
|
|
|
+ ref="doc"
|
|
|
|
|
+ :action="doc.url"
|
|
|
|
|
+ :auto-upload="false"
|
|
|
|
|
+ :file-list="doc.fileList"
|
|
|
|
|
+ :headers="doc.headers"
|
|
|
|
|
+ :on-progress="handleFileDocProgress"
|
|
|
|
|
+ :on-success="handleFileDocSuccess"
|
|
|
|
|
+ drag
|
|
|
|
|
+ multiple>
|
|
|
<i class="el-icon-upload"></i>
|
|
<i class="el-icon-upload"></i>
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
</el-upload>
|
|
</el-upload>
|
|
@@ -281,7 +281,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import {listRoster, getRoster, delRoster, addRoster, updateRoster, wordView} from "@/api/training/roster";
|
|
|
|
|
|
|
+import {addRoster, delRoster, getRoster, listRoster, updateRoster, wordView} from "@/api/training/roster";
|
|
|
import {getToken} from "../../../utils/auth";
|
|
import {getToken} from "../../../utils/auth";
|
|
|
import {delFile, listFile} from "../../../api/file/file";
|
|
import {delFile, listFile} from "../../../api/file/file";
|
|
|
|
|
|
|
@@ -298,7 +298,7 @@ export default {
|
|
|
linkId: null,
|
|
linkId: null,
|
|
|
linkName: 'roster',
|
|
linkName: 'roster',
|
|
|
},
|
|
},
|
|
|
- total:0,
|
|
|
|
|
|
|
+ total: 0,
|
|
|
},
|
|
},
|
|
|
doc: {
|
|
doc: {
|
|
|
id: null,
|
|
id: null,
|
|
@@ -338,7 +338,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
}]
|
|
}]
|
|
|
},
|
|
},
|
|
|
- trainDate: [],
|
|
|
|
|
//字典
|
|
//字典
|
|
|
teamOptions: [],
|
|
teamOptions: [],
|
|
|
// 页面高度
|
|
// 页面高度
|
|
@@ -395,6 +394,9 @@ export default {
|
|
|
participants: [
|
|
participants: [
|
|
|
{required: true, message: "参加培训人员不能为空", trigger: "blur"}
|
|
{required: true, message: "参加培训人员不能为空", trigger: "blur"}
|
|
|
],
|
|
],
|
|
|
|
|
+ trainDateTmpl: [
|
|
|
|
|
+ {required: true, message: "培训日期不能为空", trigger: "blur"}
|
|
|
|
|
+ ],
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
@@ -409,7 +411,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- previewFile(url){
|
|
|
|
|
|
|
+ previewFile(url) {
|
|
|
window.open(process.env.VUE_APP_BASE_API + url);
|
|
window.open(process.env.VUE_APP_BASE_API + url);
|
|
|
},
|
|
},
|
|
|
submitUpload() {
|
|
submitUpload() {
|
|
@@ -475,6 +477,7 @@ export default {
|
|
|
trainer: null,
|
|
trainer: null,
|
|
|
participants: null,
|
|
participants: null,
|
|
|
trainDate: null,
|
|
trainDate: null,
|
|
|
|
|
+ trainDateTmpl: null,
|
|
|
teams: null,
|
|
teams: null,
|
|
|
content: null,
|
|
content: null,
|
|
|
delFlag: null,
|
|
delFlag: null,
|
|
@@ -517,8 +520,9 @@ export default {
|
|
|
if (response.data.teams) {
|
|
if (response.data.teams) {
|
|
|
response.data.teams = response.data.teams.split(',');
|
|
response.data.teams = response.data.teams.split(',');
|
|
|
}
|
|
}
|
|
|
- this.trainDate[0] = response.data.trainStartDate;
|
|
|
|
|
- this.trainDate[1] = response.data.trainEndDate;
|
|
|
|
|
|
|
+ response.data.trainDateTmpl = [];
|
|
|
|
|
+ response.data.trainDateTmpl[0] = new Date(response.data.trainStartDate);
|
|
|
|
|
+ response.data.trainDateTmpl[1] = new Date(response.data.trainEndDate);
|
|
|
this.form = response.data;
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
this.open = true;
|
|
|
this.title = "修改培训签字";
|
|
this.title = "修改培训签字";
|
|
@@ -528,10 +532,8 @@ export default {
|
|
|
submitForm() {
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
- if (this.trainDate) {
|
|
|
|
|
- this.form.trainStartDate = this.trainDate[0];
|
|
|
|
|
- this.form.trainEndDate = this.trainDate[1];
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.form.trainStartDate = this.form.trainDateTmpl[0];
|
|
|
|
|
+ this.form.trainEndDate = this.form.trainDateTmpl[1];
|
|
|
if (this.form.teams)
|
|
if (this.form.teams)
|
|
|
this.form.teams = this.form.teams.join(',')
|
|
this.form.teams = this.form.teams.join(',')
|
|
|
if (this.form.id != null) {
|
|
if (this.form.id != null) {
|