update code
parent
727c7c414c
commit
c62d6d3cc3
|
@ -78,7 +78,7 @@ public class ProPlanController extends BaseController
|
|||
writeTask(task,list,0);
|
||||
response.setContentType("application/vnd.ms-project");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
prj.save(response.getOutputStream(),1);
|
||||
prj.save(response.getOutputStream(),0);
|
||||
}
|
||||
|
||||
private void writeTask(Task task, List<ProPlan> list, long pid) {
|
||||
|
@ -94,7 +94,7 @@ public class ProPlanController extends BaseController
|
|||
}
|
||||
|
||||
private void addSubTaskInfo(Task subTask, ProPlan proPlan) {
|
||||
subTask.setId(proPlan.getTaskId().intValue());
|
||||
//subTask.setId(proPlan.getTaskId().intValue());
|
||||
subTask.setOutlineLevel(proPlan.getTaskOutlineLevel().intValue());
|
||||
subTask.setGuid(proPlan.getTaskUniqueId());
|
||||
subTask.setStart(proPlan.getStartDate());
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<el-upload ref="uploadRef" :limit="1" accept=".mpp" :headers="upload.headers"
|
||||
:action="upload.url+'?compId='+data.compId+'&projectId='+queryParams.projectId" :disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="true">
|
||||
<el-button type="primary" >导入(Project)</el-button>
|
||||
<el-button type="primary" v-loading="upload.isUploading" >导入(Project)</el-button>
|
||||
</el-upload>
|
||||
</el-col>
|
||||
<el-col :span="1.5" v-if="planList.length>0">
|
||||
|
@ -82,6 +82,7 @@ const single = ref(true);
|
|||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const uploadRef=ref();
|
||||
/*** 用户导入参数 */
|
||||
const upload = reactive({
|
||||
// 是否显示弹出层(用户导入)
|
||||
|
@ -127,7 +128,7 @@ const data = reactive({
|
|||
rules: {
|
||||
},
|
||||
compId:'',
|
||||
projectId:''
|
||||
projectId:'',
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
@ -171,7 +172,15 @@ const handleFileUploadProgress = (event, file, fileList) => {
|
|||
|
||||
/** 文件上传成功处理 */
|
||||
const handleFileSuccess = (response, file, fileList) => {
|
||||
debugger
|
||||
upload.isUploading = false;
|
||||
if(response.code==200){
|
||||
proxy.$modal.msgSuccess("导入成功!");
|
||||
}else{
|
||||
proxy.$modal.msgError("导入失败!");
|
||||
}
|
||||
if(fileList.length>0){
|
||||
fileList.splice(0,1)
|
||||
}
|
||||
};
|
||||
|
||||
// 取消按钮
|
||||
|
@ -291,9 +300,11 @@ function handleDelete(row) {
|
|||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
let tmps=data.projects.filter(d=>d.id==queryParams.value.projectId);
|
||||
let name=tmps.length>0?tmps[0].projectName+"_":"";
|
||||
proxy.download('manage/plan/export', {
|
||||
...queryParams.value
|
||||
}, `plan_${new Date().getTime()}.mpp`)
|
||||
}, `${name}计划_${new Date().getTime()}.mpp`)
|
||||
}
|
||||
data.projectId=userStore.currentProId;
|
||||
data.compId=userStore.currentComId;
|
||||
|
|
Loading…
Reference in New Issue