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

项目组件id更新

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