public/basicExample.xlsx | 补丁 | 查看 | 原始文档 | blame | 历史 | |
public/overviewExample.docx | 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/api/companyInfo/basicInfo.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/build/conpanyFunctionConsult/companyInfo/basicInfo/components/basicInfoDialog.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/build/conpanyFunctionConsult/companyInfo/basicInfo/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/build/conpanyFunctionConsult/companyInfo/overview/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/build/conpanyFunctionConsult/companyInfo/qualifications/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/work/onlineEducation/groupExams/components/examDialog.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/work/onlineEducation/groupExams/components/student.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/work/onlineEducation/groupExams/components/viewExamQuestion.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
public/basicExample.xlsxBinary files differ
public/overviewExample.docxBinary files differ
src/api/companyInfo/basicInfo.js
@@ -32,4 +32,18 @@ }) } export function uploadInBasic(data) { return request({ url: '/company/upload/basic', method: 'post', data: data }) } export function uploadInOverview(data) { return request({ url: '/company/upload/summary', method: 'post', data: data }) } src/views/build/conpanyFunctionConsult/companyInfo/basicInfo/components/basicInfoDialog.vue
@@ -19,7 +19,7 @@ </el-option> </el-select> </el-form-item> <el-form-item label="1.企业的基本情况,主要包括:法人证书编号,所属部门、法人代表姓名、身份证号、职务、人员总数、技术人员数、不良情况记录、保密等资质。" prop="basic" > <el-form-item label="1.企业的基本情况,主要包括:营业执照、法人姓名、身份证号、职务、人员总数、技术人员数、不良情况记录、保密等资质。" prop="basic" > <el-input v-model="state.form.basic" :rows="4" type="textarea" :disabled="title === '查看'"/> </el-form-item> <el-form-item label="2.企业简介、行业特点、资源和能力情况。特别是上次审核以来领导层、组织机构(包括分场所)及体系变动情况。" prop="introduce" > src/views/build/conpanyFunctionConsult/companyInfo/basicInfo/index.vue
@@ -24,15 +24,16 @@ <el-button type="primary" style="margin-left: 30px" @click="searchClick">查询</el-button> <el-button plain @click="reset">重置</el-button> </el-form-item> <el-form-item style="margin-left: 15px"> <el-button type="primary" @click="exportData" icon="Download" >导出</el-button> </el-form-item> <el-form-item style="margin-left: 15px"> <el-button type="primary" @click="exportInData" icon="Upload">导入</el-button> </el-form-item> </el-form> </div> <!-- 表格数据 --> @@ -61,6 +62,39 @@ /> </div> <basicInfoDialog ref="noticeRef" @getList = "getList"></basicInfoDialog> <el-dialog v-model="data.exportDialog" title="导入模板" width="550px" :before-close="handleCloseExport" :close-on-press-escape="false" :close-on-click-modal="false" > <el-form :model="state.form" size="default" ref="superRef" :rules="state.formRules" label-width="110px" > <el-form-item label="表格模板:" > <el-button @click="downloadFileTable" size="default" :icon="Download" type="primary" plain>下载模板</el-button> </el-form-item> <el-form-item label="导入文件"> <el-upload accept=".xlsx,.xls" :before-upload="beforeUpload" v-model:file-list="state.exportFileList" action="#" :auto-upload="false" :on-change="handleChange" style="width: 100%" > <el-button :icon="Upload" size="default" type="primary">点击上传</el-button> </el-upload> </el-form-item> </el-form> <template #footer> <span class="dialog-footer"> <el-button @click="handleCloseExport" size="default">取 消</el-button> <el-button type="primary" @click="onUpload" size="default">确定</el-button> </span> </template> </el-dialog> </div> </template> @@ -71,13 +105,22 @@ import {getCompany} from "@/api/onlineEducation/company"; import Cookies from "js-cookie"; import {generateWordDocument} from "@/utils/exportWord"; import {delBasic, getBasic} from "@/api/companyInfo/basicInfo"; import {delBasic, getBasic, uploadInBasic} from "@/api/companyInfo/basicInfo"; import {uploadTemplate} from "@/api/staffManage/staff"; import {Download, Upload} from "@element-plus/icons-vue"; const { proxy } = getCurrentInstance(); const loading = ref(false); const noticeRef = ref(); const loadingCompany = ref(false) const choosedData = ref([]) const checkFiles = (rule, value, callback) => { if (state.exportFileList.length == 0) { callback(new Error('请上传导入文件')) } else { callback() } } const data = reactive({ queryParams: { pageNum: 1, @@ -87,6 +130,18 @@ companyList: [], isAdmin: false }); const state = reactive({ form: { id: null, filePath: '', companyId: null }, formRules:{ companyId: [{ required: true, message: '请选择企业', trigger: 'blur' }], filePath: [{ required: true, validator: checkFiles, trigger: 'blur' }] }, exportFileList: [], }) const dataList = ref([]); const total = ref(0); @@ -214,6 +269,66 @@ } }) } const exportInData = () => { data.exportDialog = true } const handleCloseExport = () => { getList() state.exportFileList = [] data.exportDialog = false } const beforeUpload = (file) => { state.exportFileList = [...state.exportFileList, file] state.exportFileList = state.exportFileList.slice(-1) return false; } const downloadFileTable = () => { const filePath = '/basicExample.xlsx'; const link = document.createElement('a'); link.href = filePath; link.download = filePath.substr(filePath.lastIndexOf('/') + 1); link.click(); } const fileBinaryList = ref([]) const handleChange = (file, files) => { fileBinaryList.value = files; }; const onUpload = async () => { if(state.exportFileList.length == 0){ ElMessage({ type: 'warning', message: '请先上传表格文件' }); return }else{ const formData = new FormData(); fileBinaryList.value.forEach((file) => { formData.append('file', file.raw) }) console.log('form',formData) uploadInBasic(formData).then(async (res) => { if(res.code == 200){ ElMessage({ type: 'success', message: '导入成功' }); state.exportFileList = [] data.exportDialog = false await getList() }else{ ElMessage({ type: 'error', message: res.message }); } }).catch(async () =>{ state.exportFileList = [] data.exportDialog = false await getList() }) } } </script> <style lang="scss"> src/views/build/conpanyFunctionConsult/companyInfo/overview/index.vue
@@ -42,8 +42,11 @@ <el-form-item v-if="data.isAdmin"> <el-button type="primary" style="margin-left: 30px" @click="searchClick">查询</el-button> <el-button plain @click="reset">重置</el-button> </el-form-item> </el-form-item> <el-form-item> <el-button type="primary" style="margin-left: 15px" icon="Upload" @click="exportData">导入</el-button> </el-form-item> </el-form> </div> <!-- 表格数据 --> @@ -71,6 +74,50 @@ /> </div> <overviewDialog ref="noticeRef" @getList = "getList"></overviewDialog> <el-dialog v-model="data.exportDialog" title="导入模板" width="500px" :before-close="handleCloseExport" :close-on-press-escape="false" :close-on-click-modal="false" > <el-form :model="state.form" size="default" ref="superRef" :rules="state.formRules" label-width="110px" > <el-form-item label="企业名称:" v-if="data.isAdmin" style="margin-left: 20px"> <el-select v-model="state.form.companyId" filterable placeholder="请选择" clearable> <el-option v-for="item in data.companyList" :key="item.id" style="width: 100%" :label="item.name" :value="item.id"> </el-option> </el-select> </el-form-item> <el-form-item label="模板:" > <el-button @click="downloadFileTable" size="default" :icon="Download" type="primary" plain>下载模板</el-button> </el-form-item> <el-form-item label="导入文件"> <el-upload accept=".doc,.docx" :before-upload="beforeUpload" v-model:file-list="state.exportFileList" action="#" :auto-upload="false" :on-change="handleChange" style="width: 100%" > <el-button :icon="Upload" size="default" type="primary">点击上传</el-button> </el-upload> </el-form-item> </el-form> <template #footer> <span class="dialog-footer"> <el-button @click="handleCloseExport" size="default">取 消</el-button> <el-button type="primary" @click="onUpload" size="default">确定</el-button> </span> </template> </el-dialog> </div> </template> @@ -81,10 +128,20 @@ import {getCompany} from "@/api/onlineEducation/company"; import Cookies from "js-cookie"; import {delCom, getCom} from "@/api/companyInfo/overview"; import {Download, Upload} from "@element-plus/icons-vue"; import {uploadTemplate} from "@/api/staffManage/staff"; import {uploadInOverview} from "@/api/companyInfo/basicInfo"; const { proxy } = getCurrentInstance(); const loading = ref(false); const noticeRef = ref(); const loadingCompany = ref(false) const checkFiles = (rule, value, callback) => { if (state.exportFileList.length == 0) { callback(new Error('请上传导入文件')) } else { callback() } } const data = reactive({ queryParams: { pageNum: 1, @@ -93,8 +150,21 @@ }, companyList: [], isAdmin: false, companyName: '' companyName: '', exportDialog: false, }); const state = reactive({ form: { id: null, filePath: '', companyId: null }, formRules:{ companyId: [{ required: true, message: '请选择企业', trigger: 'blur' }], filePath: [{ required: true, validator: checkFiles, trigger: 'blur' }] }, exportFileList: [], }) const dataList = ref([]); const total = ref(0); @@ -229,7 +299,75 @@ } }) } const exportData = () => { data.exportDialog = true } const handleCloseExport = () => { getList() state.form.companyId = null state.exportFileList = [] data.exportDialog = false } const downloadFileTable = () => { const filePath = '/overviewExample.docx'; const link = document.createElement('a'); link.href = filePath; link.download = filePath.substr(filePath.lastIndexOf('/') + 1); link.click(); } const beforeUpload = (file) => { state.exportFileList = [...state.exportFileList, file] state.exportFileList = state.exportFileList.slice(-1) return false; } const fileBinaryList = ref([]) const handleChange = (file, files) => { fileBinaryList.value = files; }; const onUpload = async () => { if(state.exportFileList.length == 0){ ElMessage({ type: 'warning', message: '请先上传表格文件' }); return }else if( data.isAdmin && !state.form.companyId){ ElMessage({ type: 'warning', message: '管理员请先选择企业' }); return }else{ const formData = new FormData(); fileBinaryList.value.forEach((file) => { formData.append('file', file.raw) }) formData.append('companyId',data.isAdmin ? state.form.companyId : data.queryParams.companyId) // const param = { // file: formData, // companyId: data.isAdmin ? state.form.companyId : data.queryParams.companyId // } console.log('form',formData) const res = await uploadInOverview(formData) if(res.code == 200){ ElMessage({ type: 'success', message: '导入成功' }); state.form.companyId = null state.exportFileList = [] data.exportDialog = false await getList() }else{ ElMessage({ type: 'error', message: res.message }); await getList() } } } </script> <style lang="scss"> .pag-container{ src/views/build/conpanyFunctionConsult/companyInfo/qualifications/index.vue
@@ -38,7 +38,7 @@ <!-- 表格数据 --> <el-table v-loading="loading" :data="dataList" :border="true" > <el-table-column type="index" label="序号" width="80" align="center"></el-table-column> <el-table-column label="企业名称" prop="companyName" align="center" /> <el-table-column label="企业名称" prop="companyName" align="center" v-if="data.isAdmin" /> <el-table-column label="取得资质证书名称" prop="certificateName" align="center" width="130"/> <el-table-column label="证书编号" prop="certificateNum" align="center" /> <el-table-column label="有效期" prop="effectiveTime" align="center" /> src/views/work/onlineEducation/groupExams/components/examDialog.vue
@@ -208,66 +208,66 @@ </el-radio-group> </div> </div> <div style="display: flex"> <div class="group"> <div> 简答:<el-input style="max-width: 40px" v-model="state.form.easyNum"></el-input> 题 </div> <div style="margin-left: 20px"> 每题:<el-input style="max-width: 40px" v-model="state.form.easyScore"></el-input> 分 </div> </div> <div class="group" > <div> 共 <span style="max-width: 30px" v-show="state.form.easyNum && state.form.easyScore">{{state.form.easyNum * state.form.easyScore}}</span> <!-- <span v-else></span>--> 分 </div> <el-select clearable v-model="state.form.easyBankName" filterable remote reserve-keyword placeholder="请输入简答题库" remote-show-suffix :remote-method="getBankList" style="width: 160px;margin: 0 20px" @change="selectEasyValue" > <el-option v-for="item in state.bankList" :key="item.id" :label="item.name" :value="item.name" /> </el-select> <!-- <div style="display: flex">--> <!-- <div class="group">--> <!-- <div>--> <!-- 简答:<el-input style="max-width: 40px" v-model="state.form.easyNum"></el-input> 题--> <!-- </div>--> <!-- <div style="margin-left: 20px">--> <!-- 每题:<el-input style="max-width: 40px" v-model="state.form.easyScore"></el-input> 分--> <!-- </div>--> <!-- </div>--> <!-- <div class="group" >--> <!-- <div>--> <!-- 共 --> <!-- <span style="max-width: 30px" v-show="state.form.easyNum && state.form.easyScore">{{state.form.easyNum * state.form.easyScore}}</span>--> <!-- <!– <span v-else></span>–>--> <!-- 分--> <!-- </div>--> <!-- <el-select--> <!-- clearable--> <!-- v-model="state.form.easyBankId"--> <!-- v-model="state.form.easyBankName"--> <!-- filterable--> <!-- remote--> <!-- reserve-keyword--> <!-- placeholder="请输入简答题库"--> <!-- remote-show-suffix--> <!-- :remote-method="getBankList"--> <!-- style="width: 160px;margin: 0 20px"--> <!-- v-loadMoreNew:[reselectSingle]="handleScroll"--> <!-- :popper-class="reselectSingle.name"--> <!-- class="item-width"--> <!-- placeholder="请选择简答题题库"--> <!-- @change="selectEasyValue"--> <!-- >--> <!-- <el-option--> <!-- v-for="item in state.bankListSingle"--> <!-- v-for="item in state.bankList"--> <!-- :key="item.id"--> <!-- :label="item.name"--> <!-- :value="item.id"--> <!-- :value="item.name"--> <!-- />--> <!-- </el-select>--> <el-radio-group v-model="state.form.easyMethod" > <el-radio :label="1" style="max-width: 30px">随机</el-radio> <el-radio :label="2" style="max-width: 30px">顺序</el-radio> </el-radio-group> <el-radio-group v-model="state.form.easyRebuild" style="margin-left: 30px" > <el-radio :label="1" v-if="title === '编辑'" style="max-width: 30px">重新出题</el-radio> </el-radio-group> </div> </div> <!--<!– <el-select–>--> <!--<!– clearable–>--> <!--<!– v-model="state.form.easyBankId"–>--> <!--<!– style="width: 160px;margin: 0 20px"–>--> <!--<!– v-loadMoreNew:[reselectSingle]="handleScroll"–>--> <!--<!– :popper-class="reselectSingle.name"–>--> <!--<!– class="item-width"–>--> <!--<!– placeholder="请选择简答题题库"–>--> <!--<!– >–>--> <!--<!– <el-option–>--> <!--<!– v-for="item in state.bankListSingle"–>--> <!--<!– :key="item.id"–>--> <!--<!– :label="item.name"–>--> <!--<!– :value="item.id"–>--> <!--<!– />–>--> <!--<!– </el-select>–>--> <!-- <el-radio-group v-model="state.form.easyMethod" >--> <!-- <el-radio :label="1" style="max-width: 30px">随机</el-radio>--> <!-- <el-radio :label="2" style="max-width: 30px">顺序</el-radio>--> <!-- </el-radio-group>--> <!-- <el-radio-group v-model="state.form.easyRebuild" style="margin-left: 30px" >--> <!-- <el-radio :label="1" v-if="title === '编辑'" style="max-width: 30px">重新出题</el-radio>--> <!-- </el-radio-group>--> <!-- </div>--> <!-- </div>--> <span class="group" style="margin-bottom: 20px">共计: {{state.form.judgeNum * state.form.judgeScore+state.form.multiNum * state.form.multiScore+state.form.singleNum * state.form.singleScore+state.form.easyNum * state.form.easyScore}} 分</span> src/views/work/onlineEducation/groupExams/components/student.vue
@@ -72,7 +72,7 @@ </el-table-column> <el-table-column label="试卷状态" prop="state" align="center" > <template #default="scope"> <span>{{scope.row.state ===0 ? '待考试' : scope.row.state ===1 ? '待批阅':'批阅完成'}}</span> <span>{{scope.row.state ===0 ? '待考试' : scope.row.state ===1 ? '待批阅':scope.row.state ===2 ? '已完成':''}}</span> </template> </el-table-column> <!-- <el-table-column label="考试是否完成" prop="completed" align="center" >--> @@ -92,7 +92,7 @@ </el-table-column> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180"> <template #default="scope"> <el-button link type="primary" @click="correct(scope.row)" v-if="scope.row.state != 0">批阅</el-button> <!-- <el-button link type="primary" @click="correct(scope.row)" v-if="scope.row.state != 0">批阅</el-button>--> <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> </template> </el-table-column> @@ -149,7 +149,7 @@ }, { id: 2, name: '批阅完成' name: '已完成' }, ] src/views/work/onlineEducation/groupExams/components/viewExamQuestion.vue
@@ -15,7 +15,7 @@ <div v-for="(item,index) in state.singleList" :key="index" style="margin-left: 15px;margin-top: 10px"> <div style="display: flex;flex-direction: column;"> <div style="margin-top: 10px;display: flex"> <span style="font-size: 15px;width: 66px">题目{{index+1}}:</span> <span style="font-size: 15px;width: 66px;text-wrap: nowrap">题目{{index+1}}:</span> <span style="font-size: 16px">{{item.title}}</span> </div> <div style="display: flex;margin-left: 10%;margin-top: 15px"> @@ -35,8 +35,8 @@ <div v-for="(item,index) in state.multiList" :key="index" style="margin-left: 15px;margin-top: 10px"> <div style="display: flex;flex-direction: column;"> <div style="margin-top: 10px;display: flex"> <span style="font-size: 15px">题目{{index+1}}:</span> <span style="margin-left: 10px;font-size: 16px">{{item.title}}</span> <span style="font-size: 15px;width: 66px;text-wrap: nowrap">题目{{index+1}}:</span> <span style="font-size: 16px">{{item.title}}</span> </div> <div style="display: flex;margin-left: 10%;margin-top: 15px"> <div v-for="single in item.content.items"> @@ -55,8 +55,8 @@ <div v-for="(item,index) in state.judgeList" :key="index" style="margin-left: 15px;margin-top: 10px"> <div style="display: flex;flex-direction: column;"> <div style="margin-top: 10px;display: flex"> <span style="font-size: 15px">题目{{index+1}}:</span> <span style="margin-left: 10px;font-size: 16px">{{item.title}}</span> <span style="font-size: 15px;width: 66px;text-wrap: nowrap">题目{{index+1}}:</span> <span style="font-size: 16px">{{item.title}}</span> </div> <div style="display: flex;margin-left: 10%;margin-top: 15px"> <div v-for="single in item.content.items">