接口联调

master
jinna 1 day ago
parent 87ea2db065
commit e72a21d9f5
  1. 13
      src/components/basic-import/main.vue
  2. 12
      src/views/periodicTesting/components/addProjectCycleDialog.vue
  3. 14
      src/views/periodicTesting/projectCycle.vue

@ -1,6 +1,7 @@
<template> <template>
<el-dialog :title="title" append-to-body :modelValue="importBox" width="555px" @close="closeDialog"> <el-dialog :title="title" append-to-body :modelValue="importBox" width="555px" @close="closeDialog">
<avue-form :option="importOption" v-model="importForm" :upload-after="uploadAfter"> <avue-form :option="importOption" v-model="importForm" :upload-after="uploadAfter"
:upload-error="uploadError">
<template #excelTemplate> <template #excelTemplate>
<el-button type="primary" @click="handleTemplate"> <el-button type="primary" @click="handleTemplate">
点击下载<i class="el-icon-download el-icon--right"></i> 点击下载<i class="el-icon-download el-icon--right"></i>
@ -36,6 +37,10 @@ export default {
importUrl:{ importUrl:{
type:String, type:String,
default:'' default:''
},
showTips:{
type:String,
default:'请上传 .xls,.xlsx 标准格式文件'
} }
}, },
data(){ data(){
@ -56,7 +61,7 @@ export default {
propsHttp: { propsHttp: {
res: 'data', res: 'data',
}, },
tip: '请上传 .xls,.xlsx 标准格式文件', tip: this.showTips,
action: this.importUrl, action: this.importUrl,
}, },
{ {
@ -89,6 +94,10 @@ export default {
this.closeDialog() this.closeDialog()
done(); done();
}, },
uploadError(error, column){
console.log('error-------------',error)
this.closeDialog()
}
} }
} }
</script> </script>

@ -106,6 +106,14 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="临期提醒:" prop="remind"> <el-form-item label="临期提醒:" prop="remind">
<template #label>
<el-tooltip class="item" effect="dark" content="临期提醒天数应大于提前下发天数,小于等于提前下发+试验时长" placement="top">
<div>
<el-icon><InfoFilled /></el-icon>
<span>临期提醒</span>
</div>
</el-tooltip>
</template>
<el-input-number <el-input-number
v-model="projectForm.remind" v-model="projectForm.remind"
controls-position="right" controls-position="right"
@ -350,8 +358,10 @@ export default {
...res.data.data, ...res.data.data,
isPutOff:res.data.data.isPutOff == 1 ? true : false, isPutOff:res.data.data.isPutOff == 1 ? true : false,
testType:res.data.data.testType != '' ? res.data.data.testType + '' : '', testType:res.data.data.testType != '' ? res.data.data.testType + '' : '',
processUserIds:res.data.data.processUserId processUserIds:res.data.data.processUserId,
jobType:res.data.data.jobType == -1 ? '' : res.data.data.jobType
} }
console.log('job---------',this.projectForm.jobType)
if(this.projectForm.jobType == 1){ if(this.projectForm.jobType == 1){
this.projectForm = { this.projectForm = {
...this.projectForm, ...this.projectForm,

@ -175,10 +175,11 @@
</el-dialog> </el-dialog>
<!-- 导入 --> <!-- 导入 -->
<basic-import v-if="isShowImport" title="导入" :isShow="isShowImport" <basic-import v-if="isShowImport" title="导入" :isShow="isShowImport"
showTips="请上传 .xls,.xlsx 标准格式文件,请导入数据后维护试验周期!"
templateUrl="/blade-desk/QA/CycleTest/download-excel-template" templateUrl="/blade-desk/QA/CycleTest/download-excel-template"
templateName="试验项目周期模板.xlsx" templateName="试验项目周期模板.xlsx"
importUrl="/blade-desk/QA/CycleTest/import-excel" importUrl="/blade-desk/QA/CycleTest/import-excel"
@closeDialog="closeDialog"></basic-import> @closeDialog="closeDialog"></basic-import>
</basic-container> </basic-container>
</template> </template>
@ -409,6 +410,7 @@ export default {
}, },
closeDialog(){ closeDialog(){
this.showDialog = false; this.showDialog = false;
this.isShowImport = false
this.onLoad(this.page) this.onLoad(this.page)
}, },
// //
@ -475,6 +477,9 @@ export default {
if (this.selectionList.length == 0) { if (this.selectionList.length == 0) {
this.$message.error('请至少选择一条数据!'); this.$message.error('请至少选择一条数据!');
} else { } else {
this.cycleForm = {}
this.cycleMonthTags = []
this.cycleYearTags = []
this.cycleDialog = true this.cycleDialog = true
} }
}, },
@ -625,6 +630,13 @@ export default {
isPutOff:this.cycleForm.isPutOff ? 1 : 0, isPutOff:this.cycleForm.isPutOff ? 1 : 0,
} }
console.log('params===============',params) console.log('params===============',params)
setCycleBat(params).then(res =>{
if(res.data.code == 200){
this.$message.success('设置成功')
this.cycleDialog = false
this.onLoad(this.page)
}
})
} }
}) })
}, },

Loading…
Cancel
Save