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