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

项目组件id更新

上级 5d34dd3a
......@@ -527,6 +527,7 @@ export default {
certificate: ""
},
tagsComponent: [],
projectStatus: '',
//校验工具 数据
rulesComponent: {
component: [
......@@ -600,7 +601,7 @@ export default {
this.$nextTick(function() {
this.getComponentInfo();
this.getDepartment();
//this.getDepartment();
});
},
methods: {
......@@ -654,12 +655,12 @@ export default {
let componentEdit = [];
let certificateEdit = 0;
for (let i = 0; i < editData.componentData.length; i++) {
componentEdit.push(editData.componentData[i].id);
componentEdit.push(editData.componentData[i].relevanceId);
}
this.formComponent.component = componentEdit;
if (editData.certificateData.length > 0) {
this.formComponent.configure = 1;
this.formComponent.certificate = editData.componentData[0].id;
this.formComponent.certificate = editData.componentData[0].relevanceId;
}
},
//编辑管理
......@@ -671,6 +672,7 @@ export default {
if (res.code == "000000" && res.data.projectData != null) {
let editData = res.data;
this.setEditData(editData);
this.projectStatus = res.data.projectData.projectStatus;
} else {
console.log(res);
}
......@@ -731,6 +733,11 @@ export default {
vm.POST("portalInfo/insertOrUpdate", postData).then(res => {
if (res.code == "000000") {
console.log(res);
this.active++;
this.stepData = [false, true, false];
this.projectId = res.data.id;
this.initRange();
this.getDepartment();
}
});
},
......@@ -767,7 +774,8 @@ export default {
componentIds: this.formComponent.component,
certificateId: this.formComponent.certificate,
projectId: parseInt(vm.getUrlSearch(window.location.href, "projectId")),
type: type
type: type,
status: this.projectStatus,
};
vm.POST("portalInfo/componentDraft", param).then(res => {
console.log(res);
......@@ -851,9 +859,9 @@ export default {
if (res.code == "000000") {
//移动到第二页 选择范围
this.insertOrUpdate("add");
this.active++;
this.stepData = [false, true, false];
this.initRange();
// this.active++;
// this.stepData = [false, true, false];
//this.initRange();
//this.checkAllTable();
} else {
this.$message.error("项目名称" + res.message);
......@@ -862,9 +870,9 @@ export default {
} else {
//编辑
this.insertOrUpdate("edit");
this.active++;
this.stepData = [false, true, false];
this.initRange();
// this.active++;
// this.stepData = [false, true, false];
//this.initRange();
}
}
} else if (this.active == 1) {
......@@ -1035,7 +1043,7 @@ export default {
},
//第二步 选择范围 初始化
initRange() {
let projectId = vm.getUrlSearch(window.location.href, "projectId");
let projectId = this.projectId;
if (projectId == null) {
//新建
} else {
......@@ -1495,7 +1503,7 @@ export default {
//获取科室信息
getDepartment() {
let req = {
projectId: vm.getUrlSearch(window.location.href, "projectId")
projectId: this.projectId,
};
vm.GET("scope/v1/department", req).then(res => {
if (res.code == "000000") {
......
......@@ -46,7 +46,6 @@
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="tableData"
:header-cell-style="{background:'#FAFAFA',color:'#000'}"
>
......@@ -145,6 +144,7 @@
import BreadCrumb from "../../components/breadcrumb.vue";
import { create } from "domain";
import { returnData } from "../mock";
import { openLoading, closeLoading } from "../../utils/utils";
let vm = null;
export default {
components: {
......@@ -237,11 +237,12 @@ export default {
getProjectList() {
let req = {};
req = this.setParam(this.formInline);
openLoading(vm);
vm.GET("portalInfo/getProjectList", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
vm.tableData = res.data.data;
vm.totalRows = res.data.totalRows;
this.loading = false;
}
});
},
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册