提交 40ea8a19 编写于 作者: guangjun.yang's avatar guangjun.yang

Merge branch 'dev-mvp-20200331' of...

Merge branch 'dev-mvp-20200331' of 192.168.110.53:com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-mvp-20200331

* 'dev-mvp-20200331' of 192.168.110.53:com.pica.cloud.education.frontend/pica.cloud.web-education-admin:
  优化发起机构提示
  优化代码逻辑
......@@ -327,9 +327,6 @@ export default {
vm = this;
vm.getComponentInfo();
if (!vm.newBuild){
vm.setEditData(this.messageObj);
}
if (!vm.newBuild && !vm.isEditor) {
this.disabled = true;
} else {
......@@ -410,6 +407,10 @@ export default {
this.optionsComponent = optionsComponent;
this.optionsCertificate = optionsCertificate;
this.organizationContent = res.data.creatorOrganizationName;
if (!vm.newBuild){
vm.status4Flag = 1;
vm.setEditData(this.messageObj);
}
}
});
},
......@@ -475,12 +476,12 @@ export default {
});
if (res.code == "000000") {
//notify
if (type == 2) {
if (type == 3) {
let query = {};
if (this.$route.query.pageNum) {
query = { pageNum: this.$route.query.pageNum };
}
this.$router.push({ path: "item-manager", query: query });
this.$router.push({ path: "template-manager", query: query });
// this.$router.push("item-manager?pageNum="+this.$route.query.pageNum);
}
}
......@@ -567,7 +568,7 @@ export default {
}
},
initTags(value) {
//console.log('value',value,'optionsComponent',this.optionsComponent);
console.log('value',value,'optionsComponent',this.optionsComponent);
this.tagsComponent = [];
let len = 0;
for (let i = 0; i < value.length; i++) {
......@@ -576,6 +577,7 @@ export default {
this.tagsComponent[len] = {};
this.tagsComponent[len].value = this.optionsComponent[j].value;
this.tagsComponent[len].name = this.optionsComponent[j].label;
// 不可编辑
if (vm.status4Flag == 1) {
this.optionsComponent[j].disabled = true;
this.tagsComponent[len].disabled = true;
......
......@@ -12,7 +12,7 @@
</el-col>
<el-col :span="7" :offset="5">
<el-button v-if="!fished" size="small" type="primary" @click="nextStep">下一步</el-button>
<el-button v-if="fished" size="small" type="primary" @click="complete">完成</el-button>
<el-button v-if="fished" size="small" type="primary" @click="complete">发布</el-button>
</el-col>
</el-row>
</div>
......
......@@ -23,7 +23,7 @@
</li>
<li class="clase-item" v-if="item.afterExamCount">
<span class="icon"></span>
<i class="icon-message">{{tem.afterExamCount}}次结业考试<i v-if="item.existCertificate "> (通过获结业证书)</i></i>
<i class="icon-message">{{item.afterExamCount}}次结业考试<i v-if="item.existCertificate "> (通过获结业证书)</i></i>
</li>
<li class="clase-item">
<span class="icon"></span>
......
......@@ -43,7 +43,7 @@
:content="organizationContent"
v-model="visibleName"
@click="checkDefault">
<p @click="checkDefault"> 我的机构: {{ organizationContent }} </p>
<p @click="checkDefault"> 我的机构: {{ formData.creatorOrganizationName }} </p>
</el-popover>
</el-form-item>
......@@ -229,13 +229,14 @@ export default {
return {
visibleName: false, //是否显示机构提示
orgListIndex: 1,
organizationContent: 'hcd',//机构名称
organizationContent: '',//机构名称
formData: {
id: "", //项目 id 26
projectName: "", //开放模板名称
projectBegintime: "", //模板开始时间
projectEndtime: "", //模板结束时间
projectIntro: "", //开放模板简介
projectType: 3, //类型
type: 1, //封面类型 1图片2视频
projectStatus: 3, //1.草稿 2.未上架 3.审核中/待审核 4.已上架 5.已下架 6.已拒绝/未上架
expireDay: 1, //模板有效期(天)
......@@ -438,6 +439,7 @@ export default {
},
// 机构选择默认值
checkDefault() {
vm.organizationContent = vm.formData.creatorOrganizationName;
vm.formData.organizationNameList.splice(vm.orgListIndex-1, 1, vm.organizationContent);
vm.visibleName = false;
},
......@@ -643,9 +645,11 @@ export default {
});
return flag;
},
// 取消
confirm() {
vm.dialogObj.visible = false;
},
// 确定
hide() {
vm.dialogObj.visible = false;
this.$emit('backSelectVue')
......
......@@ -52,6 +52,7 @@
</div>
<dialog-componet :dialogObj="dialogObj" @hide="hide"></dialog-componet>
<dialog-componet :dialogObj="sendObj" @hide="hidefn" @confirm="confirmFn"></dialog-componet>
</div>
</template>
......@@ -116,6 +117,13 @@ export default {
message: '本年度免费创建数已达',
hideMsg: '确定'
}
},
sendObj: { // 发布
visible: false,
title: '确定发布吗?',
message: '发布后,项目将进入审核中,待审核完成后学员可在云鹊医App上参加培训学习',
confirmMsg: '取消',
hideMsg: '确定发布'
}
}
},
......@@ -130,48 +138,63 @@ export default {
},
created() {
vm = this;
vm.isEditorFn();
},
mounted() {
commonUtil.resizeHeight();
},
methods: {
isEditorFn(){
if(vm.$route.query.id) {
vm.projectId = vm.$route.query.id;
vm.editor = true;
vm.active = 1;
vm.canNext = true;
}
},
// 下一步
nextStep() {
if (this.active == 0) {
// let flag = this.checkSelectTemplate();
if (vm.active == 0) {
// let flag = vm.checkSelectTemplate();
let flag = true;
if (flag) {
this.active = 1;
vm.active = 1;
}
return;
}
if (this.active == 1) {
this.$refs.templateMessage.nextStep();
if (vm.active == 1) {
vm.$refs.templateMessage.nextStep();
return;
}
},
// 填写项目信息组件的下一步回调
next(id) {
this.projectId = id;
this.active = 2;
vm.projectId = id;
vm.active = 2;
},
// 暂存
save() {
if (this.active == 1) {
this.$refs.templateMessage.save();
} else if (this.active == 2) {
this.regionComplete();
if (vm.active == 1) {
vm.$refs.templateMessage.save();
} else if (vm.active == 2) {
vm.regionComplete();
}
},
confirmFn() {
vm.sendObj.visible = false;
},
// 完成
complete() {
this.regionComplete(this.changeStatus());
vm.sendObj.visible = true;
},
hidefn() {
vm.regionComplete(vm.changeStatus());
},
// 选择学元范围暂存
regionComplete(fishFn) {
let req = {
projectId: this.projectId,
scopeOfAdministrative: this.$refs.selectRegion.setScope(),
projectId: vm.projectId,
scopeOfAdministrative: vm.$refs.selectRegion.setScope(),
scopeOfDepartment: 99999999,
flag: fishFn ? 3 : 1, //0:下一步 1:暂存
};
......@@ -192,15 +215,17 @@ export default {
// 完成后更改状态
changeStatus() {
let req = {
projectId: this.projectId,
projectId: vm.projectId,
changeStatus: 3 //待审核
};
vm.POST("portal/portalInfo/changeStatus", req)
.then(res => {
vm.$message({
type: "info",
message: res.message
});
vm.sendObj.visible = false;
let query = {};
if (vm.$route.query.pageNum) {
query = { pageNum: vm.$route.query.pageNum };
}
vm.$router.push({ path: "item-manager", query: query });
})
.catch(() => {
vm.$message({
......@@ -212,13 +237,13 @@ export default {
//切换tabs
handleClickTabs(tab, event) {
if (tab.name == 'second') {
this.setRegion();
vm.setRegion();
}
},
// 模板列表选中
checkFn(id) {
this.canNext = true;
this.openTemplateId = id;
vm.canNext = true;
vm.openTemplateId = id;
},
//选中模板后点击下一步时检测(机构和进行中的项目)
checkSelectTemplate() {
......@@ -230,8 +255,8 @@ export default {
if (res.data.status == 0) {
return true;
} else {
this.dialogObj = Object.assign(this.dialogObj, this.statusObj[`status_${res.data.status}`]);
this.dialogObj.visible = true;
vm.dialogObj = Object.assign(vm.dialogObj, vm.statusObj[`status_${res.data.status}`]);
vm.dialogObj.visible = true;
return false;
}
} else {
......@@ -245,19 +270,19 @@ export default {
},
// 隐藏弹框
hide() {
this.dialogObj.visible = false;
vm.dialogObj.visible = false;
},
// 获取行政范围
setRegion() {
this.getOrganizationList(this.$refs.selectRegion.getScope());
vm.getOrganizationList(vm.$refs.selectRegion.getScope());
},
// 查询行政范围的设定机构列表
getOrganizationList(r) {
this.$refs.setOrganization.getOrganization(r);
vm.$refs.setOrganization.getOrganization(r);
},
// 返回选择模板页
backSelectVue() {
this.active = 0;
vm.active = 0;
}
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册