提交 bad63d05 编写于 作者: zhentian.jia's avatar zhentian.jia

文件传值大小 类型 介绍页修改

上级 c2521dd5
......@@ -495,7 +495,9 @@ export default {
type: 1,
attachmentUrl1: "",
attachmentUrl2: "",
attachmentUrl3: ""
attachmentUrl3: "",
attachmentMore1: {},
attachmentMore2: {},
},
pickerOptions0: {
disabledDate: time => {
......@@ -722,13 +724,25 @@ export default {
type: editData.attachmentData[1].attachmentType,
attachmentUrl1: editData.attachmentData[0].attachmentUrl,
attachmentUrl2: editData.attachmentData[1].attachmentUrl,
attachmentUrl3: ""
attachmentUrl3: "",
attachmentMore1: {
attachmentName: editData.attachmentData[0].attachmentName,
attachmentExt: editData.attachmentData[0].attachmentExt,
attachmentSize: editData.attachmentData[0].attachmentSize,
},
attachmentMore2: {
attachmentName: editData.attachmentData[1].attachmentName,
attachmentExt: editData.attachmentData[1].attachmentExt,
attachmentSize: editData.attachmentData[1].attachmentSize,
}
};
if (editData.attachmentData.length > 2) {
for (let i = 2; i < editData.attachmentData.length; i++) {
let pdfItem = {
name: editData.attachmentData[i].attachmentName,
url: editData.attachmentData[i].attachmentUrl
url: editData.attachmentData[i].attachmentUrl,
attachmentExt: editData.attachmentData[i].attachmentExt,
attachmentSize: editData.attachmentData[i].attachmentSize,
};
vm.fileList.push(pdfItem);
}
......@@ -776,12 +790,18 @@ export default {
{
attachmentType: 1,
attachmentUrl: this.formData.attachmentUrl1,
attachmentName: this.formData.attachmentMore1.attachmentName,
attachmentExt: this.formData.attachmentMore1.attachmentExt,
attachmentSize: this.formData.attachmentMore1.attachmentSize,
kind: 1,
seqNo: 1
},
{
attachmentType: this.formData.type,
attachmentUrl: this.formData.attachmentUrl2,
attachmentName: this.formData.attachmentMore2.attachmentName,
attachmentExt: this.formData.attachmentMore2.attachmentExt,
attachmentSize: this.formData.attachmentMore2.attachmentSize,
kind: 2,
seqNo: 1
}
......@@ -793,6 +813,8 @@ export default {
attachmentType: 3,
attachmentName: vm.fileList[i].name,
attachmentUrl: vm.fileList[i].url,
attachmentExt: vm.fileList[i].attachmentExt,
attachmentSize: vm.fileList[i].attachmentSize,
kind: 3
};
attachmentPDFModel.push(PDFModel);
......@@ -867,15 +889,16 @@ export default {
vm.POST("portalInfo/componentDraft", param).then(res => {
console.log(res);
if (res.code == "000000") {
this.$notify({
title: "成功",
message: "项目创建成功"
//notify
vm.$message({
type: 'success',
message: '操作成功!'
});
this.$router.push("item-manager");
} else {
this.$notify({
title: "",
message: res.message
vm.$message({
message: res.message,
type: 'warning'
});
}
});
......@@ -933,10 +956,10 @@ export default {
req.scopeOfPeople = this.getScopePeople(req.setKindOfPeople);
}
vm.POST("scope", req).then(res => {
//移动到选择项目组件
//暂存范围
console.log(res);
this.$notify({
title: "",
vm.$message({
type: 'info',
message: res.message
});
});
......@@ -1032,8 +1055,8 @@ export default {
this.active++;
this.stepData = [false, false, true];
} else {
this.$notify({
title: "",
vm.$message({
type: 'info',
message: res.message
});
}
......@@ -1076,8 +1099,8 @@ export default {
this.active++;
this.stepData = [false, false, true];
} else {
this.$notify({
title: "",
vm.$message({
type: 'info',
message: res.message
});
}
......@@ -1096,7 +1119,8 @@ export default {
height: 86,
size: 0.5,
sizeText: "500K",
key: "attachmentUrl1"
key: "attachmentUrl1",
more: "attachmentMore1",
};
this.beforeAvatarUpload(file, fileLimit);
},
......@@ -1107,7 +1131,8 @@ export default {
height: 210,
size: 2,
sizeText: "2.0M",
key: "attachmentUrl2"
key: "attachmentUrl2",
more: "attachmentMore2",
};
if (this.formData.type == 1) {
this.beforeAvatarUpload(file, fileLimit);
......@@ -1136,7 +1161,9 @@ export default {
console.log(path);
let fileItem = {
name: path.name,
url: path.fullPath
url: path.fullPath,
attachmentExt: path.ext,
attachmentSize: path.size,
};
vm.fileList.push(fileItem);
vm.$message.success("上传成功");
......@@ -1214,6 +1241,11 @@ export default {
closeLoading(vm);
console.log(path);
vm.formData[fileLimit.key] = path.fullPath;
vm.formData[fileLimit.more] = {
attachmentName: path.name,
attachmentExt: path.ext,
attachmentSize: path.size,
};
vm.$message.success("上传成功");
});
}
......
......@@ -371,11 +371,10 @@ export default {
vm.DELETE("portalInfo/delete/" + row.id, req).then(res => {
if (res.code == "000000") {
console.log(res);
this.$notify({
title: "删除项目",
message: "ID为:" + row.id + "的项目删除成功"
vm.$message({
type: 'success',
message: '删除成功!'
});
this.loading = true;
vm.getProjectList();
}
});
......
......@@ -249,6 +249,10 @@ export default {
console.log(res);
this.queryRoleList();
}
vm.$message({
type: 'info',
message: res.message,
})
});
},
handleSizeChange(val) {
......
......@@ -45,7 +45,7 @@
<el-table-column prop="id" label="ID编号" min-width="100" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" min-width="100" align="center"></el-table-column>
<el-table-column prop="createdName" label="创建人" align="center"></el-table-column>
<el-table-column prop="projectIntro" label="项目简介" align="center"></el-table-column>
<el-table-column prop="projectIntro" label="项目简介" align="center" min-width="100" show-overflow-tooltip></el-table-column>
<el-table-column prop="projectBegintime" label="项目开始时间" align="center"></el-table-column>
<el-table-column prop="projectEndtime" label="项目结束时间" align="center"></el-table-column>
<el-table-column prop="projectStatus" label="状态" align="center">
......@@ -168,9 +168,13 @@ export default {
this.$router.push("item-role?portalProjectId=" + row.id);
},
handleSizeChange(val) {
this.formInline.pageSize = val;
this.search();
console.log(`每页 ${val} 条`);
},
handleCurrentChange(val) {
this.formInline.pageNo = val;
this.search();
console.log(`当前页: ${val}`);
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册