This commit is contained in:
caoqianming 2023-09-21 11:19:20 +08:00
commit 8b00b2a0e7
4 changed files with 85 additions and 15 deletions

File diff suppressed because one or more lines are too long

View File

@ -381,7 +381,7 @@
</div> </div>
</div> </div>
<el-table <el-table
:data="rc2List" :data="rc2List.results"
fit fit
stripe stripe
highlight-current-row highlight-current-row
@ -411,8 +411,16 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination
v-show="rc2List.count > 0"
:total="rc2List.count"
:page-sizes="pageSizes"
:page.sync="rc2ListQuery.page"
:limit.sync="rc2ListQuery.page_size"
@pagination="getRc2List"
/>
<el-table <el-table
:data="rc2List" :data="rc2List.results"
fit fit
stripe stripe
highlight-current-row highlight-current-row
@ -689,6 +697,7 @@
<el-dialog <el-dialog
:visible.sync="impDialogVisible" :visible.sync="impDialogVisible"
title="导入" title="导入"
:close-on-click-modal="false"
> >
<el-form <el-form
ref="Form" ref="Form"
@ -703,12 +712,14 @@
<el-upload <el-upload
ref="upload1" ref="upload1"
:action="upUrl" :action="upUrl"
:on-progress="beforeUpload"
:on-preview="handlePreview" :on-preview="handlePreview"
:on-success="handleSuccessImp" :on-success="handleSuccessImp"
:on-remove="handleRemoveImp" :on-remove="handleRemoveImp"
:headers="upHeaders" :headers="upHeaders"
:limit="1" :limit="1"
accept=".xls,.xlsx" accept=".xls,.xlsx"
:disabled="uploading"
> >
<el-button size="small" type="primary">上传文件</el-button> <el-button size="small" type="primary">上传文件</el-button>
</el-upload> </el-upload>
@ -716,7 +727,7 @@
</el-form> </el-form>
<div style="text-align: right"> <div style="text-align: right">
<el-button type="danger" @click="impDialogVisible = false">取消</el-button> <el-button type="danger" @click="impDialogVisible = false">取消</el-button>
<el-button type="primary" @click="imporCconfirm()">确认</el-button> <el-button type="primary" @click="imporCconfirm()" :disabled="saveLoading">确认</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -751,6 +762,7 @@
saveriskDialog,savecomDialog,saveoinDialog}, saveriskDialog,savecomDialog,saveoinDialog},
data(){ data(){
return{ return{
pageSizes:[10,20,50,100,1000,2000,5000],
downloadUrl: process.env.VUE_APP_BASE_API, downloadUrl: process.env.VUE_APP_BASE_API,
leftHeight:null, leftHeight:null,
tableHeight:null, tableHeight:null,
@ -784,6 +796,10 @@
belong_dept:null, belong_dept:null,
page_size: 20, page_size: 20,
}, },
rc2ListQuery:{
page: 1,
page_size: 20,
},
typeOptions:{ typeOptions:{
10:"目标制定", 10:"目标制定",
20:"日常监督" 20:"日常监督"
@ -801,7 +817,7 @@
task2do:'' task2do:''
}, },
rcList:[],//报告证书{应发/超期} rcList:[],//报告证书{应发/超期}
rc2List:[], rc2List:{},
dialogRc:false, dialogRc:false,
ptList:[],//能力验证 ptList:[],//能力验证
dialogPt:false, dialogPt:false,
@ -836,6 +852,7 @@
20:'行业主管部门检查', 20:'行业主管部门检查',
30:'其他检查' 30:'其他检查'
}, },
uploading:false,
}; };
}, },
mounted(){ mounted(){
@ -993,7 +1010,25 @@
that.rcList =res.data; that.rcList =res.data;
} }
}); });
getRcList({task2do:that.task2do,etype:20,page:0}).then((res) => { let obj = {};
obj.task2do = that.task2do;
obj.etype = 20;
obj.page = that.rc2ListQuery.page;
obj.page_size = that.rc2ListQuery.page_size;
getRcList(obj).then((res) => {
if (res.code >= 200) {
that.rc2List =res.data;
}
});
},
getRc2List(){
let that = this;
let obj = {};
obj.task2do = that.task2do;
obj.etype = 20;
obj.page = that.rc2ListQuery.page;
obj.page_size = that.rc2ListQuery.page_size;
getRcList(obj).then((res) => {
if (res.code >= 200) { if (res.code >= 200) {
that.rc2List =res.data; that.rc2List =res.data;
} }
@ -1083,6 +1118,9 @@
this.$message.warning('请上传实施细则文件') this.$message.warning('请上传实施细则文件')
} }
}, },
beforeUpload(){
this.uploading = true;
},
handlePreview(file) { handlePreview(file) {
if ("response" in file) { if ("response" in file) {
window.open(file.response.data.path); window.open(file.response.data.path);
@ -1097,6 +1135,7 @@
this.subData[index].goal_file = null; this.subData[index].goal_file = null;
}, },
handleSuccessImp(res, file, fileList){ handleSuccessImp(res, file, fileList){
this.uploading = false;
this.impForm.path = res.data.path; this.impForm.path = res.data.path;
}, },
handleRemoveImp(file, fileList){ handleRemoveImp(file, fileList){
@ -1227,10 +1266,12 @@
this.downloadUrl = base_url+file_url; this.downloadUrl = base_url+file_url;
}, },
imporCconfirm(){ imporCconfirm(){
this.saveLoading = true;
this.impForm.task2do =this.task2do; this.impForm.task2do =this.task2do;
if(this.impType=='rc'){ if(this.impType=='rc'){
impRc(this.impForm).then(res=>{ impRc(this.impForm).then(res=>{
if(res.code>=200){ if(res.code>=200){
this.saveLoading = false;
this.impDialogVisible = false; this.impDialogVisible = false;
this.$message.success("提交成功"); this.$message.success("提交成功");
this.getRcList(); this.getRcList();
@ -1241,9 +1282,10 @@
}else if(this.impType=='rc2'){ }else if(this.impType=='rc2'){
impOverdue(this.impForm).then(res=>{ impOverdue(this.impForm).then(res=>{
if(res.code>=200){ if(res.code>=200){
this.saveLoading = false;
this.impDialogVisible = false; this.impDialogVisible = false;
this.$message.success("提交成功"); this.$message.success("提交成功");
this.getRcList(); this.getRc2List();
}else{ }else{
this.$message.warning(res.msg); this.$message.warning(res.msg);
} }
@ -1251,6 +1293,7 @@
}else if(this.impType=='pt'){ }else if(this.impType=='pt'){
impPt(this.impForm).then(res=>{ impPt(this.impForm).then(res=>{
if(res.code>=200){ if(res.code>=200){
this.saveLoading = false;
this.impDialogVisible = false; this.impDialogVisible = false;
this.$message.success("提交成功"); this.$message.success("提交成功");
this.getPtList(); this.getPtList();
@ -1261,6 +1304,7 @@
}else if(this.impType=='risk'){ }else if(this.impType=='risk'){
impRisk(this.impForm).then(res=>{ impRisk(this.impForm).then(res=>{
if(res.code>=200){ if(res.code>=200){
this.saveLoading = false;
this.impDialogVisible = false; this.impDialogVisible = false;
this.$message.success("提交成功"); this.$message.success("提交成功");
this.getRiskList(); this.getRiskList();
@ -1271,6 +1315,7 @@
}else if(this.impType=='complaint'){ }else if(this.impType=='complaint'){
impComplaint(this.impForm).then(res=>{ impComplaint(this.impForm).then(res=>{
if(res.code>=200){ if(res.code>=200){
this.saveLoading = false;
this.impDialogVisible = false; this.impDialogVisible = false;
this.$message.success("提交成功"); this.$message.success("提交成功");
this.getComplaintList(); this.getComplaintList();
@ -1281,6 +1326,7 @@
}else if(this.impType=='oinspect'){ }else if(this.impType=='oinspect'){
impOinspect(this.impForm).then(res=>{ impOinspect(this.impForm).then(res=>{
if(res.code>=200){ if(res.code>=200){
this.saveLoading = false;
this.impDialogVisible = false; this.impDialogVisible = false;
this.$message.success("提交成功"); this.$message.success("提交成功");
this.getOinspectList(); this.getOinspectList();

View File

@ -274,11 +274,11 @@
<span class="cardTitle">超期报告</span> <span class="cardTitle">超期报告</span>
</div> </div>
<el-table <el-table
:data="rc2List" :data="rc2List.results"
fit fit
stripe stripe
highlight-current-row highlight-current-row
height="250px" height="219px"
id="table2" id="table2"
> >
<el-table-column label="序号" type="index" width="50" /> <el-table-column label="序号" type="index" width="50" />
@ -287,6 +287,13 @@
<el-table-column label="报告/证书应发日期" prop="date_expect"></el-table-column> <el-table-column label="报告/证书应发日期" prop="date_expect"></el-table-column>
<el-table-column label="报告/证书实际发放日期" prop="date_issue"></el-table-column> <el-table-column label="报告/证书实际发放日期" prop="date_issue"></el-table-column>
</el-table> </el-table>
<pagination
:total="rc2List.count"
:page-sizes="pageSizes"
:page.sync="rc2ListQuery.page"
:limit.sync="rc2ListQuery.page_size"
@pagination="getRc2List"
/>
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="12" style="margin-top: 5px;"> <el-col :span="12" style="margin-top: 5px;">
@ -543,11 +550,15 @@ export default {
deptOptions: [], deptOptions: [],
task2doItem:{}, task2doItem:{},
rcList:[],//报告证书{应发/超期} rcList:[],//报告证书{应发/超期}
rc2List:[], rc2List:{},
ptList:[],//能力验证 ptList:[],//能力验证
riskList:[],//风险 riskList:[],//风险
complaintList:[],//投诉 complaintList:[],//投诉
oinspectList:[],//外部监查 oinspectList:[],//外部监查
rc2ListQuery:{
page: 1,
page_size: 20,
},
}; };
}, },
created() { created() {
@ -657,6 +668,7 @@ export default {
this.task2do = row.id; this.task2do = row.id;
this.getPtList(); this.getPtList();
this.getRcList(); this.getRcList();
this.getRc2List();
this.getRiskList(); this.getRiskList();
this.getComplaintList(); this.getComplaintList();
this.getOinspectList(); this.getOinspectList();
@ -680,6 +692,7 @@ export default {
this.task2do = row.id; this.task2do = row.id;
this.getPtList(); this.getPtList();
this.getRcList(); this.getRcList();
this.getRc2List();
this.getRiskList(); this.getRiskList();
this.getComplaintList(); this.getComplaintList();
this.getOinspectList(); this.getOinspectList();
@ -765,10 +778,20 @@ export default {
getRcList({task2do:that.task2do,etype:10,page:0}).then((res) => { getRcList({task2do:that.task2do,etype:10,page:0}).then((res) => {
that.rcList =res.data; that.rcList =res.data;
}); });
getRcList({task2do:that.task2do,etype:20,page:0}).then((res) => {
that.rc2List =res.data;
});
}, },
getRc2List(){
let that = this;
let obj = {};
obj.task2do = that.task2do;
obj.etype = 20;
obj.page = that.rc2ListQuery.page;
obj.page_size = that.rc2ListQuery.page_size;
getRcList(obj).then((res) => {
if (res.code >= 200) {
that.rc2List =res.data;
}
});
},
getPtList(){ getPtList(){
let that = this; let that = this;
getPtList({task2do:that.task2do,page:0}).then((res) => { getPtList({task2do:that.task2do,page:0}).then((res) => {

View File

@ -358,12 +358,13 @@ export default {
}); });
}, },
handleShow(row){ handleShow(row){
let timer = new Date().getTime();
if(row.证书地址!==null){ if(row.证书地址!==null){
this.imgurl = 'https://testsearch.ctc.ac.cn'+row.证书地址; this.imgurl = 'https://testsearch.ctc.ac.cn'+row.证书地址+'?'+timer;
this.srcList.push(this.imgurl); this.srcList.push(this.imgurl);
}else{ }else{
getCertificate(row.id).then(res=>{ getCertificate(row.id).then(res=>{
this.imgurl='https://testsearch.ctc.ac.cn'+res.data.证书地址; this.imgurl='https://testsearch.ctc.ac.cn'+res.data.证书地址+'?'+timer;
this.srcList.push(this.imgurl); this.srcList.push(this.imgurl);
}) })
} }