提交 a58d7304 编写于 作者: guofeng.chen's avatar guofeng.chen

对接学科列表

上级 0344d1b0
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond"></bread-crumb> <bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond"></bread-crumb>
<div class="component-content screenSet" id="screenSet"> <div class="component-content screenSet" id="screenSet">
<div class="header-title">学科管理</div> <div class="header-title">学科管理</div>
<!-- 搜索查询 -->
<el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;"> <el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;">
<el-form ref="formInline" :model="formInline" label-width="75px" style="min-width:1200px;"> <el-form ref="formInline" :model="formInline" label-width="75px" style="min-width:1200px;">
<el-col style="width: 300px"> <el-col style="width: 300px">
...@@ -28,13 +29,13 @@ ...@@ -28,13 +29,13 @@
</el-col> </el-col>
</el-form> </el-form>
</el-row> </el-row>
<!-- 新建 -->
<el-form :model="formInline" class="demo-form-inline"> <el-form :model="formInline" class="demo-form-inline">
<el-form-item > <el-form-item >
<el-button class="add-button" size="small" type="primary" @click="openProject()">新建项目</el-button> <el-button class="add-button" size="small" type="primary" @click="openProject()">新建项目</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 表格 -->
<el-table class="item-table" :data="tableData" style="width: 100%"> <el-table class="item-table" :data="tableData" style="width: 100%">
<el-table-column prop="id" label="ID编号" min-width="100" align="center"></el-table-column> <el-table-column prop="id" label="ID编号" min-width="100" align="center"></el-table-column>
<el-table-column prop="firstSubjectName" label="学科名称" align="center"></el-table-column> <el-table-column prop="firstSubjectName" label="学科名称" align="center"></el-table-column>
...@@ -59,7 +60,7 @@ ...@@ -59,7 +60,7 @@
</div> </div>
</div> </div>
</el-table> </el-table>
<!-- 分页 -->
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination
background background
...@@ -73,66 +74,6 @@ ...@@ -73,66 +74,6 @@
></el-pagination> ></el-pagination>
</div> </div>
<!-- 初审 弹窗 -->
<el-dialog
title="项目初审"
:visible.sync="firstCheckVisible"
width="600px"
:close-on-click-modal="false"
center
>
<span style="margin: 0 20px;">{{ `项目《${currentRow.projectName}》初审结果为?` }}</span>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleCheckLeft">通 过</el-button>
<el-button @click="handleCheckRight">不通过</el-button>
</span>
</el-dialog>
<!-- 复审 弹窗 -->
<el-dialog
title="项目复审"
:visible.sync="secondCheckVisible"
width="600px"
:close-on-click-modal="false"
center
>
<span style="margin: 0 20px;">{{ `项目《${currentRow.projectName}》复审结果为?` }}</span>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleCheckLeft">通 过</el-button>
<el-button @click="handleCheckRight">不通过</el-button>
</span>
</el-dialog>
<!-- 删除 弹窗 -->
<el-dialog
title="确认删除"
:show-close="false"
:visible.sync="deleteVisible"
:close-on-click-modal="false"
width="600px"
center
>
<p style="text-align: center;">删除后将不可撤销,确认删除吗?</p>
<span slot="footer" class="dialog-footer">
<el-button @click="confirmDelete">删 除</el-button>
<el-button type="primary" @click="hideDeleteFrom">取 消</el-button>
</span>
</el-dialog>
<!-- 修改状态 -->
<el-dialog
:title="changeStatusConfig.title"
:show-close="false"
:visible.sync="changeStatusVisible"
:close-on-click-modal="false"
width="600px"
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>
</div> </div>
</div> </div>
</template> </template>
...@@ -153,27 +94,18 @@ export default { ...@@ -153,27 +94,18 @@ export default {
return { return {
changeStatusVisible: false, changeStatusVisible: false,
currentRow: null, currentRow: null,
currentType: 4,
changeStatusConfig: {
title: "确认通过该项目模版审核吗?",
message: "下架后,用户新建项目则无法看到该模版"
},
idValue: "",
curmbFirst: "教培项目", curmbFirst: "教培项目",
curmbSecond: "学科管理", curmbSecond: "学科管理",
firstCheckVisible: false, // 各种操作的确认弹窗
secondCheckVisible: false,
searchParam: { searchParam: {
name: "", name: "",
status: "", status: "",
pageNo: 1, pageNo: 1,
pageSize: 10 pageSize: 10
}, },
cmeBtnText: "",
currentRow: {}, currentRow: {},
optionStatus: [ optionStatus: [
{ value: "", label: "全部" }, { value: "", label: "全部" },
{ value: 1, label: "草稿" }, // { value: 1, label: "草稿" },
{ value: 2, label: "未上架" }, { value: 2, label: "未上架" },
{ value: 3, label: "审核中/待审核" }, { value: 3, label: "审核中/待审核" },
{ value: 4, label: "已上架" }, { value: 4, label: "已上架" },
...@@ -183,7 +115,6 @@ export default { ...@@ -183,7 +115,6 @@ export default {
tableData: [], tableData: [],
totalRows: 0, totalRows: 0,
loading: true, loading: true,
timingTime: "",
currentPage: 1, currentPage: 1,
formInline: { formInline: {
subjectName: "", subjectName: "",
...@@ -192,7 +123,6 @@ export default { ...@@ -192,7 +123,6 @@ export default {
pageSize: 10 pageSize: 10
}, },
idType: "", idType: "",
deleteVisible: false,
isRoleOfOuter: 0 isRoleOfOuter: 0
}; };
}, },
...@@ -225,65 +155,10 @@ export default { ...@@ -225,65 +155,10 @@ export default {
methods: { methods: {
...mapActions(["updateItemManager", "setKind"]), ...mapActions(["updateItemManager", "setKind"]),
hideDeleteFrom() {
this.deleteVisible = false;
},
// 打开新建页面 // 打开新建页面
openProject() { openProject() {
this.$router.push("edit-subject"); this.$router.push("edit-subject");
}, },
toEditCustomPage(isPreview = 0) {
this.setKind(0);
this.$router.push("edit-custom?projectType=4&isPreview=" + isPreview);
},
hanldeCmeClick(row) {
this.currentRow = row;
let status = row.projectStatus;
// 7.待初审 8.初审未通过 9.待复审 10.复审未通过 11.复审通过
if (status == 7 || status == 8) {
// 按钮显示 初审
this.firstCheckVisible = true;
} else if (status == 9 || status == 10) {
// 按钮显示 复审
this.secondCheckVisible = true;
} else if (status == 11) {
// 按钮显示 发布
this.changeStatus(row, 3);
}
},
handleCheckLeft() {
// 左边通过
this.goToCheckAuth(1);
},
handleCheckRight() {
this.goToCheckAuth(2);
},
goToCheckAuth(refuse) {
let row = this.currentRow;
let req = {};
openLoading(vm);
// refuse = 1 : 同意 refuse = 2:拒绝
vm.GET(
`portal/cme/verifyProject?projectId=${row.id}&refuse=${refuse}`,
req
).then(res => {
closeLoading(vm);
// debugger;
vm.firstCheckVisible = false;
vm.secondCheckVisible = false;
if (res.code == "000000") {
vm.getProjectList();
this.$message({
message: "审核成功",
type: "success"
});
} else {
this.$message.error(res.message);
}
});
},
searchList() { searchList() {
this.formInline.pageNo = 1; this.formInline.pageNo = 1;
this.getProjectList(); this.getProjectList();
...@@ -303,11 +178,11 @@ export default { ...@@ -303,11 +178,11 @@ export default {
// 设置按钮名称、类型、操作之后的status // 设置按钮名称、类型、操作之后的status
let [edit, publish, accept, reject, outOf, del] = [ let [edit, publish, accept, reject, outOf, del] = [
{ name: '编辑', type: 'edit' }, { name: '编辑', type: 'edit' },
{ name: '发布', type: 'publish', next: 3 }, { name: '发布', type: 'publish', next: 3, text: '确定要发布该学科吗?' },
{ name: '通过', type: 'accept', next: 4 }, { name: '通过', type: 'accept', next: 4, text: '确定要通过该学科上架吗?' },
{ name: '拒绝', type: 'reject', next: 6 }, { name: '拒绝', type: 'reject', next: 6, text: '确定要拒绝该学科吗?' },
{ name: '下架', type: 'outOf', next: 5 }, { name: '下架', type: 'outOf', next: 5, text: '确定要下架该学科吗?' },
{ name: '删除', type: 'del', next: 7 }, { name: '删除', type: 'del', next: -1, text: '确定要删除该学科吗?' },
]; ];
switch (item.status) { switch (item.status) {
case 1: case 1:
...@@ -348,27 +223,10 @@ export default { ...@@ -348,27 +223,10 @@ export default {
} }
}); });
}, },
changeStatusPre() {
this.changeStatus(this.currentRow, this.currentType);
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 = "";
}
this.changeStatusVisible = true;
},
onBtnClick(item, btn) { onBtnClick(item, btn) {
if (btn.type === 'edit') { if (btn.type === 'edit') {
this.$router.push( this.$router.push(
"edit-subject?projectId=" + "edit-subject?id=" +
item.id + item.id +
"&level=" + "&level=" +
item.level + item.level +
...@@ -376,7 +234,7 @@ export default { ...@@ -376,7 +234,7 @@ export default {
this.formInline.pageNo this.formInline.pageNo
); );
} else { } else {
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', { this.$confirm(btn.text, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
...@@ -389,147 +247,22 @@ export default { ...@@ -389,147 +247,22 @@ export default {
// 修改状态 // 修改状态
changeStatus(id, status) { changeStatus(id, status) {
this.POST("portal/titleTest/changeSubjectStatus", { id, status }).then(res => { this.POST("portal/titleTest/changeSubjectStatus", { id, status }).then(res => {
this.$message.info(res.message); this.$message.success(res.message);
if (res.code == "000000") { if (res.code == "000000") {
console.log(res); console.log(res);
this.getProjectList(); this.getProjectList();
} }
}); });
}, },
//改变状态
changeStatus(row, type) {
let projectId = row.id;
let level = row.level;
if (type === 0) {
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(
"edit-custom?projectType=4&projectId=" +
projectId + "&level=" + level + "&pageNum=" + this.formInline.pageNo +
"&projectStatus=" + row.projectStatus
);
}
} else if (type === 7) {
//提醒审核
let req = {
portalProjectId: projectId,
warnType: 1
};
vm.GET("portal/portalCheck/remindPortalCheck", req).then(res => {
vm.$message.info(res.message);
vm.getProjectList();
// if (res.code == "000000") {
// console.log(res);
// vm.getProjectList();
// } else {
// vm.$message.info(res.message);
// }
});
} else {
let req = {
projectId: projectId,
changeStatus: vm.getType(type)
};
vm.POST("portal/portalInfo/changeStatus", req).then(res => {
vm.$message.info(res.message);
if (res.code == "000000") {
console.log(res);
vm.getProjectList();
//changeStatus之后remindPortalCheck
if (type == 4 || type == 6 || type == 8) {
//发送消息
let warnType = "";
if (type == 4) {
warnType = 3;
} else if (type == 6) {
warnType = 4;
} else if (type == 8) {
warnType = 5;
}
let req = {
portalProjectId: projectId,
warnType: warnType
};
vm.GET("portal/portalCheck/remindPortalCheck", req).then(res => {
vm.$message.info(res.message);
if (res.code == "000000") {
vm.getProjectList();
}
});
}
}
});
}
},
getType(value) {
let data = value;
if (data == 8) {
data = 2;
}
return data;
},
delItem(row) {
this.deleteVisible = true;
this.currentRow = row;
},
hideDeleteFrom() {
this.deleteVisible = false;
},
// 删除项目
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();
}
}
);
},
// 重置表单 // 重置表单
resetForm() { resetForm() {
vm.formInline = Object.assign( vm.formInline = {
{},
{
subjectName: "", subjectName: "",
status: "", status: "",
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
duringTime: "" duringTime: ""
} }
);
vm.getProjectList(); vm.getProjectList();
}, },
handleSizeChange(val) { handleSizeChange(val) {
...@@ -595,4 +328,7 @@ export default { ...@@ -595,4 +328,7 @@ export default {
.el-tooltip__popper { .el-tooltip__popper {
max-width: 50%; max-width: 50%;
} }
.item-table .el-button{
margin: 5px;
}
</style> </style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册