Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
f16572db
提交
f16572db
编写于
5月 25, 2020
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完整添加项目
上级
5af7db42
变更
6
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
791 行增加
和
303 行删除
+791
-303
course-list.vue
src/components/education/custom/course-list.vue
+2
-0
custom-baseinfo.vue
src/components/education/custom/custom-baseinfo.vue
+386
-160
sorted-cart.vue
src/components/education/custom/sorted-cart.vue
+188
-0
fetch.js
src/utils/fetch.js
+1
-1
edit-custom.vue
src/views/education/edit-custom.vue
+37
-24
item-manager.vue
src/views/education/item-manager.vue
+177
-118
未找到文件。
src/components/education/custom/course-list.vue
浏览文件 @
f16572db
...
...
@@ -134,6 +134,8 @@ export default {
})
this
.
cartList
.
splice
(
delItemIndex
,
1
);
}
this
.
setCartList
(
this
.
cartList
);
this
.
$forceUpdate
();
},
}
...
...
src/components/education/custom/custom-baseinfo.vue
浏览文件 @
f16572db
...
...
@@ -21,6 +21,11 @@
></el-input>
<span
class=
"word-num"
>
{{
(
formData
.
projectName
).
replace
(
/
\s
+/g
,
""
).
length
}}
/24
</span>
</el-col>
<el-col
:span=
"10"
class=
"curt-position-wrapper"
>
<div
class=
"curt-position"
>
<ShoppingCart
></ShoppingCart>
</div>
</el-col>
</el-form-item>
<el-form-item
label=
"发起机构名称:"
>
...
...
@@ -89,7 +94,30 @@
<p
class=
"time-message"
><i
class=
"el-icon-warning-outline"
></i>
项目有效期为
{{
formData
.
expireDay
}}
天,选择项目起止时间须在有效期内
</p>
</div>
<div
class=
"basic-item-icon"
>
<el-form-item
label=
"列表图片:"
style=
"margin-bottom: 10px"
>
<el-col
:span=
"13"
style=
"height:95px"
>
<div
class=
"url1-selected"
>
<img
:src=
"formData.attachmentUrl1"
alt=
""
>
</div>
</el-col>
<el-col
:span=
"13"
style=
"height:95px"
>
<div
style=
"color:#666666;font-size:14px;"
>
从模版中选择其他列表图片
</div>
<ul
class=
"url1-list"
>
<li
class=
"img-wrapper"
v-for=
"(item, index) in attachMap[1]"
:key=
"index"
@
click=
"selectedAttachUrl(item, 1)"
>
<img
class=
"selected-icon"
:src=
"item.attachmentUrl"
alt=
""
>
<img
class=
"status-icon"
v-show=
"item.checked"
src=
"../../../assets/custom/icon/icon-select.png"
alt
/>
<img
class=
"status-icon"
v-show=
"!item.checked"
src=
"../../../assets/custom/icon/icon-select-no.png"
alt
/>
</li>
</ul>
</el-col>
</el-form-item>
<!--
<div
class=
"basic-item-icon"
>
<span
class=
"require"
>
*
</span>
<el-form-item
label=
"列表图片:"
>
<el-upload
...
...
@@ -115,21 +143,21 @@
</el-upload>
</el-form-item>
<p
class=
"upload-message"
v-if=
"uploadImgMessage"
>
请选择列表图片
</p>
</div>
</div>
-->
<!-- @change="changeCover" -->
<el-form-item
label=
"封面类型:"
>
<el-radio-group
size=
"small"
v-model=
"formData.type"
@
change=
"changeCover"
disabled
>
<el-radio
:label=
"1"
>
图片
</el-radio>
<
el-radio
:label=
"2"
>
视频
</el-radio
>
<
!--
<el-radio
:label=
"2"
>
视频
</el-radio>
--
>
</el-radio-group>
</el-form-item>
<div
class=
"basic-item-icon"
>
<
!--
<
div
class=
"basic-item-icon"
>
<span
class=
"require"
>
*
</span>
<el-form-item
label=
"封面文件:"
>
<el-upload
...
...
@@ -174,7 +202,30 @@
</el-upload>
</el-form-item>
<p
class=
"upload-message"
v-if=
"uploadImgMessage2"
>
请选择封面
</p>
</div>
</div>
-->
<el-form-item
label=
"封面文件:"
style=
"margin-bottom: 10px"
>
<el-col
:span=
"13"
style=
"height: 95px"
>
<div
class=
"url2-selected"
>
<img
:src=
"formData.attachmentUrl2"
alt=
""
>
</div>
</el-col>
<el-col
:span=
"13"
style=
"height:95px"
>
<div
style=
"color:#666666;font-size:14px;"
>
从模版中选择其他封面图片
</div>
<ul
class=
"url2-list"
>
<li
class=
"img-wrapper"
v-for=
"(item, index) in attachMap[2]"
:key=
"index"
@
click=
"selectedAttachUrl(item, 2)"
>
<img
class=
"selected-icon"
:src=
"item.attachmentUrl"
alt=
""
>
<img
class=
"status-icon"
v-show=
"item.checked"
src=
"../../../assets/custom/icon/icon-select.png"
alt
/>
<img
class=
"status-icon"
v-show=
"!item.checked"
src=
"../../../assets/custom/icon/icon-select-no.png"
alt
/>
</li>
</ul>
</el-col>
</el-form-item>
<el-form-item
label=
"项目简介:"
prop=
"projectIntro"
>
<el-col
:span=
"13"
>
...
...
@@ -199,8 +250,10 @@
<
script
>
import
{
doUpload
,
getFilePath
}
from
"../../../utils/qiniu-util"
;
import
{
openLoading
,
closeLoading
}
from
"../../../utils/utils"
;
import
ShoppingCart
from
'@/components/education/custom/sorted-cart'
import
{
convertTime
}
from
"../../../utils"
;
import
dialog
from
"./dialog"
;
import
{
mapGetters
}
from
'vuex'
;
let
vm
=
null
;
export
default
{
props
:
{
...
...
@@ -245,14 +298,13 @@ export default {
projectBegintime: "", //模板开始时间
projectEndtime: "", //模板结束时间
projectIntro: "", //开放模板简介
projectType:
3
, //类型
projectType:
4
, //类型
type: 1, //封面类型 1图片2视频
projectStatus: 1, //1.草稿 2.未上架 3.审核中/待审核 4.已上架 5.已下架 6.已拒绝/未上架
expireDay:
1
, //模板有效期(天)
expireDay:
90
, //模板有效期(天)
status4Flag: 0, //0表示没有上过架,1表示上过架
attachmentUrl1: "",
attachmentUrl2: "",
attachmentUrl3: "",
attachmentMore1: {
attachmentExt: "",
attachmentName: "",
...
...
@@ -351,11 +403,19 @@ export default {
confirmMsg: '取消',
hideMsg: '重新选择'
},
isPreview: 0
isPreview: 0,
attachMap: {
1: [],
2: []
},
}
},
computed: {
...mapGetters(['cartList']),
},
components: {
dialogComponet:dialog
dialogComponet:dialog,
ShoppingCart
},
created() {
vm = this;
...
...
@@ -371,36 +431,88 @@ export default {
}
},
methods: {
// 选择列表或封面图片
selectedAttachUrl(item, index) {
this.attachMap[index].forEach( attach => {
if(item.attachmentUrl == attach.attachmentUrl) {
attach.checked = true;
} else {
attach.checked = false;
}
})
vm.formData['attachmentUrl' + index] = item.attachmentUrl;
vm.$forceUpdate();
console.log(this.attachMap);
},
// 设置已有的基本信息
setBaseMessage(data) {
data.projectData.projectBegintime = convertTime(data.projectData.projectBegintime);
data.projectData.projectEndtime = convertTime(data.projectData.projectEndtime);
//
data.projectData.projectBegintime = convertTime(data.projectData.projectBegintime);
//
data.projectData.projectEndtime = convertTime(data.projectData.projectEndtime);
vm.formData = Object.assign(vm.formData, data.projectData);
vm.formData.attachmentUrl1 = data.attachmentData[0].attachmentUrl;
vm.formData.attachmentMore1 = Object.assign(vm.formData.attachmentMore1, data.attachmentData[0]);
//
vm.formData = Object.assign(vm.formData, data.projectData);
//
vm.formData.attachmentUrl1 = data.attachmentData[0].attachmentUrl;
//
vm.formData.attachmentMore1 = Object.assign(vm.formData.attachmentMore1, data.attachmentData[0]);
// 暂存为1 下一步为3
vm.formData.projectType = vm.formData.projectType == 0 ?
3
: vm.formData.projectType;
vm.formData.projectType = vm.formData.projectType == 0 ?
4
: vm.formData.projectType;
vm.formData.projectBegintime = vm.formData.projectBegintime ? new Date(vm.formData.projectBegintime) : '';
vm.formData.projectEndtime = vm.formData.projectBegintime ? new Date(vm.formData.projectEndtime) : '';
if (data.attachmentData[1]) {
vm.formData.attachmentUrl2 = data.attachmentData[1].attachmentUrl;
vm.formData.type = data.attachmentData[1].attachmentType;
vm.formData.attachmentMore2 = Object.assign(vm.formData.attachmentMore2, data.attachmentData[1]);
}
vm.$emit('setStatus4Flag',data.projectData.status4Flag)
// if (data.attachmentData[1]) {
// vm.formData.attachmentUrl2 = data.attachmentData[1].attachmentUrl;
// vm.formData.type = data.attachmentData[1].attachmentType;
// vm.formData.attachmentMore2 = Object.assign(vm.formData.attachmentMore2, data.attachmentData[1]);
// }
// 不知道是否要使用
// vm.$emit('setStatus4Flag',data.projectData.status4Flag)
},
// 获取选择模板后的基本信息
// // 设置已有的基本信息
// setBaseMessage(data) {
// data.projectData.projectBegintime = convertTime(data.projectData.projectBegintime);
// data.projectData.projectEndtime = convertTime(data.projectData.projectEndtime);
// vm.formData = Object.assign(vm.formData, data.projectData);
// vm.formData.attachmentUrl1 = data.attachmentData[0].attachmentUrl;
// vm.formData.attachmentMore1 = Object.assign(vm.formData.attachmentMore1, data.attachmentData[0]);
// // 暂存为1 下一步为3
// vm.formData.projectType = vm.formData.projectType == 0 ? 3 : vm.formData.projectType;
// vm.formData.projectBegintime = vm.formData.projectBegintime ? new Date(vm.formData.projectBegintime) : '';
// vm.formData.projectEndtime = vm.formData.projectBegintime ? new Date(vm.formData.projectEndtime) : '';
// if (data.attachmentData[1]) {
// vm.formData.attachmentUrl2 = data.attachmentData[1].attachmentUrl;
// vm.formData.type = data.attachmentData[1].attachmentType;
// vm.formData.attachmentMore2 = Object.assign(vm.formData.attachmentMore2, data.attachmentData[1]);
// }
// vm.$emit('setStatus4Flag',data.projectData.status4Flag)
// },
// 创建时,获取机构信息、列表图片等
getMessage() {
openLoading(vm);
vm.GET(`portal/
openTemplateProject/getOpenTemplateInfoForCreate/${vm.openTemplateId}`
)
vm.GET(`portal/
portalInfo/sass/attach`, {typeList: [1,2]}
)
.then(res => {
closeLoading(vm);
if (res.code == "
000000
") {
let data = res.data;
data.projectData.organizationNameList = [data.projectData.creatorOrganizationName]
this.$emit('hideSave',res.data.projectData.projectStatus)
vm.setBaseMessage(res.data);
this.attachMap = res.data.attachMap;
this.attachMap[1].forEach(item => {
item.checked = false;
});
this.attachMap[2].forEach(item => {
item.checked = false;
});
this.formData.attachmentUrl1 = this.attachMap[1][0].attachmentUrl;
this.formData.attachmentUrl2 = this.attachMap[2][0].attachmentUrl;
this.formData.creatorOrganizationName = res.data.creatorOrganizationName || '';
this.attachMap[1][0].checked = true;
this.attachMap[2][0].checked = true;
console.log('this.attachMap', this.attachMap);
// let data = res.data;
// data.projectData.organizationNameList = [data.projectData.creatorOrganizationName]
// this.$emit('hideSave',res.data.projectData.projectStatus)
// vm.setBaseMessage(res.data);
} else {
vm.$message.info(res.message);
}
...
...
@@ -409,15 +521,38 @@ export default {
closeLoading(vm);
vm.$message.warning('请稍后重试');
});
},
},
// 获取选择模板后的基本信息
// getMessage() {
// openLoading(vm);
// vm.GET(`portal/openTemplateProject/getOpenTemplateInfoForCreate/${vm.openTemplateId}`)
// .then(res => {
// closeLoading(vm);
// if (res.code == "
000000
") {
// let data = res.data;
// data.projectData.organizationNameList = [data.projectData.creatorOrganizationName]
// this.$emit('hideSave',res.data.projectData.projectStatus)
// vm.setBaseMessage(res.data);
// } else {
// vm.$message.info(res.message);
// }
// })
// .catch((err) => {
// closeLoading(vm);
// vm.$message.warning('请稍后重试');
// });
// },
// 获取编辑时的信息
getEditorMessage() {
openLoading(vm);
vm.GET(`portal/portalInfo/getProjectInfo/${vm.projectId}`)
// vm.GET(`portal/portalInfo/getProjectInfo/${vm.projectId}`)
vm.GET(`portal/portalCustom/getInfo/${vm.projectId}`)
.then(res => {
closeLoading(vm);
if (res.code == "
000000
") {
this.$emit('hideSave',res.data.projectData.projectStatus)
//
this.$emit('hideSave',res.data.projectData.projectStatus)
vm.setBaseMessage(res.data)
} else {
vm.$message.info(res.message);
...
...
@@ -428,20 +563,24 @@ export default {
vm.$message.warning('请稍后重试');
});
},
// 增加发起机构
plusOrg(index) {
vm.formData.organizationNameList.splice(index + 1, 0, '');
},
// 删除发起机构
deleteOrg(index) {
vm.formData.organizationNameList.splice(index, 1);
},
// 机构名称输入
changeOrganizationName() {
let textLength = vm.formData.organizationName.length;
// 机构输入提示显示与否
vm.visibleName = textLength == 0;
},
// 离开机构名称焦点
blurName() {
vm.visibleName = false;
...
...
@@ -449,6 +588,7 @@ export default {
vm.submitForm("
formData
");
}, 200);
},
// 机构名称聚焦
focusName(index) {
let textLength = vm.formData.organizationNameList[index].length;
...
...
@@ -459,140 +599,148 @@ export default {
vm.visibleName = false;
}
},
// 机构选择默认值
checkDefault() {
vm.organizationContent = vm.formData.creatorOrganizationName;
vm.formData.organizationNameList.splice(vm.orgListIndex-1, 1, vm.organizationContent);
vm.visibleName = false;
},
//上传列表图片
beforeUploadListPic(file) {
let fileLimit = {
width: 230,
height: 172,
size: 0.5,
sizeText: "
500
K
",
key: "
attachmentUrl1
",
more: "
attachmentMore1
",
show: "
uploadImgMessage
"
};
vm.beforeAvatarUpload(file, fileLimit);
},
// beforeUploadListPic(file) {
// let fileLimit = {
// width: 230,
// height: 172,
// size: 0.5,
// sizeText: "
500
K
",
// key: "
attachmentUrl1
",
// more: "
attachmentMore1
",
// show: "
uploadImgMessage
"
// };
// vm.beforeAvatarUpload(file, fileLimit);
// },
//上传图片校验
beforeAvatarUpload(file, fileLimit) {
const isJPG = file.type === "
image
/
jpeg
";
const isPNG = file.type === "
image
/
png
";
const isLt2M = file.size / 1024 / 1024 < fileLimit.size;
if (!isJPG && !isPNG) {
vm.$message.error("
图片不符合规范,请根据规范上传图片
");
return;
}
if (!isLt2M) {
vm.$message.error("
图片不符合规范,请根据规范上传图片
");
return;
}
let _img = new FileReader();
_img.readAsDataURL(file);
_img.onload = function(theFile) {
let image = new Image();
image.src = theFile.target.result;
image.onload = function() {
let _vm = this;
if (
_vm.width != fileLimit.width ||
_vm.height != fileLimit.height
) {
vm.$message.error("
图片不符合规范,请根据规范上传图片
");
} else {
openLoading(vm);
doUpload(
vm,
file,
getFilePath(file, null),
"
preview4
",
"
progress1
",
1
).then(function(path) {
closeLoading(vm);
console.log(path);
if (fileLimit.show == "
uploadImgMessage
") {
vm.uploadImgMessage = false;
} else if (fileLimit.show == "
uploadImgMessage2
") {
vm.uploadImgMessage2 = false;
}
vm.formData[fileLimit.key] = path.fullPath;
vm.formData[fileLimit.more] = {
attachmentName: path.name,
attachmentExt: path.ext,
attachmentSize: path.size
};
vm.$message.success("
上传成功
");
});
}
};
};
return isJPG && isLt2M;
},
// 删除图片
deleteImg(type) {
if (type == 1) {
vm.formData.attachmentUrl1 = "";
vm.imgMouseOver = false;
} else {
vm.formData.attachmentUrl2 = "";
vm.imgMouseOver2 = false;
}
},
//改变封面类型
changeCover(radio) {
vm.formData.attachmentUrl2 = "";
},
//上传封面图片
beforeUploadCoverPic(file) {
let fileLimit = {
width: 750,
height: 420,
size: 2,
sizeText: "
2.0
M
",
key: "
attachmentUrl2
",
more: "
attachmentMore2
",
show: "
uploadImgMessage2
"
};
if (vm.formData.type == 1) {
vm.beforeAvatarUpload(file, fileLimit);
} else {
vm.beforeUploadMp4(file);
}
},
//上传mp4
beforeUploadMp4(file) {
console.log(file);
const isMP4 = file.type === "
video
/
mp4
";
const isLt = file.size / 1024 / 1024 < 500;
if (!isLt) {
vm.$message.error("
视频不符合规范,请根据规范上传视频
");
return;
}
if (!isMP4) {
vm.$message.error("
视频不符合规范,请根据规范上传视频
");
} else {
openLoading(vm);
doUpload(
vm,
file,
getFilePath(file, null),
"
preview4
",
"
progress1
",
""
).then(function(path) {
closeLoading(vm);
console.log(path);
vm.uploadImgMessage2 = false;
vm.formData.attachmentUrl2 = path.fullPath;
vm.$message.success("
上传成功
");
});
}
},
// beforeAvatarUpload(file, fileLimit) {
// const isJPG = file.type === "
image
/
jpeg
";
// const isPNG = file.type === "
image
/
png
";
// const isLt2M = file.size / 1024 / 1024 < fileLimit.size;
// if (!isJPG && !isPNG) {
// vm.$message.error("
图片不符合规范,请根据规范上传图片
");
// return;
// }
// if (!isLt2M) {
// vm.$message.error("
图片不符合规范,请根据规范上传图片
");
// return;
// }
// let _img = new FileReader();
// _img.readAsDataURL(file);
// _img.onload = function(theFile) {
// let image = new Image();
// image.src = theFile.target.result;
// image.onload = function() {
// let _vm = this;
// if (
// _vm.width != fileLimit.width ||
// _vm.height != fileLimit.height
// ) {
// vm.$message.error("
图片不符合规范,请根据规范上传图片
");
// } else {
// openLoading(vm);
// doUpload(
// vm,
// file,
// getFilePath(file, null),
// "
preview4
",
// "
progress1
",
// 1
// ).then(function(path) {
// closeLoading(vm);
// console.log(path);
// if (fileLimit.show == "
uploadImgMessage
") {
// vm.uploadImgMessage = false;
// } else if (fileLimit.show == "
uploadImgMessage2
") {
// vm.uploadImgMessage2 = false;
// }
// vm.formData[fileLimit.key] = path.fullPath;
// vm.formData[fileLimit.more] = {
// attachmentName: path.name,
// attachmentExt: path.ext,
// attachmentSize: path.size
// };
// vm.$message.success("
上传成功
");
// });
// }
// };
// };
// return isJPG && isLt2M;
// },
// // 删除图片
// deleteImg(type) {
// if (type == 1) {
// vm.formData.attachmentUrl1 = "";
// vm.imgMouseOver = false;
// } else {
// vm.formData.attachmentUrl2 = "";
// vm.imgMouseOver2 = false;
// }
// },
// //改变封面类型
// changeCover(radio) {
// vm.formData.attachmentUrl2 = "";
// },
// //上传封面图片
// beforeUploadCoverPic(file) {
// let fileLimit = {
// width: 750,
// height: 420,
// size: 2,
// sizeText: "
2.0
M
",
// key: "
attachmentUrl2
",
// more: "
attachmentMore2
",
// show: "
uploadImgMessage2
"
// };
// if (vm.formData.type == 1) {
// vm.beforeAvatarUpload(file, fileLimit);
// } else {
// vm.beforeUploadMp4(file);
// }
// },
// //上传mp4
// beforeUploadMp4(file) {
// console.log(file);
// const isMP4 = file.type === "
video
/
mp4
";
// const isLt = file.size / 1024 / 1024 < 500;
// if (!isLt) {
// vm.$message.error("
视频不符合规范,请根据规范上传视频
");
// return;
// }
// if (!isMP4) {
// vm.$message.error("
视频不符合规范,请根据规范上传视频
");
// } else {
// openLoading(vm);
// doUpload(
// vm,
// file,
// getFilePath(file, null),
// "
preview4
",
// "
progress1
",
// ""
// ).then(function(path) {
// closeLoading(vm);
// console.log(path);
// vm.uploadImgMessage2 = false;
// vm.formData.attachmentUrl2 = path.fullPath;
// vm.$message.success("
上传成功
");
// });
// }
// },
// 点击下一步
nextStep() {
let flag = true;
...
...
@@ -612,6 +760,7 @@ export default {
vm.insertOrupdate();
}
},
// 暂存
save() {
if (vm.$refs['formData'].projectName == '') {
...
...
@@ -620,6 +769,7 @@ export default {
vm.insertOrupdate(1);
};
},
// 新增或者更新基本信息
insertOrupdate(status) {
...
...
@@ -642,7 +792,7 @@ export default {
vm.formData.attachmentMore1.attachmentUrl = vm.formData.attachmentUrl1;
vm.formData.attachmentMore2.attachmentUrl = vm.formData.attachmentUrl2;
// 封面类型
vm.formData.attachmentMore2.attachmentType =
vm.formData.type;
vm.formData.attachmentMore2.attachmentType = vm.formData.type;
vm.formData.attachmentMore2.kind = 2;
//整合图片视频
vm.attachmentModel[0] = Object.assign(vm.attachmentModel[0],vm.formData.attachmentMore1);
...
...
@@ -652,8 +802,10 @@ export default {
baseobj.attachmentModel = JSON.stringify(vm.attachmentModel);
baseobj.attachmentPDFModel= null;
baseobj.notifyData= null;
baseobj.hotCourseForPortalModelList = vm.cartList;
console.log(baseobj);
openLoading(vm);
vm.POST("
portal
/
portal
Info
/
insertOrUpdate
", baseobj)
vm.POST("
portal
/
portal
Custom
/
insertOrUpdate
", baseobj)
.then(res => {
closeLoading(vm);
if (res.code == "
000000
") {
...
...
@@ -837,4 +989,78 @@ export default {
margin
:
-6px
0
20px
150px
;
font-size
:
14px
;
}
.url1-selected
{
img
{
widows
:
120px
;
height
:
90px
;
}
}
.url1-list
{
display
:
flex
;
flex-direction
:
row
;
.img-wrapper
{
position
:
relative
;
top
:
0
;
left
:
0
;
z-index
:
1
;
.selected-icon
{
width
:
60px
;
height
:
45px
;
margin-right
:
10px
;
}
.status-icon
{
position
:
absolute
;
top
:
5px
;
right
:
15px
;
z-index
:
2
;
widows
:
14px
;
height
:
14px
;
}
}
}
.url2-selected
{
img
{
width
:
160px
;
height
:
90px
;
}
}
.url2-list
{
display
:
flex
;
flex-direction
:
row
;
.img-wrapper
{
position
:
relative
;
top
:
0
;
left
:
0
;
z-index
:
1
;
.selected-icon
{
width
:
80px
;
height
:
45px
;
margin-right
:
10px
;
}
.status-icon
{
position
:
absolute
;
top
:
5px
;
right
:
15px
;
z-index
:
2
;
widows
:
14px
;
height
:
14px
;
}
}
}
.curt-position-wrapper
{
position
:
relative
;
top
:
0
;
left
:
0
;
z-index
:
100
;
.curt-position
{
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
101
;
}
}
</
style
>
\ No newline at end of file
src/components/education/custom/sorted-cart.vue
0 → 100644
浏览文件 @
f16572db
<
template
>
<div
class=
"sorted-cart-wrapper"
>
<div
class=
"cart-header"
>
<span
class=
"title"
>
已选项目课程(共
{{
this
.
cartList
.
length
}}
节)
</span>
<span
class=
"sub"
>
可上下拖拽课程行,调整课程在列表页的展示顺序
</span>
</div>
<!--
<draggable
v-model=
"myArray"
class=
"cart-list"
>
-->
<draggable
class=
"cart-list"
v-model=
"cartList"
>
<div
class=
"cart-course"
v-for=
"item in cartList"
:key=
"item.courseId"
>
<div
class=
"img"
>
<img
src=
"../../../assets/custom/test.png"
alt
/>
<span
class=
"level"
>
{{
item
.
typeStr
}}
</span>
</div>
<div
class=
"detail"
>
<span
class=
"title"
>
{{
item
.
courseName
|
shortName
}}
</span>
<div
class=
"chapter"
>
<span>
{{
item
.
docName
}}
</span>
<span
class=
"section-num"
>
{{
item
.
chapterSum
}}
章
{{
item
.
lectureNum
}}
节
{{
item
.
totalTime
}}
分
</span>
</div>
</div>
<div
class=
"handler"
>
<img
src=
"../../../assets/custom/icon/icon-handle.png"
alt
/>
</div>
</div>
</draggable>
</div>
</
template
>
<
script
>
import
{
mapGetters
}
from
"vuex"
;
import
draggable
from
"vuedraggable"
;
export
default
{
data
()
{
return
{};
},
computed
:
{
// ...mapGetters(["cartList"]),
cartList
:
{
get
()
{
console
.
log
(
'get()'
);
return
this
.
$store
.
state
.
customStore
.
cartList
;
},
set
(
value
)
{
console
.
log
(
'set(value)'
,
value
);
this
.
$store
.
dispatch
(
"setCartList"
,
value
);
}
}
},
components
:
{
draggable
},
methods
:
{}
};
</
script
>
<
style
lang=
"less"
scoped
>
.sorted-cart-wrapper {
font-family: PingFang SC !important;
width: 440px;
height: 790px;
background: #fff;
box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.15);
border-radius: 4px;
.cart-header {
display: flex;
flex-direction: column;
height: 70px;
padding: 0 15px;
background: #f9f9f9;
.title {
padding: 15px 0 28px 0;
height: 18px;
line-height: 18px;
font-size: 18px;
font-weight: 700;
color: #000000;
}
.sub {
height: 14px;
line-height: 14px;
font-size: 14px;
font-weight: 400;
color: #999999;
}
}
.cart-list {
display: flex;
flex-direction: column;
justify-content: flex-start;
height: 710px;
overflow: auto;
.cart-course {
cursor: pointer;
user-select: none;
position: relative;
display: flex;
flex-direction: row;
width: 410px;
margin: 15px;
align-items: center;
border-radius: 4px;
&::after {
position: absolute;
left: 0;
bottom: -15px;
z-index: 1;
content: "";
width: 410px;
height: 1px;
background: #e4e7ed;
}
.img {
position: relative;
top: 0;
left: 0;
width: 120;
height: 68px;
margin-right: 15px;
img {
width: 120;
height: 68px;
border-radius: 4px;
}
.level {
position: absolute;
top: 0;
left: 0;
width: 44px;
height: 22px;
line-height: 22px;
text-align: center;
font-size: 14px;
font-weight: 500;
color: #fff;
background: rgba(0, 0, 0, 0.5);
border-radius: 4px 0px 4px 0px;
}
}
.detail {
position: relative;
display: flex;
flex-direction: column;
flex: 1;
height: 60px;
.title {
position: relative;
top: -5px;
left: 0;
font-size: 16px;
line-height: 20px;
font-weight: 600;
color: #373839;
}
.chapter {
position: absolute;
bottom: -16px;
left: 0;
font-size: 14px;
font-weight: 400;
color: #999999;
.section-num::before,
.exam-num::before {
content: "";
position: relative;
top: 2.5px;
left: 0;
display: inline-block;
height: 14px;
line-height: 14px;
margin: 0 10px;
width: 1px;
background: #999999;
}
}
}
.handler {
width: 35px;
img {
cursor: pointer;
width: 20px;
height: 20px;
float: right;
}
}
}
}
}
</
style
>
\ No newline at end of file
src/utils/fetch.js
浏览文件 @
f16572db
...
...
@@ -54,7 +54,7 @@ service.interceptors.request.use(config => {
}
if
(
process
.
env
.
BUILD_ENV
==
"development"
){
// 本地开发环境
// console.log('环境变量>>>> ', process.env.BUILD_ENV);
config
.
headers
[
'token'
]
=
'
073861ABE10245C78D705B90A76939DC
'
;
config
.
headers
[
'token'
]
=
'
19CD6690D41D44148F53BECB7CA86B6F
'
;
// config.headers['token'] = localStorage.getItem('storageToken')
}
else
{
config
.
headers
[
'token'
]
=
localStorage
.
getItem
(
'storageToken'
)
...
...
src/views/education/edit-custom.vue
浏览文件 @
f16572db
...
...
@@ -61,15 +61,6 @@
<dialog-componet
:dialogObj=
"dialogObj"
@
hide=
"hide"
></dialog-componet>
<dialog-componet
:dialogObj=
"sendObj"
@
hide=
"hidefn"
@
confirm=
"confirmFn"
></dialog-componet>
<!--
<draggable
v-model=
"myArray"
>
<transition-group>
<div
v-for=
"element in myArray"
:key=
"element.id"
>
{{
element
.
name
}}
</div>
</transition-group>
</draggable>
-->
</div>
</
template
>
...
...
@@ -83,7 +74,6 @@ import setOrganization from "@/components/education/template/setOrganization";
import
SelectCourseComp
from
"@/components/education/custom/select-course-comp"
;
import
dialog
from
"@/components/education/template/dialog"
;
import
{
openLoading
,
closeLoading
,
resizeHeight
}
from
"@/utils/utils"
;
import
draggable
from
'vuedraggable'
import
{
mapGetters
,
mapActions
}
from
'vuex'
let
vm
=
null
;
...
...
@@ -148,7 +138,7 @@ export default {
},
status_21
:
{
title
:
'该项目创建数量已上限'
,
message
:
'本年度免费创建数已达
4
次,不能继续创建该项目'
,
message
:
'本年度免费创建数已达
20
次,不能继续创建该项目'
,
hideMsg
:
'确定'
}
},
...
...
@@ -163,10 +153,11 @@ export default {
projectStatus
:
1
,
//1.草稿 2.未上架 3.审核中/待审核 4.已上架 5.已下架 6.已拒绝/未上架
status4Flag
:
0
,
//0表示没有上过架,1表示上过架
isPreview
:
0
,
// 1表示是查看信息
maxLimitCreatedCustomProjectCountInYearz
:
20
,
// 同一个用户每年能够创建的项目数
}
},
computed
:
{
...
mapGetters
([
'searchParam'
])
...
mapGetters
([
'searchParam'
,
'cartList'
])
},
watch
:
{
searchParam
:
{
...
...
@@ -174,6 +165,9 @@ export default {
this
.
getCourseList
(
val
);
},
deep
:
true
},
cartList
(
val
)
{
this
.
canNext
=
val
.
length
>
0
;
}
},
components
:
{
...
...
@@ -184,7 +178,6 @@ export default {
setOrganization
,
dialogComponet
:
dialog
,
SelectCourseComp
,
draggable
},
created
()
{
vm
=
this
;
...
...
@@ -199,7 +192,7 @@ export default {
methods
:
{
...
mapActions
([
'setCourseList'
,
'setAllLabelList'
,
'setSubLabelList'
]),
getLabelList
()
{
vm
.
GET
(
"
/
contents/diseases/labelList"
,
{}).
then
(
res
=>
{
vm
.
GET
(
"contents/diseases/labelList"
,
{}).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
// 先将所有的标签添加checked字段
let
labelList
=
res
.
data
;
...
...
@@ -235,15 +228,7 @@ export default {
// (根据条件)查询课程
getCourseList
(
searchParam
)
{
// let param = {
// orderBy: 2,
// grade: 0,
// pageNo: 1,
// pageSize: 10,
// orderBy: 2,
// labelIdList: [441, 442]
// }
vm
.
GET
(
"/contents/diseases/courseListForPortal"
,
searchParam
).
then
(
res
=>
{
vm
.
GET
(
"contents/diseases/courseListForPortal"
,
searchParam
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
let
courseList
=
res
.
data
;
courseList
.
list
.
forEach
(
(
item
)
=>
{
...
...
@@ -274,7 +259,8 @@ export default {
// 按钮点击下一步
nextStep
()
{
if
(
vm
.
active
==
0
)
{
vm
.
checkSelectTemplate
()
vm
.
checkSelectCustomCourse
()
// vm.checkSelectTemplate()
return
;
}
if
(
vm
.
active
==
1
)
{
...
...
@@ -369,6 +355,7 @@ export default {
if
(
vm
.
$route
.
query
.
pageNum
)
{
query
=
{
pageNum
:
vm
.
$route
.
query
.
pageNum
};
}
console
.
log
(
'vm.$router.push'
)
vm
.
$router
.
push
({
path
:
"edit-custom"
,
query
:
query
});
}
else
{
vm
.
$message
({
...
...
@@ -396,6 +383,32 @@ export default {
vm
.
openTemplateId
=
id
;
},
//选中自定义课程后点击下一步时检测(机构和进行中的项目)
checkSelectCustomCourse
()
{
openLoading
(
vm
);
vm
.
GET
(
`portal/portalCustom/checkBeforeCreateCustomProject`
)
.
then
(
res
=>
{
closeLoading
(
vm
);
if
(
res
.
code
==
"000000"
)
{
if
(
res
.
data
.
status
==
0
)
{
vm
.
maxLimitCreatedCustomProjectCountInYear
=
res
.
data
.
maxLimitCreatedCustomProjectCountInYear
;
vm
.
active
=
1
;
return
;
}
else
{
vm
.
dialogObj
=
Object
.
assign
(
vm
.
dialogObj
,
vm
.
statusObj
[
`status_
${
res
.
data
.
status
}
`
]);
vm
.
dialogObj
.
visible
=
true
;
return
;
}
}
else
{
vm
.
$message
.
info
(
res
.
message
);
}
})
.
catch
((
err
)
=>
{
closeLoading
(
vm
);
vm
.
$message
.
warning
(
'请稍后重试'
);
});
},
//选中模板后点击下一步时检测(机构和进行中的项目)
checkSelectTemplate
()
{
openLoading
(
vm
);
...
...
src/views/education/item-manager.vue
浏览文件 @
f16572db
...
...
@@ -31,8 +31,7 @@
placeholder=
"请选择开始时间"
value-format=
"yyyy-MM-dd HH:mm:ss"
:picker-options=
"pickerOptions0"
></el-date-picker>
~
></el-date-picker>
~
<el-date-picker
v-model=
"formInline.projectEndtime"
size=
"small"
...
...
@@ -56,7 +55,7 @@
default-time=
"23:59:59"
></el-date-picker>
</el-form-item>
</el-col>
-->
</el-col>
-->
<el-col
:span=
"4"
style=
"padding:0;text-align:right;padding-right:15px;"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"searchList"
>
查询
</el-button>
<el-button
type=
"default"
size=
"small"
@
click=
"resetForm"
style=
"margin-left:0;"
>
重置
</el-button>
...
...
@@ -81,7 +80,12 @@
</el-row>
<el-form
v-if=
"isRoleOfOuter"
:model=
"formInline"
class=
"demo-form-inline"
>
<el-form-item>
<el-button
class=
"add-button"
size=
"small"
type=
"primary"
@
click=
"toEditCustomPage()"
>
创建自定义项目
</el-button>
<el-button
class=
"add-button"
size=
"small"
type=
"primary"
@
click=
"toEditCustomPage()"
>
创建自定义项目
</el-button>
<el-button
class=
"add-button"
size=
"small"
type=
"primary"
@
click=
"openProject()"
>
新建项目
</el-button>
</el-form-item>
</el-form>
...
...
@@ -89,9 +93,12 @@
<el-table-column
prop=
"id"
label=
"ID编号"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"projectName"
label=
"项目名称"
min-width=
"100"
align=
"center"
>
<template
slot-scope=
"scope"
>
<span
@
click=
"previewTemplate(scope.row, 1)"
style=
"color:rgb(2, 130, 132);cursor:pointer;"
<span
@
click=
"previewTemplate(scope.row, 1)"
style=
"color:rgb(2, 130, 132);cursor:pointer;"
v-if=
"scope.row.projectType == 3
&& (scope.row.level == 'L1' || scope.row.level == 'L2') "
>
{{
scope
.
row
.
projectName
}}
</span>
&& (scope.row.level == 'L1' || scope.row.level == 'L2') "
>
{{
scope
.
row
.
projectName
}}
</span>
<span
v-else
>
{{
scope
.
row
.
projectName
}}
</span>
</
template
>
</el-table-column>
...
...
@@ -105,7 +112,7 @@
align="center"
min-width="100"
show-overflow-tooltip
></el-table-column>
-->
></el-table-column>-->
<el-table-column
prop=
"projectBegintime"
label=
"项目开始时间"
min-width=
"90"
align=
"center"
></el-table-column>
<el-table-column
prop=
"projectEndtime"
label=
"项目结束时间"
min-width=
"90"
align=
"center"
></el-table-column>
<el-table-column
prop=
"projectStatus"
label=
"状态"
align=
"center"
>
...
...
@@ -189,23 +196,19 @@
type=
"primary"
size=
"small"
>
屏蔽
</el-button>
<!-- v-if="scope.row.level != 'L1'" -->
<!-- v-if="scope.row.level != 'L1'" -->
<el-button
v-if=
"idType == 1"
@
click=
"addOrModifyNotice(scope.row, 0)"
type=
"primary"
size=
"small"
>
发送通知
</el-button>
<el-button
@
click=
"reviewReport(scope.row)"
type=
"primary"
size=
"small"
>
查看学情报告
</el-button>
<el-button
@
click=
"reviewReport(scope.row)"
type=
"primary"
size=
"small"
>
查看学情报告
</el-button>
</
template
>
</el-table-column>
<div
slot=
"empty"
>
<div
class=
"table-empty"
>
<img
src=
"../../assets/image/no-content1.png"
>
<img
src=
"../../assets/image/no-content1.png"
/
>
<p>
没有查询到相关结果
</p>
</div>
</div>
...
...
@@ -228,7 +231,8 @@
:visible
.
sync=
"firstCheckVisible"
width=
"600px"
:close-on-click-modal=
"false"
center
>
center
>
<span
style=
"margin: 0 20px;"
>
{{ `项目《${currentRow.projectName}》初审结果为?` }}
</span>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"handleCheckLeft"
>
通 过
</el-button>
...
...
@@ -243,7 +247,8 @@
width=
"600px"
:close-on-click-modal=
"false"
@
close=
"handleTypeClose"
center
>
center
>
<span
style=
"margin: 0 20px;"
>
项目类型:
</span>
<el-radio-group
v-model=
"newProjectType"
>
<el-radio
:label=
"1"
>
普通项目
</el-radio>
...
...
@@ -262,7 +267,8 @@
:visible
.
sync=
"secondCheckVisible"
width=
"600px"
:close-on-click-modal=
"false"
center
>
center
>
<span
style=
"margin: 0 20px;"
>
{{ `项目《${currentRow.projectName}》复审结果为?` }}
</span>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"handleCheckLeft"
>
通 过
</el-button>
...
...
@@ -272,11 +278,12 @@
<!-- 删除 弹窗 -->
<el-dialog
title=
"确认删除"
:show-close=
false
:show-close=
"false"
:visible
.
sync=
"deleteVisible"
:close-on-click-modal=
"false"
width=
"600px"
center
>
center
>
<p
style=
"text-align: center;"
>
删除后将不可撤销,确认删除吗?
</p>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"confirmDelete"
>
删 除
</el-button>
...
...
@@ -287,29 +294,29 @@
<!-- 修改状态 -->
<el-dialog
:title=
"changeStatusConfig.title"
:show-close=
false
:show-close=
"false"
:visible
.
sync=
"changeStatusVisible"
:close-on-click-modal=
"false"
width=
"600px"
center
>
center
>
<p
style=
"text-align: center;"
>
{{changeStatusConfig.message}}
</p>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"changeStatusVisible=false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"changeStatusPre"
>
确 认
</el-button>
</span>
</el-dialog>
</el-dialog>
</div>
</div>
</template>
<
script
>
import
BreadCrumb
from
"../../components/breadcrumb.vue"
;
import
{
create
}
from
"domain"
;
import
{
mapGetters
,
mapActions
}
from
'vuex'
import
{
mapGetters
,
mapActions
}
from
"vuex"
;
import
{
returnData
}
from
"../../utils/mock"
;
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
*
as
commonUtil
from
"../../utils/utils"
;
import
{
setTimeout
}
from
'timers'
;
import
{
setTimeout
}
from
"timers"
;
let
vm
=
null
;
export
default
{
components
:
{
...
...
@@ -321,30 +328,30 @@ export default {
currentRow
:
null
,
currentType
:
4
,
changeStatusConfig
:
{
title
:
'确认通过该项目模版审核吗?'
,
message
:
'下架后,用户新建项目则无法看到该模版'
,
title
:
"确认通过该项目模版审核吗?"
,
message
:
"下架后,用户新建项目则无法看到该模版"
},
idValue
:
''
,
idValue
:
""
,
curmbFirst
:
"教培项目"
,
curmbSecond
:
"项目管理"
,
centerDialogVisible
:
false
,
// 新建项目弹窗
firstCheckVisible
:
false
,
// 各种操作的确认弹窗
centerDialogVisible
:
false
,
// 新建项目弹窗
firstCheckVisible
:
false
,
// 各种操作的确认弹窗
secondCheckVisible
:
false
,
newProjectType
:
1
,
// 1 普通项目 2 CME项目
newProjectType
:
1
,
// 1 普通项目 2 CME项目
searchParam
:
{
name
:
""
,
status
:
""
,
pageNo
:
1
,
pageSize
:
10
},
cmeBtnText
:
''
,
cmeBtnText
:
""
,
currentRow
:
{},
optionStatus
:
[
{
value
:
""
,
label
:
"全部"
},
},
{
value
:
1
,
label
:
"草稿"
...
...
@@ -388,9 +395,8 @@ export default {
{
value
:
11
,
label
:
"复审通过"
}
,
}
// 加上去 。。。。。。。CME
],
tableData
:
[],
totalRows
:
0
,
...
...
@@ -407,7 +413,10 @@ export default {
},
pickerOptions0
:
{
disabledDate
:
time
=>
{
if
(
this
.
formInline
.
projectEndtime
!=
""
&&
this
.
formInline
.
projectEndtime
!=
null
)
{
if
(
this
.
formInline
.
projectEndtime
!=
""
&&
this
.
formInline
.
projectEndtime
!=
null
)
{
return
(
time
.
getTime
()
>
new
Date
(
this
.
formInline
.
projectEndtime
).
getTime
()
...
...
@@ -423,30 +432,30 @@ export default {
);
//减去一天的时间代表可以选择同一天;
}
},
idType
:
''
,
idType
:
""
,
deleteVisible
:
false
,
isRoleOfOuter
:
0
,
isRoleOfOuter
:
0
};
},
computed
:
{
...
mapGetters
([
"_token"
,
"_token"
// "idType",
])
},
created
()
{
vm
=
this
;
vm
.
idType
=
localStorage
.
getItem
(
'storageIdType'
);
vm
.
isRoleOfOuter
=
localStorage
.
getItem
(
'isRoleOfOuter'
)
-
0
;
vm
.
idType
=
localStorage
.
getItem
(
"storageIdType"
);
vm
.
isRoleOfOuter
=
localStorage
.
getItem
(
"isRoleOfOuter"
)
-
0
;
let
pageSize
=
vm
.
formInline
.
pageSize
;
console
.
log
(
'idType:'
,
vm
.
idType
);
if
(
this
.
$route
.
query
.
pageNum
)
{
this
.
formInline
=
{
...
this
.
$store
.
state
.
common
.
itemManager
}
this
.
formInline
.
pageNo
=
parseInt
(
this
.
$route
.
query
.
pageNum
)
console
.
log
(
"idType:"
,
vm
.
idType
);
if
(
this
.
$route
.
query
.
pageNum
)
{
this
.
formInline
=
{
...
this
.
$store
.
state
.
common
.
itemManager
};
this
.
formInline
.
pageNo
=
parseInt
(
this
.
$route
.
query
.
pageNum
)
;
this
.
formInline
.
pageSize
=
pageSize
;
}
this
.
$nextTick
(
function
()
{
;
this
.
$nextTick
(
function
()
{
this
.
getProjectList
();
});
},
...
...
@@ -455,26 +464,24 @@ export default {
commonUtil
.
resizeHeight
();
},
methods
:
{
...
mapActions
([
'updateItemManager'
]),
...
mapActions
([
"updateItemManager"
]),
//跳转到报告详情页
reviewReport
(
row
)
{
let
routerData
=
{
id
:
row
.
id
,
projectName
:
row
.
projectName
,
projectName
:
row
.
projectName
};
vm
.
$router
.
push
({
path
:
"/item-list"
,
query
:
routerData
});
vm
.
$router
.
push
({
path
:
"/item-list"
,
query
:
routerData
});
},
hideDeleteFrom
()
{
this
.
deleteVisible
=
false
;
},
// 打开新建页面
openProject
()
{
if
(
vm
.
idType
==
2
)
{
if
(
vm
.
idType
==
2
)
{
vm
.
toTemplatePage
();
}
else
{
this
.
centerDialogVisible
=
true
;
...
...
@@ -485,32 +492,35 @@ export default {
},
toCmePage
(
isPreview
=
0
)
{
this
.
$router
.
push
(
"edit-cme?projectType=2&isPreview="
+
isPreview
);
},
},
toTemplatePage
(
isPreview
=
0
)
{
this
.
$router
.
push
(
"template-open?projectType=3&isPreview="
+
isPreview
);
},
},
toEditCustomPage
(
isPreview
=
0
)
{
this
.
$router
.
push
(
"edit-custom?projectType=4&isPreview="
+
isPreview
);
},
toShield
(
row
)
{
this
.
$router
.
push
(
"item-shield?projectId="
+
row
.
id
);
this
.
$router
.
push
(
"item-shield?projectId="
+
row
.
id
);
},
handleTypeClose
()
{
this
.
centerDialogVisible
=
false
;
this
.
newProjectType
=
1
;
},
handleCreateProject
()
{
if
(
this
.
newProjectType
==
1
)
{
// 1 普通项目 2 CME项目
if
(
this
.
newProjectType
==
1
)
{
// 1 普通项目 2 CME项目
this
.
toPage
();
}
else
if
(
this
.
newProjectType
==
2
)
{
this
.
toCmePage
();
}
else
if
(
this
.
newProjectType
==
3
)
{
}
else
if
(
this
.
newProjectType
==
3
)
{
this
.
toTemplatePage
();
}
},
previewTemplate
(
row
,
isPreview
)
{
this
.
$router
.
push
(
`template-open?projectId=
${
row
.
id
}
&projectType=3&isPreview=
${
isPreview
}
`
);
this
.
$router
.
push
(
`template-open?projectId=
${
row
.
id
}
&projectType=3&isPreview=
${
isPreview
}
`
);
},
// handleCreateProject(isPreview) {
...
...
@@ -521,24 +531,28 @@ export default {
// } else if(this.newProjectType == 3) {
// this.toTemplatePage(isPreview);
// }
// },
// },
hanldeCmeClick
(
row
)
{
this
.
currentRow
=
row
;
let
status
=
row
.
projectStatus
;
// 7.待初审 8.初审未通过 9.待复审 10.复审未通过 11.复审通过
if
(
status
==
7
||
status
==
8
)
{
// 按钮显示 初审
if
(
status
==
7
||
status
==
8
)
{
// 按钮显示 初审
this
.
firstCheckVisible
=
true
;
}
else
if
(
status
==
9
||
status
==
10
)
{
// 按钮显示 复审
}
else
if
(
status
==
9
||
status
==
10
)
{
// 按钮显示 复审
this
.
secondCheckVisible
=
true
;
}
else
if
(
status
==
11
)
{
// 按钮显示 发布
this
.
changeStatus
(
row
,
3
)
}
else
if
(
status
==
11
)
{
// 按钮显示 发布
this
.
changeStatus
(
row
,
3
);
}
},
handleCheckLeft
()
{
// 左边通过
handleCheckLeft
()
{
// 左边通过
this
.
goToCheckAuth
(
1
);
},
handleCheckRight
()
{
handleCheckRight
()
{
this
.
goToCheckAuth
(
2
);
},
goToCheckAuth
(
refuse
)
{
...
...
@@ -546,7 +560,10 @@ export default {
let
req
=
{};
openLoading
(
vm
);
// refuse = 1 : 同意 refuse = 2:拒绝
vm
.
GET
(
`portal/cme/verifyProject?projectId=
${
row
.
id
}
&refuse=
${
refuse
}
`
,
req
).
then
(
res
=>
{
vm
.
GET
(
`portal/cme/verifyProject?projectId=
${
row
.
id
}
&refuse=
${
refuse
}
`
,
req
).
then
(
res
=>
{
closeLoading
(
vm
);
// debugger;
vm
.
firstCheckVisible
=
false
;
...
...
@@ -554,12 +571,12 @@ export default {
if
(
res
.
code
==
"000000"
)
{
vm
.
getProjectList
();
this
.
$message
({
message
:
'审核成功'
,
type
:
'success'
message
:
"审核成功"
,
type
:
"success"
});
}
else
{
this
.
$message
.
error
(
res
.
message
);
}
}
});
},
searchList
()
{
...
...
@@ -570,8 +587,12 @@ export default {
getProjectList
()
{
let
req
=
{};
req
=
this
.
formInline
;
this
.
formInline
.
projectBegintime
=
!
this
.
formInline
.
projectBegintime
?
""
:
this
.
formInline
.
projectBegintime
;
this
.
formInline
.
projectEndtime
=
!
this
.
formInline
.
projectEndtime
?
""
:
this
.
formInline
.
projectEndtime
;
this
.
formInline
.
projectBegintime
=
!
this
.
formInline
.
projectBegintime
?
""
:
this
.
formInline
.
projectBegintime
;
this
.
formInline
.
projectEndtime
=
!
this
.
formInline
.
projectEndtime
?
""
:
this
.
formInline
.
projectEndtime
;
openLoading
(
vm
);
vm
.
GET
(
"portal/portalInfo/getProjectList"
,
req
).
then
(
res
=>
{
closeLoading
(
vm
);
...
...
@@ -591,15 +612,15 @@ export default {
// CME 专属状态码 为7~11,是这些代码的直接走新逻辑,别的走老逻辑
let
cmeStatus
=
[
7
,
8
,
9
,
10
,
11
];
let
currentStatus
=
parseInt
(
row
.
projectStatus
);
if
(
cmeStatus
.
indexOf
(
currentStatus
)
>
-
1
)
{
return
true
;
if
(
cmeStatus
.
indexOf
(
currentStatus
)
>
-
1
)
{
return
true
;
}
else
{
return
false
;
}
},
//按钮展示情况
showButton
(
row
,
type
)
{
if
(
!
row
.
isRoleOfOuter
)
return
false
;
if
(
!
row
.
isRoleOfOuter
)
return
false
;
// 按钮type类型: 0-编辑
// 1-暂存 2-完成 3-上架 4-通过 5-下架 6-拒绝
// 7- 提醒审核 8(2)-取消审核 9-删除
...
...
@@ -616,7 +637,7 @@ export default {
//外部项目
buttonStatus
=
returnData
().
buttonStatusOut
;
}
if
(
projectStatus
==
null
)
{
if
(
projectStatus
==
null
)
{
return
false
;
}
if
(
level
!=
null
)
{
...
...
@@ -633,24 +654,30 @@ export default {
}
}
// 添加新的判断逻辑
if
(
flag
&&
type
==
0
)
{
return
(
row
.
level
==
'L1'
&&
row
.
idType
==
1
)
||
(
row
.
level
==
'L2'
&&
row
.
idType
==
2
)
if
(
flag
&&
type
==
0
)
{
return
(
(
row
.
level
==
"L1"
&&
row
.
idType
==
1
)
||
(
row
.
level
==
"L2"
&&
row
.
idType
==
2
)
);
}
return
flag
;
},
handleCmeOperate
(
status
)
{
let
text
=
''
;
let
text
=
""
;
// 7.待初审 8.初审未通过 9.待复审 10.复审未通过 11.复审通过
if
(
status
==
7
||
status
==
8
)
{
// 按钮显示 初审
text
=
'初审'
;
}
else
if
(
status
==
9
||
status
==
10
)
{
// 按钮显示 复审
text
=
'复审'
;
}
else
if
(
status
==
11
)
{
// 按钮显示 发布
text
=
'发布'
;
if
(
status
==
7
||
status
==
8
)
{
// 按钮显示 初审
text
=
"初审"
;
}
else
if
(
status
==
9
||
status
==
10
)
{
// 按钮显示 复审
text
=
"复审"
;
}
else
if
(
status
==
11
)
{
// 按钮显示 发布
text
=
"发布"
;
}
this
.
cmeBtnText
=
text
;
return
text
;
// return true / false;
// return true / false;
},
changeStatusPre
()
{
...
...
@@ -658,16 +685,17 @@ export default {
this
.
changeStatusVisible
=
false
;
},
//
//
changeStatusForSP
(
row
,
type
)
{
this
.
currentRow
=
row
;
this
.
currentType
=
type
;
if
(
type
==
4
)
{
this
.
changeStatusConfig
.
title
=
'确认通过该项目审核吗?'
;
this
.
changeStatusConfig
.
message
=
'审核通过后,该项目范围内的学员可在云鹊医App进行培训学习'
;
}
else
if
(
type
==
6
)
{
this
.
changeStatusConfig
.
title
=
'确认要拒绝该项目吗?'
;
this
.
changeStatusConfig
.
message
=
'拒绝后该项目将从列表中消失'
;
if
(
type
==
4
)
{
this
.
changeStatusConfig
.
title
=
"确认通过该项目审核吗?"
;
this
.
changeStatusConfig
.
message
=
"审核通过后,该项目范围内的学员可在云鹊医App进行培训学习"
;
}
else
if
(
type
==
6
)
{
this
.
changeStatusConfig
.
title
=
"确认要拒绝该项目吗?"
;
this
.
changeStatusConfig
.
message
=
"拒绝后该项目将从列表中消失"
;
}
this
.
changeStatusVisible
=
true
;
},
...
...
@@ -677,16 +705,45 @@ export default {
let
projectId
=
row
.
id
;
let
level
=
row
.
level
;
if
(
type
===
0
)
{
this
.
updateItemManager
(
this
.
formInline
)
this
.
updateItemManager
(
this
.
formInline
)
;
//编辑
if
(
row
.
projectType
===
1
)
{
this
.
$router
.
push
(
"edit-manager?projectType=1&projectId="
+
projectId
+
"&level="
+
level
+
'&pageNum='
+
this
.
formInline
.
pageNo
);
}
else
if
(
row
.
projectType
===
2
)
{
this
.
$router
.
push
(
"edit-cme?projectType=2&projectId="
+
projectId
+
"&level="
+
level
+
'&pageNum='
+
this
.
formInline
.
pageNo
);
}
else
if
(
row
.
projectType
===
3
)
{
this
.
$router
.
push
(
"template-open?projectType=3&projectId="
+
projectId
+
"&level="
+
level
+
'&pageNum='
+
this
.
formInline
.
pageNo
);
}
else
if
(
row
.
projectType
===
4
)
{
this
.
$router
.
push
(
"eidt-custom?projectType=4&projectId="
+
projectId
+
"&level="
+
level
+
'&pageNum='
+
this
.
formInline
.
pageNo
);
if
(
row
.
projectType
===
1
)
{
this
.
$router
.
push
(
"edit-manager?projectType=1&projectId="
+
projectId
+
"&level="
+
level
+
"&pageNum="
+
this
.
formInline
.
pageNo
);
}
else
if
(
row
.
projectType
===
2
)
{
this
.
$router
.
push
(
"edit-cme?projectType=2&projectId="
+
projectId
+
"&level="
+
level
+
"&pageNum="
+
this
.
formInline
.
pageNo
);
}
else
if
(
row
.
projectType
===
3
)
{
this
.
$router
.
push
(
"template-open?projectType=3&projectId="
+
projectId
+
"&level="
+
level
+
"&pageNum="
+
this
.
formInline
.
pageNo
);
}
else
if
(
row
.
projectType
===
4
)
{
debugger
this
.
$router
.
push
(
"edit-custom?projectType=4&projectId="
+
projectId
+
"&level="
+
level
+
"&pageNum="
+
this
.
formInline
.
pageNo
);
}
}
else
if
(
type
===
7
)
{
//提醒审核
...
...
@@ -743,13 +800,13 @@ export default {
},
getType
(
value
)
{
let
data
=
value
;
if
(
data
==
8
)
{
if
(
data
==
8
)
{
data
=
2
;
}
return
data
;
},
delItem
(
row
)
{
this
.
deleteVisible
=
true
this
.
deleteVisible
=
true
;
this
.
currentRow
=
row
;
},
hideDeleteFrom
()
{
...
...
@@ -758,13 +815,15 @@ export default {
// 删除项目
confirmDelete
()
{
let
req
=
{};
vm
.
DELETE
(
"portal/portalInfo/delete/"
+
this
.
currentRow
.
id
,
req
).
then
(
res
=>
{
vm
.
$message
.
info
(
res
.
message
);
if
(
res
.
code
==
"000000"
)
{
this
.
deleteVisible
=
false
;
vm
.
getProjectList
();
vm
.
DELETE
(
"portal/portalInfo/delete/"
+
this
.
currentRow
.
id
,
req
).
then
(
res
=>
{
vm
.
$message
.
info
(
res
.
message
);
if
(
res
.
code
==
"000000"
)
{
this
.
deleteVisible
=
false
;
vm
.
getProjectList
();
}
}
}
);
);
},
// 重置表单
resetForm
()
{
...
...
@@ -821,7 +880,6 @@ export default {
.item-manager-wrap
{
.component-content
{
background
:
#fff
;
//margin-top: 88px;
padding
:
10px
;
.header-title
{
padding
:
10px
12px
;
...
...
@@ -829,11 +887,12 @@ export default {
color
:
#449284
;
border-bottom
:
1px
solid
#efefef
;
}
// .table-option span {
// color: #409eff;
// }
.add-button
{
float
:
right
;
.demo-form-inline
{
margin-right
:
20px
;
.add-button
{
float
:
right
;
margin-right
:
10px
;
}
}
.table-empty
{
img
{
...
...
@@ -846,6 +905,6 @@ export default {
}
}
.el-tooltip__popper
{
max-width
:
50%
max-width
:
50%
;
}
</
style
>
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录