src/api/specialCheck.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/selfCheck/components/supervisionDetails.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/specialCheck/components/areaEnterprises.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/specialCheck/components/feedbackDetails.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/specialCheck/components/sendWork.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/specialCheck/components/sumSheet.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/usermng/user.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/api/specialCheck.js
@@ -109,8 +109,29 @@ }) } // 上传文件 export function uploadFile(data){ return request({ headers:{ 'Authorization':getToken() }, url:process.env.BASE_API+ '/checkTask/upload/taskDescFile', method:'post', data }) } // 删除文件 export function delateFile(data){ return request({ headers:{ 'Authorization':getToken() }, url:process.env.BASE_API+ '/checkTask/delete/deleteTaskDescFile', method:'post', data }) } src/main.js
@@ -7,7 +7,6 @@ import Element from 'element-ui' import 'element-ui/lib/theme-chalk/index.css' import '@/styles/index.scss' // global css import App from './App' src/views/selfCheck/components/supervisionDetails.vue
@@ -15,7 +15,7 @@ <div class="table-tit"> <div>企业名称: <span class="m-color">{{corpInfo.enterpriseName}}</span></div> <div>所属省市县: <span class="m-color">{{corpInfo.enterpriseProvince + corpInfo.enterpriseCity + corpInfo.enterpriseArea}}</span></div> <div>检查层级: <span class="m-color">{{ corpInfo.checkUnitType == 1 ? '省级' : (corpInfo.checkUnitType == 2 ? '市级' : '县级') }}</span></div> <div>检查层级: <span class="m-color">{{ corpInfo.checkUnitType == 1 ? '省级' : (corpInfo.checkUnitType == 2 ? '地(州、市)级' : '县级') }}</span></div> <div>检查单位: <span class="m-color">{{corpInfo.checkName}}</span></div> </div> <div class="corp-list"> src/views/specialCheck/components/areaEnterprises.vue
@@ -21,7 +21,7 @@ <el-table-column label="检查单位" prop="checkUnitName" align="center"></el-table-column> <el-table-column label="检查层级" prop="checkUnitType" align="center"> <template slot-scope="scope"> <span>{{ scope.row.checkUnitType ==1?'省级':(scope.row.checkUnitType ==2?'市级':(scope.row.checkUnitType ==3?'区县级':'自查')) }}</span> <span>{{ scope.row.checkUnitType ==1?'省级':(scope.row.checkUnitType ==2?'地(州、市)级':(scope.row.checkUnitType ==3?'区县级':'自查')) }}</span> </template> </el-table-column> <el-table-column label="隐患总数" prop="hiddendangerSum" align="center"></el-table-column> src/views/specialCheck/components/feedbackDetails.vue
@@ -18,7 +18,7 @@ <div class="feed-tit"> <div>企业名称: <span class="m-color">{{ corpInfo.enterpriseName }}</span></div> <div>所属省市县: <span class="m-color">{{ corpInfo.enterpriseProvince + corpInfo.enterpriseCity + corpInfo.enterpriseArea }}</span></div> <div>检查层级: <span class="m-color">{{ corpInfo.checkUnitType == 1 ? '省级':(corpInfo.checkUnitType == 2 ? '市级' : '区县级') }}</span></div> <div>检查层级: <span class="m-color">{{ corpInfo.checkUnitType == 1 ? '省级':(corpInfo.checkUnitType == 2 ? '地(州、市)级' : '区县级') }}</span></div> <div>检查单位: <span class="m-color">{{ corpInfo.checkUnit }}</span></div> </div> <div style="width: 100%" v-if="(unitType==1 && !provinceCheckStatus)||(unitType==2 && !cityCheckStatus)||(unitType==3 && !areaCheckStatus)"> @@ -201,7 +201,7 @@ 暂无本级检查反馈 </div> </el-tab-pane> <el-tab-pane :label="unitType==2 ? '本级': '市级'" name="2"> <el-tab-pane :label="unitType==2 ? '本级': '地(州、市)级'" name="2"> <div v-if="cityCheckStatus == 1" class="record-list"> <div class="record-item"> <table class="record-table"> @@ -221,7 +221,7 @@ <td class="m-color w-25">是否检查出隐患问题</td> </tr> <tr> <td class="w-25">市级</td> <td class="w-25">地(州、市)级</td> <td class="w-25">{{ checkData.cityCheckName }}</td> <td class="w-25">{{ checkData.cityCheckTime }}</td> <td class="w-25">{{ checkData.cityHiddendangerStatus == 1 ? '是' : '否' }}</td> src/views/specialCheck/components/sendWork.vue
@@ -6,8 +6,27 @@ :close-on-click-modal="false" width="60%" center :show-close="false" @close="resetForm('workForm')" > <el-upload class="upload-demo" action :http-request="uploadFile" :on-preview="handlePreview" :on-remove="handleRemove" :before-upload="beforeUpload" :before-remove="beforeRemove" multiple :limit="1" :on-exceed="handleExceed" accept=".pdf, .doc, .docx" :file-list="fileList"> <div style="display: flex;align-items: center"> <el-button type="primary" style="margin-right: 80px">检查内容上传</el-button> <div slot="tip" class="el-upload__tip">只能上传doc/docx文件</div> </div> </el-upload> <el-form :model="workForm" :rules="rules" ref="workForm" label-width="80px"> <el-form-item label="专项检查任务名称:" label-width="180px" prop="taskName"> <el-input v-model="workForm.taskName"></el-input> @@ -64,7 +83,7 @@ </el-row> </div> <div class="form-part"> <h3>市州级检查指标</h3> <h3>地(州、市)级检查指标</h3> <!-- <p>批发企业:</p>--> <el-divider content-position="left">批发企业</el-divider> <el-row> @@ -163,6 +182,7 @@ </el-form-item> </el-form> <span slot="footer" class="dialog-footer"> <el-button type="warning" @click="cancleSend" plain>取消</el-button> <el-button @click="resetForm('workForm')">重置</el-button> <el-button type="primary" v-stop-re-click @click="confirmSend('workForm')">确认下发</el-button> </span> @@ -171,12 +191,14 @@ <script> import {computePageCount} from "@/utils"; import{sendCheckTask} from "@/api/specialCheck" import{sendCheckTask, uploadFile, delateFile} from "@/api/specialCheck" export default { name: "sendWork", data(){ return{ dialogVisible:false, fileList: [], fileType: ['pdf','doc','docx'], workForm: { taskName: '', provinceWholesaleCheckTarget: null, @@ -193,7 +215,8 @@ areaWholesaleCheckDeadline: '', areaRetailCheckTarget: null, areaRetailCheckDeadline: '', enterpriseSelfCheckDeadline: '' enterpriseSelfCheckDeadline: '', taskDescFileName: null }, rules: { taskName: [{ required: true, message: '请输入任务名称', trigger: 'blur' }], @@ -216,6 +239,102 @@ watch: { }, methods:{ //上传文件的事件 async uploadFile(item){ const t = this const loading = this.$loading({ lock: true, text: '正在上传文件...', spinner: 'el-icon-loading' }); //上传文件的需要formdata类型;所以要转 let FormDatas = new FormData() FormDatas.append('taskDescFile',item.file); const res = await uploadFile(FormDatas) if(res.data.code == '200'){ loading.close(); t.$message({ type:'success', message: '上传成功' }) t.fileList.push(item.file) console.log(t.fileList,'fileList') t.workForm.taskDescFileName = res.data.result }else{ loading.close(); t.$message({ type:'warning', message:res.data.message }) } // axios({ // method: 'post', // url: 'http://192.168.0.29:8100/checkTask/upload/taskDescFile', // headers:this.headers, // timeout: 30000, // data: FormDatas // }).then(res=>{ // if(res.data.id != '' || res.data.id != null){ // this.fileList.push(item.file);//成功过后手动将文件添加到展示列表里 // let i = this.fileList.indexOf(item.file) // this.fileList[i].id = res.data.id;//id也添加进去,最后整个大表单提交的时候需要的 // if(this.fileList.length > 0){//如果上传了附件就把校验规则给干掉 // this.fileflag = false; // this.$set(this.rules.url,0,'') // } // //this.handleSuccess(); // } // }) }, //上传文件之前 beforeUpload(file){ // const t = this // if (file.type != "" || file.type != null || file.type != undefined){ // //截取文件的后缀,判断文件类型 // console.log(t.fileType,file.name,'666') // const FileExt = file.name.replace(/.+\./, "").toLowerCase(); // // //计算文件的大小 // // const isLt5M = file.size / 1024 / 1024 < 50; //这里做文件大小限制 // // //如果大于50M // // if (!isLt5M) { // // this.$showMessage('上传文件大小不能超过 50MB!'); // // return false; // // } // //如果文件类型不在允许上传的范围内 // if(t.fileType.indexOf(FileExt) !== -1){ // return true; // } // else { // t.$message.error("上传文件格式不正确!"); // return false; // } // } }, async handleRemove(file, fileList) { const t = this const res = await delateFile({taskDescFileName: t.workForm.taskDescFileName}) if(res.data.code == '200'){ t.$message({ type:'success', message: '删除成功' }) t.fileList = [] }else{ t.$message({ type:'warning', message:res.data.message }) } }, handlePreview(file) { console.log(file); }, handleExceed(files, fileList) { this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`); }, beforeRemove(file, fileList) { return this.$confirm(`确定移除 ${ file.name }?`); }, confirmSend(formName){ const t = this t.$refs[formName].validate((valid) => { @@ -230,22 +349,24 @@ }).then(async () => { const loading = this.$loading({ lock: true, text: '正在下发', text: '正在下发...', spinner: 'el-icon-loading' }); let res = await sendCheckTask(t.workForm) if(res.data.code === "200"){ loading.close(); t.$message({ type:'success', message: '任务下发成功' }) }else{ loading.close(); t.$message({ type:'warning', message:res.data.message }) } loading.close(); t.fileList = [] t.dialogVisible = false t.$parent.getSpecialCheckTask(); }).catch(() => { @@ -259,8 +380,28 @@ } }); }, resetForm(formName) { this.$refs[formName].resetFields(); cancleSend(){ this.resetForm('workForm') this.dialogVisible = false }, async resetForm(formName) { const t = this if(t.workForm.taskDescFileName !== null){ const res = await delateFile({taskDescFileName: t.workForm.taskDescFileName}) if(res.data.code == '200'){ t.$message({ type:'success', message: '已取消下发' }) }else{ t.$message({ type:'warning', message:res.data.message }) } } t.$refs[formName].resetFields() t.fileList = [] } }, } @@ -279,6 +420,21 @@ background-color: #fafafa; color: #034EA2; } .upload-demo{ margin-bottom: 20px; background: #fafafa; padding: 20px 15px; border-radius: 8px; .el-upload__tip{ font-size: 14px; color: #999; } .el-upload-list{ background-color: #ccc !important; } } .form-part{ background: #fafafa; padding: 10px 15px; src/views/specialCheck/components/sumSheet.vue
@@ -9,14 +9,14 @@ </div> <div style="display: flex;justify-content: space-between;align-items: center;margin: 10px 0 20px;height: 40px"> <div style="width: 140px"></div> <h2 style="text-align: center;margin: 0">{{taskName}}{{ activeTab==1?'批发':'零售' }}环节信息报送汇总表({{sheetStatus==1?'省级层面':(sheetStatus==2?'市级层面':'区县级')}})</h2> <h2 style="text-align: center;margin: 0">{{taskName}}{{ activeTab==1?'批发':'零售' }}环节信息报送汇总表({{sheetStatus==1?'省级层面':(sheetStatus==2?'地(州、市)级层面':'区县级')}})</h2> <el-button icon="el-icon-download" style="width: 140px" size="medium" type="primary" @click="exportSheet()" id="export">导出汇总表</el-button> </div> <div class="tabpanel"> <table v-show="sheetStatus==1||sheetStatus==2" class="data-table" id="tableExcel" v-if="thisLevelStatistic && institutionalData && institutionalData.length>0"> <tr> <th rowspan="3">序号</th> <th rowspan="3">{{sheetStatus==1?'地市':'区县'}}</th> <th rowspan="3">{{sheetStatus==1?'地(州、市)':'区县'}}</th> <th colspan="2">企业基本情况</th> <th colspan="11">企业自查及整改</th> <th colspan="9">检查及整改情况</th> @@ -92,7 +92,7 @@ <td>{{sum.amerceMoneySum}}</td> </tr> <tr> <td colspan="2">{{ sheetStatus==1?'省本级':'市本级' }}</td> <td colspan="2">{{ sheetStatus==1?'省本级':'地(州、市)本级' }}</td> <td>{{thisLevelStatistic.enterpriseSum?thisLevelStatistic.enterpriseSum: '--'}}</td> <td>{{thisLevelStatistic.validEnterpriseNum?thisLevelStatistic.validEnterpriseNum: '--'}}</td> <td>{{thisLevelStatistic.selfCheckEnterpriseNum?thisLevelStatistic.selfCheckEnterpriseNum: '--'}}</td> @@ -106,7 +106,7 @@ <td>{{thisLevelStatistic.completedRectifyHiddendangerSum?thisLevelStatistic.completedRectifyHiddendangerSum:'--'}}</td> <td>{{thisLevelStatistic.completedRectifyMajorHiddendangerNum?thisLevelStatistic.completedRectifyMajorHiddendangerNum:'--'}}</td> <td>{{thisLevelStatistic.hiddendangerRectifyRate?thisLevelStatistic.hiddendangerRectifyRate:'--'}}</td> <td>{{sheetStatus==1?'省级':'市级'}}</td> <td>{{sheetStatus==1?'省级':'地(州、市)级'}}</td> <td>{{thisLevelStatistic.thisLevelSpotCheckinfo.spotCheckEnterpriseNum}}</td> <td> {{typeof thisLevelStatistic.thisLevelSpotCheckinfo.spotCheckRateRequire=="string"?thisLevelStatistic.thisLevelSpotCheckinfo.spotCheckRateRequire:thisLevelStatistic.thisLevelSpotCheckinfo.spotCheckRateRequire + '%'}} @@ -147,7 +147,7 @@ <td :rowspan="sheetStatus==1?2:1">{{ item.completedRectifyHiddendangerSum }}</td> <td :rowspan="sheetStatus==1?2:1">{{ item.completedRectifyMajorHiddendangerNum }}</td> <td :rowspan="sheetStatus==1?2:1">{{ item.hiddendangerRectifyRate==null?'--':(item.hiddendangerRectifyRate + '%') }}</td> <td>{{ sheetStatus==1?'设区市级':'县级' }}</td> <td>{{ sheetStatus==1?'设区地(州、市)级':'县级' }}</td> <td v-if="(item.citySpotCheckinfo && item.citySpotCheckinfo.spotCheckEnterpriseNum !== undefined)|| (item.areaSpotCheckinfo && item.areaSpotCheckinfo.spotCheckEnterpriseNum !== undefined)" class="point-item" @click="checkEnterprise(item.enterpriseCity,item.enterpriseArea)"> {{sheetStatus==1?item.citySpotCheckinfo.spotCheckEnterpriseNum:item.areaSpotCheckinfo.spotCheckEnterpriseNum}} </td> @@ -420,7 +420,7 @@ }, exportSheet(){ const t = this const sheetName = t.taskName + (t.activeTab==1 ?'批发':'零售') + '环节信息报送汇总表(' + (t.sheetStatus==1?'省级层面':(t.sheetStatus==2?'市级层面':'区县级')) const sheetName = t.taskName + (t.activeTab==1 ?'批发':'零售') + '环节信息报送汇总表(' + (t.sheetStatus==1?'省级层面':(t.sheetStatus==2?'地(州、市)级层面':'区县级')) if(t.sheetStatus==1||t.sheetStatus==2){ t.tableToExcel("tableExcel", "export",sheetName); }else{ src/views/usermng/user.vue
@@ -161,7 +161,7 @@ </el-table-column> <el-table-column label="级别" prop="unittype" align="center" width="150" sortable="custom"> <template slot-scope="scope"> <span>{{ scope.row.unittype == 1? '省级':(scope.row.unittype == 2 ? '市、州级' : '区、县级') }}</span> <span>{{ scope.row.unittype == 1? '省级':(scope.row.unittype == 2 ? '地(州、市)级' : '区、县级') }}</span> </template> </el-table-column> <el-table-column label="办公电话" prop="phone" align="center" sortable="custom"> @@ -306,7 +306,7 @@ </el-option> </el-select> </el-form-item> <el-form-item label="管辖市州:" v-if="dataForm.unittype == 2 || dataForm.unittype == 3" prop="city"> <el-form-item label="管辖地(州、市):" v-if="dataForm.unittype == 2 || dataForm.unittype == 3" prop="city"> <el-select v-model="dataForm.city" placeholder="请选择城市" @change="resetArea"> <el-option v-for="item in cityList" @@ -573,7 +573,7 @@ value: 1 }, { name: '市、州级', name: '地(州、市)级', value: 2 }, {