提交 146f4f10 编写于 作者: haochangdi's avatar haochangdi

实现基本的模板编辑页逻辑

上级 8a3016e6
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</el-tree> </el-tree>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<p class="area-p"> <p class="area-p" @click="getScope('administrative')">
项目范围包含下列区域所有机构和人员({{ tagsRegion.length }}) 项目范围包含下列区域所有机构和人员({{ tagsRegion.length }})
</p> </p>
<el-tag <el-tag
...@@ -70,7 +70,7 @@ export default { ...@@ -70,7 +70,7 @@ export default {
}, },
treeData: [], treeData: [],
tagsRegion: [], tagsRegion: [],
projectId: 640 projectId: 173
} }
}, },
created() { created() {
...@@ -105,7 +105,7 @@ export default { ...@@ -105,7 +105,7 @@ export default {
this.treeData = []; this.treeData = [];
this.treeData[0] = administrativeAll; this.treeData[0] = administrativeAll;
this.setTreeData(administrative); this.setTreeData(administrative);
this.getCheckedTree(); // this.getCheckedTree();
} }
}); });
}, },
...@@ -149,12 +149,11 @@ export default { ...@@ -149,12 +149,11 @@ export default {
halfCheckedTree halfCheckedTree
); );
//重构内容 //重构内容
this.allSelectedKeys = allSelectedKeys; this.allSelectedKeys = allSelectedKeys;
this.initCheckList(allSelectedKeys); this.initCheckList(allSelectedKeys);
//console.log("allSelectedKeys", allSelectedKeys); //console.log("allSelectedKeys", allSelectedKeys);
//改变行政范围后,更新设定机构和设定人员 //改变行政范围后,更新设定机构和设定人员
this.updateOrganizationAndPerson(allSelectedKeys); // this.updateOrganizationAndPerson(allSelectedKeys);
this.updatedTree = true; this.updatedTree = true;
}, },
//v2.2教培更新 //v2.2教培更新
...@@ -192,18 +191,21 @@ export default { ...@@ -192,18 +191,21 @@ export default {
} }
}, },
//行政范围改变更新设定机构 //行政范围改变更新设定机构
updateOrganizationAndPerson(allSelectedKeys) { // updateOrganizationAndPerson(allSelectedKeys) {
console.log('=========================updateOrganizationAndPerson') // console.log('====================================');
this.tableOrganization = []; // console.log(allSelectedKeys);
this.tablePerson = []; // console.log('====================================');
this.lookedOrganization = []; // console.log('=========================updateOrganizationAndPerson')
this.changedOrganization = []; // this.tableOrganization = [];
this.changedOrganization2 = []; // this.tablePerson = [];
}, // this.lookedOrganization = [];
getCheckedKeys() { // this.changedOrganization = [];
console.log('=========================getCheckedKeys') // this.changedOrganization2 = [];
console.log(this.$refs.tree.getCheckedKeys()); // },
}, // getCheckedKeys() {
// console.log('=========================getCheckedKeys')
// console.log(this.$refs.tree.getCheckedKeys());
// },
//添加子节点 //添加子节点
append(data, node) { append(data, node) {
console.log('=========================append') console.log('=========================append')
...@@ -264,6 +266,25 @@ export default { ...@@ -264,6 +266,25 @@ export default {
} }
console.log(treeKeyList); console.log(treeKeyList);
this.$refs.tree.setCheckedKeys(treeKeyList); this.$refs.tree.setCheckedKeys(treeKeyList);
},
//设定的行政范围内容
getScope(type) {
console.log('========================getScope');
let scope = "";
let arr = [];
for (let i = 0; i < this.tagsRegion.length; i++) {
scope += this.tagsRegion[i].key;
arr.push(this.tagsRegion[i].key)
if (i < this.tagsRegion.length - 1) {
scope += "|";
}
}
if (scope == "") {
return null;
}
this.$emit('setRegion',arr);
return scope;
} }
} }
} }
......
...@@ -205,6 +205,12 @@ import Sortable from "sortablejs"; ...@@ -205,6 +205,12 @@ import Sortable from "sortablejs";
let vm = null; let vm = null;
export default { export default {
props: {
openTemplateId: {
type: String | Number,
deault: 0
}
},
data() { data() {
let checkNormalInt = (rule, value, callback) => { let checkNormalInt = (rule, value, callback) => {
const val = parseFloat(value); const val = parseFloat(value);
...@@ -216,7 +222,6 @@ export default { ...@@ -216,7 +222,6 @@ export default {
} }
}; };
return { return {
idTypeProject: "",
customError: { customError: {
standard: { standard: {
className: "", className: "",
...@@ -239,8 +244,6 @@ export default { ...@@ -239,8 +244,6 @@ export default {
error: "" error: ""
} }
}, },
projectId: null,
fileList: [],
//选择项目组件 数据 //选择项目组件 数据
optionsComponent: [], optionsComponent: [],
optionsCertificate: [], optionsCertificate: [],
...@@ -248,9 +251,9 @@ export default { ...@@ -248,9 +251,9 @@ export default {
component: [], component: [],
configure: 2, configure: 2,
certificate: "", certificate: "",
courseRequire: 0, //0:不控制 1:按课程时长配置要求 courseRequire: 0, //模板内课程的完成是否受学习时长控制:0否1是
passExamCount: "", passExamCount: "", //模板中最高考试门数限制:passType=2时有值
passAverageScore: "", passAverageScore: "", //门数限制下考试成绩的平均分限制:passType=2时有值
passTotalLearnTime: "" passTotalLearnTime: ""
}, },
tagsComponent: [], tagsComponent: [],
...@@ -259,8 +262,8 @@ export default { ...@@ -259,8 +262,8 @@ export default {
showStorage: false, showStorage: false,
//考试数据 //考试数据
formExam: { formExam: {
certificateType: 1, certificateType: 1, //模板证书类型:1单证书2多证书
passType: 1, passType: 1, //模板通过标准类型:1所有组件通过,2根据平均分设定,3根据项目内学习时长设定
exam: [ exam: [
{ {
examCount: 1, examCount: 1,
...@@ -298,7 +301,8 @@ export default { ...@@ -298,7 +301,8 @@ export default {
{ required: false, trigger: "change", validator: checkNormalInt } { required: false, trigger: "change", validator: checkNormalInt }
], ],
showRules1: [{ required: true, message: "请输入门数", trigger: "blur" }] showRules1: [{ required: true, message: "请输入门数", trigger: "blur" }]
} },
disabled: true
}; };
}, },
computed: { computed: {
...@@ -306,7 +310,6 @@ export default { ...@@ -306,7 +310,6 @@ export default {
}, },
created() { created() {
vm = this; vm = this;
(this.projectId = vm.getUrlSearch(window.location.href, "projectId")),
this.getComponentInfo(); this.getComponentInfo();
vm.idType = localStorage.getItem("storageIdType"); vm.idType = localStorage.getItem("storageIdType");
}, },
...@@ -360,13 +363,8 @@ export default { ...@@ -360,13 +363,8 @@ export default {
//查询组件证书信息 //查询组件证书信息
getComponentInfo() { getComponentInfo() {
console.log('=================getComponentInfo'); console.log('=================getComponentInfo');
let param = {};
let projectIdValue = vm.projectId;
if (projectIdValue == null) {
projectIdValue = 0;
}
vm vm
.GET("portal/portalInfo/getComponentInfo/" + projectIdValue, param) .GET("portal/openTemplate/getAllComponent")
.then(res => { .then(res => {
if (res.code == "000000") { if (res.code == "000000") {
//console.log(res); //console.log(res);
...@@ -392,7 +390,7 @@ export default { ...@@ -392,7 +390,7 @@ export default {
} }
}); });
}, },
//项目组件信息 暂存/完成 //项目组件信息 暂存/完成 1暂存2保存3发布
componentDraft(type) { componentDraft(type) {
console.log('=================componentDraft'); console.log('=================componentDraft');
let param = { let param = {
...@@ -400,7 +398,7 @@ export default { ...@@ -400,7 +398,7 @@ export default {
componentIds: operationData.getComponent(vm.tagsComponent), componentIds: operationData.getComponent(vm.tagsComponent),
// certificateId: this.formComponent.certificate, // certificateId: this.formComponent.certificate,
certificateId: [], certificateId: [],
projectId: this.projectId, openTemplateId: this.openTemplateId,
type: type, type: type,
status: this.projectStatus, status: this.projectStatus,
certificateType: this.formExam.passType == 2 ? 2 : 1, certificateType: this.formExam.passType == 2 ? 2 : 1,
...@@ -431,7 +429,7 @@ export default { ...@@ -431,7 +429,7 @@ export default {
certificateId: ruleData[o].certificateId, certificateId: ruleData[o].certificateId,
certificateName: ruleData[o].certificateName, certificateName: ruleData[o].certificateName,
examCount: ruleData[o].examCount, examCount: ruleData[o].examCount,
portalProjectId: this.projectId, openTemplateId: this.openTemplateId,
rangeMax: ruleData[o].rangeMax, rangeMax: ruleData[o].rangeMax,
rangeMin: ruleData[o].rangeMin rangeMin: ruleData[o].rangeMin
}; };
...@@ -446,7 +444,7 @@ export default { ...@@ -446,7 +444,7 @@ export default {
} }
} }
} }
vm.POST("portal/portalInfo/componentDraft", param).then(res => { vm.POST("portal/openTemplate/componentDraft", param).then(res => {
console.log(res); console.log(res);
vm.$message({ vm.$message({
message: res.message, message: res.message,
...@@ -550,6 +548,7 @@ export default { ...@@ -550,6 +548,7 @@ export default {
vm.$message("至少配置1个证书"); vm.$message("至少配置1个证书");
} }
}, },
// 选择证书
updateCertificate(index) { updateCertificate(index) {
// console.log('optionsCertificate',vm.optionsCertificate,'index',index,'item',vm.formExam.exam[index]) // console.log('optionsCertificate',vm.optionsCertificate,'index',index,'item',vm.formExam.exam[index])
for (let i = 0; i < vm.optionsCertificate.length; i++) { for (let i = 0; i < vm.optionsCertificate.length; i++) {
...@@ -623,6 +622,7 @@ export default { ...@@ -623,6 +622,7 @@ export default {
} }
} }
.select-manager-wrap { .select-manager-wrap {
padding-top: 64px;
.mleft60 { .mleft60 {
margin-left: 60px; margin-left: 60px;
} }
......
...@@ -177,7 +177,8 @@ export default { ...@@ -177,7 +177,8 @@ export default {
formOrganization: { formOrganization: {
name: "", name: "",
administrativeId: "0", administrativeId: "0",
administrativeIdList: ["0"], // administrativeIdList: ["0"],
administrativeIdList:[110],
level: "-1", level: "-1",
chechAll: true, chechAll: true,
pageNum: 1, pageNum: 1,
...@@ -339,7 +340,7 @@ export default { ...@@ -339,7 +340,7 @@ export default {
}, },
//获取地区select //获取地区select
getRegionOption() { getRegionOption() {
console.log('=========================getRegionOption') console.log('=========================getRegionOption')
let req = {}; let req = {};
openLoading(vm); openLoading(vm);
vm.GET("basic-data/position/provinces", req).then(res => { vm.GET("basic-data/position/provinces", req).then(res => {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<template> <template>
<div class="step-content-compontent"> <div class="step-content-compontent">
<el-row class="step-content"> <el-row class="step-content">
<el-col :span="14"> <el-col :span="12">
<el-steps :active="active" simple class> <el-steps :active="active" simple class>
<span class="step-num" v-bind:class="{ 'on-step': active==0 }">1</span> <span class="step-num" v-bind:class="{ 'on-step': active==0 }">1</span>
<el-step title="基础信息"></el-step> <el-step title="基础信息"></el-step>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<el-step title="选择项目组件">3</el-step> <el-step title="选择项目组件">3</el-step>
</el-steps> </el-steps>
</el-col> </el-col>
<el-col :span="5" :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>
...@@ -49,6 +49,11 @@ export default { ...@@ -49,6 +49,11 @@ export default {
<style lang="scss"> <style lang="scss">
.step-content-compontent { .step-content-compontent {
background: #fff; background: #fff;
z-index: 1001;
background: #fff;
position: fixed;
right: 30px;
left: 285px;
.step-content { .step-content {
overflow: hidden; overflow: hidden;
height: 60px; height: 60px;
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<div class="list-wrap"> <div class="list-wrap">
<div class="template-content" :class="{clicked: item.isclick}" v-for="(item,index) of list" :key="index" @click="check(item,index)"> <div class="template-content" :class="{clicked: item.isclick}" v-for="(item,index) of list" :key="index" @click="check(item,index)">
<div class="title-wrap"> <div class="title-wrap">
<div class="title-icon">神经内科</div> <div class="title-icon">{{item.subjectName}}</div>
<div class="title">国家基本公共卫生服务项目国家基本公共卫生</div> <div class="title">{{item.openTemplateName}}</div>
<div class="sj" v-if="item.isclick"> <div class="sj" v-if="item.isclick">
<i class="el-icon-check"></i> <i class="el-icon-check"></i>
</div> </div>
...@@ -13,21 +13,21 @@ ...@@ -13,21 +13,21 @@
<div class="main"> <div class="main">
<div class="main-title">套餐内容包含:</div> <div class="main-title">套餐内容包含:</div>
<ul class="clase-list"> <ul class="clase-list">
<li class="clase-item"> <li class="clase-item" v-if="item.courseCount">
<span class="icon"></span> <span class="icon"></span>
<i class="icon-message">7节课程</i> <i class="icon-message">{{item.courseCount}}节课程</i>
</li> </li>
<li class="clase-item"> <li class="clase-item" v-if="item.beforeExamCount">
<span class="icon"></span> <span class="icon"></span>
<i class="icon-message">7节课程</i> <i class="icon-message">{{item.beforeExamCount}}次摸底考试</i>
</li> </li>
<li class="clase-item"> <li class="clase-item" v-if="item.afterExamCount">
<span class="icon"></span> <span class="icon"></span>
<i class="icon-message">7节7节课程课程</i> <i class="icon-message">{{tem.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>
<i class="icon-message">7节7节课程课程</i> <i class="icon-message">实时在线项目数据报告</i>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -50,20 +50,24 @@ ...@@ -50,20 +50,24 @@
</div> </div>
<el-dialog title="项目详情" :visible.sync="dialogTableVisible" class="dialog-list-wrap"> <el-dialog title="项目详情" :visible.sync="dialogTableVisible" class="dialog-list-wrap">
<div class="dialog-line"></div> <div class="dialog-line"></div>
<div class="dialog-title">国家基本公共卫生服务项目国家基本公共卫生</div> <div class="dialog-title">{{detailObj.openTemplateName}}</div>
<div class="dialog-message"> <div class="dialog-message">
<div class="dm-title"> <div class="dm-title">
<div class="dm-line"></div> <div class="dm-line"></div>
<div class="dm-msg">基本信息</div> <div class="dm-msg">基本信息</div>
</div> </div>
<div class="dm-main"> <div class="dm-main">
<div class="mian-list"> <div class="mian-list" v-if="detailObj.openTemplateIntro">
<div class="dm-name">内容有效期:</div> <div class="dm-name">内容有效期:</div>
<div class="dm-nr">30天</div> <div class="dm-nr">{{detailObj.openTemplateIntro}}</div>
</div>
<div class="mian-list" v-if="detailObj.subjectName">
<div class="dm-name">项目学科:</div>
<div class="dm-nr">{{detailObj.subjectName}}</div>
</div> </div>
<div class="mian-list"> <div class="mian-list" v-if="detailObj.organizationName">
<div class="dm-name">已参加的机构:</div> <div class="dm-name">已参加的机构:</div>
<div class="dm-nr">已参加的机构已参加的机构</div> <div class="dm-nr">{{detailObj.organizationName}}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -72,13 +76,14 @@ ...@@ -72,13 +76,14 @@
<div class="dm-line"></div> <div class="dm-line"></div>
<div class="dm-msg">项目简介</div> <div class="dm-msg">项目简介</div>
</div> </div>
<div class="jjs-main">项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介项目简介</div> <div class="jjs-main">{{detailObj.openTemplateIntro}}</div>
</div> </div>
<div class="dialog-xq"> <div class="dialog-xq">
<div class="dm-title"> <div class="dm-title">
<div class="dm-line"></div> <div class="dm-line"></div>
<div class="dm-msg">项目详情</div> <div class="dm-msg">项目详情</div>
</div> </div>
<div class="xq-main" v-html="detailObj.openTemplateDetail"></div>
</div> </div>
</el-dialog> </el-dialog>
...@@ -88,67 +93,68 @@ ...@@ -88,67 +93,68 @@
</template> </template>
<script> <script>
import { openLoading, closeLoading } from "../../../utils/utils";
let vm = null;
export default { export default {
data() { data() {
return { return {
list: [ list: [],
{ detailObj: {},
isclick: false
},
{
isclick: false
},
{
isclick: false
},
{
isclick: false
},
{
isclick: false
},
{
isclick: false
},
{
isclick: false
},
{
isclick: false
},
{
isclick: false
},
{
isclick: false
},
{
isclick: false
},
{
isclick: false
},
{
isclick: false
}
],
dialogTableVisible: false dialogTableVisible: false
} }
}, },
created() {}, created() {
vm = this;
vm.getTemplateList();
},
methods: { methods: {
// 选中 // 选中
check(item,index) { check(item,index) {
item.isclick = true; this.list[index].isclick = true;
for (let i = 0; i<this.list.length; i++) { for (let i = 0; i< this.list.length; i++) {
if (i != index) { if (i != index) {
this.list[i].isclick = false vm.list[i].isclick = false
} }
} }
vm.$emit('checkFn',item.id);
}, },
// 获取详情 // 获取详情
getDetail() { getDetail(item) {
//
this.dialogTableVisible = true; this.dialogTableVisible = true;
openLoading(vm);
vm.GET(`portal/openTemplateProject/getOpenTemplateInfoForList/${item.id}`)
.then(res => {
closeLoading(vm);
if (res.code == "000000") {
vm.detailObj = res.data;
} else {
vm.$message.info(res.message);
}
})
.catch((err) => {
closeLoading(vm);
vm.$message.warning('请稍后重试');
});
},
getTemplateList() {
openLoading(vm);
vm.GET(`portal/openTemplateProject/getOpenTemplateList`)
.then(res => {
closeLoading(vm);
if (res.code == "000000") {
for (const item of res.data.list) {
item.isclick = false;
}
this.list = res.data.list;
} else {
vm.$message.info(res.message);
}
})
.catch((err) => {
closeLoading(vm);
vm.$message.warning('请稍后重试');
});
} }
} }
} }
...@@ -405,6 +411,14 @@ export default { ...@@ -405,6 +411,14 @@ export default {
.dialog-xq { .dialog-xq {
margin-top: 40px; margin-top: 40px;
padding-bottom: 30px; padding-bottom: 30px;
.xq-main {
margin-left: 17px;
margin-top: 16px;
color: #676869;
img {
max-height: 720px;
}
}
} }
} }
} }
......
<template> <template>
<div class="template-editor-wrap"> <div class="template-editor-wrap">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond" :curmbThird="curmbThird"></bread-crumb> <bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond" :curmbThird="curmbThird"></bread-crumb>
<div class="add-content screenSet" id="screenSet"> <div class="add-content screenSet" id="screenSet" v-if="editor">
<div class="top-lin"></div>
<step-content <step-content
:active="active" :active="active"
:fished="fished" :fished="fished"
@nextStep="nextStep" @nextStep="nextStep"
@complete="complete" @complete="complete"
/> />
<!-- 基础组件 --> <!-- 基础组件 -->
<base-message <base-message
ref="baseMessage" ref="baseMessage"
v-if="active == 0 && formData" v-if="active == 0 && formData"
:formData="formData"
:projectManger="projectManger" :projectManger="projectManger"
@next="next"
/> />
<!-- 选择项目组件 --> <!-- 选择项目组件 -->
<select-template v-if="active == 1" /> <select-template
ref="selectTemplate"
v-if="active == 1"
:openTemplateId="openTemplateId"
/>
<!-- 选择行政区 --> <!-- 选择行政区 -->
<!-- <select-region v-if="active == 1"></select-region> --> <!-- <select-region v-if="active == 1"></select-region> -->
...@@ -27,6 +31,23 @@ ...@@ -27,6 +31,23 @@
<!-- 设定机构 --> <!-- 设定机构 -->
<!-- <set-Organization v-if="active == 0"></set-Organization> --> <!-- <set-Organization v-if="active == 0"></set-Organization> -->
</div> </div>
<div class="add-content screenSet" id="screenSet" v-else>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="基础信息" name="first">
<base-message
ref="baseMessage"
:projectManger="projectManger"
@next="next"
/>
</el-tab-pane>
<el-tab-pane label="选中组件" name="second">
<select-template
ref="selectTemplate"
:openTemplateId="openTemplateId"
/>
</el-tab-pane>
</el-tabs>
</div>
</div> </div>
</template> </template>
...@@ -47,34 +68,54 @@ export default { ...@@ -47,34 +68,54 @@ export default {
fished: false, fished: false,
projectManger: false, projectManger: false,
formData: { formData: {
projectName: "", openTemplateName: "", //开放模板名称
projectBegintime: "", projectBegintime: "", //模板开始时间
projectEndtime: "", projectEndtime: "", //模板结束时间
projectIntro: "", openTemplateIntro: "", //开放模板简介
type: 1, type: 1, //封面类型 1图片2视频
useTime: "", expireDay: "", // 开放有效期
xueke: "", subjectId: "", //开放模板所属学科ID
subjectName: "", //开放模板所属学科名称
attachmentUrl1: "", attachmentUrl1: "",
attachmentUrl2: "", attachmentUrl2: "",
attachmentUrl3: "", attachmentUrl3: "",
attachmentMore1: {}, attachmentMore1: {},
attachmentMore2: {}, attachmentMore2: {},
scopeType: 0, organizationName: "", // 发起机构名称(多个机构拼接
organizationName: "", organizationNameList: [''], //发起机构列表
organizationNameList: [''], openTemplateDetail: '' //开放模板详情
sendOption: 1,
receiveOption: 1,
visibleFlag: 1,
learnableFlag: 2,
authorityType: 1,
allowLearn: 2,
richContent: ''
}, },
attachmentModel:[ //基础信息的图片视频
{
attachmentExt: '',// 附件格式
attachmentName: '',//附件名称
attachmentSize:'',//附件大小,
attachmentType: 1,//1:图片 2:视频 3:pdf
attachmentUrl: '',//附件链接
id: '', //关联唯一ID
kind: 1, //1:列表图片 2:封面配置 3:附件配置
openTemplateId: ''//开放模板id
},
{
attachmentExt: '',// 附件格式
attachmentName: '',//附件名称
attachmentSize:'',//附件大小,
attachmentType: 1,//1:图片 2:视频 3:pdf
attachmentUrl: '',//附件链接
id: '', //关联唯一ID
kind: 1, //1:列表图片 2:封面配置 3:附件配置
openTemplateId: ''//开放模板id
}
],
baseobj: {},
formTemplate: { formTemplate: {
component: [], component: [],
configure: 2, configure: 2,
certificate: "" certificate: ""
} },
openTemplateId: 26,
activeName: 'first',
editor: true // 是否为编辑状态
} }
}, },
components: { components: {
...@@ -85,28 +126,66 @@ export default { ...@@ -85,28 +126,66 @@ export default {
selectRegion, selectRegion,
setOrganization setOrganization
}, },
created() {}, created() {
this.fished = this.active == 0 ? false : true
},
methods: { methods: {
// 下一步 //用于存储基本信息
nextStep() { nextStep() {
// let flag = this.$refs.baseMessage.nextStep(); if(this.active == 0) {
// if (!flag) { let flag = this.$refs.baseMessage.nextStep();
// return;
// }
this.active++;
if (this.active == 1) {
this.fished = true;
} }
}, },
// 下一步
next(openTemplateId) {
this.openTemplateId = openTemplateId;
this.active = 1;
this.fished = true;
},
complete() { complete() {
console.log('完成'); console.log('完成');
//1暂存2保存3发布
this.$refs.selectTemplate.componentDraft(3);
},
handleClick() {
} }
} }
} }
</script> </script>
<style>
.template-editor-wrap .el-tabs__header {
z-index: 1001;
background: #fff;
position: fixed;
right: 30px;
left: 285px;
}
.template-editor-wrap .el-tabs__item {
width: 240px;
text-align: center;
margin-right: 20px;
height: 64px;
line-height: 64px;
font-size:16px;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
color:rgba(48,49,51,1);
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
.template-editor-wrap { .template-editor-wrap {
.top-lin {
position: fixed;
height: 30px;
background: #F0F2F5;
right: 30px;
left: 285px;
z-index: 1001;
top: 125px;
}
.add-content { .add-content {
background: #fff; background: #fff;
} }
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
<div class="template-open-wrap"> <div class="template-open-wrap">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond" :curmbThird="curmbThird"></bread-crumb> <bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond" :curmbThird="curmbThird"></bread-crumb>
<div class="add-content screenSet" id="screenSet" style="pos"> <div class="add-content screenSet" id="screenSet">
<div class="top-lin"></div>
<el-row class="step-content"> <el-row class="step-content">
<el-col :span="14"> <el-col :span="14">
<el-steps :active="active" simple class> <el-steps :active="active" simple class>
...@@ -15,12 +16,13 @@ ...@@ -15,12 +16,13 @@
</el-steps> </el-steps>
</el-col> </el-col>
<el-col :span="5" :offset="5"> <el-col :span="5" :offset="5">
<el-button v-if="active!==2" size="small" type="primary" @click="nextStep">下一步</el-button> <el-button v-if="!canNext" size="small" type="info" plain>下一步</el-button>
<el-button v-if="active!==2 && canNext" size="small" type="primary" @click="nextStep">下一步</el-button>
<el-button v-if="active==2" size="small" type="primary" @click="complete">完成</el-button> <el-button v-if="active==2" size="small" type="primary" @click="complete">完成</el-button>
</el-col> </el-col>
</el-row> </el-row>
<div v-if="active == 0" class="tpl-main"> <div v-if="active == 0" class="tpl-main">
<template-list></template-list> <template-list @checkFn="checkFn"></template-list>
</div> </div>
<!-- 模板列表 --> <!-- 模板列表 -->
...@@ -34,13 +36,13 @@ ...@@ -34,13 +36,13 @@
/> />
<!-- 选择学员 --> <!-- 选择学员 -->
<div class="second-step" v-else-if="active === 2"> <div class="three-step" v-else-if="active === 2">
<el-tabs v-model="activeName" @tab-click="handleClickTabs"> <el-tabs v-model="activeName" @tab-click="handleClickTabs">
<el-tab-pane label="设定行政范围" name="first"> <el-tab-pane label="设定行政范围" name="first">
<select-region></select-region> <select-region @setRegion="setRegion"></select-region>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="设定机构" name="second"> <el-tab-pane label="设定机构" name="second">
<set-Organization></set-Organization> <set-Organization ></set-Organization>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
...@@ -57,6 +59,7 @@ import setOrganization from "../../components/education/template/setOrganization ...@@ -57,6 +59,7 @@ import setOrganization from "../../components/education/template/setOrganization
import templateList from "../../components/education/template/templateList"; import templateList from "../../components/education/template/templateList";
import { openLoading, closeLoading } from "../../utils/utils"; import { openLoading, closeLoading } from "../../utils/utils";
import * as commonUtil from "../../utils/utils"; import * as commonUtil from "../../utils/utils";
let vm = null;
export default { export default {
data() { data() {
return { return {
...@@ -95,7 +98,10 @@ export default { ...@@ -95,7 +98,10 @@ export default {
configure: 2, configure: 2,
certificate: "" certificate: ""
}, },
activeName: "first" activeName: "first",
canNext: false,
openTemplateId: '',
r: []//设定行政范围和设定机构相互影响的行政范围
} }
}, },
components: { components: {
...@@ -106,7 +112,9 @@ export default { ...@@ -106,7 +112,9 @@ export default {
setOrganization, setOrganization,
templateList templateList
}, },
created() {}, created() {
vm = this;
},
mounted() { mounted() {
commonUtil.resizeHeight(); commonUtil.resizeHeight();
}, },
...@@ -128,6 +136,35 @@ export default { ...@@ -128,6 +136,35 @@ export default {
//切换tabs //切换tabs
handleClickTabs(tab, event) { handleClickTabs(tab, event) {
// this.activeName = tab.name; // this.activeName = tab.name;
},
// 模板列表选中
checkFn(id) {
this.canNext = true;
this.openTemplateId = id;
},
//选中模板后点击下一步时检测(机构和进行中的项目)
checkSelectTemplate() {
openLoading(vm);
vm.GET(`portal/openTemplateProject/checkAfterSelectOneOpenTemplate/${vm.openTemplateId}`)
.then(res => {
closeLoading(vm);
if (res.code == "000000") {
console.log()
} else {
vm.$message.info(res.message);
}
})
.catch((err) => {
closeLoading(vm);
vm.$message.warning('请稍后重试');
});
},
// 设定行政范围和设定机构范围相互影响
setRegion(r) {
this.r = r;
console.log('====================================');
console.log(r);
console.log('====================================');
} }
} }
} }
...@@ -135,7 +172,25 @@ export default { ...@@ -135,7 +172,25 @@ export default {
<style lang="scss"> <style lang="scss">
.template-open-wrap { .template-open-wrap {
.el-step.is-simple:not(:last-of-type) .el-step__title {
max-width: 100%;
}
.top-lin {
position: fixed;
height: 30px;
background: #F0F2F5;
right: 30px;
left: 285px;
z-index: 1001;
top: 125px;
}
.step-content { .step-content {
background: #fff;
z-index: 1001;
background: #fff;
position: fixed;
right: 30px;
left: 285px;
overflow: hidden; overflow: hidden;
height: 60px; height: 60px;
// margin-top: 66px; // margin-top: 66px;
...@@ -189,7 +244,8 @@ export default { ...@@ -189,7 +244,8 @@ export default {
.add-content { .add-content {
background: #fff; background: #fff;
} }
.second-step { .three-step {
padding-top: 64px;
margin: 10px 0 0 20px; margin: 10px 0 0 20px;
.area-p { .area-p {
margin-bottom: 15px; margin-bottom: 15px;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册