Merge branch 'master' of https://e.coding.net/ctcdevteam/cma_search
This commit is contained in:
commit
7c2aca2c3f
File diff suppressed because one or more lines are too long
|
@ -29,6 +29,13 @@ export function createCertificate(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function impCertificate12(data) {
|
||||||
|
return request({
|
||||||
|
url: '/edu/certificate/imp_202312/',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
export function deleteCertificate(id) {
|
export function deleteCertificate(id) {
|
||||||
return request({
|
return request({
|
||||||
url: `/edu/certificate/${id}/`,
|
url: `/edu/certificate/${id}/`,
|
||||||
|
|
|
@ -426,6 +426,12 @@ export const asyncRoutes = [
|
||||||
component: () => import('@/views/testvideo/certificate.vue'),
|
component: () => import('@/views/testvideo/certificate.vue'),
|
||||||
meta: { title: '证书列表', perms: ['certificate'] }
|
meta: { title: '证书列表', perms: ['certificate'] }
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'course',
|
||||||
|
name: 'course',
|
||||||
|
component: () => import('@/views/testvideo/course.vue'),
|
||||||
|
meta: { title: '课程列表'}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'videolist',
|
path: 'videolist',
|
||||||
name: 'videolist',
|
name: 'videolist',
|
||||||
|
@ -452,12 +458,6 @@ export const asyncRoutes = [
|
||||||
meta: { title: '视频播放统计', perms: ['video_view'] },
|
meta: { title: '视频播放统计', perms: ['video_view'] },
|
||||||
// hidden: true
|
// hidden: true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: 'course',
|
|
||||||
name: 'course',
|
|
||||||
component: () => import('@/views/testvideo/course.vue'),
|
|
||||||
meta: { title: '课程列表'}
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,13 +23,38 @@
|
||||||
<div style="margin-top: 6px">
|
<div style="margin-top: 6px">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd" v-if="checkPermission(['certificate'])"
|
<el-button type="primary" icon="el-icon-plus" @click="handleAdd" v-if="checkPermission(['certificate'])"
|
||||||
>新增证书</el-button>
|
>新增证书</el-button>
|
||||||
|
<!-- <el-popover
|
||||||
|
placement="top"
|
||||||
|
width="160"
|
||||||
|
v-if="checkPermission(['certificate'])"
|
||||||
|
v-model="popovervisible"
|
||||||
|
>
|
||||||
|
<p>导入09证书</p>
|
||||||
|
<div style="text-align: left; margin: 0">
|
||||||
|
<el-upload
|
||||||
|
:action="upUrl"
|
||||||
|
:on-success="handleUploadSuccess"
|
||||||
|
accept=".xlsx"
|
||||||
|
:headers="upHeaders"
|
||||||
|
:show-file-list="false"
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="popovervisible = false"
|
||||||
|
>上传导入</el-button
|
||||||
|
>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
|
<el-button slot="reference">导入09证书</el-button>
|
||||||
|
</el-popover> -->
|
||||||
<el-popover
|
<el-popover
|
||||||
placement="top"
|
placement="top"
|
||||||
width="160"
|
width="160"
|
||||||
v-if="checkPermission(['certificate'])"
|
v-if="checkPermission(['certificate'])"
|
||||||
v-model="popovervisible"
|
v-model="popovervisible"
|
||||||
>
|
>
|
||||||
<p>导入证书</p>
|
<p>导入证书(202312版)</p>
|
||||||
<div style="text-align: left; margin: 0">
|
<div style="text-align: left; margin: 0">
|
||||||
<el-upload
|
<el-upload
|
||||||
:action="upUrl"
|
:action="upUrl"
|
||||||
|
@ -48,6 +73,7 @@
|
||||||
</div>
|
</div>
|
||||||
<el-button slot="reference">导入证书</el-button>
|
<el-button slot="reference">导入证书</el-button>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
<el-link href="/media/cert/template/cert-202312.xlsx" target="_blank" type="primary">202312模板</el-link>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="margin-top: 10px">
|
<el-card style="margin-top: 10px">
|
||||||
|
@ -66,7 +92,6 @@
|
||||||
type="selection"
|
type="selection"
|
||||||
width="55">
|
width="55">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column type="index" width="50" /> -->
|
|
||||||
<el-table-column label="证书方案" prop="证书方案">
|
<el-table-column label="证书方案" prop="证书方案">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="所属单位" prop="所属单位" v-if="listQuery.证书方案=='202309'">
|
<el-table-column label="所属单位" prop="所属单位" v-if="listQuery.证书方案=='202309'">
|
||||||
|
@ -131,7 +156,7 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="证书方案">
|
<el-form-item label="证书方案">
|
||||||
<el-select style="width: 100%" v-model="form.证书方案" placeholder="证书方案">
|
<el-select style="width: 100%" v-model="form.证书方案" placeholder="证书方案" :disabled="dialogType=='edit'">
|
||||||
<el-option v-for="item in planOption" :key="item" :label="item" :value="item"></el-option>
|
<el-option v-for="item in planOption" :key="item" :label="item" :value="item"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -273,7 +298,7 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import {getCertificateList,createCertificate,updateCertificate,impCertificate,deleteCertificate,getCertificate,getCourseList} from "@/api/edu";
|
import {getCertificateList,createCertificate,updateCertificate,impCertificate12,deleteCertificate,getCertificate,getCourseList} from "@/api/edu";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
import { upUrl, upHeaders } from "@/api/file";
|
import { upUrl, upHeaders } from "@/api/file";
|
||||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
|
@ -346,7 +371,7 @@ export default {
|
||||||
handleUploadSuccess(res, file) {
|
handleUploadSuccess(res, file) {
|
||||||
const loading = this.openLoading();
|
const loading = this.openLoading();
|
||||||
let data = { path: res.data.path };
|
let data = { path: res.data.path };
|
||||||
impCertificate(data)
|
impCertificate12(data)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: "导入成功",
|
message: "导入成功",
|
||||||
|
@ -420,16 +445,22 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async confirm(form) {
|
async confirm(form) {
|
||||||
this.$refs[form].validate((valid) => {
|
let that = this;
|
||||||
|
that.$refs[form].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.form.字体方案 = parseInt(this.form.字体方案);
|
that.form.字体方案 = parseInt(that.form.字体方案);
|
||||||
const isEdit = this.dialogType === "edit";
|
const isEdit = that.dialogType === "edit";
|
||||||
|
if(that.listQuery.证书方案=='202312'){}else{
|
||||||
|
that.form.发证日期=null;
|
||||||
|
that.form.培训日期=null;
|
||||||
|
that.form.培训结束日期=null;
|
||||||
|
}
|
||||||
if (isEdit) {
|
if (isEdit) {
|
||||||
updateCertificate(this.form.id, this.form).then((res) => {
|
updateCertificate(that.form.id, that.form).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.getList();
|
that.getList();
|
||||||
this.dialogVisible = false;
|
that.dialogVisible = false;
|
||||||
this.$notify({
|
that.$notify({
|
||||||
title: "成功",
|
title: "成功",
|
||||||
message: "编辑成功",
|
message: "编辑成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
|
@ -438,11 +469,11 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
createCertificate(this.form).then((res) => {
|
createCertificate(that.form).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.getList();
|
that.getList();
|
||||||
this.dialogVisible = false;
|
that.dialogVisible = false;
|
||||||
this.$notify({
|
that.$notify({
|
||||||
title: "成功",
|
title: "成功",
|
||||||
message: "新增成功",
|
message: "新增成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
|
|
|
@ -199,6 +199,7 @@ user-scalable: 用户是否能缩放页面 -->
|
||||||
</div>
|
</div>
|
||||||
<div class="lists" v-if="dataList.length>0">
|
<div class="lists" v-if="dataList.length>0">
|
||||||
<div v-for="item in dataList" class="listItem" @click="showImage(item)">
|
<div v-for="item in dataList" class="listItem" @click="showImage(item)">
|
||||||
|
<div v-if="item.证书方案=='202309'">
|
||||||
<div>姓名:{{item.姓名}}</div>
|
<div>姓名:{{item.姓名}}</div>
|
||||||
<div>资格:
|
<div>资格:
|
||||||
<span v-if="item.是否内审员">内审员</span>
|
<span v-if="item.是否内审员">内审员</span>
|
||||||
|
@ -212,6 +213,14 @@ user-scalable: 用户是否能缩放页面 -->
|
||||||
<div>证书编号:{{item.证书编号}}</div>
|
<div>证书编号:{{item.证书编号}}</div>
|
||||||
<div>所属单位:{{item.所属单位}}({{item.单位名称}})</div>
|
<div>所属单位:{{item.所属单位}}({{item.单位名称}})</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="item.证书方案=='202312'">
|
||||||
|
<div>姓名:{{item.姓名}}</div>
|
||||||
|
<div>证书编号:{{item.证书编号}}</div>
|
||||||
|
<div>培训日期:{{item.培训日期}}</div>
|
||||||
|
<div>培训结束日期:{{item.培训结束日期}}</div>
|
||||||
|
<div>培训日期:{{item.发证日期}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<p>{{warningTxtx}}</p>
|
<p>{{warningTxtx}}</p>
|
||||||
|
|
Loading…
Reference in New Issue